introduction to deep learning - university of cretehy590-21/pdfs/overview of various..."deep...

105
Introduction to Deep Learning Greg Tsagkatakis ICS - FORTH

Upload: others

Post on 03-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Introduction to Deep Learning Greg Tsagkatakis

ICS - FORTH

Page 2: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Machine LearningPlay Video

https://www.youtube.com/watch?v=f_uwKZIAeM0

2

Page 3: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

AgendaLecture #1◦ Introduction

◦ Supervised Deep Learning

Lecture #2◦ Unsupervised Deep Learning

◦ Deep Reinforcement learning

3

Page 4: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Big DataThe 5VsVolume

4

Page 5: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Big DataThe 5VsVolume

Velocity

5

Page 6: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Big DataThe 5VsVolume

Velocity

Variety

6

Page 7: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Big DataThe 5VsVolume

Velocity

Variety

Veracity

7

Page 8: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Big DataThe 5VsVolume

Velocity

Variety

Veracity

Value

8

Page 9: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

BD & Healthcare

9

Page 10: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Big Data & Genetics

10

Page 11: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Big Data & AstrophysicsAstronomy & Astrophysics

Sky Survey Project Volume Velocity Variety

Sloan Digital Sky Survey (SDSS) 50 TB 200 GB per day

Images, redshifts

Large Synoptic Survey Telescope (LSST )

~ 200 PB 10 TB per day Images, catalogs

Square Kilometer Array (SKA ) ~ 4.6 EB 150 TB per day Images, redshifts

Astrophysics and Big Data: Challenges, Methods, and Tools. Mauro Garofalo, Alessio Botta, and Giorgio Ventre.

11

Page 12: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Handling Big DataMachine Learning + Big Data -> Data science

12

Page 13: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Big Data &the BrainHuman Visual System

13

Page 14: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

How does the Brain do it?1011 neurons

1014-1015 synapses

14

Page 15: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Artificial Neural Networks

15

Page 16: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Brief history of DL

16

Page 17: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Why Today?Lots of Data

17

Page 18: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Why Today?Lots of Data

Deeper Learning

18

Page 19: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Why Today?Lots of Data

Deep Learning

More Power

https://blogs.nvidia.com/blog/2016/01/12/accelerating-ai-artificial-intelligence-gpus/https://www.slothparadise.com/what-is-cloud-computing/

19

Page 20: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Apps: Gaming

20

Page 21: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Apps: Self-driving cars

https://www.youtube.com/watch?v=VG68SKoG7vE

21

Page 22: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Intro to ML

22

Page 23: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Types of Machine LearningSupervised learning: present example inputs and theirdesired outputs (labels) → learn a general rule that mapsinputs to outputs.

23

Page 24: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Types of Machine LearningUnsupervised learning: no labels are given → find structurein input.

24

Page 25: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Types of Machine LearningReinforcement learning: system interacts with environmentand must perform a certain goal without explicitly telling itwhether it has come close to its goal or not.

25

Page 26: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Feature extraction in ML

Image Low-level

vision features

(edges, SIFT, HOG, etc.)

Object detection

/ classification

Input data (pixels)

LearningAlgorithm(e.g., SVM)

feature representation (hand-crafted)

Features are not learned

26

Page 27: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Pixel 2

Pix

el 1

No CarCar

Pixel 1

Pixel 2

Learning Algorithm

Feature learning

27

Page 28: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Pixel 2

Pix

el 1

No CarCar

Feature learning

28

Feature Representation

Feature 2Fe

atu

re 1

Pixel 1

Pixel 2

Learning Algorithm

Page 29: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Fundamentals of ANN

29

Page 30: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Key components of ANN Architecture (input/hidden/output layers)

30

Page 31: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Key components of ANN Architecture (input/hidden/output layers)

Weights

31

Page 32: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Key components of ANN Architecture (input/hidden/output layers)

Weights

Activations

32

LINEAR RECTIFIED

