[Paper Review] TREATED:Towards Universal Defense against Textual Adversarial Attacks
TREATED proposes a universal adversarial detection method for textual attacks that identifies adversarial examples by leveraging a set of reference models derived from decomposed embedding layers of a victim model. Without assuming attack types or perturbation levels, TREATED achieves up to 9.3% higher F1 scores and over 88% accuracy improvement across diverse attacks, outperforming state-of-the-art baselines while preserving original model performance.
Recent work shows that deep neural networks are vulnerable to adversarial examples. Much work studies adversarial example generation, while very little work focuses on more critical adversarial defense. Existing adversarial detection methods usually make assumptions about the adversarial example and attack method (e.g., the word frequency of the adversarial example, the perturbation level of the attack method). However, this limits the applicability of the detection method. To this end, we propose TREATED, a universal adversarial detection method that can defend against attacks of various perturbation levels without making any assumptions. TREATED identifies adversarial examples through a set of well-designed reference models. Extensive experiments on three competitive neural networks and two widely used datasets show that our method achieves better detection performance than baselines. We finally conduct ablation studies to verify the effectiveness of our method.
Motivation & Objective
- To develop a universal defense against textual adversarial attacks that does not rely on assumptions about attack methods or adversarial example characteristics.
- To improve adversarial detection performance across diverse perturbation levels—word-level, character-level, and multi-level attacks—without retraining the victim model.
- To maintain high detection accuracy while preserving the original classification performance of the victim model.
- To empirically and theoretically validate the effectiveness of using decomposed embedding layers to construct reference models for adversarial detection.
Proposed method
- TREATED constructs a set of reference models by decomposing the embedding layer of the victim model, ensuring consistent predictions on clean inputs and inconsistent predictions on adversarial inputs.
- The method uses the prediction disagreement among reference models as a signal to detect adversarial examples, without requiring assumptions about attack strategies or perturbation patterns.
- Theoretical analysis establishes upper and lower bounds for detection accuracy, providing a formal justification for the method’s robustness.
- Empirical validation uses three neural network architectures (CNN, LSTM, RoBERTa) and two datasets (SST-2, IMDb) to evaluate detection performance under various attack types.
- Ablation studies compare the proposed embedding decomposition method with standard training models as reference models, demonstrating superior detection performance.
- Detection performance is evaluated using F1 score, true positive rate (TPR), false positive rate (FPR), and accuracy improvement on victim models.
Experimental results
Research questions
- RQ1Can a universal adversarial detection method be designed without assuming specific attack types or adversarial example characteristics?
- RQ2How effective is embedding layer decomposition in generating reference models that consistently predict clean examples but inconsistently predict adversarial examples?
- RQ3What is the theoretical upper and lower bound of detection accuracy achievable by such a reference model-based approach?
- RQ4How does TREATED perform across different perturbation levels (word-level, character-level, multi-level) compared to state-of-the-art methods?
- RQ5To what extent does TREATED affect the original accuracy of the victim model on unperturbed data?
Key findings
- TREATED improves the F1 score by up to 9.3% compared to the state-of-the-art method FGWS on the CNN model and IMDb dataset.
- On the RoBERTa model, TREATED increases model accuracy by over 40% across all attack types, including PWWS (+64.7%), Genetic (+40.0%), DeepWordBug (+40.4%), and TextBugger (+45.0%).
- For the most challenging multi-level attacks, TREATED increases victim model accuracy by 77.4%, with a TPR above 96% and FPR below 6%.
- The method causes minimal performance degradation on unperturbed data, reducing original accuracy by only 3.5% on WordCNN and 2.6% on RoBERTa.
- Ablation studies confirm that embedding decomposition produces significantly better reference models than standard training models, with p increasing from 0.7052 to 0.8840 and q decreasing from 0.6471 to 0.5006 across models.
- TREATED maintains high detection performance across diverse models and datasets, demonstrating strong generalization and robustness against varied attack strategies.
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.