Abstract
Deep neural networks (DNNs) are vulnerable to backdoor attack, which does not affect the network's performance on clean data but would manipulate the network behavior once a trigger pattern is added. Existing defense methods have greatly reduced attack success rate, but their prediction accuracy on clean data still lags behind a clean model by a large margin. Inspired by the stealthiness and effectiveness of backdoor attack, we propose a simple but highly effective defense framework which injects non-adversarial backdoors targeting poisoned samples. Following the general steps in backdoor attack, we detect a small set of suspected samples and then apply a poisoning strategy to them. The non-adversarial backdoor, once triggered, suppresses the attacker's backdoor on poisoned data, but has limited influence on clean data. The defense can be carried out during data preprocessing, without any modification to the standard end-to-end training pipeline. We conduct extensive experiments on multiple benchmarks with different architectures and representative attacks. Results demonstrate that our method achieves state-of-the-art defense effectiveness with by far the lowest performance drop on clean data. Considering the surprising defense ability displayed by our framework, we call for more attention to utilizing backdoor for backdoor defense.
Introduction
Deep Neural Networks (DNNs) are notoriously vulnerable to backdoor attacks. In these scenarios, an attacker injects a small amount of "poisoned" data into the training set containing a specific trigger (like a small pixel patch). While the model behaves normally on clean images, it flips to a malicious target class whenever it encounters that trigger.
The primary challenge for current defenses is the "performance tax": most methods that successfully stop attacks also significantly degrade the model's accuracy on normal, clean data. This research introduces a "fight fire with fire" approach called Non-Adversarial Backdoor (NAB). By injecting benign, defensive backdoors, the framework effectively neutralizes malicious triggers while maintaining industry-leading accuracy on clean data.
The NAB Framework
Instead of attempting to perfectly filter out every poisoned image—a task that often leads to high false-positive rates—NAB utilizes the same mechanism the attacker uses, but for defensive purposes. The process follows a streamlined pipeline that integrates into standard training workflows.
- Detection: The defender uses existing methods (like Local Gradient Ascent or SPECTRE) to identify a small subset of "suspicious" samples in the training data.
- The "Stamp and Relabel" Strategy: For these suspicious samples, the defender applies a custom trigger—a 2x2 pixel "stamp"—and assigns them a "pseudo-label" (the predicted true class).
- Training: The model is trained on this modified dataset. Because DNNs have a high capacity for learning strong correlations, the model learns that when the defender's stamp is present, it should follow the defender’s label, effectively overriding the attacker's malicious trigger.
- Inference & Filtering: During testing, the defender can optionally "stamp" incoming images. If the model's prediction changes significantly when the stamp is added, the system flags the input as a potential attack.
Why It Works: Backdoors as a Defensive Feature
The core insight of NAB is that the "excessive learning ability" making DNNs vulnerable to attacks can be harnessed for defense. If a model can learn a malicious correlation, it can learn a defensive one even more strongly.
As shown in the t-SNE visualizations above, the defensive stamp creates a dominant correlation. By injecting a competing backdoor, the defender doesn't need to find 100% of the poisoned data; they only need enough to establish a dominant benign correlation that suppresses the attacker's influence. Because the "stamp" is only active when the defender chooses to apply it, the model’s behavior on standard, unstamped clean data remains almost entirely untouched.
Experimental Evaluation
The authors evaluated NAB against five representative backdoor attacks (BadNets, Blend, Dynamic, WaNet, and Clean-Label) using standard benchmarks like CIFAR-10 and tiny-ImageNet across ResNet-18 and ResNet-50 architectures.
- Attack Success Rate (ASR) Reduction: On CIFAR-10, NAB reduced the ASR of most attacks from near 100% down to less than 1%.
- Clean Accuracy (CA) Preservation: While competing methods often see clean accuracy drop by 4-5%, NAB maintained accuracy within 1-2% of a clean, un-attacked model. For example, on ResNet-18, NAB achieved 92.44% clean accuracy compared to the "No Defense" baseline of 94.02%.
Conclusion
NAB demonstrates that backdoors can be a powerful tool for defense rather than just a security flaw. By overriding malicious correlations with benign ones, the framework achieves state-of-the-art protection without sacrificing the utility of the model. Future work will explore invisible defensive stamps and the minimum number of samples required to effectively "vaccinate" a model against emerging threats.
Summary updated