English

Code Execution as Grounded Supervision for LLM Reasoning

Computation and Language 2025-10-21 v2 Artificial Intelligence

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.

Keywords

Cite

@article{arxiv.2506.10343,
  title  = {Code Execution as Grounded Supervision for LLM Reasoning},
  author = {Dongwon Jung and Wenxuan Zhou and Muhao Chen},
  journal= {arXiv preprint arXiv:2506.10343},
  year   = {2025}
}

Comments

EMNLP 2025

R2 v1 2026-07-01T03:12:31.155Z