Machine Learning 2 DS 4420 - Spring 2020 Sequence-2-sequence models - - PowerPoint PPT Presentation

machine learning 2
SMART_READER_LITE
LIVE PREVIEW

Machine Learning 2 DS 4420 - Spring 2020 Sequence-2-sequence models - - PowerPoint PPT Presentation

Machine Learning 2 DS 4420 - Spring 2020 Sequence-2-sequence models Byron C. Wallace Today Learning to map between sequences Today Learning to map between sequences Input x 1 x 2 x T-1 x T Output y 1 y 2 y T-1 y T MAGIC


slide-1
SLIDE 1

Machine Learning 2

DS 4420 - Spring 2020

Sequence-2-sequence models

Byron C. Wallace

slide-2
SLIDE 2

Today

  • Learning to map between sequences
slide-3
SLIDE 3

Today

  • Learning to map between sequences
slide-4
SLIDE 4

x1 x2 xT-1 xT …

Input

slide-5
SLIDE 5

x1 x2 xT-1 xT …

Input

y1 y2 yT-1 yT …

Output

MAGIC

slide-6
SLIDE 6

Motivating Example: Translation

slide-7
SLIDE 7

x1 x2 xT-1 xT …

English

y1 y2 yT-1 yT …

Spanish

MAGIC

where is the library? donde esta la bibliotheque?

slide-8
SLIDE 8

Motivating Example: Sequence Captioning

Example credit: https://towardsdatascience.com/understanding-encoder-decoder-sequence-to-sequence-model-679e04af4346

Input

slide-9
SLIDE 9

Motivating Example: Sequence Captioning

Example credit: https://towardsdatascience.com/understanding-encoder-decoder-sequence-to-sequence-model-679e04af4346

Input

MAGIC

slide-10
SLIDE 10

Motivating Example: Sequence Captioning

Example credit: https://towardsdatascience.com/understanding-encoder-decoder-sequence-to-sequence-model-679e04af4346

Input

MAGIC

Output

slide-11
SLIDE 11

MAGIC

slide-12
SLIDE 12

Encoder-Decoder Models

slide-13
SLIDE 13

Encoder

x

slide-14
SLIDE 14

Encoder

x z

slide-15
SLIDE 15

Encoder

x z

Decoder

slide-16
SLIDE 16

Encoder

x z

Decoder

y

slide-17
SLIDE 17

Figure credit: https://stackabuse.com/autoencoders-for-image-reconstruction-in-python-and-keras/

Recall: Auto-Encoders

slide-18
SLIDE 18

RNN encoder

x1 x2 xT-1 xT …

where is the library?

http://www.cs.cmu.edu/~mgormley/courses/10418/ Slide derived from Matt Gormley’s:

slide-19
SLIDE 19

x1 x2 xT-1 xT …

where is the library?

RNN RNN RNN RNN

http://www.cs.cmu.edu/~mgormley/courses/10418/ Slide derived from Matt Gormley’s:

slide-20
SLIDE 20

x1 x2 xT-1 xT …

where is the library?

RNN RNN RNN RNN

http://www.cs.cmu.edu/~mgormley/courses/10418/ Slide derived from Matt Gormley’s:

slide-21
SLIDE 21

x1 x2 xT-1 xT …

where is the library?

RNN RNN RNN RNN

h1 h2 hT-1 hT …

http://www.cs.cmu.edu/~mgormley/courses/10418/ Slide derived from Matt Gormley’s:

Encoder

slide-22
SLIDE 22

RNN refresher

Credit: Christopher Olah; https://colah.github.io/posts/2015-08-Understanding-LSTMs/

slide-23
SLIDE 23

RNN refresher

Credit: Christopher Olah; https://colah.github.io/posts/2015-08-Understanding-LSTMs/

ht = fθ(xt, ht−1)

<latexit sha1_base64="ykFJ5c1d3j03cnvq6pmoTguSiIM=">ACXicbVDLSsNAFJ3UV62vqEs3g0WoCWpgm6EohuXFewD2hAm0k7dPJg5kYsIVs3/obF4q49Q/c+TdO0y60euDC4Zx7ufceLxZcgWV9GYWFxaXleJqaW19Y3PL3N5pqSiRlDVpJCLZ8YhigoesCRwE68SkcATrO2NriZ+45JxaPwFsYxcwIyCLnPKQEtuSYeuilk+AL7btqDIQOSVe5dOMr1Yzs7dM2yVbVy4L/EnpEymqHhmp+9fkSTgIVABVGqa1sxOCmRwKlgWamXKBYTOiID1tU0JAFTp/kuEDrfSxH0ldIeBc/TmRkCpceDpzoDAUM17E/E/r5uAf+6kPIwTYCGdLvITgSHCk1hwn0tGQYw1IVRyfSumQyIJBR1eSYdgz7/8l7RqVfukWrs5LdcvZ3EU0R7aRxVkozNUR9eogZqIogf0hF7Qq/FoPBtvxvu0tWDMZnbRLxgf3w+gmUc=</latexit>
slide-24
SLIDE 24

RNN refresher

Credit: Christopher Olah; https://colah.github.io/posts/2015-08-Understanding-LSTMs/

slide-25
SLIDE 25

x1 x2 xT-1 xT …

where is the library?

RNN RNN RNN RNN

h1 h2 hT-1 hT …

http://www.cs.cmu.edu/~mgormley/courses/10418/ Slide derived from Matt Gormley’s:

y1 y2 yT-1 yT …

donde esta la bibliotheque?

Encoder

slide-26
SLIDE 26

x1 x2 xT-1 xT …

where is the library?

RNN RNN RNN RNN

h1 h2 hT-1 hT …

RNN

Encoder

slide-27
SLIDE 27

x1 x2 xT-1 xT …

where is the library?

RNN RNN RNN RNN

h1 h2 hT-1 hT …

RNN

START

Encoder Decoder

slide-28
SLIDE 28

x1 x2 xT-1 xT …

where is the library?

RNN RNN RNN RNN

h1 h2 hT-1 hT …

RNN

Encoder

RNN RNN RNN

Decoder

y1 y2 yT-1 yT …

donde esta la bibliotheque? … START

slide-29
SLIDE 29

Let’s think about a concrete example…

slide-30
SLIDE 30

https://colab.research.google.com/drive/ 1z_uyUjmXjpqbPwE7JWxYX116O0229aVK