Mechanistic Interpretability of RNNs emulating Hidden Markov Models
Not on the map. Why?
Abstract (arXiv)
Recurrent neural networks (RNNs) provide a powerful approach in neuroscience to infer latent dynamics in neural populations and to generate hypotheses about the neural computations underlying behavior. However, past work has focused on relatively simple, input-driven, and largely deterministic behaviors - little is known about the mechanisms that would allow RNNs to generate the richer, spontaneous, and potentially stochastic behaviors observed in natural settings. Modeling with Hidden Markov Models (HMMs) has revealed a segmentation of natural behaviors into discrete latent states with stochastic transitions between them, a type of dynamics that may appear at odds with the continuous state spaces implemented by RNNs. Here we first show that RNNs can replicate HMM emission statistics and then reverse-engineer the trained networks to uncover the mechanisms they implement. In the absence of inputs, the activity of trained RNNs collapses towards a single fixed point. When driven by stochastic input, trajectories instead exhibit noise-sustained dynamics along closed orbits. Rotation along these orbits modulates the emission probabilities and is governed by transitions between regions of slow, noise-driven dynamics connected by fast, deterministic transitions. The trained RNNs develop highly structured connectivity, with a small set of "kick neurons" initiating transitions between these regions. This mechanism emerges during training as the network shifts into a regime of stochastic resonance, enabling it to perform probabilistic computations. Analyses across multiple HMM architectures - fully connected, cyclic, and linear-chain - reveal that this solution generalizes through the modular reuse of the same dynamical motif, suggesting a compositional principle by which RNNs can emulate complex discrete latent dynamics.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 15 of its 48 references that are in the map. First posted on arXiv 29 Oct 2025.
Builds on
15 of 48 references.
References · 15
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2016Categorical Reparameterization with Gumbel-Softmaxcited by 2,708
- 2013Sinkhorn Distances: Lightspeed Computation of Optimal Transportation Distancescited by 2,277
- 2016The Concrete Distribution: A Continuous Relaxation of Discrete Random Variablescited by 1,135
- 2017Learning Generative Models with Sinkhorn Divergencescited by 310
- 2025Open Problems in Mechanistic Interpretabilitycited by 173
- 2019Universality and individuality in neural dynamics across large populations of recurrent networkscited by 61
- 2017Linking connectivity, dynamics and computations in low-rank recurrent neural networkscited by 51
- 2019Reverse engineering recurrent networks for sentiment classification reveals line attractor dynamicscited by 38
- 2020Artificial neural networks for neuroscientists: A primercited by 26
- 2021Reverse engineering recurrent neural networks with Jacobian switching linear dynamical systemscited by 17
- 2023Bifurcations and loss jumps in RNN trainingcited by 17
Built on by
Not cited yet.