Differentiable neural computer

Artificial neural network architecture
A differentiable neural computer being trained to store and recall dense binary numbers. Performance of a reference task during training shown. Upper left: the input (red) and target (blue), as 5-bit words and a 1 bit interrupt signal. Upper right: the model's output.

In artificial intelligence, a differentiable neural computer (DNC) is a memory augmented neural network architecture (MANN), which is typically (but not by definition) recurrent in its implementation. The model was published in 2016 by Alex Graves et al. of DeepMind.[1]

Applications

DNC indirectly takes inspiration from Von-Neumann architecture, making it likely to outperform conventional architectures in tasks that are fundamentally algorithmic that cannot be learned by finding a decision boundary.

So far, DNCs have been demonstrated to handle only relatively simple tasks, which can be solved using conventional programming. But DNCs don't need to be programmed for each problem, but can instead be trained. This attention span allows the user to feed complex data structures such as graphs sequentially, and recall them for later use. Furthermore, they can learn aspects of symbolic reasoning and apply it to working memory. The researchers who published the method see promise that DNCs can be trained to perform complex, structured tasks[1][2] and address big-data applications that require some sort of reasoning, such as generating video commentaries or semantic text analysis.[3][4]

DNC can be trained to navigate rapid transit systems, and apply that network to a different system. A neural network without memory would typically have to learn about each transit system from scratch. On graph traversal and sequence-processing tasks with supervised learning, DNCs performed better than alternatives such as long short-term memory or a neural turing machine.[5] With a reinforcement learning approach to a block puzzle problem inspired by SHRDLU, DNC was trained via curriculum learning, and learned to make a plan. It performed better than a traditional recurrent neural network.[5]

Architecture

DNC system diagram

DNC networks were introduced as an extension of the Neural Turing Machine (NTM), with the addition of memory attention mechanisms that control where the memory is stored, and temporal attention that records the order of events. This structure allows DNCs to be more robust and abstract than a NTM, and still perform tasks that have longer-term dependencies than some predecessors such as Long Short Term Memory (LSTM). The memory, which is simply a matrix, can be allocated dynamically and accessed indefinitely. The DNC is differentiable end-to-end (each subcomponent of the model is differentiable, therefore so is the whole model). This makes it possible to optimize them efficiently using gradient descent.[3][6][7]

The DNC model is similar to the Von Neumann architecture, and because of the resizability of memory, it is Turing complete.[8]

Traditional DNC

DNC, as originally published[1]

Independent variables
x t {\displaystyle \mathbf {x} _{t}} Input vector
z t {\displaystyle \mathbf {z} _{t}} Target vector
Controller
χ t = [ x t ; r t 1 1 ; ; r t 1 R ] {\displaystyle {\boldsymbol {\chi }}_{t}=[\mathbf {x} _{t};\mathbf {r} _{t-1}^{1};\cdots ;\mathbf {r} _{t-1}^{R}]} Controller input matrix


Deep (layered) LSTM 0 l L {\displaystyle \forall \;0\leq l\leq L}
i t l = σ ( W i l [ χ t ; h t 1 l ; h t l 1 ] + b i l ) {\displaystyle \mathbf {i} _{t}^{l}=\sigma (W_{i}^{l}[{\boldsymbol {\chi }}_{t};\mathbf {h} _{t-1}^{l};\mathbf {h} _{t}^{l-1}]+\mathbf {b} _{i}^{l})} Input gate vector
o t l = σ ( W o l [ χ t ; h t 1 l ; h t l 1 ] + b o l ) {\displaystyle \mathbf {o} _{t}^{l}=\sigma (W_{o}^{l}[{\boldsymbol {\chi }}_{t};\mathbf {h} _{t-1}^{l};\mathbf {h} _{t}^{l-1}]+\mathbf {b} _{o}^{l})} Output gate vector
f t l = σ ( W f l [ χ t ; h t 1 l ; h t l 1 ] + b f l ) {\displaystyle \mathbf {f} _{t}^{l}=\sigma (W_{f}^{l}[{\boldsymbol {\chi }}_{t};\mathbf {h} _{t-1}^{l};\mathbf {h} _{t}^{l-1}]+\mathbf {b} _{f}^{l})} Forget gate vector
s t l = f t l s t 1 l + i t l tanh ( W s l [ χ t ; h t 1 l ; h t l 1 ] + b s l ) {\displaystyle \mathbf {s} _{t}^{l}=\mathbf {f} _{t}^{l}\mathbf {s} _{t-1}^{l}+\mathbf {i} _{t}^{l}\tanh(W_{s}^{l}[{\boldsymbol {\chi }}_{t};\mathbf {h} _{t-1}^{l};\mathbf {h} _{t}^{l-1}]+\mathbf {b} _{s}^{l})} State gate vector,
s 0 = 0 {\displaystyle s_{0}=0}
h t l = o t l tanh ( s t l ) {\displaystyle \mathbf {h} _{t}^{l}=\mathbf {o} _{t}^{l}\tanh(\mathbf {s} _{t}^{l})} Hidden gate vector,
h 0 = 0 ; h t 0 = 0 t {\displaystyle h_{0}=0;h_{t}^{0}=0\;\forall \;t}


