Scaling Code-Assisted Chain-of-Thoughts and Instructions for Model Reasoning
Honglin Lin, Qizhi Pei, Zhuoshi Pan, Yu Li, Xin Gao, Juntao Li, Conghui He, Lijun Wu
摘要
Reasoning capability is pivotal for Large Language Models (LLMs) to solve complex tasks, yet achieving reliable and scalable reasoning remains challenging. While Chain-of-Thought (CoT) prompting has become a mainstream approach, existing methods often suffer from uncontrolled generation, insufficient quality, and limited diversity in reasoning paths. Recent efforts leverage code to enhance CoT by grounding reasoning in executable steps, but such methods are typically constrained to predefined mathematical problems, hindering scalability and generalizability. In this work, we propose Caco (Code-Assisted Chain-of-ThOught), a novel framework that automates the synthesis of high-quality, verifiable, and diverse instruction-CoT reasoning data through code-driven augmentation. Unlike prior work, Caco first fine-tunes a code-based CoT generator on existing math and programming solutions in a unified code format, then scales the data generation to a large amount of diverse reasoning traces. Crucially, we introduce automated validation via code execution and rule-based filtering to ensure logical correctness and structural diversity, followed by reverse-engineering filtered outputs into natural language instructions and language CoTs to enrich task adaptability. This closed-loop process enables fully automated, scalable synthesis of reasoning data with guaranteed executability. Experiments on our created Caco-1.3M dataset demonstrate that Caco-trained models achieve strong competitive performance on mathematical reasoning benchmarks, outperforming existing strong baselines. Further analysis reveals that Caco's code-anchored verification and instruction diversity contribute to superior generalization across unseen tasks. Our work establishes a paradigm for building self-sustaining, trustworthy reasoning systems without human intervention.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- STaR: Bootstrapping Reasoning With Reasoning 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuning 引用了 PAL: Program-aided Language Models
- MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuning 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuning 引用了 MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Models
- MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Models 引用了 MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuning
- PAL: Program-aided Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
引用它的顶会 Paper2
它引用的 Paper24
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- STaR: Bootstrapping Reasoning With ReasoningEric Zelikman, Yuhuai Wu, Jesse Mu, Noah D. GoodmanNeurIPS 2022 · 1,126 次引用
- PAL: Program-aided Language ModelsLuyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon 等ICML 2023 · 700 次引用
- MetaMath: Bootstrap Your Own Mathematical Questions for Large Language ModelsLonghui Yu, Weisen Jiang, Han Shi, Jincheng Yu 等ICLR 2024 · 637 次引用
- MAmmoTH: Building Math Generalist Models through Hybrid Instruction TuningXiang Yue, Xingwei Qu, Ge Zhang, Yao Fu 等ICLR 2024 · 558 次引用
相关 Paper
- CoT-RAG: Integrating Chain of Thought and Retrieval-Augmented Generation to Enhance Reasoning in Large Language ModelsFeiyang Li, Peng Fang, Zhan Shi, Arijit Khan 等EMNLP Findings 2025 · 11 次引用
- CodeIO: Condensing Reasoning Patterns via Code Input-Output PredictionJunlong Li, Daya Guo, Dejian Yang, Runxin Xu 等ICML 2025
- Revisiting Chain-of-Thought in Code Generation: Do Language Models Need to Learn Reasoning before Coding?Renbiao Liu, Anqi Li, Chaoding Yang, Hui Sun 等ICML 2025
- Large Language Models Meet Symbolic Provers for Logical Reasoning EvaluationChengwen Qi, Ren Ma, Bowen Li, He Du 等ICLR 2025
- Automatic Prompt Augmentation and Selection with Chain-of-Thought from Labeled DataKashun Shum, Shizhe Diao, Tong ZhangEMNLP Findings 2023 · 63 次引用
