Skip to main content
QUICK REVIEW

[Paper Review] Neural Random-Access Machines

Karol Kurach, Marcin Andrychowicz|arXiv (Cornell University)|Nov 19, 2015
Neural Networks and ApplicationsComputer Science11 references15 citations
TL;DR

This paper introduces the Neural Random-Access Machine (NRAM), a differentiable neural network architecture that manipulates and dereferences pointers to an external, variable-size random-access memory. Trained via backpropagation on pure input-output pairs, NRAM successfully learns algorithmic tasks requiring pointer chasing—such as linked-list and binary tree operations—and generalizes to longer sequences, with memory access achievable in constant time when discretized.

ABSTRACT

In this paper, we propose and investigate a new neural network architecture called Neural Random Access Machine. It can manipulate and dereference pointers to an external variable-size random-access memory. The model is trained from pure input-output examples using backpropagation. We evaluate the new model on a number of simple algorithmic tasks whose solutions require pointer manipulation and dereferencing. Our results show that the proposed model can learn to solve algorithmic tasks of such type and is capable of operating on simple data structures like linked-lists and binary trees. For easier tasks, the learned solutions generalize to sequences of arbitrary length. Moreover, memory access during inference can be done in a constant time under some assumptions.

Motivation & Objective

  • . The paper aims to develop a neural architecture capable of learning algorithmic tasks that require explicit pointer manipulation and dereferencing.
  • It seeks to overcome limitations of prior models like NTM and LSTM, which struggle with absolute pointer addressing and have parameter growth tied to memory size.
  • The objective includes enabling constant-time memory access through a differentiable, pointer-based mechanism, avoiding content-based addressing.
  • It investigates whether backpropagation can effectively train extremely deep, intricate models with complex control flow and memory access patterns.
  • The work aims to demonstrate generalization to arbitrary-length inputs in algorithmic tasks involving data structures like linked lists and binary trees.

Proposed method

  • . The NRAM model uses a neural controller (e.g., feedforward or LSTM) to generate a sequence of operations over a variable-size external memory.
  • Core operations include reading from, writing to, and manipulating pointers to memory locations using differentiable modules such as READ, WRITE, and pointer arithmetic (e.g., increment, min, max).
  • The model employs a differentiable circuit execution mechanism where each timestep applies a fixed set of modules to update registers and memory, with control flow decisions made via differentiable gates.
  • Pointer dereferencing is achieved by using register values as indices into the memory array, enabling indirect access and traversal of data structures.
  • The model supports a 'discretized' version where pointer values are constrained to integers, enabling constant-time memory access and improved generalization.
  • Training is performed via end-to-end backpropagation through the entire execution trace, with curriculum learning and gradient noise used to stabilize optimization.

Experimental results

Research questions

  • RQ1. Can a differentiable neural network learn to perform algorithmic tasks that require explicit pointer manipulation and dereferencing?
  • RQ2To what extent can the model generalize to input sequences longer than those seen during training, particularly for tasks involving linked lists and binary trees?
  • RQ3Does the absence of content-based addressing enable faster and more stable memory access compared to models like NTM?
  • RQ4How effective is backpropagation in training a model with deep, non-linear, and complex control flow over a large memory space?
  • RQ5Can a differentiable mechanism for determining computation termination be effectively learned in such a model?

Key findings

  • . The NRAM model successfully learned to solve algorithmic tasks such as Copy, Permutation, ListK, ListSearch, WalkBST, and Merge, with error rates of 0% for the first three tasks.
  • . For Permutation, ListK, and WalkBST, the model generalized to inputs at least twice as long as those seen during training, with low error rates.
  • . The discretized version of the model achieved exact reproduction of outputs on the Permutation task, indicating strong generalization for this problem.
  • . The model achieved 0.3% training error on WalkBST and 1% on Merge, though generalization was less effective than for simpler tasks.
  • . Optimization was highly unstable, with only about 11% of random seeds converging to zero error even with optimal hyperparameters.
  • . The use of gradient noise significantly improved convergence, increasing the success rate from ~1% to ~11% of seeds, suggesting that noise helps escape poor local minima in the loss landscape.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.