LINEAR (ReLU)

LOGISTIC /

SIGMOIDAL / TANH

Page 33: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Perceptron: an early attempt

Activation function

Need to tune and

σ

x1

x2

b

w1

w2

1

33

Page 34: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Multilayer perceptron

w1

w2

w3

A

B

C

D

E

A neuron is of the form

σ(w.x + b) where σ is

an activation function

We just added a neuron layer!

We just introduced non-linearity!

w1A

w2B

w1D

wAE

wDE

34

Page 35: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

35

Sasen Cain (@spectralradius)

Page 36: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Training & TestingTraining: determine weights◦ Supervised: labeled training examples

◦ Unsupervised: no labels available

◦ Reinforcement: examples associated with rewards

Testing (Inference): apply weights to new examples

36

Page 37: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Training DNN1. Get batch of data

2. Forward through the network -> estimate loss

3. Backpropagate error

4. Update weights based on gradient

Errors

37

Page 38: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

BackPropagationChain Rule in Gradient Descent: Invented in 1969 by Bryson and Ho

Defining a loss/cost function

Assume a function

Types of Loss function

•Hinge

•Exponential

•Logistic

38

Page 39: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Gradient DescentMinimize function J w.r.t. parameters θ

Gradient

Chain rule

39

New weights Gradient

Old weights Learning rate

Page 40: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Visualization

40

Page 41: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Training Characteristics

41

Under-fitting

Over-fitting

Page 42: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

ReferencesStephens, Zachary D., et al. "Big data: astronomical or genomical?." PLoS biology 13.7 (2015): e1002195.

LeCun, Yann, Yoshua Bengio, and Geoffrey Hinton. "Deep learning." Nature 521.7553 (2015): 436-444.

Goodfellow, Ian, Yoshua Bengio, and Aaron Courville. Deep learning. MIT press, 2016.

Kietzmann, Tim Christian, Patrick McClure, and Nikolaus Kriegeskorte. "Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504.

42

Page 43: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Introduction to Deep Learning Greg Tsagkatakis

ICS - FORTH

Page 44: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Fundamentals of ANN

2

Page 45: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Key components of ANN Architecture (input/hidden/output layers)

3

Page 46: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Key components of ANN Architecture (input/hidden/output layers)

Weights

4

Page 47: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Key components of ANN Architecture (input/hidden/output layers)

Weights

Activations

5

LINEAR RECTIFIED

LINEAR (ReLU)

LOGISTIC /

SIGMOIDAL / TANH

Page 48: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Perceptron: an early attempt

Activation function

Need to tune and

σ

x1

x2

b

w1

w2

1

6

Page 49: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Multilayer perceptron

w1

w2

w3

A

B

C

D

E

A neuron is of the form

σ(w.x + b) where σ is

an activation function

We just added a neuron layer!

We just introduced non-linearity!

w1A

w2B

w1D

wAE

wDE

7

Page 50: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

8

Sasen Cain (@spectralradius)

Page 51: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Training & TestingTraining: determine weights◦ Supervised: labeled training examples

◦ Unsupervised: no labels available

◦ Reinforcement: examples associated with rewards

Testing (Inference): apply weights to new examples

9

Page 52: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Training DNN1. Get batch of data

2. Forward through the network -> estimate loss

3. Backpropagate error

4. Update weights based on gradient

Errors

10

Page 53: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

BackPropagationChain Rule in Gradient Descent: Invented in 1969 by Bryson and Ho

Defining a loss/cost function

Assume a function

Types of Loss function

•Hinge

•Exponential

•Logistic

11

Page 54: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Gradient DescentMinimize function J w.r.t. parameters θ

Gradient

Chain rule

12

New weights Gradient

Old weights Learning rate

Page 55: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

BackProp

13

Chain Rule:

Given:

Page 56: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

BackProp

Chain rule:

◦ Single variable

◦ Multiple variables

14

g fxy=g(x)

z=f(y)=f(g(x))

