Slide 1

Slide 1 text

1 Demystifying the neural network black box Christopher Lennan (Senior Data Scientist) @chris_lennan Tanuj Jain (Data Scientist) @tjainn #idealoTech

Slide 2

Slide 2 text

Motivation 2

Slide 3

Slide 3 text

3 Motivation Convolutional Neural Networks (CNN) • CNNs are at the heart of most computer vision applications these days • They have also established themselves as successful for various NLP tasks • But: It is notoriously difficult to interpret/understand predictions! • Problematic, because o Understanding is just as important as performance o Sensitive applications (medical or autonomous driving) require a thorough understanding of its inner workings o CNNs can be improved if their predictions are properly understood

Slide 4

Slide 4 text

idealo Use Case ● Why are these misclassified as bathrooms? 4 Use Case: Identify the area of Hotel Property

Slide 5

Slide 5 text

Convolutional Neural Network (CNN) 5 source: Zhou et. al., “Learning Deep Features for Discriminative Localization”

Slide 6

Slide 6 text

Convolutional Neural Network (CNN) 6 source: http://cs231n.github.io/convolutional-networks/

Slide 7

Slide 7 text

Convolutional Neural Network (CNN) 7 source: Zhou et. al., “Learning Deep Features for Discriminative Localization”

Slide 8

Slide 8 text

Interpretability 8

Slide 9

Slide 9 text

9 Interpreting CNNs • The available methods for interpreting CNNs can be broadly grouped into 1. Attribution methods • attributing a classification result back to the input pixels • output is usually a heatmap over input pixels that indicates how much each pixel contributed to the classification outcome 2. Visualization methods • Visualize the patterns that filters have learned • Generate images that cause maximum neuron activation • Visualize neuron interactions

Slide 10

Slide 10 text

Attribution methods 1. Perturbation based approaches - Occlude area of interest to test its effectiveness in changing predictions 2. Gradient based approaches - Calculation of gradients of output w.r.t. some network variable a. Saliency Maps b. Guided Backpropagation c. Deconvolution 3. Relevance Score approaches a. Class Activation Map (CAM) b. Grad- CAM c. Layerwise Relevance Propagation (LRP) Relative importance of areas of the input image for predictions

Slide 11

Slide 11 text

Visualization methods Neurons and parameters can be visualized at all levels of the network: 11 Looking at the learned parameters of the neural network source: https://distill.pub/2017/feature-visualization/

Slide 12

Slide 12 text

Coding Time! 12

Slide 13

Slide 13 text

Idealo Use Cases 13

Slide 14

Slide 14 text

CAM-Analysis

Slide 15

Slide 15 text

CAM-Analysis

Slide 16

Slide 16 text

Insights With CAM Swimming Pool misclassified as Bathroom 16 CAM

Slide 17

Slide 17 text

Insights With CAM Swimming Pool misclassified as Bathroom 17 CAM

Slide 18

Slide 18 text

Insights With CAM Swimming Pool misclassified as Bathroom 18 CAM

Slide 19

Slide 19 text

Insights With CAM Swimming Pool misclassified as Bathroom Using rails to misidentify Pool as Bathroom. 19

Slide 20

Slide 20 text

Insights With CAM Bathroom correct classification 20 CAM

Slide 21

Slide 21 text

Insights With CAM Bathroom correct classification 21 CAM

Slide 22

Slide 22 text

Insights With CAM Bathroom correct classification 22 CAM

Slide 23

Slide 23 text

Insights With CAM Bathroom correct classification Using faucets to correctly identify Bathroom. 23

Slide 24

Slide 24 text

Image Aesthetics

Slide 25

Slide 25 text

Convolutional filter visualisations Layer 23 MobileNet original MobileNet Aesthetic 25

Slide 26

Slide 26 text

Convolutional filter visualisations Layer 51 MobileNet original MobileNet Aesthetic 26

Slide 27

Slide 27 text

Convolutional filter visualisations Layer 79 MobileNet original MobileNet Aesthetic 27

Slide 28

Slide 28 text

Image-ATM Python package we developed for tagging images 28

Slide 29

Slide 29 text

Check us out! #idealoTech 29 https://github.com/idealo https://medium.com/idealo-tech-blog

Slide 30

Slide 30 text

Data Science Team 30

Slide 31

Slide 31 text

Tanuj Jain [email protected] @tjainn Christopher Lennan [email protected] @chris_lennan 31

Slide 32

Slide 32 text

THE END 32