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

使用投影梯度下降攻击大型语言模型

Attacking Large Language Models with Projected Gradient Descent

Technical University of Munich(慕尼黑工业大学)

Simon Geisler, Tom Wollschläger, M. H. I. Abdalla, Johannes Gasteiger, Stephan Günnemann

AI总结:

针对LLM离散对抗攻击计算成本过高的问题,提出基于连续松弛输入提示词的PGD攻击方法,通过控制松弛误差大幅提升效力,比现有离散优化快达一个数量级。

摘要:

当前的LLM对齐方法很容易被专门制作的对抗性提示词破坏。虽然使用离散优化制作对抗性提示词非常有效,但此类攻击通常需要超过100,000次LLM调用。这种高计算成本使其不适用于定量分析和对抗性训练等场景。为解决此问题,我们重新审视了在连续松弛输入提示词上的投影梯度下降(PGD)。尽管先前使用普通基于梯度攻击的尝试基本失败,但我们表明,仔细控制连续松弛引入的误差极大地提升了其效力。我们的LLM PGD在实现同样毁灭性攻击结果时,比最先进的离散优化快达一个数量级。

英文摘要:

Current LLM alignment methods are readily broken through specifically crafted adversarial prompts. While crafting adversarial prompts using discrete optimization is highly effective, such attacks typically use more than 100,000 LLM calls. This high computational cost makes them unsuitable for, e.g., quantitative analyses and adversarial training. To remedy this, we revisit Projected Gradient Descent (PGD) on the continuously relaxed input prompt. Although previous attempts with ordinary gradient-based attacks largely failed, we show that carefully controlling the error introduced by the continuous relaxation tremendously boosts their efficacy. Our PGD for LLMs is up to one order of magnitude faster than state-of-the-art discrete optimization to achieve the same devastating attack results.

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

↑