Neural Turing Machines
Tristan Deleu
@tristandeleu
- June 23, 2016
Neural Turing Machines Tristan Deleu June 23, 2016 @tristandeleu - - PowerPoint PPT Presentation
Neural Turing Machines Tristan Deleu June 23, 2016 @tristandeleu Deep Learning The building blocks + Convolutional Fully connected Recurrent Others Layer Layer Layer Object Recognition Predictions Speech Recognition
Tristan Deleu
@tristandeleu
The building blocks
Convolutional Layer Fully connected Layer Recurrent Layer
+
Object Recognition Object Detection Image Segmentation Others
Language Processing
Examples
+ =
Object Detection Predictions
+ =
Predictions Speech Recognition
+
Image Segmentation Predictions
Face detection Automatic speech recognition
=
Image segmentation
Examples
+ +
Object Recognition Language Processing Predictions
Sentiment analysis Image captioning Machine translation
= = = +
Language Processing
+
Language Processing Predictions Language Processing
Frameworks
Theano Torch Tensorflow Keras Chainer Neon CNTK MXNet Caffe
Lasagne
Lasagne
Theano + Lasagne
https://github.com/Lasagne/Lasagne/blob/master/examples/mnist.py
Recurrent Neural Network
ht yt xt ht+1 yt+1 xt+1 yt−1 ht−1 xt−1
LSTMt
LSTMt−1 LSTMt+1
Memory-augmented Networks
BOAT
Neural Network
Boats float on water You can’t sail against the wind Boats do not fly …
?
Memory Networks & Dynamic Memory Networks
Memory-augmented Networks
Memory Networks Dynamic Memory Networks Neural GPU Neural Stack/Queue/DeQue Stack-augmented RNN
Current state Read Operation New state Write 1 1 1
Turing Machine
1 1 1 1 1
q0 q0 q0 q0 q0 q1 q1 q1 q1 · · ·
Neural Turing Machine
1 1 1 1 1
q0
Current state Read Operation New state Write 1 1 1
q0 q0 q0 q0 q1 q1 q1 q1 · · ·
Input Output
Heads
1 1 1 1
Mt
Neural Turing Machine
Neural Turing Machine
FFt ht yt rt xt xt FFt+1 ht+1 yt+1 rt+1 xt+1 xt+1 yt−1 ht−1 rt−1 FFt−1 xt−1 xt−1 Mt−1 Mt
Neural Turing Machine
ht yt rt xt xt ht+1 yt+1 rt+1 xt+1 xt+1 yt−1 ht−1 rt−1 xt−1 xt−1 Mt−1 Mt
LSTMt LSTMt−1 LSTMt+1
Neural Turing Machine
Input Output
Open-source Library
medium.com/snips-ai github.com/snipsco/ntm-lasagne
NTM-Lasagne
Algorithmic Tasks
Generate as much data as we need
Longer sequences for example
Input Output
P(X, Y )
?
Copy task
Inputs Outputs EOS
Training
Copy task
Copy task
Copy task
Length 120
Copy task
Length 150
Repeat Copy task
x5 EOS Inputs Outputs
Repeat Copy task
Repeat Copy task
Associative Recall task
Inputs Outputs
Associative Recall task
Associative Recall task
Priority Sort task
bAbI tasks
bAbI tasks
Mary John
bathroom
garden Sandra hallway
Mary John
bathroom
garden Sandra hallway
Mary went to the garden John went to the garden Mary went back to the hallway Sandra journeyed to the bathroom John went to the hallway Mary went to the bathroom
bAbI tasks
Conclusion
For example LSTMs
Drawback: generalization is still not quite perfect
Trying to teach machines things they can do, the same way we would learn them
@tristandeleu
@tristandeleu