In-context learning (ICL) has emerged as a powerful paradigm leveraging LLMs for specific downstream tasks by utilizing labeled examples as demonstrations (demos) in the preconditioned prompts. Despite its promising performance, crafted adversarial attacks pose a notable threat to the robustness of LLMs. Existing attacks are either easy to detect, require a trigger in user input, or lack specificity towards ICL. To address these issues, this work introduces a novel transferable prompt injection attack against ICL, aiming to hijack LLMs to generate the target output or elicit harmful responses. In our threat model, the hacker acts as a model publisher who leverages a gradient-based prompt search method to learn and append imperceptible adversarial suffixes to the in-context demos via prompt injection. We also propose effective defense strategies using a few shots of clean demos, enhancing the robustness of LLMs during ICL. Extensive experimental results across various classification and jailbreak tasks demonstrate the effectiveness of the proposed attack and defense strategies. This work highlights the significant security vulnerabilities of LLMs during ICL and underscores the need for further in-depth studies.
Beyond Crash: Hijacking Your Autonomous Vehicle for Fun and Profit
Johns Hopkins University(约翰斯·霍普金斯大学);Johns Hopkins University Applied Physics Laboratory(约翰斯·霍普金斯大学应用物理实验室);University of California, Santa Cruz(加州大学圣克鲁兹分校)
On the Robustness of Transformers against Context Hijacking for Linear Classification
Insititute of Data Science, The University of Hong Kong(香港大学数据科学学院);Actuarial Science, The University of Hong Kong(香港大学精算学系);Department of Computer Science, The University of Hong Kong(香港大学计算机科学系)
ShadowCoT: Cognitive Hijacking for Stealthy Reasoning Backdoors in LLMs
School of Communication and Information Engineering, Shanghai University(上海大学通信与信息工程学院);College of Computer Science and Information Technology, IAU(国际应用技术大学计算机科学与信息学院);Center for AI Research (CAIR), University of Agder (UiA)(阿格德大学人工智能研究中心)
UDora: A Unified Red Teaming Framework against LLM Agents by Dynamically Hijacking Their Own Reasoning
Department of Computer Science, University of Chicago(芝加哥大学计算机科学系);Meta;Department of Computer Science, University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校计算机科学系)
AdvChain: Adversarial Chain-of-Thought Tuning for Robust Safety Alignment of Large Reasoning Models
The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));State University of New York at Buffalo(纽约州立大学布法罗分校);Huawei International, Singapore(新加坡华为国际)
Prompt Optimization via Adversarial In-Context Learning
National University of Singapore(新加坡国立大学);Hong Kong University of Science and Technology(香港科技大学);Institute for Infocomm Research (IR), A*STAR(新加坡资讯通信研究院(A*STAR))
Understanding In-Context Learning of Linear Models in Transformers Through an Adversarial Lens
University of Cambridge(剑桥大学);Google, Paradigms of Intelligence Team(谷歌,Paradigms of Intelligence团队);Google DeepMind(谷歌DeepMind);Mila & Université de Montréal(Mila与蒙特利尔大学);UC Davis(加州大学戴维斯分校)
SnatchML: Hijacking ML models without Training Access
IEMN CNRS-8520, UPHF, INSA Hauts-de-France(法国上法兰西国立高等应用科学学院、上法兰西理工大学、IEMN CNRS-8520联合实验室);Univ. of California, Irvine(加州大学欧文分校);Univ. Lille, CNRS, Centrale Lille(里尔大学、法国国家科学研究中心、里尔中央理工学院);Queen’s University Belfast(贝尔法斯特女王大学)
Automating Agent Hijacking via Structural Template Injection
Tsinghua University \& Ant Group Hangzhou China;Tsinghua University Beijing China;Zhongguancuan Laboratory Beijing China;Tsinghua University \& Ant Group;Tsinghua University;Zhongguancuan Laboratory
Supervised Adversarial Contrastive Learning for Emotion Recognition in Conversations
Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络空间安全学院)
Attacking LLMs and AI Agents: Advertisement Embedding Attacks Against Large Language Models
Department of Computer Science Texas A\&M University–Corpus Christi Corpus Christi, TX, USA;EECS Department University of Missouri Columbia, MO, USA;Department of Computer Engineering University of California–Riverside Riverside, CA, USA