1 Introduction

A hallmark of neuronal activity in many regions of the brain is the presence of membrane potential oscillations, characterized by the periodic firing of individual neurons (Engel et al. 2001; Wang 2010; Buzsaki and Wang 2012). These oscillations may contribute to neural coding by reducing the variance in neural responses, forcing spikes to occur at precise phases (Harris et al. 2002; Mehta et al. 2002; O’Keefe and Burgess 2005; Schaefer et al. 2006; Hafting et al. 2008; Latham and Lengyel 2008; Kayser et al. 2009; Turesson et al. 2012). Further, oscillations may activate stimulus-specific cell assemblies, thus promoting the selective response of individual neurons to distinct inputs (Laurent and Davidowitz 1994; Laurent 2002; Brody and Hopfield 2003; Buzsaki and Draguhn 2004; Fries et al. 2007; Montemurro et al. 2008; Tiesinga et al. 2008).

A widely reported hypothesis maintains that the selective activation of cell assemblies by neural oscillations is achieved through a neural code based on the timing of individual spikes relative to the phase of oscillations, herein referred to as spike-phase coding (Kayser et al. 2009). Accordingly, oscillations may label individual spikes with a particular phase. A classic example of such spike-phase coding is the well-studied hippocampal phase precession, where the phase of individual action potentials relates to the animal’s location along a single spatial dimension (Harris 2005; Lisman 2005) (Fig. 1).

Fig. 1
figure 1

Phase precession in hippocampus depends upon precise spike timing relative to the phase of a theta oscillation. Spike times of a single neuron (red vertical lines) relate to the spatial location of the animal along one spatial dimension (color figure online)

Spike-phase coding is not limited to the hippocampus, and has been reported in several regions including the primary visual cortex (Montemurro et al. 2008), the auditory cortex (Kayser et al. 2009), the antennal lobe (Laurent 2002), and the olfactory bulb (OB) (Cang and Isaacson 2003; Margrie and Schaefer 2003; Schaefer et al. 2006; Shusterman et al. 2011). Reported benefits of spike-phase coding in these various regions include an increased channel capacity when compared to a rate code (Kayser et al. 2009).

In the rodent OB, stimulus-relevant information may be retrieved from the timing of spikes relative to a theta-band sniff cycle (Schaefer et al. 2006). This effect can be investigated in vitro by somatically injecting oscillatory currents and delivering stimuli at various phases of oscillations. One consequence of spike-phase coding is that pattern discrimination is limited to a specific phase of the oscillation, immediately preceding the peak amplitude of each cycle. This is due to a rapid accumulation of spike time variance over the course of an oscillation, and imposes strict constraints on spike-phase coding (Schaefer et al. 2006). More generally, any coding mechanism based on the phase of an autonomous narrowband rhythm will be limited by the amount of jitter, unless there is a mechanism to stabilize the rhythm (Dumont et al. 2016).

While several models have examined the contribution of oscillations to pattern discrimination, signal propagation, long-distance communication, and multisensory integration (Singer 1999; Brody and Hopfield 2003; Fries et al. 2007; Masuda and Doiron 2007; Wang et al. 2010), a formal analysis of spike time variance accumulation is currently lacking. Here, we investigate this issue using a formal analysis of inhomogeneous Poisson spikes. We chose to focus on Poisson spike statistics, as they offer a close match to the experimental work under consideration here, where Poisson train stimuli were used to generate excitatory post-synaptic potentials (EPSPs).

Our analysis provides important constraints on stimulus encoding based on the timing of action potentials relative to the phase of an oscillation. Specifically, oscillations reduce spike time variance as a function of spike number in qualitatively different ways, depending on the precise combination of baseline rate, stimulation frequency, and stimulation amplitude. Interestingly, in some cases, the accumulation of spike time variance is non-monotonic with spike number.

Fig. 2
figure 2

