arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.12038cs.CL
收藏

通过概念激活向量揭示大型语言模型的安全风险

Uncovering Safety Risks of Large Language Models through Concept Activation Vector

Renmin University of China(中国人民大学);The Hong Kong University of Science and Technology(香港科技大学)

Zhihao Xu, Ruixuan Huang, Changyu Chen, Xiting Wang

AI总结:

针对当前大型语言模型(LLMs)仍存在安全风险的问题,提出安全概念激活向量(SCAV)框架及引导攻击方法,可生成攻击提示和嵌入级攻击,显著提升攻击成功率和响应质量,还发现攻击具有跨模型迁移性并揭示LLMs安全机制见解。

摘要:

尽管经过仔细的安全对齐,当前的大型语言模型(LLMs)仍易受各种攻击。为进一步揭示LLMs的安全风险,我们引入安全概念激活向量(SCAV)框架,该框架通过准确解读LLMs的安全机制有效指导攻击。我们随后开发了SCAV引导的攻击方法,可生成攻击提示和嵌入级攻击,并自动选择扰动超参数。自动和人工评估均表明,我们的攻击方法显著提高了攻击成功率和响应质量,同时所需训练数据更少。此外,我们发现生成的攻击提示可迁移至GPT-4,嵌入级攻击也可迁移至其他参数已知的白盒LLMs。实验进一步揭示了当前LLMs存在的安全风险,例如在对7个开源LLMs的评估中,基于经典关键词匹配标准,平均攻击成功率达99.14%。最后,我们提供了关于LLMs安全机制的见解。代码可在https://github.com/SproutNan/AI-Safety_SCAV获取。

英文摘要:

Despite careful safety alignment, current large language models (LLMs) remain vulnerable to various attacks. To further unveil the safety risks of LLMs, we introduce a Safety Concept Activation Vector (SCAV) framework, which effectively guides the attacks by accurately interpreting LLMs' safety mechanisms. We then develop an SCAV-guided attack method that can generate both attack prompts and embedding-level attacks with automatically selected perturbation hyperparameters. Both automatic and human evaluations demonstrate that our attack method significantly improves the attack success rate and response quality while requiring less training data. Additionally, we find that our generated attack prompts may be transferable to GPT-4, and the embedding-level attacks may also be transferred to other white-box LLMs whose parameters are known. Our experiments further uncover the safety risks present in current LLMs. For example, in our evaluation of seven open-source LLMs, we observe an average attack success rate of 99.14%, based on the classic keyword-matching criterion. Finally, we provide insights into the safety mechanism of LLMs. The code is available at https://github.com/SproutNan/AI-Safety_SCAV.

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

↑