Cascade
Calibrated inference of spiking from calcium ΔF/F data using deep networks
Install / Use
/learn @HelmchenLabSoftware/CascadeREADME
Cascade: Calibrated spike inference from calcium imaging data
<!------> <p align="center"><img src="https://github.com/HelmchenLabSoftware/Calibrated-inference-of-spiking/blob/master/etc/CA1_deconvolution_CASCADE.gif " width="85%"></p>Cascade translates calcium imaging ΔF/F traces into spiking probabilities or discrete spikes.
Cascade is described in detail in the main paper. There are follow-up papers which describe the application of Cascade to spinal cord data and the application of Cascade to GCaMP8.
Cascade's toolbox consists of
- A large and continuously updated ground truth database spanning brain regions, calcium indicators, species
- A deep network that is trained to predict spike rates from calcium data
- Procedures to resample the training ground truth such that noise levels and frame rates of calcium recordings are matched
- A large set of pre-trained deep networks for various conditions (additional models upon request)
- Tools to quantify the out-of-dataset generalization for a given model and noise level
- A tool to transform inferred spike rates into discrete spikes
Get started quickly with the following two Colaboratory Notebooks:
Spike inference from calcium data
Upload your calcium data, use Cascade to process the data, download the inferred spike rates.
Spike inference with Cascade improves the temporal resolution, denoises the recording and provides an absolute spike rate estimate.
No parameter tuning, no installation required.
You will get started within few minutes.
Spike inference from calcium data
<p align="center"> <a href="https://colab.research.google.com/github/HelmchenLabSoftware/Cascade/blob/master/Demo%20scripts/Calibrated_spike_inference_with_Cascade.ipynb" rel="Spike inference from calcium data, showing activations of intermediate network layers"><img src="https://github.com/HelmchenLabSoftware/Calibrated-inference-of-spiking/blob/master/etc/Network_activations_output.gif " width="85%"></a> </p>Updates to ground truth datasets and pretrained models:
2026-02-11 - There is now a fully working version of Cascade using Torch instead of Tensorflow: CascadeTorch. Torch-based CASCADE uses the same models trained for CASCADE (the pretrained models and weights were converted to Torch models), and inference results and output format are therefore identical between Cascade and CascadeTorch. Early feedback is highly welcome!
2025-11-15 - There are now plans to switch Cascade from Tensorflow as deep learning framework to PyTorch or JAX. If you are interested in participating in this transition, please reach out. Note: The current version of Cascade will be supported continuously, irrespective of this new development.
2025-06-03 - Spike times for dataset #21 were found to be misaligned (see issue #76). The corrected ground truth data for the two affected neurons was uploaded and replaced the previous data.
2025-05-01 - Our study of spike inference for calcium imaging data from spinal cord is now published in the Journal of Neuroscience. Check out the openly accessible manuscript, which also includes the reviewer reports and rebuttal letters. Cascade models pretrained on spinal cord ground truth are already available, and the ground truth with both excitatory and inhibitory spinal cord neurons is already part of this repository's ground truth database (datasets #40 and #41).
2025-04-25 - New blog post about the standardized noise level $\nu$ that can be used to compare shot noise levels across calcium imaging recordings. The blog post investigas the effect of true noise levels, imaging rates and true neuronal spike rates on the measured noise metric.
2025-04-10 - First models for spike inference with interneurons, primarily based on GCaMP8 data, are now available. The models are described in our recent preprint in Figure 6. Please check out this FAQ section for more details about these models and their potential limitations.
2025-03-24 - Models for online spike inference are now uploaded and available. The models are characterized in Figure 5 in our preprint, and the model selection is described in more practical terms in this blog post. If you are into online spike inference, definitely check it out!
2025-03-21 - New blog post on the detection of isolated single spikes with CASCADE for GCaMP8 vs. other indicators such as GCaMP6, GCaMP7 and X-CaMP-Gf.
2025-03-14 - New blog post on the non-linearity of calcium indicators (GCaMP6 vs. GCaMP8) and how this feature affects spike inference.
2025-03-10 - New preprint on spike inference with GCaMP8. The paper studies spike inference with specifically GCaMP8-trained models, for the algorithms Cascade, MLSpike and OASIS. The analyses also provide insights into the consequences of the non-linearity of GCaMP8 and GCaMP6 variants, and the potential for single-action potential-detection with GCaMP8 vs. other indicators.
2025-01-02 - Updated spinal cord ground truth data. The ground truth data for spinal cord (describedy in this preprint) are now updated and also contain the field stim, which indicates timepoints of electrical dorsal root stimulation.
2024-08-22 - New models pretrained with GCaMP8 ground truth are now available for Cascade. They are briefly described in this blog post with a coarse comparison of the model with previous Cascade models. A more detailed analysis of these models and their application to GCaMP8 data will follow in a few months!
2024-07-23 - A new preprint about Cascade, where it is applied to calcium imaging data from spinal cord. Cascade models pretrained on spinal cord ground truth are already available, and the ground truth with both excitatory and inhibitory spinal cord neurons is already part of this repository's ground truth database (datasets #40 and #41).
2024-06-26 - Peter Rupprecht presents a poster at the FENS conference in Vienna about ongoing work on spike inference with GCaMP8, and about spike inference in spinal cord in mice.
2024-06-02 - Models and ground truth datasets for GCaMP6s in spinal cord in mice (excitatory/inhibitory transgenic) are added (datasets #40 and #41), trained for imaging rates of 2.5, 3 and 30 Hz. Additional models for spinal cord datasets are trained upon request. A preprint on the datasets and models will be released within the next months.
2024-02-08 - Models and ground truth datasets for GCaMP7f and GCaMP8f/m/s will be added in a few months. See issue #43 for a preliminary discussion on GCaMP7f.
2021-12-01 - Spike times for dataset #1 were found to be misaligned (see issue #28). The corrected dataset was uploaded and replaced the previous dataset #1.
2021-12-01 - Some neurons in dataset #15 exhibited a systematic delay with calcium signals with respect to spike times. This delay was corrected based on inspection of spike-triggered averages. Dataset #15 was replaced with the corrected dataset.
2021-12-11 - Neuron #8 in dataset #20 was removed since calcium signals were found to be unrelated to simultaneously recorded spike patterns. Most likely, calcium imaging and electrophysiology were performed from two different neurons.
Exploration of the ground truth database
Explore the 35 ground truth data sets a
