Closing the Distribution Gap in Adversarial Training for LLMs
Organizations: Technical University of Munich, Germany.
Abstract
Adversarial training for LLMs is one of the most promising methods to reliably improve robustness against adversaries. However, despite significant progress, models remain vulnerable to simple in-distribution exploits, such as rewriting prompts in the past tense or translating them into other languages. We argue that this persistent fragility stems from a fundamental limitation in current adversarial training algorithms: they minimize adversarial loss on their training set but inadequately cover the data distribution, resulting in vulnerability to seemingly simple attacks. To bridge this gap, we propose Distributional Adversarial Training, DAT. We leverage Diffusion LLMs to approximate the true joint distribution of prompts and responses, enabling generation of diverse, high-likelihood samples that address generalization failures. By combining optimization over the data distribution provided by the diffusion model with continuous adversarial training, DAT achieves substantially higher adversarial robustness than previous methods.
Figures & tables
| Model | Method | ASR | Utility | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| GCG | Pair | BoN | Direct | Inpainting | BoA | XSTest | MMLU | ARCe | ARCc | ||
| Llama3-8B | Default | ||||||||||
| CAT | |||||||||||
| LAT | |||||||||||
| CB | |||||||||||
| MixAT-GCG | |||||||||||
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Base Model | Adapter | HF Source |
| Llama3-8B | – | meta-llama/Meta-Llama-3-8B-Instruct |
| CB | GraySwanAI/Llama-3-8B-Instruct-RR | |
| LAT | LLM-LAT/robust-llama3-8b-instruct | |
| MixAT-GCG | INSAIT-Institute/Llama3-8B-MixAT-GCG | |
| Qwen2.5-14B | – | Qwen/Qwen2.5-14B-Instruct |
| MixAT-GCG | INSAIT-Institute/Qwen-14B-MixAT-GCG |
| Hyperparameter | Llama3-8B | Qwen2.5-14B |
|---|---|---|
| Learning rate | ||
| Batch size | 8 | 8 |
| Number of epochs | 6 | 6 |
| Optimizer | AdamW | AdamW |
| Adv. learning rate | ||
| Attack-steps | 20 | 40 |
| Hyperparameter | Llama3-8B | Qwen2.5-14B |
|---|---|---|
| Learning rate | ||
| Batch size | 16 | 16 |
| Number of epochs | 6 | 6 |
| Optimizer | AdamW | AdamW |
| Attack-radius | ||
| Adv. learning rate |
Adversarial Training
Adversarial training improves model reliability by training on examples or conditions designed to expose weaknesses.
See all 183 papers