1 Introduction

Electroencephalogram (EEG) and local field potential (LFP) recordings during slow-wave sleep, show a prominent slow oscillation at 0.2 to 1 Hz (Achermann and Borbely 1997; Steriade et al. 1993a). In vivo intracellular recordings revealed that sleep slow oscillation arise from periodic transitions between active (or Up) and silent (or Down) states in the membrane voltage of the cortical and thalamic neurons (Steriade et al. 2001; Timofeev et al. 2001).

Experimental evidences suggest that cortical network plays critical role in generation of sleep slow oscillations. Deafferented cortical slab generates a slow oscillation (Timofeev et al. 2000a) after sufficient time following deafferentation (Lemieux et al. 2014) and a slow-oscillation like activity was recorded in cortical slices in vitro (Sanchez-Vives and McCormick 2000; Runfeldt et al. 2014). A slow oscillation was observed following extensive thalamic lesions (Steriade et al. 1993b). Intracellular recordings suggest that the Up states of slow oscillation may arise from progressive accumulation of miniature EPSPs in the intracortical synapses (Timofeev et al. 2000a; Chauvette et al. 2010) and initiation of Up states critically depends on the activity of intrinsically bursting pyramidal neurons in layer V (Sanchez-Vives and McCormick 2000; Chauvette et al. 2010).

Previous computational studies reproduced many important properties of the sleep slow oscillation in the small thalamocortical network models based on the Hodgkin-Huxley type neurons (Timofeev et al. 2000a; Bazhenov et al. 2002; Compte et al. 2003). In these studies, the Up and Down states generation depended on the complex interaction of the intrinsic and synaptic currents. However, conductance based network models are computationally inefficient and simulations of the large-scale networks involving more than few tens of thousands of neurons with realistic connectivity become intractable. EEG and LFP recordings suggest that slow oscillation exhibits complex spatiotemporal dynamics (Sheroziya and Timofeev 2014; Massimini et al. 2004), which may influence properties of memory consolidation during deep sleep (Diekelmann and Born 2010). Thus, there is a need for developing computationally efficient neuronal models applicable for simulations of the critical properties and the large-scale spatio-temporal patterns of the sleep slow oscillation in vivo. While many classes of reduced models exist, e.g., integrate-and-fire model (Knight 1972; Tuckwell 1988; Hill and Tononi 2005), Izhikevich model (Izhikevich 2004; Izhikevich and Edelman 2008), they do not have explicit mechanisms for the action of the specific intrinsic currents which are known to play a critical role in generating sleep slow waves (Timofeev et al. 2000a; Compte et al. 2003).

In this new study we developed a network model for simulations of the cortical neuronal dynamics based on the computationally efficient discrete time neuronal models (Rulkov 2002; Rulkov and Bazhenov 2008). We showed that addition of nonlinear dynamical bias, activity dependent depolarizing mechanisms and slow hyperpolarizing mechanisms to the previously developed map-based model design (Rulkov 2002; Rulkov and Bazhenov 2008) can mimic the effects of the K+ leak, the persistent Na+ and the slow Ca2+-dependent K+ currents, which are required for modeling the wake-like activity and the sleep slow oscillation. The new model design was applied to study large-scale neuronal dynamics in 2D cortical network models. It revealed the complex spatio-temporal patterns and characteristic delays in transitions between Up and Down states of the cortical slow oscillation as observed during deep sleep in vivo. Here we emphasize that high computational efficiency of the model results from discrete time design of its dynamical equations. At the same time, the internal structure of the model can be fairly complicated, which allows to model all necessary biophysical components of the neuronal dynamics, without sacrificing its high computational performance.

2 Results

We first present in vivo recordings of the slow oscillation from cats during natural sleep. Next, we formulate the model and describe properties of a single model cell and compare it to the intracellular recordings. We then present dynamics of the simplified all-to-all connected network. Finally, we discuss simulations of the large-scale anatomically realistic network model and compare it to the field potential recordings in vivo.

2.1 In vivo experiments

EEG and local field potential (LFP) recordings from naturally sleeping animals during slow-wave sleep (SWS) revealed synchronized oscillations with a frequency around 0.5–1 Hz (Fig. 1a). Recordings from different regions of the cortex of anesthetized animals found highly synchronous onset of the slow waves (with delay less than few hundred milliseconds) (Fig. 1a, b) (Contreras and Steriade 1995; Volgushev et al. 2006). Intracellular recordings during slow-wave sleep revealed that during slow oscillation the pyramidal neurons exhibit rhythmic transitions between active (or Up) and silent (or Down) states of the membrane voltage (Fig.1c). Down states represent periods of hyperpolarized (< −75 mV) membrane voltage, while Up states are characterized by the depolarization and action potentials in many cortical neurons. The Up and Down states were clearly separated in the membrane voltage (see voltage histogram in Fig.1d). Active states resulted in a peak at ~ − 59 mV and silent states reflected in a peak at ~ − 67 mV. These two peaks in the voltage distribution (Fig. 1d) were separated by ~8 mV; such a bimodal distribution of intracellular voltage values represents important marker of the sleep slow oscillation.

Fig. 1
figure 1

Simultaneous multisite local field potential (LFP) and intracellular recordings during an episode of slow-wave sleep. a. Depth LFPs reveal characteristic slow oscillations at ~0.5 Hz. Note large upward deflections representing Down states and nested spindle oscillations (~10 Hz) during Up states. Reversal of the slow-wave polarity in the LFP depth profile comes then as natural consequence of differential location of recording electrode relative to the dipoles of large pyramids from deep layers. b. Scheme of a cat brain showing LFP electrode locations (small filled circle) and the location of the recording chamber (dotted circle) for intracellular recordings. c. Intracellular recording from a cortical pyramidal cell during slow-wave sleep recorded simultaneously with LFPs shown in A. d. Histogram of the membrane potential distribution of the neuron shown in c. Note bimodal distribution with the left peak representing membrane voltage during Down states and the right peak corresponding to the Up states

Fig.1 presents data of the electrophysiological recordings of slow-wave activity in vivo in cats. While this figure is not supposed to provide a rigorous analysis of the slow-wave activity, it summarizes characteristic electrophysiological features, which are commonly observed in recordings of slow-wave oscillations in animals and humans (Achermann and Borbely 1997; Steriade et al. 2001; Timofeev et al. 2001, 2000a; Lemieux et al. 2014; Sanchez-Vives and McCormick 2000; Runfeldt et al. 2014; Steriade et al. 1993b; Chauvette et al. 2010; Volgushev et al. 2011). This includes: (a) low frequency (<1 Hz) LFP oscillation (Fig. 1a) at multiple cortical location (Fig. 1b); (b) transitions between active and silent states in the intracellular activity of pyramidal neurons (Fig. 1c); (c) bi-modal membrane voltage distribution of pyramidal neurons (Fig. 1d).

While past studies succeeded in modeling many characteristic properties of the slow oscillation (Bazhenov et al. 2002; Compte et al. 2003), they were limited by the Hodgkin-Huxley design and, as a result, simulations of relatively small neural networks. Understanding complex spatio-temporal properties of the slow oscillation (Massimini et al. 2004; Volgushev et al. 2011) requires analysis of the large-scale multi-dimensional multi-layer network models. While many reduced neuronal models exist (Knight 1972; Izhikevich 2004; Izhikevich and Edelman 2008), they lack essential intrinsic properties necessary for simulating transitions between Up and Down states of the slow oscillation. Below we address this issue by developing, based on our previous design (Rulkov 2002; Rulkov and Bazhenov 2008; Bazhenov et al. 2008; Rulkov et al. 2004), a new class of reduced model neurons capable of reproducing properties of both wake and sleep states in the thalamocortical networks.

2.2 Map-based neuronal model

In this work we propose computationally efficient phenomenological models for simulation of the cortical pyramidal cells and inhibitory interneurons. The model is implemented in the form of difference equations (a map) based on previous works (Rulkov 2002; Rulkov et al. 2004). In the following section we first describe the main equations that we used for modeling of a single neuron dynamics.

The model of a single isolated cortical pyramidal cell included 4 continuous dynamical variables, which are governed by the following set of the difference equations:

$$ {\displaystyle \begin{array}{l}{x}_{n+1}={f}_{\alpha}\left({x}_n,{y}_n+{\beta}_n\right),\\ {}{y}_{n+1}={y}_n-\mu \left({\mathrm{x}}_{\mathrm{n}}+1\right)+\mu \left(\upsigma +{\upsigma}_{\mathrm{n}}\right),\\ {}{u}_{n+1}={\gamma}_u{u}_n+H\left({x}_n-1\right),\\ {}{k}_{n+1}={k}_n+H\left({x}_n+0.5\right)\left({K}_1-{k}_n\right)+H\left(-\left({x}_n+1\right)\right)\left({K}_0-{k}_n\right)\end{array}} $$
(1)

Here x n , y n , u n and k n are time-dependent continuous dynamical variables at discrete moments of time n. The time step for model (1) is fixed and assumed to be 0.5 ms. Hence, the ratio n/2 defines simulated time period in milliseconds. Below we explain the different components (equations) of the proposed model of the single pyramidal neuron. The complete description of the network model and its specific parameters can be found in section 4.

2.2.1 Spike-generating mechanism

As in the original model (Rulkov 2002) the spike generating mechanism is described by two variables x n and y n (the first two Equations in (1)). Variable x n defines transmembrane voltage of the neuron as V n  = 50x n  − 15. Spike waveform is determined by nonlinear function f α , which was modified from its original form (Rulkov 2002) to get better control over the spike shape and firing rate:

