Adversarial Demonstration Attacks on Large Language Models
Not on the map. Why?
Cited by 24 in LLM safety and security, but placed by its own abstract, which didn’t fit.
Abstract (arXiv)
With the emergence of more powerful large language models (LLMs), such as ChatGPT and GPT-4, in-context learning (ICL) has gained significant prominence in leveraging these models for specific tasks by utilizing data-label pairs as precondition prompts. While incorporating demonstrations can greatly enhance the performance of LLMs across various tasks, it may introduce a new security concern: attackers can manipulate only the demonstrations without changing the input to perform an attack. In this paper, we investigate the security concern of ICL from an adversarial perspective, focusing on the impact of demonstrations. We propose a novel attack method named advICL, which aims to manipulate only the demonstration without changing the input to mislead the models. Our results demonstrate that as the number of demonstrations increases, the robustness of in-context learning would decrease. Additionally, we also identify the intrinsic property of the demonstrations is that they can be used (prepended) with different inputs. As a result, it introduces a more practical threat model in which an attacker can attack the test input example even without knowing and manipulating it. To achieve it, we propose the transferable version of advICL, named Transferable-advICL. Our experiment shows that the adversarial demonstration generated by Transferable-advICL can successfully attack the unseen test input examples. We hope that our study reveals the critical security risks associated with ICL and underscores the need for extensive research on the robustness of ICL, particularly given its increasing significance in the advancement of LLMs.
Key facts. Cited by 58 papers in the map (data through 7 Oct 2026). Builds on 26 of its 43 references that are in the map. First posted on arXiv 24 May 2023.
Builds on
26 of 43 references.
References · 26
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 979
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2016Universal adversarial perturbationscited by 774
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
14 more
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
- 2018Universal Sentence Encodercited by 485
- 2018Generating Natural Language Adversarial Examplescited by 422
- 2023Larger language models do in-context learning differentlycited by 386
- 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 376
- 2018Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifierscited by 341
- 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 227
- 2018Stress Test Evaluation for Natural Language Inferencecited by 211
- 2019Certified Robustness to Adversarial Word Substitutionscited by 164
- 2019Combating Adversarial Misspellings with Robust Word Recognitioncited by 162
- 2016Crafting Adversarial Input Sequences for Recurrent Neural Networkscited by 102
- 2022On the Relation between Sensitivity and Accuracy in In-context Learningcited by 71
- 2022Self-Generated In-Context Learning: Leveraging Auto-regressive Language Models as a Demonstration Generatorcited by 68
- 2023In ChatGPT We Trust? Measuring and Characterizing the Reliability of ChatGPTcited by 35
Built on by
Citing papers per year: 2023: 14; 2024: 21; 2025: 15; 2026: 8.
58 papers.
Sort:
By area:
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 533
- 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attackscited by 434
- 2023Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrationscited by 401
- 2023Large Language Models Sensitivity to The Order of Options in Multiple-Choice Questionscited by 249
- 2024Jailbreak Attacks and Defenses Against Large Language Models: A Surveycited by 215
- 2023Survey of Vulnerabilities in Large Language Models Revealed by Adversarial Attackscited by 189
- 2024Security and Privacy Challenges of Large Language Models: A Surveycited by 179
- 2023Foundational Models Defining a New Era in Vision: A Survey and Outlookcited by 109
- 2024Breaking Agents: Compromising Autonomous LLM Agents Through Malfunction Amplificationcited by 80
- 2023Use of LLMs for Illicit Purposes: Threats, Prevention Measures, and Vulnerabilitiescited by 76
- 2023Unleashing the potential of prompt engineering for large language modelscited by 72
- 2024JailbreakZoo: Survey, Landscapes, and Horizons in Jailbreaking Large Language and Vision-Language Modelscited by 67
38 more
- 2024RigorLLM: Resilient Guardrails for Large Language Models against Undesired Contentcited by 65
- 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safetycited by 63
- 2025From Prompt Injections to Protocol Exploits: Threats in LLM-Powered AI Agents Workflowscited by 57
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directionscited by 48
- 2023Hijacking Large Language Models via Adversarial In-Context Learningcited by 41
- 2024Leveraging the Context through Multi-Round Interactions for Jailbreaking Attackscited by 32
- 2023MathAttack: Attacking Large Language Models Towards Math Solving Abilitycited by 31
- 2023DeceptPrompt: Exploiting LLM-driven Code Generation via Adversarial Natural Language Instructionscited by 31
- 2024Security of AI Agentscited by 24
- 2024Can We Trust Embodied Agents? Exploring Backdoor Attacks against Embodied LLM-based Decision-Making Systemscited by 23
- 2024Mission Impossible: A Statistical Perspective on Jailbreaking LLMscited by 21
- 2024Unveiling Selection Biases: Exploring Order and Token Sensitivity in Large Language Modelscited by 20
- 2024Preemptive Answer "Attacks" on Chain-of-Thought Reasoningcited by 16
- 2024Exploring the Robustness of In-Context Learning with Noisy Labelscited by 13
- 2025Short-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical Evidencecited by 13
- 2025Attack and defense techniques in large language models: A survey and new perspectivescited by 13
- 2024Exploring Vulnerabilities and Protections in Large Language Models: A Surveycited by 10
- 2025Pay Attention to Attention Distribution: A New Local Lipschitz Bound for Transformerscited by 10
- 2025A Framework for Studying AI Agent Behavior: Evidence from Consumer Choice Experimentscited by 10
- 2024AdaPPA: Adaptive Position Pre-Fill Jailbreak Attack Approach Targeting LLMscited by 8
- 2023Hijacking Context in Large Multi-modal Modelscited by 6
- 2024Can LLMs be Fooled? Investigating Vulnerabilities in LLMscited by 5
- 2025LLM Agents Are Hypersensitive to Nudgescited by 5
- 2024Evaluating and Safeguarding the Adversarial Robustness of Retrieval-Based In-Context Learningcited by 4
- 2024Neutralizing Backdoors through Information Conflicts for Large Language Modelscited by 4
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classificationcited by 4
- 2025Chain-of-Thought Driven Adversarial Scenario Extrapolation for Robust Language Modelscited by 4
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defensescited by 4
- 2025A First Look at the Security Issues in the Model Context Protocol Ecosystemcited by 3
- 2023HANS, are you clever? Clever Hans Effect Analysis of Neural Systemscited by 2
- 2024MILE: A Mutation Testing Framework of In-Context Learning Systemscited by 2
- 2024The Best Defense is a Good Offense: Countering LLM-Powered Cyberattackscited by 2
- 2026Understanding the Dynamics of Demonstration Conflict in In-Context Learningcited by 2
- 2025Geometry-Guided Adversarial Prompt Detection via Curvature and Local Intrinsic Dimensioncited by 1
- 2025SoK: A Comprehensive Security Analysis of Jailbreak Resilience in GPT and DeepSeek Modelscited by 1
- 2026Visual Persuasion: What Influences Decisions of Vision-Language Models?cited by 1
- 2026Position: Behavioral Systems Require Behavioral Testscited by 1
- 2023Applying Standards to Advance Upstream & Downstream Ethics in Large Language Modelscited by 0
50 most cited of 58 All 58 (JSON)
- 2026Alignment of LRMs via Counter-Aligned Few-Shot Conversation Exposure16 Aug 2026
- 2026Evolving Safety Landscape of Multi-modal Large Language Models: A Survey of Emerging Threats and Safeguards27 Jul 2026
- 2026Can We Trust LLM's Logic? Quantifying Uncertainty, Coherence, and Robustness via a Graph-Based Framework9 Jul 2026
- 2026Position: Behavioral Systems Require Behavioral Tests31 May 2026
- 2026When Correct Demonstrations Hurt: Rethinking the Role of Exemplars in In-Context Learning25 May 2026
- 2026Do as I Say, Not as I Do: Instruction-Induction Conflict in LLMs19 May 2026
- 2026Understanding the Dynamics of Demonstration Conflict in In-Context Learning3 Mar 2026
- 2026Visual Persuasion: What Influences Decisions of Vision-Language Models?17 Feb 2026
- 2025A First Look at the Security Issues in the Model Context Protocol Ecosystem18 Oct 2025
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defenses17 Oct 2025
- 2025A Framework for Studying AI Agent Behavior: Evidence from Consumer Choice Experiments30 Sep 2025
- 2025Innocence in the Crossfire: Roles of Skip Connections in Jailbreaking Visual Language Models18 Jul 2025
38 more
- 2025Pay Attention to Attention Distribution: A New Local Lipschitz Bound for Transformers10 Jul 2025
- 2025From Prompt Injections to Protocol Exploits: Threats in LLM-Powered AI Agents Workflows29 Jun 2025
- 2025SoK: A Comprehensive Security Analysis of Jailbreak Resilience in GPT and DeepSeek Models23 Jun 2025
- 2025Chain-of-Thought Driven Adversarial Scenario Extrapolation for Robust Language Models20 May 2025
- 2025LLM Agents Are Hypersensitive to Nudges16 May 2025
- 2025Attack and defense techniques in large language models: A survey and new perspectives2 May 2025
- 2025TestDG: Test-time Domain Generalization for Continual Test-time Adaptation7 Apr 2025
- 2025Geometry-Guided Adversarial Prompt Detection via Curvature and Local Intrinsic Dimension5 Mar 2025
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classification21 Feb 2025
- 2025Short-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical Evidence6 Feb 2025
- 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safety2 Feb 2025
- 2024Neutralizing Backdoors through Information Conflicts for Large Language Models27 Nov 2024
- 2024The Best Defense is a Good Offense: Countering LLM-Powered Cyberattacks20 Oct 2024
- 2024AdaPPA: Adaptive Position Pre-Fill Jailbreak Attack Approach Targeting LLMs11 Sep 2024
- 2024MILE: A Mutation Testing Framework of In-Context Learning Systems7 Sep 2024
- 2024Mission Impossible: A Statistical Perspective on Jailbreaking LLMs2 Aug 2024
- 2024Breaking Agents: Compromising Autonomous LLM Agents Through Malfunction Amplification30 Jul 2024
- 2024Can LLMs be Fooled? Investigating Vulnerabilities in LLMs30 Jul 2024
- 2024Jailbreak Attacks and Defenses Against Large Language Models: A Survey5 Jul 2024
- 2024JailbreakZoo: Survey, Landscapes, and Horizons in Jailbreaking Large Language and Vision-Language Models26 Jun 2024
- 2024Security of AI Agents12 Jun 2024
- 2024Unveiling Selection Biases: Exploring Order and Token Sensitivity in Large Language Models5 Jun 2024
- 2024Exploring Vulnerabilities and Protections in Large Language Models: A Survey1 Jun 2024
- 2024Preemptive Answer "Attacks" on Chain-of-Thought Reasoning31 May 2024
- 2024Can We Trust Embodied Agents? Exploring Backdoor Attacks against Embodied LLM-based Decision-Making Systems27 May 2024
- 2024Evaluating and Safeguarding the Adversarial Robustness of Retrieval-Based In-Context Learning24 May 2024
- 2024Exploring the Robustness of In-Context Learning with Noisy Labels28 Apr 2024
- 2024Can't say cant? Measuring and Reasoning of Dark Jargons in Large Language Models25 Apr 2024
- 2024RigorLLM: Resilient Guardrails for Large Language Models against Undesired Content19 Mar 2024
- 2024Leveraging the Context through Multi-Round Interactions for Jailbreaking Attacks14 Feb 2024
- 2024Security and Privacy Challenges of Large Language Models: A Survey30 Jan 2024
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMs12 Jan 2024
- 2023Hijacking Context in Large Multi-modal Models7 Dec 2023
- 2023DeceptPrompt: Exploiting LLM-driven Code Generation via Adversarial Natural Language Instructions7 Dec 2023
- 2023Hijacking Large Language Models via Adversarial In-Context Learning16 Nov 2023
- 2023Unleashing the potential of prompt engineering for large language models23 Oct 2023
- 2023Survey of Vulnerabilities in Large Language Models Revealed by Adversarial Attacks16 Oct 2023
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directions16 Oct 2023
50 newest of 58 All 58 (JSON)
- 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attackscited by 434
- 2024Jailbreak Attacks and Defenses Against Large Language Models: A Surveycited by 215
- 2023Survey of Vulnerabilities in Large Language Models Revealed by Adversarial Attackscited by 189
- 2024Security and Privacy Challenges of Large Language Models: A Surveycited by 179
- 2024RigorLLM: Resilient Guardrails for Large Language Models against Undesired Contentcited by 65
- 2023Hijacking Large Language Models via Adversarial In-Context Learningcited by 41
- 2024Leveraging the Context through Multi-Round Interactions for Jailbreaking Attackscited by 32
- 2025Short-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical Evidencecited by 13
- 2024Exploring Vulnerabilities and Protections in Large Language Models: A Surveycited by 10
- 2024AdaPPA: Adaptive Position Pre-Fill Jailbreak Attack Approach Targeting LLMscited by 8
- 2024Neutralizing Backdoors through Information Conflicts for Large Language Modelscited by 4
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defensescited by 4
12 most cited of 14 All 14 (JSON)
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defenses17 Oct 2025
- 2025SoK: A Comprehensive Security Analysis of Jailbreak Resilience in GPT and DeepSeek Models23 Jun 2025
- 2025Geometry-Guided Adversarial Prompt Detection via Curvature and Local Intrinsic Dimension5 Mar 2025
- 2025Short-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical Evidence6 Feb 2025
- 2024Neutralizing Backdoors through Information Conflicts for Large Language Models27 Nov 2024
- 2024AdaPPA: Adaptive Position Pre-Fill Jailbreak Attack Approach Targeting LLMs11 Sep 2024
- 2024Jailbreak Attacks and Defenses Against Large Language Models: A Survey5 Jul 2024
- 2024Exploring Vulnerabilities and Protections in Large Language Models: A Survey1 Jun 2024
- 2024RigorLLM: Resilient Guardrails for Large Language Models against Undesired Content19 Mar 2024
- 2024Leveraging the Context through Multi-Round Interactions for Jailbreaking Attacks14 Feb 2024
- 2024Security and Privacy Challenges of Large Language Models: A Survey30 Jan 2024
- 2023Hijacking Large Language Models via Adversarial In-Context Learning16 Nov 2023
12 newest of 14 All 14 (JSON)
- 2024Breaking Agents: Compromising Autonomous LLM Agents Through Malfunction Amplificationcited by 80
- 2025From Prompt Injections to Protocol Exploits: Threats in LLM-Powered AI Agents Workflowscited by 57
- 2024Security of AI Agentscited by 24
- 2025A Framework for Studying AI Agent Behavior: Evidence from Consumer Choice Experimentscited by 10
- 2025LLM Agents Are Hypersensitive to Nudgescited by 5
- 2025A First Look at the Security Issues in the Model Context Protocol Ecosystemcited by 3
- 2026Position: Behavioral Systems Require Behavioral Testscited by 1
- 2026Position: Behavioral Systems Require Behavioral Tests31 May 2026
- 2025A First Look at the Security Issues in the Model Context Protocol Ecosystem18 Oct 2025
- 2025A Framework for Studying AI Agent Behavior: Evidence from Consumer Choice Experiments30 Sep 2025
- 2025From Prompt Injections to Protocol Exploits: Threats in LLM-Powered AI Agents Workflows29 Jun 2025
- 2025LLM Agents Are Hypersensitive to Nudges16 May 2025
- 2024Breaking Agents: Compromising Autonomous LLM Agents Through Malfunction Amplification30 Jul 2024
- 2024Security of AI Agents12 Jun 2024
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMscited by 533
- 2024Can We Trust Embodied Agents? Exploring Backdoor Attacks against Embodied LLM-based Decision-Making Systemscited by 23
- 2024Preemptive Answer "Attacks" on Chain-of-Thought Reasoningcited by 16
- 2025Chain-of-Thought Driven Adversarial Scenario Extrapolation for Robust Language Modelscited by 4
- 2024Can't say cant? Measuring and Reasoning of Dark Jargons in Large Language Modelscited by 0
- 2026Can We Trust LLM's Logic? Quantifying Uncertainty, Coherence, and Robustness via a Graph-Based Frameworkcited by 0
- 2026Alignment of LRMs via Counter-Aligned Few-Shot Conversation Exposurecited by 0
- 2026Alignment of LRMs via Counter-Aligned Few-Shot Conversation Exposure16 Aug 2026
- 2026Can We Trust LLM's Logic? Quantifying Uncertainty, Coherence, and Robustness via a Graph-Based Framework9 Jul 2026
- 2025Chain-of-Thought Driven Adversarial Scenario Extrapolation for Robust Language Models20 May 2025
- 2024Preemptive Answer "Attacks" on Chain-of-Thought Reasoning31 May 2024
- 2024Can We Trust Embodied Agents? Exploring Backdoor Attacks against Embodied LLM-based Decision-Making Systems27 May 2024
- 2024Can't say cant? Measuring and Reasoning of Dark Jargons in Large Language Models25 Apr 2024
- 2024How Johnny Can Persuade LLMs to Jailbreak Them: Rethinking Persuasion to Challenge AI Safety by Humanizing LLMs12 Jan 2024
- 2024JailbreakZoo: Survey, Landscapes, and Horizons in Jailbreaking Large Language and Vision-Language Modelscited by 67
- 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safetycited by 63
- 2023Hijacking Context in Large Multi-modal Modelscited by 6
- 2026Visual Persuasion: What Influences Decisions of Vision-Language Models?cited by 1
- 2025Innocence in the Crossfire: Roles of Skip Connections in Jailbreaking Visual Language Modelscited by 0
- 2026Evolving Safety Landscape of Multi-modal Large Language Models: A Survey of Emerging Threats and Safeguardscited by 0
- 2026Evolving Safety Landscape of Multi-modal Large Language Models: A Survey of Emerging Threats and Safeguards27 Jul 2026
- 2026Visual Persuasion: What Influences Decisions of Vision-Language Models?17 Feb 2026
- 2025Innocence in the Crossfire: Roles of Skip Connections in Jailbreaking Visual Language Models18 Jul 2025
- 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safety2 Feb 2025
- 2024JailbreakZoo: Survey, Landscapes, and Horizons in Jailbreaking Large Language and Vision-Language Models26 Jun 2024
- 2023Hijacking Context in Large Multi-modal Models7 Dec 2023
- 2023Large Language Models Sensitivity to The Order of Options in Multiple-Choice Questionscited by 249
- 2023Foundational Models Defining a New Era in Vision: A Survey and Outlookcited by 109
- 2023Use of LLMs for Illicit Purposes: Threats, Prevention Measures, and Vulnerabilitiescited by 76
- 2023Unleashing the potential of prompt engineering for large language modelscited by 72
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directionscited by 48
- 2023MathAttack: Attacking Large Language Models Towards Math Solving Abilitycited by 31
- 2023DeceptPrompt: Exploiting LLM-driven Code Generation via Adversarial Natural Language Instructionscited by 31
- 2024Unveiling Selection Biases: Exploring Order and Token Sensitivity in Large Language Modelscited by 20
- 2024Exploring the Robustness of In-Context Learning with Noisy Labelscited by 13
- 2025Attack and defense techniques in large language models: A survey and new perspectivescited by 13
- 2025Pay Attention to Attention Distribution: A New Local Lipschitz Bound for Transformerscited by 10
- 2024Can LLMs be Fooled? Investigating Vulnerabilities in LLMscited by 5
12 most cited of 21 All 21 (JSON)
- 2026When Correct Demonstrations Hurt: Rethinking the Role of Exemplars in In-Context Learning25 May 2026
- 2026Do as I Say, Not as I Do: Instruction-Induction Conflict in LLMs19 May 2026
- 2026Understanding the Dynamics of Demonstration Conflict in In-Context Learning3 Mar 2026
- 2025Pay Attention to Attention Distribution: A New Local Lipschitz Bound for Transformers10 Jul 2025
- 2025Attack and defense techniques in large language models: A survey and new perspectives2 May 2025
- 2025TestDG: Test-time Domain Generalization for Continual Test-time Adaptation7 Apr 2025
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classification21 Feb 2025
- 2024The Best Defense is a Good Offense: Countering LLM-Powered Cyberattacks20 Oct 2024
- 2024MILE: A Mutation Testing Framework of In-Context Learning Systems7 Sep 2024
- 2024Can LLMs be Fooled? Investigating Vulnerabilities in LLMs30 Jul 2024
- 2024Unveiling Selection Biases: Exploring Order and Token Sensitivity in Large Language Models5 Jun 2024
- 2024Exploring the Robustness of In-Context Learning with Noisy Labels28 Apr 2024
12 newest of 21 All 21 (JSON)