FLRT:流畅的学生-教师红队测试
FLRT: Fluent Student-Teacher Redteaming
AI总结:
本文提出 FLRT 方法,通过基于蒸馏的优化和流畅性约束改进 GCG 与 BEAST,生成人类可读的越狱提示,在多个安全微调模型上实现高攻击成功率并具备跨任务与黑盒迁移能力。
摘要:
许多公开可用的语言模型已经过安全微调,以降低生成有毒或引发责任文本的可能性。为了对这些模型进行红队测试或越狱以使其遵从有毒请求,用户和安全分析师开发了对抗性提示技术。一种攻击方法是对提示应用离散优化技术。然而,由此产生的攻击字符串通常是乱码文本,由于测得的高困惑度而容易被防御者过滤,并且可能在未见过的任务和/或经过良好微调的模型上失败。在这项工作中,我们改进了现有算法(主要是 GCG 和 BEAST),以开发针对 Llama-2 和 Phi-3 等安全微调模型的强大且流畅的攻击。我们的技术围绕一种新的基于蒸馏的方法,该方法鼓励受害模型模拟一个被毒化的微调模型,无论是在输出概率还是内部激活方面。为了鼓励人类流畅的攻击,我们在目标函数中加入了多模型困惑度惩罚和重复惩罚。我们还通过允许令牌插入、令牌交换和令牌删除以及使用更长的攻击序列来增强优化器强度。由此产生的过程能够可靠地越狱最困难的目标模型,其提示看起来与人类编写的提示相似。在 Advbench 上,我们对 Llama-2-7B、Llama-3-8B 和 Vicuna-7B 实现了 >93% 的攻击成功率,同时保持模型测得的困惑度 <33;我们对 Phi-3 实现了 95% 的攻击成功率,尽管困惑度更高。我们还发现了一个通用优化的单一流畅提示,该提示在 Llama-2-7B、Phi-3-mini 和 Vicuna-7B 上对先前未见过的任务诱导出 >88% 的遵从率,并能迁移到其他黑盒模型。
英文摘要:
Many publicly available language models have been safety tuned to reduce the likelihood of toxic or liability-inducing text. To redteam or jailbreak these models for compliance with toxic requests, users and security analysts have developed adversarial prompting techniques. One attack method is to apply discrete optimization techniques to the prompt. However, the resulting attack strings are often gibberish text, easily filtered by defenders due to high measured perplexity, and may fail for unseen tasks and/or well-tuned models. In this work, we improve existing algorithms (primarily GCG and BEAST) to develop powerful and fluent attacks on safety-tuned models like Llama-2 and Phi-3. Our technique centers around a new distillation-based approach that encourages the victim model to emulate a toxified finetune, either in terms of output probabilities or internal activations. To encourage human-fluent attacks, we add a multi-model perplexity penalty and a repetition penalty to the objective. We also enhance optimizer strength by allowing token insertions, token swaps, and token deletions and by using longer attack sequences. The resulting process is able to reliably jailbreak the most difficult target models with prompts that appear similar to human-written prompts. On Advbench we achieve attack success rates $>93$% for Llama-2-7B, Llama-3-8B, and Vicuna-7B, while maintaining model-measured perplexity $<33$; we achieve $95$% attack success for Phi-3, though with higher perplexity. We also find a universally-optimized single fluent prompt that induces $>88$% compliance on previously unseen tasks across Llama-2-7B, Phi-3-mini and Vicuna-7B and transfers to other black-box models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。