TL;DR
This paper introduces AdvGame, a novel approach to making language models safer by training an "Attacker" LM and a "Defender" LM together in a non-cooperative game. This joint training, using preference-based rewards, results in a Defender LM that is both more helpful and more resistant to harmful prompts, while the Attacker LM becomes a powerful tool for finding new safety vulnerabilities.
What Problem Does This Paper Address?
The core challenge in AI alignment is ensuring that powerful language models (LMs) are safe and don't produce harmful, inappropriate, or unsafe outputs, all while remaining useful and helpful. Existing methods often involve a "cat-and-mouse" game where LMs are trained to defend against known adversarial attacks. However, these methods can be inefficient and the resulting models are often not robust against novel or adaptive attacks. This paper tackles the problem of creating LMs that are inherently more resilient to a wider range of safety threats by developing a more dynamic and sophisticated adversarial training process.
Methods
AdvGame frames safety alignment as a non-zero-sum game between two LMs: an Attacker LM and a Defender LM. Instead of sequential training, both LMs are trained jointly and online, meaning they adapt to each other's evolving strategies in real-time. This is achieved through reinforcement learning. A key innovation is the use of a preference-based reward signal derived from pairwise comparisons of model outputs, rather than point-wise scores. This approach is more robust to "reward hacking" (where models exploit flaws in the reward system) and provides richer supervision. The authors propose specific RL recipes, AdvGame-DPO-MD and AdvGame-IPO-MD, which leverage these preference signals and employ techniques like Exponential Moving Averages (EMA) for stable off-policy generation.
Datasets
The paper uses the WildJailbreak dataset for training, which includes both harmful and benign prompts. For evaluation, they utilize several safety benchmarks:
- HarmBench: Contains both vanilla and adversarial harmful prompts.
- WildJailBreak (WJB): Includes harmful and benign prompts.
- Do Anything Now (DAN)
- WildGuardTest
- XSTest
They also report results on general knowledge and instruction-following benchmarks like MMLU, TruthfulQA, ARC-Challenge, and BBH to assess utility.
Key Insights and Ideas
- Joint, Online Training is Key: The "cat-and-mouse" game of sequential training is less effective than a dynamic, co-evolutionary process where both attacker and defender learn simultaneously. This better reflects the real-world arms race in AI safety.
- Preference-Based Rewards are More Robust: Using pairwise comparisons (e.g., "Response A is better than Response B") is more reliable than scalar scores for training LMs, especially for subjective tasks like safety, as it's harder for models to exploit.
- Non-Zero-Sum Game Dynamics: Framing the problem as a non-zero-sum game, where the attacker's goal isn't simply to cause the defender to fail but to trick it into misclassifying prompt types, leads to more robust defenses.
- The Attacker Becomes a Powerful Red-Teaming Tool: The trained Attacker LM itself becomes a valuable asset for discovering new vulnerabilities in other models, acting as a general-purpose red-teaming agent.
- EMA for Stability: Using Exponential Moving Averages for model parameters significantly improves training stability, especially compared to on-policy methods.
Key Results
- Improved Safety and Utility Balance: AdvGame-DPO-MD achieves a better balance between safety (lower attack success rate) and utility (preserving general knowledge and instruction-following) compared to baselines like Self-RedTeam. For example, on Qwen2.5-7B, AdvGame-DPO-MD achieved an ASR of 4.7% on HarmBench, a significant improvement over the original model's 31.6%.
- Robustness to Adaptive Attacks: The Defender models trained with AdvGame show significantly greater robustness against adaptive attacks (like PAIR, TAP, GCG) compared to baseline methods.
- Effective Red-Teaming Attacker: The trained Attacker LM demonstrates performance comparable to strong adaptive attack methods, achieving an ASR of 55.6% on Qwen2.5-7B.
- Preference Judges Outperform Point-wise: Pairwise preference judges lead to better safety and utility outcomes than point-wise judges, suggesting they are less susceptible to reward hacking.
Limitations and Future Work
- Focus on Natural Language Attacks: The current AdvGame approach primarily focuses on natural language attacks that humans can understand, deliberately excluding non-readable attacks (e.g., GCG).
- Potential for Reward Hacking: While preference-based rewards are more robust, the authors acknowledge that point-wise judges can still be exploited, and better reward models might be needed.
- GRPO Instability: The GRPO variant of AdvGame showed unstable training dynamics and less reliable safety compared to DPO and IPO variants.
- Future Work: The authors suggest exploring improved reward model designs and extending the approach to other attack modalities to further enhance robustness and applicability. They also note that while GRPO showed limitations, better hyperparameter tuning or reward design might improve its performance.
Summary updated