arXiv:2410.19160cs.LGcs.AI2024-10被引 17

提出一种更高效且能生成合法词汇的对抗攻击方法

Adversarial Attacks on Large Language Models Using Regularized Relaxation

  • 用正则化梯度实现连续优化,直接生成模型词汇表内的有效词
  • 速度比现有最佳方法快100倍,攻击成功率显著提升
  • 适用于测试主流大模型安全,尤其适合研究模型鲁棒性

随着大型语言模型在众多实际应用中广泛使用,其安全性至关重要。尽管对齐技术已显著提升整体安全性,但大模型仍易受精心设计的对抗输入攻击。因此,对抗攻击方法被广泛用于研究和理解这些漏洞。然而,现有方法存在明显局限:依赖离散词元优化的方法效率低下,而连续优化方法无法生成模型词汇表中的有效词元,难以应用于实际场景。本文提出一种新对抗攻击技术,通过正则化梯度与连续优化结合,克服上述限制。该方法比当前最先进的贪心坐标梯度法快两个数量级,显著提升对齐语言模型的攻击成功率,同时可生成有效词元,解决了连续优化方法的根本缺陷。我们在五个前沿大模型上,利用四个数据集验证了该方法的有效性。

原文摘要 · Abstract (English)

As powerful Large Language Models (LLMs) are now widely used for numerous practical applications, their safety is of critical importance. While alignment techniques have significantly improved overall safety, LLMs remain vulnerable to carefully crafted adversarial inputs. Consequently, adversarial attack methods are extensively used to study and understand these vulnerabilities. However, current attack methods face significant limitations. Those relying on optimizing discrete tokens suffer from limited efficiency, while continuous optimization techniques fail to generate valid tokens from the model's vocabulary, rendering them impractical for real-world applications. In this paper, we propose a novel technique for adversarial attacks that overcomes these limitations by leveraging regularized gradients with continuous optimization methods. Our approach is two orders of magnitude faster than the state-of-the-art greedy coordinate gradient-based method, significantly improving the attack success rate on aligned language models. Moreover, it generates valid tokens, addressing a fundamental limitation of existing continuous optimization methods. We demonstrate the effectiveness of our attack on five state-of-the-art LLMs using four datasets.

对抗攻击大模型安全连续优化正则化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。