NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Uncertainty-Guided Optimization on Large Language Model Search Trees

Julia Grosse, Ruotian Wu, Ahmad Rashid, Philipp Hennig, Pascal Poupart, Agustinus Kristiadi · OpenReview

Abstract

Tree search algorithms such as greedy and beam search are the standard when it comes to finding sequences of maximum likelihood in the decoding processes of large language models (LLMs). However, they are myopic since they do not take the complete root-to-leaf path into account. Moreover, they are agnostic to prior knowledge available about the process: For example, it does not consider that the objective being maximized is a probability and thereby has specific properties like being bound in the unit interval. Taking a probabilistic approach, we define prior beliefs over LLMs' transition probabilities and obtain posterior beliefs over the most promising paths in each iteration. These beliefs are useful for defining a sample-based, non-myopic acquisition function that allows for a more data-efficient exploration scheme than standard search algorithms on LLMs. Crucially, unlike expensive simulation-based non-myopic methods like the Monte Carlo tree search, our method only requires samples from the beliefs. Our formulation thus views LLM decoding as Bayesian optimization on trees. We discuss how to select the prior and the acquisition function, and demonstrate in experiments with various LLMs that our method achieves higher efficiency than recent baselines: Our method achieves the same or a higher likelihood while expanding fewer nodes.

Introduction

When a Large Language Model (LLM) generates text, it navigates a massive likelihood tree where each node represents a token and each path represents a potential sequence. The objective is to find the sequence with the highest total probability. Standard decoding methods like beam search are "myopic," focusing on immediate local probabilities and often failing to recover from early suboptimal choices. Conversely, non-myopic methods like Monte Carlo Tree Search (MCTS) are computationally prohibitive for LLMs due to the high cost of forward passes required for "rollouts."

This paper introduces Uncertainty-guided Likelihood-Tree Search (ULTS), a framework that treats LLM decoding as a Bayesian optimization problem. By quantifying "computational uncertainty," ULTS enables efficient, non-myopic exploration and smart backtracking without the overhead of simulations.

ULTS leverages the concept of computational uncertainty—uncertainty arising from limited compute rather than a lack of data. The algorithm follows a four-step process:

  1. Probabilistic Modeling: Instead of treating softmax outputs as fixed values, ULTS places a prior belief (e.g., a Dirichlet distribution) over the transition probabilities.
  2. Value Propagation: The algorithm recursively approximates the distribution of the "optimal value" for future nodes using Beta distributions. This allows for an estimation of both the expected reward and the associated uncertainty of any given path.
  3. Acquisition Function: Inspired by Thompson sampling, ULTS selects the next node to expand by calculating which child is most likely to belong to the globally optimal path.
  4. Backtracking: The global belief maintained by the algorithm allows it to identify when a current branch is likely a dead end, triggering a jump back to more promising, previously explored branches.
The ULTS algorithm iteratively expands the search tree. In each step, it updates beliefs over optimal values and uses an acquisition function to select the most promising node for expansion.

Crucially, the probabilistic heuristics in ULTS add negligible runtime overhead compared to the cost of the LLM forward passes, making it a highly efficient alternative to MCTS.

Experimental Evaluation

The researchers evaluated ULTS across diverse tasks, including synthetic tree search, text generation (GPT-2, Llama-2), summarization (T5), and code completion (Deepseek Coder).

Key Results

  • Efficiency and Performance: ULTS consistently outperforms baselines in low-budget scenarios. It finds paths with higher log-likelihoods while expanding fewer nodes than standard beam search.
  • Code Generation: On the HumanEval benchmark, ULTS achieved a 34.76% Pass@1 score with a small budget ($k_{max}=3$), significantly outperforming beam search ($k=2$) at 29.27% while using fewer node expansions.
  • Adaptability: The algorithm exploits the "concentration strength" of the model's output. It acts greedily when the model is confident (low entropy) and pivots to exploration when the model is uncertain (high entropy).

Discussion and Limitations

While ULTS demonstrates superior efficiency, some limitations remain. The current model assumes independent and identically distributed (IID) rewards at different nodes, which may not fully capture the linguistic dependencies in natural language. Furthermore, the sequential nature of node expansion in ULTS does not yet fully leverage the batching capabilities of modern GPU hardware.

Future work will focus on integrating more sophisticated priors to relax the IID assumption and developing "batched acquisition" strategies to improve hardware utilization. Additionally, bridging the "likelihood-human preference gap" by incorporating human-centric reward models into the tree search remains a key objective.

Conclusion

ULTS presents a novel approach to LLM decoding by framing search as Bayesian optimization. By modeling computational uncertainty, it achieves non-myopic search and efficient backtracking, providing a significant performance boost over standard search algorithms with minimal computational overhead.

Summary updated

BibTeX
@inproceedings{grosse2024uncertainty,
  author = {Julia Grosse and Ruotian Wu and Ahmad Rashid and Philipp Hennig and Pascal Poupart and Agustinus Kristiadi},
  title = {{Uncertainty-Guided Optimization on Large Language Model Search Trees}},
  booktitle = {AABI},
  year = {2024},
  url = {https://openreview.net/forum?id=qc4HwUcnUN},
}
Figure