[Paper Review] Fitting summary statistics of neural data with a differentiable spiking network simulator
This paper proposes a differentiable spiking network simulator that fits neural data by minimizing a loss combining maximum likelihood with sample-and-measure losses based on neuroscience-relevant summary statistics like PSTH and noise correlations. The method enables efficient back-propagation through stochastic spike trains, allowing accurate inference of network connectivity even with hidden neurons, significantly improving realism and reconstruction accuracy over standard likelihood-based methods.
Fitting network models to neural activity is an important tool in neuroscience. A popular approach is to model a brain area with a probabilistic recurrent spiking network whose parameters maximize the likelihood of the recorded activity. Although this is widely used, we show that the resulting model does not produce realistic neural activity. To correct for this, we suggest to augment the log-likelihood with terms that measure the dissimilarity between simulated and recorded activity. This dissimilarity is defined via summary statistics commonly used in neuroscience and the optimization is efficient because it relies on back-propagation through the stochastically simulated spike trains. We analyze this method theoretically and show empirically that it generates more realistic activity statistics. We find that it improves upon other fitting algorithms for spiking network models like GLMs (Generalized Linear Models) which do not usually rely on back-propagation. This new fitting algorithm also enables the consideration of hidden neurons which is otherwise notoriously hard, and we show that it can be crucial when trying to infer the network connectivity from spike recordings.
Motivation & Objective
- To address the limitation of maximum likelihood estimation (MLE) in fitting recurrent spiking neural networks (RSNNs), which often produces unrealistic activity despite theoretical consistency.
- To develop a scalable, differentiable framework that enables back-propagation through stochastic spike trains, overcoming prior technical barriers in training RSNNs with hidden units.
- To improve model realism and connectivity inference by incorporating neuroscience-relevant summary statistics—such as peristimulus time histograms (PSTH) and noise correlations (NC)—into the loss function.
- To demonstrate that modeling hidden neurons is crucial for accurate network connectivity reconstruction, especially when only a subset of neurons are recorded.
- To enable large-scale network fitting by combining data from multiple recording sessions, treating some neurons as visible and others as hidden.
Proposed method
- The method uses a differentiable implementation of a stochastic recurrent spiking neural network (RSNN) based on the Spike Response Model (SRM), where spike probabilities are computed via a sigmoid function of membrane potential.
- Spike trains are generated stochastically via Bernoulli sampling, and gradients are back-propagated through these discrete samples using a straight-through gradient estimator.
- The loss function combines standard log-likelihood with sample-and-measure losses that compare simulated and recorded summary statistics, such as PSTH and noise correlations.
- Summary statistics are computed from simulated and recorded spike trains, and their dissimilarity is minimized via gradient descent using automatic differentiation.
- The framework supports hidden neurons by incorporating sample-and-measure losses on their activity (e.g., firing rate), which are otherwise unconstrained in likelihood-based fitting.
- The method is implemented in PyTorch and open-sourced, enabling efficient training on GPU with full differentiability through stochastic spiking dynamics.
Experimental results
Research questions
- RQ1Can a differentiable spiking network simulator improve the realism of simulated neural activity compared to maximum likelihood estimation alone?
- RQ2Does incorporating summary statistics like PSTH and noise correlations into the loss function lead to more accurate network connectivity inference?
- RQ3Can hidden neurons be effectively modeled in a differentiable framework to improve reconstruction of true network connectivity?
- RQ4Is the sample-and-measure approach scalable to large networks combining data from multiple recording sessions?
- RQ5Does the inclusion of hidden neurons significantly reduce the error in estimating connectivity matrices when only a subset of neurons are recorded?
Key findings
- The sample-and-measure method significantly improves the realism of simulated neural activity compared to maximum likelihood estimation, especially when hidden neurons influence recorded activity.
- With hidden neurons included, the method achieves a noise-correlation matrix R² of 0.97 and a connectivity matrix R² of 0.63, approaching the performance of fully visible networks (R² = 0.97 and 0.63 respectively).
- In the absence of hidden neurons, the method fails to reconstruct the true connectivity, with R² values below 0.1 for both noise correlations and connectivity, indicating that hidden neurons are crucial for accurate inference.
- Even a small hidden population of 10 neurons substantially improves reconstruction accuracy, with R² for connectivity increasing from 0.1 to 0.55 when hidden neurons are modeled.
- The method scales efficiently: training a 4,995-neuron model across 20 sessions took only 36 hours on a single V100 GPU, demonstrating feasibility for large-scale neural network fitting.
- The approach outperforms GLM-based methods that do not use back-propagation and avoids the high-variance gradients of reinforcement learning-style methods, offering a stable and efficient alternative.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.