Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

InfAlign: Inference-aware language model alignment

InfAlign tunes a language model for the inference procedure it will actually use

  • Problem Standard RLHF trains models for plain sampling, but deployed models often decode with Best-of-N or similar procedures. This train and test mismatch makes standard RLHF suboptimal for those methods.
  • Method InfAlign is a framework that optimizes win rate under the inference-time procedure instead of plain sampling. Its CTRL solver calibrates the reward, transforms it for the procedure, then runs standard RLHF on the result.
  • Results The authors prove that for any decoding procedure, the optimal aligned policy solves standard RLHF with a transformed reward. For Best-of-N sampling, the transformations improve inference-time win rate by up to 3 to 8%.

Why standard RLHF misses the decoding step

Standard alignment trains a reward model, then solves a KL-regularized RL problem to improve that reward. But a tuned model is rarely served as is, because a decoding procedure usually sits on top of it. Common procedures include best-of-N sampling, best-of-N jailbreaking, chain-of-thought reasoning, and self consistency.

Standard RLHF optimizes the policy for plain sampling, while the answers come from a different distribution produced by the procedure. Figure 1 shows this train/test mismatch between the train-time policy π and the inference-time policy Tπ. The authors ask whether a model can be better aligned for a known inference-time procedure. They focus on Best-of-N (BoN) sampling and Worst-of-N (WoN), which is best-of-N jailbreaking viewed from the defender's side.

The reason for WoN is that the defender may assume the attacker picks the worst of N samples.

Inference-time win rate means each model produces a response through the procedure, and the judge counts which sample wins. The obtained sample follows a distribution that depends on both the policy and the inference-time procedure. Definition 4 writes this as the expected win indicator over samples drawn from Tπ1 and Tπ2. Directly optimizing this quantity seems intractable, which is why the paper turns to reward transformation next.

The key idea: transform the reward for the procedure

The key move is to change the reward that RLHF optimizes, so the training target matches the procedure that runs at decoding. InfAlign maximizes the inference-time win rate of the policy against the reference policy, minus a KL penalty. The inference-time win rate compares the responses the two models return after their procedures run, not raw samples.

Optimizing that objective directly looks intractable, so the authors instead look for a reward transformation. Lemma 1 shows that for any base policy, reward model, procedure and beta, a transformed reward exists whose KL-regularized maximizer solves the InfAlign problem. The transformation therefore carries the procedure into the training objective, so the design task becomes choosing a transformation suited to each procedure.

Theorem 1 ties the optimal policy to the reference policy times an exponential of the transformed reward divided by beta. The same theorem defines the transformed reward as the derivative of the inference-time win rate with respect to the policy, so the two equations depend on each other. Iterating these equations is inefficient, because evaluating the derivative means working over a large or even infinite output space.

The authors also doubt that such an iterative procedure reaches the optimal solution. When no inference-time procedure is applied, the derivative reduces to the calibrated reward under the reference policy. That special case explains why the practical method, InfAlign-CTRL, starts from calibration and then applies a transformation.

How InfAlign-CTRL runs: calibrate, transform, optimize

The InfAlign-CTRL solver runs three steps: calibrate the reward, transform the calibrated score, and run RLHF on the result. Calibration scores each response by its expected win indicator against samples from the reference policy, and a tie counts as one half. Calibration keeps the ordering of the reward, so any strictly increasing transform of the raw reward leaves the calibrated score unchanged.

For continuous models, a reference sample gets a calibrated reward that is uniform on [0, 1], whatever the base policy and reward model.

The transformation Φ depends on the inference-time procedure T, so it can be designed without knowing the specific reward model or base policy. Theorem 2 says that for calibrated procedures, the win rate and KL divergence don't depend on πref or r. Because of that, the authors can tune Φ on simple toy language models before touching real data.

The transformed reward RΦ equals Φ applied to the calibrated reward, and the step hands it to a standard RLHF solver.

In practice, the calibrated score is estimated from K samples z1 to zK drawn from the reference model for each prompt. The estimate averages the win indicators of the response against those K samples, which gives a practical stand-in for the true calibrated reward. Calibration uses offline samples, so the method avoids extra online rollouts during RL training.

The authors set K = 100 and run PPO on the transformed reward, following Algorithm 1.

Lemma 6 bounds the estimation error: with probability at least 1 − δ, the estimate stays within sqrt(log(2/δ)/(2K)) of the true calibrated reward for all responses. The bound follows from the DKW inequality, which the authors cite as Dvoretzky et al., 1956.

Choosing transformations for Best-of-N and Worst-of-N

