AdaBoN: Adaptive Best-of-$N$ Alignment

Vinod Raman, Hilal Asi, Satyen Kale · Submission to ICLR 2026 · Rejected

TL;DR

Standard Best-of-$N$ (BoN) sampling wastes compute by drawing the exact same number of candidate responses for every prompt, regardless of whether a prompt is easy or hard to align. AdaBoN introduces a simple, training-free, two-stage allocation algorithm that estimates each prompt’s reward distribution via lightweight Kernel Density Estimation and greedily shifts inference compute toward prompts where extra samples yield the highest marginal gain. Across 12 language model–reward model pairs, AdaBoN consistently outperforms uniform sampling and matches the performance of uniform allocations with 20% to 33% more compute.

What Problem Does This Paper Address?

Test-time alignment methods like Best-of-$N$ sampling generate $N$ responses from a base language model (LM) and select the output scoring highest under a reward model (RM). While effective and non-invasive compared to fine-tuning methods like RLHF or DPO, BoN typically treats all prompts identically by applying a static, uniform budget $N$.

This uniform allocation is inefficient:

  1. Some prompts easily yield high-reward completions with just a handful of samples.
  2. Harder or higher-variance prompts require substantially more exploration to discover high-quality responses.
  3. Existing prompt-adaptive methods either require training heavy auxiliary prediction networks (which must be retrained whenever models, budgets, or domains change) or rely on sequential, token-level rejection that ruins parallel inference throughput and spikes latency.

Methods

AdaBoN formulates test-time budget allocation across a batch of $K$ prompts with a total query budget of $B \times K$ forward passes. To protect throughput and minimize latency, AdaBoN uses a two-stage parallelizable procedure:

  1. Exploration Phase: Allocate a fixed initial budget $d < B$ (the authors recommend $d = 0.75B$) to draw $d$ candidate completions per prompt and evaluate their rewards.
  2. Reward Distribution Estimation: Model the underlying reward distribution $\hat{\mathcal{D}}_i$ for each prompt using Gaussian Kernel Density Estimation (KDE), selecting bandwidth automatically via Scott's rule ($h = \hat{\sigma} d^{-1/5}$).
  3. Marginal Value Estimation & Greedy Allocation: For each candidate query allocation $j$, estimate the expected maximum reward $V_{i,j}$ via Monte Carlo sampling ($m = 1024$) from $\hat{\mathcal{D}}_i$. Because the expected maximum of random samples is theoretically concave and monotonic (proven in Proposition 3.1), the remaining $(B - d)K$ budget is assigned using an optimal greedy resource allocation algorithm.

Crucially, AdaBoN requires zero auxiliary training, works out of the box with any LM–RM pair, and requires only two batched forward passes to the LM, preserving batch parallelization.

Stage 1: Batch sample d queries per prompt ──► Compute rewards
                                                     │
Stage 2: Fit KDE & Monte Carlo estimate gains ◄──────┘
         │
         ▼
Greedy allocation of remaining (B - d)K queries ──► Batch sample remainder

Datasets

The authors evaluated AdaBoN across three standard instruction-following and safety benchmarks:

  • AlpacaEval (v2.0): General instruction-following prompts (reported in the main text).
  • HH-RLHF: Anthropic's helpfulness and harmlessness conversational dataset.
  • PKU-SafeRLHF: Safe and aligned response evaluation.

For each benchmark, the authors evaluated 50 randomly sampled batches across various batch sizes ($K \in \{3, 5, 10, 15, 20\}$).

Evaluations spanned 12 LM–RM pairings using 8B-scale models:

  • LMs: Mistral-7B-v0.3, Gemma-7B, Qwen2.5-7B-Instruct, Meta-Llama-3-8B.
  • RMs: RM-Mistral-7B, FsfairX-LLaMA3-RM-v0.1, ArmoRM-Llama3-8B-v0.1.

