Inference-time alignment methods, such as Best-of-N (BoN), improve language model outputs by generating multiple candidates per prompt and selecting among them using a reward model. Much of this cost is wasted: a fixed budget is applied to every prompt, although the computation required by prompts varies widely. Adaptive methods halt once sampled answers appear settled, but their thresholds are tuned heuristics with no statistical control over early-stopping errors. We instead seek an anytime-valid stopping rule that takes an error tolerance α as input and halts only once an answer is certified to hold a majority (θa>1/2) under the generator's distribution. We aggregate candidates by final answer with a reward-weighted self-consistency (RWSC) score and treat stopping as a sequential test over the resulting clusters. Applying Wald's sequential probability ratio test to these clusters yields SPRT-RWSC, which performs well empirically, but its guarantee fails because the leading answer shifts during sampling, and the run is continuously monitored. Our main contribution, e-RWSC, replaces Wald's test with a betting supermartingale (an e-process) for every answer the policy produces, bounding the probability of ever certifying a non-dominant answer by α, uniformly over time and across all answers. The RWSC scores drive the bets, so they affect only how quickly a dominant answer a⋆ is certified, not validity; certification takes O(log(1/α)/dKL(θa⋆∥1/2)) samples. Experiments across several language models, datasets, and reward models confirm the predicted 1/dKL scaling of cost and show that accuracy improves over baselines at substantially lower token cost.
Figures & tables
Figure 1: Comprehensive comparison of all selection methods across GSM8K, MATH500, MMLU and CruxEval for Qwen2.5-3B-Instruct using ArmoRM reward model, with allowed maximum budget as 24. For E-Process methods, we use α=0.1 , p†=0.5 , and c=0.8 . For SPRT we use α=0.1,β=0.2 .
Table 2: Cross-RM Sensitivity Analysis on MATH500 (Qwen2.5-3B, N=24 ).
Figure 2: Stopping reliability and token footprint analysis on MATH500 ( Nmax=512 ) for Qwen2.5-3B with ArmoRM. (a) e-RWSC achieves 94.5% accuracy on certified early stops ( τ<512 ). (b) Decision reliability on early stops plotted against overall token expenditure ( k -tokens)
Figure 3: Ablation Studies on MATH500. (a) E-RWSC stopping distribution for Nmax=512 . (b) Sensitivity to Type-I error boundary α ( Nmax=64 ). (c) Sensitivity to the prior alignment threshold p† ( Nmax=64 ).
Figure 4: Empirical validation of E-RWSC theoretical bounds. (Top) Realized error rate respects the Type-I error ( α ) threshold. (Bottom) The inverse of signal strength versus stopping step shows a linear relationship.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
GSM8K
MATH500
MMLU
CruxEval
Method
Acc
Budget
Acc
Budget
Acc
Budget
Acc
Budget
Oracle@24 (Hard Ceiling)
96.5%
24.00
90.2%
24.00
93.4%
24.00
76.5%
24.00
Full Budget Baselines
Base Policy ( πref )
81.1%
24.00
63.6%
24.00
65.8%
24.00
44.0%
24.00
Vanilla BoN
91.2%
24.00
71.0%
24.00
74.6%
24.00
48.6%
24.00
Soft BoN
89.1%
24.00
69.4%
24.00
70.0%
24.00
46.8%
24.00
Appendix
Table 4: Comprehensive comparison of all selection methods across GSM8K, MATH500, MMLU and CruxEval for Qwen2.5-3B-Instruct using ArmoRM reward model, with allowed maximum budget as 24. For E-Process methods, we use α=0.1 , p†=0.5 , and c=0.8 . For SPRT we use α=0.1,β=0.2 .
Pipeline Component
Hardware Device
Complexity
Latency / Candidate
LLM Candidate Generation (Qwen2.5-3B)
GPU (RTX 6000 Ada)
O(L⋅dmodel)
7,084.50 ms ( ≈7.08 s )
RM Scoring (ArmoRM-8B forward pass)
GPU (RTX 6000 Ada)
O(L⋅dmodel)
59.76 ms
Answer Extraction & Normalization
CPU (Host)
O(1) regex
≈0.20 ms
e-RWSC E-Process Update & Kelly Bet
CPU (Host)
O(∣A∣) scalar
0.014 ms ( 13.96μs )
Total GPU Compute per Candidate
GPU
—
7,144.26 ms ( ≈7.14 s )
Algorithmic Overhead Ratio
Host CPU / GPU
—
≈0.00020%
Appendix
Table 5: Hardware Latency Breakdown per Candidate on MATH500 using Qwen2.5-3B-Instruct (avg 500.7 tokens/candidate) and ArmoRM-8B on an NVIDIA RTX 6000 Ada GPU and AMD host CPU.
Method
Avg Steps
Generated
GPU Compute
Algorithmic Check
Algorithmic
Overall
Certified
Nˉ
Tokens ( k )
Time (s / query)
Latency ( μ s / step)
Overhead (ms / query)
Acc (%)
Acc (%)
Fixed-Budget Baselines
Vanilla BoN
512.0
256.3
3657.7 ( ≈61.0 min)
—
0.000
69.8%
—
Self-Consistency
512.0
256.3
3657.7 ( ≈61.0 min)
—
0.000
77.4%
—
Adaptive Sequential Baselines
AdaBoN
380.4
202.6
2717.9 ( ≈45.3 min)
0.02 μ s
0.008
69.4%
76.4%
Appendix
Table 6: End-to-End Computational Profile and Algorithmic Overhead on MATH500 ( Nmax=512 ) for Qwen2.5-3B-Instruct with ArmoRM-8B. GPU generation and RM scoring latency measured on an NVIDIA RTX 6000 Ada GPU; algorithmic stopping-check overhead measured on the host CPU. Algorithmic overhead is under 0.0002% of generation time for e-RWSC , while saving 61.7% of total GPU compute time relative to fixed-budget BoN.
Inference-time language model alignment steers or selects outputs during generation to better meet safety, preference, and task goals without retraining.
Best-of-N (BoN) sampling is a widely used inference-time alignment method for language models, whereby N candidate responses are sampled from a reference model and the one with the highest predicted reward according to a learned reward model is selected. Despite its widespread practical use, recent theoretical work has suggested that it is statistically suboptimal and vulnerable to reward hacking, the process by which models exploit weaknesses in the learned reward model to achieve high estimated reward without genuinely improving performance. We revisit this question under assumptions that more closely reflect practice than that of prior work. In particular, in contradistinction to earlier analyses that focused on expected true reward, which may not be meaningful in many practical settings, we investigate how inference-time alignment affects the win-rate, a pairwise comparison-based metric more closely aligned with how reward models are trained and evaluated in practice. We demonstrate that, under minimal conditions on the quality of the reference model and learned reward model, properly tuned BoN is both computationally and statistically optimal in achieving high win-rate, partially explaining its widespread practical success. Because BoN remains susceptible to reward-hacking in this setting, we propose a simple and practical variant that provably eliminates reward-hacking while maintaining optimal statistical performance. Finally, we show that prior approaches are provably suboptimal when considering win-rate, highlighting the importance of choosing appropriate objectives when analyzing inference-time alignment methods.
Ved Sriraman, Adam Block
Department of Computer Science, Columbia University · Department of Electrical Engineering, Columbia University
Inference-time alignment steers a frozen language model during decoding using auxiliary reward signals, avoiding the cost of repeated weight updates. However, existing inference-time alignment methods typically optimize a single scalar score, so explicit safety constraints must either be ignored or encoded through manually tuned penalties. We propose Lagrangian Reward Augmentation (LARA), a general inference-time alignment framework under safety constraints. Starting from a KL-regularized constrained objective with a reward model and a cost model, LARA dualizes the constraint and reduces the optimization problem to a one-dimensional convex problem over a nonnegative dual variable. Estimated on a small calibration set, this dual variable defines an augmented reward that can be used as a drop-in scoring signal within existing inference-time alignment methods. For sequence-level sampling methods, such as Best-of-N reranking, the calibrated dual variable corresponds to the solution of the expected-cost constrained problem. For token-level reward-guided decoding methods, the same construction yields a principled dual-calibrated heuristic rather than an exact constrained-policy guarantee. We evaluate LARA on both sequence-level and token-level inference-time alignment methods, and find that LARA improves the helpfulness-harmlessness tradeoff, with Best-of-N achieving the best performance among inference-time methods, approaching finetuning-based direct alignment baselines.
Yaswanth Chittepu, Ativ Joshi, Sohini Chintala +1
University of Massachusetts Amherst · Independent Researcher
Inference-time alignment effectively steers large language models (LLMs) by generating multiple candidates from a reference model and selecting among them with an imperfect reward model. However, current strategies face a fundamental dilemma: optimistic'' approaches like Best-of-$N$ suffer from reward hacking, while pessimistic'' regularized methods often stifle the exploration needed to discover high-quality responses. In this work, we formalize this trade-off through the lens of regret minimization, demonstrating that the optimal strategy depends critically on the tail behavior of the reward distribution. We show theoretically that light-tailed regimes favor optimism to unearth high-quality outliers, whereas heavy-tailed regimes require pessimism to guard against reward mis-calibration in the extremes. Guided by this insight, we introduce Best-of-Tails (BoT), an adaptive inference-time alignment framework that uses Tsallis divergence as a tunable regularizer to provide a finer granularity of interpolation between these extremes. BoT uses the Hill estimator to characterize reward-tail heaviness on a per-prompt basis and dynamically adjusts its selection rule to balance exploration gains against alignment error. Across math, multiple-choice reasoning, and human-preference evaluations, BoT improves alignment performance across a range of reference and reward model configurations relative to fixed-strategy baselines.