← all repositories
google-deepmind/dnc

When your RNN needs an addressable filing cabinet

It implements the 2016 Nature architecture that lets recurrent networks read, write, and free slots in an external memory matrix.

2.5k stars Python ML Frameworks
dnc
Not currently ranked — collecting fresh signals.
star history

What it does The Differentiable Neural Computer is a recurrent neural network that pairs a standard controller—usually an LSTM or feedforward network—with an external memory bank. At each timestep the controller issues read and write commands to an access module, which maintains not just the memory contents but also metadata tracking write order (TemporalLinkage) and which slots are still in use (Freeness). The whole thing is packaged as a standard TensorFlow RNNCore, so it can be unrolled with tf.nn.dynamic_rnn like any other cell.

The interesting bit The memory is actively managed: the access module handles dynamic allocation and content-based addressing, so the network learns to store vectors in specific locations and retrieve them later by content or by temporal order. That turns the controller into something closer to a CPU addressing a small, parallel RAM stick.

Key highlights

  • Modular RNNCore design: controller, access, TemporalLinkage, and Freeness are composable sub-modules.
  • The access module performs dynamic memory allocation, tracks write order, and monitors slot usage via dedicated RNNCore helpers.
  • The top-level DNC class in dnc.py is a standard TensorFlow RNN core compatible with tf.nn.dynamic_rnn.
  • Ships with a copy-task training script to verify that the memory actually retains and reproduces input strings.

Caveats

  • Resuming training with different model parameters requires manually deleting the default checkpoint directory to avoid shape inconsistency errors.
  • The README does not specify compatible TensorFlow or Sonnet versions.
  • Checkpointing is disabled by default, so long runs risk losing progress unless you explicitly enable it.

Verdict Researchers revisiting the 2016 Nature paper or experimenting with memory-augmented RNNs in TensorFlow will find a faithful, modular reference. If you are not in the TensorFlow/Sonnet ecosystem, this is unlikely to be useful.

Frequently asked

What is google-deepmind/dnc?
It implements the 2016 Nature architecture that lets recurrent networks read, write, and free slots in an external memory matrix.
Is dnc open source?
Yes — google-deepmind/dnc is open source, released under the Apache-2.0 license.
What language is dnc written in?
google-deepmind/dnc is primarily written in Python.
How popular is dnc?
google-deepmind/dnc has 2.5k stars on GitHub.
Where can I find dnc?
google-deepmind/dnc is on GitHub at https://github.com/google-deepmind/dnc.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.