Abstract
Reinforcement learning from human feedback (RLHF) aligns large language models (LLMs) by encouraging their generations to have high rewards, using a reward model trained on human preferences. To prevent the forgetting of pre-trained knowledge, RLHF usually incorporates a KL regularization; this forces the policy to remain close to its supervised fine-tuned initialization, though it hinders the reward optimization. To tackle the trade-off between KL and reward, in this paper we introduce a novel alignment strategy named Weight Averaged Rewarded Policies (WARP). WARP merges policies in the weight space at three distinct stages. First, it uses the exponential moving average of the policy as a dynamic anchor in the KL regularization. Second, it applies spherical interpolation to merge independently fine-tuned policies into a new enhanced one. Third, it linearly interpolates between this merged model and the initialization, to recover features from pre-training. This procedure is then applied iteratively, with each iteration's final model used as an advanced initialization for the next, progressively refining the KL-reward Pareto front, achieving superior rewards at fixed KL. Experiments with GEMMA policies validate that WARP improves their quality and alignment, outperforming other open-source LLMs.
Introduction
Aligning Large Language Models (LLMs) with human values typically relies on Reinforcement Learning from Human Feedback (RLHF). However, RLHF often incurs an "alignment tax": as models are optimized to maximize a reward model (RM), they may suffer from catastrophic forgetting of pre-trained knowledge or engage in reward hacking—becoming excessively verbose or sycophantic to "trick" the RM. To mitigate this, Kullback-Leibler (KL) regularization is employed to keep the model close to its initial state. This creates a fundamental tension: excessive regularization hinders performance, while insufficient regularization leads to model collapse. WARP aims to overcome this trade-off by leveraging model merging in weight space to find a superior balance between reward and stability.
The WARP Methodology
WARP introduces a three-stage procedure for merging models in weight space, designed to be applied iteratively.
Stage 1: Exponential Moving Average (EMA) Anchor
Instead of regularizing against a static starting point, WARP utilizes an exponential moving average of the policy as a dynamic anchor. This EMA anchor acts as a "mean teacher," providing stable exploration and an automatic annealing effect where regularization is tight initially and relaxes as training progresses.
Stage 2: Spherical Linear Interpolation (SLERP)
Multiple policies are fine-tuned independently. Because these policies follow different trajectories, their task vectors (the difference between fine-tuned and initial weights) are nearly orthogonal. WARP uses SLERP to merge these models, preserving the norm of the weights and yielding higher rewards than standard linear averaging (LERP).
Stage 3: Linear Interpolation Towards Initialization (LITI)
The merged model is linearly interpolated back toward the original pre-trained initialization. This allows for navigation along the Pareto front, recovering general features from pre-training while maintaining high alignment rewards.
Key Insights: Orthogonality and the Pareto Front
A significant finding of this work is that task vectors in RL are much more orthogonal (~90°) than in supervised fine-tuning. This diversity in weight trajectories makes SLERP significantly more effective than standard linear interpolation.
Furthermore, iterative merging does not merely find a better point on an existing trade-off curve; it actually shifts the entire Pareto front. Each iteration of WARP provides a more advanced initialization for the next, progressively refining the model's capabilities and achieving higher rewards for the same amount of KL divergence.
Experimental Results
The authors validated WARP using the Gemma 7B model family across several benchmarks:
- Reasoning & Math: On the MATH benchmark, WARP (3rd iteration) improved performance from 25.6 to 31.0, and on GSM8K, it rose from 55.6 to 66.8 compared to Gemma 1.1.
- Human Preference: In side-by-side evaluations, WARP-aligned Gemma 7B models were preferred over larger models such as Mixtral 8x7B and Mistral 7B (v1 and v2).
- Efficiency: Since merging occurs at the weight level, the final model maintains the same inference cost and memory footprint as a standard 7B model, avoiding "ensemble overhead" at test time.
Conclusion
WARP demonstrates that treating a model's weights as semantically manipulable units through iterative merging can significantly improve alignment. By shifting the KL-reward Pareto front, WARP achieves superior performance and robustness without increasing inference costs. While compute-intensive during training, it offers a powerful framework for refining LLM alignment beyond traditional RLHF methods.
Summary updated