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

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

Introduction

Aligning Large Language Models (LLMs) with human preferences often involves a trade-off between accuracy and diversity. Standard methods like Reinforcement Learning from Human Feedback (RLHF) and Direct Preference Optimization (DPO) prioritize maximizing a reward signal, which frequently leads to "mode collapse." In this state, models produce a narrow set of safe, high-reward responses but lose the creative variety present in the original pre-trained model. This paper introduces GDPO (GFlowNet-Direct Preference Optimization), an offline alignment method designed to maintain high diversity while ensuring alignment with human values.

The Challenge of Mode Collapse

Standard alignment techniques aim for the single path of maximum reward. While effective for making models "helpful and harmless," these methods often result in repetitive or robotic outputs. DPO, for instance, can overfit preference data, mirroring human biases or producing suboptimal, uniform responses. For creative writing or open-ended dialogue, a variety of high-quality answers is often more desirable than a single "best" answer.

GDPO: Alignment via GFlowNets

GDPO reframes the alignment task as a Bayesian inference problem using Generative Flow Networks (GFlowNets). Unlike standard RL, GFlowNets sample objects with a probability proportional to their reward. This ensures that if multiple helpful responses exist for a prompt, the model learns to generate all of them rather than fixating on one.

Key Innovations

  • Offline Learning: GDPO operates on static preference datasets (pairs of "better" vs. "worse" responses), offering computational efficiency comparable to DPO.
  • Detailed Balance (DB) Objective: By adapting the GFlowNet DB objective to language modeling, the authors simplify the optimization process, ensuring the flow of probability through token generation remains consistent with the reward.
  • Token-wise Reward: The reward function integrates a reference policy to preserve pre-trained knowledge with a preference signal from the dataset.

Experimental Setup

The researchers evaluated GDPO on the OPT-1.3b and OPT-2.7b model families using two benchmarks:

  1. Anthropic HH (Helpful and Harmless): A dialogue-focused alignment dataset.
  2. TLDR (Reddit Summarization): A dataset requiring concise forum post summaries.

Results and Discussion

GDPO demonstrates significant improvements in response diversity without sacrificing alignment quality in dialogue tasks.

Massive Diversity Gains

On the Anthropic HH task, GDPO achieved a diversity score of 69.0 with the OPT-2.7b model, nearly doubling the scores of DPO (35.3) and IPO (32.1). This indicates that GDPO effectively explores diverse semantic paths that remain high-quality.

Win Rate vs Diversity on Anthropic HH (OPT-2.7b). GDPO achieves significantly higher diversity while maintaining competitive win rates.

The Consistency-Diversity Trade-off

The value of diversity varies by task. In dialogue (Anthropic HH), GDPO's variety is a major asset. However, in summarization (TLDR), where factual consistency is paramount, the high diversity of GDPO can lead to a slight decrease in win rates. This suggests that mode collapse in standard methods might be a structural byproduct of their objective functions, which GDPO addresses by making diversity a primary optimization goal.

Win Rate vs Diversity on TLDR-C (OPT-2.7b). In summarization tasks, the trade-off between diversity and win rate is more pronounced.

Conclusion and Future Work

GDPO provides a robust framework for aligning LLMs while preserving their creative variety. While it faces challenges in fact-heavy tasks like summarization, its ability to scale with model size and provide stable alignment makes it a promising alternative to DPO. Future research will explore integrating more complex reward models and testing GDPO in online learning environments.

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