Introduction
Large Language Models (LLMs) are predominantly trained using Maximum Likelihood Estimation (MLE), which focuses on next-token prediction. However, this approach leads to exposure bias, where the model's reliance on ground-truth context during training diverges from its behavior during inference. To address this, researchers from Amazon and CMU propose Contrastive Preference Optimization (CPO), a self-supervised framework that incorporates sequence-level signals without requiring expensive human-labeled preference data.
Methodology: Contrastive Preference Optimization
CPO shifts the training objective from local token prediction to global sequence preference. The model is trained to distinguish between a ground-truth sequence and several automatically generated "negative" samples.
Synthetic Negative Generation
The authors introduce four automated strategies to generate negative sequences:
- Autoregressive Negatives (AN): Sequences generated by the model itself.
- Batch Negatives (BN): Correct sequences from other prompts within the same training batch.
- Meanfield Negatives (MN): Sequences with 15% of tokens randomly swapped.
- Truncation Negatives (TN): Sequences prematurely ended with an EOS token.
Denser Ranking and Ensembling
To refine the learning signal, CPO employs cosine similarity in the embedding space to rank synthetic negatives. This "denser" signal allows the model to learn subtle quality differences. Furthermore, a weight-space ensemble technique is used to interpolate parameters between MLE and CPO models, optimizing the balance between token-level accuracy and sequence-level coherence.
Experimental Results
The effectiveness of CPO was evaluated on instruction-following (Dolly dataset) and open-ended text generation (Wikidump) using GPT2-XL and OpenLlama-3B models.
Performance Gains
On the Dolly dataset, OpenLlama-3B trained with CPO (specifically the ANR variant) achieved a 13.8% higher win rate over the MLE baseline, as evaluated by GPT-3.5. CPO consistently outperformed other sequence-level baselines, including Parallel Scheduled Sampling (PSS) and standard Direct Preference Optimization (DPO).
In text generation tasks, CPO improved the win rate by 3% and enhanced the MAUVE score, indicating higher distributional similarity to human-written text. The method proved robust across various decoding strategies, such as greedy, top-p, and beam search.
Conclusion
Contrastive Preference Optimization provides a scalable, human-out-of-the-loop solution for improving LLM performance. By mitigating exposure bias through sequence-level ranking of synthetic negatives, CPO bridges the gap between training objectives and inference-time generation quality with minimal computational overhead.
Summary updated