Spike time variance in the olfactory bulb. a Illustration of variance accumulation generated during a membrane potential oscillation. Colors (blue, red, green) indicate consecutive action potentials for a single neuron over trials. b OB neurons display a nonlinear accumulation of jitter across consecutive spike times with a 4 Hz frequency. Black circles denote mean jitter in OB cells obtained from Schaefer et al. (2006). The dashed red line indicates the best fit using a first-order polynomial. The dashed black line is the best fit using a second-order polynomial. Vertical lines: SEM. Mean timing of first spike has \(288^{\circ }\) onset relative to the zero phase of the oscillation (color figure online)

2 Results

2.1 Accumulation of spike time variance

To examine the effect of subthreshold oscillations on spike time variance in the OB, we analyzed previously published experimental data where individual neurons were somatically injected with a 4 Hz sine-wave current over repeated trials (Schaefer et al. 2006) (Fig. 2a). Here, spike time variance was measured using “spike jitter”, defined as the variance of each consecutive spike time relative to a fixed reference point (the onset of the sinusoidal stimulation at time \(t=0\)), divided by the variance of spike times obtained in the no-oscillation condition. In these data, the variance of spike times is initially low, and increases when adding further consecutive spikes along the oscillation (Fig. 2b).

To characterize the effect of oscillations on spike timing variance, we fitted the OB data using either a first- or second-order polynomial. This analysis allows us to examine the overall shape of the spike jitter function (Fig. 2b), rather than focus on differences between consecutive spikes, which may not reach statistical significance. To analyze the spike jitter function, we employed an adjusted goodness of fit that accounted for the degree of the polynomial function (Cohen et al. 2013). This statistic includes a penalty for the number of terms in the model and is appropriate for comparing how different models fit the same data. The adjusted correlation is defined as

$$\begin{aligned} r^{2}_{\mathrm{adjusted}} = 1- \frac{\hbox {SS}_{\mathrm{res}}}{\hbox {SS}_{\mathrm{total}}} \frac{n-1}{n-d-1}, \end{aligned}$$

where n is the number of observations in the data d is the degree of the fitted polynomial (e.g., set to 1 for a linear fit and 2 for a quadratic fit), \(\hbox {SS}_{\mathrm{res}}\) is the sum of squared residuals from the regression, and \(\hbox {SS}_{\mathrm{total}}\) is the sum of squared differences from the mean of the dependent variable. This analysis showed that the data were better fit with a second-order (quadratic) polynomial (\(r^{2}_{\mathrm{adjusted}}=0.99\)) than a first-order (linear) polynomial (\(r^{2}_{\mathrm{adjusted}}=0.64\)). As with traditional correlations, these values of adjusted correlation are interpreted as a percentage of variance explained. However, to put these values in the same units as the data, we transform them to standard deviations (SD), where

$$\begin{aligned} \hbox {SD} = 1-\sqrt{1-r^{2}_{\mathrm{adjusted}}}. \end{aligned}$$

This yields \(\hbox {SD}=0.4\) for the linear fit and \(\hbox {SD}=0.9\) for the quadratic fit. These values correspond to the percentage of SD explained by the fit (i.e. 40% for the linear fit and 90% for the quadratic fit).

Hence, for these data, a non-monotonic function accurately characterized the relation between consecutive action potentials and spike variance throughout an oscillatory cycle. To formally investigate the relation between spike time variance and oscillations, we turned to inhomogeneous Poisson statistics, as described in the next subsection.

2.2 Accumulation of spike time variance in an inhomogeneous Poisson model

We characterized the effect of oscillations on spike time variance by first considering a simplified scenario where spike times are generated according to a Poisson process. We allowed this process to be inhomogeneous, with time-dependent intensity \(\lambda (t)\). We denote the arrival time of spike n as \(S_n\). To find the variance of \(S_n\), we begin by defining \(\Lambda (t)\) as the expected number of spikes between (0, t):

$$\begin{aligned} \Lambda (t) = \int _0^t \lambda (s)\,\mathrm{d}s. \end{aligned}$$
(1)

The mean firing rate is then

$$\begin{aligned} r = \lim _{t\rightarrow \infty } \frac{\Lambda (t)}{t}. \end{aligned}$$
(2)

The probability density function of \(S_n\) can be found by the product of the probability of having \(n-1\) spikes up to time t and of having a spike in the interval \(t,t+h\) (see e.g. Ross 2007, p. 327):

