cs.AINov 23, 2026

Second-Order Dynamics in Noisy RNNs Produce Exploration and Temporal Compression in Replay

Authors: Josue Casco-Rodriguez, Nanda H. Krishna, Richard G. Baraniuk

Organizations: Department of Electrical and Computer Engineering, Rice University, USA · Mila - Quebec AI Institute & Université de Montréal, Canada

Abstract

Biological neural networks (like the hippocampus) can internally generate "replay" resembling stimulus-driven activity. Recent computational models of replay use noisy recurrent neural networks (RNNs) trained to path-integrate. Replay in these networks is described as Langevin sampling, but this theory alone fails to capture the environmental exploration and temporal compression observed in real biological replay. To close this gap, we re-examine spontaneous noisy RNN activity ("replay") as Langevin sampling, one timestep at a time, from a time-series distribution resembling lived experiences (unlike previous works which defined sampling as Monte Carlo inference over a static distribution). We provide a normative second-order Langevin sampling framework wherein spike-frequency adaptation drives spatial exploration at the cost of speed, and momentum via dendritic input differentiation drives temporal compression. We numerically verify our framework via simulations of noisy RNNs trained on 2D triangular and T-maze navigation activity, and others trained on place cell activity of synthetic rats. Crucially, we observe that simultaneous adaptation and momentum increases both replay exploration and speed, and provide one of the first accounts for biologically plausible temporal compression in rate-based RNN replay. Our findings encourage experiments into whether dendritic input differentiation, or other mechanisms, may support temporal compression in memory circuits like the hippocampus.

Explore similar work

Feb 20, 2026

Leakage and Second-Order Dynamics Improve Hippocampal RNN Replay

Biological neural networks (like the hippocampus) can internally generate "replay" resembling stimulus-driven activity. Recent computational models of replay use noisy recurrent neural networks (RNNs) trained to path-integrate. Replay in these networks has been described as Langevin sampling, but new modifiers of noisy RNN replay have surpassed this description. We re-examine noisy RNN replay as sampling to understand or improve it in three ways: (1) Under simple assumptions, we prove that the gradients replay activity should follow are time-varying and difficult to estimate, but readily motivate the use of hidden state leakage in RNNs for replay. (2) We confirm that hidden state adaptation (negative feedback) encourages exploration in replay, but show that it incurs non-Markov sampling that also slows replay. (3) We propose the first model of temporally compressed replay in noisy path-integrating RNNs through hidden state momentum, connect it to underdamped Langevin sampling, and show that, together with adaptation, it counters slowness while maintaining exploration. We verify our findings via path-integration of 2D triangular and T-maze paths and of high-dimensional paths of synthetic rat place cell activity.
Apr 17, 2026

Impact of leaky dynamics on predictive path integration accuracy in recurrent neural networks

Experimental evidence indicates that intrinsic temporal dynamics operating across multiple time scales are closely associated with the emergence of periodic spatial activity of increasing complexity. However, how information encoded in grid-like firing patterns for path integration is processed across these intrinsic time scales remains unclear. To address this question, we introduce adaptive time scales through a leak term in recurrent neural networks (RNNs), forming leaky RNNs discretized from the continuous attractors of firing rate models. Our results demonstrate that leaky RNNs substantially enhance the emergence of well-defined and highly regular hexagonal firing patterns. Compared with vanilla RNNs lacking a leak term, the trained leaky RNNs produce more accurate position estimates while generating reliable grid-cell-like representations. Furthermore, under identical noise conditions, leaky RNNs consistently exhibit more stable dynamics and better-defined grid structures. The learned dynamics also give rise to stable torus attractors with a clear central hole, supporting robust and regular grid-like activity. Overall, the dynamic leak acts as a low-pass filtering mechanism that protects recurrent neural circuitry from noise, stabilizes network dynamics, and improves path-integration accuracy in recurrent neural networks.
Sep 12, 2026

Exploring napping paradigm for Recurrent Spiking Neural Networks

Biological organisms minimize free energy by balancing two competing demands on their internal world model: it must be accurate enough to predict sensory input, yet simple enough to generalize beyond it. Two mechanisms regulate this balance offline: sleep reduces complexity through gradual synaptic downscaling, while stochastic noise attenuates precision, relaxing the constraint sensory input imposes on synaptic reorganization. Engineered Spiking Neural Networks (SNNs) leave this balance unaddressed, favoring instantaneous, noiseless weight normalization instead. This paper investigates the hypothesis that a biologically inspired micro-sleep paradigm, napping -- combining proportional weight scaling with continuous stochastic membrane activity -- can replicate the stability of normalization while shedding model complexity. We evaluate this in an unsupervised recurrent SNN trained via trace-based spike-timing-dependent plasticity (STDP) on Gabor-preprocessed MNIST. We tune napping across three regularization regimes by sweeping its duration and membrane noise level, then compare the best configuration against weight normalization. Across all three regimes, well-tuned napping matches the accuracy of normalization: accuracy peaks at brief durations and low noise, then declines monotonically as either grows. Clustering diverges, with the strongest geometric separation arising at longer durations and higher noise -- the two terms of free energy pulling apart, accuracy rewarding data fit and structure rewarding the simpler representation that gradual, noisy downscaling induces. This gain carries a simulation cost normalization avoids, so napping is most compelling where representational structure, rather than raw classification efficiency, is the priority.