Towards Efficient Exact Optimization of Language Model Alignment
Haozhe Ji, Cheng Lu, Yilin Niu, Pei Ke, Hongning Wang, Jun Zhu, Jie Tang, Minlie Huang
TL;DR
This work reframes language-model alignment with human preferences as KL-regularized reward maximization and shows that the optimal policy under this objective is an energy-based distribution pi_beta^*. It introduces Efficient Exact Optimization (EXO), a probability-matching approach that minimizes the reverse KL between a data-driven proxy and the optimal policy, circumventing RL's high-variance training. The authors prove that EXO aligns in the same direction as traditional RL methods asymptotically and demonstrate, through extensive experiments on summarization, dialogue, and instruction-following tasks, that EXO outperforms Direct Preference Optimization (DPO) and PPO in both efficiency and alignment quality. They also reveal that DPO effectively optimizes a forward KL, which can miss critical modes of the target distribution under realistic model capacities. The work provides theoretical insight, empirical validation on realistic human-preference data, and publicly available code for reproducibility.
Abstract
The alignment of language models with human preferences is vital for their application in real-world tasks. The problem is formulated as optimizing the model's policy to maximize the expected reward that reflects human preferences with minimal deviation from the initial policy. While considered as a straightforward solution, reinforcement learning (RL) suffers from high variance in policy updates, which impedes efficient policy improvement. Recently, direct preference optimization (DPO) was proposed to directly optimize the policy from preference data. However, we show that DPO derived based on the optimal solution of the problem leads to a compromised mean-seeking approximation of the optimal solution in practice. In this paper, we propose efficient exact optimization (EXO) of the alignment objective. EXO is guaranteed to optimize in the same direction as RL algorithms asymptotically for arbitrary policy parametrization. This leads to the same mode-seeking solution, while enables efficient optimization by circumventing the complexities of RL. We also compare our method to DPO with both theoretical and empirical analyses, and further demonstrate the advantages of our method over existing approaches on realistic human preference data. Code is available at https://github.com/haozheji/exact-optimization.