Key Insights and Ideas

  • Reward distributions are smooth and simple to estimate: Histograms of RM scores across base LM outputs typically display smooth, unimodal or few-mode shapes. Simple Gaussian KDE reliably captures these profiles without parameteric assumptions, outperforming Gaussian or Skew-Normal maximum likelihood fits.
  • Heuristic variance allocation fails: The authors benchmarked against VarBoN, which simply distributes compute proportional to empirical reward variance. VarBoN hovered around a 0.50 win rate (no better than random uniform allocation), proving that tracking the tail behavior (expected maximum) rather than raw variance is essential.
  • Skewness dictates adaptive gain: AdaBoN shows smaller gains on pairs where reward distributions are heavily left-skewed (such as Qwen paired with ArmoRM). When most responses already sit near maximum reward, extra samples offer diminishing returns across all prompts, making uniform allocation hard to beat.

Key Results

The paper introduces two evaluation metrics: Batch Win Rate (BWR) (probability that the adaptive allocation achieves higher cumulative max-reward than uniform allocation) and Expected Survival Time (EST) (the uniform budget required to match AdaBoN's score):

  • Consistent Outperformance: AdaBoN achieved $\text{BWR} > 0.50$ across 76%–100% of tested batches for almost all LM–RM pairs, frequently attaining median win rates around 0.58–0.62 (and up to 0.70 on specific batches).
  • 20% to 33% Compute Savings: At a per-prompt budget of $B = 120$, AdaBoN achieved median ESTs between 148 and 154 (with upper quartiles exceeding 160). This indicates that AdaBoN matches uniform sampling running on 20%–33% larger compute budgets.
  • Better with Larger Batches: As batch size $K$ scaled from 3 to 20, median win rates surged from ~0.55 up to 0.74 (e.g., Qwen-Mistral), because larger pools provide more opportunity to divert compute from saturated prompts to high-yield ones.
  • Minimal Tuning: Setting exploration budget $d = 0.75B$ functioned well universally across all models and datasets without per-dataset tuning.

Limitations and Future Work

  • Batch Dependency: The algorithm requires prompts to arrive in batches ($K > 1$) to trade off compute; it does not directly apply to single-prompt streaming/online regimes.
  • Continuous Reward Assumption: Gaussian KDE assumes continuous, smooth reward signals and may fail on discrete verifiers or binary reward setups (e.g., unit test pass/fail in code generation).
  • Static Two-Stage Allocation: AdaBoN does not update distribution estimates after committing the second stage. While this preserves parallel latency, multi-stage or bandit-style sequential allocations could potentially extract higher reward gains if latency is not a bottleneck.

Summary updated

Abstract

Recent advances in test-time alignment methods, such as Best-of-$N$ sampling, offer a simple and effective way to steer language models (LMs) toward preferred behaviors using reward models (RM). However, these approaches can be computationally expensive, especially when applied uniformly across prompts without accounting for differences in alignment difficulty. In this work, we propose a prompt-adaptive strategy for Best-of-$N$ alignment that allocates inference-time compute more efficiently. Motivated by latency concerns, we develop a two-stage algorithm: an initial exploratory phase estimates the reward distribution for each prompt using a small exploration budget, and a second stage adaptively allocates the remaining budget using these estimates. Our method is simple, practical, and compatible with any LM-RM combination. Empirical results on prompts from the AlpacaEval, HH-RLHF, and PKU-SafeRLHF datasets for 12 LM–RM pairs and 50 different batches of prompts show that our adaptive strategy consistently outperforms the uniform allocation with the same inference budget. Moreover, our experiments show that our adaptive strategy remains competitive against uniform allocations with $20\%$ larger inference budgets and even improves in performance as the batch size grows.
BibTeX
@misc{raman2025adabon,
  author = {Vinod Raman and Hilal Asi and Satyen Kale},
  title = {{AdaBoN: Adaptive Best-of-$N$ Alignment}},
  year = {2025},
  eprint = {2505.12050},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.12050},
}
Figure