MathFimer: Enhancing Mathematical Reasoning by Expanding Reasoning Steps through Fill-in-the-Middle Task
Yuchen Yan, Yongliang Shen, Yang Liu, Jin Jiang, Xin Xu, Mengdi Zhang, Jian Shao, Yueting Zhuang
摘要
Mathematical reasoning represents a critical frontier in advancing large language models (LLMs). While step-by-step approaches have emerged as the dominant paradigm for mathematical problem-solving in LLMs, the quality of reasoning steps in training data fundamentally constrains the performance of the models. Recent studies have demonstrated that more detailed intermediate steps can enhance model performance, yet existing methods for step expansion either require more powerful external models or incur substantial computational costs. In this paper, we introduce MathFimer, a novel framework for mathematical reasoning step expansion inspired by the ''Fill-in-the-middle'' task from code reasoning. By decomposing solution chains into prefix-suffix pairs and training models to reconstruct missing intermediate steps, we develop a specialized model, MathFimer-7B, on our carefully curated NuminaMath-FIM dataset. We then apply these models to enhance existing mathematical reasoning datasets by inserting detailed intermediate steps into their solution chains, creating MathFimer-expanded versions. Through comprehensive experiments on multiple mathematical reasoning datasets, including MathInstruct, MetaMathQA and etc., we demonstrate that models trained on MathFimer-expanded data consistently outperform their counterparts trained on original data across various benchmarks such as GSM8K and MATH. Our approach offers a practical, scalable solution for enhancing mathematical reasoning capabilities in LLMs without relying on powerful external models or expensive inference procedures.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Let LRMs Break Free from Overthinking via Self-Braking Tuning 引用了 Let's Verify Step by Step
- Let LRMs Break Free from Overthinking via Self-Braking Tuning 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
- Let LRMs Break Free from Overthinking via Self-Braking Tuning 引用了 Mind the Gap: Bridging Thought Leap for Improved Chain-of-Thought Tuning
- Mind the Gap: Bridging Thought Leap for Improved Chain-of-Thought Tuning 引用了 Let LRMs Break Free from Overthinking via Self-Braking Tuning
- Self-Consistency Improves Chain of Thought Reasoning in Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
- Let's Verify Step by Step 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
- Let's Verify Step by Step 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Mind the Gap: Bridging Thought Leap for Improved Chain-of-Thought Tuning 引用了 DAPO: An Open-Source LLM Reinforcement Learning System at Scale
- Mind the Gap: Bridging Thought Leap for Improved Chain-of-Thought Tuning 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
- Mind the Gap: Bridging Thought Leap for Improved Chain-of-Thought Tuning 引用了 Let's Verify Step by Step
- Mind the Gap: Bridging Thought Leap for Improved Chain-of-Thought Tuning 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
- Mind the Gap: Bridging Thought Leap for Improved Chain-of-Thought Tuning 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- UGMathBench: A Diverse and Dynamic Benchmark for Undergraduate-Level Mathematical Reasoning with Large Language Models 引用了 Self-Consistency Improves Chain of Thought Reasoning in Language Models
- UGMathBench: A Diverse and Dynamic Benchmark for Undergraduate-Level Mathematical Reasoning with Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
引用它的顶会 Paper3
- Let LRMs Break Free from Overthinking via Self-Braking TuningHaoran Zhao, Yuchen Yan, Yongliang Shen, Haolei Xu 等NeurIPS 2025 · 31 次引用
- Mind the Gap: Bridging Thought Leap for Improved Chain-of-Thought TuningHaolei Xu, Yuchen Yan, Yongliang Shen, Wenqi Zhang 等NeurIPS 2025 · 2 次引用
- UGMathBench: A Diverse and Dynamic Benchmark for Undergraduate-Level Mathematical Reasoning with Large Language ModelsXin Xu, Jiaxin Zhang, Tianhao Chen, Zitong Chao 等ICLR 2025
它引用的 Paper30
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- Let's Verify Step by StepHunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards 等ICLR 2024 · 3,045 次引用
- DAPO: An Open-Source LLM Reinforcement Learning System at ScaleQiying Yu, Zheng Zhang, Ruofei Zhu, Yufeng Yuan 等NeurIPS 2025 · 2,828 次引用
- Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng 等SOSP 2023 · 1,016 次引用
- Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le 等ICLR 2023 · 681 次引用
相关 Paper
- ClozeMath: Improving Mathematical Reasoning in Language Models by Learning to Fill EquationsQuang Hieu Pham, Thuy Duong Nguyen, Tung Pham, Anh Tuan Luu 等ACL Findings 2025
- OpenMathInstruct-2: Accelerating AI for Math with Massive Open-Source Instruction DataShubham Toshniwal, Wei Du, Ivan Moshkov, Branislav Kisacanin 等ICLR 2025
- MARIO: MAth Reasoning with code Interpreter Output - A Reproducible PipelineMinpeng Liao, Chengxi Li, Wei Luo, Jing Wu 等ACL Findings 2024 · 2 次引用
- MathCoder2: Better Math Reasoning from Continued Pretraining on Model-translated Mathematical CodeZimu Lu, Aojun Zhou, Ke Wang, Houxing Ren 等ICLR 2025
- MetaMath: Bootstrap Your Own Mathematical Questions for Large Language ModelsLonghui Yu, Weisen Jiang, Han Shi, Jincheng Yu 等ICLR 2024 · 637 次引用
