TL;DR
Standard preference optimization methods for language models rely on token-level constraints that fail to capture true semantic similarity. To bridge this gap, the authors introduce GANPO (Generative Adversarial Network Preference Optimization), a plug-and-play regularizer that operates directly on a model's internal latent representations. By using a dual-discriminator adversarial framework, GANPO provides dense structural feedback that significantly improves alignment quality, controls verbosity, and enhances robustness to decoding noise.
What Problem Does This Paper Address?
When aligning Large Language Models (LLMs) with human preferences using offline methods like Direct Preference Optimization (DPO), algorithms typically use token-level regularization (like KL divergence) to keep the updated policy model close to a reference model. However, token-space similarity is a poor proxy for actual behavioral or semantic similarity.
As shown in the paper's examples, two sentences can be completely different at the token level but mean the exact same thing (e.g., "Hi there" vs. "Good morning to you"). Conversely, a single character change can drastically alter meaning while remaining close in token space (e.g., "Hi there" vs. "Hit there").
This misalignment in token space often causes models to exploit surface-level patterns—leading to issues like excessive verbosity (reward hacking) and severe performance degradation when generating text under high-entropy (noisy) sampling conditions.
Methods
The authors propose GANPO, which shifts regularization from discrete token probabilities to the continuous latent space of the LLM's final hidden states. Because latent representations do not have explicit probability densities, standard divergence measures cannot be computed directly.
To circumvent this, GANPO leverages a Generative Adversarial Network (GAN) approach based on the variational formulation of the Jensen-Shannon Divergence. The core architecture consists of:
- A Quad-Representation Framework: At each training step, the method extracts four latent representations: chosen and rejected responses from both the reference model and the active policy model.
- Dual Relativistic Discriminators: Instead of a single discriminator, GANPO introduces two Transformer-based discriminators ($\phi_{pos}$ and $\phi_{neg}$) to separately model the distinct topological manifolds of "good" (preferred) and "bad" (rejected) representations. They use a relativistic average GAN (RaGAN) objective to compare representations comparatively rather than in isolation.
- Plug-and-Play Integration: The adversarial loss acts as a regularizer ($\mathcal{L}_{adv}$) that can be directly added to existing offline preference optimization objectives like DPO or SimPO.
Datasets
- Training: The models were trained on the UltraFeedback dataset, a large-scale preference dataset widely used for instruction-following and dialogue alignment.
- Evaluation: General instruction-following was evaluated using AlpacaEval 2.0 (with GPT-4 as an oracle judge). Structural adherence and robustness were tested via IFEval (Instruction Following Evaluation). Downstream capabilities were verified using standard benchmarks: GSM8K (Math), MMLU (Knowledge), ANLI (Reasoning), and TruthfulQA (Factuality).
Key Insights and Ideas
- Latent Space as a Semantic Anchor: Internal hidden states encode dense, structured information about semantics and reasoning. Regularizing here forces the model to preserve the global semantic structure of natural language acquired during pre-training.
- Mitigating Verbosity Bias: Unlike token-level objectives that often inadvertently reward longer responses, GANPO's structural feedback focuses on semantic content, improving alignment quality without inflating response length.
- Resilience to Generation Noise: Token-level constraints are highly sensitive to greedy decoding paths. By smoothing the latent manifold, GANPO ensures that even when the model deviates from the optimal token path due to stochastic sampling, it remains within a high-quality semantic zone.
Key Results
GANPO demonstrated consistent improvements across multiple model architectures (Gemma2-2B-it and Llama3-8B-Instruct) and base objectives:
- AlpacaEval 2.0: GANPO achieved noticeable gains in length-controlled (LC) win rates. For Gemma2-2B-it, it boosted DPO's LC win rate by +1.41% and SimPO's by +0.71% while keeping average response lengths virtually identical.
- Robustness to Stochastic Decoding: When stress-tested across higher sampling temperatures ($T \in [0.0, 1.5]$), standard DPO suffered from severe structural collapse. GANPO maintained high instruction adherence and win rates even in high-noise regimes.
- Downstream Tasks: The adversarial objective did not cause catastrophic forgetting; performance on MMLU, GSM8K, and TruthfulQA remained stable or slightly improved.
- Efficiency: The architecture introduces minimal computational overhead, increasing training time by less than 4% for DPO on Gemma2-2B-it.
Limitations and Future Work
- Discriminator Overhead: GANPO requires maintaining and updating separate discriminator models alongside the policy, which increases memory requirements during training.
- Anchor Dependency: The training stability relies on the reference model defining a well-formed target manifold. If the initial Supervised Fine-Tuning (SFT) model has fundamental topological flaws in its latent space, GANPO will inherit them.
- Future Directions: The authors suggest extending GANPO to online "Self-Play" frameworks where the discriminator evaluates the model's own live rollouts. Additionally, because latent spaces are inherently modality-agnostic, this framework holds strong potential for aligning Vision-Language Models (VLMs).
Summary updated