Source-linked AI summary

Understanding Neural Networks via Feature Visualization: A survey

Anh Nguyen, Jason Yosinski, Jeff Clune

arXiv:1904.08939v1cs.LGcs.AIcs.CVstat.ML

TL;DR

Existing image-based methods provide limited coverage and control for understanding what neural units represent. This survey reviews Activation Maximization techniques, develops a probabilistic interpretation, and examines applications in debugging and explaining networks. It concludes that improved AM techniques can make neural-network visualizations more interpretable and less opaque, while noting unresolved concerns about prior bias and architecture-specific tuning.

  • Problem

    Existing image collections may miss informative stimuli and make it difficult to determine which features cause a unit’s response.

  • Method

    The survey reviews AM techniques, discusses a probabilistic interpretation, and examines AM applications for debugging and explaining neural networks.

  • Results

    Improved activation maximization techniques improve the ability to understand deep neural networks through more interpretable visualizations.

  • Takeaways & Limitations

    AM provides a way to shine light into black-box neural networks and support understanding of learned features.

  • Takeaways & Limitations

    A robust AM approach must address image-prior bias across datasets and networks, along with architecture-dependent hyper-parameter settings.

Abstract

from arXiv · show

A neuroscience method to understanding the brain is to find and study the preferred stimuli that highly activate an individual cell or groups of cells. Recent advances in machine learning enable a family of methods to synthesize preferred stimuli that cause a neuron in an artificial or biological brain to fire strongly. Those methods are known as Activation Maximization (AM) or Feature Visualization via Optimization. In this chapter, we (1) review existing AM techniques in the literature; (2) discuss a probabilistic interpretation for AM; and (3) review the applications of AM in debugging and explaining networks.

1 Introduction

Activation Maximization (AM) synthesizes inputs that strongly activate neural units, extending neuroscience’s preferred-stimulus approach to neural-network analysis. Compared with searching existing image datasets, synthesis offers more control but unconstrained optimization can produce uninterpretable images.

  • Motivation: Neuroscience studies preferred stimuli to infer what individual neurons encode, from oriented edges and circles to faces and higher-level concepts.Hubel and Wiesel’s experiments identified visual-cortex neurons that respond selectively to bars in particular positions and orientations.
  • Motivation: Inspecting preferred inputs can clarify what a machine-learning unit does, but dataset-based searches require testing many images and may miss informative stimuli.Large image collections may not contain activating examples because image space is vast and neural behaviors can be complex.
  • Motivation: Dataset images can confound interpretation because multiple features, such as a bird and a branch, may jointly explain a unit’s activation.The common top-nine visualization may represent only one of several feature types preferred by a multifaceted unit.
  • Activation Maximization: Synthesis can avoid access to a target model’s training set and provides greater control over image types and contents for controlled experiments.These advantages motivate synthesizing preferred stimuli from scratch rather than selecting only existing dataset images.
  • Activation Maximization: AM synthesizes an input x that maximizes a neuron’s activation by optimizing the network input while keeping the network parameters fixed.Gradient ascent begins from a random initialization and repeatedly follows the activation gradient; the step size is chosen empirically.
  • Limitations: Unconstrained AM often produces high-frequency, non-human-recognizable images that strongly activate a unit, while starting from real images can yield adversarial examples.These behaviors limit interpretability and raised security and reliability concerns for machine-learning applications.

2 Activation Maximization via Hand-designed Priors

Hand-designed image priors address unnatural colors, high-frequency patterns, and poor global coherence in activation-maximization images, but often rely on heuristics, local statistics, and added hyperparameters. They also face persistent challenges in representing a neuron's diverse preferred features.

  • Local statistics: Natural image priors constrain activation-maximization searches toward interpretable stimuli, improving images over high-frequency rubbish examples.These priors can target photorealistic images or images resembling the training distribution.
  • Local statistics: Regularizers penalize extreme intensities and high-frequency noise, apply transformations, smooth gradients, or match patch-level color statistics.Examples include α-norm penalties, total variation, Gaussian blur, jittering, rotation, scaling, and bilateral filtering.
  • Global structures: Pixel-space optimization can produce multiple object fragments instead of globally coherent objects, such as scattered bell-pepper segments.Pixel-wise changes can increase activation through repeated local discriminative features without establishing whole-object structure.
  • Global structures: Heuristics such as multiscale painting, center-biased updates, and average-image initialization somewhat improve global coherence but add hyperparameters and leave a realism gap.The comparison remains subjective in the cited figure, where the deep-generator method is judged to produce more natural colors and realistic global structures.
  • Diversity: Activation-maximization methods may repeatedly converge to similar images despite different random starts, limiting coverage of a neuron's multiple facets.Proposed diversity methods include path dropout, clustered initializations, distance maximization, joint-neuron activation, and update noise, but they introduce tuning questions.
  • Diversity: Diversity interventions achieve limited success while adding hyperparameters, including unresolved choices about similarity metrics and required separation between stimuli.These constraints complicate determining whether synthesized images adequately capture all preferred stimulus types.

3 Activation Maximization via Deep Generator Networks

