atlas

Research map / Large language models / Instruction and fine-tuning

Inference-Aware Fine-Tuning for Best-of-N Sampling in Large Language Models

ICLR 2025 · Large language models › Instruction and fine-tuning · approach: Efficient LLM fine-tuning systems · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes inference-aware fine-tuning that optimizes LLMs for Best-of-N (BoN) inference, deriving SFT and RL objectives (BoN-SFT, BoN-RL-V/S, BoN-RLB, BoN-RLB(P)) with a variational form of the BoN policy, evaluated on Gemma 2B/9B for MATH, MBPP/HumanEval.

Problem

Standard fine-tuning (SFT, RL) ignores the inference-time strategy actually used, so models are not optimized for Best-of-N sampling; BoN's argmax is non-differentiable, making direct training hard.

Approach

Derive a variational (energy-based) approximation of the BoN policy, pi_BoN ∝ pi·exp(λ_N Q_pi), that yields differentiable gradients for training the base policy so that its BoN outputs are optimized, covering imitation and RL settings, and for binary rewards a closed-form weighted REINFORCE (BoN-RLB) with positive-only variant.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Train with BoN-aware RL using verifier feedback and N'=32Gemma 2B · Hendrycks MATHBo-32 accuracy: 26.8% -> 30.8%Helped
Train with BoN-aware RL using environment reward as verifierGemma 2B · Hendrycks MATHpass@32 accuracy: 60.0% to 67.0%Helped
Train with BoN-RLB(P), using binary reward and positive examples onlyGemma 2B · HumanEvalpass@16 accuracy: 61.6% to 67.1%Helped
Use standard RL fine-tuning with N'=1 instead of pass@N-aware trainingGemma 2B · HumanEvalpass@16 accuracy: reducing pass@$16 to 59.8%Hurt
Use standard RL with N'=1 instead of BoN-aware trainingGemma 2B · Hendrycks MATHpass@32 accuracyHurt
Train with BoN-aware SFT rather than base SFTGemma 2B · Hendrycks MATHBoN accuracyHelped
Use base SFT with N'=1 rather than the pretrained base modelGemma 2B · Hendrycks MATHBoN accuracyHurt
Train BoN-RL-V to optimize verifier robustness rather than pass@NGemma 2B · Hendrycks MATHpass@N accuracyNo clear effect
Train BoN-RL-V with N'=32Gemma 2B · Hendrycks MATHdirect N=1 accuracy: from 22% to 26%Helped

Surprising findings

Limitations

Experimental setup

Datasets: MATH MBPP

Benchmarks: MATH HumanEval Functional MATH MathOdyssey

Metrics: BoN accuracy pass@N

Baselines: STaR RL-V RL-S SFT Base model

Builds on: STaR REINFORCE IPO ReST-EM

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy