Skip to content

Defending Deep Neural Networks Against Backdoor AttacksDefending against Backdoor Attack on Deep Neural Networks

arXiv· arXiv:2002.12162· Hao Cheng, Kaidi Xu, Sijia Liu, Pin-Yu Chen, Pu Zhao, Xue LinXi’an Jiaotong University; Northeastern University; MIT-IBM Watson AI LabIndexed by this site · 27 days ago· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors use Grad-CAM and activation norm analysis to analyze DNN backdoors, and propose ℓ∞ neuron pruning, which reduces the attack success rate from 81.61% to 48.42% on GTSRB/AlexNet.

Threat modelThe defender obtains the DNN model (including hyperparameters and weights) but cannot access the training dataset; the defender has the test dataset but does not know the trigger pattern, the target wrong label, or whether a test image already has the trigger embedded. The defense is based on inspecting and modifying the model itself, rather than screening the training data.

Questions
Backdoor attacks cause DNNs to misclassify inputs with a trigger by poisoning a small amount of training data. The authors aim to remove the backdoor from a DNN already implanted with a backdoor, under the conditions of no access to training data and no knowledge of the trigger pattern or target label.
Methods
First, Grad-CAM is used to compare the discriminative regions of the original and backdoored DNNs, then the ℓ1, ℓ2, and ℓ∞ norms of the activation values of the last convolutional layer are computed, finding that the ℓ∞ difference is the largest; based on this, ℓ∞ neuron pruning is proposed, gradually lowering the threshold to balance clean accuracy and attack success rate.
Experiments and results
On GTSRB with AlexNet as the model: without pruning, the attack success rate is 81.61% (clean+ori); at threshold 7, clean accuracy is 95.21% and the attack success rate drops to 48.42%; at threshold 6, the attack success rate is 42.99% but the accuracy loss is larger (Table 1).
Limitations and future work
The authors state that future work will develop pruning into a more general defense (e.g., robust training that references the ℓ∞ activation gap), and design stronger attacks based on the discovered features (Conclusion and Future Work). The experiments are conducted only on the GTSRB traffic sign task, the AlexNet architecture, and a single trigger setting.
Experimental setupAlexNet (backdoored) · German Traffic Sign Recognition Benchmark (GTSRB) · attack success rate (SR)、test accuracy
Evaluated models
AlexNet (backdoored)
Benchmarks
German Traffic Sign Recognition Benchmark (GTSRB)
Metrics
attack success rate (SR)test accuracy
AI summaryThe researchers propose a neuron pruning method based on the ℓ∞ norm for removing backdoors from deep neural networks. Backdoor attacks inject triggers through data poisoning, causing the model to misclassify samples with the trigger; Grad-CAM analysis shows that both real and synthetic backdoor attacks cause neuron activations to deviate significantly in the ℓ∞ norm relative to the ℓ1 and ℓ2 norms. Experiments show that the method can effectively reduce the attack success rate while maintaining high classification accuracy on clean images.

