Code Execution as Grounded Supervision for LLM Reasoning

Dongwon Jung, Wenxuan Zhou, Muhao Chen
6/12/2025
cs.CLcs.AI

No official code found. Best implementation: luka-group/Execution-Grounded-Reasoning (3 stars, last commit 2025-08-21).

Abstract

Training large language models (LLMs) with chain-of-thought (CoT) supervision has proven effective for enhancing their reasoning abilities. However, obtaining reliable and accurate reasoning supervision remains a significant challenge. We propose a scalable method for generating a high-quality CoT supervision dataset by leveraging the determinism of program execution. Unlike existing reasoning dataset generation methods that rely on costly human annotations or error-prone LLM-generated CoT, our approach extracts verifiable, step-by-step reasoning traces from code execution and transforms them into a natural language CoT reasoning. Experiments on reasoning benchmarks across various domains show that our method effectively equips LLMs with transferable reasoning abilities across diverse tasks. Furthermore, the ablation studies validate that our method produces highly accurate reasoning data and reduces overall token length during inference by reducing meaningless repetition and overthinking.

View on arXivView PDF

Code Implementations(1)

[EMNLP 2025] Code Execution as Grounded Supervision for LLM Reasoning

30PythonJun 10, 20251 years ago

Similar Papers

Cite this paper

@article{jung2025code,
  title  = {Code Execution as Grounded Supervision for LLM Reasoning},
  author = {Dongwon Jung and Wenxuan Zhou and Muhao Chen},
  year   = {2025},
  eprint = {2506.10343},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.10343v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.10343.svg)](https://codeofpaper.com/paper/2506.10343)

Discussion