$$\begin{aligned} f_{S_n}(t)=\lambda (t)e^{-\Lambda (t)} \frac{\left[ \Lambda (t)\right] ^{n-1}}{(n-1)!}. \end{aligned}$$
(3)

From \(f_{S_n}(t)\) it is straightforward to compute the mean and variance of \(S_n\):

$$\begin{aligned} E[S_n]= & {} \int _0^{\infty } tf_{S_n}(t)\,\mathrm{d}t \end{aligned}$$
(4)
$$\begin{aligned} \hbox {var}(S_n)= & {} \int _0^{\infty } t^2f_{S_n}(t)\,\mathrm{d}t - E[S_n]^2. \end{aligned}$$
(5)

In the case of the homogeneous Poisson process, these integrals lead to the well-known expressions \(E[S_n]=n/\lambda \) and \(\hbox {var}(S_n)=n/\lambda ^2\).

Our interest lies in the case of sinusoidal rate modulation, i.e. \(\lambda (t) = A\sin (\omega t+\phi )+k\), where \(\phi \) is the phase and k is the offset. More specifically, to prevent the rate from becoming negative, we consider the half-wave-rectified version of this rate, where \(\lambda (t) = A\sin (2\pi f t)\) for \(0\le t \le 1/(2f)\) and zero otherwise. The mean spike count after half a period T / 2 of the oscillation is given by \(\Lambda (T/2) = A/(\pi f)\), and the average rate over the same duration is \(r=2A/\pi \). With this choice of intensity function, we can evaluate \(f_{S_n}(t)\). However, this integral must be evaluated numerically. This was done in MATLAB using the trapezoidal integration rule.

Fig. 3
figure 3

Theoretical framework for examining spike time variance. a Probability density function of spike times as a function of spike number for an inhomogeneous Poisson process. The half-wave intensity function was set to \(\lambda =90\sin (2\pi (4)t)\) Hz, but with negative values set to zero. b Example of spike raster (top) and \(\lambda (t)\) (bottom) obtained from 100 repeated trials of the process in (a). c Spike time variance obtained with the same intensity function as in (a) for the frequencies 2, 4, 8, and 12 Hz. Solid line and filled circles: analytical solution. X-markers: numerical simulation. d Spike time variance \(n/\lambda ^2\) for a homogeneous Poisson process with the same mean rate as the inhomogeneous process in (a), i.e. \(2A/\pi = 57.3~\hbox {Hz}\)

We then compare these theoretical results with direct numerical simulations of the inhomogeneous Poisson process. The mean and variance must be computed with caution, since the probability of spiking within the oscillation half period can be less than 1, especially at larger spike numbers. For example, at \(f=4\) Hz, the probability of obtaining a sixth spike is only 0.72 . In Fig. 3, we consider the case where \(A=90\) Hz, which produces seven spikes per cycle when the frequency \(f=4\) Hz. The direct simulation of the Poisson process is performed with a time step \(\mathrm{d}t=10^{-5}\) s. We then simulate a total of \(10^6\) half-cycles of oscillation. The density of the different spike times \(S_n, n=1,\ldots , 6\) is shown in Fig. 3a. An example of a raster plot is shown in Fig. 3b. Figure 3c plots \(\hbox {var}(S_n)\) for four different stimulation frequencies. Values obtained from the simulations were in close agreement with the analytical results.

Depending on the frequency of oscillation, variance over consecutive spikes did not always follow a monotonically increasing function (Fig. 3c). Therefore, experimental results showing a non-monotonic increase in variance may be limited to the vicinity of the 4 Hz modulation frequency for which results were reported in (Schaefer et al. 2006). For a direct comparison of experimental results with analytical results presented here, we first normalized the variance of the oscillation and no-oscillation scenarios (with matched average spikes) by the variance of their respective last (sixth) spike (Fig. 4a). We then divided the normalized oscillatory variance by the normalized variance obtained with a constant intensity \(\lambda \) (Fig. 4b). This procedure matches the spike jitter metric that was employed in experiments (Schaefer et al. 2006). The \(\lambda \) value of the no-oscillation condition was chosen to match the average firing rate of the oscillation condition. As with the experimental data, the analytically derived spike jitter yields a non-monotonic, U-shaped function. However, this result was specific to a frequency of 4 Hz, and was not obtained with a lower (2 Hz) or higher (8 Hz) frequency of oscillation. Therefore, experimental results showing a U-shaped spike jitter over consecutive spikes may be limited to a narrow range of oscillation frequencies.

