MART: Improving LLM Safety with Multi-round Automatic Red-Teaming

Suyu Ge, Chunting Zhou, Rui Hou, Madian Khabsa, Yi-Chia Wang, Qifan Wang, Jiawei Han, Yuning Mao

Abstract

Red-teaming is a common practice for mitigating unsafe behaviors in Large Language Models (LLMs), which involves thoroughly assessing LLMs to identify potential flaws and addressing them with responsible and accurate responses. While effective, manual red-teaming is costly, and existing automatic red-teaming typically discovers safety risks without addressing them. In this paper, we propose a Multi-round Automatic Red-Teaming (MART) method, which incorporates both automatic adversarial prompt writing and safe response generation, significantly increasing red-teaming scalability and the safety of the target LLM. Specifically, an adversarial LLM and a target LLM interplay with each other in an iterative manner, where the adversarial LLM aims to generate challenging prompts that elicit unsafe responses from the target LLM, while the target LLM is fine-tuned with safety aligned data on these adversarial prompts. In each round, the adversarial LLM crafts better attacks on the updated target LLM, while the target LLM also improves itself through safety fine-tuning. On adversarial prompt benchmarks, the violation rate of an LLM with limited safety alignment reduces up to 84.7% after 4 rounds of MART, achieving comparable performance to LLMs with extensive adversarial prompt writing. Notably, model helpfulness on non-adversarial prompts remains stable throughout iterations, indicating the target LLM maintains strong performance on instruction following.

Introduction

Ensuring the safety of Large Language Models (LLMs) is a critical challenge. Developers typically use "red-teaming"—the process of probing models with malicious prompts to identify and patch vulnerabilities—to prevent the generation of toxic or dangerous content. However, manual red-teaming is notoriously expensive, slow, and difficult to scale, often requiring hundreds of human annotators.

While automated red-teaming methods have been developed, they often focus solely on identifying risks rather than providing a mechanism to fix them. Furthermore, as models become safer, their vulnerabilities become more subtle, rendering static adversarial datasets less effective over time. To address these issues, we introduce MART (Multi-round Automatic Red-Teaming), a framework that automates both the discovery and the remediation of safety flaws through an iterative adversarial process.

The MART Framework

MART employs a "cat-and-mouse" game between two models: an adversarial LLM ($\mathcal{M}_{adv}$) and a target LLM ($\mathcal{M}_{tgt}$). The goal is to create a self-sustaining curriculum where the attacker continuously finds new weaknesses and the defender learns to address them.

Overview of the MART framework showing the iterative interplay between adversarial training on successful attacks and safety alignment on successful defenses.

The framework operates in a continuous loop:

  1. Iterative Generation: In each round, $\mathcal{M}_{adv}$ generates new malicious prompts based on successful attacks from the previous round.
  2. Evaluation: Separate Safety and Helpfulness Reward Models (RMs) evaluate the responses generated by $\mathcal{M}_{tgt}$.
  3. Adversarial Update: Prompts that successfully elicit unsafe responses are used to further train $\mathcal{M}_{adv}$, encouraging it to discover more sophisticated jailbreaks.
  4. Target Update: When $\mathcal{M}_{tgt}$ provides a safe and helpful response to an adversarial prompt, that pair is added to a dataset used to fine-tune and harden the target model.

To ensure high-quality training data, the authors use techniques like Context Distillation (using hidden safety prompts) in early rounds and Rejection Sampling in later rounds to select the best possible responses for fine-tuning.

Results and Discussion

The iterative nature of MART proved highly effective at reducing safety violations without sacrificing model utility.

Safety Improvements

After four rounds of MART, the target model's violation rate dropped by 84.7% based on Reward Model evaluation and 53.7% based on human evaluation. As shown in the results, MART significantly outperforms static optimization-based attacks like Greedy Coordinate Gradient (GCG), which tend to lose effectiveness after the target model undergoes initial safety updates.

Unsafe rate reduction over iterations for various methods on (a) adversarial generations and (b) SafeEval evaluation.

Maintaining Helpfulness

A key finding is that MART avoids the "alignment tax"—the tendency for safety-aligned models to become overly conservative and less helpful. The target model's helpfulness scores remained stable, dropping only marginally (3-4%) between the first and fourth iterations. This indicates that the model learned to distinguish between truly harmful prompts and benign instruction following.

Comparison to Human-Red-Teamed Models

MART achieved a safety violation rate of 4.8% on SafeEval, approaching the performance of models that underwent extensive human red-teaming, such as ChatGPT (2.9%) and Llama 2-Chat-70b (2.1%), but with significantly lower manual labor costs.

Conclusion

MART demonstrates that scalable, automated red-teaming is a viable and effective strategy for improving LLM safety. By jointly optimizing the attacker and defender, the system creates a dynamic training environment that adapts to the model's evolving defenses. While highly automated, the authors suggest that a hybrid approach combining MART with human oversight could provide the most robust safety guarantees for future model development.

Summary updated

BibTeX
@inproceedings{ge2024mart,
  author = {Suyu Ge and Chunting Zhou and Rui Hou and Madian Khabsa and Yi-Chia Wang and Qifan Wang and Jiawei Han and Yuning Mao},
  title = {{MART: Improving LLM Safety with Multi-round Automatic Red-Teaming}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=JK2GE7y1CG},
}
Figure