Baseline Defenses for Adversarial Attacks Against Aligned Language Models

TL;DR

研究探讨对齐语言模型的对抗攻击,使用困惑度检测等方法防御。

cs.LG 🔴 高级 2023-09-02 32 次浏览
Neel Jain Avi Schwarzschild Yuxin Wen Gowthami Somepalli John Kirchenbauer Ping-yeh Chiang Micah Goldblum Aniruddha Saha Jonas Geiping Tom Goldstein
对抗攻击 语言模型 困惑度检测 输入预处理 对抗训练

核心发现

方法论

研究采用困惑度检测、输入预处理(如改写和重新标记)以及对抗训练等方法,评估对齐语言模型的对抗攻击防御效果。具体算法包括困惑度过滤器和梯度坐标优化器。

关键结果

  • 困惑度检测有效识别所有对抗性提示,成功率为0%。
  • 输入预处理显著降低攻击成功率,Vicuna和Guanaco模型的成功率降至接近基线水平。
  • 对抗训练在文本优化复杂性上表现出挑战,需进一步研究。

研究意义

本研究揭示了在语言模型领域中,现有的对抗攻击防御方法在应对文本优化时的局限性。这为未来开发更强大的优化器或增强过滤和预处理防御的力量提供了方向。

技术贡献

研究展示了在语言模型中应用困惑度检测和输入预处理的有效性,并指出了与计算机视觉领域的差异。提供了对抗训练在文本领域的适用性分析。

新颖性

首次系统性评估对齐语言模型的对抗攻击防御,尤其是在文本优化复杂性方面的挑战。

局限性

  • 困惑度检测可能误判正常提示,约10%正常提示被误判。
  • 输入预处理可能导致模型性能下降,尤其在上下文学习中。

未来方向

未来研究可探索更强大的优化器,或在灰盒环境中提高防御策略的适用性。

AI 总览摘要

随着大语言模型的广泛应用,其安全性成为关键问题。现有研究表明,文本优化器可以生成越狱提示,绕过模型的调节和对齐机制。

本文探讨了几种基线防御策略,包括困惑度检测、输入预处理和对抗训练,评估其在对抗攻击下的有效性。研究发现,困惑度检测和输入预处理在识别和处理对抗性提示方面表现出色。

然而,现有的文本优化器在处理离散文本优化时面临挑战,未来需要开发更强大的优化器或增强过滤和预处理防御的力量。

深度解读

原文摘要

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.

cs.LG cs.CL cs.CR