The Imitation Game: When LLMs Learn to Reason Like Programs via Code-Centric Reasoning Data Synthesis

Jinyang Zhang, Weibin Liao, Keqin Bao, Sihang Li, Shaobo Wang +8 more
9/13/2026
cs.CLcs.AI
rlhf-rlvr-dpo

Official code: zjy1298/MIMIC (0 stars, Python, last commit 2026-07-17).

Abstract

Large Language Models (LLMs) excel at programming tasks but frequently fail at deterministic, fine-grained reasoning in natural language, relying heavily on semantic approximations rather than robust symbolic execution. To bridge this gap, we propose MIMIC, a framework that leverages executable code as a rigorous medium for reasoning data synthesis.

Show full abstract

MIMIC fundamentally transforms algorithms into verifiable reasoning trajectories through narrative fusion, code-guided test synthesis, and dynamic code instrumentation. Crucially, these explicit intermediate execution states naturally form a Code-Instrumented Reward (CIR), providing dense, high-fidelity process supervision for reinforcement learning without external reward models. Extensive evaluations reveal that models trained via SFT and GRPO on our synthesized dataset achieve substantial, consistent gains. Our method significantly elevates accuracy across general reasoning, complex mathematical benchmarks, and fine-grained deterministic tasks, demonstrating that the procedural rigor of executable code can effectively unlock and enhance the generalized reasoning capabilities of LLMs. Our code and data are available at https://github.com/zjy1298/MIMIC.

View on arXivView PDF

Code Implementations(1)

zjy1298/MIMICOfficial100%

The Imitation Game: When LLMs Learn to Reason Like Programs via Code-Centric Reasoning Data Synthesis

00PythonMay 26, 20264 months ago

Similar Papers

Cite this paper

@article{zhang2026imitation,
  title  = {The Imitation Game: When LLMs Learn to Reason Like Programs via Code-Centric Reasoning Data Synthesis},
  author = {Jinyang Zhang and Weibin Liao and Keqin Bao and Sihang Li and Shaobo Wang and Muyang Ye and Hongxin Ding and Yue Fang and Tianyi Tang and Fei Huang and Kexin Yang and Xingzhang Ren and Dayiheng Liu},
  year   = {2026},
  eprint = {2609.16076},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.16076v1}
}

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/2609.16076.svg)](https://codeofpaper.com/paper/2609.16076)

Discussion