Inference Graphs for CNN Interpretation

Yael Konforti, Alon Shpigler, Boaz Lerner, Aharon Bar-HillelECCV 2020

Abstract

Convolutional Neural Networks (CNNs) are often criticized for being "black boxes" due to their reliance on distributed numerical representations. This paper introduces a post-hoc probabilistic framework that translates these opaque activations into human-interpretable "inference graphs." By clustering neural activity into a dictionary of "visual words" and modeling their transitions across layers, the method reveals the logical progression from low-level textures to high-level semantic concepts. Evaluated on ImageNet and CIFAR-10, the approach provides clear qualitative insights and error diagnosis capabilities without requiring architectural changes or retraining.

Introduction

Despite their state-of-the-art performance, CNNs operate through massive vectors of numbers that lack inherent meaning to humans. While we can observe a network's final classification, the intermediate reasoning remains hidden. The authors argue that for AI to be trustworthy, we must translate these distributed representations into discrete, human-oriented symbols. The challenge lies in converting continuous neural activity into a "language" of visual parts and relationships without interfering with the network's performance.

Methodology: Probabilistic Inference Graphs

The researchers propose a framework to model network activity as a sequence of discrete states:

  1. Visual Word Dictionaries: The activity of each layer is modeled using a Gaussian Mixture Model (GMM). Each cluster in the GMM represents a "visual word." In CNNs, these words represent specific feature patterns at spatial locations.
  2. Probabilistic Connections: Transition probabilities are estimated between visual words in consecutive layers. For CNNs, conditional probabilities are calculated based on the co-occurrence of words within a feature's receptive field.
  3. Graph Mining: To handle the complexity of thousands of potential words, a graph-mining algorithm extracts the most informative subgraphs using maximum-likelihood considerations to explain specific decisions.
  4. ReLU Modeling: To account for the sparsity of ReLU activations, the authors utilize a rectified Gaussian density.
The probabilistic framework maps input images through hidden layers ($h$) to latent states ($y$) and finally to discrete visual words ($x$).

Experiments and Key Insights

The method was evaluated on CIFAR-10 (using ResNet20) and ILSVRC 2012 (using VGG-16 and ResNet50).

The Hierarchy of Meaning

The resulting inference graphs illustrate the compositional nature of vision. For instance, a high-level concept like a specific animal head is shown to be composed of lower-level visual words representing textures and basic shapes from earlier layers. This hierarchical decomposition allows researchers to see how the network builds complex concepts from simple primitives.

CNN vs. MLP Representations

A key finding is the difference in how architectures learn. In MLPs, representations become increasingly class-specific and similar in deeper layers. In contrast, CNN clusters remain local and diverse, suggesting that CNNs classify based on the simultaneous appearance of distinct, non-similar visual words across different image regions.

Results and Error Diagnosis

The framework serves as a powerful diagnostic tool. By examining the inference path of misclassified images, researchers can pinpoint where the logic failed—such as an unconventional feature triggering an incorrect intermediate visual word.

Visual words identified by the model capture semantically consistent parts (e.g., faces of different monkey species) across the dataset.

Quantitatively, the authors validated that these "visual words" capture the network's essential logic by training a linear classifier on word histograms. The performance nearly matched the original network, confirming that the GMMs accurately summarize the necessary information for classification.

Conclusion

While the method currently faces computational challenges at the scale of 1,000-class ImageNet models—requiring class-specific sub-models—it represents a significant step toward interpretable AI. Future work aims to automate the semantic labeling of visual words and improve the efficiency of graph mining for even deeper architectures. This post-hoc approach ensures that interpretability does not come at the cost of model accuracy.

Summary updated

BibTeX
@inproceedings{konforti2020inference,
  author = {Yael Konforti and Alon Shpigler and Boaz Lerner and Aharon Bar-Hillel},
  title = {{Inference Graphs for CNN Interpretation}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58595-2\_5},
}
Figure