Injecting Bias into Text Classification Models using Backdoor Attacks
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
The rapid growth of natural language processing (NLP) and pre-trained language models have enabled accurate text classification in a variety of settings. However, text classification models are susceptible to backdoor attacks, where an attacker embeds a trigger into the victim model to make the model predict attacker-desired labels in targeted scenarios. In this paper, we propose to utilize backdoor attacks for a new purpose: bias injection. We develop a backdoor attack in which a subset of the training dataset is poisoned to associate strong male actors with negative sentiment. We execute our attack on two popular text classification datasets (IMDb and SST) and seven different models ranging from traditional Doc2Vec-based models to LSTM networks and modern transformer-based BERT and RoBERTa models. Our results show that the reduction in backdoored models' benign classification accuracy is limited, implying that our attacks remain stealthy, whereas the models successfully learn to associate strong male actors with negative sentiment (100% attack success rate with >= 3% poison rate). Attacks on BERT and RoBERTa are particularly more stealthy and effective, demonstrating an increased risk of using modern and larger models. We also measure the generalizability of our bias injection by proposing two metrics: (i) U-BBSR which uses previously unseen words when measuring attack success, and (ii) P-BBSR which measures attack success using paraphrased test samples. U-BBSR and P-BBSR results show that the bias injected by our attack can go beyond memorizing a trigger phrase.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 6 of its 29 references that are in the map. First posted on arXiv 25 Dec 2024.
Builds on
6 of 29 references.
References · 6
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
- 2019Mitigating Gender Bias in Natural Language Processing: Literature Reviewcited by 287
- 2020On Adversarial Bias and the Robustness of Fair Machine Learningcited by 36
- 2023Backdoor for Debias: Mitigating Model Bias with Backdoor Attack-based Artificial Biascited by 3
- 2023Beyond Detection: Unveiling Fairness Vulnerabilities in Abusive Language Modelscited by 3
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2021Be Careful about Poisoned Word Embeddings: Exploring the Vulnerability of the Embedding Layers in NLP Models
- 2022BITE: Textual Backdoor Attacks with Iterative Trigger Injection
- 2024Large Language Models are Good Attackers: Efficient and Stealthy Textual Backdoor Attacks
- 2023Attention-Enhancing Backdoor Attacks Against BERT-based Models
- 2022Detecting Backdoors in Deep Text Classifiers
- 2025Strategic Sample Selection for Improved Clean-Label Backdoor Attacks in Text Classification
- 2022Expose Backdoors on the Way: A Feature-Based Efficient Defense against Textual Backdoor Attacks
- 2022A Unified Evaluation of Textual Backdoor Learning: Frameworks and Benchmarks