Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2018 Dec;12(4):2457-2482.
doi: 10.1214/18-AOAS1162. Epub 2018 Nov 13.

EXACT SPIKE TRAIN INFERENCE VIA ℓ0 OPTIMIZATION

Affiliations

EXACT SPIKE TRAIN INFERENCE VIA ℓ0 OPTIMIZATION

Sean Jewell et al. Ann Appl Stat. 2018 Dec.

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.

PubMed Disclaimer

Figures

Fig. 6.
Fig. 6.
Spike detection for cell 2002 of the Chen et al. (2013) data. In each panel, the observed fluorescence (formula image) and true spikes (formula image) are displayed. Estimated spikes from problem (13) are shown in (formula image), and the estimated spikes from the0 problem (5) with λ = 0.6 are shown in (formula image). 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.
Fig. 1.
Fig. 1.
A toy simulated data example. In each panel the x-axis represents time. Observed fluorescence values are displayed in (formula image). (a): Unobserved calcium concentrations (formula image) and true spike times (formula image). Data were generated according to the model (1). (b): Estimated calcium concentrations (formula image) and spike times (formula image) that result from solving the1 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 (formula image) and spike times (formula image) that result from solving the1 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 the1 optimization problem in panels (b) and (c) is a consequence of the fact that the1 penalty performs shrinkage as well as spike estimation; this is discussed further in Section 1.2. (d): Estimated calcium concentrations (formula image) and spike times (formula image) that result from solving the0 optimization problem (5). (e): The four spikes in panel (c) associated with the largest estimated increase in calcium (formula image); we refer to this in the text as the post-thresholding1 estimator. Since the estimated calcium is not well defined after post-thresholding, we do not plot the estimated calcium concentration.
Fig. 2.
Fig. 2.
Timing results for solving (5) for the global optimum, using Algorithms 1 (formula image) and 2 (formula image). 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.
Fig. 3.
Fig. 3.
Simulation study to assess the error in spike detection and calcium estimation, for the1 (3), post-thresholded1 (9) and0 (4) problems. (a): Error in spike detection measured using van Rossum distance. (b): Error in spike detection, measured using Victor-Purpura distance. (c): Error in calcium estimation (10). Simulation details are provided in Section 3.
Fig. 4.
Fig. 4.
Spike detection for cell 2002 of the Chen et al. (2013) data. The observed fluorescence (formula image) and true spikes (formula image) are displayed. Estimated spike times from the0 problem (4) are shown in (formula image), estimated spike times from the1 problem (3) are shown in (formula image), and estimated spike times from the post-thresholding estimator (9) are shown in (formula image). 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.
Fig. 5.
Fig. 5.
The first 10,000 timesteps from the second ROI in NWB 510221121 from the Allen Brain Observatory. Each panel displays the DF/F-transformed fluorescence (formula image), the estimated spikes from the0 problem (formula image) (5), the estimated spikes from the1 problem (formula image) (3), and the estimated spikes from post-thresholding the1 problem (formula image) (9). The panels display results from applying the1 and0 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 the1 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

Cited by

References

    1. 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
    1. Allen Institute for Brain Science (2016). Stimulus set and response analysis. Technical report, Allen Institute, Seattle, WA.
    1. Aue A and Horváth L (2013). Structural breaks in time series. J. Time Series Anal 34 1–16. MR3008012
    1. Auger IE and Lawrence CE (1989). Algorithms for the optimal identification of segment neighborhoods. Bull. Math. Biol 51 39–54. MR0978902 - PubMed
    1. Bien J and Witten D (2016). Penalized estimation in complex models In Handbook of Big Data. 285–303. CRC Press, Boca Raton, FL: MR3674823

LinkOut - more resources