Evolutionary training and abstraction yields algorithmic generalization of neural computers

Daniel Tanneberg, Elmar Rueckert, Jan Peters

TL;DR

The Neural Harvard Computer (NHC) bridges the gap between flexible neural learning and the rigid, scalable logic of classical algorithms. By decoupling algorithmic control from data manipulation and using evolutionary training instead of backpropagation, the NHC learns strategies that generalize perfectly to problems 100x larger than those seen during training and transfer seamlessly across different data representations.

What Problem Does This Paper Address?

While deep learning excels at pattern recognition, it notoriously struggles with "algorithmic" tasks—problems requiring iterative, sequential, or hierarchical logic (like sorting a list or pathfinding). Traditional neural networks often "overfit" to the specific size or format of their training data. For example, a network trained to sort lists of five numbers often fails when handed a list of six.

Existing solutions, like Memory-Augmented Neural Networks (e.g., the Differential Neural Computer), attempt to solve this by adding external storage. However, they still struggle with three core requirements of true algorithmic generalization:

  1. R1 (Scaling): Generalizing to much larger task complexities (e.g., longer lists).
  2. R2 (Data Independence): Working regardless of how data is represented (e.g., binary vs. decimal).
  3. R3 (Domain Independence): Transferring logic to entirely different fields (e.g., applying search logic from a game to robotic manipulation).

Methods

The authors introduce the Neural Harvard Computer (NHC), which employs two primary innovations:

  • The Information Split: Inspired by the Harvard computer architecture, the NHC separates the information flow into a control stream (the "how-to" logic) and a data stream (the actual values being processed). Algorithmic modules (Controller, Memory, Bus) handle the logic, while data-specific modules (Input, ALU) handle the representation. This decoupling allows the "logic" part of the brain to remain unchanged even if the "sensory" part is swapped out for a new domain.
  • Evolutionary Training (NES): Instead of using standard backpropagation (gradient descent), the NHC is trained using Natural Evolution Strategies (NES). This "black-box" optimization allows the model to use "hard" memory decisions (discrete pointers) that are non-differentiable but much more robust for algorithmic logic than the "fuzzy" soft-attention mechanisms typically used in neural networks.

The architecture also features a dual-memory system where control signals and data values are stored in coupled matrices, ensuring that the logic always knows the "context" of the data it is retrieving.

Datasets

The NHC was evaluated on a diverse suite of 11 algorithmic tasks of varying complexity:

  • Navigation: Search, Plan (and their "extended" versions).
  • Arithmetic: Addition, evaluating complex Arithmetic expressions.
  • Logic/Sorting: Sorting lists of numbers.
  • Sequence Retrieval: Copy, RepeatCopy, Reverse, and removing Duplicates.

To test transfer (R2 and R3), the authors used several cross-domain setups:

  • Numbers: Moving from binary to decimal representations.
  • Games to Robots: Transferring search/planning logic from Sokoban (a grid world game) to a robotic manipulation task and a sliding puzzle.
  • Math: Moving from decimal arithmetic to Boolean algebra.

Key Insights and Ideas

  • Abstraction through Separation: The "Aha!" moment here is that a neural network shouldn't try to learn the data and the algorithm at once. By forcing the controller to operate only on abstract control signals, the resulting "program" becomes universal.
  • Hard Decisions are Better for Logic: While "soft" attention (probabilistic blurring) is great for images, it's terrible for algorithms. A "sort" algorithm needs to know exactly which element is next, not a weighted average of three elements. NES enables these "hard" pointers.
  • The "Bad Memories" Strategy: During curriculum learning, the authors implemented a "learning from mistakes" buffer. By over-sampling cases where the model previously failed, they ensured the model became robust against edge cases, which is critical for algorithms where a single bit error can crash the entire process.

Key Results

  • Perfect Scaling: After being trained on tasks of complexity level 10, the NHC achieved 100% accuracy on complexities up to level 1000. In the sorting task, this involved performing over 1 million perfect computational steps without a single error.
  • Zero-Shot Transfer: Once the algorithmic modules learned a strategy (like "Search"), they could be plugged into a new environment (like a robot arm setup) and work perfectly the first time, provided the basic "Input" and "ALU" modules for that new domain were available.
  • Outperforming the State-of-the-Art: The NHC significantly outperformed the standard Differential Neural Computer (DNC), which failed to generalize to higher complexities or handle tasks requiring heavy reuse of intermediate results.

Limitations and Future Work

The primary limitation is that the data-specific modules (ALU and Input) still need to be either hand-designed or pre-learned for each new domain. While the "logic" transfers, the "interface" does not.

Future work could focus on how to automatically learn these interface modules in a more end-to-end fashion without losing the abstraction that makes the NHC so powerful. Additionally, the authors suggest that incorporating parallel processing models (like the Neural GPU) could help speed up the execution of these learned algorithms for even more massive datasets.

Summary updated

BibTeX
@inproceedings{tanneberg2020evolutionary,
  author = {Daniel Tanneberg and Elmar Rueckert and Jan Peters},
  title = {{Evolutionary training and abstraction yields algorithmic generalization of neural computers}},
  booktitle = {Nat. Mach. Intell},
  year = {2020},
  url = {https://openreview.net/forum?id=mpVi4Hihew},
}
Figure