Memory flows: geometry and dynamics of sequential retrieval in input-driven Hopfield networks

Simone Betteti, Matteo Martin, Morten Gram Pedersen, Sandro Zampieri, Giacomo BaggioNeurIPS 2026

TL;DR

Standard Hopfield networks treat memory like a ball rolling into a static valley—once you remember something, the system stops moving. This paper introduces a two-timescale Hopfield network where a slow internal feedback loop dynamically reshapes that landscape on the fly, pushing the network autonomously from one memory to the next along a structured graph. Better yet, the authors provide the exact mathematical physics behind when these "trains of thought" sustain themselves and when they fizzle out.

What Problem Does This Paper Address?

For over four decades, associative memory models (like Hopfield networks) have been the gold standard for showing how distributed neurons can clean up a noisy cue and settle into a stored pattern. Even modern Hopfield networks—which boast exponential storage capacity and share deep mathematical roots with Transformer attention—suffer from a fundamental quirk: they are static. Once the network converges to an equilibrium (a retrieved memory), the dynamics halt. If you want to recall a sequence of ideas, you have to manually reset and re-cue the network.

Real cognition and modern algorithmic reasoning aren't snapshots; they are movies. While past researchers tried forcing sequential transitions using delayed asymmetric weights, those single-timescale systems often produce messy, overlapping "mixed" memory states and resist clean mathematical analysis. The authors set out to build a model that steps cleanly through structured sequences of memories while remaining completely analytically tractable.

Methods

The authors extend an existing framework called the Input-Driven Plasticity (IDP) Hopfield model, where external inputs weight the "saliency" (importance) of each stored memory, effectively deepening or flattening its valley in the energy landscape.

Instead of relying on an external puppeteer to change those inputs, the authors close the loop by introducing a two-timescale architecture:

  1. Fast neural dynamics ($x$): Rapidly relax toward whichever memory valley is currently deepest.
  2. Slow saliency feedback ($z$): Driven by the currently retrieved memory and wired through an adjacency matrix $A$ (representing a directed transition graph of memories).
Block diagrams comparing the static input-driven Hopfield model (A) with the autonomous two-timescale sequential model (B) alongside a sample memory-transition graph (C).

When the fast state settles on Memory 1, the slow variable gradually drains the saliency of Memory 1 while pumping up the saliency of its graph-prescribed successor, Memory 2.

Figure 1: Schematic illustration of the proposed two-timescale mechanism for sequential memory transitions. At the initial time, the fast state variable is at a stable equilibrium corresponding to memory ξ1. The slow variable z progressively destabilizes this equilibrium while simultaneously stabilizing the equilibrium associated with memory ξ2. At the escape time Tesc, the equilibrium corresponding to ξ1 loses stability and the system transitions toward ξ2. This transition occurs only when the gain parameter κ of the slow dynamics exceeds a critical threshold κcrit. We analytically characterize both κcrit and the resulting escape time Tesc.

To analyze this without relying purely on simulations, the authors bring in Geometric Singular Perturbation Theory (GSPT)—a powerhouse mathematical toolkit for systems with separated timescales. This lets them map out memory manifolds (subspaces where neural activity gets temporarily trapped) and reduce the high-dimensional network into a clean, 1D discrete map that predicts exact escape times and feedback thresholds.

Datasets

Not discussed in the paper. Because this is a theoretical and dynamical systems study, the authors validate their math using synthetic binary patterns ($N=256$ neurons, $P=15$ stored memories): specifically mutually orthogonal patterns, unbiased random patterns, and correlated (biased) random patterns.

Key Insights and Ideas

  • Timescale separation prevents "mental slush": In a classical single-timescale sequential Hopfield network, memories bleed into one another with partial overlaps and erratic timing. Separating retrieval (fast) from landscape modulation (slow) yields crisp, full-alignment snaps from one distinct memory to the next.
