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

Best-of-N through the Smoothing Lens: KL Divergence and Regret Analysis

Gholamali Aminian, Idan Shenfeld, Amir R. Asadi, Ahmad Beirami, Youssef Mroueh

Aligning Large Language Models (LLMs) with human values frequently relies on a technique known as Best-of-N (BoN) sampling. At inference time, the system generates $N$ candidate responses and selects the one that scores highest according to a "proxy" reward model—a smaller model trained to predict human preferences.

However, this approach suffers from a critical vulnerability: overoptimization, often referred to as Goodhart’s Law. Because proxy reward models are imperfect approximations of true human preferences, increasing the number of samples ($N$) increases the likelihood of finding "adversarial" responses. These responses score exceptionally high on the proxy model but are actually of low quality or even harmful according to the "true" human reward. Consequently, performance degrades as more compute is thrown at the problem. This paper provides a rigorous theoretical framework to understand this failure mode and proposes a "smoothing lens" to mitigate it.

The Soft Best-of-N (SBoN) Approach

To address the brittleness of standard BoN, the authors analyze Soft Best-of-N (SBoN). Instead of deterministically picking the single best response (a "hard max"), SBoN treats the $N$ candidates as a pool and samples a response using a softmax distribution based on their proxy rewards.

The core of this method is the introduction of a smoothing parameter, the inverse temperature $\beta$. When $\beta$ is very high, SBoN behaves like standard BoN, aggressively optimizing for the highest proxy score. Conversely, when $\beta$ is low, the policy remains closer to the original, unaligned reference model, preventing it from over-indexing on noisy proxy signals.

Theoretical Framework and Insights

The paper's primary contribution is a theoretical analysis of SBoN, deriving finite-sample upper bounds for two critical metrics:

  1. KL Divergence: Measuring how much the model's behavior drifts from its original reference policy.
  2. Regret Gap: The difference in true reward between the SBoN policy and the theoretical optimal policy.

To quantify the discrepancy between the proxy reward and the true reward, the authors introduce a novel metric called "tilted error." This allows them to track how overoptimization scales with both $N$ and $\beta$.

A major theoretical finding is that SBoN acts as a finite-sample approximation of the mathematically optimal "tilted" policy. SBoN essentially serves as a form of test-time regularization; by not being overly confident in the proxy reward's top pick, the system remains robust against reward hacking. Furthermore, SBoN's regret bound remains finite even when the proxy reward model contains errors, whereas previous bounds for standard BoN could grow aggressively with maximum estimation errors.

Commutative diagram illustrating the connections between the SBoN policy, standard BoN, the tilted optimal policy, and the true optimal policy as sample size and inverse temperature scale.

As illustrated above, SBoN converges to the optimal tilted policy as the number of samples $N \to \infty$, and to the standard BoN policy as the inverse temperature $\beta \to \infty$. This highlights the fundamental trade-off in selecting $\beta$: a higher $\beta$ allows for higher rewards if the proxy is highly accurate, but a lower $\beta$ is necessary to prevent reward-hacking traps when the proxy is noisy.

Experimental Validation

The researchers validated their theoretical findings using the Olmo-2 1B generator model on the Attaq dataset, which focuses on safety and harmfulness. They compared a "strong" proxy model (ArmoRM 8B) against "weak" proxy models (Beaver 7B RM and tulu-v2.5-13b-uf-rm), using GPT-4o as an "LLM-as-a-Judge" to represent the true reward function.

The empirical results strongly supported the theory. In experiments with weak reward models, standard BoN exhibited a clear "U-shaped" curve: performance initially improved but then crashed as $N$ increased due to overoptimization. SBoN, equipped with appropriate smoothing, successfully flattened this curve, maintaining higher "true" harmlessness scores even at large values of $N$. SBoN consistently outperformed standard BoN in high-error regimes, demonstrating that smoothing is a vital tool when proxy reward models cannot be fully trusted. Additionally, numerical experiments confirmed that the theoretical KL divergence bounds are tight in both the small-$\beta$ and large-$\beta$ regimes.

Limitations and Future Directions

While SBoN offers a robust solution to overoptimization, the authors note a few limitations. First, their KL divergence bound for the BoN limit is looser than some specialized bounds in existing literature, suggesting that deriving an asymptotically tight bound for BoN within this framework is a key area for future work. Second, the current analysis uses a shared hyperparameter $\beta$ for both the "tilted error" definition and the SBoN policy. Exploring decoupled temperature parameters could potentially yield even better performance. Finally, while SBoN is straightforward to implement, the theoretical analysis relies on computing certain expectations that might introduce computational overhead in massive-scale production environments.

Summary updated

BibTeX
@inproceedings{aminian2026best,
  author = {Gholamali Aminian and Idan Shenfeld and Amir R. Asadi and Ahmad Beirami and Youssef Mroueh},
  title = {{Best-of-N through the Smoothing Lens: KL Divergence and Regret Analysis}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=tCv1D3M7Lb},
}
Figure