Skip to main content
QUICK REVIEW

[论文解读] Baseline Defenses for Adversarial Attacks Against Aligned Language Models

Neel Jain, Avi Schwarzschild|arXiv (Cornell University)|Sep 1, 2023
Adversarial Robustness in Machine LearningComputer Science被引用 35
一句话总结

这篇论文在对齐的LLMs上,在白盒和灰盒设定中,对三类基线防御进行了基准测试:基于困惑度的检测、改写/重新分词预处理,以及对抗训练,针对越狱攻击,并分析鲁棒性-性能权衡。

ABSTRACT

As Large Language Models quickly become ubiquitous, it becomes critical to understand their security vulnerabilities. Recent work shows that text optimizers can produce jailbreaking prompts that bypass moderation and alignment. Drawing from the rich body of work on adversarial machine learning, we approach these attacks with three questions: What threat models are practically useful in this domain? How do baseline defense techniques perform in this new domain? How does LLM security differ from computer vision? We evaluate several baseline defense strategies against leading adversarial attacks on LLMs, discussing the various settings in which each is feasible and effective. Particularly, we look at three types of defenses: detection (perplexity based), input preprocessing (paraphrase and retokenization), and adversarial training. We discuss white-box and gray-box settings and discuss the robustness-performance trade-off for each of the defenses considered. We find that the weakness of existing discrete optimizers for text, combined with the relatively high costs of optimization, makes standard adaptive attacks more challenging for LLMs. Future research will be needed to uncover whether more powerful optimizers can be developed, or whether the strength of filtering and preprocessing defenses is greater in the LLMs domain than it has been in computer vision.

研究动机与目标

  • 评估在LLMs中的对抗性提示的实际威胁模型。
  • 在LLM领域评估从对抗性机器学习文献中改编的基线防御策略。
  • 在白盒和灰盒情景下比较检测、预处理和鲁棒优化防御。
  • 描述每种防御方法的鲁棒性-性能权衡。

提出的方法

  • 使用通用可迁移攻击(Zou et al., 2023)作为7B模型的基线对抗攻击。
  • 评估基于困惑度的检测(基本与窗口化)对越狱提示。
  • 使用外部改写模型(ChatGPT)测试基于改写的预处理防御,并衡量对ASR和生成质量的影响。
  • 通过BPE-dropout的重分词防御来打乱对抗性标记序列。
  • 讨论白盒和灰盒攻击场景以及防御在不同模型间的可迁移性。

实验结果

研究问题

  • RQ1哪些威胁模型在LLMs的对抗性提示中具有实际有用性,以及它们如何影响防御评估?
  • RQ2基线防御(检测、预处理、对抗训练)在面对LLMs的逐词对抗性提示时的表现如何?
  • RQ3在类似范式下,LLM安全格局与计算机视觉防御有何不同?
  • RQ4在现实设置中应用这些防御时,鲁棒性-效用权衡是什么?

主要发现

  • 基于困惑度的防御和窗口化困惑度防御可以检测由优化器生成的对抗性提示;更高的 α_ppl 使攻击在同时最小化困惑度和越狱方面更困难。
  • 使用改写模型对输入进行改写显著降低 Vicuna-7B-v1.1 和 Guanaco-7B 的攻击成功率,且 Alpaca-7B 的 ASR 显著下降、输出的定性变化。
  • 通过 BPE-dropout 的重分词防御提供一种较温和的防御,打断对抗性提示对良性提示影响较小,但效果取决于 dropout 率和上下文窗口。
  • 来自视觉领域的对抗训练并不能直接转移到 LLM;当前的基线显示出权衡,以及文本领域鲁棒优化的持续未解问题。
  • 总体而言,该研究表明离散文本优化及优化成本本质上限制了攻击的有效性,而困惑度过滤和改写等防御在LLM环境中展现出潜力。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。