SlideShare a Scribd company logo
1 of 23
Department of Electrical Engineering
University of Arkansas
Visualizing CNN
Md Abul Hayat
mahayat@uark.edu
Nov 15, 2019
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
CNN Review
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)
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
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
Class Activation Maps (2016)
Class Activation Maps (2016)
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
Gradient-weighted Class Activation Mapping (2017)
• Grad-CAM is generalization of CAM
• CAM is structure dependent
– Where GAP is applied on penultimate layer
Guided Backpropagation (2015)
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
Gradient-weighted Class Activation Mapping (2017)
• Complete Architecture
• Examples:
– https://github.com/utkuozbulak/pytorch-cnn-visualizations
Gradient-weighted Class Activation Mapping (2017)
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
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
Grad-CAM on PVP Signal
TH = 0.1
TH = 0.5
TH = 0.4
Loss: 0.29 0.47
Acc: 0.88 0.82
TPR: 0.89 0.82
TNR: 0.87 0.83
PRE: 0.86 0.80
F1: 0.87 0.80
Freq Domain Data
CNN: 5.5 Hz
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
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
Computing Receptive Fields of CNN (Nov 2019)
Computing Receptive Fields of CNN (Nov 2019)
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
Questions?


More Related Content

Similar to Fa19_P2.pptx

2015-06-15 Large-Scale Elastic-Net Regularized Generalized Linear Models at S...
2015-06-15 Large-Scale Elastic-Net Regularized Generalized Linear Models at S...2015-06-15 Large-Scale Elastic-Net Regularized Generalized Linear Models at S...
2015-06-15 Large-Scale Elastic-Net Regularized Generalized Linear Models at S...
DB Tsai
 
FR3.L09 - MULTIBASELINE GRADIENT AMBIGUITY RESOLUTION TO SUPPORT MINIMUM COST...
FR3.L09 - MULTIBASELINE GRADIENT AMBIGUITY RESOLUTION TO SUPPORT MINIMUM COST...FR3.L09 - MULTIBASELINE GRADIENT AMBIGUITY RESOLUTION TO SUPPORT MINIMUM COST...
FR3.L09 - MULTIBASELINE GRADIENT AMBIGUITY RESOLUTION TO SUPPORT MINIMUM COST...
grssieee
 
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
John Gunnels
 

Similar to Fa19_P2.pptx (20)

2015-06-15 Large-Scale Elastic-Net Regularized Generalized Linear Models at S...
2015-06-15 Large-Scale Elastic-Net Regularized Generalized Linear Models at S...2015-06-15 Large-Scale Elastic-Net Regularized Generalized Linear Models at S...
2015-06-15 Large-Scale Elastic-Net Regularized Generalized Linear Models at S...
 
An accurate retrieval through R-MAC+ descriptors for landmark recognition
An accurate retrieval through R-MAC+ descriptors for landmark recognitionAn accurate retrieval through R-MAC+ descriptors for landmark recognition
An accurate retrieval through R-MAC+ descriptors for landmark recognition
 
FR3.L09 - MULTIBASELINE GRADIENT AMBIGUITY RESOLUTION TO SUPPORT MINIMUM COST...
FR3.L09 - MULTIBASELINE GRADIENT AMBIGUITY RESOLUTION TO SUPPORT MINIMUM COST...FR3.L09 - MULTIBASELINE GRADIENT AMBIGUITY RESOLUTION TO SUPPORT MINIMUM COST...
FR3.L09 - MULTIBASELINE GRADIENT AMBIGUITY RESOLUTION TO SUPPORT MINIMUM COST...
 
Zupt, LLC's SLAM and Optimal Sensor fusion
Zupt, LLC's SLAM and Optimal Sensor fusionZupt, LLC's SLAM and Optimal Sensor fusion
Zupt, LLC's SLAM and Optimal Sensor fusion
 
Explaining the decisions of image/video classifiers
Explaining the decisions of image/video classifiersExplaining the decisions of image/video classifiers
Explaining the decisions of image/video classifiers
 
Enterprise Scale Topological Data Analysis Using Spark
Enterprise Scale Topological Data Analysis Using SparkEnterprise Scale Topological Data Analysis Using Spark
Enterprise Scale Topological Data Analysis Using Spark
 
Enterprise Scale Topological Data Analysis Using Spark
Enterprise Scale Topological Data Analysis Using SparkEnterprise Scale Topological Data Analysis Using Spark
Enterprise Scale Topological Data Analysis Using Spark
 
SPIE Remote Sensing 2019
SPIE Remote Sensing 2019SPIE Remote Sensing 2019
SPIE Remote Sensing 2019
 
INNOVA - SPIE Remote Sensing 2019
INNOVA - SPIE Remote Sensing 2019 INNOVA - SPIE Remote Sensing 2019
INNOVA - SPIE Remote Sensing 2019
 
Week5-Faster R-CNN.pptx
Week5-Faster R-CNN.pptxWeek5-Faster R-CNN.pptx
Week5-Faster R-CNN.pptx
 
