随着大型语言模型(LLMs)在各个领域被广泛应用,LLMs的安全性正日益受到关注,以避免其强大能力被滥用。现有的越狱方法要么创建强制指令跟随场景,要么手动或自动搜索带有前缀或后缀token的对抗性提示,以实现特定的表示。然而,这些方法效率低下且越狱模式明显,远未达到对LLMs进行大规模攻击的实际部署水平。在本文中,我们指出简单地重写原始指令即可实现越狱,并发现这种重写方法是可学习且可迁移的。我们提出了Rewrite to Jailbreak(R2J)方法,这是一种可迁移的黑盒越狱方法,通过迭代探索LLMs的弱点并自动改进攻击策略来攻击LLMs。由于未引入额外特征,该越狱方法更高效且难以被识别。大量实验和分析证明了R2J的有效性,我们发现该越狱方法仅需少量查询即可迁移至多个数据集和各种类型的模型。我们希望本研究能推动对LLM安全性的进一步探讨。代码可在https://github.com/ythuang02/R2J/ 获取。
英文摘要:
As Large Language Models (LLMs) are widely applied in various domains, the safety of LLMs is increasingly attracting attention to avoid their powerful capabilities being misused. Existing jailbreak methods create a forced instruction-following scenario, or search adversarial prompts with prefix or suffix tokens to achieve a specific representation manually or automatically. However, they suffer from low efficiency and explicit jailbreak patterns, far from the real deployment of mass attacks to LLMs. In this paper, we point out that simply rewriting the original instruction can achieve a jailbreak, and we find that this rewriting approach is learnable and transferable. We propose the Rewrite to Jailbreak (R2J) approach, a transferable black-box jailbreak method to attack LLMs by iteratively exploring the weakness of the LLMs and automatically improving the attacking strategy. The jailbreak is more efficient and hard to identify since no additional features are introduced. Extensive experiments and analysis demonstrate the effectiveness of R2J, and we find that the jailbreak is also transferable to multiple datasets and various types of models with only a few queries. We hope our work motivates further investigation of LLM safety. The code can be found at https://github.com/ythuang02/R2J/.
Unified Defense for Large Language Models against Jailbreak and Fine-Tuning Attacks in Education
Shanghai Institute of Artificial Intelligence for Education, East China Normal University, Shanghai 200062, China(教育人工智能研究所,华东师范大学,上海200062,中国);School of Computer Science and Technology, East China Normal University, Shanghai 200062, China(计算机科学与技术学院,华东师范大学,上海200062,中国);School of Computer Science(计算机科学学院)
AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents
Gray Swan AI(格雷天鹅人工智能公司);UK AI Security Institute(英国人工智能安全研究所);EPFL(洛桑联邦理工学院);Center for AI Safety(人工智能安全中心);Carnegie Mellon University(卡内基梅隆大学);University of Oxford(牛津大学)
Behind Harmful Compliance: Behavioral and Mechanistic Divergence Across LLM Jailbreaks
Department of Computer Science(计算机科学系);Luddy School of Informatics, Computing, and Engineering(信息学、计算与工程学院);Indiana University Bloomington(印第安纳大学布卢明顿分校)
How Real is Your Jailbreak? Fine-grained Jailbreak Evaluation with Anchored Reference
Key Laboratory of Trustworthy Distributed Computing(可信分布式计算重点实验室);Service Beijing University of Posts(北京邮电大学);Artificial Intelligence Research Institute China Academy of Information(人工智能研究所信息与通信技术 academy)
Jailbreak Instruction-Tuned LLMs via end-of-sentence MLP Re-weighting
Peking University(北京大学);School of Science(理学院);Westlake University(西湖大学);Beijing International Center for Mathematical Research(北京国际数学研究中心);Center for Machine Learning Research(机器学习研究中心)
Cannot See the Forest for the Trees: Invoking Heuristics and Biases to Elicit Irrational Choices of LLMs
School of Electronic, Electrical and communication Engineering, UCAS, Beijing.(电子电气与通信工程学院,中国科学院大学,北京);Key Laboratory of Intelligent Information Processing, Institute of Computing Technology, CAS, Beijing.(智能信息处理重点实验室,计算技术研究所,中国科学院,北京);School of Computer Science and Technology, UCAS, Beijing.(计算机科学与技术学院,中国科学院大学,北京);Key Laboratory of Big Data Mining and Knowledge management, UCAS, Beijing(大数据挖掘与知识管理重点实验室,中国科学院大学,北京);Nanyang Technological University, Singapore.(南洋理工大学,新加坡);Shenzhen Campus of Sun Yat-sen University, Shenzhen.(孙中山大学深圳校区,深圳)
ForgeDAN: An Evolutionary Framework for Jailbreaking Aligned Large Language Models
iFLYTEK Security Laboratory(iFLYTEK安全实验室);Anhui SparkShield Intelligent Technology Co., Ltd.(安徽SparkShield智能科技有限公司);Peking University(北京大学);School of Automation, University of Electronic Science and Technology of China(电子科技大学自动化学院);Northwest University(西北大学);University of New South Wales(新南威尔士大学);National Computer Network Emergency Response Technical Team/Coordination Center of China(中国国家计算机网络应急技术处置协调中心)
A Simple and Efficient Jailbreak Method Exploiting LLMs' Helpfulness
The Harbin Institute of Technology(哈尔滨工业大学);The Hong Kong Polytechnic University(香港理工大学);Shenzhen University(深圳大学);Shenzhen Loop Area Institute(深圳河套学院)
Measuring the Wrong Thing: Internal Harmfulness Scores Anti-Rank Successful Jailbreaks
College of Computer Science and Artificial Intelligence, Fudan University(复旦大学计算机科学与人工智能学院);School of Computer Engineering and Science, Shanghai University(上海大学计算机工程与科学学院);Beijing Normal University(北京师范大学);Institute of Advanced Intelligence and Computing, A*STAR(新加坡科技研究局高级智能与计算研究所);School of Communication and Electronic Engineering, East China Normal University(华东师范大学通信与电子工程学院);Institute of Big Data, Fudan University(复旦大学大数据研究院);Department of Computer Science, Worcester Polytechnic Institute(伍斯特理工学院计算机科学系)
Intention Analysis Makes LLMs A Good Jailbreak Defender
School of Computer Science, Wuhan University(武汉大学计算机学院);The University of Sydney(悉尼大学);College of Computing and Data Science at Nanyang Technological University(南洋理工大学计算与数据科学学院)
HarmAug: Effective Data Augmentation for Knowledge Distillation of Safety Guard Models
KAIST(韩国科学技术院);Theori;Université de Montréal(蒙特利尔大学);Mila – Québec AI Institute(米拉-魁北克人工智能研究所);Technische Hochschule Nürnberg Georg Simon Ohm(纽伦堡应用技术大学);CIFAR AI Chair(加拿大高级研究所人工智能主席项目)