Abstract
Inference-time scaling has emerged as a powerful technique for enhancing the reasoning performance of Large Language Models (LLMs). However, existing approaches often rely on heuristic strategies for parallel sampling, lacking a principled foundation. To address this gap, we propose a probabilistic framework that formalizes the optimality of inference-time scaling under the assumption that parallel samples are independently and identically distributed (i.i.d.), and where the Best-of-$N$ selection strategy follows a probability distribution that can be estimated. Within this framework, we derive a theoretical lower bound on the required number of samples to achieve a target performance level, providing the first principled guidance for compute-efficient scaling. Leveraging this insight, we develop \textsc{OptScale}, a practical algorithm that dynamically determines the optimal number of sampled responses. \textsc{OptScale} employs a language model-based predictor to estimate probabilistic prior parameters, enabling the decision of the minimal number of samples needed that satisfy predefined performance thresholds and confidence levels. Extensive experiments on representative reasoning benchmarks (including MATH-500, GSM8K, AIME, and AMC) demonstrate that \textsc{OptScale} significantly reduces sampling overhead while remaining better or on par with state-of-the-art reasoning performance. Our work offers both a theoretical foundation and a practical solution for principled inference-time scaling, addressing a critical gap in the efficient deployment of LLMs for complex reasoning.
Introduction
Inference-time scaling—the practice of generating multiple candidate solutions and selecting the best one (e.g., "Best-of-N")—has become a dominant strategy for boosting LLM performance on complex reasoning tasks. However, this "scaling law" comes with a heavy price tag: computational cost scales linearly with the number of samples. Currently, researchers and engineers rely on heuristics or fixed budgets (e.g., "always generate 64 samples"), which is inherently inefficient. Easy questions do not need dozens of attempts, and truly intractable ones should not consume infinite tokens. The field has lacked a principled mathematical foundation to determine the "optimal" amount of compute for a specific query—until now.
Methods: The OptScale Framework
We introduce OptScale, a framework that formalizes the optimality of parallel sampling under the assumption that samples are independently and identically distributed (i.i.d.).
Probabilistic Modeling
OptScale models the verifier scores of candidate answers using a truncated normal distribution constrained to the $[0, 1]$ interval. By estimating the distribution parameters (mean $\mu$ and variance $\sigma$) for a given question, the system can predict the likelihood of reaching a quality threshold.
The Optimal Stopping Rule
We derive a closed-form solution for $N^*$ (the optimal number of samples). This value is the minimum $N$ required to ensure that the probability of the maximum score exceeding a quality threshold ($s_{min}$) meets a desired confidence level ($\alpha$). The algorithm monitors generated samples and terminates as soon as these mathematical criteria are met, effectively "early-stopping" on easy tasks.
OptScale offers two implementation variants:
- OptScale$^t$ (Trainable): Uses a lightweight MLP predictor to estimate distribution parameters before sampling begins.
- OptScale$^0$ (Training-free): Uses Maximum Likelihood Estimation (MLE) to iteratively refine parameters on-the-fly as new samples are generated.
Key Results and Insights
Extensive evaluations across high-difficulty benchmarks like MATH-500, GSM8K, and AIME demonstrate that OptScale significantly improves efficiency without sacrificing accuracy.
Massive Token Savings
OptScale consistently outperforms standard Best-of-N (BoN), Self-Consistency (SC), and Multi-round Thinking (MR) on the accuracy-vs-token Pareto frontier. On the QwQ-32B model, OptScale achieved a 45% reduction in token consumption while maintaining better-than-baseline accuracy. Using the DeepSeek-R1-Distill-Qwen-7B backbone on MATH-500, OptScale reached 94.6% accuracy while saving 56.3% of the tokens used by the $N=64$ BoN baseline.
Difficulty-Awareness and the "Distractor" Effect
Interestingly, generating too many samples can sometimes hurt accuracy. In easy questions, a massive sample size increases the chance of a "lucky" high score for a wrong answer, which can fool the verifier. OptScale avoids this by stopping once a high-confidence correct answer is found. The system naturally allocates more tokens to "hard" problems (high variance in scores) and fewer to "easy" ones.
Conclusion
OptScale moves inference-time scaling from empirical guesswork to a rigorous probabilistic framework. By transforming the compute budget from a hyperparameter into a calculated output of the model's own uncertainty, it allows LLMs to slash computational costs by up to 60% while maintaining state-of-the-art reasoning accuracy. Future work will focus on extending this logic to sequential tree-of-thought searches and improving verifier calibration.
Summary updated