Emergent mechanisms for long timescales depend on training curriculum and affect performance in memory tasks

Sina Khajehabdollahi, Roxana Zeraati, Emmanouil Giannakakis, Tim Jakob Schäfer, Georg Martius, Anna Levina · DOI

Abstract

Recurrent neural networks (RNNs) solve memory-intensive tasks by bridging temporal gaps through two primary mechanisms: intrinsic single-neuron timescales ($\tau$) and network-mediated recurrent loops ($\tau_{net}$). This study investigates how training curricula influence the emergence of these mechanisms. We demonstrate that a "multi-head" curriculum, which requires solving tasks across multiple timescales simultaneously, promotes robust network-mediated dynamics. In contrast, standard sequential "single-head" training often leads to fragile, slow-neuron-dependent solutions that suffer from catastrophic forgetting and poor generalization. Our findings highlight the critical role of curriculum design in developing stable and scalable memory representations in artificial agents.

Introduction

To solve tasks like language processing or working memory, neural networks must maintain information over "long timescales." In both biological and artificial recurrent neural networks (RNNs), these timescales can emerge from two sources: intrinsic single-neuron timescales ($\tau$), where individual neurons act as leaky integrators, and network-mediated timescales ($\tau_{net}$), where information is sustained through recurrent connectivity. While previous research has shown that making $\tau$ a trainable parameter helps RNNs solve memory tasks, it remains unclear which mechanism is superior or how the training process influences this choice. This paper explores how different training curricula determine the underlying memory mechanism and its subsequent impact on stability and generalization.

Methodology

The researchers employed Leaky RNNs where the leak parameter ($\tau$) is a trainable variable for every neuron. They compared two distinct training strategies:

  1. Single-head Curriculum: A standard sequential approach where the network is trained on a task with memory requirement $N$, moving to $N+1$ only after solving the previous level.
  2. Multi-head Curriculum: As the difficulty $N$ increases, the network adds a new readout head for the new level while continuing to be trained on all previous $N$ levels simultaneously.
RNN architecture with multi-head outputs for varying memory requirements

The networks were benchmarked on two synthetic tasks with controllable memory requirements: $N$-parity (outputting the XOR sum of the last $N$ bits) and $N$-delayed match-to-sample ($N$-DMS). To analyze the resulting dynamics, the authors used Autocorrelation (AC) analysis to decompose the observed activity into intrinsic and network-mediated components.

Results and Insights

The study reveals that the training curriculum is the primary determinant of the emergent memory mechanism.

Curriculum Dictates Mechanism

Single-head training encourages neurons to simply increase their individual $\tau$, effectively becoming "slow neurons." While this solves the immediate task, it is fragile. In contrast, multi-head training forces the emergence of network-mediated timescales ($\tau_{net}$) through complex recurrent connectivity, as the network must simultaneously handle multiple timescales.

Autocorrelation analysis revealing the decomposition of activity into intrinsic ($\tau$) and network-mediated ($\tau_{net}$) timescales

Robustness and Scalability

Networks relying on network-mediated dynamics (multi-head) proved significantly more robust. In ablation studies, removing "slow" neurons in single-head networks caused performance to collapse, whereas multi-head networks exhibited distributed memory representations. Furthermore, multi-head networks scaled effortlessly to $N \ge 100$ in the $N$-parity task, while single-head networks plateaued around $N \approx 35$.

Catastrophic Forgetting

A key finding is that single-head networks are prone to catastrophic forgetting. As they increase $\tau$ to solve larger $N$ tasks, they lose the high-frequency processing capability required for smaller $N$ tasks. Multi-head networks avoid this by maintaining "fast" individual neurons ($\tau \approx 1$) and delegating long-term memory to the recurrent structure.

Conclusion

This research demonstrates that the way we train RNNs fundamentally changes their internal strategy for memory. Multi-head curricula not only accelerate training for complex architectures like GRUs and LSTMs but also produce more robust and generalizable models. Future work will explore these curricula in the context of high-dimensional real-world data and more biologically realistic spiking neural networks.

Summary updated

BibTeX
@inproceedings{khajehabdollahi2024emergent,
  author = {Sina Khajehabdollahi and Roxana Zeraati and Emmanouil Giannakakis and Tim Jakob Schäfer and Georg Martius and Anna Levina},
  title = {{Emergent mechanisms for long timescales depend on training curriculum and affect performance in memory tasks}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=xwKt6bUkXj},
}
Figure