Dynamical phases of short-term memory mechanisms in RNNs

Barışcan Kurtkaya, Fatih Dinç, Mert Yuksekgonul, Marta Blanco-Pozo, Ege Cirakman, Mark J. Schnitzer, Y. Yemez, Hidenori Tanaka, Peng Yuan, Nina Miolane · DOI

Abstract

Short-term memory is essential for cognitive processing, yet our understanding of its neural mechanisms remains unclear. Neuroscience has long focused on how sequential activity patterns, where neurons fire one after another within large networks, can explain how information is maintained. While recurrent connections were shown to drive sequential dynamics, a mechanistic understanding of this process still remains unknown. In this work, we introduce two unique mechanisms that can support this form of short-term memory: slow-point manifolds generating direct sequences or limit cycles providing temporally localized approximations. Using analytical models, we identify fundamental properties that govern the selection of each mechanism. Precisely, on short-term memory tasks (delayed cue-discrimination tasks), we derive theoretical scaling laws for critical learning rates as a function of the delay period length, beyond which no learning is possible. We empirically verify these results by training and evaluating approximately 80,000 recurrent neural networks (RNNs), which are publicly available for further analysis. Overall, our work provides new insights into short-term memory mechanisms and proposes experimentally testable predictions for systems neuroscience.

Introduction

How does a brain—or a neural network—hold onto a piece of information for a few seconds? In neuroscience, this is often observed as "sequential activity," where neurons fire one after another to bridge a temporal gap. While recurrent connections are known to drive these dynamics, a clear mechanistic understanding of why specific patterns emerge has been lacking. This research addresses the "long-term dependency" problem by identifying the mathematical structures, or attractors, that Recurrent Neural Networks (RNNs) develop to handle delays. By analyzing how task constraints like delay length and learning rate dictate the choice of memory mechanism, this work bridges the gap between machine learning and systems neuroscience.

Overview of short-term memory models and the delayed cue discrimination task.

Methodology

The study employs a combination of high-level theory and large-scale empirical testing. The researchers utilized Low-Rank RNN Analysis, specifically rank-2 RNNs, to visualize latent dynamics in a 2D plane. Two analytical "toy models" were developed to represent competing strategies:

  1. The Ghost Model: A 1D system utilizing "slow points" (regions of near-stalled activity) to maintain information over time.
  2. The Limit Cycle Model: A 2D system using periodic oscillations to keep time.

To classify these strategies, a Mechanism Discrimination Index (MDI) was created to distinguish between "stalling" (low-frequency) and "looping" (high-frequency) behaviors. Furthermore, the authors derived theoretical scaling laws for the critical learning rate—the maximum rate at which a network can learn before gradients become unstable.

Task Paradigms and Datasets

The models were evaluated on synthetic neuroscience tasks designed to test memory limits:

  • Delayed Activation Task: Requires the network to wait a specific duration ($T_{delay}$) after a trigger before responding.
  • Delayed Cue-Discrimination Task: A working memory test where the network must signal which of two cues it observed after a delay period.

The study is supported by the "80k RNN" Dataset, a public release of weights and metadata for approximately 80,000 trained RNNs, serving as a benchmark for neural dynamics research.

Dynamical Mechanisms and Scaling Laws

The research reveals that the choice between a slow-point manifold and a limit cycle is a "phase transition" determined by task parameters. Short delays typically favor slow points, while longer delays or higher learning rates favor limit cycles. A critical finding is the impact of the "post-reaction" window; requiring the network to remain quiet after a task forces a shift from slow points to limit cycles.

Training dynamics and latent variable analysis of RNNs during memory tasks.

The difficulty of learning scales non-linearly with time. The maximum allowable learning rate ($\alpha$) follows a power law relative to the delay ($T_{delay}$): $\alpha \sim T_{delay}^{-\beta}$. Empirical results from the 80,000-network dataset closely matched theoretical predictions. For slow-point strategies, the predicted exponent $\beta \approx 4-5$ was observed as $\beta \approx 4.05$. Limit cycles proved more resilient to long delays, with a scaling factor of $\beta \approx 2.72$.

Conclusion and Future Directions

This work provides a mathematical framework for understanding short-term memory in RNNs, identifying "no-learning zones" where training fails due to vanishing gradients. While the study focuses on low-rank dynamics and leaky integrator models, it offers testable predictions for neuroscience. Future research may investigate whether biological brains utilize these specific mathematical mechanisms, particularly by examining neural activity during post-trial periods.

Summary updated

BibTeX
@inproceedings{kurtkaya2025dynamical,
  author = {Barışcan Kurtkaya and Fatih Dinç and Mert Yuksekgonul and Marta Blanco-Pozo and Ege Cirakman and Mark J. Schnitzer and Y. Yemez and Hidenori Tanaka and Peng Yuan and Nina Miolane},
  title = {{Dynamical phases of short-term memory mechanisms in RNNs}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=ybBuwgOPOd},
}
Figure