Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the...

29
Neural networks with external memory G raves, A., Wayne, G., & Danihelka, I. (2014). Neural turing machines . arXiv preprint arXiv:1410.5401 . Graves, A., Wayne, G., Reynolds, M., Harley, T., Danihelka, I., Grabska-Barwińska, A., ... & Badia, A. P. (2016). Hybrid computing using a neural network with dynamic external memory. Nature . Daniel Majoral López

Transcript of Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the...

Page 1: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Neural networks with external memory

Graves, A., Wayne, G., & Danihelka, I. (2014). Neural turing machines. arXiv preprint arXiv:1410.5401.

Graves, A., Wayne, G., Reynolds, M., Harley, T., Danihelka, I., Grabska-Barwińska, A., ... & Badia, A. P. (2016). Hybrid computing using a neural network with dynamic external memory. Nature.

Daniel Majoral López

Page 2: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Outline- Introduction

- Neural Turing machine

- Differentiable neural computer

- Conclusions

Page 3: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Neural NetworksIntroduction

Page 4: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Neural NetworksIntroduction

Page 5: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Neural NetworksIntroduction

Page 6: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Training Neural Networks- Training a neural network consists in finding a set of weights between nodes such

that the output of the network is as close as possible to the desired output.

Introduction

Page 7: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Backpropagation- The backpropagation algorithm is used for training a network, it assigns the

amount of responsibility in the error to each node.

E

E

Introduction

Page 8: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Backpropagation- The backpropagation algorithm is used for training a network, which assigns

amount of responsibility for the error to each node.

E

E

E

E

E

E

Introduction

Page 9: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Backpropagation- The backpropagation algorithm is used for training a network, which assigns

amount of responsibility for the error to each node.

E

E

E

E

E

E

E

E

E

Introduction

Page 10: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Gradient descend- In conjunction with backpropagation an optimization algorithm is used to find

the minimum of the error. Typically gradient descend:

Introduction

Page 11: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Turing Machine-Infinite tape zeros and ones

-Head that reads and writes

-Finite state register

-Finite set of instructions

Introduction

Page 12: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Scheme NTMNeural Turing Machines

Page 13: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

NTM HeadsTwo ways to read or write memory:

- Focus by content: The controller emits a key vector, which is compared to content

in memory by a similarity measure. The similarity becomes a probability weight

for each location.

- Focus by location: Rotational shift of weighting, if the focus is in one location the

shift puts the focus in next location. I.e. [0 1 0 0] goes to [0 0 1 0]

Neural Turing Machines

Page 14: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Copy TaskNeural Turing Machines

Page 15: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Differentiable neural computer- Like a computer uses his memory to compute complex data structures, but learns

to do it from data.

- Tasks already solved by symbolic artificial intelligence but out of reach for

artificial neural networks.

- Improvements in memory managment over Neural Turing Machine

DNC

Page 16: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

DNC architecture- Controller deep neural network with

LSTM.

- External memory with three distinct

forms of differentiable attention.

- Distributions of weights to access

memory

DNC

Page 17: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Three forms of attention - Reading by Content Lookup: The controller emits a key vector, which is

compared to the content by a similarity measure.

- Reading by Temporal Link Matrix: L(i,j) close to 1 if i was the next location

written after j and to 0 otherwise.

- Writing memory: “Usage” of each location represented by a number between 0

and 1.

DNC

Page 18: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Architecture schemeDNC

Page 19: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Tasks performed1. Answering elemental questions

2. Answering graph questions:

a. Traversal

b. Shortest path

c. Inference

3. Solving puzzles

DNC

Page 20: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Traversal questionDNC

Page 21: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Methods graphs Tasks - Curriculum learning with increasing complexity.

- Supervised learning

- For learning shortest path takes samples from the optimal policy !!!

DNC

Page 22: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Family tree questionDNC

Page 23: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Block puzzle experimentsDNC

Page 24: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Methods puzzle task - Curriculum learning with increasing complexity.

- Trained with Reinforcement learning.

- Reward function is the number of constraints satisfied minus penalization for non

valid moves.

DNC

Page 25: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

DNC solving a puzzleDNC

Page 26: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Probability of optimal solutionDNC

Page 27: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Comparing with Neural Turing Machine- The NTM has no mechanism to ensure that blocks of allocated memory do not

overlap and interfere.

- The NTM has no way of freeing locations that have already been written.

- The sequential information is lost when the NTM jumps to a not consecutive

memory location (content addressing).

DNC

Page 28: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Conclusions- An external memory can increase the capacity of neural networks. Performs tasks

that a standard network with LSTM is not able to do.

- External memory will give multi-purpose capacity to neural networks but still not

able to generalize learning.

- An idea will be try to implement better associative recall.

Page 29: Neural networks with external memory · 2016. 11. 3. · - An external memory can increase the capacity of neural networks. Performs tasks that a standard network with LSTM is not

Thank You!