大语言模型(Large Language Models, LLMs)如GPT和Llama2正越来越多地被应用于众多安全关键场景,因此其安全性至关重要。尽管研究人员已在基于人类反馈的强化学习(reinforcement learning from human feedback, RLHF)上投入大量精力,但近期研究表明LLMs仍易受到对抗扰动、木马攻击等攻击的影响,因此需要进一步研究以评估其安全性并探究安全缺陷的成因。本研究提出了一个框架,可在token、层和神经元三个层级对LLMs开展轻量级因果分析。我们将该框架应用于Llama2、Vicuna等开源LLM,得到了多项有意思的发现。基于层级因果分析,我们证实RLHF会使模型对有害提示产生过拟合效应,这意味着此类安全防护很容易被“非常规”有害提示突破。作为佐证,我们提出了一种对抗扰动方法,在2023年木马检测竞赛(Trojan Detection Competition 2023)的红队测试任务上实现了100%的攻击成功率。此外,我们发现Llama2和Vicuna中都存在一个神秘的神经元,它对输出的因果效应高得不合理。虽然我们尚不确定该神经元存在的原因,但研究表明可以针对这一特定神经元发起“木马”攻击,彻底瘫痪LLM——即我们可以生成可迁移的提示后缀,频繁诱导LLM输出无意义内容。
英文摘要:
Large Language Models (LLMs) such as GPT and Llama2 are increasingly adopted in many safety-critical applications. Their security is thus essential. Even with considerable efforts spent on reinforcement learning from human feedback (RLHF), recent studies have shown that LLMs are still subject to attacks such as adversarial perturbation and Trojan attacks. Further research is thus needed to evaluate their security and/or understand the lack of it. In this work, we propose a framework for conducting light-weight causality-analysis of LLMs at the token, layer, and neuron level. We applied our framework to open-source LLMs such as Llama2 and Vicuna and had multiple interesting discoveries. Based on a layer-level causality analysis, we show that RLHF has the effect of overfitting a model to harmful prompts. It implies that such security can be easily overcome by `unusual' harmful prompts. As evidence, we propose an adversarial perturbation method that achieves 100\% attack success rate on the red-teaming tasks of the Trojan Detection Competition 2023. Furthermore, we show the existence of one mysterious neuron in both Llama2 and Vicuna that has an unreasonably high causal effect on the output. While we are uncertain on why such a neuron exists, we show that it is possible to conduct a ``Trojan'' attack targeting that particular neuron to completely cripple the LLM, i.e., we can generate transferable suffixes to prompts that frequently make the LLM produce meaningless responses.
SeCodePLT: A Unified Platform for Evaluating the Security of Code GenAI
UC Santa Barbara(加州大学圣巴巴拉分校);UC Berkeley(加州大学伯克利分校);VirtueAI;UIUC(伊利诺伊大学香槟分校);UChicago(芝加哥大学);University of Oxford(牛津大学);UK AI Safety Institute(英国人工智能安全研究所)
A.S.E: A Repository-Level Benchmark for Evaluating Security in AI-Generated Code
Tencent(腾讯公司);Peking University(北京大学);Fudan University(复旦大学);Shanghai Jiao Tong University(上海交通大学);Tsinghua University(清华大学);Zhejiang University(浙江大学);Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);Singapore Management University(新加坡国立大学)
CTFExplorer: Evaluating LLM Offensive Agents Through Multi-Target Web CTF Benchmarking
CISPA - Helmholtz Center for Information Security(CISPA-海德堡信息安全研究中心);NYU Tandon School of Engineering(纽约大学坦顿工程学院);NYU Abu Dhabi(纽约大学阿布扎克分校);IIIT Hyderabad(海得拉巴印度理工学院)
A Practical Framework for Evaluating Medical AI Security: Reproducible Assessment of Jailbreaking and Privacy Vulnerabilities Across Clinical Specialties
SeClaw: Spec-Driven Security Task Synthesis for Evaluating Autonomous Agents
The Hong Kong University of Science and Technology(香港科技大学);Ant Digital Technologies, Ant Group(蚂蚁集团数字技术部);Xi’an Jiaotong University(西安交通大学);The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));University of Oxford(牛津大学);City University of Hong Kong(香港城市大学);Institute of Science Tokyo(东京科学研究所);Zhejiang University(浙江大学);Massachusetts Institute of Technology(麻省理工学院);University of North Carolina at Chapel Hill(北卡罗来纳大学教堂山分校);Beijing University of Technology(北京理工大学)