2025-04-22 · 进阶 · 机器学习 · 自然语言处理

RainbowPlus: Enhancing Adversarial Prompt Generation via Evolutionary Quality-Diversity Search

RainbowPlus 通过引入多元素存档和全面评估函数,提高了对抗性提示生成的质量和多样性,从而增强了针对大型语言模型的攻击成功率和提示多样性。

更新于 2025-04-22。作者:Quy-Anh Dang、Chris Ngo、Truong-Son Hy。

中文摘要

大型语言模型(LLMs)展现出非凡的能力,但容易受到针对其漏洞的对抗性提示的影响,从而产生不安全或带有偏见的输出。现有的红队测试方法往往面临可扩展性挑战、资源密集的需求或攻击策略的多样性有限。我们提出了RainbowPlus,这是一个基于进化计算的新颖红队测试框架,通过自适应质量-多样性(QD)搜索来增强对抗性提示的生成,该搜索扩展了诸如MAP-Elites之类的经典进化算法,并针对语言模型进行了创新。RainbowPlus通过使用一个多元素存档来存储多样化的高质量提示,以及一个综合的适应度函数来同时评估多个提示,克服了先前QD方法如Rainbow Teaming中单提示存档和成对比较的约束。将RainbowPlus与QD方法在六个基准数据集和四个开源LLMs(十个开源,两个闭源)上的比较实验表明,它在攻击成功率(ASR)和多样性(Diverse-Score约0.84)方面表现出色,生成的独特提示数量最多可达到100倍(例如,Ministral-8B-Instruct-2410的10418个对100个)。在HarmBench数据集上针对十二个LLMs(十个开源,两个闭源)的九种最先进方法中,RainbowPlus实现了平均ASR为81.1%,超出AutoDAN-Turbo 3.9%,并且速度快9倍(1.45小时对13.50小时)。我们的开源实现促进了LLM安全性的进一步发展,提供了一个可扩展的工具用于漏洞评估。代码和资源可在https://github.com/knoveleng/rainbowplus上公开获取,支持LLM红队测试的可重复性和未来研究。

英文摘要

Large Language Models (LLMs) exhibit remarkable capabilities but are susceptible to adversarial prompts that exploit vulnerabilities to produce unsafe or biased outputs. Existing red-teaming methods often face scalability challenges, resource-intensive requirements, or limited diversity in attack strategies. We propose RainbowPlus, a novel red-teaming framework rooted in evolutionary computation, enhancing adversarial prompt generation through an adaptive quality-diversity (QD) search that extends classical evolutionary algorithms like MAP-Elites with innovations tailored for language models. By employing a multi-element archive to store diverse high-quality prompts and a comprehensive fitness function to evaluate multiple prompts concurrently, RainbowPlus overcomes the constraints of single-prompt archives and pairwise comparisons in prior QD methods like Rainbow Teaming. Experiments comparing RainbowPlus to QD methods across six benchmark datasets and four open-source LLMs demonstrate superior attack success rate (ASR) and diversity (Diverse-Score approx 0.84), generating up to 100 times more unique prompts (e.g., 10,418 vs. 100 for Ministral-8B-Instruct-2410). Against nine state-of-the-art methods on the HarmBench dataset with twelve LLMs (ten open-source, two closed-source), RainbowPlus achieves an average ASR of 81.1%, surpassing AutoDAN-Turbo by 3.9%, and is 9 times faster (1.45 vs. 13.50 hours). Our open-source implementation fosters further advancements in LLM safety, offering a scalable tool for vulnerability assessment. Code and resources are publicly available at https://github.com/knoveleng/rainbowplus, supporting reproducibility and future research in LLM red-teaming.

解读

一句话总结

RainbowPlus 通过引入多元素存档和全面评估函数,提高了对抗性提示生成的质量和多样性,从而增强了针对大型语言模型的攻击成功率和提示多样性。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt