Inferring stochastic low-rank recurrent neural networks from neural data

Matthijs Pals, A Erdem Sagtekin, Felix Pei, Manuel Glöckler, Jakob H. Macke

Abstract

Recurrent Neural Networks (RNNs) are essential for modeling neural population dynamics, yet researchers often face a trade-off between the accuracy of high-dimensional "black-box" models and the interpretability of low-dimensional systems. We present a novel framework for fitting stochastic, low-rank RNNs to noisy neural data using Variational Sequential Monte Carlo (VSMC). This approach captures trial-to-trial variability while enabling the efficient, polynomial-time discovery of all fixed points in large-scale networks, bridging the gap between generative modeling and dynamical systems analysis.

Introduction

A central challenge in computational neuroscience is understanding how coordinated neural activity implements computations like decision-making or motor control. While RNNs are popular models for these processes, deterministic low-rank models often fail to account for the inherent stochasticity of biological circuits. Conversely, high-rank models that fit data well are often mathematically opaque. This paper addresses this tension by introducing a probabilistic state-space model that combines low-rank interpretability with stochastic flexibility.

Methodology

The proposed framework treats the low-rank RNN as a probabilistic state-space model. The weight matrix is constrained to a low rank $R$, projecting $N$-dimensional activity into a smaller latent space. Crucially, noise is added directly to latent transitions to model trial-to-trial variability.

To fit this model, the authors utilize Variational Sequential Monte Carlo (VSMC), a particle filtering method that maintains multiple hypotheses about the latent state. A specialized proposal distribution balances the RNN’s internal predictions with observed data. Furthermore, for networks using piecewise-linear activations (like ReLU), the authors demonstrate that finding all fixed points—the topological anchors of the dynamical system—can be achieved with polynomial complexity $O(N^R)$, a significant improvement over the standard exponential complexity.

The overall workflow: fitting a low-rank RNN to data, generating new trajectories, and accessing the underlying dynamics.

Key Insights and Results

The method was validated across diverse datasets, including synthetic teacher-student setups, human EEG, and spiking data from the rat hippocampus and macaque motor cortex.

Generative Fidelity and Efficiency

On human EEG data, the VSMC method matched the reconstruction accuracy of state-of-the-art deterministic models while using 80% fewer parameters. Interestingly, the inclusion of stochasticity allowed for simpler descriptions; complex EEG signals were modeled using only 3 latent dimensions, compared to the 16 required by previous methods. The model acts as a true generative tool, "hallucinating" trajectories that match the complex statistics of real neurons, including firing rates and inter-spike interval (ISI) distributions.

Mechanistic Discovery

In rat hippocampal data, the model inferred latent variables that automatically captured the biological theta rhythm and predicted the animal's physical position, despite being trained only on spikes. Additionally, the framework successfully recovered "ring attractors"—circular manifolds used by the brain to represent variables like heading direction—from noisy synthetic data.

The model accurately reproduces the statistics of spiking data (rates, ISIs) and recovers complex latent structures like ring attractors.

Discussion and Limitations

While the framework offers significant advances in interpretability and efficiency, some limitations remain. The current assumption that recurrent noise resides in the same low-dimensional subspace as the weights may not fully capture the "diffuse" noise present in biological systems. Additionally, the accelerated fixed-point discovery relies on piecewise-linear activations, which may require adaptation for smoother biological nonlinearities. Future work aims to incorporate more biologically detailed spiking units to further bridge the gap between machine learning models and neural wetware.

Summary updated

BibTeX
@inproceedings{pals2024inferring,
  author = {Matthijs Pals and A Erdem Sagtekin and Felix Pei and Manuel Glöckler and Jakob H. Macke},
  title = {{Inferring stochastic low-rank recurrent neural networks from neural data}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=C0EhyoPpTN},
}
Figure