Language Models as Implicit Tree Search

Ziliang Chen, Zhao-Rong Lai, Yufeng Yang, Liangda Fang, Zhanfu Yang, Liang Lin

TL;DR

This paper introduces Implicit Tree Search (ITS), a novel framework that equips Large Language Models (LLMs) with AlphaZero-style reasoning capabilities without the need for Reinforcement Learning (RL) or explicit value modeling. By training a secondary "search" model to approximate the optimal policy of a tree search, the authors achieve state-of-the-art results in human preference alignment and complex mathematical reasoning.

What Problem Does This Paper Address?

Modern LLM alignment typically relies on Direct Preference Optimization (DPO) because it is more stable and efficient than traditional Reinforcement Learning from Human Feedback (RLHF). However, DPO suffers from a "reasoning gap." While RLHF can be paired with Monte Carlo Tree Search (MCTS)—the algorithm behind AlphaZero—to explore complex decision spaces like math or chess, MCTS traditionally requires a learned value function.

Building this value function usually requires RL, which defeats the purpose of using the simpler DPO framework. Furthermore, standard MCTS suffers from "cold-start" issues (where early, low-count visits lead to noisy decisions) and "sparse-action" problems (where only visited paths are improved). The authors sought a way to get the "free lunch" of tree-search reasoning within an RL-free, DPO-like framework.

Methods

The core innovation of this work is treating MCTS not as a literal tree-building process, but as a regularized policy optimization problem.

Comparison of Explicit Tree Search (MCTS) and the proposed Implicit Tree Search using a Language Model.
  1. Implicit Tree Search (ITS): The authors leverage a theoretical proof showing that AlphaZero-like search asymptotically converges to a specific stochastic policy. Usually, calculating this policy requires an expensive "dichotomic search" (a form of binary search) for every single token generated.
  2. The Dual-Model Approach (IT-PO): To bypass the computational cost, they train an extra LM ($\pi_\phi$) to act as a "universal approximator" for this search policy.
  3. Model $\pi_\theta$: The standard policy model (like a regular DPO model).
  4. Model $\pi_\phi$: The "ITS policy" model that learns to simulate the outcome of a deep search.
  5. Step-Synchronous vs. Asynchronous:
    • Synchronous (SS-IT-PO): Operates at the token level, ideal for fine-grained alignment and "chat" style tasks.
  6. Asynchronous (SA-IT-PO): Operates at the sentence level, allowing the model to "think" in larger chunks, which is crucial for mathematical proofs and planning.
  7. Self-Improved Distillation: The ITS model ($\pi_\phi$) generates high-quality responses that are used to further refine the main model ($\pi_\theta$), creating a virtuous cycle of improvement.

Key Insights and Ideas

  • Search as a Policy, Not a Tree: The most profound insight is that you don't need to explicitly build a search tree at inference time if you can train a model to be the result of that search. This "neural implicit tree search" inherits the benefits of AlphaZero without the heavy inference overhead.
  • Bypassing the Value Function: By using the DPO mathematical framework, the authors represent the "reward" implicitly through the ratio of the policy model to a reference model. This allows them to perform "value-free" search.
  • Aggressive vs. Conservative Alignment: Gradient analysis showed that IT-PO acts "aggressively" when the model is far from the ground truth and "conservatively" when it is close, leading to better diversity and stronger alignment than standard DPO.

Key Results

The authors evaluated their method across a diverse range of tasks, including Human Preference Alignment (Anthropic HH), Mathematical Reasoning (GSM8k, MATH), Mathematical Planning (Game24), and Logic & Long-term Planning (ProofWriter, Chess Endgame).

Win rates of IT-PO compared to baselines across temperature scaling and policy improvement iterations.
  • Alignment: On the Anthropic HH dataset, IT-PO outperformed standard DPO and other variants (like TDPO) in both accuracy and diversity (Entropy), demonstrating superior win rates across various temperature scales and policy improvement iterations.
  • Mathematics: On GSM8k, IT-PO achieved 53.2% accuracy, outperforming MCTS-based baselines (51.9%) while using significantly fewer tokens.
  • Planning: In Game24, IT-PO reached a 73.2% success rate, a substantial jump over standard MCTS-Rollout (71.3%) and CoT-greedy (12.7%).
  • Robustness: Unlike MCTS, which is highly sensitive to the number of simulations (node size), ITS demonstrated robust performance even with limited computational budgets at inference time.

Limitations and Future Work

  • Computational Overhead during Training: While inference is highly efficient, the method requires maintaining and training two separate large language models ($\pi_\theta$ and $\pi_\phi$), which doubles the VRAM requirements during the training phase.
  • Dependence on Base Model: The authors noted that while a smaller model (like Llama-3-8B) can act as the search model ($\pi_\phi$) for a larger one, there is still a performance floor dictated by the base model's inherent capabilities.
  • Future Directions: The authors suggest exploring even more complex "asynchronous" units beyond sentences (e.g., entire paragraphs or code blocks) and applying this framework to multi-agent environments where implicit search could model opponent behavior.

Summary updated

BibTeX
@inproceedings{chen2025language,
  author = {Ziliang Chen and Zhao-Rong Lai and Yufeng Yang and Liangda Fang and ZHANFU YANG and Liang Lin},
  title = {{Language Models as Implicit Tree Search}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=bEqMmGu6qg},
}
Figure