Attribution-driven causal analysis for detecting adversarial examplesAttribution-driven Causal Analysis for Detection of Adversarial Examples
The authors propose detecting adversarial examples using Integrated Gradient attribution masking: masking 0.4% of high-attribution pixels can change the labels of 95%–99.71% of adversarial images, while most original images remain unchanged.
Attackers use digital attacks such as FGSM, DeepFool, CW, and PGD, or physically realizable patches such as adversarial patch and LaVAN, to make image classification models misclassify; the defender detects at the input layer using attribution analysis, without relying on training data or knowledge of the attack method.
- Deep models are easily fooled by adversarial perturbations and lack interpretability; the authors aim to use attribution explanations to detect adversarial examples, without relying on training data or knowledge of the attack method.
- Use Integrated Gradient to compute attributions of input features, progressively mask high-attribution features in descending order of attribution, and observe whether the model's decision changes: original images should be robust and adversarial examples should be sensitive, thereby forming a System 2 detection layer in the Kahneman dual system.
- On MNIST and ImageNet, masking a small number of high-attribution features changes the labels of most FGSM, DeepFool, CW, and PGD adversarial examples, with detection rates of 98.14%–99.71% for physical patch attacks, while the labels of most original images remain unchanged.
- The authors state that this method cannot constitute a foolproof defense, and that System 1 and System 2 can be attacked independently; the experiments cover only two datasets, MNIST and ImageNet, and classification models such as InceptionV3, and the paper does not report the computational cost of masking.
- Evaluated models
- InceptionV3
- Benchmarks
- MNISTImageNet
- Metrics
- percentage of changed labelsattribution sensitivity S(M, X, δ)robustness ρ(M, x)
Progressively masking high-attribution features of the input can detect adversarial examples: benign inputs are robust to this masking, whereas adversarial examples generated by DeepFool, FGSM, CW and PGD are not. The study uses Integrated Gradient attribution to define the causal neighborhood of the input, and finds that among physically realizable adversarial examples, the high-attribution features leading to erroneous decisions are more concentrated and more pronounced. The defense method does not depend on training data or attack method, and is verified effective on both digital and physically realizable perturbations.
Paper analysis
What problem does this paper attempt to solve?
The authors aim to detect adversarial examples using attribution analysis: adversarial inputs have concentrated high-attribution features, so masking a small number of them can change the model's decision.
Core question: Can differences in model attribution explanations be used to detect adversarial examples from original examples, without relying on training data or knowledge of the attack method.
- Problem setting: Deep models reach human level on tasks such as vision, but are vulnerable to imperceptible adversarial perturbations and lack interpretability; the authors argue this hinders their application in safety-critical scenarios.
- Shortcomings of existing methods: The authors state that existing defenses each have dependencies—manifold-based defenses require analyzing training data, logit pairing relies on model statistical features, adversarial training requires knowing the specific attack method, and robust optimization is limited to perturbations bounded in Lp norm.
- Core hypothesis: Adversarial inputs are perceptually similar to original inputs yet can change decisions; the authors hypothesize that the reason is concentrated in a few high-attribution features; this concentration is the source of physical realizability and perceptual indistinguishability.
- Paper's approach: Use Integrated Gradient to define the causal neighborhood of an input, progressively mask high-attribution features to test decision robustness, forming a System 2 detection layer under the Kahneman dual-system framework.
- Threat model:
- Attacker's goal: Cause an image classification model to misclassify a specific input; in physical attacks, force the classifier to output a specified label (e.g., banana, baseball).
- Attack methods: Digital attacks (FGSM, DeepFool, CW, PGD) and physically realizable patches (adversarial patch, LaVAN).
- Victim system: Image classification models; physical attack experiments target InceptionV3.
- Defender's assumptions: The defense does not rely on training data or knowledge of the attack method, and only analyzes the model's attribution on a single input.
What related research exists?
Related work falls into three categories: adversarial attacks, defenses, and attribution methods; the authors position this paper as complementary to the observations of Chalasani et al.
Adversarial attack methods
- Szegedy et al. (2013) first generated adversarial examples using L-BFGS; Goodfellow (2014) proposed FGSM with a one-step gradient update, and subsequent work extended it to variants such as momentum and targeted attacks.
- DeepFool by Moosavi-Dezfooli et al. (2016), PGD by Madry et al. (2017), and CW by Carlini & Wagner (2017) are the digital attacks used in this paper's experiments; tools such as Cleverhans have implemented these methods.
- Physically realizable attacks: adversarial patch (Brown et al., 2017) and LaVAN (Karmon et al., 2018b) generate universal patches that can force the classifier to output a specified label under black-box or white-box settings; adversarial examples can also transfer across models (Liu et al., 2016; Papernot et al., 2017).
Defense methods
- Empirical defenses such as logit pairing (Engstrom et al., 2018) and defensive distillation (Papernot et al., 2016b) are effective only against specific attacks; the authors state that the more principled robust optimization (Raghunathan et al., 2018; Zhang et al., 2019) is limited to perturbations bounded in Lp norm.
- In the contributions section, the authors explicitly compare: manifold defenses (Ilyas et al., 2017; Jha et al., 2018) rely on analysis of training data, and ensemble adversarial training (Tramèr et al., 2017) uses knowledge of specific attacks, whereas this paper's method does not rely on these.
Attribution and interpretability
- Gradient-based attribution methods include Simonyan et al. (2013), Grad-CAM (Selvaraju et al., 2017), and Integrated Gradients (Sundararajan et al., 2017); this paper adopts Integrated Gradients, which satisfies axioms.
- Ghorbani et al. (2017) show that attributions themselves can also be attacked: images with the same prediction but different attributions can be generated, based on which the authors argue that System 1 and System 2 can be attacked independently.
- Chalasani et al. (2018) also use Integrated Gradients and find that adversarial training brings about feature concentration; the authors state that this paper studies the relationship between attribution and robustness from another angle, and the two observations are complementary.
Positioning: The authors state that this paper does not rely on training data, model statistics, or attack knowledge, but rather treats attribution masking analysis as a System 2 layer, which is a parallel route to strengthening System 1 through adversarial training.
How does the paper address this problem?
Use Integrated Gradient attribution ranking to progressively mask high-attribution positive features, and use the monotonicity theorem to check only the farthest neighborhood point to determine robustness.
The overall idea is to treat the classification model as an intuitive System 1 under the Kahneman framework and add an attribution analysis layer, System 2, on top of it: compute feature attributions for the input, progressively mask features in descending order of attribution, and observe whether the model's decision changes, thereby distinguishing robust original inputs from sensitive adversarial inputs.
Attribution computation
- Integrated Gradients (Sundararajan et al., 2017) is used; the authors state that this method satisfies the axioms that a reasonable attribution method should satisfy; attributions are defined relative to a baseline input x0 (e.g., an all-black image).
- The attribution of the i-th feature is the integral of the gradient along the straight path from the baseline to the input: IG(Fi(x)) = (xi − x0i) × ∫α=01 ∂i M(x0 + α(x − x0)) dα, where ∂iM(·) is the gradient of the model output along the i-th dimension.
Causal neighborhood and δ-robustness
- The mask generator G(x, M) replaces the feature subset M with baseline values (e.g., turning pixels black), leaving the other features unchanged.
- After sorting features in descending order of attribution, the δ causal neighborhood Nδ(x) is defined as all inputs that can be generated by masking only the first ⌈δk⌉ high-attribution features; the paper studies only positive-attribution features, denoted Nδ+(x).
- If the model outputs the same for all inputs in Nδ(x), the input is said to be δ-robust with respect to attribution.
Monotonicity theorem and detection algorithm
- The paper gives a theorem: if the model outputs differently on x and on some input in the neighborhood, then it also outputs differently at the farthest point G(x, Mδ) where all the first ⌈δk⌉ features are masked; therefore, robustness can be determined by checking only the farthest point.
- Algorithm 1: compute attributions, sort in descending order, keep only positive-attribution features, and increase the mask ratio from δ=ε in steps of ε until the model output changes, returning ρ(M, x)=δ as the robustness of that input.
- The dataset-level metric is attribution sensitivity S(M, X, δ) = 1 − |{x ∈ X : ρ(M, x) ≤ δ}| / |X|, i.e., the proportion of samples whose robustness exceeds δ; the authors argue that an effective attack should also have low sensitivity in attribution space, otherwise it will be detected.
Detection setup
- The experiments use pixels as features and images as inputs; the authors state that the method can be generalized to other domains and more abstract features.
- Decision rule: whether the label changes after masking the top δ high-attribution pixels; adversarial examples are expected to change and original samples are expected not to change; the paper does not give an independent detection threshold or classifier, and directly compares the label change proportions of the two types of inputs.
What experiments did the paper conduct?
Four types of digital attacks and two types of physical patches were tested on MNIST and ImageNet; when masking the top 0.4% attributed features, the detection rate for physical attacks is 98.14%–99.71%.
Experimental Setup
- Models tested: The physical attack experiments explicitly target InceptionV3; the paper does not state which models were used in the MNIST and ImageNet digital attack experiments.
- Datasets: MNIST; ImageNet; the physical attacks use 1000 images from ImageNet.
- Attack methods: The digital attacks are FGSM (multiple ε), DeepFool, PGD, and CW; the physical attacks are adversarial patch (banana and toaster patches, patch size 25%) and LaVAN (baseball patch, 50×50 pixels).
- Metrics: The percentage of samples whose label changes after masking the top δ highly attributed features (100 × S), and the proportion of original images whose label remains unchanged.
- Sample size: The physical attacks use 1000 ImageNet images, of which the banana patch succeeded on 347, the toaster patch on 376, and the LaVAN baseball patch on 747; the paper does not report the sample size for the digital attacks.
- Number of repetitions and review method: The paper does not report the number of repetitions; the criterion is whether the label changes, with no human or LLM review.
Main Results
Proportion of samples whose label changes after masking highly attributed features (according to Sections 4.1–4.3 and Figures 3 and 4):
Swipe horizontally to read the table
Dataset Input type Masking proportion Label-change proportion MNIST Original images (label unchanged) top 10% 94% unchanged MNIST Original images (label unchanged) top 20% 81% unchanged MNIST FGSM top 20% 72% MNIST DeepFool top 20% 67% MNIST CW top 20% 53% MNIST PGD top 20% 68% ImageNet Original images (label unchanged) top 0.1% 82% unchanged ImageNet Original images (label unchanged) top 0.4% 67% unchanged ImageNet FGSM (different ε) top 0.4% 76%, 71%, 75% ImageNet PGD (ε=2) top 0.4% 71% ImageNet CW top 0.4% 97% ImageNet DeepFool top 0.4% 95% - The authors consider original inputs to be robust in attribution space, whereas the adversarial inputs generated by all four types of digital attacks are not robust, and this difference can be used to detect adversarial examples.
- The authors state that an effective attack must not only fool System 1 but also make the attribution similar to that of the original sample, which existing attacks cannot do.
Physically Realizable Attacks
- Setup: 1000 ImageNet images, with banana, toaster (patch size 25%), and baseball (LaVAN, 50×50 pixels) patches applied to InceptionV3.
- Results: After masking the top 0.4% highly attributed pixels, 99.71% of banana-patch images changed label, 98.14% of toaster-patch images, and 99.20% of baseball-patch images (Figure 4, left).
- Authors' interpretation: The highly attributed pixels of physical attacks are concentrated in the patch region, and masking these pixels changes the label; in the examples in Figures 5 and 6, the masking is concentrated near the patch.
Patch Size Analysis
- Setup: Adversarial patch sizes from 25% to 40% in steps of 5% (Figure 4, right).
- Results: When masking 0.4% of attributions, about 80% of patch images changed label at each size; 25% is the smallest size in the authors' tests that can reliably fool the Inception classifier.
- Authors' interpretation: Smaller patches have more concentrated attributions and are relatively easier to detect; the authors consider this to reflect a trade-off between being physically realizable and imperceptible and robustness in attribution space.
Other Ablations and Analyses
- Figure 1 example: after adding an adversarial patch to a yawl image, the person in the boat who was in the top 2% positive attribution region in the original image is no longer in the high-attribution region.
- Figure 2 example: in MNIST, after a 9 is perturbed and misclassified as 4, the attribution changes markedly, and the upper half of the perturbed 9 becomes negative attribution.
- The paper does not report the sample size, the models used, or the computational cost of the digital attacks, nor does it report a false-positive rate metric for detection.
What are some points that can be further explored?
The authors state that the method is not a foolproof defense and that the two systems can be attacked independently; the experiments cover only two datasets and a limited set of attacks.
Limitations and future directions noted by the authors
- At the end of Section 3, the authors state that this method cannot constitute a foolproof defense against adversarial examples and is only a first step toward building trustworthy high-assurance agents.
- In Section 2, the authors cite the results of Ghorbani et al. (2017) to point out that System 1 and System 2 can be attacked independently, i.e., the attribution itself can also be manipulated.
- In Section 5, the authors propose that new attack methods should not only measure accuracy loss but also evaluate their robustness in attribution space.
- In Section 3, the authors state that the method can be adapted to other application domains and higher-level abstract features, but the experiments in this paper use only images and pixel-level features.
- In Section 3, the authors point out that negative attributions can be used for counterfactual robustness testing, but this needs to be done for all alternative decisions; this paper studies only positive attributions.
Scope of experiments
- Models tested: the physical attack experiments target InceptionV3; the paper does not specify the models used in the MNIST and ImageNet digital attack experiments.
- The datasets are two image classification datasets, MNIST and ImageNet; the physical attacks use 1000 ImageNet images from them.
- The attacks cover four types of digital attacks—FGSM, DeepFool, CW, and PGD—and two types of physical attacks—adversarial patch and LaVAN.
- The paper does not report the sample size, number of repetitions, or computational cost of mask detection for the digital attack experiments.
- The paper does not report false positive rates or ROC-like metrics for detection with a fixed threshold; it reports only the percentage of label changes at each mask ratio.
Summarize the main content of the paper
Attribution masking analysis can distinguish original from adversarial inputs: masking 0.4% of high-attribution pixels changes the labels of 95%–99.71% of adversarial images.
This is an adversarial example detection paper; the core idea is to treat attribution explanations as System 2 in the Kahneman dual system and test the robustness of System 1 (the classification model)'s decisions.
- Problem: Models are vulnerable to adversarial perturbations and lack interpretability; the authors argue that existing defenses rely on training data, model statistics, or attack knowledge.
- Method: Use Integrated Gradient to compute pixel attributions, and progressively mask high-attribution positive features in descending order of attribution; by the monotonicity theorem, only the farthest masked point needs to be checked, and a label change is judged as non-robust.
- Digital attack results: On MNIST, masking the top 20% attributed features changes the labels of 72%, 67%, 53%, and 68% of FGSM, DeepFool, CW, and PGD adversarial examples, while 81% of original images remain unchanged; on ImageNet, masking the top 0.4% changes the labels of 97% and 95% of CW and DeepFool examples, while 67% of original images remain unchanged.
- Physical attack results: For 1000 ImageNet images on InceptionV3, after masking the top 0.4% attributed features, 99.71%, 98.14%, and 99.20% of banana, toaster, and baseball patch examples change labels; at patch sizes of 25%–40%, about 80% change labels.
- Authors' conclusion: The erroneous decisions on adversarial inputs are concentrated in a few high-attribution features, especially for physically realizable attacks; this detection method is independent of training data and attack method, but the authors state it is not a foolproof defense and that the two systems can be attacked independently.