Preference Optimization with Multi-Sample Comparisons

Chaoqi Wang, Zhuokai Zhao, Chen Zhu, Karthik Abinav Sankararaman, Michal Valko, Xuefei Cao, Zhaorun Chen, Madian Khabsa, Yuxin Chen, Hao Ma, Sinong Wang · DOI

Introduction

In the development of Large Language Models (LLMs) and diffusion models, "alignment" serves as the critical final stage to ensure model outputs are helpful, safe, and high-quality. Traditional alignment techniques, such as Direct Preference Optimization (DPO) and Reinforcement Learning from Human Feedback (RLHF), typically rely on "singleton" preferences—comparing two individual samples and identifying the superior one. However, this narrow focus often fails to address systemic issues like a lack of creative variety or persistent demographic biases that only become apparent across a distribution of outputs.

Researchers from Meta GenAI and the University of Chicago propose a shift in this paradigm: moving from single-sample comparisons to multi-sample comparisons. This approach allows models to optimize for "collective" characteristics, such as diversity and fairness, which are inherently distributional properties.

The Multi-Sample Paradigm

Standard post-training methods struggle with distributional flaws. For instance, while a single image of a software engineer may not be "wrong," a model that exclusively generates images of one demographic across hundreds of prompts is biased. Similarly, LLMs often suffer from "low entropy" after alignment—they become repetitive and lose the creative spark found in their pre-trained versions.

The core insight of this research is that these properties cannot be fixed by evaluating one response at a time. Instead, by comparing groups of samples, the alignment process can capture and correct these higher-level distributional characteristics.

Methods: mDPO and mIPO

The authors introduce two novel algorithms, mDPO (Multi-sample DPO) and mIPO (Multi-sample IPO), which extend Direct Alignment from Preference (DAP) methods to handle groups of samples.

Conceptual overview of multi-sample preference optimization across text and image domains.
  • mDPO: This method generalizes the DPO loss. Since the standard DPO loss utilizes a non-linear sigmoid function, the authors employ a biased but low-variance estimator that averages the implicit rewards of samples within a group.
  • mIPO: This generalizes Identity Preference Optimization. Utilizing a squared loss allows for a strictly unbiased stochastic estimator. This enables efficient training where the model learns to elevate the mean reward of a "preferred" group over a "rejected" group while maintaining a diversity-preserving constraint.

Both methods utilize the geometric mean of probabilities for a group, ensuring the loss is not dominated by sample set size and focusing the model on the overall quality of the distribution.

Experimental Evaluation

The effectiveness of multi-sample optimization was tested across several distinct domains:

  1. Random Number Generation (RNG): LLMs often exhibit bias in synthetic tasks (e.g., favoring the number "7"). Using 3,000 paired groups (uniform vs. non-uniform), the researchers trained models to achieve true randomness.
  2. Image Generation (Debiasing): Using Stable Diffusion 1.5, the team curated a dataset of 50 occupations. Preferred groups contained diverse demographic representations, while rejected groups consisted of the biased outputs from the base model.
  3. Creative Fiction: A dataset of over 8,000 prompts was used to generate diverse genre-specific stories. The models were trained to favor the high-quality, diverse outputs of a stronger model (Llama 3-8B) over a weaker one (Llama 2-7B).

Key Insights and Results

The research yielded several significant findings:

  • Distributional Alignment: By optimizing groups, models learn properties invisible at the single-sample level. In RNG tasks, the models learned to match a uniform distribution rather than just picking different numbers.
  • Robustness to Noise: Multi-sample comparisons act as a natural filter for noisy labels. Even if individual samples are mislabeled, the aggregate signal of the group remains accurate, making the training process more robust.
  • Diversity and Quality: In fiction generation, mDPO (with a group size of k=5) significantly outperformed standard DPO in both writing quality (11.48 vs 10.57 on a 14-point scale) and lexical diversity.
  • Bias Reduction: For image generation, mDPO dramatically improved the Simpson Diversity Index for gender (from 0.110 to 0.353) and race (from 0.124 to 0.516).

Limitations and Future Work

While promising, multi-sample optimization increases computational requirements due to the need for multiple samples per prompt. Additionally, while mIPO offers an unbiased estimator, the mDPO estimator remains technically biased due to its log-sigmoid function, though this bias decreases as group size increases. Future research may explore more complex distributional metrics, such as optimal transport, to further refine group-wise alignment.

Conclusion

By shifting the focus from individual samples to distributions, mDPO and mIPO provide a powerful framework for aligning generative models with complex human values like fairness and creativity. While the approach introduces some computational overhead, the gains in diversity and robustness suggest that multi-sample comparison is a vital step forward for robust model alignment.

Summary updated

BibTeX
@misc{wang2024preference,
  author = {Chaoqi Wang and Zhuokai Zhao and Chen Zhu and Karthik Abinav Sankararaman and Michal Valko and Xuefei Cao and Zhaorun Chen and Madian Khabsa and Yuxin Chen and Hao Ma and Sinong Wang},
  title = {{Preference Optimization with Multi-Sample Comparisons}},
  year = {2024},
  eprint = {2410.12138},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.12138},
}
Figure