Best-of-∞ - Asymptotic Performance of Test-Time Compute

Junpei Komiyama, Daisuke Oba, Masafumi OyamadaarXiv 2025 · DOI

Introduction

"Best-of-$N$" (BoN) sampling has emerged as a powerful technique for enhancing the performance of Large Language Models (LLMs) on complex reasoning tasks. By generating $N$ candidate solutions and selecting the most frequent answer—a method known as majority voting—researchers can significantly boost accuracy beyond single-pass generation. However, standard BoN approaches face two critical challenges: determining the optimal number of samples $N$ to balance compute cost and performance, and effectively ensembling multiple models with varying strengths.

This paper introduces Best-of-∞, a framework that analyzes the theoretical performance limit of majority voting as $N$ approaches infinity. To bridge theory and practice, the authors propose an adaptive sampling scheme and a novel optimization method based on Mixed-Integer Linear Programming (MILP) for model ensembling.

Methodology

Adaptive Sampling for Efficiency

Fixed-budget sampling is often inefficient; simple problems require few generations, while difficult ones may need many more than a fixed $N$ provides. The authors implement an adaptive sampling strategy using a Dirichlet Process to model the distribution of unique answers. By calculating a Bayes factor, the system monitors the statistical evidence supporting the current leading answer. Generation terminates as soon as the evidence reaches a predefined threshold, ensuring the "Best-of-∞" result is reached with minimal token expenditure.

MILP-based Ensembling and the Polytope Lemma

Ensembling multiple LLMs (e.g., Llama, GPT, Qwen) presents a non-trivial optimization problem. Assigning weights to different models to maximize ensemble accuracy is difficult because the objective function is non-concave and "jumpy," making gradient-based methods unreliable.

The authors resolve this by proving the Polytope Lemma. They demonstrate that the weight space where a specific answer wins the majority vote is bounded by a geometric shape called a polytope.

The Polytope Lemma visualizes the weight regions where specific answers achieve a majority, allowing the search for optimal weights to be framed as a geometric optimization problem.

By framing the search for optimal weights as a Mixed-Integer Linear Program (MILP), the researchers can utilize standard solvers to find provably optimal weighting configurations. This approach effectively exploits the complementarity between models, where a "weaker" model might be prioritized if it consistently solves problems that "stronger" models miss.

Experimental Results

The framework was evaluated on high-difficulty reasoning benchmarks, including AIME2024, AIME2025, GPQA-DIAMOND, and MATH500.

Accuracy across different benchmarks as the number of generations (N) increases, showing the convergence toward the Best-of-∞ limit.

Key findings include:

  • Performance Gains: On AIME2025, an ensemble of GPT-OSS-20B and Nemotron-Nano-9B achieved an accuracy of 93.3%, surpassing the 90.0% peak of the best individual model.
  • Compute Efficiency: Adaptive sampling reduced token usage by 2x to 5x compared to fixed-budget methods while maintaining equivalent accuracy.
  • Generalization: Weights optimized via MILP on a tiny subset of problems (as few as five) generalized well to the rest of the dataset, nearly matching the performance of the best possible single-model selection.

Conclusion

The Best-of-∞ framework provides a rigorous theoretical and practical foundation for test-time compute scaling. By combining adaptive termination with MILP-optimized ensembling, the authors demonstrate that LLM performance can be pushed to its asymptotic limits efficiently. Future work remains to extend these techniques to open-ended generation tasks where verifiable "gold" answers are not readily available.

Summary updated

BibTeX
@misc{komiyama2025best,
  author = {Junpei Komiyama and Daisuke Oba and Masafumi Oyamada},
  title = {{Best-of-∞ - Asymptotic Performance of Test-Time Compute}},
  year = {2025},
  eprint = {2509.21091},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.21091},
}
Figure