Efficient and Trainable Language Model Test-Time Scaling via Local Branch Routing

Yutong Yin, Mingyu Jin, Jin Pan, Changyi Yang, Zijie Xia, Dhruv Pai, Shuming Hu, Zhen Zhang, Chenyang Zhao, Jinman Zhao, Wujiang Xu, Raymond Li, Xin Eric Wang, Julian McAuley, Zhaoran WangarXiv 2026

TL;DR

Local Branch Routing (LBR) is a token-level test-time scaling framework that evaluates a small lookahead tree of candidate tokens before committing to a decoding decision. By routing over the actual hidden states of these local futures, LBR achieves the benefits of short-range planning while maintaining a tractable trajectory likelihood that enables end-to-end reinforcement learning.

What Problem Does This Paper Address?

Large language models (LLMs) perform significantly better when allowed to spend more compute at inference time—a concept known as test-time scaling. However, existing methods face a stark trade-off:

  1. Single-threaded generation: Standard chain-of-thought (CoT) prompting is single-threaded and cannot explore alternative token paths dynamically.
  2. Heavyweight tree search: Full sentence- or solution-level search (like Tree of Thoughts) is computationally expensive, slow, and difficult to optimize end-to-end via reinforcement learning.
  3. Continuous/Soft token methods: Recent "soft token" approaches try to merge candidate paths into continuous mixtures of embeddings, but this often blurs the identity of discrete concepts.

The authors introduce LBR to bridge this gap, providing a lightweight, token-level test-time scaling mechanism that preserves discrete choices and is fully trainable via reinforcement learning.

Methods

LBR introduces a rolling prune–shift–grow decoding process that operates at the token level:

  1. Grow: At each decoding step, LBR expands a small local lookahead tree of width $K$ and depth $L$ (e.g., $L=1, K=3$) from the current prefix. Crucially, all sampled branches are forwarded through the language model to compute their actual post-candidate hidden states.
  2. Route: A lightweight Set-Attention Router evaluates the hidden states of all nodes in the lookahead tree to select the best depth-1 subtree to commit.
  3. Prune: The unselected subtrees are discarded.
  4. Shift and Regrow: The committed token is appended to the prefix, the surviving subtree is shifted forward, and a new layer is grown to maintain depth $L$.
Local Branch Routing decoding pipeline

Because the only stochastic operations are node sampling and the router's choice, LBR defines a mathematically tractable tree-trajectory likelihood. This allows the entire system (base model + router) to be trained end-to-end using reinforcement learning with verifiable rewards (via GRPO/RLVR).

The router itself uses a hierarchical set-attention mechanism to ensure permutation invariance and equivariance when contrastively comparing sibling branches.

Figure 2: Set-attention router. The router first encodes each depth-1 candidate subtree inde- pendently into a vector gt,k. For the main L = 1 setting, a candidate subtree consists of a single forwarded token, so gt,k is computed from its post-token hidden state. For L = 2, the subtree encoder summarizes the hidden states of the candidate root and its local continuations. The resulting candidate vectors are then passed through a cross-subtree set-attention block, where candidates attend to their sibling alternatives to produce context-aware representations ˜gt,k. A shared scoring head maps these representations to scores st,k, and a softmax gives the routing distribution over candidate subtrees.

Datasets

  • Synthetic Task: A custom Radix-Translated Reachability task modified from the ProsQA benchmark, designed to test hierarchical planning where paths share prefix digits but diverge later.
  • Mathematical Reasoning Benchmarks: Evaluated on six standard math benchmarks: Minerva, AIME’25, AIME’24, MATH500, AMC’23, and Olympiad.
  • Training Data: The math models were trained using the DeepScaleR-Preview-Dataset.

Key Insights and Ideas

  • The Value of Post-Candidate States: Standard autoregressive decoding forces a model to choose a token before seeing the hidden states it induces. LBR proves that post-candidate hidden states contain rich, branch-specific downstream information that is fundamentally unavailable in the pre-branching root distribution.
  • Discrete vs. Soft Branching: Unlike "Soft Thinking" methods that merge candidate embeddings into a single continuous vector, LBR preserves discrete branch identities. The authors show via linear probing that soft mixtures suffer from "concept ambiguity," blurring the identity of the choices made, whereas LBR keeps them distinct and recoverable.
  • Contrastive Routing: The router performs best when using cross-subtree attention rather than independently scoring each branch. Routing is inherently a contrastive decision over sibling local futures.

Key Results

  • Synthetic Planning: LBR achieved a target accuracy of 96.7%, substantially outperforming discrete CoT (91.4%) and Soft Thinking (84.5%).
  • Mathematical Reasoning: Evaluated using DeepSeek-R1-Distill-Qwen (1.5B and 7B) backbones, LBR consistently outperformed vanilla discrete-token RLVR and soft-token baselines across all six benchmarks.
  • For example, on MATH500 with the 7B model, LBR ($L=2$) boosted Pass@1 accuracy to 85.6% compared to 71.6% for standard discrete CoT and 74.1% for vanilla RLVR. It also consistently improved Pass@32 exploration performance.

Limitations and Future Work

  • Locality: LBR relies on a shallow lookahead window ($L=1$ or $L=2$). It cannot perform long-range global planning or full solution-level search.
  • Compute Trade-off: Forwarding $K$ candidate branches through the LLM introduces computational overhead during inference. While KV-caches are reused via a deduplicated trie, it is still more expensive than single-threaded decoding.
  • Future Directions: The authors suggest exploring adaptive lookahead depths, integrating selective global search, and developing learned triggers so the model only branches when encountering high-uncertainty tokens.

Summary updated

BibTeX
@misc{yin2026efficient,
  author = {Yutong Yin and Mingyu Jin and Jin Pan and Changyi Yang and Zijie Xia and Dhruv Pai and Shuming Hu and Zhen Zhang and Chenyang Zhao and Jinman Zhao and Wujiang Xu and Raymond Li and Xin Eric Wang and Julian McAuley and Zhaoran Wang},
  title = {{Efficient and Trainable Language Model Test-Time Scaling via Local Branch Routing}},
  year = {2026},
  eprint = {2606.25354},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.25354},
}
Figure