Best-of-N and Worst-of-N shift the output distribution in opposite directions, and the paper writes both densities out. For Best-of-N, the density is N times the policy probability times the calibrated reward raised to the power N minus 1. For Worst-of-N, the calibrated reward is replaced by one minus it, so the density favors low-reward responses.

Corollary 2 gives a pair of fixed-point equations for the best transformation under each procedure. The authors iterate these equations and call the resulting transformations bon fp and won fp.

A simpler option is the exponential transformation, where sign(t) is 1 for t at least 0 and −1 otherwise. For positive t, it emphasizes the higher quantiles of the calibrated reward. Negative t targets the lower quantiles, which the paper calls a suitable choice for WoN. Because Theorem 2 makes the win rate independent of the reference policy and reward model, simple toy models can rank transformations.

The authors use this toy analysis to pick t, and they don't need to retrain the model for each choice.

Figure 2: Best-of-N (left) and Worst-of-N (right) win rate vs KL
tradeoff curves for N = 4 with different transformation functions

Figure 2 . Best-of-N (left) and Worst-of-N (right) win rate vs KL tradeoff curves for N = 4 with different transformation functions.

Original paper · CC BY 4.0 · Ananth Balashankar, Ziteng Sun, Jonathan Berant, Jacob Eisenstein, Michael Collins, Adrian Hutter, Jong Lee, Chirag Nagpal, Flavien Prost, Aradhana Sinha, Ananda Theertha Suresh, Ahmad Beirami · InfAlign: Inference-aware language model alignment · Original paper figure · Extracted the figure area from page 6 of the original PDF.

In the N = 4 analysis, the identity and log transformations are suboptimal for Best-of-4 win rate. The bon fp transformation gives the best tradeoff, and exp(10x) is almost as good. For Worst-of-4, won fp gives the best tradeoffs, and the log transformation beats the identity. On the Anthropic helpfulness dataset, e5u gave better win rate for Best-of-2, while e10u was better for Best-of-4.

For the Worst-of-N jailbreak setting, t = −10 performed best, and median-based calibration gained up to 5% over the best SOTA method.

Reward miscalibration and standard win rate

The authors first check whether the reward model is calibrated on the Anthropic helpfulness data. They scored 100 reference-policy responses for each of 10 random prompts from the test split. They sorted the scores, computed the ranks, and plotted them against the line y = x in Figure 3. For most prompts the points deviate clearly from that line, and the size of the deviation varies by prompt.

With no inference-time procedure, the optimization target is standard win rate. InfAlign-CTRL uses an identity transform and is compared with uncalibrated RLHF, BoNBoN, BoND, and IPO. Using the calibrated reward directly in RLHF gives the same solution as the IPO objective. On the Anthropic helpfulness and harmlessness tasks, InfAlign-CTRL achieves better win rate-KL trade-offs than these baselines.

On the summarization task, it is on par with the state-of-the-art methods. The authors attribute this gain to calibration, which they say makes the reward more robust and helps mitigate reward hacking.

The closest comparison is GRPO, which calibrates per-prompt rewards with multiple online rollouts. InfAlign-CTRL relies on offline calibration instead, drawing K = 100 samples per prompt. In standard win rate versus KL, it performs similarly to GRPO and closes the gap with BoN.

Figure 6: InfAlign-CTRL performs simi-
larly to GRPO closing the gap with BoN

Figure 6 . InfAlign-CTRL performs simi- larly to GRPO closing the gap with BoN.

Original paper · CC BY 4.0

The authors use an automated judge, a larger PaLM-2 M model, to compute the true rewards. They report that the model-generated true rewards reach 77.7%, 77.0, and 76.4% accuracy on the three preference datasets. They say these accuracies are comparable to the state-of-the-art on the RewardBench leaderboard.

Inference-time win rates for Best-of-N and Worst-of-N

The main Best-of-N result uses exponential transformations at N = 4, scored by the PaLM-2 M judge on the test split. InfAlign-CTRL reaches up to 3% higher Best-of-N win rate on helpfulness than the best SOTA method. On the summarization quality objective, the gain reaches up to 8% over the best SOTA method. The exponential transformation with t = 10 outperforms the rest of the models, which matches the authors' toy-setting simulations.

Those toy simulations use the BoN and WoN transformations derived from the coupled equations, so the simulated transformations serve as the reference point.

Figure 4: (Top row) Standard win rate comparison of InfAlign-CTRL using identity transformation with other SOTA methods on
Anthropic helpfulness, harmlessness,…

