# State-Space Constraints Can Improve the Generalisation of the Differentiable Neural Computer to Input Sequences With Unseen Length

arXiv: https://arxiv.org/abs/2110.09138 · HTML: https://mlsanity.com/paper/2110.09138/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 31 of its 57 references that are in the map.
- First posted on arXiv 18 Oct 2021.

## Builds on (most cited first, 30 of 31)

- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [Language Models are Few-Shot Learners](https://mlsanity.com/paper/2005.14165/) (2020)
- [Neural Machine Translation by Jointly Learning to Align and Translate](https://mlsanity.com/paper/1409.0473/) (2014)
- [Pointer Networks](https://mlsanity.com/paper/1506.03134/) (2015)
- [Neural Turing Machines](https://mlsanity.com/paper/1410.5401/) (2014)
- [How Neural Networks Extrapolate: From Feedforward to Graph Neural Networks](https://mlsanity.com/paper/2009.11848/) (2020)
- [Recurrent Independent Mechanisms](https://mlsanity.com/paper/1909.10893/) (2019)
- [What Can Neural Networks Reason About?](https://mlsanity.com/paper/1905.13211/) (2019)
- [Neural GPUs Learn Algorithms](https://mlsanity.com/paper/1511.08228/) (2015)
- [Neural Execution of Graph Algorithms](https://mlsanity.com/paper/1910.10593/) (2019)
- [Learning to Execute](https://mlsanity.com/paper/1410.4615/) (2014)
- [Neural Programmer-Interpreters](https://mlsanity.com/paper/1511.06279/) (2015)
- [Inferring Algorithmic Patterns with Stack-Augmented Recurrent Nets](https://mlsanity.com/paper/1503.01007/) (2015)
- [Relational recurrent neural networks](https://mlsanity.com/paper/1806.01822/) (2018)
- [The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalization](https://mlsanity.com/paper/2110.07732/) (2021)
- [Neural Execution Engines: Learning to Execute Subroutines](https://mlsanity.com/paper/2006.08084/) (2020)
- [Making Neural Programming Architectures Generalize via Recursion](https://mlsanity.com/paper/1704.06611/) (2017)
- [Neural Random-Access Machines](https://mlsanity.com/paper/1511.06392/) (2015)
- [Memory-Augmented Recurrent Neural Networks Can Learn Generalized Dyck Languages](https://mlsanity.com/paper/1911.03329/) (2019)
- [Scaling Memory-Augmented Neural Networks with Sparse Reads and Writes](https://mlsanity.com/paper/1610.09027/) (2016)
- [Neural Arithmetic Units](https://mlsanity.com/paper/2001.05016/) (2020)
- [Neural Stored-program Memory](https://mlsanity.com/paper/1906.08862/) (2019)
- [Improving Differentiable Neural Computers Through Memory Masking, De-allocation, and Link Distribution Sharpness Control](https://mlsanity.com/paper/1904.10278/) (2019)
- [Multigrid Neural Memory](https://mlsanity.com/paper/1906.05948/) (2019)
- [Neurocoder: Learning General-Purpose Computation Using Stored Neural Programs](https://mlsanity.com/paper/2009.11443/) (2020)
- [A Taxonomy for Neural Memory Networks](https://mlsanity.com/paper/1805.00327/) (2018)
- [Implementing Neural Turing Machines](https://mlsanity.com/paper/1807.08518/) (2018)
- [Robust and Scalable Differentiable Neural Computer for Question Answering](https://mlsanity.com/paper/1807.02658/) (2018)
- [Reservoir Memory Machines as Neural Computers](https://mlsanity.com/paper/2009.06342/) (2020)
- [Lie-Access Neural Turing Machines](https://mlsanity.com/paper/1611.02854/) (2016)

## Built on by (most cited first, 1 of 1)

- [DNCs Require More Planning Steps](https://mlsanity.com/paper/2406.02187/) (2024)

## Abstract (arXiv)

Memory-augmented neural networks (MANNs) can perform algorithmic tasks such as sorting. However, they often fail to generalise to input sequence lengths not encountered during training. We introduce two approaches that constrain the state space of the MANN's controller network: state compression and state regularisation. We empirically demonstrated that both approaches can improve generalisation to input sequences of out-of-distribution lengths for a specific type of MANN: the differentiable neural computer (DNC). The constrained DNC could process input sequences that were up to 2.3 times longer than those processed by an unconstrained baseline controller network. Notably, the applied constraints enabled the extension of the DNC's memory matrix without the need for retraining and thus allowed the processing of input sequences that were 10.4 times longer. However, the improvements were not consistent across all tested algorithmic tasks. Interestingly, solutions that performed better often had a highly structured state space, characterised by state trajectories exhibiting increased curvature and loop-like patterns. Our experimental work demonstrates that state-space constraints can enable the training of a DNC using shorter input sequences, thereby saving computational resources and facilitating training when acquiring long sequences is costly.
