TSLM: Tree-Structured Language Modeling for Divergent Thinking
Doyoung Kim, Jaehyeok Doo, Minjoon Seo
TL;DR
This work introduces Tree-Structured Language Modeling (TSLM), a framework that enables language models to generate and manage complete search trees in a single forward pass using token-based serialization. By training on full trees that include both successful and failed explorations, TSLM internalizes systematic exploration and decouples context within branches, achieving superior performance and substantial inference efficiency compared with external search methods. Empirical results show perfect accuracy on the Game of 24 and robust extrapolation in gridworld tasks, while maintaining favorable scaling on test-time budgets and outpacing Tree-of-Thought in both open-ended and structured reasoning settings. The approach challenges the need for reinforcement learning or heavy inference-time search by demonstrating that structured supervised learning on tree traces can yield robust, scalable reasoning capabilities.
Abstract
Language models generate reasoning sequentially, preventing them from decoupling irrelevant exploration paths during search. We introduce Tree-Structured Language Modeling (TSLM), which uses special tokens to encode branching structure, enabling models to generate and selectively expand multiple search paths within a single generation process. By training on complete search trees including both successful and failed attempts, TSLM learns to internalize systematic exploration without redundant recomputation of shared prefixes. TSLM achieves robust performance and superior inference efficiency by avoiding the multiple independent forward passes required by external search methods. These results suggest a new paradigm of inference-time scaling for robust reasoning, demonstrating that supervised learning on complete tree-structured traces provides an efficient alternative for developing systematic exploration capabilities in language models.