PCA-SIFT: A More Distinctive Representation for Local Image Descriptors
PCA-SIFT: A More Distinctive Representation for Local Image DescriptorsPCA-SIFT: A More Distinctive Representation for Local Image Descriptors
PCA-SIFT: A More Distinctive Representation for Local Image Descriptors
 
Multiple UGV SLAM Map Sharing
Multiple UGV SLAM Map SharingMultiple UGV SLAM Map Sharing
Multiple UGV SLAM Map Sharing
 
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
 
Kintinuous review
Kintinuous reviewKintinuous review
Kintinuous review
 
TAME: Trainable Attention Mechanism for Explanations
TAME: Trainable Attention Mechanism for ExplanationsTAME: Trainable Attention Mechanism for Explanations
TAME: Trainable Attention Mechanism for Explanations
 
DDGK: Learning Graph Representations for Deep Divergence Graph Kernels
DDGK: Learning Graph Representations for Deep Divergence Graph KernelsDDGK: Learning Graph Representations for Deep Divergence Graph Kernels
DDGK: Learning Graph Representations for Deep Divergence Graph Kernels
 
The Origin of Grad-CAM
The Origin of Grad-CAMThe Origin of Grad-CAM
The Origin of Grad-CAM
 
Cerebellar Model Articulation Controller
Cerebellar Model Articulation ControllerCerebellar Model Articulation Controller
Cerebellar Model Articulation Controller
 
NS-CUK Seminar: J.H.Lee, Review on "Graph Neural Networks with convolutional ...
NS-CUK Seminar: J.H.Lee, Review on "Graph Neural Networks with convolutional ...NS-CUK Seminar: J.H.Lee, Review on "Graph Neural Networks with convolutional ...
NS-CUK Seminar: J.H.Lee, Review on "Graph Neural Networks with convolutional ...
 
SparkNet presentation
SparkNet presentationSparkNet presentation
SparkNet presentation
 

More from Md Abul Hayat

More from Md Abul Hayat (13)

Self-supervised Learning for Astronomical Images
Self-supervised Learning for Astronomical ImagesSelf-supervised Learning for Astronomical Images
Self-supervised Learning for Astronomical Images
 
dissertation_proposal_presentation.pdf
dissertation_proposal_presentation.pdfdissertation_proposal_presentation.pdf
dissertation_proposal_presentation.pdf
 
Review_Sp23.pdf
Review_Sp23.pdfReview_Sp23.pdf
Review_Sp23.pdf
 
Fa18_P1.pptx
Fa18_P1.pptxFa18_P1.pptx
Fa18_P1.pptx
 
Sp18_P2.pptx
Sp18_P2.pptxSp18_P2.pptx
Sp18_P2.pptx
 
Sp18_P1.pptx
Sp18_P1.pptxSp18_P1.pptx
Sp18_P1.pptx
 
Sp20_P1.pptx
Sp20_P1.pptxSp20_P1.pptx
Sp20_P1.pptx
 
Sp19_P2.pptx
Sp19_P2.pptxSp19_P2.pptx
Sp19_P2.pptx
 
Sp19_P1.pptx
Sp19_P1.pptxSp19_P1.pptx
Sp19_P1.pptx
 
Fa19_P1.pptx
Fa19_P1.pptxFa19_P1.pptx
Fa19_P1.pptx
 
Fa18_P2.pptx
Fa18_P2.pptxFa18_P2.pptx
Fa18_P2.pptx
 
Fa18_P1.pptx
Fa18_P1.pptxFa18_P1.pptx
Fa18_P1.pptx
 
STAN_MS_PPT.pptx
STAN_MS_PPT.pptxSTAN_MS_PPT.pptx
STAN_MS_PPT.pptx
 

Recently uploaded

一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
A
 
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
mikehavy0
 
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
c3384a92eb32
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
rahulmanepalli02
 

Recently uploaded (20)

Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdf
 
DBMS-Report on Student management system.pptx
DBMS-Report on Student management system.pptxDBMS-Report on Student management system.pptx
DBMS-Report on Student management system.pptx
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
analog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptxanalog-vs-digital-communication (concept of analog and digital).pptx
analog-vs-digital-communication (concept of analog and digital).pptx
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
 
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
一比一原版(Griffith毕业证书)格里菲斯大学毕业证成绩单学位证书
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
Introduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptxIntroduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptx
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
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
  • 13. Gradient-weighted Class Activation Mapping (2017) • Complete Architecture • Examples: – https://github.com/utkuozbulak/pytorch-cnn-visualizations
  • 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
  • 17. Grad-CAM on PVP Signal TH = 0.1 TH = 0.5 TH = 0.4 Loss: 0.29 0.47 Acc: 0.88 0.82 TPR: 0.89 0.82 TNR: 0.87 0.83 PRE: 0.86 0.80 F1: 0.87 0.80 Freq Domain Data CNN: 5.5 Hz
  • 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
  • 20. Computing Receptive Fields of CNN (Nov 2019)
  • 21. Computing Receptive Fields of CNN (Nov 2019)
  • 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