Towards Self-Improvement of LLMs via MCTS: Leveraging Stepwise Knowledge with Curriculum Preference Learning

Xiyao Wang, Linfeng Song, Ye Tian, Dian Yu, Baolin Peng, Haitao Mi, Furong Huang, Dong YuarXiv 2024

Abstract

Monte Carlo Tree Search (MCTS) has recently emerged as a powerful technique for enhancing the reasoning capabilities of LLMs. Techniques such as SFT or DPO have enabled LLMs to distill high-quality behaviors from MCTS, improving their reasoning performance. However, existing distillation methods underutilize the rich trajectory information generated by MCTS, limiting the potential for improvements in LLM reasoning. In this paper, we propose AlphaLLM-CPL, a novel pairwise training framework that enables LLMs to self-improve through MCTS behavior distillation. AlphaLLM-CPL efficiently leverages MCTS trajectories via two key innovations: (1) AlphaLLM-CPL constructs stepwise trajectory pairs from child nodes sharing the same parent in the search tree, providing step-level information for more effective MCTS behavior distillation. (2) AlphaLLM-CPL introduces curriculum preference learning, dynamically adjusting the training sequence of trajectory pairs in each offline training epoch to prioritize critical learning steps and mitigate overfitting. Experimental results on mathematical reasoning tasks demonstrate that AlphaLLM-CPL significantly outperforms previous MCTS behavior distillation methods, substantially boosting the reasoning capabilities of LLMs.

Introduction

While Large Language Models (LLMs) have shown remarkable capabilities, they often struggle with tasks requiring rigorous, multi-step reasoning, such as complex mathematics or strategic planning. Traditional training paradigms like Supervised Fine-Tuning (SFT) or Direct Preference Optimization (DPO) typically rely on "full-path" data, comparing an entirely correct solution to an entirely incorrect one. This approach suffers from two primary limitations: it ignores the valuable intermediate insights and "near misses" discovered during the search process, and it treats all training examples as equally important throughout the learning process, which can lead to inefficient learning or overfitting.

Methodology: ALPHALLM-CPL

To address these challenges, the authors introduce ALPHALLM-CPL, a framework designed to mine "stepwise" knowledge from search trees and organize it into an adaptive curriculum. The framework introduces two core innovations:

1. Stepwise Trajectory Pair Extraction

Instead of evaluating only the final outcome, ALPHALLM-CPL analyzes the MCTS search tree to identify "sibling" nodes—different reasoning steps taken from the same parent state. By comparing a step that leads to a higher predicted success rate (value) against a less successful sibling, the framework generates dense, step-level supervisory signals. This prevents the model from being "right for the wrong reasons" by focusing on the validity of individual reasoning transitions.

2. Curriculum Preference Learning (CPL)

CPL is a dynamic offline training loop that prioritizes the most informative reasoning steps. In each epoch, trajectory pairs are ranked based on two metrics:

  • Preference Reward Gap (Static): The difference in success probability between the "good" and "bad" steps as determined by the MCTS value network.
  • Policy Prediction Gap (Dynamic): The degree to which the model currently struggles to distinguish between the two steps.

By focusing on samples where the model is currently uncertain but the search tree provides a clear ground-truth preference, the framework optimizes the learning process for the model's current state.

Overview of the AlphaLLM-CPL framework, illustrating the stepwise trajectory pair extraction from MCTS and the curriculum preference learning loop.

Experimental Results

The researchers evaluated ALPHALLM-CPL on two gold-standard mathematical reasoning benchmarks: GSM8K (grade school math) and MATH (high-school competition level). The framework demonstrated substantial and consistent improvements across various model architectures.

Performance comparison of AlphaLLM-CPL against various baselines on GSM8K and MATH benchmarks across different base models.

Key quantitative findings include:

  • LLaMA2-7B: Achieved a massive gain on GSM8K, rising from a baseline of 14.6 to 36.5 (a 150% improvement).
  • Mistral-7B: Improved significantly from 38.5 to 57.3 on GSM8K.
  • LLaMA3-8B-Instruct: On the challenging MATH benchmark, performance increased from 28.2 to 33.1.

Unlike baseline methods that often peak and then decline due to overfitting, ALPHALLM-CPL showed continued improvement over multiple training epochs, suggesting that the curriculum strategy effectively manages model evolution.

Discussion and Conclusion

ALPHALLM-CPL demonstrates that the strategic distillation of intermediate search behaviors is a powerful path toward LLM self-improvement. By leveraging stepwise knowledge and a dynamic curriculum, the model can effectively learn from its own internal search processes without requiring expensive external labels.

While the current work focuses on mathematical reasoning where correctness is objectively verifiable, future research may explore extending this stepwise distillation to more subjective domains. The computational cost of running MCTS remains a factor, but the significant performance gains suggest that the investment in high-quality synthetic data generation is well-justified for complex reasoning tasks.

Summary updated

BibTeX
@misc{wang2024towards,
  author = {Xiyao Wang and Linfeng Song and Ye Tian and Dian Yu and Baolin Peng and Haitao Mi and Furong Huang and Dong Yu},
  title = {{Towards Self-Improvement of LLMs via MCTS: Leveraging Stepwise Knowledge with Curriculum Preference Learning}},
  year = {2024},
  eprint = {2410.06508},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.06508},
}
Figure