arXiv:2410.00451cs.CRcs.AI2024-10Conference of the …被引 4

用普通数据也能训练出越狱大模型,暴露安全机制漏洞

Unleashing the Unseen: Harnessing Benign Datasets for Jailbreaking Large Language Models

  • 从正常数据中提取通用特征作为后缀,可触发模型越狱
  • 相同后缀在不同提示下引发特定有害响应,说明特征具语义
  • 仅用正常数据微调就能彻底破坏GPT安全对齐,黑盒可行

尽管持续进行安全对齐研究,GPT-4和LLaMA 3等大语言模型仍易受越狱攻击影响,尤其是通过对抗性后缀诱导有害行为。我们假设这些后缀并非单纯缺陷,而是可能主导模型行为的特征。实验表明:(1)可从良性数据集中提取无样本依赖的特征作为后缀,有效破坏安全对齐;(2)越狱攻击生成的后缀包含有意义特征,相同后缀在不同提示下产生具有特定特征的响应;(3)仅使用良性数据集微调即可轻松引入此类安全缺陷。最终,在黑盒设置下,仅通过良性数据微调就完全消除了GPT的安全对齐。代码与数据已公开于https://github.com/suffix-maybe-feature/adver-suffix-maybe-features。

原文摘要 · Abstract (English)

Despite significant ongoing efforts in safety alignment, large language models (LLMs) such as GPT-4 and LLaMA 3 remain vulnerable to jailbreak attacks that can induce harmful behaviors, including through the use of adversarial suffixes. Building on prior research, we hypothesize that these adversarial suffixes are not mere bugs but may represent features that can dominate the LLM's behavior. To evaluate this hypothesis, we conduct several experiments. First, we demonstrate that benign features can be effectively made to function as adversarial suffixes, i.e., we develop a feature extraction method to extract sample-agnostic features from benign dataset in the form of suffixes and show that these suffixes may effectively compromise safety alignment. Second, we show that adversarial suffixes generated from jailbreak attacks may contain meaningful features, i.e., appending the same suffix to different prompts results in responses exhibiting specific characteristics. Third, we show that such benign-yet-safety-compromising features can be easily introduced through fine-tuning using only benign datasets. As a result, we are able to completely eliminate GPT's safety alignment in a blackbox setting through finetuning with only benign data. Our code and data is available at \url{https://github.com/suffix-maybe-feature/adver-suffix-maybe-features}.

模型安全越狱攻击微调漏洞

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