Inferring Computational Structure from Neural Recordings with Gain-Modulated Linear Dynamical Systems
Abstract
Latent dynamical models can accurately fit neural population activity, yet accurate activity fitting alone does not guarantee mechanistic validity. Using synthetic benchmarks, we show that even well-fitted low-rank RNNs can yield misleading circuit interpretations when the prescribed activation function deviates from the ground-truth one. To address this limitation, we introduce gain-modulated linear dynamical systems (gmLDS), which decompose latent dynamics into a state-dependent, unit-wise gain and a static low-rank connectivity matrix, allowing the model to adapt to diverse nonlinear responses without assuming a fixed activation function. Across multiple synthetic benchmarks, gmLDS accurately recovers the local effective connectivity of the underlying model, thereby reconstructing the linearized dynamics along neural trajectories. Applied to neural recordings from perceptual and context-dependent decision-making tasks, gmLDS yields interpretable hypotheses about dynamical structure, including attractor structure in perceptual decision-making and context-dependent selection mechanisms. Together, these results support gmLDS as an effective approach for inferring computational structure from neural recordings.