Kwai-STaR: Transform LLMs into State-Transition Reasoners

Xingyu Lu,Yuhang Hu,Changyi Liu,Tianke Zhang,Zhenyu Yang,Zhixiang Ding,Shengsheng Qian,Meng Du,Ruiwen Kang,Kaiyu Tang,Fan Yang,Tingting Gao,Di Zhang,Hai-Tao Zheng,Bin Wen
2024-11-07
Abstract:Mathematical reasoning presents a significant challenge to the cognitive capabilities of LLMs. Various methods have been proposed to enhance the mathematical ability of LLMs. However, few recognize the value of state transition for LLM reasoning. In this work, we define mathematical problem-solving as a process of transiting from an initial unsolved state to the final resolved state, and propose Kwai-STaR framework, which transforms LLMs into State-Transition Reasoners to improve their intuitive reasoning capabilities. Our approach comprises three main steps: (1) Define the state space tailored to the mathematical reasoning. (2) Generate state-transition data based on the state space. (3) Convert original LLMs into State-Transition Reasoners via a curricular training strategy. Our experiments validate the effectiveness of Kwai-STaR in enhancing mathematical reasoning: After training on the small-scale Kwai-STaR dataset, general LLMs, including Mistral-7B and LLaMA-3, achieve considerable performance gain on the GSM8K and GSM-Hard dataset. Additionally, the state transition-based design endows Kwai-STaR with remarkable training and inference efficiency. Further experiments are underway to establish the generality of Kwai-STaR.
Computation and Language,Artificial Intelligence
What problem does this paper attempt to address?
### Problems the Paper Aims to Solve This paper aims to address the shortcomings of large language models (LLMs) in mathematical reasoning. Although various methods have been attempted to enhance the mathematical capabilities of LLMs, few have recognized the importance of state transitions in LLM reasoning. To this end, the authors propose a new framework—Kwai-STaR (State-Transition Reasoner), which improves the intuitive reasoning ability of LLMs by defining the process of solving mathematical problems as a series of state transitions from the initial unsolved problem state to the final solved problem state. ### Main Contributions 1. **New Perspective on State Transitions**: The authors propose a new perspective of modeling the mathematical reasoning process as state transitions and construct a state transition dataset. 2. **Kwai-STaR Framework**: This framework transforms general LLMs into state-transition reasoners (STaR) through state transitions, significantly improving their mathematical performance. 3. **Efficiency and Generalization**: Kwai-STaR not only performs well in terms of performance but also shows significant advantages in training and inference efficiency, demonstrating the great potential of state space strategies in enhancing LLM reasoning capabilities. ### Experimental Results Experiments show that the Kwai-STaR framework significantly improves the performance of multiple general LLMs in the GSM8K and GSM-Hard benchmarks. Compared to existing data augmentation methods, Kwai-STaR achieves greater performance improvements with smaller data scales and fewer trainable parameters. Additionally, the accuracy of Kwai-STaR in single inference can rival the multiple inference accuracy of other multi-step reasoning methods, without the need for complex reasoning paradigms and high inference costs. ### Future Work The authors plan to further validate the feasibility of Kwai-STaR in other domains and provide more diverse experimental results to demonstrate its generalization capabilities. Moreover, they hope to improve the design of the state space to make it more complete and automated, and explore theoretical explanations of how state space enhances LLM reasoning capabilities.