Docsity

Deep Learning, Study notes of Machine Learning

Partial preview of the text

Download Deep Learning and more Study notes Machine Learning in PDF only on Docsity!

Lyle Ungar, University of Pennsylvania

Deep Learning

for sentiment analysis Based on slides from C.J. Taylor, Alex Krizhevsky, Ilya Sutskever, Geoff Hinton, Jeff Dean, Richard Socher, Lyle Ungar … Our model ● (^) Max-pooling layers follow first, second, and fifth convolutional layers ● (^) The number of neurons in each layer is given by 253440, 186624, 64896, 64896, 43264, 4096, 4096, 1000

Deep learning is taking over

u Face/Object/Scene recognition

l Self driving cars

u Speech recognition (“speech to text”)

l Siri, …

u Machine translation

l Google translate

u Sentiment analysis?

2

Flexible model forms

X y

biopsy image Cancer present?

4

Flexible model forms

X y

Camera image Objects in it

5 nvidia

Artificial Neural Nets

u Non-parametric

l Or, technically, semi-parametric l Flexible model form

u Used when there are vast amounts of data

l Hence popular (again) now l But recently with slightly smaller training sets.

u Deep networks

l Idea: representation should have many different levels of abstraction

Neural Nets can be

u Supervised

l Generalizes logistic regression to a semi-parametric form

u Unsupervised

l Generalizes PCA to a semi-parametric form Neural nets often have built in structure

One neuron does logistic regression

10 Socher and Manning tutorial

Neural Nets stack logistic regressions

11 Every line represents a parameter in the model

ANNs do pattern recognition

u Map input “percepts” to output categories or actions

l Image of an object → what it is l Image of a person → who it is (or how they are feeling) l Picture → caption describing it (or the sentiment it evokes) l A word → the sound of saying it (or the sentiment it evokes) l Sound of a word → the word l Sequence of words in English → their Chinese translation

u Special ANNs for handling time series

l E.g. sequences of words 13

Street View House Numbers

14

Lyle Ungar, University of Pennsylvania

Recurrent Neural

Networks

Time Series

Recurrent Neural Nets

u Generalize HMMs or Linear Dynamical Systems

l Hidden state dynamical models, but nonlinear

u Needed if you have inputs of varying length

l E.g. sequence of observations n speech n text n robots n videos

Lyle H Ungar, University of Pennsylvania

Long Short Term Memory (LSTM)

u LSTM is a kind of gated RNN

l All of these gates have weights which are sigmoidal functions of weighted inputs 19 http://deeplearning.net/tutorial/lstm.html i f o h ct xt – observation st – hidden state o = output gate (not output!) ct- i = σ (U i

x

t

+ W

i

s

t-

f = σ (U f

x

t

+ W

f

s

t-

o = σ (U o

x

t

+ W

o

s

t-

h = tanh(U

h

x

t

+ W

h

s

t-

c

t

= f o^ c

t-

+ i o^ h

s

t

= o o^ tanh(c

t-

ct = f oct-1 + i o^ h

Recurrent Neural Nets

u Can predict the next observation given the past

observations

u Or can map one sequence to another sequence

l An encoder n sentence (sequence of words) to vector l A decoder n vector to sentence (sequence of words)