arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2402.09674cs.CLcs.AIcs.CRcs.LG
收藏

PAL:针对大型语言模型的代理引导黑盒攻击

PAL: Proxy-Guided Black-Box Attack on Large Language Models

UC Berkeley(加州大学伯克利分校);New York University(纽约大学)

Chawin Sitawarin, Norman Mu, David Wagner, Alexandre Araujo

AI总结:

本文提出PAL,首个在纯黑盒查询设置下基于优化的LLM攻击方法,利用代理模型和专为现实API设计的损失函数,在GPT-3.5-Turbo上实现84%攻击成功率,并提出了GCG++和RAL基线,助力LLM安全测试。

摘要:

大型语言模型(LLMs)在最近几个月中迅速普及,但它们在被操纵时表现出了令人担忧的生成有害内容的能力。虽然安全微调等技术旨在最小化有害使用,但最近的研究表明,LLMs 仍然容易受到诱导产生有害响应的攻击。在这项工作中,我们引入了针对 LLMs 的代理引导攻击(PAL),这是在纯黑盒查询设置下首次针对 LLMs 的基于优化的攻击。具体而言,它依赖一个代理模型来引导优化,并使用专为现实世界 LLM APIs 设计的复杂损失函数。我们的攻击在 GPT-3.5-Turbo 上实现了 84% 的攻击成功率(ASR),在 Llama-2-7B 上为 48%,而当前最优技术的成功率仅为 4%。我们还提出了 GCG++,这是对 GCG 攻击的改进,在白盒 Llama-2-7B 上达到了 94% 的 ASR,以及针对 LLMs 的随机搜索攻击(RAL),这是一个强大但简单的基于查询攻击的基线。我们相信这项工作中提出的技术将能够对 LLMs 进行更全面的安全测试,并从长远来看,有助于开发更好的安全防护机制。代码可在 https://github.com/chawins/pal 找到。

英文摘要:

Large Language Models (LLMs) have surged in popularity in recent months, but they have demonstrated concerning capabilities to generate harmful content when manipulated. While techniques like safety fine-tuning aim to minimize harmful use, recent works have shown that LLMs remain vulnerable to attacks that elicit toxic responses. In this work, we introduce the Proxy-Guided Attack on LLMs (PAL), the first optimization-based attack on LLMs in a black-box query-only setting. In particular, it relies on a surrogate model to guide the optimization and a sophisticated loss designed for real-world LLM APIs. Our attack achieves 84% attack success rate (ASR) on GPT-3.5-Turbo and 48% on Llama-2-7B, compared to 4% for the current state of the art. We also propose GCG++, an improvement to the GCG attack that reaches 94% ASR on white-box Llama-2-7B, and the Random-Search Attack on LLMs (RAL), a strong but simple baseline for query-based attacks. We believe the techniques proposed in this work will enable more comprehensive safety testing of LLMs and, in the long term, the development of better security guardrails. The code can be found at https://github.com/chawins/pal.

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

↑