CoinMath: Harnessing the Power of Coding Instruction for Math LLMs
Chengwei Wei, Bin Wang, Jung-jae Kim, Guimei Liu, Nancy F. Chen

TL;DR
CoinMath introduces a novel training strategy that diversifies coding styles of rationales to significantly improve mathematical reasoning in large language models, outperforming existing state-of-the-art methods.
Contribution
This paper presents CoinMath, a new approach that enhances math LLMs by diversifying code-based rationales, with minimal reliance on general coding instructions or textual rationales.
Findings
Code-based rationales with comments and descriptive names improve performance.
Diversifying coding styles leads to significant performance gains.
CoinMath outperforms baseline models like MAmmoTH in experiments.
Abstract
Large Language Models (LLMs) have shown strong performance in solving mathematical problems, with code-based solutions proving particularly effective. However, the best practice to leverage coding instruction data to enhance mathematical reasoning remains underexplored. This study investigates three key questions: (1) How do different coding styles of mathematical code-based rationales impact LLMs' learning performance? (2) Can general-domain coding instructions improve performance? (3) How does integrating textual rationales with code-based ones during training enhance mathematical reasoning abilities? Our findings reveal that code-based rationales with concise comments, descriptive naming, and hardcoded solutions are beneficial, while improvements from general-domain coding instructions and textual rationales are relatively minor. Based on these insights, we propose CoinMath, a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMathematics, Computing, and Information Processing · Open Education and E-Learning
