arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.08246cs.LG
收藏

大语言模型的文本扩散红队测试:利用邻近约束揭示有害行为

Text-Diffusion Red-Teaming of Large Language Models: Unveiling Harmful Behaviors with Proximity Constraints

Max Planck Institute for Software Systems(马克斯·普朗克软件系统研究所);Saarland University(萨尔大学)

Jonathan Nöther, Adish Singla, Goran Radanović

AI总结:

针对大语言模型定向安全评估需求,提出带邻近约束的文本扩散黑盒红队方法DART,通过嵌入空间扰动控制提示词改动,在挖掘邻近参考提示的有害输入上效果优于现有方法。

摘要:

近期研究提出了自动化红队测试方法,用于检测目标大语言模型(LLM)的安全漏洞。这类方法借助红队LLM挖掘能诱发目标LLM产生有害行为的输入。本文研究可实现定向安全评估的红队测试策略,提出一种带邻近约束的红队优化框架,要求挖掘出的提示词必须与给定数据集的参考提示词相似。该数据集作为挖掘提示词的模板,将测试用例的搜索锚定在特定主题、写作风格或有害行为类型上。研究发现,现有自回归模型架构在该场景下表现不佳,因此本文提出一种受文本扩散模型启发的黑盒红队方法:Diffusion for Auditing and Red-Teaming(DART,审计与红队扩散模型)。DART通过在嵌入空间中扰动参考提示词对其进行修改,可直接控制引入的改动量。本文通过将该方法的效果与基于模型微调、零样本及少样本提示的现有方法进行对比,开展了系统评估。结果表明,DART在挖掘与参考提示词高度邻近的有害输入方面,效果显著更优。

英文摘要:

Recent work has proposed automated red-teaming methods for testing the vulnerabilities of a given target large language model (LLM). These methods use red-teaming LLMs to uncover inputs that induce harmful behavior in a target LLM. In this paper, we study red-teaming strategies that enable a targeted security assessment. We propose an optimization framework for red-teaming with proximity constraints, where the discovered prompts must be similar to reference prompts from a given dataset. This dataset serves as a template for the discovered prompts, anchoring the search for test-cases to specific topics, writing styles, or types of harmful behavior. We show that established auto-regressive model architectures do not perform well in this setting. We therefore introduce a black-box red-teaming method inspired by text-diffusion models: Diffusion for Auditing and Red-Teaming (DART). DART modifies the reference prompt by perturbing it in the embedding space, directly controlling the amount of change introduced. We systematically evaluate our method by comparing its effectiveness with established methods based on model fine-tuning and zero- and few-shot prompting. Our results show that DART is significantly more effective at discovering harmful inputs in close proximity to the reference prompt.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