Inferring stochastic low-rank recurrent neural networks from neural data

Matthijs Pals, A Erdem Sağtekin, Felix Pei, Manuel Gloeckler, Jakob H Macke

TL;DR

This paper introduces a powerful framework for fitting stochastic low-rank recurrent neural networks (RNNs) to noisy neural data using variational sequential Monte Carlo (vSMC). By combining the interpretability of low-rank dynamics with the flexibility of stochastic transitions, the authors achieve state-of-the-art data reconstruction with significantly lower-dimensional latents and provide a new polynomial-time algorithm to analytically find all fixed points in these systems.

What Problem Does This Paper Address?

A major challenge in computational neuroscience is bridging the gap between high-dimensional, noisy neural recordings and the low-dimensional dynamical systems that likely govern them. Researchers typically face a trade-off:

  1. Mechanistic Models: (like low-rank RNNs) are highly interpretable and analytically tractable but often struggle to capture the complex trial-to-trial variability seen in real biological data because they are usually deterministic.
  2. Black-box Statistical Models: (like deep state-space models) fit noisy data excellently but offer little insight into the underlying "circuitry" or mechanisms.

Furthermore, analyzing large RNNs is computationally brutal. Finding "fixed points"—the states where the system's activity stabilizes—usually scales exponentially with the number of neurons ($2^N$), making it impossible for large-scale models.

Methods

The authors propose a hybrid approach:

  • Low-Rank Architecture: They use RNNs where the weight matrix $J$ is decomposed into two low-rank matrices ($J = MN^T$). This forces the high-dimensional neural activity into a low-dimensional latent space $R$, where $R \ll N$.
  • Stochastic Transitions: Unlike traditional low-rank RNNs, they add noise to the latent dynamics. This allows the model to account for variability that isn't just due to initial conditions.
  • Variational Sequential Monte Carlo (vSMC): To fit these stochastic models, they use vSMC (or "particle filtering"). This method uses a set of "particles" to approximate the probability distribution of the hidden states, allowing for efficient gradient-based learning even with non-linear observations (like Poisson spiking).
  • Efficient Fixed-Point Search: For networks using piecewise-linear activations (like ReLU), they leverage the low-rank structure and the theory of "hyperplane arrangements." They prove that instead of searching $2^N$ regions, they only need to check a polynomial number of regions ($O(N^R)$) to find all fixed points.
Figure 1: Our goal is to obtain generative models from which we can sample realistic neural data while having a tractable underlying dynamical system. We achieve this by fitting stochastic low-rank RNNs with variational sequential Monte Carlo.

Datasets

The method was validated across a diverse range of data:

  • Synthetic Teacher-Student Setups: Used to prove the model can recover ground-truth oscillatory dynamics and noise levels from both Gaussian and Poisson observations.
  • Human EEG: 64-channel recordings of a subject at rest.
  • Rat Hippocampus (HC-2 & HC-11): Spiking data from rats foraging in open fields or running on linear tracks.
  • Macaque Motor Cortex (MC_Maze): Spiking activity during a delayed reaching task, part of the Neural Latents Benchmark (NLB).

Key Insights and Ideas

  • Stochasticity as a Rank-Reducer: One of the most striking findings is that adding stochasticity allows for much simpler models. For EEG data, the authors matched the performance of state-of-the-art deterministic models while reducing the latent dimensionality from 16 down to just 3.
  • The Geometry of Low-Rank: The paper shows that low-rank constraints don't just compress data; they fundamentally simplify the geometry of the system's phase space. Because the dynamics are confined to a low-dimensional subspace, the number of "reachable" linear regions in a ReLU network is drastically smaller than in a full-rank network.
  • Analytic Certainty: While most researchers use approximate numerical methods to find fixed points (which can miss some or fail to converge), this paper provides an analytic guarantee to find all of them efficiently.
Figure 2: Proof sketch.

Key Results

  • EEG Reconstruction: The vSMC-fitted stochastic RNN achieved a reconstruction accuracy ($D_{stsp} \approx 2.1$) comparable to the best existing methods but used 78% fewer parameters and a much smaller latent space.
  • Hippocampal Decoding: In rat data, the inferred latents were highly coherent with the local field potential (LFP) theta oscillations. Furthermore, these latents could predict the rat's physical position with an $R^2$ of 0.79, despite the model never seeing the position data during training.
  • Macaque Reaching: A rank-5 model successfully captured reach-target information and generalized to "unseen" reach directions, predicting hand velocity with an $R^2 \approx 0.90$.
  • Fixed Point Efficiency: In a test case with 17 fixed points, the authors' analytic method found all of them, whereas approximate methods often missed several or required significantly more computation.

Limitations and Future Work

  • Noise Assumptions: The current model assumes the recurrent noise is correlated and lies within the same subspace as the weights ($M$). While this aids tractability, real neural noise might be more complex or non-Gaussian.
  • Task Complexity vs. Rank: For highly complex datasets with over 100 different experimental conditions (like the full MC_Maze), the required rank still increases (up to 36), suggesting there is a limit to how much "low-rankness" can be exploited for very high-dimensional behaviors.
  • Adjoint Methods: The authors suggest that future work could integrate "adjoint methods" for fitting stochastic differential equations, which might handle irregularly sampled time-series data more effectively.

Summary updated

BibTeX
@inproceedings{pals2024inferring,
  author = {Matthijs Pals and A Erdem Sağtekin and Felix Pei and Manuel Gloeckler 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