Page 57: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

15

Page 58: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

16

Page 59: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

17

Page 60: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

18

Page 61: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

19

Page 62: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

20

Page 63: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

21

Page 64: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Visualization

22

Page 65: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Training Characteristics

23

Under-fitting

Over-fitting

Page 66: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Supervised Learning

24

Page 67: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Supervised Learning

Exploiting prior knowledge

Expert users

Crowdsourcing

Other instruments

Spiral

Elliptical

?

25

ModelPrediction

Data Labels

Page 68: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

State-of-the-art (before Deep Learning)Support Vector Machines Binary classification

26

Page 69: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

State-of-the-art (before Deep Learning)Support Vector Machines Binary classification

Kernels <-> non-linearities

27

Page 70: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

State-of-the-art (before Deep Learning)Support Vector Machines Binary classification

Kernels <-> non-linearities

Random Forests Multi-class classification

28

Page 71: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

State-of-the-art (before Deep Learning)Support Vector Machines Binary classification

Kernels <-> non-linearities

Random Forests Multi-class classification

Markov Chains/Fields Temporal data

29

Page 72: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

State-of-the-art (since 2015)Deep Learning (DL)

Convolutional Neural Networks (CNN) <-> Images

Recurrent Neural Networks (RNN) <-> Audio

30

Page 73: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Convolutional Neural Networks

(Convolution + Subsampling) + () … + Fully Connected

31

Page 74: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Convolutional Layers

channels

hei

ght

32x32x1 Image

5x5x1 filter

hei

ght

28x28xK activation map

K filters

32

Page 75: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Convolutional LayersCharacteristics

Hierarchical features

Location invariance

Parameters

Number of filters (32,64…)

Filter size (3x3, 5x5)

Stride (1)

Padding (2,4)

“Machine Learning and AI for Brain Simulations” –Andrew Ng Talk, UCLA, 2012

33

Page 76: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Subsampling (pooling) Layers

34

<-> downsampling

Scale invariance

Parameters

• Type

• Filter Size

• Stride

Page 77: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Activation LayerIntroduction of non-linearity

◦ Brain: thresholding -> spike trains

35

Page 78: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Activation LayerReLU: x=max(0,x)

Simplifies backprop

Makes learning faster

Avoids saturation issues

~ non-negativity constraint

(Note: The brain)

No saturated gradients

36

Page 79: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Fully Connected LayersFull connections to all activations in previous layer

Typically at the end

Can be replaced by conv

37

Feat

ure

s

Cla

sses

Page 80: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

LeNet [1998]

38

Page 81: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

AlexNet [2012]

Alex Krizhevsky, Ilya Sutskever and Geoff Hinton, ImageNet ILSVRC challenge in 2012http://vision03.csail.mit.edu/cnn_art/data/single_layer.png

39

Page 82: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

K. Simonyan, A. Zisserman Very Deep Convolutional Networks for Large-Scale Image Recognition, arXiv technical report, 2014

VGGnet [2014]

40

Page 83: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

VGGnet

D: VGG16E: VGG19All filters are 3x3

More layers smaller filters

41

Page 84: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Inception (GoogLeNet, 2014)

Inception moduleInception module with dimensionality reduction

42

Page 85: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Residuals

43

Page 86: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

ResNet, 2015

44

He, Kaiming, et al. "Deep residual learning for image recognition." IEEE CVPR. 2016.

Page 87: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Training protocolsFully Supervised• Random initialization of weights

• Train in supervised mode (example + label)

Unsupervised pre-training + standard classifier• Train each layer unsupervised

• Train a supervised classifier (SVM) on top

Unsupervised pre-training + supervised fine-tuning• Train each layer unsupervised

• Add a supervised layer

45

Page 88: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Dropout

46

Srivastava, Nitish, et al. "Dropout: a simple way to prevent neural networks from overfitting." Journal of machine learning research15.1 (2014): 1929-1958.

