Large Language Models (LLMs) have shown remarkable success in various tasks, yet their safety and the risk of generating harmful content remain pressing concerns. In this paper, we delve into the potential of In-Context Learning (ICL) to modulate the alignment of LLMs. Specifically, we propose the In-Context Attack (ICA) which employs harmful demonstrations to subvert LLMs, and the In-Context Defense (ICD) which bolsters model resilience through examples that demonstrate refusal to produce harmful responses. We offer theoretical insights to elucidate how a limited set of in-context demonstrations can pivotally influence the safety alignment of LLMs. Through extensive experiments, we demonstrate the efficacy of ICA and ICD in respectively elevating and mitigating the success rates of jailbreaking prompts. Our findings illuminate the profound influence of ICL on LLM behavior, opening new avenues for improving the safety of LLMs.
DualBreach: Efficient Dual-Jailbreaking via Target-Driven Initialization and Multi-Target Optimization
State Key Laboratory of Blockchain and Data Security, Zhejiang University, Hangzhou, China(区块链与数据安全国家重点实验室,浙江大学,杭州,中国);Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security, Hangzhou, China(杭州高新技术区(滨江)区块链与数据安全研究院,杭州,中国)
GUARD-SLM: Token Activation-Based Defense Against Jailbreak Attacks for Small Language Models
Knight Foundation School of Computing and Information Sciences(奈特基金会计算与信息科学学院);Security, Optimization, and Learning for InterDependent networks laboratory (solid lab)(安全、优化与相互依赖网络学习实验室);Florida International University(佛罗里达国际大学)
GUARD: Role-playing to Generate Natural-language Jailbreakings to Test Guideline Adherence of Large Language Models
School of Information Sciences University of Illinois at Urbana-Champaign(信息科学学院伊利诺伊大学厄巴纳-香槟分校);Independent Researcher, Starc Institute(Starc研究所独立研究者);Computer Science and Engineering HKUST(HKUST计算机科学与工程学院);Computer Science Lapis Labs University of Illinois Urbana-Champaign(计算机科学Lapis Labs伊利诺伊大学厄巴纳-香槟分校);School of Information Sciences University of Illinois Urbana-Champaign(信息科学学院伊利诺伊大学厄巴纳-香槟分校)
GuardNet: Ensemble Strategies of Shallow Neural Networks for Robust Prompt Injection and Jailbreak Detection
Quickium Technology Ltd.(Quickium技术有限公司);Federal University of São Carlos (UFSCar)(萨尔瓦多·卡罗斯联邦大学);Federal Institute of Education, Science and Technology of São Paulo (IFSP)(圣保罗教育、科学和技术联邦研究所)
PANDAS: Improving Many-shot Jailbreaking via Positive Affirmation, Negative Demonstration, and Adaptive Sampling
University of Toronto, Vector Institute(多伦多大学,向量研究所);University of Oxford(牛津大学);Polytechnique Montréal, Mila - Quebec AI Institute, University of Toronto(蒙特利尔理工学院,魁北克人工智能研究所,多伦多大学)
Mitigating Many-shot Jailbreak Attacks with One Single Demonstration
Zhejiang University(浙江大学);Nanyang Technological University(南洋理工大学);Sun Yat-sen University(中山大学);University of Science and Technology of China(中国科学技术大学);Virginia Tech(弗吉尼亚理工大学)
Exploring the Vulnerability of the Content Moderation Guardrail in Large Language Models via Intent Manipulation
Boise State University(博伊州立大学);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);University of Pittsburgh(匹兹堡大学);New York University(纽约大学);Florida International University(佛罗里达国际大学)
Decoding Guardrails: XAI-Guided Perturbation Analysis of Prompt Injection Detection
Pedeciba Informática(Pedeciba信息学研究所);InCo, Facultad de Ingeniería, Universidad de la República(共和国大学工程学院计算研究所);Departamento de Informática e Inteligencia Artificial, Universidad Católica del Uruguay(乌拉圭天主教大学信息与人工智能系)
Emerging Vulnerabilities in Frontier Models: Multi-Turn Jailbreak Attacks
University of California, Berkeley(加州大学伯克利分校);Stanford University(斯坦福大学);Georgia Institute of Technology(佐治亚理工学院);Mohamed Bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);McGill University(麦吉尔大学);Mila(米拉研究所)
Machine Learning for Detection and Analysis of Novel LLM Jailbreaks
Centre for Artificial Intelligence and Innovation(人工智能与创新中心);Pingla Institute(平拉研究所);Transitional Artificial Intelligence Research Group(过渡人工智能研究组);UNSW(新南威尔士大学)
RigorLLM: Resilient Guardrails for Large Language Models against Undesired Content
University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Virginia Tech(弗吉尼亚理工大学);Salesforce Research(Salesforce研究院);University of California Berkeley(加州大学伯克利分校);University of Chicago(芝加哥大学)