Reconstructing Computational Dynamics from Neural Measurements with Recurrent Neural Networks

Daniel Durstewitz, Georgia Koppe, Max Ingo ThurmbioRxiv 2022

Abstract

Mechanistic and computational models in neuroscience usually take the form of systems of differential or time-recursive equations. The spatio-temporal behavior of such systems is the subject of dynamical systems theory (DST). DST provides a powerful mathematical toolbox for describing and analyzing neurobiological processes at any level, from molecules to behavior, and has been a mainstay of computational neuroscience for decades. Recently, recurrent neural networks (RNNs) became a popular machine learning tool for studying the nonlinear dynamics underlying neural or behavioral observations. By training RNNs on the same behavioral tasks as employed for animal subjects and dissecting their inner workings, insights and hypotheses about the neuro-computational underpinnings of behavior could be generated. Alternatively, RNNs may be trained directly on the physiological and behavioral time series at hand. Ideally, the once trained RNN would then be able to generate data with the same temporal and geometrical properties as those observed. This is called dynamical systems reconstruction, a burgeoning field in machine learning and nonlinear dynamics. Through this more powerful approach the trained RNN becomes a surrogate for the experimentally probed system, as far as its dynamical and computational properties are concerned. The trained system can then be systematically analyzed, probed and simulated. Here we review this highly exciting and rapidly expanding field, including recent trends in machine learning that may as yet be less well known in neuroscience. We also discuss important validation tests, caveats, and requirements of RNN-based dynamical systems reconstruction. Concepts and applications are illustrated with various examples from neuroscience.

Introduction: Beyond Black-Box Models

Traditional computational neuroscience relies heavily on Dynamical Systems Theory (DST) to interpret brain function. Concepts like "fixed points" (representing stable memories) or "limit cycles" (representing rhythmic activity) provide a mathematical language for neural computation. However, building these models traditionally required complex biophysical equations (e.g., Hodgkin-Huxley) that necessitate numerous assumptions about biological parameters.

With the advent of large-scale neural recordings, there is a growing need to extract these mechanistic laws directly from data. This paper explores Dynamical Systems Reconstruction (DSR), a field where Recurrent Neural Networks (RNNs) are used to "discover" the underlying equations of neural systems from observed time series like spikes, fMRI, or EEG.

The DSR Framework: RNNs as Digital Twins

The core idea of DSR is to train an RNN to act as a functional surrogate—a "digital twin"—of the biological system. Unlike standard machine learning models used for one-step-ahead prediction, a reconstructed RNN should be able to generate autonomous trajectories that mirror the long-term behavior of the original system.

The workflow of Dynamical Systems Reconstruction (DSR). An RNN is trained on data from a dynamical system to capture its underlying structure, allowing it to generate simulated trajectories with the same geometrical and temporal properties.

Key Methodological Components

  • Universal Approximation: RNNs are theoretically capable of mimicking any system of differential equations.
  • Interpretability through PLRNNs: The authors advocate for Piecewise-Linear RNNs (PLRNNs). Their simpler mathematical structure allows for analytical solutions of fixed points and stability, bridging the gap between "black-box" AI and interpretable physics.
  • Latent Variables: Since experimentalists can only record a fraction of a brain's variables, RNNs utilize "latent states" to account for unobserved processes, such as hidden currents or unrecorded population activity.

Key Insights: Geometry, Topology, and Transients

A successful reconstruction is not measured by Mean Squared Error (MSE), which fails in chaotic systems due to their sensitivity to initial conditions. Instead, success is defined by whether the RNN captures the geometry and topology of the system—its attractors, nullclines, and manifolds.

Examples of dynamical system geometries that DSR aims to reconstruct, including limit cycles (a), bistable systems (b), and line attractors (c). These structures define how the system responds to inputs and processes information.

The authors emphasize that in many cognitive tasks, the "computation" occurs during transient dynamics—the path the system takes toward an attractor—rather than at the stable state itself. By analyzing the trained RNN, researchers can perform "in-silico" experiments, such as simulating the effects of perturbations or identifying the specific connectivity patterns ($W$) that drive these transients.

Results and Future Directions

Research across synthetic benchmarks (like the Lorenz system) and real-world data (rodent PFC, human EEG/fMRI) demonstrates that RNNs can faithfully reconstruct complex attractors. In the rodent prefrontal cortex, for instance, DSR revealed that neural activity often moves toward chaotic attractors, with task-relevant information encoded in the initial transient phases.

Despite these successes, challenges remain:

  1. Noise Separation: Distinguishing intrinsic biological noise from measurement noise.
  2. Partial Observability: Determining if we have recorded enough "degrees of freedom" to capture the full system.
  3. Non-stationarity: Adapting models to a brain that is constantly learning and changing its parameters.

As recording technologies scale to tens of thousands of neurons, DSR offers a promising path toward a truly mechanistic understanding of the brain's "computational engine."

Summary updated

BibTeX
@misc{durstewitz2022reconstructing,
  author = {Daniel Durstewitz and Georgia Koppe and Max Ingo Thurm},
  title = {{Reconstructing Computational Dynamics from Neural Measurements with Recurrent Neural Networks}},
  year = {2022},
  doi = {10.1101/2022.10.31.514408},
  howpublished = {bioRxiv},
}
Figure