MART: Melhorando a Segurança de LLMs com Red Team Automático Multi-etapas
MART: Improving LLM Safety with Multi-round Automatic Red-Teaming
November 13, 2023
Autores: Suyu Ge, Chunting Zhou, Rui Hou, Madian Khabsa, Yi-Chia Wang, Qifan Wang, Jiawei Han, Yuning Mao
cs.AI
Resumo
O red-teaming é uma prática comum para mitigar comportamentos inseguros em Modelos de Linguagem de Grande Escala (LLMs), que envolve avaliar minuciosamente os LLMs para identificar possíveis falhas e abordá-las com respostas responsáveis e precisas. Embora eficaz, o red-teaming manual é custoso, e o red-teaming automático existente normalmente descobre riscos de segurança sem resolvê-los. Neste artigo, propomos um método de Red-Teaming Automático Multi-Rodadas (MART), que incorpora tanto a escrita automática de prompts adversariais quanto a geração de respostas seguras, aumentando significativamente a escalabilidade do red-teaming e a segurança do LLM alvo. Especificamente, um LLM adversário e um LLM alvo interagem entre si de forma iterativa, onde o LLM adversário visa gerar prompts desafiadores que eliciam respostas inseguras do LLM alvo, enquanto o LLM alvo é ajustado com dados alinhados à segurança sobre esses prompts adversariais. Em cada rodada, o LLM adversário cria ataques melhores no LLM alvo atualizado, enquanto o LLM alvo também se aprimora por meio do ajuste fino de segurança. Em benchmarks de prompts adversariais, a taxa de violação de um LLM com alinhamento de segurança limitado reduz até 84,7% após 4 rodadas de MART, alcançando desempenho comparável a LLMs com extensa escrita de prompts adversariais. Notavelmente, a utilidade do modelo em prompts não adversariais permanece estável ao longo das iterações, indicando que o LLM alvo mantém um forte desempenho no seguimento de instruções.
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.