Variational Best-of-N Alignment
Afra Amini, Tim Vieira, Elliott Ash, Ryan Cotterell
Abstract
Best-of-N (BoN) is a popular and effective algorithm for aligning language models to human preferences. The algorithm works as follows: at inference time, N samples are drawn from the language model, and the sample with the highest reward, as judged by a reward model, is returned as the output. Despite its effectiveness, BoN is computationally expensive; it reduces sampling throughput by a factor of N. To make BoN more efficient at inference time, one strategy is to fine-tune the language model to mimic what BoN does during inference. To achieve this, we derive the distribution induced by the BoN algorithm. We then propose to fine-tune the language model to minimize backward KL divergence to the BoN distribution. Our approach is analogous to mean-field variational inference and, thus, we term it variational BoN (vBoN). To the extent this fine-tuning is successful and we end up with a good approximation, we have reduced the inference cost by a factor of N. Our experiments on controlled generation and summarization tasks show that BoN is the most effective alignment method, and our variational approximation to BoN achieves the closest performance to BoN and surpasses models fine-tuned using the standard KL-constrained RL objective. In the controlled generation task, vBoN appears more frequently on the Pareto frontier of reward and KL divergence compared to other alignment methods. In the summarization task, vBoN achieves high reward values across various sampling temperatures.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
24 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Best-of-N through the Smoothing Lens: KL Divergence and Regret Analysis cites Scaling Laws for Reward Model Overoptimization
- Best-of-N through the Smoothing Lens: KL Divergence and Regret Analysis cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- Best-of-N through the Smoothing Lens: KL Divergence and Regret Analysis cites BoNBoN Alignment for Large Language Models and the Sweetness of Best-of-n Sampling
- Best-of-N through the Smoothing Lens: KL Divergence and Regret Analysis cites Training language models to follow instructions with human feedback
- Scaling Laws for Reward Model Overoptimization cites Training language models to follow instructions with human feedback
- Latent Chain-of-Thought for Visual Reasoning cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- Latent Chain-of-Thought for Visual Reasoning cites LlaVA-CoT: Let Vision Language Models Reason Step-By-Step
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Training language models to follow instructions with human feedback
- BoNBoN Alignment for Large Language Models and the Sweetness of Best-of-n Sampling cites Scaling Laws for Reward Model Overoptimization
- BoNBoN Alignment for Large Language Models and the Sweetness of Best-of-n Sampling cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- BoNBoN Alignment for Large Language Models and the Sweetness of Best-of-n Sampling cites Training language models to follow instructions with human feedback
- Inference-Time Reward Hacking in Large Language Models cites Scaling Laws for Reward Model Overoptimization
- Inference-Time Reward Hacking in Large Language Models cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- Inference-Time Reward Hacking in Large Language Models cites BoNBoN Alignment for Large Language Models and the Sweetness of Best-of-n Sampling
- VisuoThink: Empowering LVLM Reasoning with Multimodal Tree Search cites LlaVA-CoT: Let Vision Language Models Reason Step-By-Step
- VisuoThink: Empowering LVLM Reasoning with Multimodal Tree Search cites BoNBoN Alignment for Large Language Models and the Sweetness of Best-of-n Sampling
Cited by top-tier papers24
- Inference-Time Reward Hacking in Large Language ModelsHadi Khalaf, Claudio Mayrink Verdun, Alex Oesterling, Himabindu Lakkaraju et al.NeurIPS 2025 · 38 citations
- LlaVA-CoT: Let Vision Language Models Reason Step-By-StepGuowei Xu, Peng Jin, Ziang Wu, Hao Li et al.ICCV 2025 · 37 citations
- VisuoThink: Empowering LVLM Reasoning with Multimodal Tree SearchYikun Wang, Siyin Wang, Qinyuan Cheng, Zhaoye Fei et al.ACL 2025 · 35 citations
- Latent Chain-of-Thought for Visual ReasoningGuohao Sun, Hang Hua, Jian Wang, Jiebo Luo et al.NeurIPS 2025 · 30 citations
- Best-of-N through the Smoothing Lens: KL Divergence and Regret AnalysisGholamali Aminian, Idan Shenfeld, Amir R. Asadi, Ahmad Beirami et al.ICLR 2026 · 16 citations
Builds on9
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
- Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng et al.SOSP 2023 · 1,016 citations
- Scaling Laws for Reward Model OveroptimizationLeo Gao, John Schulman, Jacob HiltonICML 2023 · 963 citations
- BoNBoN Alignment for Large Language Models and the Sweetness of Best-of-n SamplingLin Gui, Cristina Garbacea, Victor VeitchNeurIPS 2024 · 138 citations
Related papers
- InfAlign: Inference-aware language model alignmentAnanth Balashankar, Ziteng Sun, Jonathan Berant, Jacob Eisenstein et al.ICML 2025
- TreeBoN: Enhancing Inference-Time Alignment with Speculative Tree-Search and Best-of-N SamplingJiahao Qiu, Yifu Lu, Yifan Zeng, Jiacheng Guo et al.EMNLP Findings 2025 · 2 citations
- Fast Best-of-N Decoding via Speculative RejectionHanshi Sun, Momin Haider, Ruiqi Zhang, Huitao Yang et al.NeurIPS 2024 · 144 citations
- Controlled Decoding from Language ModelsSidharth Mudgal, Jong Lee, Harish Ganapathy, YaGuang Li et al.ICML 2024 · 130 citations
- Approximated Variational Bayesian Inverse Reinforcement Learning for Large Language Model AlignmentYuang Cai, Yuyu Yuan, Jinsheng Shi, Qinhong LinAAAI 2025 · 5 citations
