Research map / Adversarial robustness and security / Backdoor and poisoning
ONION: A Simple and Effective Defense Against Textual Backdoor Attacks
Fanchao Qi, Yangyi Chen, Mukai Li, Yuan Yao, Zhiyuan Liu, Maosong Sun
Tsinghua University · Beihang University · Huazhong University of Science and Technology · Beijing National Research Center for Information Science and Technology
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| remove outlier words with ONION at test time | backdoored BiLSTM/BERT · SST-2, OffensEval, AG News (five attacks) | ΔASR: average ΔASR up to 56% | Improved |
| apply ONION (tuned t_s) to the victim model | backdoored models · all datasets | ΔCACC: average ΔCACC 0.99 | No clear effect |
| set t_s=0 instead of tuning on validation set (ablation) | ONION · SST-2 | ΔASR' / ΔCACC': ΔASR' 57.62%, ΔCACC' 2.15 | Mixed |
| compare ONION with BKI in the pre-training attack situation | BiLSTM, BERT-T · SST-2 | average ΔASR: 16.07% (BKI) -> 44.43% (ONION) | Improved |
| use ONION instead of BKI | BiLSTM, BERT-T · SST-2 | average ΔCACC: 0.87 (BKI) -> 1.41 (ONION) | Hurt |
| remove the trigger word from a poisoned sample (ablation) | BERT-T with BadNet · SST-2 poisoned test | ASR: 100% -> 18.12% | Improved |
| remove normal words while retaining the trigger (ablation) | BERT-T with BadNet · SST-2 poisoned test | ASR: ASR stays 100% | No clear effect |
| mistakenly remove more normal words (ablation) | BERT-T with BadNet · SST-2 normal test | CACC: CACC 90.29 with 0 removed vs 89.95 overall | No clear effect |
| decrease suspicion score threshold t_s (ablation) | ONION · SST-2 | ASR / CACC | Mixed |
| replace threshold-based removal with particle swarm / genetic algorithm search (ablation) | ONION · SST-2, OffensEval, AG News | ΔASR / ΔCACC | No clear effect |
Later papers that compared with this method
20 later accepted papers report ONION as a baseline in their results tables; 20 of them report a better number on most of the results they share with it.
- ConfGuard: A Simple and Effective Backdoor Detection for Large Language Models (AAAI 2026 · better on 4 of 5 shared results)
- Guardrails without Shackles: Mitigating Over-Defense in Inference-Time Detection of Fixed-Target Backdoors for LLMs (EMNLP 2026 · better on 4 of 4 shared results)
- BYORn: Bootstrap Your Own Responses to Defend Large Vision-Language Models Against Backdoor Attacks (ICML 2026 · better on 3 of 3 shared results)
- DUP: Detection-guided Unlearning for Backdoor Purification in Language Models (AAAI 2026 · better on 2 of 2 shared results)
- Unmasking Backdoors: An Explainable Defense via Gradient-Attention Anomaly Scoring for Pre-trained Language Models (ICLR 2026 · better on 1 of 1 shared result)
- ICLShield: Exploring and Mitigating In-Context Learning Backdoor Attacks (ICML 2025 · better on 3 of 3 shared results)
- Probe before You Talk: Towards Black-box Defense against Backdoor Unalignment for Large Language Models (ICLR 2025 · better on 2 of 2 shared results)
- Cut the Deadwood Out: Backdoor Purification via Guided Module Substitution (EMNLP 2025 · better on 1 of 1 shared result)
12 more not listed.
Matched by method name in results tables read by AI. Authors' own tables tend to favour the newer method, and a comparison can be missed when a method is renamed.
Closest papers by meaning
- Defending against Backdoor Attacks in Natural Language Generation (AAAI 2023 · similarity 0.88)
- BackdoorLLM: A Comprehensive Benchmark for Backdoor Attacks and Defenses on Large Language Models (NeurIPS 2025 · similarity 0.86)
- Defense against Backdoor Attack on Pre-trained Language Models via Head Pruning and Attention Normalization (ICML 2024 · similarity 0.85)
- Backdoor Token Unlearning: Exposing and Defending Backdoors in Pretrained Language Models (AAAI 2025 · similarity 0.85)
- LT-Defense: Searching-free Backdoor Defense via Exploiting the Long-tailed Effect (NeurIPS 2024 · similarity 0.85)
- Certifying Language Model Robustness with Fuzzed Randomized Smoothing: An Efficient Defense Against Backdoor Attacks (ICLR 2025 · similarity 0.84)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
