Evolutionary Trigger Detection and Lightweight Model Repair Based Backdoor Defense

Qi Zhou, Zipeng Ye, Yubo Tang, Wenjian Luo, Yuhui Shi, Yan JiaarXiv 2024 · DOI

TL;DR

This paper introduces a novel two-stage defense against backdoor attacks on deep neural networks (DNNs). It first uses a "CAM-focus Evolutionary Trigger Filter" (CETF) to accurately detect and extract malicious triggers from poisoned inputs, even when they vary in size and number. Then, it employs lightweight "unlearning" techniques, particularly focusing on Batch Normalization (BN) layers, to repair the model without significantly impacting its performance on clean data.

What Problem Does This Paper Address?

Deep neural networks (DNNs) are increasingly deployed in critical applications like autonomous driving and medical imaging. However, they are vulnerable to "backdoor attacks." In these attacks, an adversary subtly modifies the training data with "triggers" (e.g., specific patterns or objects) and associates them with a target label. When a poisoned input containing the trigger is fed to the trained model during inference, it produces the attacker's desired incorrect output, while behaving normally on clean inputs. Defending against these attacks is challenging, especially in real-world scenarios where triggers can be variable in size, shape, and number, and where computational resources might be limited. Existing defenses often struggle with trigger variability, impact clean accuracy, or are computationally expensive.

Methods

The proposed defense operates in two phases:

  1. CAM-focus Evolutionary Trigger Filter (CETF):
    • Trigger Detection: This phase aims to identify and isolate the malicious trigger within a potentially poisoned input.
  2. GradCAM for Prioritization: It first uses GradCAM to generate a "salient map," highlighting the most influential regions of the input image. This helps narrow down the search space for the trigger.
  3. Differential Evolution (DE) for Optimization: A customized Differential Evolution algorithm is then employed to precisely locate the smallest possible region that exhibits backdoor behavior. This involves initializing a population of potential trigger regions, mutating, crossing over, and selecting individuals based on a fitness function.
  4. Fitness Function: The fitness function is designed to find regions that both cause a change in the model's prediction (indicating a backdoor effect) and are as small as possible, while also considering the overall image size.
  5. Validation: The extracted region is then pasted onto clean images to verify if it consistently triggers the backdoor behavior. If it does, the input is classified as poisoned.
  6. Lightweight Model Repair:
    • Naïve Unlearning: This involves fine-tuning the backdoored model using the extracted trigger and the true labels of the poisoned samples. This process aims to "unlearn" the association between the trigger and the target label.
  7. BN-Unlearning and BN-Cleaning: The authors propose novel, more efficient repair methods that specifically target the Batch Normalization (BN) layers. They hypothesize that backdoors are often embedded within the statistical information learned by BN layers.
  8. BN-Unlearning: This method updates only the parameters of the BN layers while freezing others, using the extracted trigger and true labels.
  9. BN-Cleaning: This is an even more efficient approach that directly updates the running mean and variance of the BN layers without requiring backpropagation or true labels, making it applicable even to unlabeled poisoned data.

Datasets

The paper evaluates its defense on the following datasets:

  • GTSRB (German Traffic Sign Recognition Benchmark): Used for traffic sign classification.
  • FaceScrub: Used for face recognition.
  • CIFAR-10: Mentioned as a dataset for training ResNet20 models.

The authors also mention using a large dataset of 2,622,000 images with faces from 2,622 persons for pre-training VGG16.

Key Insights and Ideas

  • Triggers are often embedded in BN layers: The paper strongly suggests that Batch Normalization layers play a crucial role in how backdoors are implemented and activated. This is a significant insight for understanding the underlying mechanism of backdoor attacks.
  • Evolutionary algorithms are effective for trigger detection: Using Differential Evolution for trigger detection proves to be robust and accurate, even for variable triggers, outperforming methods that rely solely on GradCAM or random search.
  • Lightweight repair is possible and effective: The proposed BN-unlearning and BN-cleaning methods offer a computationally efficient way to repair backdoored models, requiring minimal data and time compared to traditional fine-tuning.
  • BN-cleaning works even without labels: The ability of BN-cleaning to repair models without needing true labels for poisoned data is a significant practical advantage.
  • Physical world triggers are more robust: The paper emphasizes that patch-based triggers are more resilient to real-world variations (like lighting and angle) and thus pose a greater risk, warranting more attention in defense strategies.

Key Results

  • High Trigger Detection Accuracy: CETF effectively distinguishes poisoned images from clean ones across various trigger types and datasets.
  • Low Attack Success Rate (ASR) after Defense:
    • CETF-only defense reduces ASR to near zero (e.g., 0.72% on MobileNet).
  • CETF combined with naïve unlearning achieves an ASR of 0% across all tested models and attacks.
  • BN-unlearning consistently reduces ASR to 0% for all tested attacks.
  • BN-cleaning also significantly reduces ASR, often to near zero (e.g., 0.02% on MobileNet).
  • Maintained Clean Accuracy: The proposed defense methods, especially CETF-only and BN-unlearning/BN-cleaning, maintain high clean image accuracy, with some models even showing slight improvements after repair.
  • Robustness: The defense demonstrates robustness against multi-trigger attacks and random-size triggers.
  • Efficiency: BN-unlearning and BN-cleaning are significantly faster than naïve unlearning, with repair times for a few epochs being very short (e.g., under 1 second per epoch for ResNet20).

Limitations and Future Work

  • Theoretical Understanding of BN Influence: While experimental evidence is strong, the paper suggests further theoretical work to fully understand the specific influence of triggers on BN layers during training.
  • Models without BN Layers: The current defense is heavily reliant on BN layers. Future work could explore defenses for models that do not utilize BN layers.
  • Exploring Other Data Influences: The authors are interested in investigating if other types of data, beyond just images with triggers, can influence BN layer distributions and potentially aid in repair.
  • Trigger Variability in Physical World: While the defense shows robustness to variations in size and number, further exploration into more complex physical world distortions could be beneficial.

Summary updated

BibTeX
@misc{zhou2024evolutionary,
  author = {Qi Zhou and Zipeng Ye and Yubo Tang and Wenjian Luo and Yuhui Shi and Yan Jia},
  title = {{Evolutionary Trigger Detection and Lightweight Model Repair Based Backdoor Defense}},
  year = {2024},
  eprint = {2407.05396},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.05396},
}
Figure