Abstract
The current methods used to convert analogue signals into discrete-time sequences have been deeply influenced by the classical Shannon–Whittaker–Kotelnikov sampling theorem. This approach restricts the class of signals that can be sampled and perfectly reconstructed to bandlimited signals. During the last few years, a new framework has emerged that overcomes these limitations and extends sampling theory to a broader class of signals named signals with finite rate of innovation (FRI). Instead of characterising a signal by its frequency content, FRI theory describes it in terms of the innovation parameters per unit of time. Bandlimited signals are thus a subset of this more general definition. In this paper, we provide an overview of this new framework and present the tools required to apply this theory in neuroscience. Specifically, we show how to monitor and infer the spiking activity of individual neurons from two-photon imaging of calcium signals. In this scenario, the problem is reduced to reconstructing a stream of decaying exponentials.
Keywords: Sampling theory, FRI, Spike train inference, Calcium transient
Introduction
The world is analogue, but computation is digital. The process that bridges this gap is known as the sampling process and has been instrumental to the digital revolution of the past 60 years. Without the sampling process, we could not convert real-life signals in digital form, and without digital samples, we could not use computers for digital computation. The sampling process is also ubiquitous in that it is present in any mobile phone or digital camera but also in sophisticated medical devices like MRI or ultrasound machines, in sensor networks and in digital microscopes just to name a few examples.
Over the last six decades, our understanding of the conversion of continuous-time signal in discrete form has been heavily influenced by the Shannon–Whittaker–Kotelnikov sampling theorem (Shannon 1949; Whittaker 1929; Kotelnikov 1933; Unser 2000) which showed that the sampling and perfect reconstruction of signals are possible when the Fourier bandwidth or spectrum of the signal is finite. In this case, the signal is said to be bandlimited and must be sampled at a rate (Nyquist rate) at least twice its maximum nonzero frequency in order to reconstruct it without error.
We are so used to this approach that we tend to forget that it comes with many strings attached. First of all, there are no natural phenomena that are exactly bandlimited (Slepian 1976). Moreover, we tend to forget that the Shannon sampling theorem provides sufficient but not necessary conditions for perfect reconstruction. In other words, this theorem does not claim that it is not possible to sample and reconstruct non-bandlimited signals. It is therefore incorrect to assume that the bandwidth of a signal is related to its information content. Consider for instance the function shown in Fig. 1a. This is a stream of short pulses and appears in many applications including bio-imaging, seismic signals and spread-spectrum communication. If the pulse shape is known a priori, the signal is completely determined by the amplitude and location of such pulses. If there are at most pulses in a unit interval, then the signal is completely specified by the knowledge of these parameters per unit of time. Assume now that the duration of the pulses is reduced but that the average number of pulses per unit interval stays the same. Clearly, the information content of the signal is not changing (still parameters per unit of time); however, its bandwidth is increasing (bandwidth increases when the support of a function decreases).
Consider, as second example, the signal shown in Fig. 2c. This is given by the sum of a bandlimited signal with a step function. Clearly, the step function has only two degrees of freedom: the discontinuity location and its amplitude. So, its information content is finite. The bandlimited function has a finite number of degrees of freedom per unit of time since it is fully determined by its samples at points spaced by the sampling period (given by the inverse of the Nyquist rate). We thus say that they both have a finite rate of innovation. However, the combination of these two functions leads to a signal with infinite bandwidth (see Fig. 2d). Now, if we were to relate the information content of the signal to its bandwidth, we would conclude incorrectly that this signal has an infinite rate of information since it requires an infinite sampling rate for perfect reconstruction. Therefore, bandwidth and information content are not always synonyms.
A first attempt to reconcile these two notions: sampling rate and information content was made in Vetterli et al. (2002). Here, they introduced a new class of signals called signals with finite rate of innovation (FRI) which includes both bandlimited signals and the non-bandlimited functions discussed so far. They went on showing that classes of FRI signals can be sampled and perfectly reconstructed using an appropriate acquisition device. These results have then be extended to include more classes of acquisition devices (Dragotti et al. 2007; Seelamantula and Unser 2008; Asl et al. 2010; Tur et al. 2011; Urigüen et al. 2013) and more classes of signals (Maravić and Vetterli 2005; Berent et al. 2010; Chen et al. 2012). FRI sampling theory has also had impact in various applications (Baboulaz and Dragotti 2009; Poh and Marziliano 2010; Tur et al. 2011; Kandaswamy et al. 2013) and here we focus on an application in neuroscience.
The paper is organised as follows. In the next section, we define FRI signals and give some examples. Section 3 presents the framework for sampling and reconstructing some classes of FRI signals. Specifically, we show how to sample and perfectly reconstruct a stream of Diracs and what are the conditions that the acquisition device has to satisfy. We also extend this framework to the case of streams of decaying exponentials and present some denoising strategies. Section 4 presents an algorithm to reconstruct streaming signals where there is no clear separation between consecutive bursts of spikes. Section 5 describes an application of this theory to monitor neural activity from two-photon calcium images. Finally, conclusions are drawn in Sect. 6.
Notations
For , where is the Hilbert space of finite-energy functions, the Fourier transform of is denoted by and is given by . If is complex-valued, denotes its complex conjugate. The Hermitian inner product is . The indicator function is denoted by and is given by if , and if . denotes the Kronecker delta, which is defined as if and 0 otherwise. and denote the floor and ceil functions.
Finite rate of innovation signals
Classical sampling theorems state that any bandlimited function such that , can be perfectly recovered from its samples if the sampling rate is greater than or equal to twice the highest frequency component of , that is, . Moreover, the original signal can be perfectly reconstructed as follows:
1 |
where . If is not bandlimited, sampling with an ideal lowpass filter () and reconstruction applying (1) provides a lowpass approximation of . This is the best approximation in the least square sense of in the space spanned by (Unser 2000). However, it is an approximation, and perfect reconstruction of the original signal is not achieved. We also note that signals defined as in (1) are completely specified by the knowledge of a new parameter every seconds.
Based on this observation, consider now a new class of signals that extend the one in (1) (Vetterli et al. 2002):
2 |
where is a set of known functions. We note that, since are known, signals in (2) are uniquely determined by the set of parameters and . Introducing a counting function that counts the number of degrees of freedom in over the interval , we define the rate of innovation as follows (Vetterli et al. 2002; Dragotti et al. 2007; Blu et al. 2008; Urigüen et al. 2013):
3 |
and signals with a finite are called signals with a finite rate of innovation (FRI).
It is of interest to note that bandlimited signals fall under this definition. Therefore, one possible interpretation is that it is possible to sample them because they have a finite rate of innovation (rather than because they are bandlimited). Examples of FRI signals which are not bandlimited and which are of interest to us include
- Stream of pulses: . For instance, stream of decaying exponentials:
which are a good fit for calcium transient signals induced by neural activity in two-photon calcium imaging. Figure 1a, b are examples of such signals.4 - Piecewise sinusoidal signals (see Fig. 1c):
5 - Stream of Diracs (see Fig. 1d):
6
Sampling scheme
Consider the typical acquisition process as shown in Fig. 3. This is usually modelled as a filtering stage followed by a sampling stage. The filter accounts for the modifications that the analogue signal experiences before being sampled. It may model an anti-aliasing filter or it might be due to the distortion introduced by the acquisition device, for example, in the case of a digital camera the distortion due to the lens. Filtering signal with and retrieving samples at instants of time is equivalent to computing the inner product between and . Specifically, the filtered signal is given by
7 |
Moreover, sampling at regular intervals of time leads to
8 |
The function is called the sampling kernel. In order to guarantee perfect reconstruction of the signal , the sampling kernel and the input signal have to satisfy some conditions. The literature presents a variety of kernels that can be used to achieve perfect reconstruction of FRI signals. Here, we will focus on exponential reproducing kernels since they offer the best flexibility and resilience to noise.
- Exponential reproducing property: Any function that together with its shifted versions can reproduce exponential functions of the form with and :
9
The exponential reproduction property is illustrated in Fig. 4 for two different kernels that reproduce different exponentials. In both cases, the kernels are of compact support. The advantage of such kernels is that the summation in (9) can be truncated and still have a region in time where the exponential functions are perfectly reproduced. In general, the exponentials are perfectly reproduced when the summation is computed for . Let be the support of , that is, for . If the summation is truncated to , it follows that the perfect reproduction of the exponential functions holds for .
Exponential reproducing kernels
For the sake of clarity, in what follows, we restrict the analysis to the case where the parameter in (9) is purely imaginary, that is for , where . This analysis can easily be extended to the more general case where has nonzero real and imaginary parts, or is purely real.
A function together with a linear combination of its shifted versions reproduces the exponentials as in (9) if and only if it satisfies the generalised Strang-Fix conditions:
10 |
where , and is the Fourier transform of (Strang and Fix 1971; Unser and Blu 2005; Urigüen et al. 2013). A family of functions that satisfy these conditions are the exponential B-splines, also named E-splines. These functions are constructed through the convolution of elementary zero order E-splines, where each elementary function reproduces a particular exponential . The Fourier transform of a zero order E-spline that reproduces the exponential is given by
11 |
Figure 5 illustrates the Fourier transform of zero order E-splines for two different values of the parameter .
The corresponding E-spline that reproduces the set of exponentials is obtained as follows
12 |
where . Thus, the Fourier transform of is given by
13 |
E-splines have compact support and have continuous derivatives. It can be shown that any function that reproduces the set of exponentials can be expressed as the convolution of another function with the corresponding E-spline that reproduces these exponentials, that is, and satisfies for all (Unser and Blu 2005; Delgado-Gonzalo et al. 2012). It is also true that if reproduces a set of exponentials, this property is preserved through convolution. Let
14 |
for such that . The function also reproduces the same set of exponentials. This is easy to verify since also satisfies the Strang-Fix conditions.
Sampling with an exponential reproducing kernel
The choice of purely imaginary parameters leads to an important family of sampling kernels. These design parameters directly determine the information of the input analogue signal that we acquire and allow us to perfectly reconstruct the input signal from the discrete samples for some classes of signals. Specifically, the different correspond to the frequencies of the Fourier transform of that we are able to retrieve from the only knowledge of samples . It can be shown that if parameters are real or appear in complex conjugate pairs, the corresponding E-spline is real. We thus impose that for all that are nonzero, their complex conjugates are also present in . If parameters in vector are sorted in increasing order of , we have that .
Let us assume that function is localised in time and thus only samples are nonzero. Let be the sequence obtained by linearly combining samples with the coefficients from (9), that is, . We have that
15 |
where follows from (8), from the linearity of the inner product and from the exponential reproduction property. The quantity therefore corresponds to the Fourier transform of evaluated at . Since we have imposed , we also have that .
Computation of coefficients
We have established the properties that a function has to satisfy in order to reproduce exponentials, which are given by the Strang-Fix conditions. Moreover, we have seen the importance of the E-splines since they allow us to obtain samples of the Fourier transform of the input signal. We now show how to obtain the coefficients in (9) required to reproduce the exponential functions , and that are used to obtain the sequence in (15). These coefficients are given by
16 |
where is chosen to form with a quasibiorthonormal set (Dragotti et al. 2007). This includes the particular case where is the dual of , that is, . The introduction of is a technicality that is needed in order to show where the coefficients come from, but we do not need to work with this function. From (16), we can express in terms of by applying a change of variable :
17 |
If we plug this expression in (9), we can derive an expression to compute for each :
18 |
which is valid for any value of . Let , we have that
19 |
where follows from the Possion summation formula1 and from the fact that the Fourier transform of is equal to the Fourier transform of shifted by . Since satisfies the Strang-Fix conditions, from (18) and (19) it follows that
20 |
The dots in Fig. 6b illustrate the values that are used in the computation of the different for an E-spline with . Note that the generalised Strang-Fix conditions (10) impose some constraints on the choice of since we have to guarantee that . From (11) and Fig. 5, it is clear that each introduces zeros at locations , where , we thus have to guarantee that for all pairs of distinct we have . In Fig. 6b, it can be appreciated that is nonzero for all , and that the locations and are zero since the curve in dB tends to .
From (20) and (17), we can compute the coefficients for our choice of and any value of . By combining these coefficients with , the exponentials are perfectly reproduced as shown in Fig. 4.
Approximate reproduction of exponentials
The generalised Strang-Fix conditions (10) impose restrictive constraints on the sampling kernel. This becomes a problem when we do not have control or flexibility over the design of the acquisition device. Recent publications (Urigüen et al. 2013; Dragotti et al. 2013) show that these conditions can be relaxed and still have a very accurate exponential reproduction, which is the property we require in order to reconstruct the analogue input signal. The first part of the Strang-Fix conditions, that is , is easy to achieve, but the second part is harder to guarantee when we do not have control over the sampling device.
If the sampling kernel does not satisfy the generalised Strang-Fix conditions, the exponential reproduction property (9) cannot be satisfied exactly. We thus have to find the coefficients that better approximate the different exponentials :
21 |
There are various options to compute these coefficients, but a good and stable approximation is obtained with the constant least squares approach (Urigüen et al. 2013). If the Fourier transform of the sampling kernel is sufficiently small at , , the coefficients are given by
22 |
Gaussian filters are good candidates for this approach since they are smooth and the shape in time is very similar to the E-splines (see Fig. 7a). The Fourier transform of such filters is given by
23 |
It is clear that the filter is nonzero at , , however, as can be appreciated from Fig. 7a, the attenuation at these frequencies is very strong. This makes the exponential reproduction very accurate as illustrated in Fig. 7b, c.
In the case of the Gaussian filter, we can easily obtain the coefficients of the exponentials to be reproduced since we have an analytical expression for its Fourier transform. When an analytic expression is unknown, we can still apply this approach since we only need knowledge of the transfer function of the acquisition device at frequencies . The coefficients are then given by (22).
The approximate Strang-Fix framework is therefore very attractive since it allows us to use the theory discussed so far with any acquisition device.
Perfect reconstruction of FRI signals
In the previous section, we have seen some properties of exponential reproducing kernels. We have also seen that if the sampling kernel satisfies the exponential reproducing property, we can obtain some samples of the Fourier transform of the input analogue signal from the measurements that result from the sampling process. We now show how this partial knowledge of the Fourier transform can be used to perfectly reconstruct some classes of band unlimited signals.
Perfect reconstruction of a stream of Diracs
We assume that the input signal is a stream of Diracs: , and that the sampling kernel satisfies the exponential reproduction property for a choice of such that , where for . We further impose the frequencies to be equispaced, that is , and to be symmetric, that is . We thus have and .
Since is a sum of Diracs, we have that the Fourier transform is given by a sum of exponentials:
24 |
This is clearly a band unlimited signal. We now consider the sequence that is obtained by linearly combining samples with the coefficients from the exponential reproducing property (9). From (15), we have that and therefore:
25 |
where and . Note that we have also applied the fact that the frequencies can be expressed as . The perfect recovery of the original stream of Diracs, that is, the estimation of the locations and the amplitudes of the Diracs, is now recast as the estimation of parameters and from the knowledge of values . The problem of estimating the parameters of a sum of exponentials from a set of samples arises in a variety of fields and has been analysed for several years by the spectral estimation community (Pisarenko 1973; Paulraj et al. 1985; Schmidt 1986). One way to solve it is by realising that the sequence given as in (25) is the solution to the following linear homogeneous recurrence relation
26 |
See section “Linear homogeneous recurrence relations with constant coefficients” of Appendix for a description of this type of homogeneous systems and their solutions. Note that coefficients are unknown, but can be obtained from the following linear system of equations:
27 |
It can be shown that, if the parameters in (25) are distinct, which is a direct consequence of the fact that all the delays are different, the Toeplitz matrix in the left-hand side of (27) is of rank , and therefore, the solution is unique (see section “Rank deficiency of Toeplitz matrix” of Appendix for a proof on the rank of this matrix). As shown in section “Linear homogeneous recurrence relations with constant coefficients” of Appendix, the parameters are obtained from the roots of the polynomial . Once the parameters have been obtained, the amplitudes of the sum of exponentials can be directly retrieved from (25) by solving the associated least squares problem. From and , we can then compute and . The stream of Diracs is thus perfectly recovered. In the literature, this approach is known as Prony’s method or the annihilating filter method (Stoica and Moses 2005).
The system of equations (27) requires at least consecutive values . Recall that the sequence is obtained as follows , with , where is the number of exponentials reproduced by the sampling kernel. We thus have a lower bound on the number of exponentials that the sampling kernel has to reproduce: . The perfect reconstruction of a stream of Diracs is summarised in the following theorem.
Theorem 1
Consider a stream of K Diracs: , and a sampling kernel that can reproduce exponentials , with , and . Then, the samples defined by are sufficient to characterise uniquely.
Figure 8 illustrates the entire sampling process. Note that, since the sampling kernel is of compact support and the stream of Diracs is localised in time, there are only a small number of samples that are nonzero. From Fig. 8e, it is clear that the signal is not bandlimited. Furthermore, in the classical sampling setup, in order to sample a continuous-time signal at rate Hz, an anti-aliasing filter that sets to zero for has to be applied before acquisition. The FRI framework does not impose this stringent condition since the sampling kernel is not necessarily equal to zero for all .
Perfect reconstruction of a stream of decaying exponentials
Streams of Diracs are an idealisation of streams of pulses. Although this example may seem limited, the framework presented so far can be applied to other classes of functions that model a variety of signals. For instance, calcium concentration measurements obtained from two-photon imaging to track the activity of individual neurons can be modelled with a stream of decaying exponentials. In this model, the time delays correspond to the activation time of the tracked neuron, that is, the action potentials (AP).
Let be a stream of decaying exponentials, that is
28 |
where . See Fig. 9a for an example of such signal. This is also an FRI signal since is perfectly determined by a finite number of parameters: . Let us assume that is sampled with the acquisition device described in Sect. 3.2.1, that is, an exponential reproducing kernel , followed by a sampling stage. We thus have that satisfies (9), and the resulting samples can be expressed as the inner product between and as in (8).
Let us also assume that the reproduced exponentials can be expressed as , with . It can be shown that sampling the signal in (28) with and computing the following finite differences
29 |
is equivalent to the sequence that would result from sampling the stream of Diracs with the following kernel
30 |
where is a zero order E-spline with parameter (Oñativia et al. 2013a). Note that is the exponent in (28). We thus have that
31 |
Since convolution preserves the exponential reproduction property, reproduces the same exponentials as . Thus, we can find the coefficients such that
32 |
We now have all the elements to perfectly reconstruct the stream of decaying exponentials from samples , that is, estimate the set of pairs of parameters . By combining the sequence with coefficients , we obtain exactly the same measurements as in (25):
33 |
where and . We can therefore apply Prony’s method to this sequence and obtain the parameters of interest. Figure 9 illustrates the perfect reconstruction of a stream of decaying exponentials.
FRI signals with noise
The acquisition process inevitably introduces noise making the solutions described so far only ideal. Perturbations may arise in the analogue and digital domain. We model the noise of the acquisition process as a white Gaussian process that is added to the ideal samples. The noisy samples are therefore given by
34 |
where are the ideal noiseless samples from (8) and are i.i.d. Gaussian random variables with zero mean and variance . In order to have a more robust reconstruction, we increase the number of samples by making the order larger than the critical rate .
The denoising strategies that can be applied to improve the performance of the reconstruction process come from the spectral analysis community, where the problem of finding sinusoids in noise has been extensively studied. There are two main approaches. The first, named Cadzow denoising algorithm, is an iterative procedure applied to the Toeplitz matrix constructed from samples as in (27). Let us denote by this matrix. By construction, this matrix is Toeplitz, and in the noiseless case, it is of rank . The presence of noise makes this matrix be full rank. The Cadzow algorithm (Cadzow 1988) looks for the closest rank deficient matrix which is Toeplitz. At each step, we force matrix to be of rank by computing the singular value decomposition (SVD) and only keeping the largest singular values and setting the rest to zero. This new matrix is not Toeplitz anymore, we thus compute a new Toeplitz matrix by averaging the diagonal elements. This last matrix might not be rank deficient, and we can thus iterate again. The next step is to solve equation (27). This is done computing the total least squares solution that minimises subject to , where is an extended version of the vector in (27) and has length . If this vector is normalised with respect to the first element, we have that the following elements correspond to the coefficients in (26). This approach has successfully been applied in the FRI setup in (Blu et al. 2008).
The second approach is based on subspace techniques for estimating generalised eigenvalues of matrix pencils (Hua and Sarkar 1990, 1991). Such approach has also been applied in the FRI framework (Maravić and Vetterli 2005). This method is based on the particular structure of the matrix , which is Toeplitz and each element is given by a sum of exponentials. Let be the matrix constructed from by dropping the first row and the matrix constructed from by dropping the last row. It can be shown that in the matrix pencil the parameters from (25) are rank reducing numbers, that is, the matrix has rank for and rank otherwise. The parameters are thus given by the eigenvalues of the generalised eigenvalue problem .
Further variations of these two fundamental approaches have been proposed recently. See for example Tan and Goyal (2008), Erdozain and Crespo (2011), Hirabayashi et al. (2013).
Sampling streaming FRI signals
In the previous section, we have seen how to sample and reconstruct a set of Diracs. We now consider the case where we have a streaming signal:
35 |
If the stream is made of clearly separable bursts, we can apply the previously described strategy by assuming that each burst has a maximum number of spikes. However, when this separation cannot be made because of the presence of noise, or due to the nature of the signal itself, this strategy is not valid. The infinite stream presents an obvious constraint due the number of parameters that have to be recovered. We have seen that the order of the sampling kernel, , and its support are directly related to the number of parameters to be estimated. However, we cannot increase indefinitely. In order to handle this type of signals, we thus consider a sequential and local approach (Oñativia et al. 2013b).
Sliding window approach
We assume that has a bounded local rate of innovation of , that is, for any time window of duration there are at most Diracs within the window. Since each Dirac has two degrees of freedom, location and amplitude, the rate of innovation is . We analyse sequentially the infinite stream with a sliding window that progresses in time by steps equal to the sampling interval . Let the -th window cover the following temporal interval
36 |
where and is the number of samples that are processed for each position of the sliding window. The acquisition device is the same as in the previous section: the sampling kernel is given by and . In order to have a causal filter , that is for , we impose the support of to be , where if is an E-spline of order . The support of is therefore . Consequently, a Dirac located at influences samples . The indices corresponding to these samples are given by
37 |
When we process the stream sequentially, there are border effects due to the fact that we only process samples at a time. Diracs located just before the sliding window influence samples within the window, and the Diracs inside the observation window which are close to the right border influence samples outside the window. These effects are illustrated in Fig. 10. However, if the sliding window is big enough, there are a good number of positions of the sliding window that will fully capture each individual Dirac and therefore lead to a good estimate of its amplitude and location. In the noiseless case, we can detect if we are in the presence of these border effects or if there is no border effect and therefore the reconstruction can be exact. Nonetheless, in the presence of noise, we cannot guarantee perfect reconstruction.
For this reason, the sequential algorithm works in two steps: first, it estimates the locations for each position of the sliding window; second, it analyses the consistency of the retrieved locations among different windows. The -th window processes samples . Let be the set of estimated locations within the -th window. When the observation window is at position , we know that Diracs located at cannot have any influence on the current samples. We can therefore analyse the consistency of the locations up to . Figure 11a shows the retrieved locations for different positions of the sliding window, where the horizontal axis corresponds to the window index, , and the vertical axis to the locations in time, that is, for a given window index, each dot corresponds to an estimate of the set . Consistent locations among different windows appear as horizontally aligned dots. The shaded area represents the evolution in time of the observation window: for a given index , the vertical cross section of the shaded area represents the time interval that is seen by this window. This consistency can be analysed by building a histogram of all the estimated locations up to a given time. This is illustrated in Fig. 11b. The Diracs are then estimated from the peaks of this histogram.
Application to neuroscience
To understand how neurons process information, neuroscientists need accurate information about the firing of action potentials (APs of spikes) by individual neurons. We thus need techniques that allow to monitor large areas of the brain with a spatial resolution that distinguishes single neurons and with a temporal resolution that resolves APs. Of the currently available techniques, only multiphoton calcium imaging (Denk et al. 1990, 1994; Svoboda et al. 1999; Stosiek et al. 2003) and multielectrode array electrophysiology (Csicsvari et al. 2003; Blanche et al. 2005; Du et al. 2009) offer this capability. Of these, only multiphoton calcium imaging currently allows precise three-dimensional localisation of each individual monitored neuron within the region of tissue studied, in the intact brain. Populations of neurons are simultaneously labelled with a fluorescent indicator, acetoxy-methyl (AM) ester calcium dyes (Stosiek et al. 2003). This allows simultaneous monitoring of action potential-induced calcium signals in a plane (Ohki et al. 2005) or volume (Göbel and Helmchen 2007) of tissue. The calcium concentration is measured with a laser-scanning two-photon imaging system.
For a given region of interest (ROI) where a neuron is located, the calcium concentration is obtained by averaging the value of the pixels of the ROI for each frame. The result is a one-dimensional fluorescence sequence. We assume that when a neuron is activated, the calcium concentration jumps instantaneously, and each jump has the same amplitude . The concentration then decays exponentially, with time constant , to a baseline concentration. The one-dimensional fluorescence signal can therefore be characterised by convolving the spike train with a decaying exponential and adding noise:
38 |
where the index represents different spikes and the different their occurrence times. Hence, the goal of spike detection algorithms is to obtain the values .
A number of methods have previously been used to detect spike trains from calcium imaging data, including thresholding the first derivative of the calcium signal (Smetters et al. 1999), and the application of template-matching algorithms based on either fixed exponential (Kerr et al. 2005, 2007; Greenberg et al. 2008) or data-derived (Schultz et al. 2009; Ozden et al. 2008) templates. Machine learning techniques (Sasaki et al. 2008) and probabilistic methods based on sequential Monte Carlo framework (Vogelstein et al. 2009) or fast deconvolution (Vogelstein et al. 2010) have also been proposed. Some broadly used methods such as template matching or derivative-thresholding have the disadvantage that they do not deal well with multiple events occurring within a time period comparable to the sampling interval. Our spike detection algorithm is based on connecting the calcium transient estimation problem to the theory of FRI signals. The calcium concentration model in (38) is clearly a FRI signal, we can thus apply the techniques presented in the previous sections.
Spike inference algorithm
The spike inference algorithm is based on applying the sliding window approach presented in Sect. 4.1 combined with the reconstruction of streams of decaying exponentials presented in Sect. 3.2.2. One major issue of the framework presented so far is that we have assumed the number of spikes within a time window to be known a priori. In practice, this is a value that has to be estimated.
In the noiseless case, the number of spikes can be recovered from the rank of the Toeplitz matrix constructed from samples :
39 |
In the noisy case, matrix becomes full rank. An estimate of can still be obtained by thresholding the normalised singular values of . Let be the singular values of sorted in decreasing order. We can estimate as the number of singular values that satisfy . Where is adjusted depending on the level of noise. This approach tends to overestimate . Moreover, we never detect the case since when noise is present we always have .
To overcome these inaccuracies, we make the algorithm more robust by applying a double consistency approach. We run the sliding window approach presented in Sect. 4.1 twice. First, with a sufficiently big window where we estimate from the singular values of . Second, with a smaller window where we assume that we only capture one spike and therefore we always set . We then build a joint histogram out of all the locations retrieved from both approaches and estimate the spikes from the peaks of the histogram. This approach is illustrated in Figs. 12 and 13 with real data.
This technique is fast and robust in high noise and low temporal resolution scenarios. It is able to achieve a detection rate of 84 % of electrically confirmed AP with real data (Oñativia et al. 2013a), outperforming other state of the art real-time approaches. Due to its low complexity, tens of streams can be processed in parallel with a commercial off-the-shelf computer.
Conclusions
We have presented a framework to sample and reconstruct signals with finite rate of innovation. We have shown that it is possible to sample and perfectly reconstruct streams of Diracs, and more importantly, streams of decaying exponentials. The latter offer a perfect fit for calcium transients induced by the spiking activity of neurons. The presented approach is sequential, and the reconstruction is local. These two features make the overall algorithm resilient to noise and have low complexity offering real-time capabilities.
The theoretical framework, where perfect reconstruction can be achieved, is also extended to the more realistic case where we do not have full control over the sampling kernel. In this case, perfect reconstruction cannot be guaranteed, but we can still reconstruct the underlying analogue signal with high precision if the sampling kernel can reproduce exponentials approximately.
Acknowledgments
This work was supported by European Research Council (ERC) starting investigator award Nr. 277800 (RecoSamp).
Appendix
Linear homogeneous recurrence relations with constant coefficients
Let be the linear operator with constant coefficients that establishes the following recurrence relation of order up to when applied to a sequence :
40 |
The corresponding homogeneous system is given by
41 |
This is the discrete-time version of a homogeneous linear differential equation given by
42 |
Both, the linear homogeneous differential equation (42) and the linear homogeneous recurrence relation (41) have equivalent solutions. In the continuous-time case, the functions that satisfy the homogeneous equation have the form of exponential functions. Similarly, the solution to the discrete-time version has the form of exponential sequences. The solution to (41) is not unique, but all the solutions have the form , where . Thus, to solve (41) we set , leading to
43 |
Division by gives the th order polynomial
44 |
is the characteristic polynomial of the homogeneous system. The roots of , that is, the values that satisfy , determine the solution to (41). We have that . If the roots are distinct, the solution to the homogeneous recurrence relation is given by any linear combination of the sequences constructed from the different roots:
45 |
since and .
Rank deficiency of Toeplitz matrix
Let be the following Toeplitz matrix:
46 |
where , and each element of the matrix is given by , with all nonzero and all distinct. The matrix can be decomposed as follows:
47 |
Since and are Vandermonde matrices with distinct elements, both are of rank . Therefore, if elements are nonzero, matrix has rank .
Footnotes
For appropriate functions , the Poisson summation formula is given by: .
Contributor Information
Jon Oñativia, Email: jon.onativia@imperial.ac.uk.
Pier Luigi Dragotti, Email: p.dragotti@imperial.ac.uk.
References
- Asl HA, Dragotti PL, Baboulaz L. Multichannel sampling of signals with finite rate of innovation. IEEE Signal Process Lett. 2010;17(8):762–765. doi: 10.1109/LSP.2010.2052801. [DOI] [Google Scholar]
- Baboulaz L, Dragotti PL. Exact feature extraction using finite rate of innovation principles with an application to image super-resolution. IEEE Trans Image Process. 2009;18(2):281–298. doi: 10.1109/TIP.2008.2009378. [DOI] [PubMed] [Google Scholar]
- Berent J, Dragotti PL, Blu T. Sampling piecewise sinusoidal signals with finite rate of innovation methods. IEEE Trans Signal Process. 2010;58(2):613–625. doi: 10.1109/TSP.2009.2031717. [DOI] [Google Scholar]
- Blanche TJ, Spacek MA, Hetke JF, Swindale NV. Polytrodes: high-density silicon electrode arrays for large-scale multiunit recording. J Neurophysiol. 2005;93(5):2987–3000. doi: 10.1152/jn.01023.2004. [DOI] [PubMed] [Google Scholar]
- Blu T, Dragotti PL, Vetterli M, Marziliano P, Coulot L. Sparse sampling of signal innovations. IEEE Signal Process Mag. 2008;25(2):31–40. doi: 10.1109/MSP.2007.914998. [DOI] [Google Scholar]
- Cadzow JA. Signal enhancement-a composite property mapping algorithm. IEEE Trans Accoustics Speech Signal Process. 1988;36(1):49–62. doi: 10.1109/29.1488. [DOI] [Google Scholar]
- Chen C, Marziliano P, Kot AC. 2D finite rate of innovation reconstruction method for step edge and polygon signals in the presence of noise. IEEE Trans Signal Process. 2012;60(6):2851–2859. doi: 10.1109/TSP.2012.2189391. [DOI] [Google Scholar]
- Csicsvari J, Henze DA, Jamieson B, Harris KD, Sirota A, Barthó P, Wise KD, Buzsáki G. Massively parallel recording of unit and local field potentials with silicon-based electrodes. J Neurophysiol. 2003;90(2):1314–1323. doi: 10.1152/jn.00116.2003. [DOI] [PubMed] [Google Scholar]
- Delgado-Gonzalo R, Thévenaz P, Unser M. Exponential splines and minimal-support bases for curve representation. Comput Aided Geom Des. 2012;29(2):109–128. doi: 10.1016/j.cagd.2011.10.005. [DOI] [Google Scholar]
- Denk W, Strickler JH, Webb WW. Two-photon laser scanning fluorescence microscopy. Science. 1990;248(4951):73–76. doi: 10.1126/science.2321027. [DOI] [PubMed] [Google Scholar]
- Denk W, Delaney KR, Gelperin A, Kleinfeld D, Strowbridge BW, Tank DW, Yuste R. Anatomical and functional imaging of neurons using 2-photon laser scanning microscopy. J Neurosci Methods. 1994;54(2):151–162. doi: 10.1016/0165-0270(94)90189-9. [DOI] [PubMed] [Google Scholar]
- Dragotti PL, Vetterli M, Blu T. Sampling moments and reconstructing signals of finite rate of innovation: Shannon meets Strang-Fix. IEEE Trans Signal Process. 2007;55(5):1741–1757. doi: 10.1109/TSP.2006.890907. [DOI] [Google Scholar]
- Dragotti PL, Oñativia J, Urigüen JA, Blu T (2013) Approximate Strang-Fix: sampling infinite streams of Diracs with any kernel. In: Proceedings SPIE 8858, wavelets wavelets and Sparsity XV, pp 88,580Y–88,580Y-8
- Du J, Riedel-Kruse IH, Nawroth JC, Roukes ML, Laurent G, Masmanidis SC. High-resolution three-dimensional extracellular recording of neuronal activity with microfabricated electrode arrays. J Neurophysiol. 2009;101(3):1671–1678. doi: 10.1152/jn.90992.2008. [DOI] [PubMed] [Google Scholar]
- Erdozain A, Crespo PM. Reconstruction of aperiodic FRI signals and estimation of the rate of innovation based on the state space method. Sig Process. 2011;91(8):1709–1718. doi: 10.1016/j.sigpro.2011.01.015. [DOI] [Google Scholar]
- Göbel W, Helmchen F. In vivo calcium imaging of neural network function. Physiology. 2007;22(6):358–365. doi: 10.1152/physiol.00032.2007. [DOI] [PubMed] [Google Scholar]
- Greenberg DS, Houweling AR, Kerr JND. Population imaging of ongoing neuronal activity in the visual cortex of awake rats. Nat Neurosci. 2008;11(7):749–751. doi: 10.1038/nn.2140. [DOI] [PubMed] [Google Scholar]
- Hirabayashi A, Hironaga Y, Condat L (2013) Sampling and recovery of continuous sparse signals by maximum likelihood estimation. In: IEEE international conference on acoustics, speech, and signal processing (ICASSP 2013), pp 6058–6062
- Hua Y, Sarkar TK. Matrix pencil method for estimating parameters of exponentially damped/undamped sinusoids in noise. IEEE Trans Acoust Speech Signal Process. 1990;38(5):814–824. doi: 10.1109/29.56027. [DOI] [Google Scholar]
- Hua Y, Sarkar TK. On SVD for estimating generalized eigenvalues of singular matrix pencil in noise. IEEE Trans Signal Process. 1991;39(4):892–900. doi: 10.1109/78.80911. [DOI] [Google Scholar]
- Kandaswamy D, Blu T, Van De Ville D. Analytic sensing for multi-layer spherical models with application to EEG source imaging. Inverse Problems and Imaging. 2013;7(4):1251–1270. doi: 10.3934/ipi.2013.7.1251. [DOI] [Google Scholar]
- Kerr JND, Greenberg D, Helmchen F. Imaging input and output of neocortical networks in vivo. Proc Natl Acad Sci U S A. 2005;102(39):14,063–14,068. doi: 10.1073/pnas.0506029102. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kerr JND, de Kock CPJ, Greenberg DS, Bruno RM, Sakmann B, Helmchen F. Spatial organization of neuronal population responses in layer 2/3 of rat barrel cortex. J Neurosci. 2007;27(48):13,316–13,328. doi: 10.1523/JNEUROSCI.2210-07.2007. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kotelnikov V (1933) On the transmission capacity of “ether” and wire in electrocommunications. Izd Red Upr Svyazzi (Moscow)
- Maravić I, Vetterli M. Sampling and reconstruction of signals with finite rate of innovation in the presence of noise. IEEE Trans Signal Process. 2005;53(8):2788–2805. doi: 10.1109/TSP.2005.850321. [DOI] [Google Scholar]
- Ohki K, Chung S, Ch’ng YH, Kara P, Reid RC. Functional imaging with cellular resolution reveals precise micro-architecture in visual cortex. Nature. 2005;433:597–603. doi: 10.1038/nature03274. [DOI] [PubMed] [Google Scholar]
- Oñativia J, Schultz S, Dragotti PL. A finite rate of innovation algorithm for fast and accurate spike detection from two-photon calcium imaging. J Neural Eng. 2013;10(4):1–14. doi: 10.1088/1741-2560/10/4/046017. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Oñativia J, Urigüen JA, Dragotti PL (2013b) Sequential local FRI sampling of infinite streams of Diracs. In: IEEE international conference on acoustics, speech, and signal processing (ICASSP 2013), pp 5440–5444
- Ozden I, Lee HM, Sullivan MR, Wang SSH. Identification and clustering of event patterns from in vivo multiphoton optical recordings of neuronal ensembles. J Neurophysiol. 2008;100(1):495–503. doi: 10.1152/jn.01310.2007. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Paulraj A, Roy RH, Kailath T (1985) Estimation of signal parameters via rotational invariance techniques-ESPRIT. In: 19th Asilomar conference on circuits, systems and computers, pp 83–89
- Pisarenko VF (1973) The retrieval of harmonics from a covariance function. Geophys J Roy Astron Soc 33(3):347–366
- Poh KK, Marziliano P (2010) Compressive sampling of EEG signals with finite rate of innovation. EURASIP J Adv Signal Process 2010:183105. doi:10.1155/2010/183105
- Sasaki T, Takahashi N, Matsuki N, Ikegaya Y. Fast and accurate detection of action potentials from somatic calcium fluctuations. J Neurophysiol. 2008;100(3):1668–1676. doi: 10.1152/jn.00084.2008. [DOI] [PubMed] [Google Scholar]
- Schmidt RO. Multiple emitter location and signal parameter estimation. IEEE Trans Antennas Propag. 1986;34(3):276–280. doi: 10.1109/TAP.1986.1143830. [DOI] [Google Scholar]
- Schultz SR, Kitamura K, Post-Uiterweer A, Krupic J, Häusser M. Spatial pattern coding of sensory information by climbing fiber-evoked calcium signals in networks of neighboring cerebellar Purkinje cells. J Neurosci. 2009;29(25):8005–8015. doi: 10.1523/JNEUROSCI.4919-08.2009. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Seelamantula CS, Unser M. A generalized sampling method for finite-rate-of-innovation-signal reconstruction. IEEE Signal Process Lett. 2008;15:813–816. doi: 10.1109/LSP.2008.2006316. [DOI] [Google Scholar]
- Shannon CE. Communication in the presence of noise. Proc IEEE. 1949;37(1):10–21. [Google Scholar]
- Slepian D. On bandwidth. Process IEEE. 1976;64(3):292–300. doi: 10.1109/PROC.1976.10110. [DOI] [Google Scholar]
- Smetters D, Majewska A, Yuste R. Detecting action potentials in neuronal populations with calcium imaging. Methods. 1999;18(2):215–221. doi: 10.1006/meth.1999.0774. [DOI] [PubMed] [Google Scholar]
- Stoica P, Moses R. Spectral analysis of signals. Upper Saddle River: Prentice Hall; 2005. [Google Scholar]
- Stosiek C, Garaschuk O, Holthoff K, Konnerth A. In vivo two-photon calcium imaging of neuronal networks. Proc Natl Acad Sci USA. 2003;100(12):7319–7324. doi: 10.1073/pnas.1232232100. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Strang G, Fix GJ. A Fourier analysis of the finite element variational method. Rome: Edizioni Cremonese; 1971. [Google Scholar]
- Svoboda K, Helmchen F, Denk W, Tank DW. Spread of dendritic excitation in layer 2/3 pyramidal neurons in rat barrel cortex in vivo. Nat Neurosci. 1999;2(1):65–73. doi: 10.1038/4569. [DOI] [PubMed] [Google Scholar]
- Tan VYF, Goyal VK. Estimating signals with finite rate of innovation from noisy samples: a stochastic algorithm. IEEE Trans Signal Process. 2008;56(10):5135–5146. doi: 10.1109/TSP.2008.928510. [DOI] [Google Scholar]
- Tur R, Eldar YC, Friedman Z. Innovation rate sampling of pulse streams with application to ultrasound imaging. IEEE Trans Signal Process. 2011;59(4):1827–1842. doi: 10.1109/TSP.2011.2105480. [DOI] [Google Scholar]
- Unser M. Sampling—50 years after Shannon. Proc IEEE. 2000;88(4):569–587. doi: 10.1109/5.843002. [DOI] [Google Scholar]
- Unser M, Blu T. Cardinal exponential splines: part I—theory and filtering algorithms. IEEE Trans Signal Process. 2005;53(4):1425–1438. doi: 10.1109/TSP.2005.843700. [DOI] [Google Scholar]
- Urigüen JA, Blu T, Dragotti PL. FRI sampling with arbitrary kernels. IEEE Trans Signal Process. 2013;61(21):5310–5323. doi: 10.1109/TSP.2013.2278152. [DOI] [Google Scholar]
- Vetterli M, Marziliano P, Blu T. Sampling signals with finite rate of innovation. IEEE Trans Signal Process. 2002;50(6):1417–1428. doi: 10.1109/TSP.2002.1003065. [DOI] [Google Scholar]
- Vogelstein JT, Watson BO, Packer AM, Yuste R, Jedynak B, Paninski L. Spike inference from calcium imaging using sequential Monte Carlo methods. Biophys J. 2009;97:636–655. doi: 10.1016/j.bpj.2008.08.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Vogelstein JT, Packer AM, Machado TA, Sippy T, Babadi B, Yuste R, Paninski L. Fast nonnegative deconvolution for spike train inference from population calcium imaging. J Neurophysiol. 2010;104(6):3691–3704. doi: 10.1152/jn.01073.2009. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Whittaker JM. The Fourier theory of the cardinal functions. Proc Math Soc Edinb. 1929;1:169–176. doi: 10.1017/S0013091500013511. [DOI] [Google Scholar]