Deep Generator Network Activation Maximization searches a generator’s latent code rather than pixels, using a learned image prior to produce more coherent and realistic preferred stimuli. This improves image quality but can limit diversity, motivating later use of a learned realism prior and update noise.

  • Latent-space optimization: DGN-AM optimizes a compressed latent code so a deep generator produces an image that strongly activates a target neuron.The generator restricts the search to images it can draw and makes updates more coherent than independent pixel changes.
  • Generator networks: The generator is trained to invert CaffeNet’s 4096-dimensional fc6 representation while using GAN loss to improve image realism.It maps latent codes to images and is intended to portray patterns learned by the target network.
  • Latent-space optimization: The optimization iteratively backpropagates through both the generator and the target network while updating the generator input code.The procedure searches for a code h such that the generated image G(h) maximizes the neural activation a(G(h)).
  • Results and extensions: DGN-AM showed a great improvement in image quality over pixel-space methods, but its synthesized images had limited diversity and resembled real top-9 activating images.The latent code also received small L2 regularization and clipping in the described implementation.
  • Results and extensions: A denoising-autoencoder realism prior plus Gaussian noise was used to improve image diversity and provide a probabilistic justification for the procedure.This extension is presented as a later development following the limited diversity of DGN-AM.

4 Probabilistic interpretation for Activation Maximization

The probabilistic view treats Activation Maximization as sampling from a model combining an image prior with a recognition network. This framework explains selective objectives, noise-driven diversity, and how earlier AM methods correspond to different prior and sampling choices.

  • AM can be viewed as sampling from a generative model composed of an image prior and a recognition network being visualized.
  • 4.1 Synthesizing selective stimuli: Maximizing one unit can also elevate similar units, so softmax-based objectives enforce that the target is the highest activation across its layer.Selective stimuli are described as more interpretable because they contain features exclusive to the unit of interest.
  • 4.2 Probabilistic framework: The probabilistic model decomposes the joint distribution over images and neuron labels into an image density model and an image classifier model.For an output-layer ImageNet classifier, the categorical variable can represent an image category and the conditional distribution can be modeled with softmax.
  • 4.3 Interpretation of previous algorithms: The sampler update combines movement toward target-neuron selectivity, realistic images, and noise that explores the search space and improves diversity.The three terms are illustrated as red, blue, and green directions in Fig. 7.
  • 4.2 Probabilistic framework: The log-softmax gradient is theoretically justified under the sampler framework, whereas raw activations were previously used empirically without full justification.
  • 4.3 Interpretation of previous algorithms: Earlier AM methods differ by their priors and noise: no-prior methods produce rubbish images, Gaussian priors suppress high frequencies, and learned generator priors improve diversity.DGN-AM uses a hand-designed prior with no noise, while PPGNs use a denoising-autoencoder prior and produce more diverse images.

5 Applications of Activation Maximization

Activation maximization is applied to visualize learned features, debug networks, and probe behaviors across image classification, captioning, segmentation, and biological-brain settings. These applications reveal both interpretable representations and unexpected model failures.

  • Visualize hidden units: AM visualizations can reveal hidden-unit functions through evidence similar to, and sometimes complementary to, highly activating real image regions.For example, a unit detecting TV screens also responds to people on TV.
  • Synthesize preferred images activating multiple neurons: Activating multiple units simultaneously exposes interactions and different facets of a neuron, such as candle representations shaped by castle or piano context.The castle-plus-candles and piano-plus-candles combinations produce distinct images that both strongly activate the candle unit.
  • Watch feature evolution during training: AM can track feature evolution during training, with lower-layer features tending to converge faster than higher-layer features.The survey describes videos of output- and hidden-neuron visualizations throughout CaffeNet training.
  • Synthesizing videos: For video-recognition networks, synthesized videos indicated weak reliance on temporal correlations, consistent with similar predictions after randomly shuffling frames.The AM videos appeared as sets of uncorrelated activity frames.
  • Activation maximization as a debugging tool: AM can expose implementation bugs by showing that a classifier learned or processed images in an unintended BRG color space.The BRG color-space behavior may be difficult to detect from accuracy scores or attribution heatmaps alone.
  • Conditioned synthesis: Conditioned synthesis extends AM beyond classifiers to captioning and segmentation, while captioning visualizations exposed a model that declared birds even when none were present.Other applications synthesize images for target captions or semantic maps, and general ImageNet priors can be used for MIT Places and UCF-101 networks.
  • Synthesize preferred stimuli for real, biological brains: AM methods can also reconstruct preferred stimuli for neurons in living macaque brains using learned image generators.The survey reports use of ImageNet PPGN and DGN-AM techniques for this purpose.

6 Discussion and Conclusion

The survey presents AM as a way to make neural networks more interpretable while emphasizing unresolved challenges in comparison, evaluation, scale, and controllable stimulus generation. It concludes that improving AM is tied to better understanding of opaque deep networks.

  • Open challenges: Comparing models across datasets or architectures requires faithful, interpretable AM methods because image priors and architecture-specific hyperparameters can bias comparisons.The survey identifies prior generality and differing optimization settings as central difficulties.
  • Open challenges: AM methods need rigorous evaluation because powerful image priors may produce visualizations whose features derive from the prior, the target network, or both.The survey also notes that DGN-AM generated diverse images, including blurry, cut-up, and BRG examples.
  • Open challenges: Because concepts can be distributed across neurons, applying AM to groups of neurons may be more informative than focusing only on individual neurons.The survey identifies larger-scale analysis as a promising direction.
  • Open challenges: Combining AM with attribution tools, AI testbeds, or 3D-renderer parameters could support safer analysis and more controlled stimulus variation.3D parameterization can vary factors such as lighting, geometry, or appearance while generating strongly activating images.
  • Conclusion: AM remains an open tool for illuminating black-box neural networks and improving their interpretability.The survey frames improved AM techniques as a route toward better understanding of deep-network behavior.
Loading 1904.08939v1…