Safety Alignment of LMs via Non-cooperative Games

Anselm Paulus, Ilia Kulikov, Brandon Amos, Rémi Munos, Ivan Evtimov, Kamalika Chaudhuri, Arman Zharmagambetov · DOI

Abstract

Modern Large Language Models (LLMs) are increasingly integrated into critical applications, making their safety alignment paramount. However, current safety training methods often struggle with a "cat-and-mouse" dynamic where models are patched against known attacks but remain vulnerable to novel adversarial prompts. This paper introduces AdvGame, a framework that models safety alignment as a non-cooperative, non-zero-sum game between an Attacker and a Defender. By training these agents concurrently using preference-based reinforcement learning, AdvGame achieves a superior balance between model utility and safety, effectively shifting the Pareto frontier of LLM performance.

Introduction

Despite extensive safety training, modern language models remain vulnerable to "jailbreaking" and adversarial prompts. The standard industry approach is a sequential process: researchers manually collect harmful prompts or use automated tools to find vulnerabilities, then fine-tune the model to resist them. This process is often inefficient, unstable, and prone to "reward hacking," where a model learns to trick the evaluator rather than becoming genuinely safer. The authors argue that existing methods fail to reach the optimal balance between utility (being helpful) and safety (refusing harm).

Methodology: Safety as a Non-Cooperative Game

The core innovation of this work is framing safety as a non-cooperative, non-zero-sum game. Unlike "self-play" where one model plays both roles, AdvGame uses two distinct models:

  1. The Attacker LM: Learns to rephrase harmful queries into sophisticated adversarial attacks.
  2. The Defender LM: Learns to provide safe, helpful responses to any input.
AdvGame training overview: The Attacker proposes modifications to a seed prompt, and the Defender responds. Both are optimized via preference objectives.

Key Technical Components

  • Joint Training: Both agents are updated concurrently via online reinforcement learning, allowing them to adapt to each other's evolving strategies. The authors adapt Direct Preference Optimization (DPO) with Mirror Descent (MD) and Exponential Moving Averages (EMA) to stabilize this competitive training.
  • Preference-Based Rewards: Instead of absolute scores, the system uses a pairwise judge. It asks, "Between these two responses, which is safer/more compliant?" This relative signal is much harder for models to hack than point-wise safety scores.
  • Non-Zero-Sum Objectives: Crucially, they don't just invert the Defender's reward for the Attacker. Instead, they "swap" objectives: the Attacker is rewarded for making the Defender "deflect" on benign queries or "comply" with harmful ones. This prevents the Attacker from winning by simply generating gibberish, forcing it to maintain the original intent of the query.

Experimental Setup

The AdvGame framework was evaluated across multiple model families, including Qwen2.5 and Llama 3.1. Training utilized the WildJailbreak dataset, specifically its subsets of vanilla harmful and benign prompts. Utility was assessed using standard benchmarks such as MMLU, IFBench, AlpacaEval2, and ArenaHard. Safety evaluation included a comprehensive suite: HarmBench, WildJailbreak (WJB), Do Anything Now (DAN), WildGuardTest, and XSTest. To test robustness, models were subjected to state-of-the-art automated attacks like TAP, PAIR, and GCG.

Results and Discussion

The AdvGame framework significantly improved the safety-utility tradeoff. Unlike many safety methods that make models "dumber" or more "preachy" (the so-called "safety tax"), AdvGame often preserved or even increased utility.

Comparison of Utility and Safety: AdvGame preserves or improves utility while drastically reducing the Attack Success Rate (ASR) compared to the original and Self-RedTeam models.

Key Findings

  • Safety Gains: On the HarmBench benchmark for Qwen2.5-7B, the Attack Success Rate (ASR) plummeted from 31.6% (Original) to just 4.7% (AdvGame).
  • Utility Preservation: For example, Qwen2.5-7B's ArenaHard score rose from 55.5 to 61.3 after training.
  • Robustness: AdvGame models showed superior resistance to adaptive attacks compared to the Self-RedTeam baseline. A surprising byproduct is that the trained Attacker LM becomes a highly effective, general-purpose red-teaming agent that can be used to probe other models.

Conclusion

AdvGame introduces a new frontier in safety alignment by leveraging game theory and preference-based reinforcement learning. By moving away from static datasets and absolute scoring toward dynamic competition, it produces models that are both more capable and more resilient. Future work may explore extending this framework to multimodal models and refining reward designs to further mitigate subtle forms of reward hacking.

Summary updated

BibTeX
@inproceedings{paulus2026safety,
  author = {Anselm Paulus and Ilia Kulikov and Brandon Amos and Rémi Munos and Ivan Evtimov and Kamalika Chaudhuri and Arman Zharmagambetov},
  title = {{Safety Alignment of LMs via Non-cooperative Games}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Bve790HQrA},
}
Figure