Rainbow Teaming: Open-Ended Generation of Diverse Adversarial Prompts

Mikayel Samvelyan, S. Raparthy, Andrei Lupu, Eric Hambro, Aram H. Markosyan, Manish Bhatt, Yun-ing Mao, Minqi Jiang, Jack Parker-Holder, Jakob Foerster, Tim Rocktaschel, R. Raileanu

arXiv:2402.16822 · 2026-07-27 공개 · arXiv · PDF

question-answering llama-3 adversarial-prompts llama-2 llm-robustness cybersecurity quality-diversity black-box-attack

Abstract

As large language models (LLMs) become increasingly prevalent across many real-world applications, understanding and enhancing their robustness to adversarial attacks is of paramount importance. Existing methods for identifying adversarial prompts tend to focus on specific domains, lack diversity, or require extensive human annotations. To address these limitations, we present Rainbow Teaming, a novel black-box approach for producing a diverse collection of adversarial prompts. Rainbow Teaming casts adversarial prompt generation as a quality-diversity problem and uses open-ended search to generate prompts that are both effective and diverse. Focusing on the safety domain, we use Rainbow Teaming to target various state-of-the-art LLMs, including the Llama 2 and Llama 3 models. Our approach reveals hundreds of effective adversarial prompts, with an attack success rate exceeding 90% across all tested models. Furthermore, we demonstrate that prompts generated by Rainbow Teaming are highly transferable and that fine-tuning models with synthetic data generated by our method significantly enhances their safety without sacrificing general performance or helpfulness. We additionally explore the versatility of Rainbow Teaming by applying it to question answering and cybersecurity, showcasing its potential to drive robust open-ended self-improvement in a wide range of applications.

한국어 요약

한 줄 요약

Rainbow Teaming은 LLM의 안전성을 진단하고 향상시키기 위해 품질-다양성 검색을 기반으로 한 적대적 프롬프트를 자동 생성하는 새로운 블랙박스 접근법이다.

핵심 기여도

핵심 아이디어

Rainbow Teaming은 기존 적대적 프롬프트 생성 방법이 특정 도메인에 제한적이고, 인간 주도적 또는 다양성 부족한 문제를 해결하기 위해 품질-다양성(QD) 검색을 도입한 새로운 접근법이다. 이는 적대적 프롬프트 생성을 QD 문제로 재구성하여, 공격의 효과성과 다양성을 동시에 최적화한다. 핵심 아이디어는 MAP-Elites 알고리즘을 기반으로, 프롬프트를 "공격 스타일", "위험 범주", "길이" 등의 특성에 따라 분류된 격자 공간에 저장하며, 높은 품질의 프롬프트를 반복적으로 업데이트하는 방식이다. 이는 기존 레드팀링에서 흔히 발생하는 다양성-성공률 간의 트레이드오프를 완화하며, 보다 포괄적인 취약점을 탐지할 수 있도록 한다.

기술적 접근법

주요 결과

의의 및 한계

Rainbow Teaming은 LLM의 안전성 진단 및 향상에 있어 기존 레드팀링과 비교해 더 높은 효과성과 다양성을 제공하며, 합성 데이터를 활용한 미세조정을 통해 안전성 향상에 기여한다. 또한, 질문 응답, 사이버보안 등 다양한 도메인에서 적용 가능성을 보여주며, LLM의 안정성 향상에 기여할 잠재력을 가진다. 그러나, 생성된 프롬프트가 특정 모델에 과도하게 의존할 수 있으며, 유사도 필터링이 필요하다는 점에서 한계가 있다. 또한, 계산 비용이 높아 대규모 실험에는 제약이 있을 수 있다.

실용적 활용

Rainbow Teaming은 LLM의 안전성 테스트 및 향상에 활용될 수 있으며, 특히 사이버보안, 질문 응답, 콘텐츠 필터링 등 다양한 분야에서 적대적 입력을 탐지하고 모델의 안정성을 강화하는 데 유용하다. 또한, 합성 데이터 생성을 통한 모델 재교육에도 활용 가능하다.