GDPO: Learning to Directly Align Language Models with Diversity Using GFlowNets

Oh Joon Kwon, Daiki E. Matsunaga, Kee-Eung Kim

This paper, presented at EMNLP 2024, introduces GDPO (GFlowNet-Direct Preference Optimization), a novel approach to aligning Large Language Models (LLMs) with human preferences. While existing methods like DPO often "overfit" to a single type of response, GDPO leverages the mathematical framework of GFlowNets to ensure models generate diverse, creative, and high-quality outputs.

The Problem: Mode Collapse in Alignment

Aligning LLMs with human preferences usually involves Reinforcement Learning from Human Feedback (RLHF). While Direct Preference Optimization (DPO) simplified this by skipping complex reward modeling, it introduced a "mode-seeking" problem. DPO tends to overfit the reward signal, causing the model to collapse onto a few repetitive, "safe" responses. This lack of diversity is a major hurdle for creative applications and can lead to the under-representation of different viewpoints. The authors argue that alignment should model the entire distribution of good responses rather than just finding the single maximum reward.

Methodology: GFlowNet-Direct Preference Optimization

GDPO is an offline alignment method that uses Generative Flow Networks (GFlowNets) to sample responses in proportion to their reward. Key technical contributions include:

  • Detailed Balance (DB) Objective: Adapting the GFlowNet condition to the token-wise Markov Decision Process of language generation, simplifying the training objective for LMs.
  • Direct Preference Integration: Deriving reward signals directly from offline preference datasets without needing a separate reward model.
  • Token-wise Reward Modeling: Defining a reward function that combines a reference policy with a preference term to assign credit to tokens in preferred responses.
  • Diversity-Seeking RL: Treating alignment as a Bayesian inference problem for "amortized sampling" of the reward distribution.

Key Results

The researchers evaluated GDPO using the OPT family of models (1.3B and 2.7B parameters) on the Anthropic HH (Helpful and Harmless) dialogue task and the TLDR Reddit summarization task.

Superior Diversity in Dialogue

In dialogue tasks, GDPO achieved significantly higher semantic diversity than DPO, PPO, and other baselines. For example, on OPT-2.7B, GDPO's diversity score reached 69.0, while DPO trailed at 35.3. Crucially, GDPO maintained win rates comparable to high-performing methods like DPO and IPO.

Win Rate vs. Diversity on the Anthropic HH dataset for OPT-1.3b (left) and OPT-2.7b (right) models.

Task Sensitivity and Robustness

The benefits of GDPO were found to be more pronounced in open-ended dialogue than in summarization. In the TLDR task, where consistency is often prioritized, the diversity gains were less critical. However, GDPO proved remarkably robust to sampling parameters; unlike DPO, which loses quality when temperature is increased to force diversity, GDPO remains coherent and aligned.

Performance comparison on TLDR summarization tasks (S and C variants) across different model scales.

Conclusion and Future Work

GDPO demonstrates that alignment is better served by sampling proportionally to reward. By building diversity into the fundamental objective, GDPO avoids the mode collapse common in standard RLHF methods. Future work may explore online GFlowNet training and integrating multi-dimensional reward models to further enhance the framework's capabilities.

Summary updated

BibTeX
@inproceedings{kwon2024gdpo,
  author = {Oh Joon Kwon and Daiki E. Matsunaga and Kee-Eung Kim},
  title = {{GDPO: Learning to Directly Align Language Models with Diversity Using GFlowNets}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.951},
}
Figure