Saliency Maps for Deep Learning: Vanilla Gradient

From the Vanilla Gradient paper, Simonyan et. al. (2013)
LeNet 5 architecture for MNIST character recognition dataset

The Setup

Left: original image. Center: saliency map blended with original image. Right: saliency map.
Run this to generate your saliency maps

Implementing Vanilla Gradient

Accidentally swapping an addition for subtraction operator on a single step causes the algorithm to render the deceiving saliency map blend on the right. Learning challenge: after reading this post, can you find that step in the codebase?
Left: original image. Center: saliency map blended with original image. Right: saliency map.
Observation: the left-swing of the 7 mostly detracts from the 1-class, while the vertical line adds to it.

Conclusion

--

--

--

AI Alignment

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Vehicle Trajectory Prediction using LSTM Encoder-Decoder Models

Jump start in object detection with Detectron2 (license plate detection)

Self Driving Cars (Embedded Machine Learning)

5 Derivatives to Excel in Your Machine Learning Interview

Detection of green areas in the City of Buenos Aires — Open Government Week

Keywords to know before you start reading papers on GANs

A Brief Analysis of NLP Technology

BMVA — Human Activity Recognition and Monitoring workshop mini-review

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrew Schreiber

Andrew Schreiber

AI Alignment

More from Medium

The Curse of Dimensionality — Dimension Reduction | Dataloop Blog

KERNEL SVM

Gaussian Mixtures Demystified

A Layman’s guide to the internal of decision tree & random forest