Figure 4 . (Top row) Standard win rate comparison of InfAlign-CTRL using identity transformation with other SOTA methods on Anthropic helpfulness, harmlessness, and Reddit summarization dataset. ( Bottom row) Best/Worst-of-N win rate comparison of InfAlign-CTRL using exponential reward transformation. We report win rate against on the test split as measured by the PaLM-2 M reward model trained on the corresponding datasets.

Original paper · CC BY 4.0

For Worst-of-N on the harmlessness objective, the authors use the negative exponential transformation with t below zero. Calibration based on the median rewards per prompt gives up to 5% higher Worst-of-N win rate than the best SOTA method. The negative transformation with t = -10 performs best among the compared transformations, and the authors identified this value in their toy simulation.

A negative t emphasizes the lower quantiles of the calibrated reward, which suits a defender who assumes the attacker keeps the worst of N outputs.

The authors also tested whether one transformation transfers across values of N. The closed-form KL and win-rate expressions let the authors choose t without retraining the model.

Limitations: where the theory and experiments stop

The theory assumes a continuous output space with a density over outputs, and distinct rewards for distinct outputs. The authors make these assumptions only for some theoretical results, and they don't require them for the algorithm or the experiments. Earlier work, such as Hilton & Gao (2022) and Gui et al. (2024), made similar assumptions implicitly.

The authors say these assumptions lead to approximations on real-world distributions.

The Best-of-N sweep covers N = 2, 4 and 32, while the headline numbers use N = 4. For Best-of-2 the exponential transformation e5u wins, while e10u is better for Best-of-4. The transformations were searched in toy models, and the real-task checks use the PPO-based InfAlign-CTRL solver. Exponential transformations are chosen with t = 10 for Best-of-N and t = −10 for Worst-of-N.

They didn't test the transformations with other RL solvers than PPO.

All reported win rates use an automated PaLM-2 M judge rather than human annotators. The authors acknowledge a gap between this model-generated preference and human preference. Inter-human-rater agreement on the three tasks is often less than 77%, and the model-generated true rewards reach 77.7%, 77.0, and 76.4%. Those accuracies are comparable to state-of-the-art in the RewardBench leaderboard, according to the authors.

Paper info

Authors
Ananth Balashankar, Ziteng Sun, Jonathan Berant, Jacob Eisenstein, Michael Collins, Adrian Hutter, Jong Lee, Chirag Nagpal, Flavien Prost, Aradhana Sinha, Ananda Theertha Suresh, Ahmad Beirami
Venue
arXiv · Preprint
First published
2024-12-27
Added
2026-10-30
Updated
2025-8-21
Version
v5
arXiv
2412.19792
Category
cs.LG · cs.CL · cs.IT
Original paper terms
CC BY 4.0
What we show
Paper info, commentary and permitted figures from the original paper

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Abstract

Language model alignment is a critical step in training modern generative language models. Alignment targets to improve win rate of a sample from the aligned model against the base model. Today, we are increasingly using inference-time algorithms (e.g., Best-of-N, controlled decoding, tree search) to decode from language models rather than standard sampling. We show that this train/test mismatch makes standard RLHF framework sub-optimal in view of such inference-time methods. To this end, we propose a framework for inference-aware alignment (InfAlign), which aims to optimize inference-time win rate of the aligned policy against the base model. We prove that for any inference-time decoding procedure, the optimal aligned policy is the solution to the standard RLHF problem with a transformation of the reward. This motivates us to provide the calibrate-and-transform RL (InfAlign-CTRL) algorithm to solve this problem, which involves a reward calibration step and a KL-regularized reward maximization step with a transformation of the calibrated reward. For best-of-N sampling and best-of-N jailbreaking, we propose specific transformations offering up to 3-8% improvement on inference-time win rates. Finally, we also show that our proposed reward calibration method is a strong baseline for optimizing standard win rate.

Quote from the paper

Ananth Balashankar, Ziteng Sun, Jonathan Berant, Jacob Eisenstein, Michael Collins, Adrian Hutter, Jong Lee, Chirag Nagpal, Flavien Prost, Aradhana Sinha, Ananda Theertha Suresh, Ahmad Beirami (2024). InfAlign: Inference-aware language model alignment. arXiv:2412.19792v5. https://arxiv.org/abs/2412.19792v5

BibTeX
@misc{balashankar2024infalign,
  title = {{InfAlign: Inference-aware language model alignment}},
  author = {Ananth Balashankar and Ziteng Sun and Jonathan Berant and Jacob Eisenstein and Michael Collins and Adrian Hutter and Jong Lee and Chirag Nagpal and Flavien Prost and Aradhana Sinha and Ananda Theertha Suresh and Ahmad Beirami},
  year = {2024},
  eprint = {2412.19792},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.19792v5}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up