Trained recurrent neural networks develop phase-locked limit cycles in a working memory task

Matthijs Pals, Jakob H. Macke, Omri Barak · DOI

Introduction: The Mechanism of Phase Coding

In neuroscience, the "phase coding" hypothesis suggests that information is encoded not only by which neurons fire, but by the precise timing of their spikes relative to a background rhythm, such as the theta oscillations observed in the hippocampus. While experimental evidence supports this theory, the underlying dynamical mechanisms—how neural circuits actually implement and maintain these phase-shifted memories—have remained unclear. This paper investigates the dynamical systems capable of supporting phase coding in working memory.

Methods: Reverse-Engineering Neural Dynamics

The researchers employed Artificial Recurrent Neural Networks (RNNs) as "hypothesis generators" to explore these mechanisms. The RNNs were trained on a working memory task where they received a reference oscillation (a "clock") and transient stimuli. The goal was to produce an output oscillation that was either in-phase or anti-phase with the reference, depending on the stimulus received.

To make the high-dimensional activity of the RNNs mathematically tractable, the authors applied a low-rank constraint (rank-2) to the recurrent weight matrix. This allowed for the projection of neural activity onto a 2D plane for rigorous analysis. The researchers then used tools from non-linear dynamics, including Poincaré maps and Floquet multipliers, to assess the stability of the resulting oscillations.

Figure 1: Comprehensive overview of the RNN task (A), trial activity (B), low-rank weight matrix decomposition (C), and the resulting dynamical projections (D, E) showing phase-locked limit cycles.

The networks were trained using both biologically realistic Local Field Potential (LFP) recordings from the rat hippocampus and synthetic sine waves to isolate the effects of frequency and amplitude on memory stability.

Key Insights: Memories as Stable Limit Cycles

The study's most significant finding is that phase-coded memories are represented as stable limit cycle attractors. Once a stimulus "pushes" the network into a specific phase, the internal dynamics maintain that state indefinitely.

The Two-Oscillator Mechanism

The RNN effectively splits into two functional modules: an autonomous rhythm generator and a coupling function. Memory is stored through the multi-stable locking of these two oscillators. A stimulus acts as a temporary force that collapses the system's bistability into a single stable state; once the stimulus is removed, the bistability returns, but the network remains trapped in the selected phase.

Phase vs. Rate Coding

While networks can solve working memory tasks using "rate coding" (changing average firing intensity), this study focused on "phase coding," where the firing intensity remains constant but the timing relative to the reference clock shifts. This strategy more closely mirrors specific hippocampal phenomena.

Figure 2: Single-unit activity patterns comparing rate-coding and phase-coding strategies across different network units.

Key Results and Stability

Using Floquet analysis, the authors confirmed that the phase-locked states are true mathematical attractors, with multiplier norms less than one ($|\lambda| < 1$). They also identified "islands of stability" in the parameter space, finding that phase coding is most robust when the reference oscillation has low frequency or falls within specific amplitude ranges. Furthermore, the complex network of hundreds of neurons was successfully reduced to a simplified model of just three equations that replicated the full network's behavior.

Limitations and Future Directions

While the model successfully demonstrates binary memory, scaling this to the capacity of human working memory (storing multiple items) remains a challenge. Additionally, while the low-rank simplification provided deep insight, real biological networks are likely higher rank. Future work may explore how these stable limit cycles could "drift" to represent continuous variables, such as position or time, potentially explaining phenomena like phase precession in navigation.

Reference: Pals M, Macke JH, Barak O (2024) Trained recurrent neural networks develop phase-locked limit cycles in a working memory task. PLoS Comput Biol 20(2): e1011852.

Summary updated

BibTeX
@article{pals2024trained,
  author = {Matthijs Pals and Jakob H. Macke and Omri Barak},
  title = {{Trained recurrent neural networks develop phase-locked limit cycles in a working memory task}},
  journal = {PLOS Computational Biology},
  year = {2024},
  doi = {10.1371/journal.pcbi.1011852},
}
Figure