Papers
arxiv:2604.03253

Self-Execution Simulation Improves Coding Models

Published on Mar 11
· Submitted by
Gallil Maimon
on Apr 7
Authors:
,
,
,
,

Abstract

Code large language models can be trained to simulate program execution step-by-step, improving competitive programming performance through supervised fine-tuning and reinforcement learning with verifiable rewards.

AI-generated summary

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.

Community

Paper author Paper submitter

🚨New paper🚨 Self-Execution Simulation Improves Coding Models

Current reasoning CodeLMs before providing an answer to programming tasks.

We show that CodeLMs can be post-trained to explicitly simulate execution of tests in order to verify and fix their proposed solutions, leading to additional gains!

Sign up or log in to comment

Get this paper in your agent:

hf papers read 2604.03253
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2604.03253 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2604.03253 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2604.03253 in a Space README.md to link it from this page.

Collections including this paper 2