A Peek Into the Reasoning of Neural Networks: Interpreting With Structural Visual Concepts

Yunhao Ge, Yao Xiao, Zhi Xu, Meng Zheng, Srikrishna Karanam, Terrence Chen, Laurent Itti, Ziyan Wu

Abstract

Traditional eXplainable AI (xAI) methods often rely on pixel-level saliency maps that lack semantic depth and structural context. This paper introduces the Visual Reasoning Explanation (VRX) framework, which interprets neural network decisions through high-level visual concepts and their spatial relationships. By representing images as structural graphs and employing a Graph Reasoning Network to distill the logic of a black-box model, VRX provides human-understandable explanations for both positive predictions ("why") and counterfactuals ("why not"). Experimental results on ImageNet and iLab-20M demonstrate that VRX offers actionable insights for model diagnosis and error correction.

Introduction

The "black-box" nature of deep neural networks remains a significant hurdle for their deployment in critical domains. While saliency maps highlight influential pixels, they fail to explain what the model recognized or how different parts of an object interact to form a classification. Furthermore, these methods struggle to explain why a model rejected alternative classes.

The Visual Reasoning Explanation (VRX) framework addresses these gaps by moving from pixel-level heatmaps to structural visual concepts. As shown in Figure 1, VRX can decompose a "Fire engine" prediction into constituent parts like ladders and wheels, while also explaining why it was not classified as an "Ambulance" or "School bus" based on the presence or absence of specific structural relationships.

Figure 1: The VRX framework provides reasoning interpretations for both the predicted class and alternative classes by analyzing structural visual concepts.

Methods

The VRX framework operates in three distinct stages to bridge the gap between low-level features and high-level reasoning.

1. Visual Concept Extractor (VCE)

The VCE identifies recurring, class-specific visual patterns (e.g., grills, wheels). To ensure these concepts are relevant to the object rather than the background, VRX incorporates a Grad-CAM filter. This refinement ensures that the extracted concepts are grounded in the regions the model actually used for its prediction.

2. Structural Concept Graphs (SCGs)

Once concepts are extracted, the image is represented as a graph where nodes correspond to detected concepts and edges represent their spatial relationships. This structural representation captures the "arrangement" of parts, which is often crucial for correct classification.

3. Graph Reasoning Network (GRN) and Knowledge Distillation

To interpret the original model's logic, a "student" Graph Neural Network (GNN) is trained to mimic the "teacher" classification model. By distilling the teacher's knowledge into the GNN, the framework forces the model to reach its conclusions using only the structural graph. A Visual Decision Interpreter (VDI) then calculates contribution scores for each node and edge, revealing the underlying reasoning logic.

Figure 2: The VRX pipeline: (a) Visual Concept Extractor, (b) original model prediction, (c) Graph Reasoning Network training via knowledge distillation, and (d) Visual Decision Interpreter output.

Key Results and Insights

The researchers evaluated VRX on ImageNet and the iLab-20M dataset, yielding several key insights:

  • Logic Consistency and Error Correction: VRX-guided image editing—replacing "negative" concepts with "positive" ones—corrected 95% of misclassified samples in a targeted test set. This demonstrates a causal link between the framework's explanations and the model's actual behavior.
  • Model Diagnosis: On the iLab-20M dataset, VRX revealed that a ResNet-18 model was using vehicle pose as a shortcut for classification. By identifying this bias, researchers were able to augment the training data and improve accuracy from 50% to 60%.
  • Structural Sensitivity: The framework successfully detected structural anomalies. For instance, moving a truck's wheels to the top of the image resulted in a significant drop in the structural relationship score, explaining the model's loss of confidence.

Conclusion

VRX represents a significant step toward actionable xAI. By shifting the focus from pixels to structural concepts, it enables developers to diagnose model biases and fix misclassifications through targeted data augmentation or concept replacement. Future work will explore extending this structural reasoning to more complex tasks like object detection and automating the model-correction loop.

Summary updated

BibTeX
@inproceedings{ge2021peek,
  author = {Yunhao Ge and Yao Xiao and Zhi Xu and Meng Zheng and Srikrishna Karanam and Terrence Chen and Laurent Itti and Ziyan Wu},
  title = {{A Peek Into the Reasoning of Neural Networks: Interpreting With Structural Visual Concepts}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00223},
}
Figure