y t = W y [ h t 1 ; ; h t L ] + W r [ r t 1 ; ; r t R ] {\displaystyle \mathbf {y} _{t}=W_{y}[\mathbf {h} _{t}^{1};\cdots ;\mathbf {h} _{t}^{L}]+W_{r}[\mathbf {r} _{t}^{1};\cdots ;\mathbf {r} _{t}^{R}]} DNC output vector
Read & Write heads
ξ t = W ξ [ h t 1 ; ; h t L ] {\displaystyle \xi _{t}=W_{\xi }[h_{t}^{1};\cdots ;h_{t}^{L}]} Interface parameters
= [ k t r , 1 ; ; k t r , R ; β ^ t r , 1 ; ; β ^ t r , R ; k t w ; β t w ^ ; e ^ t ; v t ; f t 1 ^ ; ; f t R ^ ; g ^ t a ; g ^ t w ; π ^ t 1 ; ; π ^ t R ] {\displaystyle =[\mathbf {k} _{t}^{r,1};\cdots ;\mathbf {k} _{t}^{r,R};{\hat {\beta }}_{t}^{r,1};\cdots ;{\hat {\beta }}_{t}^{r,R};\mathbf {k} _{t}^{w};{\hat {\beta _{t}^{w}}};\mathbf {\hat {e}} _{t};\mathbf {v} _{t};{\hat {f_{t}^{1}}};\cdots ;{\hat {f_{t}^{R}}};{\hat {g}}_{t}^{a};{\hat {g}}_{t}^{w};{\hat {\boldsymbol {\pi }}}_{t}^{1};\cdots ;{\hat {\boldsymbol {\pi }}}_{t}^{R}]}


Read heads 1 i R {\displaystyle \forall \;1\leq i\leq R}
k t r , i {\displaystyle \mathbf {k} _{t}^{r,i}} Read keys
β t r , i = oneplus ( β ^ t r , i ) {\displaystyle \beta _{t}^{r,i}={\text{oneplus}}({\hat {\beta }}_{t}^{r,i})} Read strengths
f t i = σ ( f ^ t i ) {\displaystyle f_{t}^{i}=\sigma ({\hat {f}}_{t}^{i})} Free gates
π t i = softmax ( π ^ t i ) {\displaystyle {\boldsymbol {\pi }}_{t}^{i}={\text{softmax}}({\hat {\boldsymbol {\pi }}}_{t}^{i})} Read modes,
π t i R 3 {\displaystyle {\boldsymbol {\pi }}_{t}^{i}\in \mathbb {R} ^{3}}


