Skip to main content
QUICK REVIEW

[Paper Review] Fast amortized inference of neural activity from calcium imaging data with variational autoencoders

Artur Speiser, Jinyao Yan|arXiv (Cornell University)|Nov 6, 2017
Neural dynamics and brain functionNeuroscience25 references23 citations
TL;DR

This paper introduces DeepSpike, a variational autoencoder-based framework that enables fast, amortized inference of neural spike trains from calcium imaging data by training a recognition network to approximate the posterior distribution over spikes. The method achieves state-of-the-art speed—performing inference in a single forward pass—while maintaining high accuracy and enabling full posterior estimation, including for complex tasks like separating backpropagating action potentials from synaptic inputs in dendritic imaging.

ABSTRACT

Calcium imaging permits optical measurement of neural activity. Since intracellular calcium concentration is an indirect measurement of neural activity, computational tools are necessary to infer the true underlying spiking activity from fluorescence measurements. Bayesian model inversion can be used to solve this problem, but typically requires either computationally expensive MCMC sampling, or faster but approximate maximum-a-posteriori optimization. Here, we introduce a flexible algorithmic framework for fast, efficient and accurate extraction of neural spikes from imaging data. Using the framework of variational autoencoders, we propose to amortize inference by training a deep neural network to perform model inversion efficiently. The recognition network is trained to produce samples from the posterior distribution over spike trains. Once trained, performing inference amounts to a fast single forward pass through the network, without the need for iterative optimization or sampling. We show that amortization can be applied flexibly to a wide range of nonlinear generative models and significantly improves upon the state of the art in computation time, while achieving competitive accuracy. Our framework is also able to represent posterior distributions over spike-trains. We demonstrate the generality of our method by proposing the first probabilistic approach for separating backpropagating action potentials from putative synaptic inputs in calcium imaging of dendritic spines.

Motivation & Objective

  • To develop a fast, scalable, and flexible method for inferring neural spike trains from calcium imaging data without relying on expensive iterative inference.
  • To combine the strengths of generative modeling (prior knowledge, unsupervised learning) with discriminative inference (speed, efficiency) via amortized variational inference.
  • To enable accurate posterior estimation over spike trains, including temporal correlations, rather than just pointwise firing rates.
  • To extend the framework to complex inference tasks, such as separating global action potentials from local synaptic inputs in dendritic calcium imaging.
  • To create a general-purpose inference framework applicable to diverse generative models of calcium dynamics without requiring model-specific algorithm modifications.

Proposed method

  • The framework uses a variational autoencoder (VAE) with a stochastic recognition network that approximates the posterior distribution over spike trains given fluorescence traces.
  • The recognition network is a deep, multi-stream architecture combining a 1D convolutional neural network (CNN) for feature extraction and two recurrent neural networks (RNNs): one forward and one backward in time to capture long-range temporal context.
  • The model is trained end-to-end using stochastic variational inference (SVI), where the recognition network learns to map fluorescence data to approximate posterior samples of spike trains.
  • Inference at test time is amortized: once trained, spike inference requires only a single forward pass through the recognition network, eliminating iterative optimization or MCMC sampling.
  • The framework supports full posterior approximation, including modeling of temporal correlations in spike probabilities, and can be extended to multi-modal or multi-component inference tasks.
  • The method is applied to both simulated and real calcium imaging data, including dendritic spine recordings, to separate backpropagating action potentials from synaptic inputs.

Experimental results

Research questions

  • RQ1Can amortized inference via a trained recognition network achieve faster and competitive spike inference compared to traditional MCMC or MAP optimization?
  • RQ2Can a single, shared recognition model generalize across heterogeneous neural populations and imaging conditions without retraining?
  • RQ3Can the framework accurately estimate full posterior distributions over spike trains, including temporal dependencies, rather than just marginal firing rates?
  • RQ4Can the method be extended to complex inference problems such as separating global action potentials from local synaptic inputs in dendritic calcium imaging?
  • RQ5Does the approach maintain high accuracy across diverse generative models of calcium dynamics while enabling real-time or closed-loop applications?

Key findings

  • The proposed method achieves state-of-the-art computation speed, performing inference in a single forward pass after training, eliminating the need for iterative optimization or MCMC sampling.
  • On simulated data, the method achieved an average correlation of 0.84 for somatic and 0.78 for dendritic spike inference, outperforming the Foopsi-RR baseline (0.66 and 0.60, respectively).
  • The recognition network successfully models posterior correlations across time, enabling full posterior estimation rather than just pointwise firing rate predictions.
  • The framework enables accurate separation of backpropagating action potentials from synaptic inputs in dendritic imaging, a task previously lacking probabilistic solutions.
  • The method generalizes across different cell types and imaging modalities, as the trained recognition model can be applied to new, similar datasets without retraining.
  • The approach is scalable and suitable for real-time or closed-loop applications due to its fast inference speed and low computational cost at test time.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.