Using Multi-task and Transfer Learning to Solve Working Memory Tasks

T. S. Jayram, Tomasz Kornuta, Ryan L. McAvoy, Ahmet S. Ozcan

Introduction

Deep learning has achieved remarkable success in pattern recognition, yet "working memory"—the capacity to briefly hold, manipulate, and reason over information—remains a significant hurdle for neural architectures. Standard Recurrent Neural Networks (RNNs), such as LSTMs, frequently fail to generalize to sequences longer than those encountered during training. This failure stems from a fundamental architectural flaw: the conflation of computation with storage.

To address this, researchers have introduced the Memory-Augmented Encoder-Solver (MAES). This modular neural architecture separates the "writing" and "reading" of memory into two distinct controllers. By leveraging multi-task learning to train a "bias-free" encoder, MAES achieves perfect task-size generalization, solving algorithmic problems with sequences 50 times longer than those seen during training—far outperforming advanced models like the Differentiable Neural Computer (DNC).

The MAES Architecture

The core innovation of MAES lies in its modularity. Unlike traditional Memory-Augmented Neural Networks (MANNs) that are trained end-to-end on single tasks, MAES employs two separate components:

  1. Encoder: Responsible for reading input data and writing it to an external memory.
  2. Solver: Responsible for reading from that memory and producing the final output.

These components interact via a shared differentiable $M \times N$ memory array using soft attention mechanisms. This separation allows for Transfer Learning: a pretrained and "frozen" Encoder can be plugged into a new Solver for a different task.

A critical challenge in memory encoding is "forward bias," where an encoder stores items in a way that depends on their neighbors. To eliminate this, MAES is trained using Multi-Task Learning (MTL). By training the encoder jointly on both forward (Serial Recall) and backward (Reverse Recall) tasks, the model learns to treat memory slots as independent containers. This "clean" encoding is the key to its massive scalability.

Experimental Tasks

The researchers evaluated MAES on a suite of five synthetic tasks adapted from cognitive psychology, using 8-bit input words. These tasks test different aspects of working memory manipulation:

Basic recall tasks used for training and testing: (a) Serial Recall, (b) Reverse Recall, and (c) Odd Recall.
  • Serial Recall: Repeat the input sequence exactly.
  • Reverse Recall: Repeat the input sequence in reverse order.
  • Odd Recall: Output only the items at odd positions.

Beyond simple recall, the model was tested on complex relational tasks:

Relational tasks requiring comparison: (d) Sequence Comparison and (e) Sequence Equality.
  • Sequence Comparison: Identify differences between a main sequence and an auxiliary sequence.
  • Sequence Equality: Determine if two sequences are identical (binary classification).

Results and Generalization

The models were trained on short sequences (lengths 3–20) and tested on sequences of length 1,000. The results were definitive:

  • Perfect Generalization: MAES achieved 100% accuracy on length-1,000 sequences, despite never seeing sequences longer than 20 during training.
  • Baseline Comparison: Standard LSTMs failed completely on long sequences, performing no better than random guessing. While the Differentiable Neural Computer (DNC) performed better than LSTMs, it showed significant performance degradation at length 1,000. MAES remained perfect.
  • Transfer Success: An encoder pretrained on simple recall tasks was successfully reused to solve complex relational tasks like Sequence Equality with minimal additional training, demonstrating the power of modularity.

Conclusion

The MAES architecture demonstrates that the key to solving working memory tasks lies in the architectural separation of memory and logic. By using multi-task learning to create independent, bias-free representations, neural models can scale to problem sizes far beyond their training data. Future work will look toward "memory distraction" tasks and applying these principles to more complex data types like images and natural language.

Summary updated

BibTeX
@inproceedings{jayram2018using,
  author = {T. S. Jayram and Tomasz Kornuta and Ryan L. McAvoy and Ahmet S. Ozcan},
  title = {{Using Multi-task and Transfer Learning to Solve Working Memory Tasks}},
  booktitle = {ICMLA},
  year = {2018},
  url = {https://openreview.net/forum?id=Q0cMbR-pZjVF},
}
Figure