Write head
k t w {\displaystyle \mathbf {k} _{t}^{w}} Write key
β t w = β ^ t w {\displaystyle \beta _{t}^{w}={\hat {\beta }}_{t}^{w}} Write strength
e t = σ ( e ^ t ) {\displaystyle \mathbf {e} _{t}=\sigma (\mathbf {\hat {e}} _{t})} Erase vector
v t {\displaystyle \mathbf {v} _{t}} Write vector
g t a = σ ( g ^ t a ) {\displaystyle g_{t}^{a}=\sigma ({\hat {g}}_{t}^{a})} Allocation gate
g t w = σ ( g ^ t w ) {\displaystyle g_{t}^{w}=\sigma ({\hat {g}}_{t}^{w})} Write gate
Memory
M t = M t 1 ( E w t w e t ) + w t w v t {\displaystyle M_{t}=M_{t-1}\circ (E-\mathbf {w} _{t}^{w}\mathbf {e} _{t}^{\intercal })+\mathbf {w} _{t}^{w}\mathbf {v} _{t}^{\intercal }} Memory matrix,
Matrix of ones E R N × W {\displaystyle E\in \mathbb {R} ^{N\times W}}
u t = ( u t 1 + w t 1 w u t 1 w t 1 w ) ψ t {\displaystyle \mathbf {u} _{t}=(\mathbf {u} _{t-1}+\mathbf {w} _{t-1}^{w}-\mathbf {u} _{t-1}\circ \mathbf {w} _{t-1}^{w})\circ {\boldsymbol {\psi }}_{t}} Usage vector
p t = ( 1 i w t w [ i ] ) p t 1 + w t w {\displaystyle \mathbf {p} _{t}=\left(1-\sum _{i}\mathbf {w} _{t}^{w}[i]\right)\mathbf {p} _{t-1}+\mathbf {w} _{t}^{w}} Precedence weighting,
p 0 = 0 {\displaystyle \mathbf {p} _{0}=\mathbf {0} }
L t = ( 1 I ) [ ( 1 w t w [ i ] w t j ) L t 1 [ i , j ] + w t w [ i ] p t 1 j ] {\displaystyle L_{t}=(\mathbf {1} -\mathbf {I} )\left[(1-\mathbf {w} _{t}^{w}[i]-\mathbf {w} _{t}^{j})L_{t-1}[i,j]+\mathbf {w} _{t}^{w}[i]\mathbf {p} _{t-1}^{j}\right]} Temporal link matrix,
L 0 = 0 {\displaystyle L_{0}=\mathbf {0} }
w t w = g t w [ g t a a t + ( 1 g t a ) c t w ] {\displaystyle \mathbf {w} _{t}^{w}=g_{t}^{w}[g_{t}^{a}\mathbf {a} _{t}+(1-g_{t}^{a})\mathbf {c} _{t}^{w}]} Write weighting
w t r , i = π t i [ 1 ] b t i + π t i [ 2 ] c t r , i + π t i [ 3 ] f t i {\displaystyle \mathbf {w} _{t}^{r,i}={\boldsymbol {\pi }}_{t}^{i}[1]\mathbf {b} _{t}^{i}+{\boldsymbol {\pi }}_{t}^{i}[2]c_{t}^{r,i}+{\boldsymbol {\pi }}_{t}^{i}[3]f_{t}^{i}} Read weighting
r t i = M t w t r , i {\displaystyle \mathbf {r} _{t}^{i}=M_{t}^{\intercal }\mathbf {w} _{t}^{r,i}} Read vectors


C ( M , k , β ) [ i ] = exp { D ( k , M [ i , ] ) β } j exp { D ( k , M [ j , ] ) β } {\displaystyle {\mathcal {C}}(M,\mathbf {k} ,\beta )[i]={\frac {\exp\{{\mathcal {D}}(\mathbf {k} ,M[i,\cdot ])\beta \}}{\sum _{j}\exp\{{\mathcal {D}}(\mathbf {k} ,M[j,\cdot ])\beta \}}}} Content-based addressing,
Lookup key k {\displaystyle \mathbf {k} } , key strength β {\displaystyle \beta }
ϕ t {\displaystyle \phi _{t}} Indices of u t {\displaystyle \mathbf {u} _{t}} ,
sorted in ascending order of usage
a t [ ϕ t [ j ] ] = ( 1 u t [ ϕ t [ j ] ] ) i = 1 j 1 u t [ ϕ t [ i ] ] {\displaystyle \mathbf {a} _{t}[\phi _{t}[j]]=(1-\mathbf {u} _{t}[\phi _{t}[j]])\prod _{i=1}^{j-1}\mathbf {u} _{t}[\phi _{t}[i]]} Allocation weighting
c t w = C ( M t 1 , k t w , β t w ) {\displaystyle \mathbf {c} _{t}^{w}={\mathcal {C}}(M_{t-1},\mathbf {k} _{t}^{w},\beta _{t}^{w})} Write content weighting
c t r , i = C ( M t 1 , k t r , i , β t r , i ) {\displaystyle \mathbf {c} _{t}^{r,i}={\mathcal {C}}(M_{t-1},\mathbf {k} _{t}^{r,i},\beta _{t}^{r,i})} Read content weighting
f t i = L t w t 1 r , i {\displaystyle \mathbf {f} _{t}^{i}=L_{t}\mathbf {w} _{t-1}^{r,i}} Forward weighting
b t i = L t w t 1 r , i {\displaystyle \mathbf {b} _{t}^{i}=L_{t}^{\intercal }\mathbf {w} _{t-1}^{r,i}} Backward weighting
ψ t = i = 1 R ( 1 f t i w t 1 r , i ) {\displaystyle {\boldsymbol {\psi }}_{t}=\prod _{i=1}^{R}\left(\mathbf {1} -f_{t}^{i}\mathbf {w} _{t-1}^{r,i}\right)} Memory retention vector
Definitions
W , b {\displaystyle \mathbf {W} ,\mathbf {b} } Weight matrix, bias vector
0 , 1 , I {\displaystyle \mathbf {0} ,\mathbf {1} ,\mathbf {I} } Zeros matrix, ones matrix, identity matrix
{\displaystyle \circ } Element-wise multiplication
D ( u , v ) = u v u v {\displaystyle {\mathcal {D}}(\mathbf {u} ,\mathbf {v} )={\frac {\mathbf {u} \cdot \mathbf {v} }{\|\mathbf {u} \|\|\mathbf {v} \|}}} Cosine similarity
σ ( x ) = 1 / ( 1 + e x ) {\displaystyle \sigma (x)=1/(1+e^{-x})} Sigmoid function
oneplus ( x ) = 1 + log ( 1 + e x ) {\displaystyle {\text{oneplus}}(x)=1+\log(1+e^{x})} Oneplus function
softmax ( x ) j = e x j k = 1 K e x k {\displaystyle {\text{softmax}}(\mathbf {x} )_{j}={\frac {e^{x_{j}}}{\sum _{k=1}^{K}e^{x_{k}}}}}    for j = 1, ..., K. Softmax function

