Pathwise Explanation of ReLU Neural Networks

Seongwoo Lim, Won Jo, Joohyung Lee, Jaesik Choi · DOI

Introduction

Deep neural networks (DNNs) have achieved remarkable success across various domains, yet they remain notoriously difficult to interpret. For ReLU-based networks, a common approach to explainability is "unwrapping" the model into a local linear model based on the activation states of hidden units. However, this global unwrapping often leads to inconsistent and noisy explanations. This paper introduces pathwise explanation, a novel framework that identifies specific subsets of neurons—termed "paths"—responsible for a model's decision, providing a more granular and consistent view of internal model logic.

The Problem with Existing Unwrapping Methods

Standard unwrapping techniques attempt to explain a decision by considering the activation state of every single hidden unit in the network. The authors identify a significant flaw in this approach: inconsistency. Because global unwrapping aggregates all active neurons, the resulting explanation can present a "mixed message." For example, a model might correctly classify an image, but the unwrapped linear model might assign weights that suggest a negative contribution from key features. Furthermore, these methods typically provide a single, monolithic attribution map, making it impossible to decompose a decision into its constituent parts or pinpoint specific features that triggered a classification.

Existing attribution methods often produce noisy, monolithic explanations for a model's decision, as seen in the work of Sudjianto et al. (2020) and Sundararajan et al. (2017).

Methodology: Defining and Constructing Paths

The proposed framework shifts the focus from the entire network state to specific paths:

  1. Path Definition: A path is defined as a subset of connected hidden units. These can range from "one-way" paths (one unit per layer) to "multi-way" paths (multiple units per layer), allowing for adjustable granularity.
  2. Path Construction: To identify the most relevant path, the authors developed a greedy backward-selection algorithm. Starting from the output layer, the algorithm uses gradients and a softmax-based importance score to select the "top-k" neurons at each layer that most significantly contribute to the target class prediction.
  3. Linearization: Once a path is isolated, it is converted into a local linear model ($f^p(X) = W^p X + b^p$). This allows researchers to quantify the contribution of each input pixel specifically for that isolated circuit.

Key Insights: Decomposition and Consistency

A primary advantage of the pathwise approach is explanation decomposition. Unlike previous methods, pathwise explanation can isolate distinct features. For instance, one path might capture the "eyes" of a fox, while another captures its "ears." This proves that the model is utilizing multiple independent features to reach a final classification.

The pathwise approach yields cleaner, more focused attribution maps that can isolate specific features like a fox's eyes or ears, providing a clearer view of the model's internal logic.

Additionally, by ignoring "distractor" neurons—those that are active but not central to the specific decision path—the resulting linear models are much more consistent with the model's actual output. This focus also makes the method an excellent tool for debugging misclassifications. In one case study, a model misclassified a "mantis" as a "prison"; pathwise explanation revealed the model was actually triggered by vertical background lines that it perceived as prison bars.

Quantitative and Qualitative Results

The researchers evaluated their method across ImageNet, ResNet-18, and CIFAR-10 datasets.

  • Quantitative Performance: Using "Insertion" and "Deletion" games—metrics that measure how quickly model confidence changes as pixels are modified—the pathwise method achieved an Insertion AUC of 0.936. This outperformed popular baselines such as Integrated Gradients (0.926) and GradCAM (0.928).
  • Qualitative Clarity: Visually, the attribution maps produced by this method are significantly cleaner and more focused on the object of interest compared to the noisier maps generated by standard Saliency or Input×Gradient methods.
  • Robustness: The results remained consistent across different architectures (VGG and ResNet), demonstrating that the mathematical foundation of the pathwise approach is robust for ReLU-based systems.

Conclusion and Future Work

Pathwise explanation offers a powerful new lens for XAI, moving beyond monolithic heatmaps toward decomposable, consistent circuits. While the current method relies on heuristic "top-k" selection and is specific to ReLU activations, it sets the stage for more sophisticated architectural debugging and a deeper understanding of how specialized internal circuits develop within deep neural networks.

Summary updated

BibTeX
@inproceedings{lim2024pathwise,
  author = {Seongwoo Lim and Won Jo and Joohyung Lee and Jaesik Choi},
  title = {{Pathwise Explanation of ReLU Neural Networks}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
}
Figure