MARCO:用于代码推理的元反思与交叉引用
MARCO: Meta-Reflection with Cross-Referencing for Code Reasoning
AI总结:
本文提出MARCO框架,通过元反思积累知识并利用交叉引用共享经验,使LLM智能体在代码推理中动态自我改进,实验验证其有效性。
摘要:
推理能力是大语言模型(LLM)最基本的能力之一,通过复杂的问题求解支持广泛的下游任务。其中一个关键方面是代码推理,涉及对形式语言(即编程代码)的逻辑推理。在本文中,我们通过探索以下问题来增强LLM的这一能力:LLM智能体如何随着其提出的每个解决方案在代码推理中逐步变得更聪明,从而实现显著的累积改进?大多数现有研究采取静态视角,专注于使用冻结的LLM进行孤立的问题求解。相比之下,我们采用认知演化的视角,提出了一种名为元反思与交叉引用(MARCO)的新框架,使LLM能够在推理过程中通过自我改进动态演化。从人类认知发展的角度来看,我们同时利用知识积累和经验分享。具体而言,为了在问题求解过程中积累知识,我们提出了元反思,即对当前问题的推理路径进行反思,以获得供未来参考的知识和经验。此外,为了有效利用其他智能体的经验教训,我们提出了交叉引用,将其他智能体的解决方案和反馈纳入当前问题求解过程。我们在代码推理的多个数据集上进行了实验,结果证明了MARCO的有效性。
英文摘要:
The ability to reason is one of the most fundamental capabilities of large language models (LLMs), enabling a wide range of downstream tasks through sophisticated problem-solving. A critical aspect of this is code reasoning, which involves logical reasoning with formal languages (i.e., programming code). In this paper, we enhance this capability of LLMs by exploring the following question: how can an LLM agent become progressively smarter in code reasoning with each solution it proposes, thereby achieving substantial cumulative improvement? Most existing research takes a static perspective, focusing on isolated problem-solving using frozen LLMs. In contrast, we adopt a cognitive-evolving perspective and propose a novel framework named Meta-Reflection with Cross-Referencing (MARCO) that enables the LLM to evolve dynamically during inference through self-improvement. From the perspective of human cognitive development, we leverage both knowledge accumulation and lesson sharing. In particular, to accumulate knowledge during problem-solving, we propose meta-reflection that reflects on the reasoning paths of the current problem to obtain knowledge and experience for future consideration. Moreover, to effectively utilize the lessons from other agents, we propose cross-referencing that incorporates the solution and feedback from other agents into the current problem-solving process. We conduct experiments across various datasets in code reasoning, and the results demonstrate the effectiveness of MARCO.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。