Extensions

Refinements include sparse memory addressing, which reduces time and space complexity by thousands of times. This can be achieved by using an approximate nearest neighbor algorithm, such as Locality-sensitive hashing, or a random k-d tree like Fast Library for Approximate Nearest Neighbors from UBC.[9] Adding Adaptive Computation Time (ACT) separates computation time from data time, which uses the fact that problem length and problem difficulty are not always the same.[10] Training using synthetic gradients performs considerably better than Backpropagation through time (BPTT).[11] Robustness can be improved with use of layer normalization and Bypass Dropout as regularization.[12]

See also

References

  1. ^ a b c Graves, Alex; Wayne, Greg; Reynolds, Malcolm; Harley, Tim; Danihelka, Ivo; Grabska-Barwińska, Agnieszka; Colmenarejo, Sergio Gómez; Grefenstette, Edward; Ramalho, Tiago (2016-10-12). "Hybrid computing using a neural network with dynamic external memory". Nature. 538 (7626): 471–476. Bibcode:2016Natur.538..471G. doi:10.1038/nature20101. ISSN 1476-4687. PMID 27732574. S2CID 205251479.
  2. ^ "Differentiable neural computers | DeepMind". DeepMind. Retrieved 2016-10-19.
  3. ^ a b Burgess, Matt. "DeepMind's AI learned to ride the London Underground using human-like reason and memory". WIRED UK. Retrieved 2016-10-19.
  4. ^ Jaeger, Herbert (2016-10-12). "Artificial intelligence: Deep neural reasoning". Nature. 538 (7626): 467–468. Bibcode:2016Natur.538..467J. doi:10.1038/nature19477. ISSN 1476-4687. PMID 27732576.
  5. ^ a b James, Mike. "DeepMind's Differentiable Neural Network Thinks Deeply". www.i-programmer.info. Retrieved 2016-10-20.
  6. ^ "DeepMind AI 'Learns' to Navigate London Tube". PCMAG. Retrieved 2016-10-19.
  7. ^ Mannes, John. "DeepMind's differentiable neural computer helps you navigate the subway with its memory". TechCrunch. Retrieved 2016-10-19.
  8. ^ "RNN Symposium 2016: Alex Graves - Differentiable Neural Computer". YouTube.
  9. ^ Jack W Rae; Jonathan J Hunt; Harley, Tim; Danihelka, Ivo; Senior, Andrew; Wayne, Greg; Graves, Alex; Timothy P Lillicrap (2016). "Scaling Memory-Augmented Neural Networks with Sparse Reads and Writes". arXiv:1610.09027 [cs.LG].
  10. ^ Graves, Alex (2016). "Adaptive Computation Time for Recurrent Neural Networks". arXiv:1603.08983 [cs.NE].
  11. ^ Jaderberg, Max; Wojciech Marian Czarnecki; Osindero, Simon; Vinyals, Oriol; Graves, Alex; Silver, David; Kavukcuoglu, Koray (2016). "Decoupled Neural Interfaces using Synthetic Gradients". arXiv:1608.05343 [cs.LG].
  12. ^ Franke, Jörg; Niehues, Jan; Waibel, Alex (2018). "Robust and Scalable Differentiable Neural Computer for Question Answering". arXiv:1807.02658 [cs.CL].

External links

  • A bit-by-bit guide to the equations governing differentiable neural computers
  • DeepMind's Differentiable Neural Network Thinks Deeply
  • v
  • t
  • e
Differentiable computing
GeneralConceptsApplicationsHardwareSoftware librariesImplementations
Audio–visual
Verbal
Decisional
PeopleOrganizationsArchitectures
  • Portals
    • Computer programming
    • Technology
  • Categories
    • Artificial neural networks
    • Machine learning