EXACT SPIKE TRAIN INFERENCE VIA ℓ0 OPTIMIZATION
- PMID: 30627301
- PMCID: PMC6322847
- DOI: 10.1214/18-AOAS1162
EXACT SPIKE TRAIN INFERENCE VIA ℓ0 OPTIMIZATION
Abstract
In recent years new technologies in neuroscience have made it possible to measure the activities of large numbers of neurons simultaneously in behaving animals. For each neuron a fluorescence trace is measured; this can be seen as a first-order approximation of the neuron's activity over time. Determining the exact time at which a neuron spikes on the basis of its fluorescence trace is an important open problem in the field of computational neuroscience. Recently, a convex optimization problem involving an ℓ1 penalty was proposed for this task. In this paper we slightly modify that recent proposal by replacing the ℓ1 penalty with an ℓ0 penalty. In stark contrast to the conventional wisdom that ℓ0 optimization problems are computationally intractable, we show that the resulting optimization problem can be efficiently solved for the global optimum using an extremely simple and efficient dynamic programming algorithm. Our R-language implementation of the proposed algorithm runs in a few minutes on fluorescence traces of 100,000 timesteps. Furthermore, our proposal leads to substantial improvements over the previous ℓ1 proposal, in simulations as well as on two calcium imaging datasets. R-language software for our proposal is available on CRAN in the package LZeroSpikeInference. Instructions for running this software in python can be found at https://github.com/jewellsean/LZeroSpikeInference.
Keywords: Neuroscience; calcium imaging; changepoint detection; dynamic programming.
Figures
) and true spikes (
) are displayed. Estimated spikes from problem (13) are shown in (
), and the estimated spikes from the ℓ0
problem (5) with λ = 0.6 are shown in (
). Times 0 s–35 s are shown in the top row; the second row zooms in on times 5 s–10 s to illustrate behavior around a large increase in calcium concentration. Columns correspond to different values of smin.
). (a): Unobserved calcium concentrations (
) and true spike times (
). Data were generated according to the model (1). (b): Estimated calcium concentrations (
) and spike times (
) that result from solving the ℓ1
optimization problem (3) with the value of λ that yields the true number of spikes. This value of λ leads to very poor estimation of both the underlying calcium dynamics and the spikes. (c): Estimated calcium concentrations (
) and spike times (
) that result from solving the ℓ1
optimization problem (3) with the largest value of λ that results in at least one estimated spike within the vicinity of each true spike. This value of λ results in 19 estimated spikes, which is far more than the true number of spikes. The poor performance of the ℓ1
optimization problem in panels (b) and (c) is a consequence of the fact that the ℓ1
penalty performs shrinkage as well as spike estimation; this is discussed further in
Section 1.2. (d): Estimated calcium concentrations (
) and spike times (
) that result from solving the ℓ0
optimization problem (5). (e): The four spikes in panel (c) associated with the largest estimated increase in calcium (
); we refer to this in the text as the post-thresholding ℓ1
estimator. Since the estimated calcium is not well defined after post-thresholding, we do not plot the estimated calcium concentration.
) and 2 (
). The x-axis displays the length of the time series (T), and the y-axis displays the average running time in seconds. Each panel, from left to right, corresponds to data simulated according to (1) with st ~i.i.d. Poisson(θ), with θ ∈ {0.001, 0.01, 0.1}. Standard errors are on average < 0.1% of the mean compute time. Additional details are provided in
Section 2.4.
) and true spikes (
) are displayed. Estimated spike times from the ℓ0
problem (4) are shown in (
), estimated spike times from the ℓ1
problem (3) are shown in (
), and estimated spike times from the post-thresholding estimator (9) are shown in (
). Times 0s–35s are shown in the top row; the second row zooms into time 30s–40s in order to illustrate the behavior around a large increase in calcium concentration.
), the estimated spikes from the ℓ0
problem (
) (5), the estimated spikes from the ℓ1
problem (
) (3), and the estimated spikes from post-thresholding the ℓ1
problem (
) (9). The panels display results from applying the ℓ1
and ℓ0
methods with tuning parameter λ chosen to yield (a): 27 spikes for each method; (b): 49 spikes for each method; and (c): 128 spikes for each method. The post-thresholding estimator was obtained by applying the ℓ1
method with λ = 1, and thresholding the result to obtain 27, 49 or 128 spikes. (d)–(f): As in (a)–(c), but zoomed in on 200–250 seconds.Similar articles
-
Fast nonconvex deconvolution of calcium imaging data.Biostatistics. 2020 Oct 1;21(4):709-726. doi: 10.1093/biostatistics/kxy083. Biostatistics. 2020. PMID: 30753436 Free PMC article.
-
Efficient ℓ0 -norm feature selection based on augmented and penalized minimization.Stat Med. 2018 Feb 10;37(3):473-486. doi: 10.1002/sim.7526. Epub 2017 Oct 30. Stat Med. 2018. PMID: 29082539 Free PMC article.
-
Sparse generalized linear model with L0 approximation for feature selection and prediction with big omics data.BioData Min. 2017 Dec 19;10:39. doi: 10.1186/s13040-017-0159-z. eCollection 2017. BioData Min. 2017. PMID: 29270229 Free PMC article.
-
Testing for a Change in Mean After Changepoint Detection.J R Stat Soc Series B Stat Methodol. 2022 Sep;84(4):1082-1104. doi: 10.1111/rssb.12501. Epub 2022 Apr 12. J R Stat Soc Series B Stat Methodol. 2022. PMID: 36419504 Free PMC article.
-
Quantifying uncertainty in spikes estimated from calcium imaging data.Biostatistics. 2023 Apr 14;24(2):481-501. doi: 10.1093/biostatistics/kxab034. Biostatistics. 2023. PMID: 34654923 Free PMC article.
Cited by
-
Sexual discrimination and attraction through scents in the water vole, Arvicola terrestris.J Comp Physiol A Neuroethol Sens Neural Behav Physiol. 2024 May;210(3):431-441. doi: 10.1007/s00359-023-01671-5. Epub 2023 Sep 10. J Comp Physiol A Neuroethol Sens Neural Behav Physiol. 2024. PMID: 37690081
-
Measuring Stimulus-Evoked Neurophysiological Differentiation in Distinct Populations of Neurons in Mouse Visual Cortex.eNeuro. 2022 Feb 9;9(1):ENEURO.0280-21.2021. doi: 10.1523/ENEURO.0280-21.2021. Print 2022 Jan-Feb. eNeuro. 2022. PMID: 35022186 Free PMC article.
-
Unsupervised learning of control signals and their encodings in Caenorhabditis elegans whole-brain recordings.J R Soc Interface. 2020 Dec;17(173):20200459. doi: 10.1098/rsif.2020.0459. Epub 2020 Dec 9. J R Soc Interface. 2020. PMID: 33292096 Free PMC article.
-
Minian, an open-source miniscope analysis pipeline.Elife. 2022 Jun 1;11:e70661. doi: 10.7554/eLife.70661. Elife. 2022. PMID: 35642786 Free PMC article.
-
Inferring spikes from calcium imaging in dopamine neurons.PLoS One. 2021 Jun 4;16(6):e0252345. doi: 10.1371/journal.pone.0252345. eCollection 2021. PLoS One. 2021. PMID: 34086726 Free PMC article.
References
-
- Ahrens MB, Orger MB, Robson DN, Li JM and Keller PJ (2013). Wholebrain functional imaging at cellular resolution using light-sheet microscopy. Nat. Methods 10 413–420. - PubMed
-
- Allen Institute for Brain Science (2016). Stimulus set and response analysis. Technical report, Allen Institute, Seattle, WA.
-
- Aue A and Horváth L (2013). Structural breaks in time series. J. Time Series Anal 34 1–16. MR3008012
-
- Auger IE and Lawrence CE (1989). Algorithms for the optimal identification of segment neighborhoods. Bull. Math. Biol 51 39–54. MR0978902 - PubMed
-
- Bien J and Witten D (2016). Penalized estimation in complex models In Handbook of Big Data. 285–303. CRC Press, Boca Raton, FL: MR3674823
Grants and funding
LinkOut - more resources
Full Text Sources