Supervised learning sets benchmark for robust spike rate inference from calcium imaging signals

Lucas Theis, Philipp Berens, Emmanouil Froudarakis, Jacob Reimer, Miroslav Román Rosón, Tom Baden, Thomas Euler, Andreas S. Tolias, Matthias BethgebioRxiv 2014

Abstract

A fundamental challenge in calcium imaging has been to infer spike rates of neurons from the measured noisy calcium fluorescence traces. We systematically evaluate a range of spike inference algorithms on a large benchmark dataset (>100.000 spikes) recorded from varying neural tissue (V1 and retina) using different calcium indicators (OGB-1 and GCaMP6). We introduce a new algorithm based on supervised learning in flexible probabilistic models and show that it outperforms all previously published techniques. Importantly, it even performs better than other algorithms when applied to entirely new datasets for which no simultaneously recorded data is available. Future data acquired in new experimental conditions can easily be used to further improve its spike prediction accuracy and generalization performance. Finally, we show that comparing algorithms on artificial data is not informative about performance on real data, suggesting that benchmark datasets such as the one we provide may greatly facilitate future algorithmic developments.

Introduction

Calcium imaging has become a cornerstone of modern neuroscience, enabling researchers to monitor the activity of large populations of neurons simultaneously. By measuring changes in fluorescence as calcium ions enter a cell during action potentials, scientists can "see" neural activity. However, the raw fluorescence signal is a noisy, low-pass filtered representation of the underlying electrical activity. Individual spikes trigger a rapid rise in fluorescence followed by a slow exponential decay, making the reconstruction of the original spike train—the "holy grail" of calcium imaging analysis—a significant computational challenge.

Historically, this problem has been approached using generative or "forward" models. These methods rely on rigid physical assumptions about the shape of a single spike's calcium transient. While theoretically sound, these models often struggle with the variability of real-world experimental conditions, such as different calcium indicators (e.g., OGB-1 vs. GCaMP6) or the physiological differences between anesthetized and awake animals.

The Factored Spike-Triggered Mixture (STM) Model

To address these limitations, this research introduces the Factored Spike-Triggered Mixture (STM) model. Shifting away from the traditional inversion of physical models, the STM utilizes a supervised learning framework.

The model assumes that spike counts within a specific time bin follow a Poisson distribution. The firing rate is then modeled as a non-linear function of the fluorescence trace, utilizing a combination of linear and quadratic features. By training on "ground truth" data—simultaneous recordings of calcium fluorescence and electrical spikes obtained via loose-patch recordings—the STM learns the complex relationship between the two signals directly from the data. This flexibility allows the model to capture nuances that rigid physical models miss, while remaining sufficiently constrained to avoid overfitting to noise, even when training sets are relatively small.

Experimental Framework and Datasets

The performance of the STM model was evaluated against a massive and diverse benchmark dataset, totaling over 100,000 spikes across 90 traces from 73 neurons. The diversity of the data was critical for testing the robustness of the algorithm:

  • Dataset 1: Primary Visual Cortex (V1) in anesthetized mice using OGB-1 (high sampling rate, ~320 Hz).
  • Dataset 2: V1 in anesthetized mice using OGB-1 (standard sampling rate, ~12 Hz).
  • Dataset 3: V1 in anesthetized mice using GCaMP6s (~59 Hz).
  • Dataset 4: Retinal ganglion cells recorded ex-vivo using OGB-1 (~8 Hz).
  • Validation Data: Additional datasets included recordings from awake mice (GCaMP6s) and publicly available data using GCaMP5 and GCaMP6.

Key Results and Insights

Superior Performance and Generalization

The STM model set a new performance standard, achieving a median improvement in correlation of 32–33% over the leading competitors (such as SI08 and PP14). Beyond simple correlation, the model explained significantly more information (entropy) about the spike trains across all primary datasets.

Crucially, the model demonstrated remarkable generalization. An STM model trained on OGB-1 data still outperformed other methods when tested on GCaMP6 data, despite the vastly different dynamics of these indicators. Furthermore, the model's performance saturated with as few as 5 to 10 training cells, suggesting that researchers only need a small amount of simultaneous recording data to effectively adapt the model to new experimental setups.

The "Synthetic Data Trap"

One of the most significant findings of this study is that performance on simulated data is a poor predictor of performance on real biological data. Algorithms that appeared nearly perfect when tested on "clean" artificial data often failed when confronted with the complexities of real neural tissue. This highlights the vital importance of using large, real-world benchmark datasets for algorithmic development in neuroscience.

Temporal Robustness and Efficiency

The STM model maintained its performance lead across a wide range of sampling rates, from 2 Hz to 100 Hz, proving particularly robust at high temporal resolutions. Additionally, once the model is trained, it is computationally efficient, making it suitable for the high-throughput processing required by modern high-speed imaging techniques.

Discussion and Future Work

While the STM model represents a significant leap forward, the study also identified a "correlation ceiling." Even with optimized algorithms, the correlation between inferred and actual spikes typically peaked between 0.4 and 0.6. This suggests fundamental limits in current imaging technology, likely due to factors like neuropil contamination (background noise from surrounding tissue).

It is important to note that this work focuses specifically on spike inference, assuming that Regions of Interest (ROIs) for individual neurons have already been identified. Future research may focus on the joint optimization of ROI identification and spike inference. To support the community, the authors have released their code and pre-trained models, providing a new benchmark for the field of computational neuroscience.

Summary updated

BibTeX
@misc{theis2014supervised,
  author = {Lucas Theis and Philipp Berens and Emmanouil Froudarakis and Jacob Reimer and Miroslav Román Rosón and Tom Baden and Thomas Euler and Andreas S. Tolias and Matthias Bethge},
  title = {{Supervised learning sets benchmark for robust spike rate inference from calcium imaging signals}},
  year = {2014},
  doi = {10.1101/010777},
  howpublished = {bioRxiv},
}
Figure