A nonlinear accumulation of variance was not observed with a fixed intensity function (Fig. 3d). In this case, variance accumulated in a linear fashion. This result is in line with experimental results in the OB (Schaefer et al. 2006). The straightforward explanation for this result is that variance follows \(n/\lambda ^2\), and thus increases linearly with consecutive spike times \(n=1, 2, 3\) when \(\lambda \) remains constant. In this case, it would be possible to compensate for an increase in variance caused by the n-th spike by gradually scaling the firing rate according to n, thus preventing the increase in spike variance altogether.

While a full theoretical analysis of the benefit of oscillations is beyond the scope of this work, an intuitive explanation for how oscillations reduce spike time variance is as follows. The model with oscillations produces on average the same number of spikes per unit of time as the model without oscillations. In the former, however, spikes occur within a more delimited range of time due to the strong dependence of spike probability on amplitude. Hence, spike time variance is reduced overall. This simple explanation, however, does not account for exceptions at very low amplitudes, which do not readily stand out from the expression for spike time variance (Eq. 5).

Fig. 4
figure 4

Spike jitter stemming from the theoretical framework. a Analytical spike time variance normalized by the last (6th) spike generated during an oscillation cycle of 2, 4, or 8 Hz. The no-oscillation condition has a mean firing rate that matches the oscillation condition. b Spike jitter obtained by normalizing the variance in the oscillatory case by the variance in the no-oscillation condition (i.e. by taking the ratio of the two curves in (a)). \(A=90\) Hz

To further evaluate the potential advantage of oscillations in reducing spike variance compared to a no-oscillation scenario, we computed the analytical spike variance across a range of frequencies. A low oscillation frequency (1 Hz) led to mixed results. The first two spike times exhibited higher variance than the no-oscillation scenario. However, the subsequent four spike times showed lower variance (Fig. 5a). At higher oscillation frequencies (4 Hz and above), spike time variance was systematically lower than without oscillations. Thus, spike time variance was dependent upon the frequency of oscillations and timing of action potentials.

Finally, we examined the impact of oscillation amplitude on spike time variance. We kept the oscillation frequency constant (4 Hz) and either lowered or raised the amplitude of oscillations compared to default (90 Hz). The oscillatory cases were then compared to the no-oscillation cases with matched mean firing rate. A lower amplitude (50 Hz) resulted in an advantage of oscillation over no-oscillation, in that the oscillation condition led to lower spike time variance (Fig. 5b). Conversely, increasing the amplitude (200 Hz) led to a disadvantage of oscillations for the first spike time. Thus, altering the amplitude of oscillations had a marked effect on the resulting impact on spike time variance. Together with the results in Fig. 5a, one can see that the benefit of oscillations in terms of variance reduction is dependent upon the precise parameters of the model and spike number.

Fig. 5
figure 5

Advantage of oscillatory activity on spike variance accumulation. a Comparison of spike time variance versus spike number across different oscillation frequencies. \(\hbox {A}=90\) Hz across all panels. b Spike time variance with a 4 Hz oscillation for two different values of amplitude (A)

To examine the relationship between model parameters (amplitude and frequency) and spike time variance, we computed the difference between \(\hbox {var}(S_n)\) (Eq. 5) obtained with versus without an oscillation (Fig. 6) using Poisson processes for the non-oscillation case that were rate-matched for every parameter choice. Positive values indicate that oscillations resulted in higher variance than the no-oscillation condition. The results show that as the spike number increases from \(n=1,4\), the area of parameter space where oscillations show higher variance (positive values, +) gradually shrinks. Hence, as the spike number increases, a broader range of parameters results in an advantage of oscillations. Put differently, spikes produced earlier during an oscillation are more susceptible to generating a higher variance than without oscillations.

Fig. 6
figure 6

