arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.10700cs.CLcs.AI
收藏

大语言模型知其弱点:通过自然分布偏移揭示安全漏洞

LLMs know their vulnerabilities: Uncover Safety Gaps through Natural Distribution Shifts

MoE Key Lab of Artificial Intelligence, Shanghai Jiao Tong University(人工智能大模型关键实验室,上海交通大学);Beihang University(北京航空航天大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室)

Qibing Ren, Hao Li, Dongrui Liu, Zhanxu Xie, Xiaoya Lu, Yu Qiao, Lei Sha, Junchi Yan, Lizhuang Ma, Jing Shao

AI总结:

本文研究大语言模型对自然分布偏移的脆弱性,提出ActorBreaker攻击方法,通过识别有毒提示相关角色构建多轮提示,揭示模型安全漏洞,并构建安全数据集提升鲁棒性。

摘要:

大语言模型(LLMs)的安全问题因预训练过程中暴露潜在有害数据而受到广泛关注。本文识别出LLMs的新安全漏洞:其对攻击提示与原始有毒提示之间自然分布偏移的易感性,其中看似无害的提示,语义上与有害内容相关,可绕过安全机制。为探索此问题,我们引入新型攻击方法ActorBreaker,通过识别预训练分布中与有毒提示相关的角色,构建多轮提示逐步使LLMs暴露不安全内容。ActorBreaker基于Latour的行动者网络理论,涵盖人类和非人类行动者,以捕捉更广泛的漏洞。实验结果表明,ActorBreaker在对齐LLMs的多样性、有效性及效率上均优于现有攻击方法。为解决此漏洞,我们提出扩展安全训练以覆盖更广泛的有毒内容语义空间。因此,我们构建了基于ActorBreaker的多轮安全数据集。在该数据集上微调模型显著提升了鲁棒性,但存在一定的实用性和效用权衡。代码可在https://github.com/AI45Lab/ActorAttack获取。

英文摘要:

Safety concerns in large language models (LLMs) have gained significant attention due to their exposure to potentially harmful data during pre-training. In this paper, we identify a new safety vulnerability in LLMs: their susceptibility to \textit{natural distribution shifts} between attack prompts and original toxic prompts, where seemingly benign prompts, semantically related to harmful content, can bypass safety mechanisms. To explore this issue, we introduce a novel attack method, \textit{ActorBreaker}, which identifies actors related to toxic prompts within pre-training distribution to craft multi-turn prompts that gradually lead LLMs to reveal unsafe content. ActorBreaker is grounded in Latour's actor-network theory, encompassing both human and non-human actors to capture a broader range of vulnerabilities. Our experimental results demonstrate that ActorBreaker outperforms existing attack methods in terms of diversity, effectiveness, and efficiency across aligned LLMs. To address this vulnerability, we propose expanding safety training to cover a broader semantic space of toxic content. We thus construct a multi-turn safety dataset using ActorBreaker. Fine-tuning models on our dataset shows significant improvements in robustness, though with some trade-offs in utility. Code is available at https://github.com/AI45Lab/ActorAttack.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