TL;DR
This paper reframes Preference Optimization (PO) as a Negative Log-Likelihood (NLL) estimation problem, revealing that dispreferred samples are essentially estimative samples for the normalization constant. They introduce MC-PO, an algorithm that uses a contrastive divergence-inspired MCMC kernel to sample "hard negative" dispreferred completions, leading to improved alignment performance over existing methods.
What Problem Does This Paper Address?
Aligning large language models (LLMs) with human values is a crucial but challenging task. While Reinforcement Learning from Human Feedback (RLHF) and its variants like Direct Preference Optimization (DPO) have shown promise, the methods for generating the pairwise preference data (i.e., choosing the "dispreferred" completion) often lack strong theoretical grounding. Existing approaches typically rely on simple heuristics, which might not be optimal for training robust and well-aligned models. This paper asks: "How to choose dispreferred completions for PO?" and proposes a theoretically justified approach.
Methods
The core innovation is reformulating PO as minimizing the Negative Log-Likelihood (NLL) of a probability model. This perspective reveals that the normalization constant in the NLL estimation, which is typically intractable, can be approximated using sampling strategies. The authors propose using Contrastive Divergence (CD), a method for estimating gradients of log-normalization constants using Markov Chain Monte Carlo (MCMC) kernels.
Specifically, they introduce:
- MC-PO (Monte Carlo Preference Optimization): An offline PO algorithm that leverages the MC kernel from CD. This kernel samples "hard negatives" – dispreferred completions that are semantically similar to the preferred one and thus challenging for the model to distinguish. This is achieved by sampling proportionally to the reward model's estimated log-likelihood.
- OnMC-PO (Online MC-PO): An extension of MC-PO for online settings, aiming for unbiased gradient estimation.
Datasets
- TULU 3 SFT Mix: Used for fine-tuning base models.
- Nectar dataset: Contains 7 ranked completions per prompt, used for generating diverse candidate completions.
- UltraFeedback dataset: Used for regenerating preferred and dispreferred completions in the "instruct setup," aligning closer to an on-policy setting.
No new benchmarks were introduced; existing ones were used for evaluation.
Key Insights and Ideas
- PO as NLL Estimation: The paper provides a novel theoretical lens by showing that PO can be viewed as an NLL estimation problem. This connection is key because it allows leveraging existing techniques from NLL estimation for PO.
- Dispreferred Samples as Estimative Samples: The dispreferred completions in PO are re-interpreted as crucial estimative samples for approximating the intractable normalization constant in the NLL formulation.
- "Hard Negatives" for Better Alignment: By using a CD-inspired MCMC kernel, MC-PO samples "hard negatives" – dispreferred completions that are semantically close to the preferred ones. This is more effective than random sampling or simple heuristic-based selection, as it forces the model to learn finer distinctions.
- Theoretical Justification for Sampling: The framework provides theoretical guidance on how to design effective sampling strategies for dispreferred completions, moving beyond ad-hoc heuristics.
Key Results
- MC-PO Outperforms SOTA: On popular alignment benchmarks (AlpacaEval 2 and Arena-Hard), MC-PO consistently outperforms existing state-of-the-art offline PO baselines. For instance, it achieved a winrate of 35.84% on AlpacaEval and 63.77% on Arena with the Llama-3.1-8B-SFT model.
- OnMC-PO Further Improves Performance: The online extension, OnMC-PO, leads to further improvements, achieving a winrate of 72.63% on Alpaca with the Llama-3.1-8B-Instruct model, significantly outperforming online DPO.
- Robustness to Noisy Samples: MC-PO shows better robustness to noisy dispreferred samples compared to DPO.
- Sampling Strategy Matters: Analysis shows that the proposed MC-PO sampling strategy (balancing exploitation and exploration) is optimal, while a "Min" sampling variant leads to poor performance and high variance.
Limitations and Future Work
- Computational Cost: The MC-PO algorithm incurs approximately 30% more training time compared to DPO due to the MCMC kernel computations.
- Single-Step MCMC: The current implementation uses a single MCMC step, which is often suboptimal. The authors suggest that using multi-step MCMC chains would be essential for acquiring higher-quality samples, though this would further increase computational overhead.
- Future Work: The authors plan to explore multi-step MCMC based PO solutions and develop more efficient training algorithms to speed up these methods.
Summary updated