Karthik Yearning Deep Learning

Understanding CNN

This is a summarization of the Explanatory Graphs for CNNs paper.

A graphical model is employed to understand the hierarchial feature representation hidden inside the CNN network which facilitates the classification , localization applications in Deep learning. The feature representation pattern from each filter is extracted to understand using the graphical model which consists of nodes and edges.

The node in graphical model represent a feature part pattern. Edges encodes co-activation relationships and spatial relationships between patterns.

A pre-trained CNN model is considered for Experiment. The location of each pattern is not fixed to a specific neural activation unit during the inference process. Instead given different input images , a part pattern may appear on various locations of a filter’s feature map. But they are co-activated and keep certain spatial relationships.

Given a testing image to the CNN , the exploratory graph developed in this paper can infer

Visualization understanding:


  1. A single filter is usually activated by different parts of the object.
  2. Let us assume that given an input image , a filter is activated by N parts (i.e) there are N activation peaks on the filter’s feature map. Some peaks represent common parts of the object, which are termed part pattern.
  3. Other activation peaks may correspond to background noises or textural patterns.

It is assumed that if an activation peak of a filter represents an object part , then the CNN usually also contains other filters to represent neighboring parts of the target part (i.e) some activation peaks of the filters must keep certain spatial relationships with the target part.

Patterns in high layers usually represent large scale object parts , while patterns in low layers mainly describe small and relatively simple shapes , which can be regarded as components of high layer patterns.

Patterns in high layers are usually discriminative. Patterns in low layers are disentangled based on their spatial relationship with high layer patterns.


We designed three experiments to evaluate the explanatory graph from different perspectives.

Experiment Images from the paper:

For further information. Please refer the Paper