MART: Migliorare la Sicurezza dei Modelli Linguistici con il Red-Teaming Automatico Multi-round
MART: Improving LLM Safety with Multi-round Automatic Red-Teaming
November 13, 2023
Autori: Suyu Ge, Chunting Zhou, Rui Hou, Madian Khabsa, Yi-Chia Wang, Qifan Wang, Jiawei Han, Yuning Mao
cs.AI
Abstract
Il red-teaming è una pratica comune per mitigare i comportamenti non sicuri nei Large Language Models (LLM), che consiste nel valutare accuratamente gli LLM per identificare potenziali difetti e affrontarli con risposte responsabili e accurate. Sebbene efficace, il red-teaming manuale è costoso, e il red-teaming automatico esistente tipicamente scopre rischi per la sicurezza senza affrontarli. In questo articolo, proponiamo un metodo di Multi-round Automatic Red-Teaming (MART), che incorpora sia la scrittura automatica di prompt avversari sia la generazione di risposte sicure, aumentando significativamente la scalabilità del red-teaming e la sicurezza dell'LLM target. Nello specifico, un LLM avversario e un LLM target interagiscono tra loro in modo iterativo, dove l'LLM avversario mira a generare prompt impegnativi che suscitano risposte non sicure dall'LLM target, mentre l'LLM target viene perfezionato con dati allineati alla sicurezza su questi prompt avversari. In ogni round, l'LLM avversario elabora attacchi migliori sull'LLM target aggiornato, mentre l'LLM target migliora anche se stesso attraverso il perfezionamento della sicurezza. Su benchmark di prompt avversari, il tasso di violazione di un LLM con un allineamento di sicurezza limitato si riduce fino all'84,7% dopo 4 round di MART, raggiungendo prestazioni comparabili a quelle di LLM con un'ampia scrittura di prompt avversari. È importante notare che l'utilità del modello su prompt non avversari rimane stabile durante le iterazioni, indicando che l'LLM target mantiene prestazioni solide nel seguire le istruzioni.
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.