When Causal Intervention Meets Adversarial Examples and Image Masking for Deep Neural Networks

Chao-Han Huck Yang, Yi-Chieh Liu, Pin-Yu Chen, Xiaoli Ma, Yi-Chang James Tsai · DOI

Abstract

Deep Neural Networks (DNNs) are often criticized for their lack of interpretability, as standard explanation methods frequently rely on correlation rather than causation. This paper presents a framework that applies Judea Pearl’s "do-calculus" to DNNs to measure true Causal Effect (CE). By utilizing pixel-masking and adversarial perturbations as forms of causal intervention, the research demonstrates that causal reasoning provides a more robust and stable explanation of model decisions compared to traditional Class Activation Mappings (CAMs). Furthermore, the study identifies a unique "causal signature" in adversarial examples, suggesting new avenues for detecting malicious inputs.

Introduction

Despite the high accuracy of Deep Neural Networks, understanding the underlying logic of their predictions remains a significant challenge. Most existing interpretability tools, such as Class Activation Mappings (CAMs), identify pixels associated with a specific class through correlation. However, these methods do not prove that those pixels caused the prediction. This distinction becomes critical when models are subjected to adversarial noise; even imperceptible perturbations can render correlation-based heatmaps nonsensical.

This research addresses the need for causal interpretability. By shifting from "reverse causation" (tracing outputs back to inputs) to "forward reasoning" (measuring the effect of intervening on inputs), the authors propose a method to identify the actual drivers of a model's output, ensuring explanations remain reliable even under attack.

Methodology

The Causal Framework

The proposed framework utilizes an autoencoder-based architecture to map input images into a latent "concept" space. This allows for interventions on specific high-level features rather than raw pixels alone. The core of the approach is the application of the $do$-calculus operator, $do(x)$, which manually alters a variable to observe its direct impact on the outcome.

Intervention Strategies

The authors employ two primary types of interventions to measure Causal Effect (CE):

  1. Pixel-Wise Masking (PWM): This involves randomly "zeroing out" approximately 10% of an image to observe how the loss of specific information impacts the model's output.
  2. Adversarial Perturbation: Gradient-based attacks—including Fast Gradient Sign Method (FGSM), Basic Iterative Method (BIM), and Projected Gradient Descent (PGD)—are treated as interventions. The goal is to measure how these attacks shift the causal relationship between features and the final classification.

Causal Effect Map (CEM)

To visualize these relationships, the authors introduce the Causal Effect Map (CEM). Unlike CAMs, which rely on gradients, CEMs calculate the expected causal effect of specific nodes within the network. This results in a more stable and localized visualization of the features the model truly values for its decision-making process.

Experimental Evaluation

The framework was evaluated across three diverse benchmarks:

  • Fashion-MNIST: A baseline dataset of 70,000 grayscale clothing images.
  • ImageNet: Large-scale object recognition using the VGG16 architecture.
  • NIH-ChestX-Ray-14: A clinical dataset of over 100,000 X-ray images, used to determine if the model could causally link symptoms (e.g., Effusion, Pneumonia) to classifications.

Results and Discussion

Robustness in Medical Imaging

In experiments involving the NIH-ChestX-Ray-14 dataset, traditional CAMs became uninterpretable when faced with adversarial noise. In contrast, the Causal Effect Map (CEM) remained focused on the relevant clinical regions. This suggests that causal features are significantly more resilient to perturbations than correlative ones.

The Causal Signature of Adversarial Attacks

A key finding of the study is that adversarial attacks produce a distinct "causal signature." For instance, on the CheXNet model, FGSM attacks produced a large negative causal effect ($-5.61 \times 10^{-6}$), which was statistically distinct from the effects of random masking. This sensitivity indicates that CE values could serve as an effective metric for detecting adversarial examples.

Numerical Validation

The framework's implementation was validated by reproducing previous causal studies on the "Bird" dataset, achieving an expected causal effect of $7.63 \times 10^{-3}$. Across Fashion-MNIST and ImageNet, the "Expected-CE" decreased sharply when interventions (masking or noise) were applied, confirming that the framework accurately captures the sensitivity of the model to input feature quality.

Conclusion

By integrating causal intervention with image masking and adversarial perturbation, this research moves DNN interpretability toward a more robust, "forward reasoning" approach. While the method demonstrates superior stability and the potential for adversarial detection, challenges remain regarding computational overhead and the complexity of multitasking scenarios. Future work will focus on refining latent concept mapping to ensure features align with human-understandable concepts without requiring extensive manual labeling.

Summary updated

BibTeX
@inproceedings{yang2019when,
  author = {Chao-Han Huck Yang and Yi-Chieh Liu and Pin-Yu Chen and Xiaoli Ma and Yi-Chang James Tsai},
  title = {{When Causal Intervention Meets Adversarial Examples and Image Masking for Deep Neural Networks}},
  booktitle = {ICIP},
  year = {2019},
  doi = {10.1109/icip.2019.8803554},
}
Figure