Universal Soldier: Using Universal Adversarial Perturbations for Detecting Backdoor Attacks

Xiaoyun Xu, Oguzhan Ersoy, Behrad Tajalli, Stjepan Picek

Introduction

Deep learning models are increasingly outsourced or downloaded from public "model zoos," making them vulnerable to backdoor attacks. In these scenarios, a model is trained to behave normally on clean data but misclassify inputs to a specific target class whenever a "trigger" (such as a small square or a specific texture) is present. Existing defenses, such as Neural Cleanse (NC), attempt to detect these by reverse-engineering potential triggers for every possible class. However, these methods often fall into local optima, mistake legitimate features for triggers, and require significant computation time.

This paper introduces Universal Soldier for Backdoor Detection (USB), a method that leverages Universal Adversarial Perturbations (UAPs) to identify these hidden shortcuts, offering faster and more accurate detection than previous state-of-the-art methods.

The USB Methodology

The core innovation of USB is the use of Universal Adversarial Perturbations (UAPs) as the starting point for detection. A UAP is a single, input-agnostic noise pattern that can fool a model on most images. The authors observe that if a class is backdoored, the UAP required to reach it is significantly smaller because the backdoor has already built a "shortcut" in the decision space.

Two-Stage Detection Pipeline

  1. Targeted UAP Generation: For every class in the model, the algorithm finds the minimal perturbation needed to push a small set of clean images into that class. Starting with a UAP provides a "warm start" that is already oriented toward the model's vulnerabilities, avoiding the local optima that plague random-noise-based methods.
  2. Optimization: Once a UAP is generated, it is refined using a mask-and-pattern optimization process. This process uses a loss function that balances cross-entropy loss (ensuring the pattern causes misclassification), Structural Similarity (SSIM), and the $L_1$ norm to minimize the trigger size.
Visualization of a generated Universal Adversarial Perturbation (UAP) used as a starting point for backdoor detection.

By comparing the size ($L_1$ norm) of these optimized patterns across all classes, the "outlier" with the smallest norm is flagged as the backdoor trigger.

Experimental Evaluation

The authors evaluated USB across 240 models using several standard benchmarks, including CIFAR-10, GTSRB, and a 10-class subset of ImageNet. They tested against three types of attacks: BadNet (standard patch triggers), Latent Backdoor, and the highly stealthy Input-Aware Dynamic (IAD) attack.

Sample image from the CIFAR-10 dataset, one of the primary benchmarks used to evaluate USB's detection capabilities.

Key Results

  • Superior Detection: On CIFAR-10, USB achieved a 98% detection accuracy, outperforming Neural Cleanse (93%) and TABOR (92%).
  • Defeating Advanced Attacks: USB was the only method capable of reliably detecting the Input-Aware Dynamic (IAD) attack. On VGG-16, USB detected 100% of IAD attacks, while NC and TABOR failed completely.
  • Efficiency Gains: USB is significantly faster. On ImageNet with EfficientNet-B0, USB took an average of 267 seconds per model, compared to 1,154 seconds for NC—a roughly 4x speedup.
  • Lower Data Requirements: USB requires very little clean data (less than 1% of the original training set) to function effectively.

Conclusion

Universal Soldier (USB) represents a significant advancement in AI security. By reframing backdoor detection as a search for adversarial shortcuts via UAPs, the method achieves superior accuracy and efficiency, particularly against sophisticated, non-patch-based attacks. While challenges remain for models with thousands of classes, USB's speed and low data requirements make it a practical tool for securing the AI supply chain.

Summary updated

BibTeX
@inproceedings{xu2024universal,
  author = {Xiaoyun Xu and Oguzhan Ersoy and Behrad Tajalli and Stjepan Picek},
  title = {{Universal Soldier: Using Universal Adversarial Perturbations for Detecting Backdoor Attacks}},
  booktitle = {DSN-W},
  year = {2024},
  doi = {10.1109/dsn-w60302.2024.00024},
}
Figure