Provable Test-Time Scaling for Beam Search in LLM Reasoning
Organizations: The Ohio State University · University of Pennsylvania · National University of Singapore
Abstract
Beam-search-based test-time methods provide an effective way to improve large language model (LLM) performance on long-horizon generation by pruning invalid reasoning paths early, leading to significantly improved reasoning efficiency and more favorable test-time cost scaling. Despite strong empirical success, the theoretical understanding of beam search remains limited. In this paper, we study the test-time compute guarantee of the commonly used beam search framework that uses the model's internal log-likelihood for intermediate scoring, while relying on an external reward model only after a complete response is generated. We first establish a lower bound for vanilla beam search, showing that at least samples are required for the optimal response to survive, where is the token-level coverage coefficient for prompt . This motivates our modified confidence-filtered beam search (CF-Beam), which reduces the sufficient coverage dependence from quadratic to nearly linear under prefix competitiveness, for fixed horizon, gap, and target accuracy. We then show that the regret of CF-Beam is upper-bounded by the probability of rare failure events and the reward estimation error scaled by a path-level coverage coefficient, where the rare-failure term vanishes as per-step sampling increases. Our results highlight a fundamental advantage of beam search over sequence-level inference methods such as Best-of-N and Best-of-Majority. While the guarantees of these approaches typically involve coverage coefficients that grow exponentially with the horizon , CF-Beam controls the dominant search-induced term through a token-level coverage coefficient that scales polynomially with . Our numerical experiments further confirm that beam search is more robust on hard instances and under increasing reasoning horizons.
Figures & tables
| Notation | Description |
|---|---|
| a fixed LLM model that maps | |
| Response length (horizon) of . | |
| An action/token from the vocabulary . | |
| Prefix (trajectory) up to step : . | |
| Beam width, i.e., the number of trajectories retained at each step. | |
| Test-time compute budget, i.e., the total number of samples drawn from . |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Best-of- | Majority Voting | Best-of- Majority | Vanilla-Beam | CF-Beam | |
|---|---|---|---|---|---|
| Accuracy | 0.332 | 0.304 | 0.326 | 0.372 | 0.388 |
| Budget ( ) | 16.8 | 16.8 | 16.8 | 18.6 | 16.2 |
| 0.372 | 0.378 | 0.388 | 0.372 | 0.318 | 0.292 | 0.290 | |
| 0.482 | 0.512 | 0.472 | 0.392 | 0.374 | 0.330 | 0.302 | |
| 0.536 | 0.550 | 0.480 | 0.434 | 0.364 | 0.292 | 0.300 |