ToTRL: Unlock LLM Tree-of-Thoughts Reasoning Potential through Puzzles Solving

Haoyuan Wu, Xueyi Chen, Rui Ming, Jilong Gao, Shoubo Hu, Zhuolun He, Bei Yu · DOI

Introduction

Recent advancements in Large Language Models (LLMs), exemplified by models like GPT-o1 and DeepSeek-R1, have demonstrated that increasing "thinking time" through long Chain-of-Thought (CoT) sequences significantly boosts performance on complex tasks. However, these models primarily rely on linear reasoning. If a model commits to an incorrect initial path, it often struggles to recover, becoming verbose and redundant without a global perspective to realize it is stuck.

To address this, researchers have introduced ToTRL (Tree-of-Thoughts Reinforcement Learning). This framework shifts LLM reasoning from a single-path process to a more sophisticated "tree-of-thoughts" strategy. This allows models to explore multiple reasoning paths in parallel, evaluate their promise, and backtrack when a path hits a dead end, mimicking human problem-solving more closely.

Methodology: Cultivating Tree-Based Reasoning

The core of ToTRL is an on-policy reinforcement learning framework designed to break the habit of sequential reasoning. Because LLMs are deeply conditioned by their pre-training to generate text linearly, the researchers implemented a specialized two-stage training strategy to cultivate tree-based "muscle memory."

The two-stage training strategy transitions models from standard sequential reasoning to a structured tree-of-thoughts approach.

In Stage 1 (No-thinking Mode), the model is trained to perform ToT reasoning without its usual internal "thinking" process. This forces the model to develop new, moldable thinking patterns focused on structure. In Stage 2 (Thinking Mode), these capabilities are integrated back into the model's active reasoning process, allowing it to manage multiple interdependent constraints and concurrent hypotheses dynamically.

The Puzzle Gym: Training for Constraint Satisfaction

To develop these search capabilities, the researchers utilized logic puzzles—specifically Sudoku and Alphametic puzzles—as a training "gym." These puzzles are ideal because they represent pure constraint satisfaction problems. A single digit placement in Sudoku or a letter-to-digit assignment in an Alphametic equation (e.g., SEND+MORE=MONEY) has cascading effects on all other constraints.

Sudoku and Alphametic puzzles serve as the training environment, requiring multi-step constraint satisfaction.

Solving these puzzles requires a forward-looking evaluation: the model must consider several alternatives, predict their consequences, and prune branches that lead to contradictions. This training environment forces the model to internalize the mechanics of searching, branching, and pruning as a fundamental skill rather than a prompted behavior.

Results and Cross-Domain Generalization

The resulting model, ToTQwen3-8B, demonstrated significant improvements over standard CoT baselines. In logic tasks like 5×5 Crosswords, it achieved an accuracy of 0.508, compared to 0.378 for the baseline Qwen3-8B.

More importantly, the skills learned in the "puzzle gym" generalized to high-level mathematics. On the AIME 2025 benchmark, ToTQwen3-8B scored 0.633, outperforming larger models in its class. This suggests that the ability to manage multiple concurrent hypotheses and prune invalid reasoning paths is a generalizable cognitive skill that transcends specific puzzle domains. Furthermore, ToTRL models exhibit superior token efficiency, reaching higher accuracy with a smaller "thinking budget" than standard CoT models by exploring the search space globally rather than rambling locally.

Conclusion

ToTRL represents a significant step toward more robust LLM reasoning. By moving beyond linear chains to structured trees, models can navigate complex problem spaces with greater agility and accuracy. While the current implementation relies on implicit induction through RL, future work aims to refine these exploration policies, potentially bringing LLM reasoning closer to the deliberate, multi-path problem-solving strategies used by humans.

Summary updated

BibTeX
@misc{wu2025totrl,
  author = {Haoyuan Wu and Xueyi Chen and Rui Ming and Jilong Gao and Shoubo Hu and Zhuolun He and Bei Yu},
  title = {{ToTRL: Unlock LLM Tree-of-Thoughts Reasoning Potential through Puzzles Solving}},
  year = {2025},
  eprint = {2505.12717},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.12717},
}
Figure