Comparison of memory overlaps over time: messy mixed states in a single-timescale model (D) versus crisp, sequential switching in the two-timescale model for orthogonal (E) and random (F) memories.
  • The geometry of an "aha" jump: Using GSPT, the authors show that "holding a thought" corresponds to riding along an attracting memory manifold. As the slow feedback erodes that memory's saliency, the trajectory crosses a precise mathematical boundary into a saddle-type manifold, launching the neural state along an unstable fiber straight toward the next memory's attractor.
  • Thought sequences have a sharp phase transition: Sequential retrieval isn't guaranteed. If the slow feedback gain $\kappa$ is below a critical threshold ($\kappa_{\text{crit}}$), the current memory fades away before its successor is strong enough to catch the state, causing the whole system to collapse to zero activity. Above $\kappa_{\text{crit}}$, a stable fixed point emerges in the saliency update map, locking the network into a self-sustained rhythm.

Key Results

  • Exact analytical thresholds: Using a smooth activation function (SmoothF, $\psi(x) = x/(1+|x|)$), the authors solve the transition equations by hand, deriving an exact critical gain threshold of $\kappa_{\text{crit}} \simeq 12.74$. Below this (e.g., $\kappa=9$), oscillations die out; above it (e.g., $\kappa=15$), the saliency amplitude locks onto a theoretical stable fixed point of $\bar{Z}_2 \simeq 6.78$, closely matching full network simulations ($\bar{Z}_2 \simeq 6.95$).
  • Predictable timing and noise effects: Simulated escape times closely track the analytical formula $T_{\text{esc}}^{\infty} = \frac{1}{2}\log \bar{Z}_2$, with accuracy improving as gain $\kappa$ increases. Adding small Gaussian noise to the fast neurons shrinks the lingering delay between losing stability and actually jumping—and high noise triggers premature jumps.
  • Robustness to correlated memories: Although the exact math assumes orthogonal memories, simulations with biased random patterns (parameterized by bias $\epsilon \in [0, 1]$, giving expected overlap $\epsilon^2$) show the theory holds up remarkably well for moderate correlations ($\epsilon \lesssim 0.35$). Retrieval reliability drops off sharply around $\epsilon \gtrsim 0.4$ and fails completely for $\epsilon > 0.5$.

Limitations and Future Work

The authors are refreshingly upfront about where the current math stops:

  • Activation functions: The proofs apply to componentwise, tanh-like activations, not softmax. Extending this slow-fast theory to softmax is a high-priority next step, as it would directly bridge sequential Hopfield dynamics with Transformer self-attention and exponential memory capacity.
  • No branching paths yet: The theoretical reductions assume deterministic graphs where each memory has at most one successor. Preliminary tests suggest memory overlap could help bias choices at forks in the road, which remains to be formalized.
  • Open questions on scale and control: Exactly how sequence capacity scales with neuron count $N$ and sequence length $L$, precise bounds on the timescale ratio $\tau_x/\tau_z$, and how external control signals might actively steer transitions (like a neural finite-state machine) are teed up for future work.

Summary updated

Abstract

Associative memory models classically describe retrieval as convergence to stored patterns, but the theory of sequential retrieval remains comparatively limited. We develop a two-timescale input-driven Hopfield network in which fast associative retrieval is modulated by a slow feedback variable evolving over a prescribed memory-transition graph. This yields autonomous, graph-constrained transitions while preserving analytical tractability. Using slow-fast and geometric singular perturbation theory, we characterize memory fixation via memory manifolds and identify the geometric regions that govern stability loss and escape from retrieved memories. We further derive reduced slow dynamics and explicit criteria for transition onset, self-sustained retrieval, and collapse, expressed through escape times, gain thresholds, and fixed points. Together, these results provide a tractable framework for analyzing feedback-driven sequential retrieval in Hopfield networks.
BibTeX
@inproceedings{betteti2026memory,
  author = {Simone Betteti and Matteo Martin and Morten Gram Pedersen and Sandro Zampieri and Giacomo Baggio},
  title = {{Memory flows: geometry and dynamics of sequential retrieval in input-driven Hopfield networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=h5XfkJCHcA},
}
Figure