What I cannot execute, I do not understand: Training and Evaluating LLMs on Program Execution Traces
Not on the map. Why?
Abstract (arXiv)
Code generation and understanding are critical capabilities for large language models (LLMs). Thus, most LLMs are pretrained and fine-tuned on code data. However, these datasets typically treat code as static strings and rarely exploit the dynamic information about their execution. Building upon previous work on trace modeling, we study Execution Tuning (E.T.), a training procedure in which we explicitly model real-world program execution traces without requiring manual test annotations. We train and evaluate models on different execution trace granularities (line and instruction-level) and strategies on the task of output prediction, obtaining around 80% accuracy on CruxEval and MBPP, and showing the advantages of dynamic scratchpads (i.e., self-contained intermediate computations updated by the model rather than accumulated as a history of past computations) on long executions (up to 14k steps). Finally, we discuss E.T.'s practical applications.
Key facts. Cited by 12 papers in the map (data through 14 Oct 2026). Builds on 14 of its 18 references that are in the map. First posted on arXiv 10 Feb 2025.
Builds on
14 of 18 references.
References · 14
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
- 2014Neural Turing Machinescited by 644
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2014Learning to Executecited by 106
- 2024Self-play with Execution Feedback: Improving Instruction-following Capabilities of Large Language Modelscited by 73
- 2024NExT: Teaching Large Language Models to Reason about Code Executioncited by 63
- 2020Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networkscited by 35
Built on by
Citing papers per year: 2025: 4; 2026: 8.
12 papers.
- 2025CWM: An Open-Weights LLM for Research on Code Generation with World Modelscited by 93
- 2026Code as Agent Harnesscited by 47
- 2025A Unified Definition of Hallucination: It's The World Model, Stupid!cited by 6
- 2026Debugging code world modelscited by 5
- 2026Self-Execution Simulation Improves Coding Modelscited by 3
- 2026LLMs versus the Halting Problem: Characterizing Program Termination Reasoningcited by 2
- 2026Towards a Neural Debugger for Pythoncited by 1
- 2025Can Large Language Models Reason About Complex Execution Paths? An Empirical Study on Pythoncited by 0
- 2025Generating Verifiable Chain of Thoughts from Exection-Tracescited by 0
- 2026Learning Reasoning World Models for Parallel Codecited by 0
- 2026Teaching LLMs Program Semantics via Symbolic Execution Tracescited by 0
- 2026PyINE: A Framework for Scalable Elicitation and Oversight via Code Executioncited by 0
- 2026PyINE: A Framework for Scalable Elicitation and Oversight via Code Execution3 Oct 2026
- 2026Code as Agent Harness18 May 2026
- 2026Teaching LLMs Program Semantics via Symbolic Execution Traces7 May 2026
- 2026Learning Reasoning World Models for Parallel Code22 Apr 2026
- 2026Self-Execution Simulation Improves Coding Models11 Mar 2026
- 2026Towards a Neural Debugger for Python10 Mar 2026
- 2026Debugging code world models7 Feb 2026
- 2026LLMs versus the Halting Problem: Characterizing Program Termination Reasoning26 Jan 2026
- 2025A Unified Definition of Hallucination: It's The World Model, Stupid!25 Dec 2025
- 2025Generating Verifiable Chain of Thoughts from Exection-Traces28 Nov 2025
- 2025Can Large Language Models Reason About Complex Execution Paths? An Empirical Study on Python23 Nov 2025
- 2025CWM: An Open-Weights LLM for Research on Code Generation with World Models30 Sep 2025