Difference between the spike time variance with and without oscillation. Each plot shows values of \(\Delta \hbox {var}(S_n)\), defined as the spike time variance \((\hbox {var}(S_n))\) with oscillation minus that without oscillation for a given spike number (n) (units of \(\hbox {s}^2\)). Black outline delineates regions of positive \((+)\) and negative \((-)\) values

3 Discussion

In this work, we investigated the factors that influence spike time variance during neural oscillations. We employed an analytical framework based on inhomogeneous Poisson spikes to explain how spike time variance is modulated by the phase of membrane potential oscillations. This framework accounted for both monotonic and non-monotonic increases in spike variance observed in OB recordings. Going further, we showed that the U-shaped relation between spike count and variance was obtained only with a 4 Hz oscillation and not with the lower or higher frequencies we tested, therefore setting clear limits to the generalizability of previous experimental findings. Finally, compared to a homogeneous Poisson process of matched mean rate, a sinusoidally modulated Poisson process offered an advantage in terms of reduced spike time variance for higher frequencies (above 1 Hz) and lower amplitudes (below 200 Hz), thus imposing constraints to stimulus encoding based on the timing of spikes relative to the phase of oscillations. Specifically, in a neural code based on the timing of action potentials along an oscillation, the first several spikes from the onset of oscillation may display a variance that is greater than expected in a homogeneous Poisson process (Fig. 5).

More broadly speaking, the gradual increase in variance over the phase of an oscillation carries important functional consequences for information processing, and may serve to explain why stimulus discrimination is restricted to spikes that occur in a well-defined phase (Schaefer et al. 2006; Kayser et al. 2009; Turesson et al. 2012).

Our study found that, over a broad range of model parameters, oscillations allowed simulated neurons to reduce their spike count variance. This result may be advantageous for different forms of neural coding that rely on low spike variance, including (but not limited to) spike-phase coding as well as temporal coding (Thorpe et al. 1996; Panzeri et al. 2001).

Some of the limitations of a spike-phase code may be overcome with more complex oscillatory functions, including phase-coupled oscillations observed in the cortex and hippocampus (Jensen and Colgin 2007). However, this possibility remains to be explored computationally and by extending the analytical framework provided here.

Given that both our theoretical work and related experiments point to important challenges with stimulus encoding using a spike-phase approach, it is worth considering some alternatives. Most prominently, a code based on mean firing rates is a likely candidate. Indeed, stimulus discrimination is possible even when applying a broad temporal filter to single spikes and when considering a time course of excitatory post-synaptic potentials of up to 1000 ms (Schaefer et al. 2006). Such a code is easily read out by a simple linear decoder, a feature that poses a unique challenge to spike-phase coding.

Our work provides a starting point from which several further questions may be addressed. First, our study did not examine the impact of membrane potential oscillations in the context of a neuron that is susceptible to synaptic plasticity. One role of synaptic plasticity may be to shift spikes along the phase of an oscillation such that they become more reliable, as may be the case with phase precession (Harris 2005).

Second, our work focused on coding with single neurons and did not examine how population codes may help resolve some of the limitations of spike-phase coding discussed here. This is a complex issue, as efficient population coding in the hippocampus and sensory regions is an area of intense study (Friedrich and Stopfer 2001; Cury and Uchida 2010; Miura et al. 2012). It is possible that, at least in neural circuits with low levels of shared noise, some of the spike time variance across individual neurons may cancel out through population averaging.

Finally, all analytical results reported here assume that spike time variance does not continue to accumulate in the trough of oscillations. This is a reasonable assumption that is corroborated by both in vitro and in vivo recordings (Schaefer et al. 2006). However, future work is needed to carefully examine how membrane hyperpolarization resets spike time variance from one oscillatory cycle to the next.

In conclusion, the ubiquity of neural oscillations in the central nervous system has fueled an ongoing search for their functional role in sensory processing and motor control (Engel et al. 2001; Buzsaki and Draguhn 2004; Fries et al. 2007; Wang 2010). While this search has led to hypotheses on neural codes that combine spiking and phase information, one must tread carefully in assessing the benefits and limitations of such coding strategies.