Visualizing the Emergence of Intermediate Visual Patterns in DNNs

Mingjie Li, Shaobo Wang, Quanshi Zhang

The Challenge of DNN Interpretability

Despite the massive success of Deep Neural Networks (DNNs), they remain notoriously opaque "black boxes." While existing visualization tools—such as saliency maps or feature inversion—can show us what a network might be looking at, they rarely reveal how much that specific pattern actually contributes to the final classification. There is a significant gap between simply seeing a pattern and understanding its statistical "discrimination power": its ability to reliably distinguish one category from another.

This paper aims to bridge that gap by answering two fundamental questions:

  1. How does a network gradually learn to recognize useful regional patterns during the training process?
  2. How do non-discriminative patterns in early layers combine to form highly discriminative concepts in deeper layers?

Visualizing Emergence: The Framework

The core contribution of this research is a novel algorithm that projects high-dimensional intermediate features into a low-dimensional (3D) space while strictly preserving the model's internal logic.

Overview of the visualization framework showing temporal and spatial emergence of regional patterns.

To achieve this, the authors employ several key techniques:

  • vMF Distribution Modeling: The authors use the von Mises-Fisher (vMF) mixture model to represent features. Unlike standard Gaussian distributions, vMF is ideal for modeling data on a hypersphere. It focuses on the direction (orientation) of a feature vector, which effectively represents its categorical bias.
  • Information-Preserving Projection: To visualize these features, the researchers learn a linear transformation that projects features into 3D. The objective is to minimize the Kullback-Leibler (KL) divergence between the classification probability of the original DNN and the probability inferred from the projected 3D features. This ensures the visualization remains "faithful" to the model's actual decision-making process.
  • Knowledge Points: The authors define "knowledge points" as regional image features that possess high discrimination power. They further distinguish "reliable" knowledge points (those pointing toward the correct ground-truth category) from "unreliable" ones.

Experimental Setup

The researchers evaluated their method using several standard computer vision benchmarks, including Tiny ImageNet (a 200-class subset of ImageNet), MS COCO 2014 (for complex, multi-object scenes), and CUB-200-2011 (for fine-grained bird classification). The method was tested across popular architectures like VGG-16, ResNet-34/50, and MobileNet-V2.

Key Insights and Ideas

By mapping the "discrimination power" of features across both training time and network depth, the framework provides a new lens to evaluate model capacity and behavior.

Spatial and Temporal Emergence

Visualization shows that in early layers, features are scattered and non-discriminative (e.g., simple edges). As data flows through the network, these features "clump" into distinct directions representing specific categories—a process the authors call spatial emergence.

Similarly, during training, the discrimination power of regional patterns doesn't increase linearly. The visualization allows researchers to see exactly at which iteration a specific visual concept becomes a reliable indicator for the model, illustrating temporal emergence.

The temporal emergence of visual patterns across training iterations, showing how features cluster into distinct categories over time.

Explaining Model Behaviors

  • Adversarial Vulnerability: The study reveals that adversarial attacks don't just randomly break a network; they specifically target and flip "unreliable" regional features in the higher layers. The authors categorized attacking behaviors, showing how features belonging to one class (e.g., "dog") are systematically warped into another (e.g., "cat").
  • The "Lite" Nature of Distillation: In Knowledge Distillation (KD), a student network tries to mimic a teacher. The authors found that student networks usually encode significantly fewer and less reliable knowledge points than their teachers, even if their final accuracy is similar.

Key Results

  • Faithfulness: The authors calculated the Pearson correlation between their visualized feature strength and the model's classification uncertainty. Their method achieved significantly higher negative correlations (up to -0.95) compared to standard methods like PCA, t-SNE, or ISOMAP, proving their visualization better reflects the model's internal "confidence."
  • Quantification: By counting knowledge points, they could plot the "growth" of a network's intelligence over time. For example, in VGG-16, the ratio of reliable knowledge points increases significantly as data moves from layer conv_33 (32.98%) to conv_53 (62.94%).
  • Qualitative Clarity: The 3D plots clearly show category clusters (e.g., "bus" features grouping near "lifeboat" features due to visual similarity), providing an intuitive map of the model's semantic space.

Limitations and Future Work

While powerful, the method has limitations. To maintain clarity in the radial plots, the authors randomly selected 10 categories for visualization; visualizing hundreds of categories simultaneously in 3D remains a challenge for human interpretability. Additionally, the projection relies on a linear transformation. While computationally efficient, it might not capture the full complexity of highly non-linear feature interactions in the deepest layers.

Looking forward, the authors suggest this method could be used to "diagnose" pre-trained models, helping researchers identify exactly which layers or regions are failing in specific tasks.

Summary updated

BibTeX
@inproceedings{li2021visualizing,
  author = {Mingjie Li and Shaobo Wang and Quanshi Zhang},
  title = {{Visualizing the Emergence of Intermediate Visual Patterns in DNNs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=JsAQa4Ar_Qb},
}
Figure