The researchers propose a neuron pruning method based on the ℓ∞ norm for removing backdoors from deep neural networks. Backdoor attacks inject triggers through data poisoning, causing the model to misclassify samples with the trigger; Grad-CAM analysis shows that both real and synthetic backdoor attacks cause neuron activations to deviate significantly in the ℓ∞ norm relative to the ℓ1 and ℓ2 norms. Experiments show that the method can effectively reduce the attack success rate while maintaining high classification accuracy on clean images.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Remove the backdoor from a DNN already implanted with a backdoor, under the conditions of no access to training data and no knowledge of the trigger.

    Core problem: how to remove the backdoor from a DNN that has been subjected to a backdoor attack while maintaining classification accuracy on clean images, under the conditions of no access to the training data and no knowledge of the trigger pattern or target label.

    • Problem setting and importance: a backdoor attack is a type of data poisoning attack in which the attacker stamps a trigger onto a small number of training images and labels them with a target wrong label; the trained DNN misclassifies inputs bearing the trigger while behaving normally on clean images, giving it strong stealthiness and controllability (per the authors).
    • Shortcomings of existing methods: existing defenses fall into two categories—inspecting untrusted training datasets (spectral signatures, activation clustering) and modifying the backdoored model (neural cleanse, fine-pruning); the authors state that this paper differs from them and places more emphasis on analyzing and explaining the impact of backdoor attacks on the original and backdoored DNNs.
    • Core observation: using Grad-CAM, the authors observe that the discriminative region of the backdoored DNN falls on the trigger, and quantitative statistics show that trigger-bearing images cause the largest increase in the ℓ∞ norm of the final convolutional layer's activation values.
    • Proposed in the paper: an ℓ∞ norm-based neuron pruning defense that prunes the neurons responding most strongly to the trigger and seeks the optimal trade-off threshold between clean accuracy and attack success rate.
    • Threat model:
      • Defender's knowledge: obtains the DNN model itself, including model hyperparameters and weight parameters.
      • What the defender lacks: cannot access the training dataset; does not know the trigger pattern or the corresponding target (wrong) label; does not know whether a given image in the test dataset already has the trigger embedded.
      • Available resources: has the test dataset for analysis; since the trigger is unknown, uses the trigger reverse-engineering method of [16] to synthesize triggers.
      • Victim system: the DNN subjected to the backdoor attack (in the experiments, an AlexNet for traffic sign classification).
  2. What related research exists?

    Related work is divided into backdoor attacks and two types of defenses; this paper focuses on mechanism analysis and proposes ℓ∞ pruning, which differs from previous defenses.

    Backdoor attacks

    • Gu, Dolan-Gavitt, and Garg [5] (BadNets): first proposed the backdoor attack, using a predefined trigger pattern (such as a sticker on a traffic sign); the authors relay that the backdoor can persist even after the model is transferred to other tasks. The backdoored AlexNet in this paper is trained with this method.
    • Liu, Ma, Aafer et al. [7]: obtain a backdoored DNN from an original DNN without tampering with the original training process—using a predefined trigger mask, generating the trigger pattern via backpropagation, then constructing training data accordingly and retraining the model.

    Defense: inspecting the training dataset

    • Tran, Li, and Madry [15]: inspect untrusted training datasets by analyzing spectral signatures.
    • Chen et al. [1]: detect DNN backdoor attacks via activation clustering.

    Defense: modifying the backdoored model

    • Wang et al. [16] (neural cleanse): identify and mitigate backdoor attacks in neural networks; this paper borrows its trigger reverse-engineering method to synthesize triggers.
    • Liu, Dolan-Gavitt, and Garg [6] (fine-pruning): defend against DNN backdoor attacks via pruning.

    Comparison baselines and benchmarks: the paper sets up no comparison baseline experiments for defense methods; the experimental benchmark is GTSRB, the model is AlexNet, and the backdoored model is trained according to the method of [5].

    Positioning of this paper: the authors state that, unlike [1, 6, 15, 16], this paper focuses on analyzing and explaining the impact of (original or synthesized) backdoor attacks on the original and backdoored DNNs; it also revisits the idea of neuron activation pruning and finds that pruning based on the ℓ∞ norm is more effective than the ℓ1 and ℓ2 schemes (per the authors).

  3. How does the paper address this problem?

    Qualitative observation with Grad-CAM plus quantitative analysis of ℓp norms, based on which ℓ∞ neuron pruning is proposed and the threshold is tuned as a trade-off.

    The overall approach has three steps: first use Grad-CAM to qualitatively observe the discriminative regions of the backdoored DNN, then use ℓp norm statistics to quantitatively compare the activation differences between clean and trigger-bearing inputs, and finally design an ℓ∞ neuron pruning defense based on this.

    Analysis setup: four input combinations

    • Four combinations: (i) clean images (clean); (ii) clean images plus the original trigger (clean+ori); (iii) clean images plus a synthesized trigger (clean+syn); (iv) clean images plus both the original and synthesized triggers (clean+ori+syn).
    • Rationale for combination (iv): images in the test set may already have the trigger embedded without the defender's knowledge, so the synthesized trigger is still superimposed for analysis.
    • Synthesized trigger: because the target label is unknown, triggers must be synthesized separately for different labels; the authors state that the ℓ1 norm of the synthesized trigger can be used to determine the target label.

    Grad-CAM qualitative analysis

    • Tool choice: Grad-CAM [10] computes gradients with respect to any label based on the final convolutional layer; the authors state that compared with the original CAM [24], it is better suited to complex DNN architectures.
    • Observation targets: the original DNN and the backdoored DNN, with Grad-CAM plotted for the true label and the target label under each of the four input combinations.

    ℓp norm analysis of neuron activations

    • Analysis targets: the activation maps of all 128 neurons in the final convolutional layer of the backdoored DNN (Figure 3), and histograms of the ℓ1, ℓ2, and ℓ∞ norms of activation values under clean and trigger-bearing inputs (Figure 4).
    • Key finding: after adding a trigger (whether original, synthesized, or both), the maximum activation value of any ℓp norm increases, and the ℓ∞ norm shows the largest increase (per the authors).

    ℓ∞ neuron pruning

    • Mechanism: remove neurons in the final convolutional layer of the backdoored DNN that have high activation values in response to the trigger, so that the pruned DNN no longer responds to the trigger with the target wrong label.
    • Threshold selection: the difficulty lies in choosing the pruning threshold for the ℓ∞ norm; the initial threshold is the maximum activation value on clean images, 32.305782, after which the threshold is gradually lowered to strengthen the defense while maintaining classification accuracy on clean images.
    • Trade-off objective: find the optimal threshold between clean-image test accuracy and attack success rate.
  4. What experiments did the paper conduct?

    GTSRB+AlexNet single-setting experiment: at threshold 7, the attack success rate drops from 81.61% to 48.42%, with accuracy 95.21%.

    Experimental setup

    • Task and dataset: traffic sign classification, using the German Traffic Sign Recognition Benchmark (GTSRB), with 34799 training images, 12630 test images, and 43 classes.
    • Model under test: AlexNet; the backdoored AlexNet is trained according to the method of [5], with a small square as the trigger.
    • Analysis targets: one original DNN and one backdoored DNN; the Grad-CAM analysis targets the final convolutional layer, and the activation analysis covers all 128 neurons in that layer.
    • Metrics: clean-image test accuracy (acc) and attack success rate (SR), reported separately for the three trigger-bearing inputs (clean+ori, clean+syn, clean+ori+syn).
    • Comparison settings: the backdoored model with no pruning (Threshold=None) and with pruning thresholds 7 and 6; the paper does not compare with other defense methods and does not report the number of repetitions.

    Main results

    According to Table 1 (units are %):

    Swipe horizontally to read the table

    ThresholdaccSR(clean+ori)SR(clean+syn)SR(clean+ori+syn)
    None96.9181.6174.3674.36
    795.2148.4240.8740.87
    691.3842.9935.9035.90
    • Authors' interpretation: at threshold 7, clean-image accuracy drops by only 1.7% (the authors' original wording), while the attack success rate on clean+ori falls from 81.61% to 48.42%; at threshold 6 the attack success rate is lower (42.99%), but the test accuracy loss is larger.
    • Authors' interpretation: the authors state that thresholds 6 and 7 achieve the best trade-off between attack success rate and clean accuracy.
    • Figure 5: the authors state that starting from a threshold of about 32, as the threshold decreases the attack success rate falls while clean accuracy remains high, and the defense effect is observed regardless of which trigger is embedded; in the figure the horizontal axis is threshold (32 to 4), and the vertical axes are Accuracy(%) and Attack Successful Rate(%).

    Grad-CAM visualization analysis

    • What was measured: the discriminative regions of the original DNN (Figure 2, first row (a)∼(h)) and the backdoored DNN (second row (a')∼(h')) under the four input combinations and the true/target labels.
    • Results: the authors state that the original DNN exhibits different discriminative regions for the true label and the target label, and responds only to the true label of the input; the backdoored DNN shows almost no response to clean images ((a'), (b')), whereas for inputs bearing any trigger, the discriminative region under the target label falls on the trigger's location.

    Neuron activation and ℓp norm analysis

    • What was measured: the activation maps of the 128 neurons in the final convolutional layer of the backdoored DNN for clean images and images bearing the original trigger (Figure 3), and the histograms of the ℓ1, ℓ2, and ℓ∞ norms (Figure 4).
    • Results (maximum values annotated in Figure 4): for clean images the ℓ∞ maximum is 32.3058, for clean+ori it is 71.6528, and for clean+syn it is 53.3097; ℓ1 rises from 60.9954 to 84.7106 (clean+ori); ℓ2 rises from 56.3216 to 75.0681 (clean+ori).
    • Authors' interpretation: after adding the trigger, the maximum activation value of each norm increases, with ℓ∞ showing the largest increase, so ℓ∞ is chosen as the pruning criterion.

    Other ablations and analyses

    • Initial threshold: the maximum activation value on clean images, 32.305782, is taken, then gradually lowered (Section 5.1).
    • Trigger type: the SR values for the synthesized trigger (clean+syn) and original+synthesized (clean+ori+syn) are identical in Table 1 (74.36/40.87/35.90); the paper does not explain why.
    • Negative result: when the threshold is lowered from 7 to 6, clean accuracy drops from 95.21% to 91.38%; the authors describe this only as the trade-off cost and give no further explanation.
  5. What are some points that can be further explored?

    The authors plan to generalize pruning into a more general defense and to design stronger attacks; the experiments cover only a single task, architecture, and trigger.

    Limitations and future directions noted by the authors

    • More general defense: The authors state that on the defense side they will develop the pruning method into a more general and effective defense, for example robust training measures that reference the ℓ∞ gap in activation values between the original and backdoored DNNs (Conclusion and Future Work).
    • Stronger attacks: The authors state that on the attack side, stronger attacks can be designed based on the features found in this paper (Conclusion and Future Work).
    • The paper does not have a dedicated Limitations section; the above two items are the future directions explicitly stated in the conclusion.

    Scope of experiments

    • Task and data: Only the traffic sign classification task, with the GTSRB dataset (34799 training images, 12630 test images, 43 classes).
    • Model architecture: Only one architecture, AlexNet; the backdoored model is trained following the method of [5], with a small square as the trigger.
    • Analysis location: Both the Grad-CAM and activation norm analyses target the final convolutional layer (128 neurons).
    • Defense comparison: The experiments compare only no pruning and ℓ∞ pruning (thresholds 7 and 6), and do not compare with defense methods such as neural cleanse or fine-pruning.
    • Not reported: The paper does not report the number of experimental repetitions or statistical significance tests, and does not evaluate adaptive attacks (the case where the attacker adjusts the trigger after knowing the defense).
  6. Summarize the main content of the paper

    The authors state that Grad-CAM and ℓ∞ analysis can characterize backdoored DNNs, and that ℓ∞ pruning reduces SR from 81.61% to 48.42% on GTSRB.

    A defense and analysis paper targeting DNN backdoor attacks, in a setting where the defender cannot obtain training data, does not know the trigger pattern or target label, and can only inspect and modify the model itself.

    • Problem: Backdoor attacks poison a small amount of training data, causing the DNN to misclassify inputs with a trigger as the attacker-specified label, while behaving normally on clean inputs, making them relatively stealthy.
    • Method highlights: Grad-CAM is used to compare the discriminative regions of the original and backdoored DNNs under four input combinations (clean, clean+ori, clean+syn, clean+ori+syn); the ℓ1, ℓ2, and ℓ∞ norms of the activation values of the last convolutional layer are computed; based on this, ℓ∞ neuron pruning is proposed, starting from the maximum clean-image activation value of 32.305782 and gradually lowering the threshold.
    • Qualitative results: The authors state that the discriminative region of the backdoored DNN under the target label falls on the trigger location, whereas the original DNN responds only to the true label (Figure 2).
    • Quantitative results: After adding the trigger, the maximum activation values of all norms increase, with ℓ∞ increasing the most—32.3058 for clean images and 71.6528 for clean+ori (Figure 4).
    • Defense effectiveness: On GTSRB with AlexNet as the model, without pruning the attack success rate is 81.61% (clean+ori); at threshold 7, clean accuracy is 95.21% and the attack success rate is 48.42%; at threshold 6, the attack success rate is 42.99% but accuracy drops to 91.38% (Table 1).
    • Authors' conclusion: The authors state that the ℓ∞ norm is the most effective criterion for distinguishing clean from trigger-bearing inputs, and that ℓ∞ pruning can reduce the attack success rate with a small accuracy loss; future plans include developing a more general defense (e.g., robust training based on the ℓ∞ activation gap) and designing stronger attacks.
Read originalarxiv.org