Flexible statistical inference for mechanistic models of neural dynamics

Jan-Matthis Lueckmann, Pedro J. Gonçalves, Giacomo Bassetto, Kaan Öcal, Marcel Nonnenmacher, Jakob H. Macke

Mechanistic models, such as the classic Hodgkin-Huxley model, are foundational to computational neuroscience. By describing how neurons fire based on biophysical properties like ion channel conductances, these models offer deep biological interpretability. However, they present a massive computational hurdle: they are notoriously difficult to "fit" to real experimental data.

To bridge this gap, researchers have introduced Sequential Neural Posterior Estimation (SNPE), a powerful machine learning framework designed to perform Bayesian inference on complex, "likelihood-free" mechanistic models. By training a neural network to map observed data directly to a posterior distribution over parameters, SNPE allows neuroscientists to identify the full range of biological parameters consistent with experimental data.

The Challenge of "Likelihood-Free" Simulators

The core issue with mechanistic models is that they are typically defined as simulators. Researchers can run them forward to generate simulated data, but they cannot easily write down a mathematical expression for the likelihood—the exact probability of observing specific data given a set of parameters.

Because traditional statistical tools break down without a likelihood function, researchers often resort to heuristic "best-fit" searches, such as genetic algorithms. While these methods might find a single set of parameters that produces matching data, they fail to map the "uncertainty landscape." In biological systems, many different combinations of parameters might explain the exact same data equally well—a phenomenon known as degeneracy. Finding just one point estimate misses the broader, more complex biological reality.

Overview of Sequential Neural Posterior Estimation (SNPE)

The SNPE Approach

SNPE builds upon Approximate Bayesian Computation (ABC) and conditional density estimation to solve this problem. Instead of relying on simple distance metrics to compare simulations to real data, SNPE employs several key technical innovations:

  • Neural Posterior Estimation via MDNs: The framework trains a Mixture Density Network (MDN). This network takes features of the observed data as input and outputs the parameters of a probability distribution (specifically, a mixture of Gaussians) that represents the posterior parameter space.
  • Sequential Refinement: Inference occurs in rounds. In each round, the algorithm uses its current best estimate of the posterior to "propose" new simulations. This focuses the computationally expensive simulator on the most relevant and promising parts of the parameter space.
  • Importance-Weighted Loss: Previous methods often required a mathematically unstable "post-hoc division" step to correct for the proposal distribution. SNPE bypasses this by utilizing an importance-weighted loss function to learn the posterior directly and stably.
  • Handling "Bad" Simulations: Mechanistic models frequently crash or produce non-biological results (e.g., firing rates exploding to infinity) during exploration. SNPE trains a classifier to predict which parameters lead to these failures, allowing the algorithm to avoid them and refine its prior accordingly.
  • Automatic Feature Learning: Rather than relying on hand-designed summary statistics (like "mean firing rate"), SNPE can integrate a Recurrent Neural Network (RNN) at the front of the MDN to automatically extract relevant features directly from raw voltage time-series data.

Key Insights and Results

The authors evaluated SNPE across several benchmarks, ranging from toy statistical models and Generalised Linear Models (GLMs) to the 12-parameter Hodgkin-Huxley model and real in-vitro recordings from the Allen Cell Type Database.

Revealing Biological Degeneracy: SNPE successfully moves beyond "best fit" point estimates. By revealing the covariances between different parameters, it highlights the degeneracy inherent in neural dynamics, showing how different biophysical mechanisms can compensate for one another to produce identical firing patterns.

Robustness and Efficiency: SNPE remained stable in scenarios where previous state-of-the-art methods (like CDE-LFI) became numerically unstable or biased. On the complex Hodgkin-Huxley model, SNPE recovered ground-truth parameters with an accuracy comparable to specialized genetic algorithms (like IBEA), but with the massive added benefit of providing a full multivariate posterior distribution.

Real-World Application: When applied to real membrane voltage data from a mouse visual cortex neuron, SNPE successfully identified biophysical parameters that produced voltage traces closely matching the empirical recordings. Furthermore, the framework proved capable of handling missing features as informative data; for instance, if a neuron fails to spike, the absence of a spike latency feature is treated as a powerful diagnostic signal.

Future Directions

While highly effective for single-neuron models, scaling SNPE to large, interconnected networks of neurons remains a challenge. Future work may focus on more sophisticated "active learning" strategies for proposal design—choosing to run simulations specifically where the model is most uncertain—and developing new architectures to handle extremely high-dimensional or long time-series data without bottlenecks. Nonetheless, SNPE represents a major step forward in making complex biophysical models statistically tractable.

Summary updated

BibTeX
@inproceedings{lueckmann2017flexible,
  author = {Jan-Matthis Lueckmann and Pedro J. Gonçalves and Giacomo Bassetto and Kaan Öcal and Marcel Nonnenmacher and Jakob H. Macke},
  title = {{Flexible statistical inference for mechanistic models of neural dynamics}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
}
Figure