Page 89: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Batch Normalization

Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift [Ioffe and Szegedy 2015] 47

Page 90: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Transfer LearningLayer 1 Layer 2 Layer L

1x

2x

……

……

……

……

……

elephant

……Nx

Pixels

……

……

……

Page 91: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Transfer Learning

49

Layer 1 Layer 2 Layer L

1x

2x

……

……

……

……

……

elephant

……Nx

Pixels

……

……

……

Layer 1 Layer 2 Layer L

1x

2x…

……

……

……

Healthy

Malignancy

Nx

Pixels

……

……

……

Page 92: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Layer Transfer - Image

Jason Yosinski, Jeff Clune, Yoshua Bengio, Hod Lipson, “How transferable are features in deep neural networks?”, NIPS, 2014

Only train the rest layers

fine-tune the whole network

Source: 500 classes from ImageNet

Target: another 500 classes from ImageNet

Page 93: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

ImageNET

Validation classification

Validation classification

Validation classification

• ~14 million labeled images, 20k classes

• Images gathered from Internet

• Human labels via Amazon MTurk

• ImageNet Large-Scale Visual Recognition Challenge (ILSVRC): 1.2 million training images, 1000 classes

www.image-net.org/challenges/LSVRC/

51

Page 94: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Summary: ILSVRC 2012-2015

Team Year Place Error (top-5) External data

(AlexNet, 7 layers) 2012 - 16.4% no

SuperVision 2012 1st 15.3% ImageNet 22k

Clarifai – NYU (7 layers) 2013 - 11.7% no

Clarifai 2013 1st 11.2% ImageNet 22k

VGG – Oxford (16 layers) 2014 2nd 7.32% no

GoogLeNet (19 layers) 2014 1st 6.67% no

ResNet (152 layers) 2015 1st 3.57%

Human expert* 5.1%

http://karpathy.github.io/2014/09/02/what-i-learned-from-competing-against-a-convnet-on-imagenet/

52

Page 95: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Esteva, Andre, et al. "Dermatologist-level classification of skin cancer with deep neural networks." Nature 542.7639 (2017): 115-118.

Skin cancer detection

53

Page 96: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

The Galaxy zoo challenge

54

Online crowdsourcing project where users describe the morphology of galaxies based on color images 1 million galaxies imaged by the Sloan Digital Sky Survey (2007)

Page 97: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Dieleman, S., Kyle W. W., and Joni D.. "Rotation-invariant convolutional neural networks for galaxy morphology prediction." Monthly notices of the royal astronomical society, 2015

55

Page 98: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Component

56

Page 99: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

CNN & FMRI

57

Page 100: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Demoshttps://www.clarifai.com/demo

58

Page 101: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Different types of mapping

Image classification

Image captioning

Sentiment analysis

Machine translation

Synced sequence(video classification)

59

Page 102: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Recurrent Neural NetworksMotivation

Feed forward networks accept a fixed-sized vector as input and produce a fixed-sized vector as output

fixed amount of computational steps

recurrent nets allow us to operate over sequences of vectors

Use cases

Video

Audio

Text

60

Page 103: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

RNN Architecture

Output

DelayHidden Units

Inputs

𝑥(𝑡)

𝑠(𝑡)

𝑠(𝑡 − 1)

o(𝑡)

𝑤𝑒𝑖𝑔ℎ𝑡𝑠 𝑈

𝑤𝑒𝑖𝑔ℎ𝑡𝑠 𝑊

𝑤𝑒𝑖𝑔ℎ𝑡𝑠 𝑉

61

Page 104: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Unfolding RNNsEach node represents a layer of network units at a single time step.

The same weights are reused at every time step.

62

Page 105: Introduction to Deep Learning - University of Cretehy590-21/pdfs/Overview of various..."Deep Neural Networks In Computational Neuroscience." bioRxiv (2017): 133504. 42 Introduction

Multi-Layer Network Demo

http://playground.tensorflow.org/

63