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

ASETF:一种通过翻译后缀嵌入对LLMs进行越狱攻击的新方法

ASETF: A Novel Method for Jailbreak Attack on LLMs through Translate Suffix Embeddings

Institute of Artificial Intelligence, Beihang University(北京航空航天大学人工智能研究院);The CoAI group, DCST, Tsinghua University(清华大学DCST中心CoAI组);Zhongguancun Laboratory(中关村实验室)

Hao Wang, Hao Li, Minlie Huang, Lei Sha

AI总结:

本文提出对抗后缀嵌入翻译框架(ASETF),将连续对抗后缀嵌入转化为连贯文本,显著降低计算开销并提升攻击成功率,增强文本流畅性,且能生成可转移的对抗后缀攻击黑盒LLMs。

摘要:

大型语言模型(LLMs)的安全防御方法仍然受限,因为危险提示词是人工策划的,仅涵盖少数已知攻击类型,无法跟上不断涌现的新变种。最近的研究发现,在有害指令后附加后缀可以攻破LLMs的防御并导致危险输出。然而,类似于传统的文本对抗攻击,这种方法虽然有效,但受到离散token挑战的限制。这种基于梯度的离散优化攻击需要超过100,000次LLM调用,并且由于对抗后缀不可读,它相对容易被困惑度过滤器等常见防御方法识破。为了应对这一挑战,本文提出了一种对抗后缀嵌入翻译框架(ASETF),旨在将连续的对抗后缀嵌入转换为连贯且可理解的文本。该方法大大减少了攻击过程中的计算开销,并有助于自动生成多个对抗样本,这些样本可用作加强LLMs安全防御的数据。实验评估在Llama2、Vicuna和其他著名LLMs上进行,使用了来自Advbench数据集的有害指令。结果表明,我们的方法显著减少了对抗后缀的计算时间,并对现有技术实现了更高的攻击成功率,同时显著增强了提示词的文本流畅性。此外,我们的方法可以泛化为一种更广泛的方法,用于生成可转移的对抗后缀,能够成功攻击多个LLMs,甚至是黑盒LLMs,如ChatGPT和Gemini。

英文摘要:

The safety defense methods of Large language models(LLMs) stays limited because the dangerous prompts are manually curated to just few known attack types, which fails to keep pace with emerging varieties. Recent studies found that attaching suffixes to harmful instructions can hack the defense of LLMs and lead to dangerous outputs. However, similar to traditional text adversarial attacks, this approach, while effective, is limited by the challenge of the discrete tokens. This gradient based discrete optimization attack requires over 100,000 LLM calls, and due to the unreadable of adversarial suffixes, it can be relatively easily penetrated by common defense methods such as perplexity filters. To cope with this challenge, in this paper, we proposes an Adversarial Suffix Embedding Translation Framework (ASETF), aimed at transforming continuous adversarial suffix embeddings into coherent and understandable text. This method greatly reduces the computational overhead during the attack process and helps to automatically generate multiple adversarial samples, which can be used as data to strengthen LLMs security defense. Experimental evaluations were conducted on Llama2, Vicuna, and other prominent LLMs, employing harmful directives sourced from the Advbench dataset. The results indicate that our method significantly reduces the computation time of adversarial suffixes and achieves a much better attack success rate to existing techniques, while significantly enhancing the textual fluency of the prompts. In addition, our approach can be generalized into a broader method for generating transferable adversarial suffixes that can successfully attack multiple LLMs, even black-box LLMs, such as ChatGPT and Gemini.

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

↑