Proceedings

Can Large Models Teach Student Models to Solve Mathematical Problems Like Human Beings? A Reasoning Distillation Method via Multi-LoRA Interaction

Download BibTeX Cite

Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 8177-8185.

https://doi.org/10.24963/ijcai.2025/909

Abstract

Recent studies have demonstrated that Large Language Models (LLMs) have strong mathematical reasoning abilities but rely on hundreds of billions of parameters. To tackle the challenge of poor reasoning in Small Language Models (SLMs), existing methods typically leverage LLMs to generate massive amounts of data for cramming training. In psychology, they are akin to System 1 thinking, which resolves reasoning problems rapidly based on experience and intuition. However, human learning also requires System 2 thinking, where knowledge is first acquired and then reinforced through practice. Inspired by such two distinct modes of thinking, we propose a novel method based on the multi-LoRA Interaction for mathematical reasoning Distillation (LoRID). First, we input the question and reasoning of each sample into an LLM to create knowledge-enhanced datasets. Subsequently, we train a LoRA block on the student model as an Intuitive Reasoner (IR), which directly generates Chain-of-Thoughts for problem-solving. Then, to imitate System 2 thinking, we train the Knowledge Generator (KG) and Deep Reasoner (DR), respectively. The former outputs only knowledge after receiving problems, while the latter uses that knowledge to perform reasoning. Finally, to address the randomness in the generation of IR and DR, we evaluate whether their outputs are consistent, and the inference process needs to be iterated if not. This step can enhance the mathematical reasoning ability of SLMs through mutual feedback. Experimental results show that LoRID achieves state-of-the-art performance, especially on the GSM8K dataset, where it outperforms the second-best method by 2.3%, 16.1%, 2.4%, 12.3%, and 1.8% accuracy across the five base models, respectively. Meanwhile, we select four strong baselines as System 1, and after integrating them with our method, the reasoning ability of student models is consistently and significantly improved. The datasets and codes are available at https://github.com/Xinhe-Li/LoRID.

  1. [Achiam et al., 2023] Josh Achiam, Steven Adler, Sandhini Agarwal, et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
  2. [Brown et al., 2020] Tom B. Brown, Benjamin Mann, Nick Ryder, et al. Language models are few-shot learners. In NeurIPS, 2020.
  3. [Chaslot et al., 2008] Guillaume Chaslot, Sander Bakkes, Istvan Szita, et al. Monte-carlo tree search: A new frame- work for game ai. In AAAI, 2008.
  4. [Chen et al., 2021] Mark Chen, Jerry Tworek, Heewoo Jun, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
  5. [Chen et al., 2024a] Changyu Chen, Xiting Wang, Ting-En Lin, et al. Masked thought: Simply masking partial rea- soning steps can improve mathematical reasoning learning of language models. In ACL, 2024.
  6. [Chen et al., 2024b] Guoxin Chen, Minpeng Liao, Chengxi Li, et al. Alphamath almost zero: process supervision without process. In NeurIPS, 2024.
  7. [Chen et al., 2024c] Zhaorun Chen, Zhuokai Zhao, Zhihong Zhu, et al. Autoprm: Automating procedural supervision for multi-step reasoning via controllable question decom- position. In NAACL, 2024.
  8. [Cobbe et al., 2021] Karl Cobbe, Vineet Kosaraju, Moham- mad Bavarian, et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
  9. [Gou et al., 2024] Zhibin Gou, Zhihong Shao, Yeyun Gong, et al. ToRA: A tool-integrated reasoning agent for mathe- matical problem solving. In ICLR, 2024.
  10. [Grattafiori et al., 2024] Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, et al. The llama 3 herd of models. arXiv e-prints, pages arXiv-2407, 2024.
  11. [Hendrycks et al., 2021] Dan Hendrycks, Collin Burns, Saurav Kadavath, et al. Measuring mathematical problem solving with the math dataset. In NeurIPS, 2021.
  12. [Hu et al., 2022] Edward J Hu, Phillip Wallis, Zeyuan Allen- Zhu, et al. Lora: Low-rank adaptation of large language models. In ICLR, 2022.
  13. [Hu et al., 2024] Jun Hu, Wenwen Xia, Xiaolu Zhang, et al. Enhancing sequential recommendation via llm-based se- mantic embedding learning. In WWW, 2024.
  14. [Huang et al., 2024] Jinfeng Huang, Qiaoqiao She, Wenbin Jiang, et al. Qdmr-based planning-and-solving prompting for complex reasoning tasks. In COLING, 2024.
  15. [Jaech et al., 2024] Aaron Jaech, Adam Kalai, Adam Lerer, et al. Openai o1 system card. arXiv preprint arXiv:2412.16720, 2024.
  16. [Jiang et al., 2023] Albert Q Jiang, Alexandre Sablayrolles, Arthur Mensch, et al. Mistral 7b. arXiv preprint arXiv:2310.06825, 2023.
  17. [Kahneman, 2011] Daniel Kahneman. Thinking, fast and slow. Farrar, Straus and Giroux, 2011.
  18. [Kojima et al., 2022] Takeshi Kojima, Shixiang Shane Gu, Machel Reid, et al. Large language models are zero-shot reasoners. In NeurIPS, 2022.
  19. [Li et al., 2024a] Chengpeng Li, Zheng Yuan, Hongyi Yuan, et al. Mugglemath: Assessing the impact of query and response augmentation on math reasoning. In ACL, 2024.
  20. [Li et al., 2024b] Zenan Li, Zhi Zhou, Yuan Yao, et al. Neuro-symbolic data generation for math reasoning. In NeurIPS, 2024.
  21. [Longpre et al., 2023] Shayne Longpre, Le Hou, Tu Vu, et al. The flan collection: Designing data and methods for effective instruction tuning. In ICML, 2023.
  22. [Loshchilov and Hutter, 2017] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017.
  23. [Lu et al., 2024] Zimu Lu, Aojun Zhou, Houxing Ren, et al. Mathgenie: Generating synthetic data with question back- translation for enhancing mathematical reasoning of llms. In ACL, 2024.
  24. [Luo et al., 2023] Haipeng Luo, Qingfeng Sun, Can Xu, et al. Wizardmath: Empowering mathematical reason- ing for large language models via reinforced evol-instruct. arXiv preprint arXiv:2308.09583, 2023.
  25. [Magister et al., 2023] Lucie Charlotte Magister, Jonathan Mallinson, Jakub Adamek, et al. Teaching small language models to reason. In ACL, 2023.
  26. [Rafailov et al., 2023] Rafael Rafailov, Archit Sharma, Eric Mitchell, et al. Direct preference optimization: Your lan- guage model is secretly a reward model. In NeurIPS, 2023.
  27. [Ranaldi and Freitas, 2024] Leonardo Ranaldi and Andrè Freitas. Self-refine instruction-tuning for aligning reason- ing in language models. In EMNLP, 2024.
  28. [Shao et al., 2024] Zhihong Shao, Peiyi Wang, Qihao Zhu, et al. Deepseekmath: Pushing the limits of mathemati- cal reasoning in open language models. arXiv preprint arXiv:2402.03300, 2024.
  29. [Tang et al., 2023] Xiaojuan Tang, Zilong Zheng, Jiaqi Li, et al. Large language models are in-context semantic reasoners rather than symbolic reasoners. arXiv preprint arXiv:2305.14825, 2023.
  30. [Tang et al., 2024] Zhengyang Tang, Xingxing Zhang, Benyou Wang, et al. Mathscale: Scaling instruction tuning for mathematical reasoning. In ICML, 2024.
  31. [Team et al., 2023] Gemini Team, Rohan Anil, Sebastian Borgeaud, et al. Gemini: a family of highly capable mul- timodal models. arXiv preprint arXiv:2312.11805, 2023.
  32. [Tong et al., 2024] Yuxuan Tong, Xiwen Zhang, Rui Wang, et al. Dart-math: Difficulty-aware rejection tuning for mathematical problem-solving. In NeurIPS, 2024.
  33. [Toshniwal et al., 2024] Shubham Toshniwal, Ivan Moshkov, Sean Narenthiran, et al. Openmathinstruct-1: A 1.8 million math instruction tuning dataset. In NeurIPS, 2024.
  34. [Touvron et al., 2023] Hugo Touvron, Louis Martin, Kevin Stone, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023.
  35. [Wang et al., 2019] Wei Wang, Vincent W. Zheng, Han Yu, et al. A survey of zero-shot learning: Settings, meth- ods, and applications. ACM Trans. Intell. Syst. Technol., 10(2):1-37, 2019.
  36. [Wang et al., 2023] Xuezhi Wang, Jason Wei, Dale Schuur- mans, et al. Self-consistency improves chain of thought reasoning in language models. In ICLR, 2023.
  37. [Wang et al., 2024a] Ke Wang, Houxing Ren, Aojun Zhou, et al. Mathcoder: Seamless code integration in LLMs for enhanced mathematical reasoning. In ICLR, 2024.
  38. [Wang et al., 2024b] Peiyi Wang, Lei Li, Zhihong Shao, et al. Math-shepherd: Verify and reinforce llms step-by- step without human annotations. In ACL, 2024.
  39. [Wang et al., 2024c] Tianduo Wang, Shichen Li, and Wei Lu. Self-training with direct preference optimization im- proves chain-of-thought reasoning. In ACL, 2024.
  40. [Wei et al., 2022] Jason Wei, Xuezhi Wang, Dale Schuur- mans, et al. Chain-of-thought prompting elicits reasoning in large language models. In NeurIPS, 2022.
  41. [Wu et al., 2024] Xuansheng Wu, Wenlin Yao, Jianshu Chen, et al. From language modeling to instruction fol- lowing: Understanding the behavior shift in LLMs after instruction tuning. In NAACL, 2024.
  42. [Xi et al., 2024] Zhiheng Xi, Wenxiang Chen, Boyang Hong, et al. Training large language models for reason- ing through reverse curriculum reinforcement learning. In ICML, 2024.
  43. [Yang et al., 2024] An Yang, Baosong Yang, Beichen Zhang, et al. Qwen2. 5 technical report. arXiv preprint arXiv:2412.15115, 2024.
  44. [Yin et al., 2024] Shuo Yin, Weihao You, Zhilong Ji, et al. Mumath-code: Combining tool-use large language models with multi-perspective data augmentation for mathemati- cal reasoning. arXiv preprint arXiv:2405.07551, 2024.
  45. [You et al., 2024] Weihao You, Shuo Yin, Xudong Zhao, et al. MuMath: Multi-perspective data augmentation for mathematical reasoning in large language models. In NAACL, 2024.
  46. [Yu et al., 2024a] Fei Yu, Anningzhe Gao, and Benyou Wang. OVM, outcome-supervised value models for plan- ning in mathematical reasoning. In NAACL, 2024.
  47. [Yu et al., 2024b] Longhui Yu, Weisen Jiang, Han Shi, et al. Metamath: Bootstrap your own mathematical questions for large language models. In ICLR, 2024.
  48. [Yuan et al., 2023] Zheng Yuan, Hongyi Yuan, Chengpeng Li, et al. Scaling relationship on learning mathemati- cal reasoning with large language models. arXiv preprint arXiv:2308.01825, 2023.
  49. [Yue et al., 2024] Xiang Yue, Xingwei Qu, Ge Zhang, et al. Mammoth: Building math generalist models through hy- brid instruction tuning. In ICLR, 2024.
  50. [Zhang et al., 2024a] Di Zhang, Xiaoshui Huang, Dongzhan Zhou, et al. Accessing gpt-4 level mathematical olympiad solutions via monte carlo tree self-refine with llama-3 8b. arXiv preprint arXiv:2406.07394, 2024.
  51. [Zhang et al., 2024b] Zhihan Zhang, Tao Ge, Zhenwen Liang, et al. Learn beyond the answer: Training lan- guage models with reflection for mathematical reasoning. In EMNLP, 2024.
  52. [Zhou et al., 2024] Aojun Zhou, Ke Wang, Zimu Lu, et al. Solving challenging math word problems using gpt-4 code interpreter with code-based self-verification. In ICLR, 2024.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards