NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Alignment-Aware Decoding

Frédéric Berdoz, Luca A Lanzendörfer, René Caky, Roger Wattenhofer

Introduction

Aligning Large Language Models (LLMs) with human preferences—ensuring they are helpful, honest, and harmless—remains a central challenge in natural language processing. While preference optimization methods like Direct Preference Optimization (DPO) and Reinforcement Learning from Human Feedback (RLHF) are industry standards, they primarily operate during training.

A significant challenge with these methods is the "stickiness" problem: to maintain training stability, aligned models are constrained to remain close to their original Supervised Fine-Tuning (SFT) base models. Consequently, the final aligned model often inherits the biases and suboptimal behaviors of the SFT model. While inference-time alignment methods exist, they typically require auxiliary reward models, complex search procedures, or extensive hyperparameter tuning.

To address this, researchers have introduced Alignment-Aware Decoding (AAD), a training-free, inference-time method. AAD significantly improves LLM alignment by treating the log-ratio between a DPO-aligned model and its SFT base as a token-level reward signal, effectively unshackling the alignment signal from the base model's biases.

The Mechanics of Alignment-Aware Decoding

The core innovation of AAD is the use of a token-level advantage function.

In standard DPO, the model is trained such that the log-ratio of the aligned model ($\pi_{DPO}$) to the reference model ($\pi_{SFT}$) is proportional to the reward. AAD exploits this relationship directly during inference. Instead of simply selecting the most likely token from the DPO model's distribution, AAD selects the token $v$ that maximizes this advantage:

$$A(v | x, y_{1:t}) = \log \frac{\pi_{DPO}(v | x, y_{1:t})}{\pi_{SFT}(v | x, y_{1:t})}$$

Intuitively, this decoding strategy favors tokens that the alignment process "boosted" the most relative to the original SFT model. It proves that a DPO model acts as an implicit token-level reward function, allowing for greedy reward maximization on the fly.

Preventing Over-Optimization

To prevent the model from selecting nonsensical tokens that happen to have high ratios—a phenomenon known as over-optimization—the authors introduce min-$\alpha$ filtering. This technique restricts the search space to "plausible" tokens: those with a probability of at least $\alpha$ times the maximum probability in the DPO model's distribution. This ensures the output remains fluent and grammatically correct while maximizing the alignment reward.

Experimental Setup

The researchers evaluated AAD across a diverse array of alignment datasets, including Ultrafeedback, Argilla, OpenRLHF Mixture, Anthropic’s HHRLHF, Skywork, Nectar, and AlpacaEval. The evaluation spanned several model families and scales, notably Llama 3 (3B/8B), Qwen (0.6B/4B), and OLMo-2 (7B/13B).

Key Findings and Results

Superior Alignment and Human Preference

In head-to-head comparisons, AAD achieved remarkable win rates of 70% to 90% against standard greedy DPO decoding across almost all tested datasets. Furthermore, in a human study involving 502 pairwise judgments, evaluators preferred AAD's responses over standard DPO responses 58.7% of the time.

Outperforming Best-of-N Sampling

AAD frequently outperformed "Best-of-2" sampling (which generates two responses and selects the best using a separate reward model) while utilizing comparable or less compute. In human trials, AAD beat Best-of-2 73.5% of the time. On the Skywork dataset, it required a more expensive "Best-of-4" strategy to match AAD's performance.

Robustness in Data Scarcity

One of the most striking discoveries is AAD's robustness in low-data regimes. When trained on only 10% of the available preference data, AAD-guided decoding outperformed standard models trained on 100% of the data. Because AAD produces exceptionally high-quality outputs, these generations can be used as synthetic "preferred" data to further train the model in an iterative DPO loop, effectively closing the gap between low-data and high-data performance.

Computational Efficiency

AAD requires two forward passes per token (one for the DPO model and one for the SFT model). On a single GPU, this yields roughly 0.5x to 0.6x the throughput of standard decoding. Given the significant gains in output quality, this overhead is highly manageable for many deployment scenarios.

Limitations and Future Directions

While highly effective, AAD has a few limitations:

  • Memory Overhead: The method requires keeping both the original SFT model and the DPO model in memory simultaneously, which may pose challenges for memory-constrained deployments.
  • Incompatibility with PPO: AAD does not perform as well with models trained via Proximal Policy Optimization (PPO). PPO directly optimizes the policy against an external reward and does not inherently preserve the specific probability gap between the SFT and final models that AAD relies upon.
  • Search Strategy Expansion: The current implementation relies on greedy decoding. The authors suggest that integrating AAD with more sophisticated search methods, such as lookahead or beam search, could yield even better results. However, they caution that naive beam search can lead to "beam collapse" without careful entropy thresholding.

Summary updated

BibTeX
@inproceedings{berdoz2026alignment,
  author = {Frédéric Berdoz and Luca A Lanzendörfer and René Caky and Roger Wattenhofer},
  title = {{Alignment-Aware Decoding}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=lQmnZqVwSG},
}
Figure