MARCO: Meta-Reflection with Cross-Referencing for Code Reasoning
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 44 of its 80 references that are in the map. First posted on arXiv 23 May 2025.
Builds on
44 of 80 references.
Closest ancestors · 4
Same direction, newest first
- 2025Unveiling the Magic of Code Reasoning through Hypothesis Decomposition and Amendment17 Feb
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar
- 2023Chain of Code: Reasoning with a Language Model-Augmented Code Emulator7 Dec
- 2023Reasoning with Language Model is Planning with World Model24 May
Other references · 40
- 2023GPT-4 Technical Reportcited by 18,396
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2023Large Language Models Cannot Self-Correct Reasoning Yetcited by 1,017
- 2024DeepSeek-V3 Technical Reportcited by 811
- 2024Training Language Models to Self-Correct via Reinforcement Learningcited by 426
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2016DeepCoder: Learning to Write Programscited by 149
- 2024Debug like a Human: A Large Language Model Debugger via Verifying Runtime Execution Step-by-stepcited by 127
- 2025SoftCoT: Soft Chain-of-Thought for Efficient Reasoning with LLMscited by 116
28 more
- 2024Forest-of-Thought: Scaling Test-Time Compute for Enhancing LLM Reasoningcited by 110
- 2023Phenomenal Yet Puzzling: Testing Inductive Reasoning Capabilities of Language Models with Hypothesis Refinementcited by 89
- 2023Towards Mitigating Hallucination in Large Language Models via Self-Reflectioncited by 81
- 2024DebugBench: Evaluating Debugging Capability of Large Language Modelscited by 76
- 2023MindMap: Knowledge Graph Prompting Sparks Graph of Thoughts in Large Language Modelscited by 73
- 2024Interpretable Contrastive Monte Carlo Tree Search Reasoningcited by 64
- 2024Demystifying Chains, Trees, and Graphs of Thoughtscited by 63
- 2024Reasoning Aware Self-Consistency: Leveraging Reasoning Paths for Efficient LLM Samplingcited by 63
- 2024Beyond Chain-of-Thought: A Survey of Chain-of-X Paradigms for LLMscited by 48
- 2024LLM-A*: Large Language Model Enhanced Incremental Heuristic Search on Path Planningcited by 45
- 2024A Survey on Evaluating Large Language Models in Code Generation Taskscited by 44
- 2025Dynamic Parallel Tree Search for Efficient LLM Reasoningcited by 42
- 2023Boosting Logical Reasoning in Large Language Models through a New Framework: The Graph of Thoughtcited by 41
- 2024Self-Reflection in LLM Agents: Effects on Problem-Solving Performancecited by 39
- 2023DetermLR: Augmenting LLM-based Logical Reasoning from Indeterminacy to Determinacycited by 34
- 2024Towards Self-Improvement of LLMs via MCTS: Leveraging Stepwise Knowledge with Curriculum Preference Learningcited by 30
- 2024LLM-Empowered State Representation for Reinforcement Learningcited by 28
- 2024ROS-LLM: A ROS framework for embodied AI with task feedback and structured reasoningcited by 27
- 2023Towards LLM-driven Dialogue State Trackingcited by 25
- 2024Learning to Summarize from LLM-generated Feedbackcited by 24
- 2023Probabilistic Tree-of-thought Reasoning for Answering Knowledge-intensive Complex Questionscited by 19
- 2024IoT-LLM: a framework for enhancing Large Language Model reasoning from real-world sensor datacited by 18
- 2024Unveiling Factual Recall Behaviors of Large Language Models through Knowledge Neuronscited by 16
- 2025Adaptive Graph of Thoughts: Test-Time Adaptive Reasoning Unifying Chain, Tree, and Graph Structurescited by 16
- 2024Collaborative Quest Completion with LLM-driven Non-Player Characters in Minecraftcited by 9
- 2024A Survey On Enhancing Reinforcement Learning in Complex Environments: Insights from Human and LLM Feedbackcited by 9
- 2023An Interactive Query Generation Assistant using LLM-based Prompt Modification and User Feedbackcited by 6
- 2024LLMs can learn self-restraint through iterative self-reflectioncited by 6
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Beyond Meta-Reasoning: Metacognitive Consolidation for Self-Improving LLM Reasoning
- 2025An Empirical Study of Reasoning Steps in Thinking Code LLMs
- 2024Distilling Algorithmic Reasoning from LLMs via Explaining Solution Programs
- 2026Exploring Extrinsic and Intrinsic Properties for Effective Reasoning with Code Interpreter
- 2026Think Multilingual, Not Harder: A Data-Efficient Framework for Teaching Reasoning Models to Code-Switch
- 2025Computational Thinking Reasoning in Large Language Models
- 2024Mirror: A Multiple-perspective Self-Reflection Method for Knowledge-rich Reasoning
- 2025Metacognitive Reuse: Turning Recurring LLM Reasoning Into Concise Behaviors