Introduction
Understanding the internal representations of deep neural networks (DNNs) remains a significant challenge in artificial intelligence. While these models achieve human-level performance on complex tasks, they often function as "black boxes." A common technique to interpret them is Activation Maximization (AM), which synthesizes an image that maximally activates a specific neuron. Historically, AM has struggled with the "fooling image" problem: without strong constraints, the optimization process produces high-frequency noise that excites the neuron mathematically but lacks semantic meaning to humans.
Previous attempts to solve this involved hand-designed priors, such as Gaussian blurring or total variation penalties, to encourage "natural-looking" images. While these methods improved interpretability, the resulting visualizations often lacked global coherence and sharp details. This paper introduces DGN-AM, a novel approach that leverages a pre-trained Deep Generator Network (DGN) as a learned prior to synthesize highly realistic and interpretable preferred inputs.
The DGN-AM Framework
The core innovation of DGN-AM is shifting the optimization from the high-dimensional pixel space to the lower-dimensional latent space of a generative model.
As shown in the figure above, the process involves two main components:
- The Prior (DGN): A pre-trained generator (often based on GAN principles) that has learned the manifold of natural images. In this work, the authors use a DGN trained to invert the feature representations of CaffeNet.
- Optimization: Instead of tweaking pixels, the algorithm optimizes the latent vector (specifically at the
fc6layer) of the DGN. The DGN transforms this vector into a synthetic image, which is then passed through the target network. The gradient of the target neuron's activation is backpropagated through the target network and the DGN to update the latent code.
By constraining the optimization to the DGN's latent space, the search is restricted to images that the generator "knows" how to produce—effectively forcing the result to stay on the manifold of realistic natural images.
Visualizing Global Structure
DGN-AM represents a qualitative leap in feature visualization. Unlike previous methods that produced abstract, "DeepDream-like" textures, DGN-AM generates coherent, recognizable objects.
These results provide a key insight: neurons in the final layers of classification networks learn global structural features. For example, a "table lamp" neuron responds to a complete object with a distinct base and shade, rather than just a collection of local textures. This refutes the idea that DNNs rely solely on discriminative local patches for classification. Furthermore, the authors found that optimizing in the latent space of fully-connected layers (like fc6) is essential for this global coherence; optimizing in convolutional latent spaces tends to produce fragmented, repeating patterns.
Generalization and Robustness
A critical question is whether the DGN prior "hallucinates" its own preferences or faithfully reflects the target neuron's learning. To test this, the authors visualized networks trained on distorted data (e.g., blurred or color-swapped images). The DGN-AM visualizations accurately reflected these distortions, proving the method's fidelity.
The approach also demonstrates remarkable generalization:
- Cross-Dataset: A DGN prior trained on ImageNet successfully visualized neurons in networks trained on the MIT Places (scenes) and UCF-101 (actions) datasets. In scene-classification networks, the visualizations revealed that hidden layers spontaneously learn to act as specific object detectors (e.g., beds or water towers).
- Cross-Architecture: While the prior generalizes well to similar architectures (like AlexNet/CaffeNet), visual quality begins to degrade when applied to vastly different architectures like GoogLeNet or deep ResNets, suggesting that the prior is somewhat architecture-dependent.
Conclusion
DGN-AM provides a powerful tool for peering into the "black box" of neural networks. By replacing hand-crafted mathematical priors with learned generative models, it produces state-of-the-art visualizations that are both photorealistic and semantically meaningful. While challenges remain regarding architecture-specific priors and multi-modal neuron responses, this work paves the way for more intuitive and robust model interpretability.
Summary updated