MART : Améliorer la sécurité des LLM grâce à un red teaming automatique multi-tours
MART: Improving LLM Safety with Multi-round Automatic Red-Teaming
November 13, 2023
Auteurs: Suyu Ge, Chunting Zhou, Rui Hou, Madian Khabsa, Yi-Chia Wang, Qifan Wang, Jiawei Han, Yuning Mao
cs.AI
Résumé
Le red teaming est une pratique courante pour atténuer les comportements dangereux dans les grands modèles de langage (LLMs), qui consiste à évaluer minutieusement les LLMs afin d'identifier les failles potentielles et à y répondre de manière responsable et précise. Bien qu'efficace, le red teaming manuel est coûteux, et les méthodes automatiques existantes découvrent généralement les risques de sécurité sans les résoudre. Dans cet article, nous proposons une méthode de red teaming automatique multi-tours (MART), qui intègre à la fois la génération automatique de prompts adverses et la génération de réponses sûres, augmentant ainsi considérablement la scalabilité du red teaming et la sécurité du LLM cible. Plus précisément, un LLM adverse et un LLM cible interagissent de manière itérative, où le LLM adverse vise à générer des prompts difficiles qui suscitent des réponses dangereuses du LLM cible, tandis que ce dernier est affiné avec des données alignées sur la sécurité pour ces prompts adverses. À chaque tour, le LLM adverse conçoit de meilleures attaques sur le LLM cible mis à jour, tandis que le LLM cible s'améliore également grâce à l'affinage de sécurité. Sur des benchmarks de prompts adverses, le taux de violation d'un LLM avec un alignement de sécurité limité diminue jusqu'à 84,7 % après 4 tours de MART, atteignant des performances comparables à celles des LLMs avec une génération extensive de prompts adverses. Notamment, l'utilité du modèle sur les prompts non adverses reste stable tout au long des itérations, indiquant que le LLM cible maintient de solides performances dans le suivi des instructions.
English
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.