大语言模型(Large Language Models, LLMs)日益成为生成具有潜在社会影响内容的核心工具。值得注意的是,这些模型已展现出生成可被视为有害内容的能力。为降低此类风险,研究人员采用安全训练技术,使模型输出与社会价值观对齐,以遏制恶意内容的生成。然而,“越狱”现象——即通过精心设计的提示词诱导模型生成有害回复——仍是一项重大挑战。本研究对现有LLMs越狱及其防御技术的相关研究开展了综合分析。我们细致调研了应用于Vicuna、LLaMA和GPT-3.5 Turbo三种不同语言模型的9种攻击技术与7种防御技术,旨在评估这些攻防技术的有效性。研究结果表明,现有白盒攻击的表现不及通用攻击技术,且输入中包含特殊token会显著影响攻击成功的概率。本研究强调了关注LLMs安全层面的必要性。此外,我们还发布了研究所用的数据集与测试框架,为该领域做出贡献,旨在推动LLM安全领域的进一步研究。我们相信这些贡献将助力该领域内安全措施的探索。
英文摘要:
Large Language Models (LLMS) have increasingly become central to generating content with potential societal impacts. Notably, these models have demonstrated capabilities for generating content that could be deemed harmful. To mitigate these risks, researchers have adopted safety training techniques to align model outputs with societal values to curb the generation of malicious content. However, the phenomenon of "jailbreaking", where carefully crafted prompts elicit harmful responses from models, persists as a significant challenge. This research conducts a comprehensive analysis of existing studies on jailbreaking LLMs and their defense techniques. We meticulously investigate nine attack techniques and seven defense techniques applied across three distinct language models: Vicuna, LLama, and GPT-3.5 Turbo. We aim to evaluate the effectiveness of these attack and defense techniques. Our findings reveal that existing white-box attacks underperform compared to universal techniques and that including special tokens in the input significantly affects the likelihood of successful attacks. This research highlights the need to concentrate on the security facets of LLMs. Additionally, we contribute to the field by releasing our datasets and testing framework, aiming to foster further research into LLM security. We believe these contributions will facilitate the exploration of security measures within this domain.
DELMAN: Dynamic Defense Against Large Language Model Jailbreaking with Model Editing
ShanghaiTech University(上海科技大学);The State Key Laboratory of Blockchain and Data Security, Zhejiang University(浙江大学区块链与数据安全全国重点实验室);The CoAI group, Tsinghua University(清华大学CoAI课题组)
Test-Time Immunization: A Universal Defense Framework Against Jailbreaks for (Multimodal) Large Language Models
NLPR & MAIS, Institute of Automation, Chinese Academy of Sciences(国家工程实验室与人工智能研究所,中国科学院);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院)
Data to Defense: The Role of Curation in Customizing LLMs Against Jailbreaking Attacks
Stony Brook University(石溪大学);Binghamton University(宾汉姆顿大学);University of Iowa(爱荷华大学);Dartmouth College(达特茅斯学院);Georgia Institute of Technology(佐治亚理工学院)
CCFC: Core & Core-Full-Core Dual-Track Defense for LLM Jailbreak Protection
Department. of Math & Statistics, Boston University(数学与统计学系,波士顿大学);Department. of Computer Science, University at Albany(计算机科学系,阿尔巴尼大学);Department. of ECE & Systems Eng., Department. of Biomedical Eng., Faculty of Computing & Data Sciences, Boston University(电子工程与系统工程系,生物医学工程系,计算与数据科学学院,波士顿大学)
ShieldLearner: A New Paradigm for Jailbreak Attack Defense in LLMs
Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);Institute of Artificial Intelligence, Beijing University of Aeronautics and Astronautics(北京航空航天大学人工智能研究院)
SAID: Safety-Aware Intent Defense via Prefix Probing for Large Language Models
Shenzhen Key Laboratory of Visual Object Detection and Recognition, Harbin Institute of Technology, Harbin Institute of Technology, Shenzhen, Shenzhen, China(深圳视觉目标检测与识别重点实验室,哈尔滨工业大学,哈尔滨工业大学,深圳,深圳,中国)
Jailbreaking Large Language Models through Iterative Tool-Disguised Attacks via Reinforcement Learning
School of Cyberspace Science and Technology, Beijing Institute of Technology(信息科学与技术学院,北京理工大学);School of Computer Science and Technology, Beijing Institute of Technology(计算机科学与技术学院,北京理工大学);School of Computer Science, University of Auckland(计算机科学学院,奥克兰大学);QAX Security Center, Qi-AnXin Technology Group Inc.(QAX安全中心,启安新科技集团);Qi-AnXin Technology Group Inc.(启安新科技集团);Zhongguancun Laboratory(中关村实验室)
Adversarial Tuning: Defending Against Jailbreak Attacks for LLMs
AI Thrust(AI 部);The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));Guangzhou HKUST Fok Ying Tung Research Institute(广州香港科技大学霍英东研究院);The Hong Kong University of Science and Technology(香港科技大学)
Bag of Tricks: Benchmarking of Jailbreak Attacks on LLMs
The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));Guangzhou HKUST Fok Ying Tung Research Institute(广州香港科技大学霍英东研究院);The Hong Kong University of Science and Technology(香港科技大学);AI Thrust(AI 方向)
QueryAttack: Jailbreaking Aligned Large Language Models Using Structured Non-natural Query Language
Tsinghua Shenzhen International Graduate School(清华大学深圳国际研究生院);Pengcheng Laboratory(鹏城实验室);The Chinese University of Hong Kong(香港中文大学);Jilin University(吉林大学);Southwest University(西南大学);University of Electronic Science and Technology of China(电子科技大学);Shenzhen University(深圳大学)
Jailbreaking Large Vision Language Models in Intelligent Transportation Systems
KFSCIS, Florida International University(凯斯-西储大学信息科学学院);Knight Foundation School of Computing and Information Sciences(骑士基金会计算与信息科学学院);Learning for InterDependent Networks Laboratory (solid lab)(依赖网络学习实验室)
AdaShield: Safeguarding Multimodal Large Language Models from Structure-based Attack via Adaptive Shield Prompting
Peking University(北京大学);University of Wisconsin–Madison(威斯康星大学麦迪逊分校);International Digital Economy Academy(国际数字经济学院);University of California Davis(加州大学戴维斯分校)
Immune: Improving Safety Against Jailbreaks in Multi-modal LLMs via Inference-Time Alignment
University of Maryland(马里兰大学);Indian Institute of Technology Bombay(印度班加罗尔理工学院);Princeton University(普林斯顿大学);University of Colorado Boulder(科罗拉多大学博尔德分校);Capital One(Capital One公司);University of Central Florida(佛罗里达中央大学)
Jailbreaking and Mitigation of Vulnerabilities in Large Language Models
Hunan University Changsha, PRC;Georgia Institute of Technology Atlanta, USA;Kyoto University Kyoto, Japan;Purdue University West Lafayette, USA;National Taiwan Normal University Taipei, ROC;University of Liverpool Suzhou, PRC;Hong Kong University of Science;University of Hawaii Honolulu, USA;The University of Texas at Dallas Dallas, USA;University of Wisconsin-Madison Madison, USA;Emory University Atlanta, USA;College of William \& Mary Williamsburg, USA
E$^2$AT: Multimodal Jailbreak Defense via Dynamic Joint Optimization for Multimodal Large Language Models
School of Cyber Science and Engineering, Nanjing University of Science and Technology, China(南京理工大学信息科学与工程学院);HKUST(GZ) and INSAIT, Sofia University St. Kliment Ohridski(香港科技大学(广州)及INSAIT,索菲亚大学圣克莱门特·奥赫里迪斯学院);College of Computing and Data Science, Nanyang Technological University, Singapore(南洋理工大学计算与数据科学学院)
Jailbreaking LLMs' Safeguard with Universal Magic Words for Text Embedding Models
Dept. of Comp. Sci. and Tech., Inst. for AI, Tsinghua-Bosch Joint ML Center, THBI Lab, BNRist Center, Tsinghua University, Beijing, 100084, China(计算机科学与技术系、人工智能研究所、清华-博世联合机器学习中心、THBI实验室、BNRist中心、清华大学、北京);Department of Mathematical Sciences, Tsinghua University(数学科学系、清华大学);BIMSA, Beijing, China(BIMSA、北京、中国)
X-Boundary: Establishing Exact Safety Boundary to Shield LLMs from Multi-Turn Jailbreaks without Compromising Usability
School of Electronic Information and Electric Engineering, Shanghai Jiao Tong University(上海交通大学电子信息与电气工程学院);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室)
Securing Vision-Language Models with a Robust Encoder Against Jailbreak and Adversarial Attacks
School of Computing, Southern Illinois University(南伊利诺伊大学计算学院);Security, Privacy and Intelligence for Edge Devices Laboratory (SPEED Lab)(边缘设备安全、隐私与智能实验室(SPEED Lab))