Explaining Deep Learning Models using Causal Inference

Tanmayee Narendra, Anush Sankaran, Deepak Vijaykeerthy, Senthil ManiarXiv 2018

Introduction

Deep Learning models, particularly Convolutional Neural Networks (CNNs), have achieved state-of-the-art results in computer vision but remain notoriously opaque "black boxes." While interpretability tools like saliency maps (e.g., Grad-CAM) help identify which pixels in an input image are important, these methods primarily highlight correlations. They fail to answer fundamental counterfactual questions: What would happen to the final prediction if a specific filter in an intermediate layer were removed?

Answering such "what-if" questions traditionally requires "ablation testing"—physically removing a component and retraining the entire model. For modern, massive architectures, this process is computationally prohibitive. To bridge this gap, researchers from IBM have developed a framework that uses Structural Causal Models (SCMs) to peer inside CNNs. By abstracting a model’s layers into a causal graph, they can quantitatively rank filter importance and predict the impact of structural changes without expensive retraining.

Methodology: Building Causal Abstractions

The authors propose a three-step approach to construct a causal proxy of a pre-trained CNN, enabling the use of Pearl’s $do$-calculus for model interrogation.

1. DAG Construction

The framework treats the CNN architecture itself as a Directed Acyclic Graph (DAG). In this representation, nodes correspond to individual filters, and edges represent the forward connections between layers. This structural mapping ensures the causal model respects the original information flow of the neural network.

2. Feature Transformation ($ϕ$)

A filter's output is typically a high-dimensional matrix, making direct causal modeling difficult. The authors apply a transformation function, $ϕ$, to reduce this output to a single real number. They experimented with two primary types:

  • Binary Transformation: Labeling a filter as 1 (high variance) or 0 (low variance).
  • Frobenius Norm: Calculating the "magnitude" or energy of the filter response.

The study found that the Frobenius norm retained significantly more useful information, whereas the binary approach was too simplistic to provide a satisfactory abstraction.

3. Learning Structural Equations

Once abstracted, regression models (such as Linear, Ridge, or Lasso) are used to learn the functional relationships between the values of one layer and the next. This step effectively "learns" how information propagates through the network's filters.

Overview of the causal abstraction framework for CNNs, from dataset input to the final causal model.

By building this SCM, researchers can perform causal interventions. To simulate the removal of a filter, they simply set its value to zero within the SCM and observe the resulting change in the predicted output. This allows for thousands of simulated ablation studies to be conducted in seconds.

Experimental Setup and Datasets

The framework was rigorously evaluated using the CIFAR-10 dataset, a standard benchmark consisting of 60,000 32x32 color images across 10 classes. The researchers tested the approach across three distinct architectures to ensure broad applicability:

  • LeNet-5: A classic, small-scale network.
  • VGG-19: A deep, computationally heavy network.
  • ResNet-32: A modern architecture featuring residual connections.

Key Results and Model Fidelity

A primary concern with any abstraction is "fidelity"—how closely the proxy model matches the original. The results were highly encouraging. For the VGG-19 architecture, the SCM achieved an accuracy of 0.902, which is remarkably close to the original model's accuracy of 0.91. This confirms that the causal abstraction successfully captured the underlying logic of the complex network.

Accuracy vs. percentage of filters removed for VGG-19 on CIFAR-10, demonstrating the impact of filter pruning.

Beyond fidelity, the framework demonstrated strong predictive power. The accuracy drop predicted by the SCM when "zeroing out" filters closely mirrored the actual performance degradation observed in real-world ablation tests. Furthermore, the paper successfully identified and ranked filter importance. For instance, in VGG-19's first convolutional layer, filters 15, 11, and 20 were identified as the most critical for correct classification.

Discussion and Future Directions

The shift from correlation-based saliency to causal-based SCMs represents a significant step forward in model interpretability. The "one-time construction" of the SCM is a major efficiency win; once the regressions are learned, testing filter-removal scenarios becomes a matter of simple arithmetic rather than days of GPU-intensive training.

However, several avenues for future work remain:

  • Linearity vs. Non-linearity: While linear models were effective here, more expressive, non-linear structural equations might be necessary to capture more complex counterfactual queries in deeper or more specialized networks.
  • Transformation Sensitivity: The choice of $ϕ$ is critical. While the Frobenius norm performed well, other transformations might capture even more nuance without increasing complexity.
  • Scalability: While CIFAR-10 served as an excellent proof-of-concept, the ultimate test will be scaling this framework to ImageNet-scale models and more diverse data distributions.

By providing a way to query the mechanisms of a model rather than just its outputs, this causal framework offers a promising path toward truly transparent and debuggable AI.

Summary updated

BibTeX
@misc{narendra2018explaining,
  author = {Tanmayee Narendra and Anush Sankaran and Deepak Vijaykeerthy and Senthil Mani},
  title = {{Explaining Deep Learning Models using Causal Inference}},
  year = {2018},
  eprint = {1811.04376},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.04376},
}
Figure