Abstract
In recent years convolutional neural networks (CNN) have shown striking progress in various tasks. However, despite the high performance, the training and prediction process remains to be a black box, leaving it a mystery to extract what neurons learn in CNN. In this paper, we address the problem of interpreting a CNN from the aspects of the input image's focus and preference, and the neurons' domination, activation and contribution to a concrete final prediction. Specifically, we use two techniques - visualization and clustering - to tackle the problems above. Visualization means the method of gradient descent on image pixel, and in clustering section two algorithms are proposed to cluster respectively over image categories and network neurons. Experiments and quantitative analyses have demonstrated the effectiveness of the two methods in explaining the question: what do neurons learn.
Introduction
Despite their state-of-the-art performance, Convolutional Neural Networks (CNNs) remain notoriously difficult to interpret. While we understand they learn effective representations, identifying the specific features a neuron responds to or how the network assembles these features into a final prediction is a major challenge. This paper investigates feature importance, network robustness to pixel-level perturbations, and the hierarchical organization of knowledge within the network.
Methodology
The authors employ two primary technical avenues to demystify the CNN "black box":
Neuron Knowledge Visualization
To understand what a network "prefers," the authors use gradient descent on image pixels to synthesize an input that maximizes the activation of specific units, such as class logits or individual filters. To ensure these visualizations are interpretable and less noisy, they implement a technique involving random blurring, translation, and rotation of the gradient during backpropagation. Additionally, Grad-CAM is utilized to localize the specific image regions that contribute most significantly to a given prediction.
Hierarchical Clustering
Two distinct clustering algorithms are proposed to map the network's internal logic:
- Category Clustering (Algorithm 1): Each image category is represented as a vector derived from the average feature map of the final convolutional layer. Using cosine similarity and a greedy merging approach, the authors construct a taxonomy tree of categories.
- Filter Clustering (Algorithm 2): This algorithm identifies "critical filters" within a category—those whose removal most significantly impacts cluster distances. This results in a hierarchical "prediction tree" that traces the sequence of features the network identifies (e.g., moving from a torso to a head and then to a mane).
Key Insights and Results
Context-Dependent Discrimination
A significant finding is that a network's internal definition of an object is highly dependent on its contrastive context. In a binary network trained to distinguish cats from dogs, the optimized "super-dog" visualization focuses almost exclusively on the head, as this is the most discriminative feature. Conversely, in a plane-dog network, the "super-dog" visualization encompasses the full body, as the entire silhouette is useful for distinguishing a dog from an airplane.
Robustness and Semantic Hierarchy
The study reveals that images with complex backgrounds are more vulnerable to adversarial-like pixel perturbations than those with clean backgrounds. Robustness is quantified through heatmaps of gradient accumulation; for robust images, these gradients typically reflect the rough sketch of the object.
Furthermore, the hierarchical clustering successfully maps filters to a logical progression: lower layers focus on low-level textures and colors, while higher layers focus on semantic parts and objects. The unsupervised category clustering automatically grouped "animals" and "vehicles" into distinct branches, mirroring human intuition without prior labeling of super-categories.
Conclusion
By combining pixel-level visualization with hierarchical clustering, this work provides a clearer window into the decision-making processes of CNNs. The results demonstrate that CNNs organize features semantically and adapt their focus based on the specific classification task. Future work will aim to scale these methods to multi-object detection and more complex datasets to further refine our understanding of category space and filter attribution.
Summary updated