Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Fa19_P2.pptx
1. Department of Electrical Engineering
University of Arkansas
Visualizing CNN
Md Abul Hayat
mahayat@uark.edu
Nov 15, 2019
2. Contents
• Review: CNN Operations
• Network In Network (NIN)
– Global Average Pooling (GAP)
• Class Activation Mapping (CAM)
• Gradient-weighted Class Activation Mapping (Grad-CAM)
• Grad-CAM based Congestive Heart Failure (CHF) Detection
– Receptive Field
• Grad-CAM on PVP Signal
– Challenges
4. Network In Network (2014)
• Filtering in CNN is a Generalized Linear Model (GLM) for the
underlying data patch
• New Idea
– Replacing the GLM with a nonlinear function can enhance the abstraction
ability of the local model
– The ‘mlpconv’ maps the input local patch to the output feature vector with a
multilayer perceptron (MLP) with nonlinear activation functions
– The structure of “Network In Network” (NIN) is a stack of ‘mlpconv’ layers
– It is called NIN as we have micro networks (MLP)
5. Network In Network (2014)
• Global Average Pooling (GAP)
– To replace the traditional fully connected layers in CNN
• Generate one feature map for each corresponding category of the
classification task in the last ‘mlpconv’ layer
• GAP a structural regularizer that enforces feature maps to be
confidence maps of categories
6. Class Activation Maps (2016)
• CNNs actually behave as object detectors
– Despite no supervision on the location of the object provided
– This ability is lost when fully-connected layers are used for classification
9. Gradient-weighted Class Activation Mapping (2017)
• Method
– This results in a coarse heat-map of the same size as the convolutional
feature maps of last convolutional layers
– We apply a ReLU to the linear combination of maps because we are only
interested in the features that have a positive influence on the class of
interest
10. Gradient-weighted Class Activation Mapping (2017)
• Grad-CAM is generalization of CAM
• CAM is structure dependent
– Where GAP is applied on penultimate layer
12. Guided Backpropagation (2015)
• Why guided backpropagation is better?
• Max-pooling can be replaced with a convolutional layer with
increased stride
• Grad-CAM can localize and class discriminative but low resolution
• This paper fused guided backpropagation and Grad-CAM by
pointwise multiplication
• Grad-CAM is up-sampled by bi-linear interpolation
15. Grad-CAM based CHF Detection (Sep 2019)
• Two classes
– Normal patients & CHF patients
– Input is a time domain (ECG) vector of length 80
– Sensitivity = Specificity = 1 and Accuracy = 1
16. Grad-CAM based CHF Detection (Sep 2019)
• Heatmap
– The histograms feature the data points in the input ECG beats above 0.8 in
the normalized heat maps obtained through Grad-CAM
– The sample points that were found to be significant (i.e., where the
histogram points reached a threshold of 0.25) are presented in this figure
18. Computing Receptive Fields of CNN (Nov 2019)
• Nov 4
– https://distill.pub/2019/computing-receptive-fields/
• Notations
– Input image by f0
– Final output feature map fL where L is number of layers in CNN
19. Computing Receptive Fields of CNN (Nov 2019)
• Case 1:
– When,
• Case 2:
– When,
• Receptive field of one output feature
– Receptive field of CHF CNN
• (10-1) + (15-1) + (20-1)+1 = 43
22. Possibilities
• Using Guided backpropagation with Grad-CAM
– We can infer which frequencies are relevant
• Using CAM
• Better design of kernel for receptive field equal to input
• Using RNN