Neural Networks: From Fundamentals to Modern AI · Interpretation and Visualization of Neural Networks
Visualizing filters and activation maps in a CNN
Interpretation and Visualization of Neural Networks
Introduction
Convolutional networks are often called a "black box", but in the case of CNNs the box is glassy enough to look inside. The first convolutional layer learns filters resembling edge and texture detectors (Gabor-like), and subsequent layers build a hierarchy from edges through textures to object parts and whole objects (Zeiler & Fergus 2014). This hierarchy can be seen through three families of techniques: (1) direct visualization of filter weights (practically useful only for layer 1, because filters of subsequent layers operate on abstract feature-map channels), (2) visualization of activation maps for a specific image (which image regions strongly excite a given channel), (3) visualization by optimization — synthesizing an image that maximizes the activation of a chosen neuron (activation maximization, Erhan et al. 2009; deconvnet Zeiler & Fergus 2014; guided backpropagation Springenberg et al. 2015; lucid/feature visualization Olah et al. 2017). The lesson also covers regularization in synthesis (total variation, frequency preconditioning), tSNE/UMAP of penultimate-layer features, and "network dissection" (Bau et al. 2017) as an attempt to quantitatively assess how many individual neurons code for recognizable concepts.