Data Poisoning for In-context Learning
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
In the domain of large language models (LLMs), in-context learning (ICL) has been recognized for its innovative ability to adapt to new tasks, relying on examples rather than retraining or fine-tuning. This paper delves into the critical issue of ICL's susceptibility to data poisoning attacks, an area not yet fully explored. We wonder whether ICL is vulnerable, with adversaries capable of manipulating example data to degrade model performance. To address this, we introduce ICLPoison, a specialized attacking framework conceived to exploit the learning mechanisms of ICL. Our approach uniquely employs discrete text perturbations to strategically influence the hidden states of LLMs during the ICL process. We outline three representative strategies to implement attacks under our framework, each rigorously evaluated across a variety of models and tasks. Our comprehensive tests, including trials on the sophisticated GPT-4 model, demonstrate that ICL's performance is significantly compromised under our framework. These revelations indicate an urgent need for enhanced defense mechanisms to safeguard the integrity and reliability of LLMs in applications relying on in-context learning.
Key facts. Cited by 21 papers in the map (data through 7 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. First posted on arXiv 3 Feb 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 5; 2025: 11; 2026: 5.
21 papers.
Sort:
By area:
- 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safetycited by 63
- 2024LoRATK: LoRA Once, Backdoor Everywhere in the Share-and-Play Ecosystemcited by 22
- 2025Data Poisoning in Deep Learning: A Surveycited by 20
- 2025Emergent Misalignment via In-Context Learning: Narrow in-context examples can produce broadly misaligned LLMscited by 17
- 2024Cognitive Overload Attack:Prompt Injection for Long Contextcited by 13
- 2024SafeEmbodAI: a Safety Framework for Mobile Robots in Embodied AI Systemscited by 12
- 2024Understanding In-Context Learning of Linear Models in Transformers Through an Adversarial Lenscited by 7
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classificationcited by 4
- 2026The Generative AI Paradox: GenAI and the Erosion of Trust, the Corrosion of Information Verification, and the Demise of Truthcited by 4
- 2024Towards the Effect of Examples on In-Context Learning: A Theoretical Case Studycited by 2
- 2025Revitalizing Black-Box Interpretability: Actionable Interpretability for LLMs via Proxy Modelscited by 2
- 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?cited by 2
9 more
- 2025Impact of Positional Encoding: Clean and Adversarial Rademacher Complexity for Transformers under In-Context Regressioncited by 2
- 2026Automation-Exploit: A Multi-Agent LLM Framework for Adaptive Offensive Security with Digital Twin-Based Risk-Mitigated Exploitationcited by 1
- 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directionscited by 1
- 2025Robust In-Context Reinforcement Learning Under Reward Poisoning Attackscited by 0
- 2025Report on NSF Workshop on Science of Safe AIcited by 0
- 2025Data Security in Large Language Models: Risks, Defense, and Directionscited by 0
- 2025Membership Inference Attacks on In-Context Examples in LLM-based Recommender Systemscited by 0
- 2026Meta-Sel: Efficient Demonstration Selection for In-Context Learning via Supervised Meta-Learningcited by 0
- 2026Fixed-Set Robustness in Programming by Example: Example Corruption and Semantic Partition Recoverycited by 0
- 2026Isolation as a First-Class Principle for LLM-Agent System Safety: Concepts, Taxonomy, Challenges and Future Directions14 Jul 2026
- 2026Fixed-Set Robustness in Programming by Example: Example Corruption and Semantic Partition Recovery1 Jul 2026
- 2026Automation-Exploit: A Multi-Agent LLM Framework for Adaptive Offensive Security with Digital Twin-Based Risk-Mitigated Exploitation24 Apr 2026
- 2026Meta-Sel: Efficient Demonstration Selection for In-Context Learning via Supervised Meta-Learning12 Feb 2026
- 2026The Generative AI Paradox: GenAI and the Erosion of Trust, the Corrosion of Information Verification, and the Demise of Truth1 Jan 2026
- 2025Impact of Positional Encoding: Clean and Adversarial Rademacher Complexity for Transformers under In-Context Regression10 Dec 2025
- 2025Emergent Misalignment via In-Context Learning: Narrow in-context examples can produce broadly misaligned LLMs13 Oct 2025
- 2025How Can Mamba Learn In Context with Outliers and Generalize Provably?1 Oct 2025
- 2025Membership Inference Attacks on In-Context Examples in LLM-based Recommender Systems26 Aug 2025
- 2025Data Security in Large Language Models: Risks, Defense, and Directions4 Aug 2025
- 2025Report on NSF Workshop on Science of Safe AI24 Jun 2025
- 2025Robust In-Context Reinforcement Learning Under Reward Poisoning Attacks7 Jun 2025
9 more
- 2025Revitalizing Black-Box Interpretability: Actionable Interpretability for LLMs via Proxy Models18 May 2025
- 2025Data Poisoning in Deep Learning: A Survey27 Mar 2025
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classification21 Feb 2025
- 2025Safety at Scale: A Comprehensive Survey of Large Model and Agent Safety2 Feb 2025
- 2024Understanding In-Context Learning of Linear Models in Transformers Through an Adversarial Lens7 Nov 2024
- 2024Cognitive Overload Attack:Prompt Injection for Long Context15 Oct 2024
- 2024Towards the Effect of Examples on In-Context Learning: A Theoretical Case Study12 Oct 2024
- 2024SafeEmbodAI: a Safety Framework for Mobile Robots in Embodied AI Systems3 Sep 2024
- 2024LoRATK: LoRA Once, Backdoor Everywhere in the Share-and-Play Ecosystem29 Feb 2024
- 2025Data Poisoning in Deep Learning: A Surveycited by 20
- 2024Cognitive Overload Attack:Prompt Injection for Long Contextcited by 13
- 2025Data Security in Large Language Models: Risks, Defense, and Directionscited by 0
- 2025Membership Inference Attacks on In-Context Examples in LLM-based Recommender Systemscited by 0
- 2025Membership Inference Attacks on In-Context Examples in LLM-based Recommender Systems26 Aug 2025
- 2025Data Security in Large Language Models: Risks, Defense, and Directions4 Aug 2025
- 2025Data Poisoning in Deep Learning: A Survey27 Mar 2025
- 2024Cognitive Overload Attack:Prompt Injection for Long Context15 Oct 2024
- 2024LoRATK: LoRA Once, Backdoor Everywhere in the Share-and-Play Ecosystemcited by 22
- 2025Emergent Misalignment via In-Context Learning: Narrow in-context examples can produce broadly misaligned LLMscited by 17
- 2024SafeEmbodAI: a Safety Framework for Mobile Robots in Embodied AI Systemscited by 12
- 2024Understanding In-Context Learning of Linear Models in Transformers Through an Adversarial Lenscited by 7
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classificationcited by 4
- 2026The Generative AI Paradox: GenAI and the Erosion of Trust, the Corrosion of Information Verification, and the Demise of Truthcited by 4
- 2024Towards the Effect of Examples on In-Context Learning: A Theoretical Case Studycited by 2
- 2025Revitalizing Black-Box Interpretability: Actionable Interpretability for LLMs via Proxy Modelscited by 2
- 2025Impact of Positional Encoding: Clean and Adversarial Rademacher Complexity for Transformers under In-Context Regressioncited by 2
- 2025Robust In-Context Reinforcement Learning Under Reward Poisoning Attackscited by 0
- 2025Report on NSF Workshop on Science of Safe AIcited by 0
- 2026Meta-Sel: Efficient Demonstration Selection for In-Context Learning via Supervised Meta-Learningcited by 0
12 most cited of 13 All 13 (JSON)
- 2026Fixed-Set Robustness in Programming by Example: Example Corruption and Semantic Partition Recovery1 Jul 2026
- 2026Meta-Sel: Efficient Demonstration Selection for In-Context Learning via Supervised Meta-Learning12 Feb 2026
- 2026The Generative AI Paradox: GenAI and the Erosion of Trust, the Corrosion of Information Verification, and the Demise of Truth1 Jan 2026
- 2025Impact of Positional Encoding: Clean and Adversarial Rademacher Complexity for Transformers under In-Context Regression10 Dec 2025
- 2025Emergent Misalignment via In-Context Learning: Narrow in-context examples can produce broadly misaligned LLMs13 Oct 2025
- 2025Report on NSF Workshop on Science of Safe AI24 Jun 2025
- 2025Robust In-Context Reinforcement Learning Under Reward Poisoning Attacks7 Jun 2025
- 2025Revitalizing Black-Box Interpretability: Actionable Interpretability for LLMs via Proxy Models18 May 2025
- 2025On the Robustness of Transformers against Context Hijacking for Linear Classification21 Feb 2025
- 2024Understanding In-Context Learning of Linear Models in Transformers Through an Adversarial Lens7 Nov 2024
- 2024Towards the Effect of Examples on In-Context Learning: A Theoretical Case Study12 Oct 2024
- 2024SafeEmbodAI: a Safety Framework for Mobile Robots in Embodied AI Systems3 Sep 2024
12 newest of 13 All 13 (JSON)