Abstract
Inference-time scaling has emerged as a critical frontier for improving Large Language Model (LLM) performance. While Best-of-N (BoN) sampling is a common strategy, it suffers from "reward hacking," where excessive computation leads to performance degradation due to imperfect reward models. This paper introduces InferenceTimePessimism, an algorithm utilizing $\chi^2$-regularization to achieve scaling-monotonicity—ensuring that increased inference compute consistently yields better or stable results. We provide theoretical guarantees of optimality and demonstrate empirical robustness across multiple benchmarks including GSM8K, MMLU, and MATH.
Introduction
As the industry shifts toward "reasoning" models such as OpenAI’s o1 or DeepSeek-R1, scaling computation during inference (test-time) has become as vital as scaling during training. The most straightforward approach is Best-of-N (BoN) sampling, which involves generating $N$ candidate responses and selecting the one with the highest score from a reward model. However, reward models are often imperfect proxies. When $N$ is large, the search process can uncover "hacks"—responses that achieve high reward scores but are fundamentally incorrect or nonsensical. This phenomenon, known as reward overoptimization, limits the utility of simple re-ranking strategies.
The Best-of-N Baseline
The BoN strategy operates within a "sample-and-evaluate" framework. While intuitive, it is fundamentally limited because the compute budget $N$ also dictates the regularization strength. As $N$ increases, the model is pushed further into the tails of the reward model's distribution, where errors are more likely to occur. This lack of a separate "knob" for regularization makes BoN fundamentally sub-optimal for large-scale inference compute.
InferenceTimePessimism: A Robust Alternative
To address the shortcomings of BoN, we propose InferenceTimePessimism. This algorithm formalizes inference-time alignment as a statistical problem and introduces several key innovations:
- $\chi^2$-Regularization: Unlike BoN, which simply maximizes reward, our approach samples from a distribution that balances high reward with proximity to the base model's original distribution. While KL-regularization is common in RLHF, $\chi^2$-regularization is significantly more efficient for rejection sampling at inference time.
- Pessimism Under Uncertainty: The algorithm discounts rewards for responses that are rare under the base model, preventing "overfitting" to reward model errors in the tails.
- Decoupling Compute and Regularization: By separating the compute budget ($N$) from the regularization strength ($\beta$), we ensure that increasing $N$ does not automatically weaken the model's defense against reward hacking.
The implementation involves a two-step process: first, finding a normalization constant ($\lambda$) via dynamic programming (ComputeNormConstant), and second, using a novel rejection sampling scheme to efficiently draw from the optimal regularized distribution.
Key Results
Our theoretical analysis proves that InferenceTimePessimism is "regret-optimal," achieving the best possible reward given the reward model's error rate and the base model's coverage. Crucially, it is scaling-monotonic: its performance never degrades as $N \to \infty$.
Empirical evaluations on benchmarks like GSM8K confirm these findings. While BoN's accuracy typically peaks and then dips as $N$ increases (the "characteristic dip"), InferenceTimePessimism remains stable or continues to improve even as $N$ reaches $2^{13}$.
In many scenarios, the new algorithm achieved higher peak accuracy than even the best-tuned version of BoN, particularly when using smaller, less accurate reward models like OASST. This suggests that pessimism is a necessary component for robust inference-time scaling.
Conclusion
Inference-time alignment is fundamentally bounded by the base model's coverage—no amount of re-ranking can recover a correct answer if it is never generated. However, within these bounds, InferenceTimePessimism provides a robust, scaling-monotonic framework for leveraging inference compute. By utilizing $\chi^2$-regularization and pessimistic reward estimation, it offers a practical and theoretically sound alternative to standard Best-of-N sampling.
Summary updated