NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Tree Training: Efficient LLM Training on Tree-Structured Trajectories

Jinghui wang, Wang Shaojie, Can Tang, Yinghan Cui, Xuxing Chen, Xiaojiang Zhang, Chao Wang, Haotian Zhang

NeurIPS page · OpenReview · alphaXiv · Open on the map

Category: Efficient LLM Inference & Training › Speculative Decoding Optimization · Type: new method · Keywords: LLM training, tree-structured data, redundant computation, memory efficiency, speedup

Areas: LLM Reasoning › Reasoning Strategies › Test-Time Scaling; Memory › Agent Memory Systems › Memory Augmentation

Summary

Tree Training is an efficient LLM training method that eliminates redundant computation in tree-structured trajectories by serializing tokens once and partitioning trees to reduce memory usage, achieving up to 6.2× speedup.

Explained to a 5-year-old

When we teach a big computer program to write sentences, sometimes it makes many possible answers from the same start. The old way treats each answer separately, so it does the same work over and over. The new idea looks at all answers together and only does each piece of work once. It also splits the work so it fits in the computer's memory even when there are many answers. This makes the teaching go much faster, so we can learn bigger programs quicker.

Explained to a 5-year-old, longer

When we train a big language model, it sometimes needs to learn many possible answers from the same starting point. For example, it might generate several different sentences that all begin with the same words. In the old training method, each possible answer is treated as a separate line, so the model repeats the same early words many times. This repetition wastes a lot of computer time and memory because the same parts are computed over and over. The new method notices that all these answers share a common beginning and only needs to work out each part once. It organizes the answers like a tree, where the shared parts are near the top and the different endings branch out below. By walking through this tree only once, the model avoids doing duplicate work. If the whole tree is too big for the computer's memory, the method splits it into smaller pieces that fit. This splitting ensures that at any moment only one path from the start to an answer is kept in memory. As a result, training becomes much faster and uses less memory. The speed-up is especially noticeable when training very large models on many possible outputs. Overall, the technique lets us teach big language models more efficiently and with fewer resources.

For a technical reader

The paper addresses the inefficiency of training large language models when the data contains multiple possible outputs from a single input, such as multi-turn dialogues or beam-search results. Conventional pipelines linearize each branch of the output tree, causing redundant computation of shared prefix tokens and high memory usage. The proposed solution reformulates the loss so that each token’s probability is computed only once, and introduces a depth-first traversal that visits each token exactly once while preserving exactness of attention and SSM layers. For cases where the full tree exceeds GPU memory, a partitioning scheme stores only a single root-to-leaf path at a time, eliminating redundancy and keeping peak memory low. Empirical evaluations on dense and mixture-of-experts models show up to 6.2× end-to-end training speed-up for both supervised fine-tuning and reinforcement learning.

Problem

Training LLMs on tree-structured data currently involves linearizing each branch independently, leading to substantial redundant computation and high memory usage.

Method

The approach computes each token's log-probability exactly once by averaging loss over branches, uses DFS serialization to traverse the tree without redundancy, and adapts attention and SSM layers to preserve exactness. For memory constraints, it partitions the tree so that only a single root-to-leaf path is stored at peak, eliminating redundant computation.

Results

The approach achieves up to 6.2× end-to-end training speedup on dense and MoE models for supervised fine-tuning and reinforcement learning.

Contributions

It provides a loss formulation that eliminates redundant computation, a DFS serialization technique that visits each token once, and a tree partitioning scheme that bounds memory to a single root-to-leaf path.

Limitations and assumptions

The method assumes tree-structured trajectories with shared prefixes and is evaluated on dense and MoE models, not covering all possible architectures.

Practical relevance

The approach enables faster and more memory-efficient training of large language models on multi-output tasks, reducing compute costs and allowing larger models on limited hardware.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction