Abstract
Aligning Large Language Models (LLMs) with human preferences often relies on proxy objectives that can lead to unintended consequences like likelihood displacement and excessive verbosity. We introduce ComPO (Comparison-Based Preference Optimization), a novel alignment method that treats preference pairs as comparison oracles. By employing zeroth-order optimization, ComPO bypasses the limitations of standard gradient-based proxies. Our experiments across Mistral, Llama-3, and Gemma-2 models demonstrate that ComPO effectively mitigates common alignment failures while remaining significantly more memory-efficient than traditional methods.
Introduction
The standard paradigm for aligning LLMs involves Reinforcement Learning from Human Feedback (RLHF) or Direct Preference Optimization (DPO). Despite its popularity, DPO is prone to "likelihood displacement"—where the absolute probability of preferred responses decreases during training—and a tendency toward verbosity. These issues are often exacerbated by noisy preference data, where the distinction between preferred and dispreferred responses is subtle. ComPO addresses these challenges by shifting the optimization strategy from gradient-based calculus on a proxy objective to a robust zeroth-order approach guided by comparison oracles.
Methodology: Comparison-Based Preference Optimization
ComPO conceptualizes preference pairs as an "oracle" that provides binary feedback on model parameter updates. Instead of defining a complex loss function, the algorithm asks: "Does parameter set A result in a better likelihood profile for this preference pair than parameter set B?"
Zeroth-Order Optimization
The core of ComPO is a zeroth-order optimization process. The algorithm applies random perturbations to the model's weights and uses the comparison oracle to determine which direction improves alignment. This allows the model to navigate the parameter space using only "better/worse" signals, staying truer to the latent alignment goal than imperfect mathematical proxies.
Practical Implementation and Efficiency
To scale ComPO to billion-parameter models, several key heuristics are employed:
- Output-Layer Perturbation: Optimization is restricted to the final output layer (
lm_head), drastically reducing the memory footprint. - Hybrid Pipeline: A "clean" subset of data is used for standard DPO, while "noisy" data (with small likelihood margins) is reserved for ComPO.
- Gradient Sparsification: Low-magnitude gradient entries are zeroed out to ensure stability.
Experimental Results
We evaluated ComPO on three major benchmarks: AlpacaEval 2, MT-Bench, and Arena-Hard, using Mistral-7B, Llama-3-8B, and Gemma-2-9B models.
Performance and Conciseness
ComPO consistently improves the Length-Controlled (LC) win rate across various models. As shown in Table 1, Mistral-Base-7B's LC win rate increased from 9.71% with DPO to 11.66% with ComPO. Furthermore, ComPO-tuned models tend to be more concise; for instance, Mistral-Instruct-7B saw a reduction in average response length from 513 to 468 tokens without sacrificing quality.
Generalizability
ComPO is not limited to DPO; it can also enhance other alignment methods like SimPO. Table 2 illustrates that adding ComPO to SimPO yields consistent gains across AlpacaEval 2 and Arena-Hard for Mistral, Llama-3, and Gemma-2 models.
Resource Efficiency
A significant advantage of ComPO is its memory efficiency. Aligning a Llama-3-8B model with ComPO requires approximately 23GB of VRAM per GPU, a substantial reduction compared to the 77GB required for full-parameter DPO. This efficiency makes high-quality alignment feasible on consumer-grade or mid-range enterprise hardware.
Discussion and Conclusion
ComPO demonstrates that noisy preference data, often discarded in other frameworks, contains valuable signals that can be extracted via zeroth-order optimization. By bypassing traditional proxy objectives, ComPO mitigates likelihood displacement and reduces model verbosity. While currently an offline method focused on the output layer, future work may explore all-layer perturbations and online data generation to further enhance alignment performance.
Summary updated