|Home | About | Journals | Submit | Contact Us | Français|
Phase-locked spikes in various types of neurons encode temporal information. To quantify the degree of phase-locking, the metric called vector strength (VS) has been most widely used. Since VS is derived from spike timing information, error in measurement of spike occurrence should result in errors in VS calculation. In electrophysiological experiments, the timing of an action potential is detected with finite temporal precision, which is determined by the sampling frequency. In order to evaluate the effects of the sampling frequency on the measurement of VS, we derive theoretical upper and lower bounds of VS from spikes collected with finite sampling rates. We next estimate errors in VS assuming random sampling effects, and show that our theoretical calculation agrees with data from electrophysiological recordings in vivo. Our results provide a practical guide for choosing the appropriate sampling frequency in measuring VS.
Information coding via synchronized neural activity is a common feature in the nervous system. Various types of neurons encode temporal information by phase-locked spiking activities (Carr and Friedman, 1999). Phase-locking is most widely seen in the auditory system, including auditory nerves or auditory brainstem neurons in dogs (Goldberg and Brown, 1969), redwing blackbirds (Sachs and Sinnott, 1978), cats (Johnson, 1980; Joris et al., 1994), guinea-pigs (Palmer and Russell, 1986), songbirds (Gleich and Narins, 1988), pigeons (Hill et al., 1989), chicks (Salvi et al. 1992), owls (Köppl, 1997), emus (Manley et al., 1997), geckos (Sams-Dodd and Capranica, 1994), caimans and alligators (Smolders and Klinke, 1986; Carr et al., 2009), and auditory cortex neurons in cats (Eggermont and Smith, 1995). Apart from the auditory system, phase-locking has also been found in electrosensory lateral line lobe neurons in weakly electric fish (Kawasaki and Guo, 1996), Mauthner cells in teleosts (Weiss et al., 2009), frog mechanoreceptor afferents (Ogawa et al., 1981), locust olfactory system (Stopfer et al., 2003), rat barrel cortex (Ewert et al., 2008), cat visual cortex (Gray and Singer, 1989), and rat hippocampal place cells (Harris et al., 2002; Diba and Buzsáki, 2008; Mizuseki et al., 2009).
In electrophysiological experiments, action potentials are detected from intra- or extracellular potentials and a sequence of spikes (“spike train”) is obtained. In most cases, the internal clock of the recording system determines the temporal resolution of data acquisition and therefore spike timing data can be obtained only with finite temporal accuracy (Figure (Figure1).1). Collected spike timing could be shifted as much as the length of the clock cycle or the “sampling window.” Any quantity or metric derived from spike timing information is more or less subject to this temporal uncertainty. In this paper, we refer to the error emerged from finite temporal sampling resolution as “temporal sampling error.” Theoretically (and intuitively), sampling rate, which is the reciprocal of the length of the sampling window, should be as high as possible to obtain precise spike timing data. However, in practice, sampling rate cannot be set arbitrarily high because of costs and technical limitations. Thus any spike timing calculation is subject to errors associated with sampling.
Phase-locking, or periodic increase in spike discharge rate at a certain phase of the reference stimulus, is often quantified by the metric called vector strength (VS) (Goldberg and Brown, 1969). The mean vector (X,Y) of a spike train is calculated as:
where fsignal is the reference signal frequency, tj is the timing of the j-th spike, N is the total number of spikes. VS, or the length of the mean vector, is calculated as
By definition, VS takes values between 0 and 1 (Fisher, 1993). A VS of 1 means that all the spikes occurred in a certain phase of the signal (i.e., perfect phase-locking) and a VS of 0 implies that the spike train has no phase preference for the reference signal. Since VS is a quantity derived from spike timing information, it can be substantially affected by the temporal sampling error. How high a sampling rate is high enough to obtain an accurate measure of VS? How robust a measure is VS when sampling rate is not ideally high? In this technical note, we derive theoretical upper and lower bounds for errors in VS calculated from spikes collected with finite sampling rates. We also calculate errors in VS using an assumption of random sampling effects, and compare our theoretical estimation with data from in vivo recordings. Our results provide a practical guideline for determining the appropriate size of the sampling window in measuring VS.
Data from auditory brainstem neurons in barn owls, chicks and American alligators were used to assess the effect of sampling on the calculation of VS. Animal husbandry and experimental protocols were approved by the Animal Care and Use Committee of the University of Maryland, the Regierung von Oberbayern (Germany), the University of Sydney Animal Ethics Committee, and/or the Marine Biological Laboratory (Woods Hole, MA, USA). Detailed procedures for surgery, stereotaxis, acoustic stimulus generation, and data collection have been provided by Carr and Köppl (2004) for owls, Köppl and Carr (2008) for chicks, and Carr et al. (2009) for alligators. In brief, animals were anesthetized and placed in a sound-attenuating chamber. Body temperature was maintained by a feedback-controlled heating blanket. An electrocardiogram was recorded via needle electrodes placed in the muscles of legs and/or wings to monitor muscle potentials and the heart beat. The head was held in a constant position by gluing a stainless steel head post and the skull was opened to expose the cerebellum. If necessary, a portion of the cerebellum was aspirated to expose the dorsal surface of the brainstem. Recordings were made with tungsten (2–20MΩ) or glass electrodes (5–100MΩ).
Custom-written software (xdphys, Caltech, CA, USA) was used for controlling acoustic stimuli and collecting data together with the TDT2 signal-processing system (Tucker Davis Technology, TDT, Gainesville, FL, USA). Acoustic stimuli were passed through a D/A converter (TDT DD1), filtered (TDT FT6-2), attenuated (TDT PA4), impedance-matched (TDT HB4) and delivered to the animal by earphones placed into the ear canals. Sound pressure levels were calibrated before recordings using built-in miniature microphones (Knowles EM3068, Itasca, IL, USA). Responses to acoustic stimuli were continuously monitored until the electrode reached the cochlear nuclei in the auditory brainstem (nucleus magnocellularis, NM; or nucleus laminaris, NL). After isolating a single unit, characteristic frequency (CF) and response threshold at CF were determined (Köppl and Carr, 2003). To measure the degree of phase-locking, continuous tones at or near the CF were presented with an intensity of 20dB above the threshold. Signals from the electrode were amplified and filtered by a custom-built headstage and amplifier and passed through an A/D converter (TDT DD1), a threshold discriminator (TDT SD1) with an event timer (TDT ET1) and fed to the computer. In about half of the recordings, extracellular potential waveforms were stored to the computer and later analyzed. In other cases, only spike timing data generated by the level detector (TDT SD1) were stored. Both the potential waveforms and the spike timing data were digitized and stored at a sampling rate of 48077Hz.
Custom-written Matlab (MathWorks, Natick, MA, USA) scripts were used for data analysis. For units with potential waveform data, spike timings tj were calculated by peak detection (Figure (Figure1)1) and VS was calculated according to Eqs. 1–3. For units without potential waveforms, stored spike timing data (which was generated by the threshold discriminator) was used to calculate VS. Note that no significant difference between data with and without potential waveforms was found in the results shown in Section “Examples From In Vivo Recording.” For each single unit, timing data from 400 to 10000 action potentials were stored. For Figure Figure6,6, we used timing data of 400 spikes from each unit recording to calculate VS.
To quantify the effect of sampling rate on VS calculation, potential waveforms or spike timing data were down-sampled with various sampling frequencies fsample. Peaks of each downsampled waveform were detected and VS of the spike train was computed. For a unit without a stored waveform, downsampled spike timing was assigned by shifting each spike time tj to the nearest sampling point after tj and VS was calculated. In order to test significance of the phase preference, we calculated the significance probability for VS of each spike train by P=exp(−N(VS)2) with N being the number of spikes (Fisher, 1993). All the single unit data used in our analysis satisfy VS>0.2 and N>400, yielding P<1.1×10−7.
In this section, we evaluate the effect of temporal sampling error on VS calculation by deriving the lower and upper bounds for VS, examining expected error in VS, and comparing our theoretical calculation with physiologically recorded data in vivo.
In this subsection, we derive the theoretical upper and lower bounds of VS values with temporal sampling errors. We assume, for theoretical simplicity, that a sufficiently large number of spikes are collected and that the von Mises distribution (Fisher, 1993) can properly approximate the phase histogram of the spike trains.
Let g(x) be a periodic function with a period of 2π and be normalized as . The mean vector (X,Y) of the function g(x) is defined as:
and the VS is:
The von Mises distribution is defined as:
where k and m are the parameters determining the concentration and the mean phase, respectively. I0 is the modified Bessel function of order zero satisfying and thus By assuming m=0 without any loss of generality, VS with the von Mises distribution can simply be calculated as:
The subscript “exact” means that no temporal sampling error is incorporated in this calculation. An example is given inFigure 2A.
As discussed in the previous subsection, collected spike timing can be shifted within the length of the sampling window T=1/fsample. This temporal sampling error corresponds to a maximum phase error of ±πR. In the following text, R=fsignal/fsample is referred to as the “sampling ratio.” The theoretical upper bound of the VS is obtained by assuming that all the spike timings are shifted in a biased fashion toward the direction of the mean phase of the original distribution to increase the value of VS (Figure (Figure2B).2B). In this case, the length of the mean vector of the shifted spike train is calculated as:
where θ=πR=πfsignal/fsample. The first, second, and third terms denote the contribution of the probability distributions on (−π,0), the distribution on (0,π) and the distribution concentrated at phase 0, respectively. The upper bound of VS is:
The lower bound of VS can be obtained similarly but assumes that all the spike timings are shifted toward the opposite direction of the mean phase of the original distribution to decrease the value of VS (Figure (Figure2C).2C). In this case, the length of the mean vector of the shifted spike train is calculated as:
The first, second, third, and fourth terms denote the contribution of the probability distributions on (−π,0), the distribution on (0,π), the distribution concentrated at phase −π, and the distribution concentrated at phase π, respectively. In contrast to the upper bound LU, the value of LL can be less than 0, since the “length” here is calculated with respect to the direction of the mean phase of the original distribution. A negative value of LL means that the mean vector of the shifted spike train lies in the opposite direction of the original direction and in such a case VS can take an arbitrary value between 0 and VSexact. Therefore we obtain the lower bound of VS as:
The upper and lower bounds for five VS values ranging from 0.1 to 0.9 are shown in Figure Figure33 (dashed lines). The horizontal axis is the sampling ratio R=fsignal/fsample. When the sampling ratio increases to 1, the upper bound of VS approaches to 1 and the lower bound to 0. This means that we cannot obtain a good estimate of VS if the sampling rate is as low as the reference stimulus frequency. Since the upper and lower bounds depend on VSexact, we calculated the theoretical “maximum error” as Maximum VS errors calculated for several sampling rates are shown in Table Table1.1. For R<0.1, the maximum error is almost linear with R.
In the previous section, we obtained the upper and lower bounds of VS, assuming the von Mises distribution. Although these upper and lower bounds are of theoretical importance, it is practically unlikely that sampling is totally biased toward the direction where these limits are attained. In this section, we derive another estimate for error in VS by adopting the more natural assumption that collected spike timing is jittered randomly within the sampling window. Generally, this random sampling jitter flattens the spike distribution. Figure Figure44 shows examples of narrow (A), wide (B) and extremely wide sampling windows (C). Note that the length of sampling window (=1/fsample) is converted to the length of the window function (=2πfsignal/fsample, see next paragraph for detail). If the sampling window is small (or equivalently, if the sampling rate is high) compared to the reference signal, the effect of temporal sampling error is limited (Figure (Figure4A).4A). If the sampling rate is equal to the signal frequency, the temporal sampling error totally hides the temporal structure of the spike trains (Figure (Figure44C).
Let g(x) be a periodic function with a period of 2π and be normalized as In the following derivation, we do not need to assume any particular shape for g(x). Only a sufficiently large number of spikes are assumed to be collected to form the distribution function g(x). Since a spike occurred at phase x is assumed to be randomly shifted within the range of ±θ (θ=πR=πfsignal/fsample), the distribution function h(x) of sampled spikes (Figure (Figure4,4, gray areas) can be obtained as a convolution of the original distribution function g(x) (Figure (Figure4,4, dashed lines) and a window function w(x) (Figure (Figure4,4, insets). Precisely,
The window function w(x)=1/2θ (−θ<x<θ) and=0 (otherwise). Since the Fourier transform of a convolution is the product of the Fourier transforms of the two functions, the mean vector (Xsampled, Ysampled) of the function h(x) can be calculated as:
Thus VS of sampled spike train is:
Note that VSsampled obtained here does not depend on a specific shape of the spike distribution g(x) whereas the upper and lower bounds discussed in the previous section were obtained only with the von Mises distribution.
We calculated VSsampled for five VSexact values ranging from 0.1 to 0.9 (Figure (Figure3,3, solid lines). Although VSsampled approaches to 0 when the sampling ratio R=fsignal/fsample increases to 1, it is much more robust to R than the lower bound VSL (Figure (Figure3,3, dashed lines). Since VSsampled=(sinπR/πR) VSexact, the “expected error” of VS, defined as eexpected=(VSexact−VSsampled)/VSexact can be calculated as:
Expected errors with several sampling rates are shown in Table Table1.1. Expected error is much smaller than the theoretically calculated maximum error (see also Figure Figure2),2), and is less than 2% if the sampling frequency fsample is only 10 times greater than the signal frequency fsignal.
Figure Figure33 and Table Table11 imply that the expected error increases quite slowly with the sampling ratio R for small R values. Using the Taylor expansion sinπR=(πR)−(πR)3/3!+O(R5), the expected error can be calculated as:
The approximation eexpected=(πR)2/6 is 99.5% accurate for R<0.1. This approximation explains the slow increase in the expected error to the sampling ratio.
In this section, we compare the expected VS errors obtained in the previous subsection with spiking data recorded in vivo. We use data from neurons in the nucleus magnocellularis (NM) and the nucleus laminaris (NL) in the auditory brainstem of owls, chicks, and alligators. These neurons show phase-locked spiking activity and play a key role in sound localization (Carr and Konishi, 1990; Köppl, 1997; Köppl and Carr, 2008; Carr et al., 2009). In our original data set, spike timing was collected with a sampling frequency of 48077Hz. We downsampled the data with various sampling frequencies and re-calculated VS values (see Materials and Methods). Figure Figure55 shows the phase-locked activity of eight neurons with best frequencies ranging from 350 to 7000Hz and with VS ranging from 0.27 to 0.82. In all the neurons shown, VS values decay according to the estimation given as VSsampled=(sinπR/πR) VSexact (Eq. 16), where the sampling ratio R=fsignal/fsample.
The above result was entirely consistent with much larger data sets we have tested (Figure (Figure6).6). Since VSsampled=(sinπR/πR) VSexact, we can estimate VSexact=(πR/sinπR) VSsampled. We use the data recorded at 48kHz (original sampling frequency) to obtain the estimate value of VSexact. In Figure Figure6,6, we plotted VSsampled from downsampled spike data divided by estimated VSexact. Decay of VSsampled with the sampling ratio R is accurately predicted by the equation VSsampled=(sinπR/πR) VSexact. When the sampling rate fsample is 20 times as large as the signal frequency fsignal (i.e., R=0.05), VSsampled can be predicted with a root mean square error of about 1%.
In this section, we examine the sampling effect on several circular statistics other than VS.
As we have discussed, the length of the mean vector (=VS) is expected to change as VSsampled=(sinπR/πR) VSexact by sampling. We did not assume any specific spike detection algorithms in deriving this equation. The direction (phase) of the mean vector, however, strongly depends on the method used in spike discrimination. For example, when peak detection is used to discriminate spikes and detected spike timing tj is assumed to be assigned to the sampling time point nearest to the true peak of the waveform (Figure (Figure1),1), tj could be before or after the true peak. Assuming that 50% of the spike occurrences are recorded before the true peaks (and, equivalently, the other 50% of the spikes are recorded after the true peaks), the phase of the mean vector is expected to be the same as the true mean.
When threshold detection is used, however, the mean phase could be different from the true direction, because a threshold crossing event is detected only after the waveform crossed the threshold. In this case, mean phase of the recorded spike train is always ahead of the true mean.
Assuming that correct spikes are evenly distributed within the sampling window, the expected shift between the recorded mean phase and the true mean phase can be calculated as:
From these two different examples, we conclude that the information on the spike discrimination algorithm is necessary to appropriately quantify the sampling effect on the mean phase.
Circular standard deviation σ is defined as:
(Fisher, 1993). The relationship between the circular standard deviation of the exact distribution and that of the downsampled distribution is calculated as:
Using the Taylor expansions sinπR=(πR)−(πR)3/3!+O(R5), log(1−x)=−x−x2/2+O(x3), and , we have:
This equation indicates that the expected error in circular standard deviation increases sublinearly to the increasing sampling ratio R for small R values (Figure (Figure77A).
Significance probability for VS can be approximated as P=exp(−N(VS)2) with N (>50) being the number of spikes (Fisher, 1993). Defining c=1−(sinπR/πR), the P-values for exact and downsampled data can be related as:
Using the Taylor expansions sinπR=(πR)−(πR)3/3!+O(R5), and exp(x)=1+x+O(x2), we have:
Although Eq. 24 indicates that the expected error in the significance probability increases sublinearly to the increasing sampling ratio R for small R values, it is not always practically useful in evaluating P-values for downsampled data. For example, VSexact=0.5, N=1000 and R=0.2 yield Pexact=2.7×10−109 and Psampled=9.6×10−96 (Figure (Figure7B).7B). The significance probability increased more than 1013-fold by downsampling, but Psampled is still far below commonly used significance levels (such as 0.01 or 0.001, see Figure Figure7C).7C). Thus in examining the significance probability, we suggest using the original equation P=exp(−N(VS)2), instead of Eqs. 23 or 24.
“Any measurement that you make without the knowledge of its uncertainty is completely meaningless” (Lewin, 1999). Although this statement was made originally with physics in mind, it is totally applicable to biological recordings. In this paper we have studied the effect of the length of the sampling window on the measurement of VS, which has been widely used to quantify the degree of phase-locking since it was first introduced to the analysis of neural data 40years ago (Goldberg and Brown, 1969). We derived theoretical upper and lower bounds for VS with the von Mises distribution (Figures (Figures2,2, ,33 and Table Table1).1). We also calculated the expected errors in VS calculations, assuming random sampling effects but not any specific distribution (Figures (Figures3,3, ,4,4, and Table Table1).1). The expected error eexpected changes almost linearly to the square of the sampling ratio R (for R<0.1), indicating that this error does not increase as much as the error in spike timing calculation. Our physiological recordings of auditory brainstem neurons in owls, chicks, and alligators showed that errors in VS can be predicted well by the expected errors we calculated, but not by the theoretical upper and lower bounds of VS, which are several tens to hundred times greater than the expected errors (Figures (Figures44 and and55).
A similar issue was discussed by Bair et al. (1994). They pointed out that the power spectrum of a spike sequence can be corrupted due to the aliasing effect arising from finite sampling intervals. Since VS is the Fourier component of a spike train at the stimulus frequency normalized by the total number of spikes (see, for example, Ashida et al., 2010), VS is nonetheless subject to aliasing, which we refer to as the temporal sampling error. Regarding the Fourier analysis, here we point out the relationship of our results to the Nyquist frequency, which is fsample/2. The Shannon–Nyquist theorem (Shannon, 1949) determines how high a sampling rate is necessary (how many sample points are required) to reconstruct the original analog waveform, assuming that the timing of each sample point is errorless. However, the spike sampling problem, which we have discussed in this paper, corresponds to the question of how high a sampling rate is necessary to accurately calculate a specific Fourier component, assuming that the timing of each sampled spike is subject to measurement error. Therefore, both of these two questions are related to the Fourier analysis, while the latter considers the error in sample timing.
It should be noted that no matter how many spikes are obtained, the temporal sampling error in VS cannot be eliminated. For example, even if spikes in a train are perfectly phase-locked (VSexact=1), sampling procedure can shift the collected spike timings within the length of the sampling window and therefore calculated vector strength (VSsampled) could be less than 1. Increase in the number of spikes leads to the convergence of VS to the theoretically calculated value of VSsampled but not to VSexact. The way to reduce the temporal sampling error is to increase the sampling rate (or equivalently, to decrease the length of the sampling window). For very precise VS measurement, a sampling rate fsample of 50 times greater than the signal frequency fsignal (i.e., R=0.02) yields the maximum error of 8% and the expected error of less than 0.1% (Table (Table1).1). Practically, however, fsample=20×fsignal (i.e., R=0.05) would suffice because the expected error is still less than 0.5%. When this high sampling frequency is not achievable, fsample=10×fsignal (i.e., R=0.1) might work with an expected error of less than 2%, especially if this amount of error is supposed to be comparable to or less than the errors arising from other sources. If R>0.1, however, the temporal sampling error will no longer be negligible. In such a case, recorded spike timings need to be corrected to obtain precise VS. Complementary tools for data analysis, such as interpolation (Stoer and Bulirsch, 2002), could improve spike timing measurement and thus reduce the error in VS estimation.
In the preceding analysis and discussion, we implicitly assumed that the frequency and the phase of the reference stimulus can be rigorously determined. Place cells in the rat hippocampus, for example, are known to generate action potentials phase-locked to the internally generated population activity, or the theta oscillation (Harris et al., 2002; Diba and Buzsáki, 2008; Mizuseki et al., 2009). In such cases, frequency and phase of the reference signal need to be calculated from temporally discretized waveforms before phase-locking is quantified. Assuming that conventional Fourier transforms are used to estimate the frequency and the phase, estimation accuracy is governed by the well-known Nyquist–Shannon theory, which requires sampling frequency to be at least twice as high as the signal frequency. Once the reference signal is determined, phase-locking can then be assessed from digitized spike timing data, which is the subject of the present study. Thus in these cases, we still suggest using at least fsample=10×fsignal (i.e., R=0.1), so that the reference signal can be properly estimated and VS can be calculated with an expected error below 2%.
There are multiple sources of variation and errors in VS (Ashida et al., 2010). Some of them are purely biological and the others are more technical. Whereas biological mechanisms of altering VS have been studied intensively (Palmer and Russell, 1986; Weiss and Rose, 1988; Kidd and Weiss, 1990; Rothman et al., 1993; Joris et al., 1994; Joris and Smith, 2008), technical considerations of VS measurement have not yet been fully addressed (e.g., Sullivan and Konishi, 1984; Joris et al., 2006). Although a new metric that can be applied to not only periodic but also aperiodic spiking activity has been proposed recently (Joris et al., 2006), VS is still an intuitive and widely used metric to measure synchrony of periodic spiking activities (Coffey et al., 2006; Köppl and Carr, 2008; Weiss et al., 2009). Therefore systematic investigation on the technical problems of the VS measurement remains practically important.
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
The authors thank J. L. van Hemmen for his comments on the manuscript. This work was supported by NIH DC00436 to Catherine E. Carr, NIH P30 DC04664 to the University of Maryland Center for the Evolutionary Biology of Hearing.