释放未见之隐患:利用良性数据集越狱大型语言模型
Unleashing the Unseen: Harnessing Benign Datasets for Jailbreaking Large Language Models
AI总结:
研究假设对抗性后缀是主导LLM行为的特征,通过实验证明良性数据集提取的特征可作为对抗性后缀破坏安全对齐,且仅用良性数据微调即可在黑盒下完全消除GPT的安全对齐。
摘要:
尽管在安全对齐方面持续付出重大努力,GPT-4 和 LLaMA 3 等大型语言模型(LLMs)仍然容易受到越狱攻击,这些攻击能诱发有害行为,包括通过使用对抗性后缀。基于先前的研究,我们假设这些对抗性后缀并非单纯的漏洞,而是可能代表能够主导 LLM 行为的特征。为评估此假设,我们进行了多项实验。首先,我们证明良性特征可以被有效地转化为对抗性后缀,即我们开发了一种特征提取方法,从良性数据集中提取与样本无关的特征作为后缀,并表明这些后缀能有效破坏安全对齐。其次,我们表明由越狱攻击生成的对抗性后缀可能包含有意义的特征,即将同一后缀附加到不同提示词上,会导致响应展现出特定特征。第三,我们表明这种良性但会破坏安全的特征,可以仅通过使用良性数据集进行微调来轻松引入。因此,在黑盒设置下,我们能够仅使用良性数据进行微调,从而完全消除 GPT 的安全对齐。我们的代码和数据可在 \url{https://github.com/suffix-maybe-feature/adver-suffix-maybe-features} 获取。
英文摘要:
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}.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。