Neural Networks Decoded: Targeted and Robust Analysis of Neural Network Decisions via Causal Explanations and Reasoning
Alec F. Diallo, Vaishak Belle, Paul Patras
TL;DR
Tracer addresses the opacity of deep neural networks by presenting a causal-explanation framework that operates without retraining or architectural changes. It formalizes the problem with Structural Causal Models and Pearl's Causal Hierarchy, and combines input interventions, CKA-based causal-node discovery, ACE estimation, and GAN-based counterfactual generation to reveal the internal decision dynamics. The Average Causal Effect (ACE) is defined as $ACE_i = \mathbb{E}_{P(X)}[|\Delta_x^i| \, \cdot \, \mathrm{KL}\left(P(g_i'(x) | do(X=x')) \| P(g_i'(x) | do(X=x))\right)]$, providing a quantitative measure of each layer-group's causal impact. Experiments on MNIST, ImageNet, and CIC-IDS show Tracer yields coherent explanations, supports global explainability, and enables compression with minimal loss in accuracy, highlighting its practical relevance for trustworthy and efficient DNN deployment.
Abstract
Despite their success and widespread adoption, the opaque nature of deep neural networks (DNNs) continues to hinder trust, especially in critical applications. Current interpretability solutions often yield inconsistent or oversimplified explanations, or require model changes that compromise performance. In this work, we introduce TRACER, a novel method grounded in causal inference theory designed to estimate the causal dynamics underpinning DNN decisions without altering their architecture or compromising their performance. Our approach systematically intervenes on input features to observe how specific changes propagate through the network, affecting internal activations and final outputs. Based on this analysis, we determine the importance of individual features, and construct a high-level causal map by grouping functionally similar layers into cohesive causal nodes, providing a structured and interpretable view of how different parts of the network influence the decisions. TRACER further enhances explainability by generating counterfactuals that reveal possible model biases and offer contrastive explanations for misclassifications. Through comprehensive evaluations across diverse datasets, we demonstrate TRACER's effectiveness over existing methods and show its potential for creating highly compressed yet accurate models, illustrating its dual versatility in both understanding and optimizing DNNs.
