Code2Math: Can Your Code Agent Effectively Evolve Math Problems Through Exploration?

Dadi Guo, Yuejin Xie, Qingyu Liu, Jiayu Liu, Zhiyuan Fan +5 more
3/3/2026
cs.CL

Official code: TarferSoul/Code2Math (12 stars, MIT, last commit 2026-03-05).

Abstract

As large language models (LLMs) advance their mathematical capabilities toward the IMO level, the scarcity of challenging, high-quality problems for training and evaluation has become a significant bottleneck. Simultaneously, recent code agents have demonstrated sophisticated skills in agentic coding and reasoning, suggesting that code execution can serve as a scalable environment for mathematical experimentation. In this paper, we investigate the potential of code agents to autonomously evolve existing math problems into more complex variations. We introduce a multi-agent framework designed to perform problem evolution while validating the solvability and increased difficulty of the generated problems. Our experiments demonstrate that, given sufficient test-time exploration, code agents can synthesize new, solvable problems that are structurally distinct from and more challenging than the originals. This work provides empirical evidence that code-driven agents can serve as a viable mechanism for synthesizing high-difficulty mathematical reasoning problems within scalable computational environments. Our data is available at https://github.com/TarferSoul/Code2Math.

View on arXivView PDF

Code Implementations(1)

MIT

Evolved math problems and prompt templates from Code2Math project

120PythonMar 3, 20267 months agoMIT

Similar Papers

Cite this paper

@article{guo2026codemath,
  title  = {Code2Math: Can Your Code Agent Effectively Evolve Math Problems Through Exploration?},
  author = {Dadi Guo and Yuejin Xie and Qingyu Liu and Jiayu Liu and Zhiyuan Fan and Qihan Ren and Shuai Shao and Tianyi Zhou and Dongrui Liu and Yi R. Fung},
  year   = {2026},
  eprint = {2603.03202},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.03202v2}
}

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

Discussion