Detecting Stealthy Backdoor Samples based on Intra-class Distance for Large Language Models
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
Stealthy data poisoning during fine-tuning can backdoor large language models (LLMs), threatening downstream safety. Existing detectors either use classifier-style probability signals--ill-suited to generation--or rely on rewriting, which can degrade quality and even introduce new triggers. We address the practical need to efficiently remove poisoned examples before or during fine-tuning. We observe a robust signal in the response space: after applying TF-IDF to model responses, poisoned examples form compact clusters (driven by consistent malicious outputs), while clean examples remain dispersed. We leverage this with RFTC--Reference-Filtration + TF-IDF Clustering. RFTC first compares each example's response with that of a reference model and flags those with large deviations as suspicious; it then performs TF-IDF clustering on the suspicious set and identifies true poisoned examples using intra-class distance. On two machine translation datasets and one QA dataset, RFTC outperforms prior detectors in both detection accuracy and the downstream performance of the fine-tuned models. Ablations with different reference models further validate the effectiveness and robustness of Reference-Filtration.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 36 of its 62 references that are in the map. First posted on arXiv 29 May 2025.
Builds on
36 of 62 references.
Closest ancestors · 14
Same direction, newest first
- 2024Gracefully Filtering Backdoor Samples for Generative Large Language Models without Retraining3 Dec
- 2023Backdooring Instruction-Tuned Large Language Models with Virtual Prompt Injection31 Jul
- 2023IMBERT: Making BERT Immune to Insertion-based Backdoor Attacks25 May
- 2023Defending against Insertion-based Textual Backdoor Attacks via Attribution3 May
- 2023BDMMT: Backdoor Sample Detection for Language Models through Model Mutation Testing25 Jan
- 2022A Unified Evaluation of Textual Backdoor Learning: Frameworks and Benchmarks17 Jun
- 2022Kallima: A Clean-label Framework for Textual Backdoor Attacks3 Jun
- 2022BITE: Textual Backdoor Attacks with Iterative Trigger Injection25 May
- 2021Triggerless Backdoor Attack for NLP Tasks with Clean Labels15 Nov
- 2021RAP: Robustness-Aware Perturbations for Defending against Backdoor Attacks on NLP Models15 Oct
- 2021Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style Transfer14 Oct
- 2021Turn the Combination Lock: Learnable Textual Backdoor Attacks via Word Substitution11 Jun
2 more
Other references · 22
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
- 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 4,993
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
- 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,157
- 2018A Call for Clarity in Reporting BLEU Scorescited by 1,790
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,538
- 2018Don't Give Me the Details, Just the Summary! Topic-Aware Convolutional Neural Networks for Extreme Summarizationcited by 1,308
- 2018CoQA: A Conversational Question Answering Challengecited by 674
- 2019STRIP: A Defence Against Trojan Attacks on Deep Neural Networkscited by 437
- 2020Weight Poisoning Attacks on Pre-trained Modelscited by 318
10 more
- 2020Improving Massively Multilingual Neural Machine Translation and Zero-Shot Translationcited by 277
- 2020ONION: A Simple and Effective Defense Against Textual Backdoor Attackscited by 231
- 2019A backdoor attack against LSTM-based text classification systemscited by 214
- 2020BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvementscited by 191
- 2023Zhongjing: Enhancing the Chinese Medical Capabilities of Large Language Model through Expert Feedback and Real-world Multi-turn Dialoguecited by 118
- 2020Mitigating backdoor attacks in LSTM-based Text Classification Systems by Backdoor Keyword Identificationcited by 80
- 2020Trojaning Language Models for Fun and Profitcited by 80
- 2019Design and Evaluation of a Multi-Domain Trojan Detection Method on Deep Neural Networkscited by 66
- 2023Mitigating Backdoor Poisoning Attacks through the Lens of Spurious Correlationcited by 19
- 2025CodeBC: A More Secure Large Language Model for Smart Contract Code Generation in Blockchaincited by 2
Built on by
Citing papers per year: 2026: 1.
1 paper.