Axiomatic Attribution for Deep Networks

Mukund Sundararajan, Ankur Taly, Qiqi Yan

Introduction

Deep neural networks have achieved remarkable success across diverse domains, yet they remain largely "black boxes." Understanding the rationale behind a model's prediction—attributing the output to specific input features—is essential for safety, debugging, and establishing user trust. This paper addresses the lack of theoretical foundations in existing attribution methods, which often rely on subjective "eye-tests." The authors propose Integrated Gradients (IG), a method derived from first principles that satisfies key theoretical requirements.

The Axiomatic Approach to Attribution

The authors identify two fundamental axioms that any robust attribution method must satisfy:

  1. Sensitivity: If an input and a "baseline" (a neutral starting point, such as a black image) differ in exactly one feature and yield different predictions, that feature must receive a non-zero attribution.
  2. Implementation Invariance: If two networks are functionally equivalent (producing the same output for all inputs), their attributions must be identical, regardless of their internal architectural differences.

Many popular methods fail these basic checks. For instance, standard gradients, DeConvNets, and Guided Backpropagation violate Sensitivity due to the "saturation problem": as a model becomes certain about a feature, the gradient may vanish (become zero), even though the feature is critical to the prediction. Conversely, methods like DeepLift and LRP violate Implementation Invariance.

Integrated Gradients

To resolve these issues, the authors introduce Integrated Gradients. Instead of calculating the gradient at the input point alone, IG computes the integral of the gradients along a straight-line path from a baseline $x'$ to the input $x$. IG is the unique path-based method that treats symmetric variables equally, satisfying the Symmetry-Preserving property.

The formula for the $i^{th}$ feature is: $$IntegratedGrads_i(x) ::= (x_i - x'_i) \times \int_{\alpha=0}^1 \frac{\partial F(x' + \alpha(x - x'))}{\partial x_i} d\alpha$$

In practice, this is efficiently approximated by summing gradients at small intervals (usually 20–300 steps) along the path. This approach satisfies the Completeness Axiom, meaning the sum of all attributions equals the difference between the prediction at the input and the prediction at the baseline. This provides a built-in "sanity check" for the model's logic.

Experimental Results and Applications

The authors demonstrate IG's effectiveness across vision, natural language processing, and chemistry.

Computer Vision

In object recognition tasks using ImageNet, IG produces significantly cleaner and more interpretable heatmaps than standard gradient-based methods. While simple gradients often highlight irrelevant noise, IG focuses on the actual objects of interest, such as a fireboat or a school bus.

Figure 1: Qualitative comparison of Integrated Gradients against standard gradients across various ImageNet categories. IG provides significantly sharper and more relevant attributions.

Chemistry and Model Debugging

Beyond visualization, IG serves as a powerful tool for model debugging. In a molecular graph convolution network trained on the PCBA-58432 task, IG revealed a "degenerate feature" bug. It showed that the model assigned identical attributions to different atoms because the network was not deep enough to distinguish their local environments—a flaw that was not apparent through standard performance metrics.

Figure 2: Attribution summary for a molecular graph convolution network. IG helped identify architectural flaws by visualizing atom and bond importance.

Natural Language Processing and Medical Imaging

For NLP tasks like question classification, IG correctly identified "trigger phrases" and surfaced undesirable correlations. In medical imaging, the method was applied to Diabetic Retinopathy prediction, successfully identifying lesions as regions of interest for the model's diagnosis.

Conclusion

Integrated Gradients offers a principled, implementation-independent way to explain deep network predictions. By grounding attribution in axioms like Sensitivity and Implementation Invariance, it avoids the pitfalls of previous empirical methods. While challenges remain regarding baseline selection and computational overhead, IG represents a significant step toward making deep learning models more transparent and accountable.

Summary updated

BibTeX
@inproceedings{sundararajan2017axiomatic,
  author = {Mukund Sundararajan and Ankur Taly and Qiqi Yan},
  title = {{Axiomatic Attribution for Deep Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2017},
  url = {https://openreview.net/forum?id=r1W78s-_Wr},
}
Figure