Self-Execution Simulation Improves Coding Models
Not on the map. Why?
Abstract (arXiv)
A promising research direction in enabling LLMs to generate consistently correct code involves addressing their inability to properly estimate program execution, particularly for code they generate. In this work, we demonstrate that Code LLMs can be trained to simulate program execution in a step-by-step manner and that this capability can be leveraged to improve competitive programming performance. Our approach combines supervised fine-tuning on natural language execution traces, textual explanations grounded in true execution, with reinforcement learning using verifiable rewards. We introduce two complementary objectives: output prediction given code and inputs, and solving competitive programming tasks with either ground-truth or self-predicted execution feedback. These objectives enable models to perform self-verification over multiple candidate solutions, and iterative self-fixing by simulating test execution. Across multiple competitive programming benchmarks, our method yields consistent improvements over standard reasoning approaches. We further present ablations and analysis to elucidate the role of execution simulation and its limitations.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 45 of its 64 references that are in the map. First posted on arXiv 11 Mar 2026.
Builds on
45 of 64 references.
References · 45
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2025Qwen3 Technical Reportcited by 8,195
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2023Let's Verify Step by Stepcited by 3,598
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
33 more
- 2018World Modelscited by 1,444
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2025Kimi K2: Open Agentic Intelligencecited by 523
- 2024MLE-bench: Evaluating Machine Learning Agents on Machine Learning Engineeringcited by 429
- 2024Training Language Models to Self-Correct via Reinforcement Learningcited by 405
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
- 2024When Can LLMs Actually Correct Their Own Mistakes? A Critical Survey of Self-Correction of LLMscited by 230
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 191
- 2025AIMO-2 Winning Solution: Building State-of-the-Art Mathematical Reasoning Models with OpenMathReasoning datasetcited by 165
- 2024Understanding World or Predicting Future? A Comprehensive Survey of World Modelscited by 161
- 2024RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement Learningcited by 146
- 2025OpenCodeReasoning: Advancing Data Distillation for Competitive Codingcited by 106
- 2025Live-SWE-agent: Can Software Engineering Agents Self-Evolve on the Fly?cited by 91
- 2025CWM: An Open-Weights LLM for Research on Code Generation with World Modelscited by 87
- 2025Don't Overthink it. Preferring Shorter Thinking Chains for Improved LLM Reasoningcited by 82
- 2023Improving Code Generation by Training with Natural Language Feedbackcited by 75
- 2025Critique Fine-Tuning: Learning to Critique is More Effective than Learning to Imitatecited by 61
- 2025CodeI/O: Condensing Reasoning Patterns via Code Input-Output Predictioncited by 54
- 2024The Larger the Better? Improved LLM Code-Generation via Budget Reallocationcited by 41
- 2024CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Executioncited by 31
- 2024What Makes Large Language Models Reason in (Multi-Turn) Code Generation?cited by 29
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedbackcited by 22
- 2024The Counterfeit Conundrum: Can Code Language Models Grasp the Nuances of Their Incorrect Generations?cited by 20
- 2026Current Agents Fail to Leverage World Model as Tool for Foresightcited by 15
- 2025What I cannot execute, I do not understand: Training and Evaluating LLMs on Program Execution Tracescited by 11
- 2026Can We Predict Before Executing Machine Learning Agents?cited by 10
- 2025Critique-Coder: Enhancing Coder Models by Critique Reinforcement Learningcited by 7
- 2025LLMs Lean on Priors, Not Programming Language Semanticscited by 5
- 2026Towards a Neural Debugger for Pythoncited by 1
Built on by
Citing papers per year: 2026: 2.
2 papers.
- 2026Quo Vadis, World Modeling?cited by 0
- 2026Improving Large Language Models for Code through Runtime Program-State Reasoningcited by 0
- 2026Improving Large Language Models for Code through Runtime Program-State Reasoning28 Sep 2026
- 2026Quo Vadis, World Modeling?3 Aug 2026