$$ {f}_{\alpha}\left(x,w\right)=\left\{\begin{array}{cc}\frac{\alpha }{1-x}+S(w)& x<-0.5,\\ {}+1& -0.5\le x<+1,\\ {}-1& x\ge +1,\end{array}\right. $$
(2)

here function S(w) has the following form:

$$ S(w)=\left\{\begin{array}{cc}w,& w<{w}_0\\ {}{w}_0+\left(w-{w}_0\right){k}_n& w\ge {w}_0\end{array}\right. $$
(3)

Parameters α and w 0 in (2,3) control non-linearity of the spike generation mechanism. The main difference of spike-generating block (x n ,y n ) from the original model is in the function S(w). Note, that for fixed value k n  = 1 function S(w) reduces to S(w)w and the spike generating block (x n ,y n ) is now described by original map model (Rulkov 2002). The first two equations in system (1) can be viewed as a black box, which receives input in the form of β n and σ n and, based on that input, produces series of action potentials (output). In turn, β n and σ n may depend on external inputs and additional intrinsic currents (such as stimulation dc current, synaptic current, potassium leak current, afterhyperpolarization current and others). Similar approach, in capturing important effects of intrinsic currents, was used before for the design of after-spike hyperpolarization effect in model of cortical interneurons (Rulkov et al. 2004). By designing dependence of quantities β n and σ n on external and intrinsic currents, it is possible to incorporate additional biophysical mechanisms into the model. We found this hybrid approach rather useful for augmenting dynamical features of map model to capture effect of specific ionic currents and will demonstrate its application to the problem of slow-wave sleep oscillations modeling.

Before going into details of the proposed model (1), we first revisit basic properties of the original model to provide intuition on the model design. First, we consider only spike-generating block (x n ,y n ) and assume that β n and σ n are constant values, which are proportional to constant input current I 0 : σ n  = K σ I 0,  β n  = K β I 0. Due to the small value of the parameter μ ≪ 1, variable y n has relatively slow dynamics and equation x n  = f α (x n , y n  + β n ) defines a slow motion manifold (SM), which is convenient to plot on the plane (y n  + β n , x n ) (dashed blue curve in Fig. 2a). Intersection of slow motion manifold with line x  = σ + σ n  − 1 (solid horizontal line in Fig. 2a) defines fixed point (x , y ) in 2d phase space of the spike-generating block (x n ,y n ). The green solid curve along the slow motion manifold (Fig. 2a) represents a family of stable fixed points (FP) defined for different values of input current I 0 . Increase of I 0 changes σ n and shifts the fixed point FP upwards (along the green solid curve). When x * reaches the bifurcation point at the horizontal dashed line (Fig. 2a), the equilibrium, FP, loses stability via supercritical Neimark-Sacker bifurcation. For higher values of I 0 the equilibrium point is unstable, which leads to rapid increase of x n in time (see green curve with markers in Fig. 2a) until it reaches threshold value +1 where the system (1) resets it to x n  →  − 1 (thin dashed horizontal line in Fig. 2a). After that, the trajectory goes along the slow motion manifold and repeats the cycle of spiking as the value of I 0 remains above the stability threshold. Note that, the parameter σ controls the coordinate of the fixed point at resting potential (when there is no input σ n  = 0) and we further use this control to model effect of potassium leak current on coordinate of the resting potential.

Fig. 2
figure 2

Explaination of the model design and dynamics of a single model neuron. a: Phase plane (x n ,y n ) demonstrates basic properties of the spike-generating block (original map model). Label SM stands for slow motion manifold (blue dashed line), FP denotes stable fixed point. See text for details. Parameters σ n and β n are constants: σ n  = K σ I 0, β n  = K β I 0. Parameter σ = 0, α = 3.65, w 0 =  − 2.819, K σ  = 1, K β  = 0.133. b: F-I curves are shown for different values of the variable k n  = k = const. Decrease of k led to significant decrease of the neuron sensitivity to input (the slope of the F-I curve decreases). Parameters: p d  = 0,  p L  = 0.5, α = 3.65,  w 0 =  − 2.819. c: Parameter plane (p L , I 0) (the strength of the leak current p L vs DC input I 0) is shown. The boundary between green and white areas depicts Neimark-Sacker (N-S) bifurcation where dynamics of a single neuron change from the steady state (silence, white area) to the periodic spiking (green area). Red marker denotes change of N-S bifurcation type: for p L  ≾ 0.46 the bifurcation is supercritical, in other case (stronger leak currents) it is subcritical. d: An example of the transient neuron dynamics in response to DC input. At zero time the neuron was in quiescence. Application of sufficiently large depolarizing current I 0 = 4.0 (lasts continuously from t = 10 ms) led to the periodic spiking. Slow dynamics of the variable u caused spike frequency adaptation (compare inter-spike intervals at the beginning and at the end of the voltage trace). Parameters: p d  = 1.8, γ u  = 0.997, P L  = 0.6.

In the oscillating regime (tonic spiking), the variable w n  = y n  + β n controls the firing rate of the neurons: larger values of w n lead to higher rate. In order to control the dynamics of firing rate at the transients, we introduced a monotonically increasing piece-wise linear function S(w). For w > w 0 (area, bounded by thin vertical dashed line in Fig. 2a) the slope of S(w) is controlled by variable k n  > 0. When k n is small (k n  < <1) function S(w) increases slowly with w and limits the impact of w on the neuron firing rate. In other words, variable k n controls input-output relations of the neuron, namely, its excitability and F−I curve. Effect of k n on the model dynamics is illustrated in the Fig. 2b, where several FI curves are plotted for the different fixed values of fixed k n  = k = const. Note, that decrease of k did not affect the bifurcation point (corresponding to transition from silent to spiking state), but changed the slope of the F-I curve. Similar effects were observed experimentally in (Guan et al. 2007) where blockade of the fast depolarization-activated potassium channels reduced spike threshold significantly and increased a slope of the F − I curve of a pyramidal neuron.

The described above spike-generating mechanism captures dynamics of the fast Na+ and K+ currents that are responsible for spiking activity of neuron (Hodgkin and Huxley 1952). Further, time-dependent quantities σ n ,  β n represent the sum of the intrinsic and synaptic currents of a neuron:

$$ {\sigma}_n={K}_{\sigma }{I}_{total},\kern0.5em {\beta}_n={K}_{\beta }{I}_{total},\kern0.5em {I}_{total}={I}_0+{I}_{syn}+{I}_{nap}+{I}_d+{I}_{leak} $$
(4)

Here K σ  = 1, K β  = 0.133 are constants and total current I total consists of the following parts:

  • I 0 is a dc current applied to the neuron;

  • I syn is a sum of synaptic inputs;

  • I Nap  = p Nap /(1 + exp(−20(x n  + 1.05))) models effect of the persistent Na+ current (I NaP ), where p Nap stands for the maximal conductance of the current;

  • I d  =  − p d u n (x n  + 1.2) models effect of the slow hyperpolarizing currents, such as the calcium-dependent potassium current (I K(Ca) ), where parameter p d defines a strength of the current;

  • I leak  =  − p L (x n  − x baseline ) is responsible, in combination with constant σ, for modeling of the leak current. Throughout the paper we assume that parameters σ is always linearly proportional to parameter p L : σ =  − 0.4p L ;

Quantity β n is always bounded, such that β n  → −10−4 if β n  < −10−4. Effects and implementation of the “intrinsic current” I leak , I d and I Nap , are describe below.

2.2.2 Effects of leak current

Transition to sleep is associated with reduction of the Acetylcholine which results in an increase in K+ leak currents (McCormick 1992). It was shown that the onset of sleep slow oscillation requires relative hyperpolarization of the membrane voltage of all cortical neurons (Bazhenov et al. 2002). Increase of K+ leak currents shifts the resting potential of the cortical neurons to hyperpolarized level (~ −75 mV) and decreases overall neuron excitability. In our map-based neuronal model baseline potential is directly controlled by the parameter σ in the equation for variable y n , such that x baseline  = 1 − σ. Moreover, the quantities σ n ,  β n in the model include a component I leak  =  − p L (x − x baseline ), which does not change the baseline, but rather influences an overall neuron dynamics similar to the effects of the leak currents on the passive membrane properties in the conductance-based models (see below for details). Hence two parameters σ and p L in the model control impact of the leak current on the neuron dynamics: σ shifts the baseline and acts similar to reversal potential and p L determines the passive neuronal dynamics (firing frequency, rate of convergence to the resting state, etc). In this work we combine these two quantities by assuming the constraint: σ =  − 0.4p L . Hence, changing parameter p L , controls both the baseline potential and the strength of the leak current.

Importantly, the leak current also controls threshold activation current I 0, which is necessary to apply for generation of action potential. Bifurcation diagram on a plane of parameters (p L , I 0 ) (Fig. 2c) consists of two areas corresponding to the periodic spiking and silent states, separated by a curve of Neimark-Sacker bifurcation (Kuznetsov 1998), an analogue of Andronov-Hopf bifurcation for map dynamics. In the framework of map based neuronal model this bifurcation has been studied in (Shilnikov and Rulkov 2003, 2004). With an increase of the input current I 0 and/or decrease of the leak current (decrease of p L ), the model switched from the stable resting (silent) state (uncolored area) to the periodic spiking (green colored area).

Note that the resting membrane potential at absence of input current I 0  = 0 was significantly lower for the larger values of p L (since parameter σ =  − 0.4p L controls the baseline). For the large values of p L we observed a clear separation in membrane voltages between silent (I 0 = 0) and spiking (I 0 > 0) states as required to explain experimental data of bimodal distribution of the neuronal membrane voltages during slow oscillation (see below for network simulations). Indeed, application of DC input (e.g., I 0 = 4.0) to a neuron at the baseline voltage V  ≈  − 75 mV led to a rapid depolarization and spiking with membrane voltage staying above -65 mV (recall, neuron voltage is defined as V n  = 50x n  − 15).

2.2.3 Slowly activating hyperpolarazing currents and adaptation

Cortical pyramidal neurons contain a family of the hyperpolarizing potassium currents that tend to reduce excitability of a neuron in the Up state, and, likely, take a part in the Up state termination. These currents include the calcium-dependent and the sodium-dependent potassium currents (Traub et al. 1991; Tanabe et al. 1998). To model effects produced by these slow hyperpolarizing currents, we introduced additional slow dynamical variable u n , which integrates contribution of spikes and exponentially decays towards zero with relaxation rate controlled by the parameter γ u  (0 < γ u  < 1) (third Equation in (1)):

$$ {u}_{n+1}={\gamma}_u{u}_{n+1}+H\left({x}_n-1\right) $$
(5)

Here H(x) stands for Heaviside step-function. Hence, variable u n grows on average at high enough spiking rate and produces the hyperpolaizing effect since I d  =  − p d u n (x n  + 1.2). Fig.2d illustrates effect of spike frequency adaptation in the model. Spiking activity led to an increase of the variable u n (Fig. 2d, bottom), which in turn reduced spiking rate. This effect was equivalent to the activation of Ca2+ −dependent K+ currents in conductance-based models (Bazhenov et al. 2002; Tanabe et al. 1998; Mainen et al. 1995; Destexhe and Pare 1999). The spike frequency adaptation was one of the key factors leading to the termination of an Up state in the network simulations. The strength of the adaptation in the model was controlled by parameter γ u , that determined decay rate of the slow variable u n and parameter p d that determined effect of the slow variable u n on the spike-generating mechanism (x n , y n ) (see Eq.(4)). Higher values of these parameters caused stronger spike frequency adaptation.

A neuron input resistance is reduced during Up states of the slow oscillation (Steriade et al. 2001). This effect mainly depends on the high level of synaptic activity in the Up states (Shu et al. 2003), however, additional contribution may arise from an increase in the voltage-gated hyperpolarizing currents such as Kv1 current (Guan et al. 2007; Guan et al. 2006) and/or through adaptation of fast Na+ channels (Fleidervish et al. 1996) . These mechanisms are rapidly activated at depolarized voltages (near spike threshold) and decrease excitability of the neurons. One of the consequence of that is a reduction in the sensitivity to input. In our model, we used a simple phenomenological approach to describe this property. Namely, we control the slope of the function S(w) by means of the variable k n (see Equations (2) and (3)): the variable rapidly decreases in the Up state from relatively high value K 1 (high sensitivity) to K 0 (0 < K 0 < K 1), so the slope of the function S(w) reduces, which decreases sensitivity of a neuron to synaptic inputs. This was implemented as a dynamical dependence of the k n on the state of the variable x n  : k n switches to K 0 (low sensitivity) when voltage crosses threshold x n  =  − 0.5 (cell is in the Up state) and switches back to K 1 (high sensitivity) when cell leaves the Up state, so when x n  <  − 1, k n  → K 1. All together this can be expressed as: k n + 1 = k n  + H(x + 0.5)(K 1 − k n ) + H(−(x + 1))(K 0 − k n ) (the last Equation in (1)) where H(x) is a Heaviside step function. Decrease of the input resistance in the Up state, as observed experimentally, helps to prevent over-excitation of the neuron and provides physiological range of firing frequencies.

2.2.4 Effect of persistent Na+ current (I Nap )

Persistent Na + current contributes to the initiation and maintaining of the Up state (Timofeev et al. 2000a). In our model I Nap was implemented as, I Nap  = p Nap S(x + 1.05), where S(x) = 1/(1 + exp(−20x)) is a sigmoidal activation function. The effect of I Nap is immediate when the voltage reaches a critical level (1/2 of I Nap activation was set to −67.5 mV). Hence, at sufficiently high voltage values I Nap provides positive depolarizing force, contributing to maintaining the Up state. Note, however, the I Nap along cannot sustain the neuron in the active depolarized state (see below) (Timofeev et al. 2000a).

2.3 Discrete time step provides high computational efficiency of the model

The main advantage of the proposed model (1) is its high computational efficiency (due to the large discrete time step) and, at the same time, complex enough structure, which allows one to use the model for simulation of the relevant dynamics found in the biological neurons and HH models. This is necessary for modeling of various aspects of sleep slow-wave activity. Table 1 below summarizes comparative analysis of the computation costs for different models: proposed model (1), original map-based model (Rulkov 2002) and adaptive exponential integrate-and-fire model (Adexp) (Brette and Gerstner 2005). We select Adexp model, because it is one of the simplest (in structure) and computationally efficient ODE-based models, which have been successfully used for modelling of slow-wave sleep oscillations reported in (Destexhe 2009).

Table 1 Comparative analysis of computation time for different models. All models were set up in periodic spiking regime and 1000 ms of model time was simulated. For numerical integration of ODE (Adexp) we used Euler method with adaptive step size defined by local integration error ∣ε∣. Calculation of original and modified map models is straightforward (according to system, (1)) and does not require any numerical integration scheme. Hence the accuracy is determined by floating point calculations (FPC)

The analysis showed that the original map model was 7-fold faster than model (1). This is a cost of modifications in the form of additional equations in the model (1) to achieve proper behavior. Note that the original map model could not be directly used for simulation of slow-wave sleep oscillations, since it fails to reproduce important dynamical features of Up and Down states (a characteristic feature of slow-wave sleep oscillations). Due to discrete-time form of description the map models were designed and tuned to generate state samples with time interval 0.5 ms. As the result simulation of map dynamics does not involve any integration routine and the accuracy is determined by the resolution of variables (we used double precision in our case). We also would like to emphasize that computational speed of the map-based simulations can be significantly increased using integer computations with rescaled variables as it is demonstrated in (Rulkov et al. 2016).

The Adexp model is defined with system of ODEs, therefore the accuracy of simulated behavior depends on the time step of numerical integration scheme. For comparative analysis of computational speed of this model, we used Euler method with adaptive step size (to limit local error of the solution ∣ ε∣, see Table 1). At a good level of accuracy (∣ε∣<0.02 mV) Adexp model was about 10 times slower than modified map model (1). This is a consequence of the fact that much smaller time step was needed for Adexp model (average time step was <h>=0.083 ms and minimal h min  = 3.410−4 ms). The computational efficiency of the Adexp model became comparable with the map at accuracy level ∣ε∣<0.5 mV, which required averaged time step <h>=0.763 ms and minimal time step h min  = 0.763 ms. At this level of accuracy, the simulated waveforms may significantly deviate from actual solutions and behavior of the corresponding ODE model affecting the network dynamics.

2.4 Responses of map-based model neuron matches single-cell experimental recordings

During NREM sleep the level of Acetylcholine is reduced compare to awake, which is known to increase conductance of the potassium leak currents (McCormick et al. 1991). In our model, we took advantage of having explicit representation of the leak current effects and we tested neuron response to DC input for the low and high levels of the acetylcholine. Upon DC stimulation there was an increase in spiking activity and a shift in the resting membrane potential to depolarized state (Fig. 3a). The high leak current, I leak , condition (low level of Acetylcholine) revealed lower frequency of spikes and was more hyperpolarized compared to the low leak current condition (high level of Acetylcholine) (Fig. 3a). This was in agreement with in vivo recordings during sleep vs awake state (Fig. 3b). In the model, as in vivo, frequency of spiking during DC stimulation reduced after few initial spikes due to the spike frequency adaptation (compare Fig. 3a, b). The spike-frequency adaptation was due to the slowly activating hyperpolarizing current I d (see Eqs. (4) and (5)).

Fig. 3
figure 3

Single cell properties of the model and in vivo. a Membrane voltage traces of a single map-based neuron are similar to those of a cortical regular spiking neuron. Decrease of the parameter pL (strength of leak current) led to the depolarization of the baseline potential and decrease of the interspike interval. Parameters of the map-based model: p d  = 1.8, γ u  = 0.995, K 1 = 0.025. b Voltage traces of a regular spiking neuron are shown in response to DC pulse during sleep (high leak conductance) and wake (low leak conductance, presumably due to the high level of acetylcholine in awake). c Effects of the persistent Na + current in vivo (left), in the map-based model (middle) and Hodgkin-Huxley model (right). Here the voltage traces show responses of a single neuron to the short depolarizing pulse (5 ms, 0.5 nA in vivo, 0.4 a.u. in the map model, and 2.5 in the HH model) at the different levels of the base membrane voltage (indicated on the left). The base voltage level was changed by DC input. Note that sharp decay of the stimulation current at the end of the pulse led to the discontinuity of the voltage derivative over time. Parameters of the map model: K 1 = 0.025, w 0 = 2.821, p d  = 1.0, γ u  = 0.995

Next, we examined the role of the other intrinsic currents in the single neuron dynamics. Persistent Na+ current (INaP) is activated at depolarizing potentials and may provide nonlinear amplification of the incoming depolarizing inputs. During sleep slow oscillation, this allows pyramidal neurons to effectively integrate miniature post-synaptic potentials and, as a result, facilitates the onset of an Up state (Timofeev et al. 2000a). In vivo, the effect of INaP was tested in an experiment with anesthetized cat using pulse stimulation (5 ms pulse with 1 nA) of a single cortical pyramidal neuron hold at the different levels of the resting membrane potentials (maintained by constant current injection) (Fig. 3c, left). When the overall depolarization was sufficiently large (see 4-th voltage trace from bottom in Fig. 3c, left), the INaP was activated which resulted in prolonged depolarization (5 ms vs ~20 ms; Fig. 3c lower vs 4th from bottom). The longer depolarized response led to a spike about 20 ms after the pulse onset. We previously reproduced this effect by modeling persistent Na + current in the Hodgkin-Huxley type neuron model (Fig. 3c, right) (Timofeev et al. 2000a). Here we report that our new map-based model shows qualitatively similar dynamics (Fig. 3c, middle). In the model, effect of INaP was introduced by including additional nonlinearity I Nap  = p Nap H s (x n  + 1.05) (see Eq. (4)), which provided a positive input to the spike generating mechanism when the neuron voltage was sufficiently depolarized (half activation is at −67.5 mV). This facilitated spike initiation. We concluded that the new model captures important features of the single cell dynamics found in cortical pyramidal neurons in vivo.

2.5 Dynamics of all-to-all coupled network explains generation of up state

Excitatory connections play an important role in generating the sleep slow oscillation (Timofeev et al. 2000a). Below, we examined how excitatory synaptic connections in combination with intrinsic currents determine activity in a small network of excitatory cortical neurons. Such a simplified network model represents a minimalistic configuration, which is able to initiate and sustain the active Up state due to recurrent excitation (Fig 4a); in the next sections we will present dynamics of the large-scale network model with both excitatory and inhibitory neurons. Complete model description, including equation for synaptic dynamics, can be found in section 4.

Fig. 4
figure 4

The basic mechanisms of the Up state generation in the map-based and conductance-based models. a All-to-all network structure is shown, which represents a minimalistic model of Up and Down states generation. b Voltage traces of one representative neuron (out of the 100 neurons total) are shown. Rapid depolarizing pulse switched the network to the Up state where the neurons stayed (due to the mutual excitation) until internal depression (described by the variable u) and synaptic adaptation caused transition to the quiescence. Duration of the Upstate depended on the leak current (compare different traces). Parameters: p d  = 2.6, γ u  = 0.995, \( {G}_{AMPA}^{syn}=0.0133,{G}_{AMPA}^{mini}=0,\sigma =-0.04{p}_L. \) c Conductance-based model shows qualitatively similar dynamics. d, e Dependence of the Up state duration and firing frequency of neurons (shown as a color) at the Upstate on the synaptic AMPA strength and the strength of the leak current p L . The firing rate in panel E was calculated as an inverse averaged interspike interval during Up states

Brief depolarizing input applied to all neurons initiated transition from the silent (Down) to the active (Up) network state. DC input was much shorter than the length of the active state it initiated (Fig.4b, c), suggesting that intrinsic currents and synaptic interactions maintained the active state of the model. Importantly, for relatively large leak currents (top 2 traces in Fig.4b, c), the active spiking state was eventually terminated. This happened because of the slow growth of the adaptation variable \( {u}_n^{(i)} \) in each neuron (see, e.g., Fig. 2d) and depression of AMPA-type synapses (variable \( {d}_n^{ij} \)) across the network, which led to the rapid transition from Up to Down state. The frequency of spiking and Up state duration depended on the strength of the leak current parameter. In both map-based (Fig. 4b) and conductance-based (Fig. 4c) neurons, stronger leak current resulted in shorter Up state and lower firing frequency. The strength of synaptic, \( {G}_{AMPA}^{syn} \), and the leak, P L , currents had opposite effect on the Up state duration (Fig. 4d) and spiking frequency (Fig. 4e). When AMPA strength was sufficiently high and/or p L was small, the active state was never terminated (see boundaries in Fig. 4d, e and bottom traces in Fig.4b, c). Note that discontinuous behavior of the firing rate in panel E was caused by the variations of the number of spikes within Up state as parameters changed. For example, when \( {G}_{AMPA}^{syn} \) increased, the Up state duration increased as well, which, in turn, led to discrete additions of new spikes to the active state. These spike additions caused “jumps” of the firing frequency in Fig.4e.

2.6 Wake and sleep like activity in 2D networks with local connectivity

We next extended the reduced model described in the previous section to incorporate miniature EPSP (minis) and realistic network connectivity of a two-dimensional network with excitatory pyramidal neurons and inhibitory interneurons (Fig. 5a). Most of the previous studies of the slow oscillation are limited by 1D networks (Bazhenov et al. 2002; Compte et al. 2003; Hill and Tononi 2005; Chen et al. 2012; Wei et al. 2016). Here we take advantage of using efficient neuronal models to explore spatio-temporal structure arising in 2D network models due to the local synaptic connectivity: the connection radius R was set to 5 neurons in PY layer, the same radius of connectivity was used for PY-PY, PY-IN and IN-PY connections (there were no IN-IN connections in the model). Here we used the same connectivity radius for all cell types, which does not take into account the long-range connections between neurons. More comprehensive analysis, which covers different synaptic coupling configurations, is presented in the following sections. All simulation with 2D network were performed using periodic boundary conditions.

Fig. 5
figure 5

Irregular spiking activity for the low K+ leak current (“awake” state) in the 2D cortical network. a Two layers of the 2D network are shown schematically. “PY” stands for a layer of the pyramidal neurons, while “IN” denotes a layer of the interneurons. Here we modeled 200 × 200 PY and 120 × 120 IN. The network has both intra- (PY-PY) and extra-layer (PY-IN and IN-PY) connections within a radius R = 5 neurons (locally connected network). Periodic boundary conditions were used. b Irregular spiking activity is shown for 1D section of the network (200 neurons, black dots denote spike times). c Membrane voltage traces of two representative PY neurons. d Histogram of the membrane voltage revealed one prominent peak at ~ −61 mV, which is typical for in vivo recordings in awake state (see text for details). Parameters \( {\displaystyle \begin{array}{l}{p}_L=0.15,{\tilde{G}}_{AMPA}^{syn}=0.066,{\tilde{G}}_{AMPA}^{mini}=0.013,{\tilde{G}}_{AMPA}^{syn}=0.044,\\ {}{\tilde{G}}_{AMPA}^{\min i}=0.006,{\gamma}_{s,d}^{dep}=0.75,{p}_d=0.1,{\gamma}_u=0.995.\end{array}} \)

It is important to note that all synapses in the network generated spontaneous random releases of neurotransmitter, which resulted in miniature EPSPs (minis). Experimental recordings indicate that frequency of the minis is strongly modulated by the neuronal activity. In (Timofeev et al. 2000a) intracellular recordings in deafferented cortical slab revealed that the mean rate of minis is minimal after an Up state and recovers during a network silence during the following Down state. Hence, in our model we implemented this mechanism by modulating the mean frequency of minis. Similar to experimental recordings, the rate of spontaneous releases decreased the periods of evoked release (action potentials) and slowly recovered during the silent phase (see section 4 for details).

To set up the baseline state of the model, we first reduced K+ leak current (parameter p L  = 0.15) in the model neurons that resulted in a random firing of all neurons, similar to awake recordings in vivo (Steriade et al. 2001; Timofeev et al. 2001, 2000b) (Fig. 5b, c). Distribution of membrane voltages was unimodal with a single peak around −60 mV (Fig. 5d). Next we increased K+ leak current (parameter p L  = 0.5) to simulate transition to NREM sleep. This led to spontaneous generation of the slow oscillation (Fig 6a, b) consistent with our past experimental studies and simulations with Hodgkin-Huxley type models (Timofeev et al. 2000a; Bazhenov et al. 2002). The entire network switched periodically between Up (lasting 500–600 ms) and Down (lasting 200–300 ms) states (Fig. 6b). The neurons were depolarized and spiked during Up state and hyperpolarized during Down states in agreement to in vivo data (compare Fig 6b to Fig 1). Further, the average activity of a small region of the network (20 × 20 neurons) displayed periodic oscillations (Fig. 6b bottom). Membrane voltage histogram (Fig. 6c) was bimodal with two distinct peaks corresponding to Up and Down states (compare to Fig.1d). To identify the time points of transition from Down state to Up state in the individual neurons, two threshold values V + and V (Fig.6d) were applied, similar to experimental studies (Volgushev et al. 2011) (see section 4). Remarkably, we found that transition to an Up state was less synchronous in comparison to an Up state termination. Fig. 6d shows the overlapping voltage traces of 50 different neurons right before transition to from Down to Up state (left part of the panel) and slightly before Up to Down transition (right part of the panel). The range of transition times across neurons (shown by black horizontal bars) was much larger for Down to Up transition, which agrees with in vivo data (Sheroziya and Timofeev 2014; Volgushev et al. 2006). The transition times for each neuron were calculated based on the intersection of the voltage trace with thresholds V + (for Down to Up) and V (for Up to Down, see section 4 for details). This effect is robust to the changes of the threshold values V + and V and will be discussed in details in the next section. Overall, 2D cortical network model based on map-based neurons and spontaneously occurring miniature EPSP revealed oscillatory activity similar to sleep slow-wave activity found in vivo.

Fig. 6
figure 6

Slow-wave like activity for the high K+ leak current (“sleep” state) in the 2D cortical network. a Raster plot shows activity in 1D section of the 2D network, the same as illustrated in Fig. 5a. Vertical axis corresponds to the neurons’ number, horizontal axis is time. Color decodes membrane voltage V i . b Top two traces depict membrane voltage of one PY and one IN neurons taken from the network simulations shown in the panel A (time axis is the same). Bottom trace shows averaged voltage for subgroup of the neighboring neurons (400 cells total). The network displayed periodic transitions between Up and Down states similar to in vivo experiments shown in Figure 1. The period of oscillations was about 1 sec. c Membrane voltage histogram of the PY neurons. Two peaks are prominent, which correspond to the voltage in Up and Down states. Two vertical dashed lines depict thresholds V + and V , which were used for Up and Down state detection (see section 4). d The panel shows overlapping voltage traces of 50 neurons (taken randomly from the network) before transitions from Down to Up (left) and Up to Down states (right). Two solid horizontal bars on the left/top depict overall range of times of Up state initiation (upper bar) and termination (lower bar) across all the neurons. Note, large jittering due to the minis resulted in less synchronous (wider upper bar) Up state initiation in comparison to its termination. For parameters see Fig. 7

2.7 Spatiotemporal features of slow oscillation in 2D networks: Travelling wave dynamics

For one representative cycle of the slow oscillation (Fig. 6a), we plotted a series of snapshots of activity in the pyramidal cell layer (Fig.7b). The set of dashed vertical lines in Fig.7a indicates the moments of time (Fig.7b) were captured. As before, the active states originated from accumulation of the spontaneous miniature excitatory postsynaptic potentials (minis, see Eq. (7)). Minis dependent depolarization during Down state led to an activation of INaP and initial spiking in some cortical neurons; this triggered Up state initiation. Note, that locations of the initiation sites were random (see, e.g., top left snapshot in Fig. 7b) and varied from one Up state to another. These initiation sites become sources from where spike waves (transition waves) propagated throughout the network (see snapshots #2–4 in Fig. 7b) and subsequently triggered other neurons to switch to an active state.

Fig. 7
figure 7

Spatio-temporal analysis of the network activity reveals multiple sources of Up state initiation. a Voltage trace of single PY neuron from 2D network simulation, the same as illustrated in Fig. 5a. Vertical dashed lines indicate times of the snapshots shown in the panel B. b Network activity is shown as a series of snapshots. Color decodes transmembrane voltage of the PY neurons (see color bar). First 4 snapshots display network dynamics at the beginning of an Up state (see also 4 dashed vertical lines in the panel a). Multiple sources initiate concentric spike waves leading to the onset of the Up state. In the middle of the Up state (snapshots #5 and #6) the spike waves are less prominent than near the onset. The last 3 snapshots (#7–9) show the process of the Up state termination, which also had a form of a propagating wave. Last snapshot depicts global downstate in the network. Parameters of the network: radius of synaptic connectivity R = 5 (distance equivalent to 5 cells in PY layer), the same distance was used for all type of connection PY-PY, PY-IN and IN-PY. For PY-PY connections \( {\tilde{G}}_{AMPA}^{syn}=0.121 \) (roughly corresponds to ~3 mV evoked EPSP at −75 mV), \( {\tilde{G}}_{AMPA}^{mini}=0.024 \); for PY-IN connections \( {\tilde{G}}_{AMPA}^{syn}=0.04 \), \( {\tilde{G}}_{AMPA}^{mini}=0.008 \) for inhibitory IN-PY connections \( {\tilde{G}}_{GABA}^{syn}=0.04 \), \( {\tilde{G}}_{GABA}^{mini}=0.004 \). The described above values \( \tilde{G} \) represent rescaled conductances (see section 4). Parameters of a neuron model: γ u  = 0.996, p L  = 0.5, p d  = 1.2

Termination of Up state was controlled by the same factors we discussed previously (see Fig. 4) – the spike frequency adaptation and synaptic depression. Because of the strong leak currents (parameter p L in the map model), Up state termination led to a strong hyperpolarization and transition to the Down state where membrane voltages of the neurons stayed relatively low, about −75 mV. The snapshots #7 and #8 (Fig. 7b) illustrate spatio-temporal pattern of Up state termination. Similar to initiation, Up state termination had a structure of the transition wave - Down state was initiated at several locations and propagated throughout the network. The last snapshot (#9, Fig. 7b) shows global Down state when all neurons were in the hyperpolarized quiescent state.

Down state duration in our model depended on the time scales of intrinsic and synaptic variables: (i) parameter γ u  (third Equation in system (1)) determines the time scale of removal the spike frequency adaptation (Eq. (5)); (ii) parameter \( {\gamma}_d^{rec} \) determines the time scale of synaptic recovery from depression (Eq. (8)) and (iii) the form of the function M(n), which determines the refractory period of minis (see Eq.(9)). As soon as all these intrinsic and synaptic factors became close to their baseline values (u n is small enough, \( {d}_n^{ij} \) and M(n) are close to 1), the network was able to initiate the next Up state.

2.8 Termination of up states occurs more synchronously than up states initiation

We next examined how the spatial pattern of the Up state initiation evolved over multiple Up-states. The time of the Up-state initiation for each neuron was determined based on the threshold method (see section 4). Figure 8a presents latency maps (see section 4) of the transitions between Up and Down states. The color in these plots denotes the time of transition (in ms) for each neuron relative to the neuron that initiated transition. The first row of Fig. 8a shows Down to Up state transition latency maps for 4 different Up states from the same network: first 3 plots show 3 consecutive Up states (serial numbers are indicated below the pictures) and the last plot shows the 20th Up state from the first one. The second row shows latency maps of the Up to Down state transition for the Up states presented in the first row. We found that the transition wave of Up state initiation was slower compared to the transition wave Up state termination (compare scale color bars in Fig. 8a). A Gaussian filter (SD = 3) was applied to the latency maps to identify initiation sites (Fig. 8b). It revealed that Up state initiation has a structure of transition wave with clearly identifiable initiating zones (bounded areas of dark blue color) from where Up state propagated throughout the network (Fig. 8b). Note, that there were always several independent initiation zones triggering an Up state, so more than one wave occurred in the network.

Fig. 8
figure 8

Synchronization properties and history dependence of the slow waves. a Latency maps (see section 4) for 4 different Up states. Top row represents latency maps of the Up state initiation. First 3 images show 3 consecutive Up states (serial numbers are indicated below the pictures), the last image corresponds to the Up state #20 after the first one. Bottom row represents latency maps of the Up state termination (same Up states as shown in the top row). b Filtered data from the top row in panel a (Gaussian filter with σ = 3). c The difference in similarity (see section 4) between two Up states (i and j) initiation latency maps (panel a) as a function of the time delay between these two Up states measured by cycle count (difference i − j). Note that consecutive Up states have very similar shape and the similarity decays to baseline after 5–15 cycles of slow oscillation. Two curves correspond to the different values of the recovery parameter \( {\gamma}_{-}={\gamma}_{\mathrm{u}}^{-} \). d Averaged histograms of the time delays across all the neurons for Up state initiation (Down-to-Up transition, circular markers) and Up state termination (Up-to-Down transition, square markers). Up state termination was much more coherent across the network than Up state initiation (see also Fig. 6d). e Ratio of standard deviation of Up state latencies to standard deviation of Down state latencies shown as a function of number of sources

Analysis of the latency maps revealed “history dependence” – consecutive Up-to-Down (Down-to-Up) state transition patterns had similar spatial structure (Fig. 8a, b, first 3 plots), resulting in the similar spatio-temporal pattern of the slow waves. This effect was reported previously in 1D models (Wei et al. 2016) and depended on the slow intrinsic and synaptic recovery processes during Down states of the slow oscillation (see section 3 at the end of the previous section). However, the Up states that were suffiently separated in time (e.g. >10 cycles of slow oscillations), had completely independent spatio-temporal patterns (Fig. 8a, b, latency map #20 with #1). To explore this effect quantitatively we introduced the “similarity measure” (Fig. 8c) (see section 4 ). It revealed that the spatio-temporal pattern of the slow oscillation was preserved for about 5–10 cycles of oscillation before similarity disappeared. Note, that because of the long periods of the entire network activation in each Up state, the similarity was around 0.8 even for completely independent patterns.

We previously proposed that history dependence of the slow waves may result from the slow inactivation of the Ca2+ dependent K+ current in the Down states of the slow oscillation (Wei et al. 2016). Since in our model activity dependent hyperpolarization is controlled by the variable u n (Eqs. (4) and (5)), we tested this by changing its recovery rate γ u . To avoid changing Up state duration, we used two decay time constants: \( {\gamma}_u^{+} \) and \( {\gamma}_u^{-} \). When the voltage was high (V >  − 65mV), we used \( {\gamma}_u^{+} \) to calculate the dynamics of u n , otherwise (V ≤  − 65mV) u n decayed with the rate \( {\gamma}_u^{-} \). As a result, when \( {\gamma}_u^{-}<{\gamma}_u^{+} \), deactivation variable decayed faster in the Down state. It speeded up recovery from the adaptation without affecting the Up state duration. The blue curve (circle marker) in Fig.8c corresponds to \( {\gamma}_u^{-}={\gamma}_u^{+}=0.995 \), so the recovery rate was relatively slow and the system exhibited prominent “history dependence” effect. For smaller \( {\gamma}_u^{-}=0.99<{\gamma}_u^{+} \) (green square markers), the curve was steep, which indicates much shorter history dependence. Note, that change of parameter γ u slightly affects the form spatio-temporal patterns of Up state initiation, which leads to slightly different asymptotic value for similarity (similarity measure for completely independent Up states).

Overall, the spatial pattern of an Up state termination (Up-to-Down transition) followed the pattern of that Up state initiation (Down-to-Up transition) (compare Fig 8a top vs bottom). However, the range for the latencies of the two transitions was widely different, with the Up state initiations being much slower and less synchronous (across the population of neurons) than the Up state terminations. Indeed, distribution of the latencies across all neurons and all slow waves was significantly narrower for Up state terminations (Down state initiation) (Fig. 8d). The voltage traces of the individual cortical model neurons plotted in the Fig. 6d clearly indicate a large noisy component in the membrane dynamics before an Up state onset (compare left and right sections of the Fig 6d), which is in a good agreement with previous experimental studies (e.g. Fig. 1 in (Chen et al. 2012), see also (Volgushev et al. 2006)). We hypothesized that the presence of stochastic minis at the Down to Up state transition leads to multiple Up state initiation sites and that contributes to the difference in synchronization properties of Up states initiation and termination. Indeed, the rate of minis is high at the onset of an Up state in comparison to the onset of a Down state (Timofeev et al. 2000a). The high rate of minis introduces a noisy component to the network dynamics that could result in less coherent behavior and much broader latency distribution for Down-to-Up transition times. To test this hypothesis, we performed a series of simulations of the network with zero mini strength (no noise) but varying number of artificially imposed Up state initiation sites. In this setup Up states were initiated by brief (10 ms) depolarizing inputs (varying number of inputs), that were periodically (1 Hz) applied to the different locations in the network and induced transition waves similar to mini-induced slow-wave dynamics (Fig.7). We found that for the large number of sources (≥9) the network exhibited behavior that was similar to the baseline network with minis, i.e. wider latency distribution for Down-to-Up in comparison to Up-to-Down transition (Fig.8e). This supports the idea that the noisy activity due to minis initiates large number of sources and contributes to a large difference in Up state initiation versus termination latencies. Recall that the distribution of time delays for Down-to-Up and Up-to-Down transitions were calculated based on the threshold levels V+ and V (Fig.6c, d). An exact choice of the values V+ and V may affect widths of the distributions, although, it does not change the effect qualitatively.

2.9 Large-scale simulations of 2D network: Role of long-range connectivity

In the previous sections we described the basic spatio-temporal properties of the slow-wave activity that arise due to the local synaptic connectivity in a relatively small 2D network model. In the following, we discuss the role of miniature EPSPs (minis) and long-range synaptic connections in properties of slow-wave sleep oscillations. In order to study the effect of long-range connections on the spatio-temporal patterns, we have to consider relatively large (in space) 2D cortical network. Increase of the length of the network dimensions produces quadratic growth of the overall number of neurons, which quickly leads to a need of simulation of the large-scale system. Here we leverage the effectiveness of the discrete time approach (modified map model (1)) and simulate dynamics of large-scale network consisting of 1.36 million of neurons (1000 × 1000 PYs and 600 × 600 INs) with more than 100 million of synapses. The network architecture was similar to Fig.5a.

Stochastic minis occurring in the excitatory connections between the cortical neurons are believed to play vital role in Up state initiation (Timofeev et al. 2000a; Bazhenov et al. 2002; Chen et al. 2012; Wei et al. 2016). To illustrate impact of minis properties on the network dynamics, we compared Up state initiation profiles in the large-scale models with minis of varying amplitude (Fig. 9a). As the amplitude of minis increased, complexity of the spatiotemporal pattern also increased. The network with a small amplitude of minis had very limited number of the initiating sites; an Up state propagation pattern formed concentric waves (Fig. 9a, left). Increase of the minis amplitude led to an increase of the number of initiating sites (Fig. 9a, middle/right). (It is worth noticing, that generation of minis obeys stochastic Poisson processes (7), so an increase of the minis amplitude also led to an increase in the stochastic component of the model). At the same time, the period of the slow oscillation increased and tended towards an nfinity as \( {G}_{AMPA}^{mini} \) decreased (Fig. 10a), indicating that sufficiently high minis amplitude is necessary for an Up state initiation. Number of the initiation sites increased dramatically when the minis amplitude increased beyond certain value (\( {\tilde{G}}_{AMPA}^{mini}=0.0022 \)) (Fig. 10b). The nontrivial fact here is that the number of initiation cites increased rapidly, resembling discontinuous phase transition effect. This suggests the possibility of a “state transition” like event that may have some similarities with sleep stage 2 to SWS transition when there is a large increase in number of slow waves (Aeschbacj and Borbely 1993). Reduction of acetylcholine is known to increase the strength of evoked and spontaneous AMPA release (Gil et al. 1997), and acetylcholine reaches its lowest level in stage 3 of sleep (Lee et al. 2004).

Fig. 9
figure 9

Snapshots of large-scale network dynamics. The network architecture is identical to that in Fig. 5a but ~1.36 millions of cells were simulated. a Snapshots of the network activity are shown for three different amplitudes of the synaptic AMPA minis (from left to right \( {\tilde{G}}_{AMPA}^{mini} \) increases: 0.0213, 0.023, 0.026). The snapshots correspond to the Up state initiation time. b The same as in panel A, but for three different radii of the long-range connectivity (from left to right radius increases: 4, 12, 24). For all simulations radius of local connectivity was R loc  = 5. Parameter of the network connectivity: PY-PY synapses \( {\tilde{G}}_{AMPA}^{syn}=0.121 \), \( {G}_{AMPA}^{mini}=0.0261 \); PY-IN synapses \( {\tilde{G}}_{AMPA}^{syn}=0.04 \), \( {\tilde{G}}_{AMPA}^{mini}=0.008 \); IN-PY synapses \( {\tilde{G}}_{GABA}^{syn}=0.04 \), \( {\tilde{G}}_{GABA}^{mini}=0.004 \). Parameters of the single neuron: p L  = 0.5, γ u  = 0.995, p d  = 1.32.

Fig. 10
figure 10

Charasteristics of large-scle network dynamics. a The period of the slow oscillation as a function of the mini amplitude \( {G}_{AMPA}^{mini} \). b,c The number of spike-wave sources (B) and estimated propagation velocity v (C) as a function of \( {G}_{AMPA}^{mini} \). d The averaged histograms of the spike delays across all the neurons for Up state initiation are shown for two different values of the mini amplitude. Larger minis led to the narrower histogram, which indicates faster Up state initiation across the network. e Standard deviation of the Up state initiation times across the neurons (from the histogram in panel d) is shown for five different values of the mini amplitude. f Number of the spike-wave sources is plotted as a function of the radius of the long-range connectivity R. g The same as E, but plotted for two different values of the radius R. Increase of R led to the narrower histogram and the faster transition to the Up state across the network. h,i Standard deviation of the Up state initiation times across the neurons (J) (from the histogram in panel G) and estimated velocity of the Up state propagation (K) are shown for five different values of the long-range connectivity radius

Velocity of the slow-wave propagation also changed with the minis amplitude. The estimated velocity \( {v}_{spike}^{(i)} \) increased with increasing \( {G}_{AMPA}^{mini} \), suggesting that the larger minis help with faster propagation of the slow waves (see Fig.10c, d).

To explore the role of the long-range connections on the network dynamics, below we introduced non-local random AMPA-type synaptic connectivity with a much larger radius R nonloc that varied in the range R loc  < R nonloc  < R max  + R loc where R loc  = 5 stands for radius of local connections and R max describes maximum radius of long-range connections. GABA-type connections were restricted to the local area only (R loc  = 5). Further on, we used different values of R max from 0 < R max  ≤ 50. Fig.9b presents a series of snapshots of the network activity at the beginning of an Up state. For small values of the maximal radius (R max  = 4), the network dynamics was similar to that we described in the earlier sections (Fig. 9b, left). As the radius increased, the spatio-temporal characteristics differed significantly: the number of sources decreased (Fig.10f) and the structure of slow wave propagation front became more disrupted (Fig. 9b, compare left, middle and right). Furthermore, a presence of long-range connections increased the propagation velocity (Fig. 10i) and the synchrony of Up states initiation (Fig.10h). Next, we calculated the distribution of the Up state onset latencies across all the neurons and all the Up states. The width of the histogram decreased for the higher values of R max (Fig.10g), indicating increase in synchrony of the Up state initiation for higher values of R max .

3 Discussion

We proposed a new class of the computationally efficient discrete time neuronal models and we applied them for analysis of the large-scale slow-wave activity as observed during deep sleep (Steriade et al. 2001; Timofeev et al. 2000a; Steriade et al. 1993b, c). The new model design was developed to explicitly capture the dynamical mechanisms representing known biophysical processes of the cortical neurons. This model was applied to simulate spatio-temporal dynamics of the large-scale (over million of neurons and 100 million synapses) two-dimensional cortical network models in awake and sleep states. The study described characteristic properties of the slow-wave activity during sleep and explained recent experimental data on the difference in the synchronization properties of initiation vs termination of the cortical slow waves in vivo.

3.1 Reduced model design

Previous successful models of the sleep slow oscillation (0.1-1 Hz activity found during slow-wave sleep) are build based on conductance-based neurons (Bazhenov et al. 2002; Compte et al. 2003; Hill and Tononi 2005). With this approach each ionic current is described by means of the voltage- and ion-dependent gating variables, which define a state of the ionic channels and the amount of current that flows through these channels (Hodgkin and Huxley 1952). Since, however, very few cell types are described in sufficient details, a common approach concerns adaptation of a certain minimal set of the ion channels, which are known to be responsible for particular features of the neuronal behavior. Even with this minimalistic approach conductance-based models are computationally expensive and have limited usage in the large-scale network simulations. Indeed, the past models of the sleep slow-wave activity included up to few thousands of neurons, usually organized in one-dimensional architecture.

Various phenomenological models, including integrate-and-fire and phase-based models, (Knight 1972; Tuckwell 1988; Hoppensteadt and Izhikevich 1996; Crook et al. 1997; Williams and Bowtell 1997; Gutkin and Ermentrout 1998; Sigvardt and Miller 1998) constitute another common approach. These models are usually much simpler than conductance-based models and are suitable for large-scale simulations. However, the phenomenological models commonly lack an ability to simulate realistic patterns of the electrical activity found experimentally. Generalizations of these reduced models (e.g., adaptive leaky integrate-and-fire, integrate-and-fire-or-burst, etc) lead to more realistic, but still simplified, patterns (Knight 1972; Softky and Koch 1993; Buhl et al. 1997; Smith et al. 2000; Casti et al. 2002; Smith and Sherman 2002; Destexhe et al. 1994; Esser et al. 2007; Ali et al. 2013). However, possibly the main problem with any class of the phenomenological models - a limited ability to adjust independently specific response properties (e.g., spike frequency adaptation, after-hyperpolarization, activity dependent depolarization) and to maintain them across the range of the physiological conditions (e.g., across wake-sleep transition) - remains. This is where conductance-based approach presents a great advantage; in conductance-based models adding a new type of ionic channel can enhance the model with a new property and the strength of that property can be varied independently by changing conductance of that channel with a minimal impact on the other intrinsic properties.

In this new study we propose a novel class of the phenomenological models of a biological neuron. The new model is computationally efficient - we present simulations with more than 1 million of cortical cells and more than 100 millions of synapses. Importantly, the new model design is based on the independent dynamical blocks, each of them has a clear correspondence to certain electrophysiological mechanisms. Current implementation includes explicit modeling of the effects of the Ca2+ dependent K+ current, the persistent Na+ current and the K+ leak current. Other ionic currents can be implemented in future design. These results can be also extended beyond the map model, e.g. the effect of different currents could be introduced to the adaptive exponential integrate-and-fire model by adding new variables similar to what we did to the map model. Thus, similar to conductance-based models, the new model equations contain parameters, which, to some extent, may be related to the biophysical properties of the biological neurons. The discrete time design still allows to keep very high computational efficiency even for the fairly complex internal structure of the model implementing various biophysical mechanisms.

3.2 Large-scale cortical network dynamics during slow-wave sleep

The slow (< 1 Hz) oscillation is a hallmark of a deep sleep called slow-wave sleep, dominating cortical activity during early periods of the night sleep and under some types of anesthesia (Steriade et al. 1993a, 2001; Timofeev et al. 2001; Steriade et al. 1993d; Borbely et al. 1981). During a slow oscillation cycle, the entire cortical network alternates between silent (Down) and active (Up) states, each lasting 0.2–1 s. Silent periods are periods of disfacilitation (i.e., absence of synaptic activity), while active periods have intensive synaptic activity (Timofeev et al. 2001; Contreras et al. 1996; Timofeev et al. 1996) leading to the generation of the various types of the faster oscillations (e.g., sleep spindles) within the thalamocortical system (Contreras et al. 1997; Molle et al. 2002). While many other types of the thalamic and cortical rhythms (e.g., thalamic delta (1–4 Hz) and spindle (8–16 Hz) oscillations) presumably result from the interaction of a few intrinsic currents or a few neurons within a small circuit and could be reproduced with scaled down network models (Timofeev and Bazhenov 2005), the sleep slow oscillation is an important example of brain activity that exists only in the large enough networks. Number of previous studies suggest that the sleep slow oscillation has primarily cortical origin. It was shown that it exists in the cortical slice preparations (Sanchez-Vives and McCormick 2000) and after extensive thalamic lesions in vivo (Steriade et al. 1993b). Slow waves were found to be sharply reduced but then recovered after few days following thalamic inactivation or cortical isolation (slab preparation) (Lemieux et al. 2014). Also, an absence of the slow oscillations was demonstrated in thalamus of decorticated cats (Timofeev and Steriade 1996). Hence, in our model we assumed that the slow waves are originated from intracortical dynamics, involving spontaneous minis release, whereas thalamus can be primarily involved in synchronization and coordination of slow oscillation across neocortex (Timofeev, unpublished).

Recent experimental studies revealed that the downward transition of the slow oscillation (from an active state to silence) is often better synchronized than the upward transition (from silence to an active state) (Sheroziya and Timofeev 2014; Volgushev et al. 2006). This in vivo result could not be well explained by the earlier models (Bazhenov et al. 2002; Compte et al. 2003; Hill and Tononi 2005; Chen et al. 2012), which only included up to few thousands of neurons interconnected within 1D architecture.

Using the new model design presented here, we explored the spatio-temporal dynamics of the large-scale 2D cortical network during slow-wave sleep activity. It revealed: (i) During consecutive switching between Up and Down states the network exhibit transition waves, meaning that transition from Down to Up state (and from Up to Down state) has a form of propagating wave. Indeed, traveling wave – like structure of the sleep slow oscillation has been reported in experimental studies (Sheroziya and Timofeev 2014; Massimini et al. 2004; Volgushev et al. 2011; Massimini et al. 2007). (ii) Each Up state is characterized by multiple sources of initiation from where transition waves gradually propagate within the network; this structure is very prominent at the beginning of the Up state and gets disrupted close to the Up state termination. (iii) The spatio-temporal pattern of a slow wave has a history dependence – initiation and termination patterns of the sequential UP states are well correlated, provided that certain slow processes (e.g. slow calcium accumulation and/or AHP potassium current) are present in the cells. This model prediction needs to be verified in the future experimental studies. The history dependence on the pattern of slow oscillation allows a brief input (e.g., sharp wave - ripple from hippocampus) to have long lasting effect on the neocortex (Wei et al. 2016). (iv) An Up state termination is more coherent and synchronous than an Up state initiation, which agrees with previous experimental studies (Sheroziya and Timofeev 2014; Volgushev et al. 2011). We found that the last effect depends on the stochastic nature of an Up state initiation, which became evident in the large-scale network models. Synaptic noise introduced by random minis (both on excitatory and inhibitory synapses) was mainly present near an Up state onset. It increased membrane voltage fluctuations at the Down to Up state transition and, as a result, increased jitter of an Up state initiation times across neurons. It is important to emphasize that the experimentally observed difference in properties of Up and Down states initiation (Lemieux et al. 2014; Volgushev et al. 2006, 2011) can be caused by combination of several independent factors. Network heterogenity can make some cortical sites to be more likely initiating Up states which can explain experimentally observed bias in the Up state initiations across network locations (Volgushev et al. 2006). Another phenomenon is that for each given cortical location, distribution of the initiation delays is wider than distribution of the termination delays (Volgushev et al. 2011). In this work we demonstrated that the phase-dependent modulation of minis (reported in (Sheroziya and Timofeev 2014) and implemented in our model) is a possible factor that contributes to the less synchronized Up state initiation. Other mechanisms, e.g., inhibition by local interneurons, can contribute to coordinated termination of the Up states (Volgushev et al. 2006).

The miniature post-synaptic potentials are spontaneous transmitter release events that obey random Poisson process, hence minis represent noisy component in the model. We showed that the amplitude of minis affected basic characteristics of the spatio-temporal slow-wave dynamics, such as density of Up state initiation sites and velocity of Up state propagation. Furthermore, a certain minimal critical value of the minis amplitude was required for slow oscillation to occur. Reducing the minis amplitude diminished the difference between synchrony of the Up states initiation and termination and reduced the number of local initiation sites. Our recent date of recordings from non-anesthetized animals revealed presence of the multiple local waves during slow-wave sleep (Timofeev, communication). Presence of the many independent Up state initiation sites leads to the possibility of many local sequences of cell spiking that repeat themselves (replay) because of the history effect as we showed in this study. Together this suggests that the presence of noise and refractoriness in the cortical network may be critical properties for reliable replay and consolidation of many memories during slow-wave sleep.

To conclude, we proposed a novel neuronal model design that combines computational efficiency of the current phenomenological neuronal models with flexibility of dynamical properties found in the Hodgkin-Huxley type models. We applied this model to the large-scale simulations of the sleep slow oscillation and successfully explained essential spatio-temporal properties of the slow-wave dynamics found in vivo.

4 Methods

4.1 Network model

4.1.1 Model of pyramidal cells

Pyramidal cells were modeled according to the system (1), which is described the section 2. The equation for the model are the following:

$$ {x}_{n+1}={f}_{\alpha}\left({x}_n,{y}_n+{\beta}_n\right), $$
$$ {y}_{n+1}={y}_n-\mu \left({x}_n+1\right)+\mu \left(\sigma +{\sigma}_n\right), $$
$$ {u}_{n+1}={\upgamma}_u{u}_n+H\left({x}_n-1\right) $$
$$ {k}_{n+1}={k}_n+H\left({x}_n+0.5\right)\left({K}_1-{k}_n\right)+H\left(-\left({x}_n+1\right)\right)\left({K}_0-{k}_n\right) $$

Here x n , y n , u n and k n are time-dependent continuous dynamical variables calculated at discrete moments of time n. The transmembrane voltage of the neurons is computed as V n  = 50x n  − 15. Parameters, that were fixed throughout all simulations, are given in the table below. Other parameters are specified in the text or in captions to the figures.

4.1.2 Model of inhibitory interneurons

A reduced version of the system (1) was used for inhibitory interneurons, where only fast variable x n was time-dependent, dynamical variables y n , k n were fixed in time and variable u n was absent:

$$ {\displaystyle \begin{array}{c}{x}_{n+1}={f}_{\alpha}\left({x}_n,y+{\beta}_n\right),y=-2.84,k=0.0025;\\ {}{\beta}_n={k}_{\beta}\left({I}_0+{I}_{syn}\right)\end{array}} $$
(6)

Nonlinear functions f α and S(w) were the same as for the pyramidal neuron (see Equations (2) and (3)).

4.1.3 Synaptic connections

In the network simulation, synaptic current \( {I}_{syn}^{(i)} \) (here upper index i denotes neuron number) included AMPA and GABAA synaptic currents:

$$ {I}_{syn}^{(i)}={I}_{AMPA}^{(i)}+{I}_{GABA}^{(i)} $$

where

$$ {I}_{AMPA}^{(i)}=\sum \limits_j{g}_n^{ij}\left({V}_{AMPA}-{V}_n^{(i)}\right);{I}_{GABA}^{(i)}=\sum \limits_j{h}_n^{ij}\left({V}_{GABA}-{V}_n^{(i)}\right) $$

Here \( {g}_n^{ij} \) and \( {h}_n^{ij} \) stand for conductance of the AMPA and GABAA-type synapses, respectively. The upper double index ij reflects directionality of the synaptic connection: from neuron j to neuron i. The lower index n depicts time dependence.

Both AMPA and GABAA synaptic conductances were described by the first-order activation schemes with short-term activity-dependent depression and Poisson noise:

$$ {\displaystyle \begin{array}{l}{g}_{n+1}^{ij}={\gamma}_g{g}_n^{ij}+{s}_n^{ij}{G}_{AMPA}^{syn}H\left({V}_n-{V}_{th}\right)+{G}_{AMPA}^{\min i}{g}_n^{\min i},\\ {}{h}_{n+1}^{ij}={\gamma}_h{h}_n^{ij}+{d}_n^{ij}{G}_{GABA}^{syn}H\left({V}_n-{V}_{th}\right)+{G}_{GABA}^{\min i}{h}_n^{\min i}\end{array}} $$
(7)

Here parameters γ g, h determine decay time of the synaptic conductance, time-independent parameters \( {G}_{AMPA}^{syn} \) and \( {G}_{GABA}^{syn} \) stands for the overall strength of the synapse. Variables \( {s}_n^{ij} \) and \( {d}_n^{ij} \) introduce activity-dependent short-term depression:

$$ {s}_n^{ij}=\left\{\begin{array}{c}{\gamma}_s^{dep}{s}_n^{ij}, if\ {\mathrm{V}}_n^j>{V}_{th}\\ {}1+{\gamma}_s^{rec}\left({s}_n^{ij}-1\right), otherwise\end{array}\right.{d}_n^{ij}=\left\{\begin{array}{c}{\gamma}_d^{dep}{d}_n^{ij}, if\ {\mathrm{V}}_n^j>{V}_{th}\\ {}1+{\gamma}_d^{rec}\left({d}_n^{ij}-1\right), otherwise\end{array}\right. $$
(8)

The dynamics of the depression variables \( {s}_n^{ij},{d}_n^{ij} \) is relatively straightforward: when there is no spike in the presynaptic neuron (number j) the variable decays exponentially to 1 with constant rate \( {\gamma}_{s,d}^{rec} \), so the synaptic connection recovers from depression. In opposite, when presynaptic neuron produces a spike, the depression variable decays with factor \( {\gamma}_{s,d}^{dep} \) that decreases effective strength of a synapse (in the Equation (7) quantities \( {G}_{AMPA}^{syn} \),\( {G}_{GABA}^{syn} \) are modulated by depression variables \( {s}_n^{ij},{d}_n^{ij} \)).

Experimental and computational (Timofeev et al. 2000a; Chauvette et al. 2010; Bazhenov et al. 2002) studies suggest that miniature postsynaptic potentials (minis) play crucial role in initiation of the Up sates of slow oscillation. Hence, in our study Equation (7) for conductances \( {g}_n^{ij} \) and \( {h}_n^{ij} \) contain independent Poisson noise, which was represented by terms \( {G}_{AMPA}^{mini}{g}_n^{mini} \), \( {G}_{GABA}^{mini}{h}_n^{mini} \). Variables \( {g}_n^{mini} \) and \( {h}_n^{mini} \) in (7) represent spontaneous events, which occur according to the random Poisson process (Anderson and Stevens 1973) with mean frequencies μ GABA and μ AMPA , for GABA-A and AMPA-type synapses respectively. Every time when an event occurs (\( {g}_n^{mini}=1 \)), synaptic conductance increases by \( {G}_{AMPA}^{mini} \) (for \( {g}_n^{ij} \)) and \( {G}_{GABA}^{mini} \) (for \( {h}_n^{ij} \)), producing minis in the post-synaptic neurons. Experimental recordings indicate that frequency of the minis is strongly modulated by the neuronal activity (Redman 1990; Salin and Prince 1996). In (Timofeev et al. 2000a) intracellular recordings in deafferented cortical slab revealed that the mean rate of minis decreases right after an Up state and recovers during a following Down state. In our model we implement this mechanism by the modulation of the frequency of the Poisson process (Bazhenov et al. 2002):

$$ {\mu}_{AMPA}={\tilde{\mu}}_{AMPA}M\left(n-{n}_{spike}\right) $$
(9)

where \( {\tilde{\mu}}_{AMPA} \) is constant and modulation function M(n − n spike ) represents sigmoidal smooth monotonically increasing function M(n) = 0.2 + 0.8/(1 + exp(−0.1(n − 350))), which takes values in the interval [0.2,1.0]. So, after each spike in a presynaptic neuron (at time n = n spike ) the mini rate in the synapse decreases to just 20% of its maximal value (\( \sim 0.2{\tilde{\mu}}_{AMPA} \)) and then recovers to \( {\tilde{\mu}}_{AMPA} \) as time goes on.

In the network simulations, the number of synaptic connections that project to a particular cell varied from one neuron to another. To keep total synaptic input per cell constant, coefficients \( {G}_{AMPA, GABA}^{syn, mini} \) were scaled: \( {G}_{AMPA}^{syn, mini}={\tilde{G}}_{AMPA}^{syn, mini}/{m}_{AMPA} \) where m AMPA is a number of incoming AMPA synapses to neuron i and \( {\tilde{G}}_{AMPA}^{syn, mini} \) is the same constants for all neurons. The restriction of total synaptic strength eases the problem of parameter tuning in the model. At the same time, we believe that it does not affect the main conclusions of the paper.

4.1.4 Parameters of the model

Below we summarize the parameters of the map model and their actual values. In simulation below we used values from the following table, unless otherwise stated:

Parameter

Value

Description

α

3.65

The parameter of nonlinearity (2), fixed throughout the simulations

μ

0.0018

Time scale of the variable y n , fixed throughout the simulations

w 0

−2.819

Internal parameter of the spike-generating mechanism

γ u

See text

Time scale of variable u n

p Nap

0.15

The parameter reflects the strength of Nap mechanism, fixed throughout all the simulations

p d

See text

The parameter reflects the strength of slow hyperpolarizing mechanism (variable u n )

p L

See text

The parameter reflects the strength of the leak current

σ

σ =  − 0.4p L

The parameter determines the baseline x baseline of a neuron, proportional to p L

K 0, 1

K 0 = 0.25, K 1 = 0.0025

The parameters determine input sensitivity of a neuron

K σ,β

K σ  = 1

Internal constants of the spike generating block

K β  = 0.133

V th

0

Spike threshold (used in synaptic dynamics)

γ g

0.995

Time scale of the synaptic dynamics (AMPA), fixed throughout the simulations

\( {\tilde{G}}_{AMPA}^{syn} \)

See text

The parameter defines the overall strength of synaptic connection (AMPA)

γ h

0.995

Time scale of the synaptic dynamics (GABAA), fixed throughout the simulations

\( {\tilde{G}}_{GABA}^{syn} \)

See text

An overall strength of the synaptic connections (GABAA), fixed throughout the simulations

\( {\tilde{G}}_{AMPA}^{mini} \)

See text

The strength of the miniature post-synaptic potentials (AMPA synapses)

\( {\tilde{G}}_{GABA}^{mini} \)

See text

The strength of the miniature post-synaptic potentials (GABAA synapses), fixed throughout the simulations

\( {\tilde{\mu}}_{AMPA, GABA} \)

50

Frequency of the Poisson process, fixed throughout the simulations

\( {\gamma}_{s,d}^{dep} \)

0.05

Time scale of synaptic depression

\( {\gamma}_{s,d}^{rec} \)

0.005

Time scale of synaptic recovery from depressed state, fixed throughout the simulations

V AMPA

0

Reversal potential of the AMPA synapses

V GABA

−70

Reversal potential of the GABAA synapses

4.2 Analysis of 2D spatio-temporal patterns

4.2.1 Detection of up states initiation and termination

Analysis of the spatio-temporal properties of slow oscillation requires detection of Up and Down states. We followed threshold paradigm developed in (Volgushev et al. 2011), which requires two voltage thresholds V and V +. If membrane voltage V i raises and crosses the threshold V + =  − 65 mV, than we assumed that the neuron i transits from Down to Up state. Similarly, when V i decays and crosses V  =  − 68 mV, we detected transition from Up to Down state.

4.2.2 Latency map, similarity measure and detection of propagation sources

Using Up state detection algorithm, it is possible to construct a latency map τ(X c , Y c ), which reflects relative times of the state transition for a given cell at location (X c , Y c ). For example, to construct a latency map for Down-to-Up state transition, we analyzed voltage traces of all the neurons within the time window when the entire network went from Down to Up state. Using Up state detection algorithm, we first identified specific times when the neurons made transition from Down to Up state. Using these times, we next constructed a latency map, such that the earliest cell had latency 0 and all other cells had positive latency values, indicating delay of transition to the Up state in comparison to the earliest cell.

The similarity measure is aimed to characterize how close the spatio-temporal structures of two different Up states are. It was calculated as follows: for the i−th Up state we defined the latency map τ (i)(X c , Y c ) and then normalized it as \( {\tilde{\tau}}^{(i)}\left({X}_c,{Y}_c\right)/{\max}_{Xc, Yc}\left({\tau}^{(i)}\left({X}_c,{Y}_c\right)\right) \) (here pair (X c , Y c ) stands for the 2d index of the neuron in the network). The similarityD i, j was calculated as an inversed averaged point-by-point difference of the normalized latency maps: \( {D}_{i,j}=1-\left.<\right|{\tilde{\tau}}^{(i)}\left({X}_c,{Y}_c\right)-{\tilde{\tau}}^{(j)}\left({X}_c,{Y}_c\right)\left.\right|{>}_{\left({X}_{c,}{Y}_c\right)} \). where < > means averaging.

The process of detection of Up state propagation sources was based on detection of local minima of the smoothed latency map. As the first step, we use 2D gaussian filter (σ = 10) on the latency map to remove noise from the data. Next, we detected initiation sources by finding local minima in the smoothed latency map. The algorithm was tested on several examples and compared to actual dynamics for validation.

4.2.3 Velocity of the transition waves

To characterize spatio-temporal activity in the 2D network we calculated velocity of the waves propagation as follows: for each Up state in the network we first calculated the spike latency maps \( {\tau}_{spike}^{(i)}\left({X}_c,{Y}_c\right) \) (i - serial number of Up state, X c and Y c are spatial coordinates in the network); after that we calculated a gradient of the spike delay map \( \nabla {\tau}_{spike}^{(i)}\left({X}_c,{Y}_c\right) \), where ∇ is Nabla operator. The estimated propagation speed is given by an average inverse amplitude of that gradient: \( {v}_{spike}^{(i)}=<1/\left\Vert \nabla {\tau}_{spike}^{(i)}\right.\left({X}_c,{Y}_c\right){\left\Vert >\right.}_{\left({X}_c,{Y}_c\right)} \).

4.3 In vivo experiments

Experiments were conducted on adult non-anesthetized cats. The cats were purchased from an established animal breeding supplier. Good health conditions of all animals were certified by the supplier and determined upon arrival to the animal house by physical examination, which was performed by animal facilities technicians and a veterinarian in accordance with requirements of the Canadian Council on Animal Care. The surgery was performed on animals 5–20 days after their arrival to the local animal house. We recorded field potentials from several cortical areas and from the VPL thalamic nucleus of cats during natural sleep/wake transitions.

4.3.1 Preparation

Chronic experiments were conducted using an approach similar to that previously described (Steriade et al. 2001; Timofeev et al. 2001; Chauvette et al. 2011). For implantation of recording chamber and electrodes, cats were anesthetized with isoflurane (0.75%–2%). Prior to surgery, the animal was given a dose of preanesthetic, which was composed of ketamine (15 mg/kg), buprenorphine (0.01 mg/kg), and acepromazine (0.3 mg/kg). After site shaving and cat intubation for gaseous anesthesia, the site of incision was washed with at least three alternating passages of a 4% chlorexidine solution and 70% alcohol. Lidocaine (0.5%) and/or marcaine (0.5%) was injected at the site of incision and at all pressure points. During surgery, electrodes for LFP recordings, EMG from neck muscle, and EOG were implanted and fixed with acrylic dental cement. Eight to ten screws were fixed to the cranium. To allow future head-restrained recordings without any pressure point, we covered four bolts in the dental cement that also covered bone-fixed screws and permanently implanted electrodes. Throughout the surgery, the body temperature was maintained at 37 °C using a water-circulating thermoregulated blanket. Heart beat and oxygen saturation were continuously monitored using a pulse oximeter (Rad-8, MatVet) and the level of anesthesia was adjusted to maintain a heart beat at 110–140 per minute. A lactate ringer solution (10 ml/kg/h, intravenously [i.v.]) was given during the surgery. After the surgery, cats were given buprenorphine (0.01 mg/ kg) or anafen (2 mg/kg) twice a day for 3 days and baytril (5 mg/kg) once a day for 7 days. About a week was allowed for animals to recover from the surgery before the first recording session occurred. Usually, 2–3 days of training were sufficient for cats to remain in head-restrained position for 2–4 h and display several periods of quiet wakefulness, slow-wave sleep (SWS), and rapid eye movement (REM) sleep. The recordings were performed up to 40 days after the surgery.

4.3.2 In vivo recordings

All in vivo recordings were done in a Faraday chamber. LFPs were recorded using tungsten electrodes (2 MΩ, band-pass filter 0.1 Hz to 10 kHz) and amplified with AM 3000 amplifiers (A-M systems) with custom modifications. We aimed to implant electrodes at 1 mm below the cortical surface. A silver wire was fixed either in the frontal bone over the sinus cavity or in the occipital bone over the cerebellum and was used as a reference electrode. Intracellular recordings were performed using glass micropipettes filled with 2.5 M potassium acetate and having a resistance of 30–70 MΩ. A high-impedance amplifier with active bridge circuitry (Neurodata IR-283 amplifiers; Cygnus Technology; low-pass filter, 10 kHz) was used to record the membrane potential and to inject current into the neurons. All electrical signals were digitally sampled at 20 kHz on Vision (Nicolet) and stored for offline analysis. At the end of the experiments, the cats were euthanized with a lethal dose of pentobarbital (100 mg/kg, i.v.).