[Paper Review] A Unified Evaluation of Textual Backdoor Learning: Frameworks and Benchmarks
This paper defines real-world scenarios, introduces new evaluation metrics for stealthiness and validity, releases an OpenBackdoor toolkit, benchmarks attacks/defenses, and proposes a clustering-based defense CUBE.
Textual backdoor attacks are a kind of practical threat to NLP systems. By injecting a backdoor in the training phase, the adversary could control model predictions via predefined triggers. As various attack and defense models have been proposed, it is of great significance to perform rigorous evaluations. However, we highlight two issues in previous backdoor learning evaluations: (1) The differences between real-world scenarios (e.g. releasing poisoned datasets or models) are neglected, and we argue that each scenario has its own constraints and concerns, thus requires specific evaluation protocols; (2) The evaluation metrics only consider whether the attacks could flip the models' predictions on poisoned samples and retain performances on benign samples, but ignore that poisoned samples should also be stealthy and semantic-preserving. To address these issues, we categorize existing works into three practical scenarios in which attackers release datasets, pre-trained models, and fine-tuned models respectively, then discuss their unique evaluation methodologies. On metrics, to completely evaluate poisoned samples, we use grammar error increase and perplexity difference for stealthiness, along with text similarity for validity. After formalizing the frameworks, we develop an open-source toolkit OpenBackdoor to foster the implementations and evaluations of textual backdoor learning. With this toolkit, we perform extensive experiments to benchmark attack and defense models under the suggested paradigm. To facilitate the underexplored defenses against poisoned datasets, we further propose CUBE, a simple yet strong clustering-based defense baseline. We hope that our frameworks and benchmarks could serve as the cornerstones for future model development and evaluations.
Motivation & Objective
- Clarify practical real-world scenarios for textual backdoor evaluation (datasets, pre-trained models, fine-tuned models).
- Propose comprehensive metrics that cover effectiveness, stealthiness, and validity of poisoned samples.
- Provide an open-source benchmarking platform (OpenBackdoor) and conduct extensive attack/defense benchmarks.
- Introduce a simple training-time defense (CUBE) and assess its effectiveness across attack types.
- Offer guidelines and insights to guide future model development and evaluation in textual backdoor learning.
Proposed method
- categorize attack scenarios into three practical settings: releasing datasets, pre-trained models, and fine-tuned models;
- define evaluation metrics for poisoned samples: attack success rate (ASR), clean accuracy (CACC), plus stealthiness (grammar error increase, perplexity difference) and validity (text similarity USE);
- formalize evaluation pipelines tailored to each scenario (poison rate, label consistency, transferability, clean-tuning) so comparisons are fair;
- develop OpenBackdoor, an open-source toolkit implementing 12 attackers and 5 defenders with a standard evaluation pipeline;
- propose CUBE, a clustering-based training-time defense to filter poisoned samples by embedding-space clustering;
- benchmark attacks and defenses across multiple datasets and PLMs to derive insights on factors like dataset size and text length on ASR.
Experimental results
Research questions
- RQ1How do evaluation protocols differ across real-world textual backdoor scenarios (datasets, pre-trained models, fine-tuned models)?
- RQ2What metrics best capture stealthiness and validity of poisoned samples beyond ASR and CACC?
- RQ3How do attacks and defenses perform under standardized OpenBackdoor pipelines across diverse datasets and model types?
- RQ4Can a simple clustering-based defense (CUBE) effectively mitigate training-time backdoors across trigger types including semantic and syntactic/style backdoors?
Key findings
- Three practical attack scenarios are identified and analyzed with scenario-specific evaluation methodologies.
- OpenBackdoor implements 12 attack methods and 5 defense methods to enable comprehensive benchmarking.
- CUBE demonstrates strong ASR reduction while preserving clean accuracy, and effectively defends against syntactic and style-based backdoors where token-focused defenses fail.
- Fine-tuning on large-scale datasets or testing on long texts can significantly affect attack success rates, indicating prior evaluations may overestimate effectiveness.
- The study highlights gaps in defenses against dataset-releasing attackers, motivating the need for broader protective approaches.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.