From Theory to Practice: Evaluating Data Poisoning Attacks and Defenses in In-Context Learning on Social Media Health Discourse
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
This study explored how in-context learning (ICL) in large language models can be disrupted by data poisoning attacks in the setting of public health sentiment analysis. Using tweets of Human Metapneumovirus (HMPV), small adversarial perturbations such as synonym replacement, negation insertion, and randomized perturbation were introduced into the support examples. Even these minor manipulations caused major disruptions, with sentiment labels flipping in up to 67% of cases. To address this, a Spectral Signature Defense was applied, which filtered out poisoned examples while keeping the data's meaning and sentiment intact. After defense, ICL accuracy remained steady at around 46.7%, and logistic regression validation reached 100% accuracy, showing that the defense successfully preserved the dataset's integrity. Overall, the findings extend prior theoretical studies of ICL poisoning to a practical, high-stakes setting in public health discourse analysis, highlighting both the risks and potential defenses for robust LLM deployment. This study also highlights the fragility of ICL under attack and the value of spectral defenses in making AI systems more reliable for health-related social media monitoring.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. First posted on arXiv 4 Oct 2025.
Builds on
0 of 0 references.
No references here yet.
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2024Data Poisoning for In-context Learning
- 2026ToxiREX: A Dataset on Toxic REasoning in ConteXt
- 2025SMARTER: A Data-efficient Framework to Improve Toxicity Detection with Explanation via Self-augmenting Large Language Models
- 2025Rethinking Toxicity Evaluation in Large Language Models: A Multi-Label Perspective
- 2024PoisonBench: Assessing Large Language Model Vulnerability to Data Poisoning
- 2026Measuring and Mitigating Toxicity in Large Language Models: A Comprehensive Replication Study
- 2024Analyzing Toxicity in Deep Conversations: A Reddit Case Study
- 2025Poisoning Attacks on LLMs Require a Near-constant Number of Poison Samples