## Abstract

In most mammals, the sleep-wake cycle is constituted by three behavioral states: wakefulness (W), non-REM (NREM) sleep, and REM sleep. These states are associated with drastic changes in cognitive capacities, mostly determined by the function of the thalamo-cortical system. The intra-cranial electroencephalogram or electocorticogram (ECoG), is an important tool for measuring the changes in the thalamo-cortical activity during W and sleep. In the present study we analyzed broad-band ECoG recordings of the rat by means of a time-series complexity measure that is easy to implement and robust to noise: the Permutation Entropy (PeEn). We found that PeEn is maximal during W and decreases during sleep. These results bring to light the different thalamo-cortical dynamics emerging during sleep-wake states, which are associated with the well-known spectral changes that occur when passing from W to sleep. Moreover, the PeEn analysis allows us to determine behavioral states independently of the electrodes’ cortical location, which points to an underlying global pattern in the signal that differs among the cycle states that is missed by classical methods. Consequently, our data suggest that PeEn analysis of a single EEG channel could allow for cheap, easy, and efficient sleep monitoring.

## Introduction

The sleep-wake cycle is a critical physiological process and one of the most preserved biological rhythms through evolution^{1}. This cycle is composed of different states, commonly distinguished by their electro-physiological signatures and behavioral characteristics. These states correspond to wakefulness (W), non-rapid eye movement (NREM) sleep, and rapid eye movement (REM) sleep. W and sleep are associated to different brain functional states, which can be captured by electroencephalographic (EEG) signals containing a broad frequency spectrum. Accompanying the electrocortical differences among the states, the cognitive capacities drastically change during the cycle. Fundamentally, consciousness is lost during deep NREM sleep, emerging in an altered fashion during REM sleep. Altered states of consciousness can also arise during special normal states, such as during lucid-dreams^{2}, or under toxic or pathological conditions, such as the states induced by psychedelic drugs or psychosis^{3,4}.

Cognitive states are mostly determined by the function of the thalamo-cortical system^{1}. Part of this neuronal processing can be accurately measured by intra-cranial elecroencephalogram (EEG), known as electrocorticogram (ECoG). Due to the complex nature of the standard EEG and ECoG signals, traditional methods employed in neuroscience have divided the complex spectrum of the signal into frequency bands^{3,5,6,7,8,9}, and analyzed its changes during different cognitive functions^{4,7}, and sleep states^{5,6,8}. These methods only describe particular characteristics of the recorded signals and do not account for the complex nature of the cortical electric potentials. In contrast, the field of non-linear dynamics has developed measures and models that account for the complexity of the systems and their emerging interactions^{10,11,12,13}. These properties are fundamental for the characterization of the thalamo-cortical function and for the emergence of consciousness^{14}.

A general approach to study time-signals is the characterization of their randomness; for example, by means of the Shannon entropy (SE)^{15}, which measures the average unpredictability of a signal. However, SE requires a random source and an invariant probability distribution (which is typically unknown), also is affected by noise, by measurement precision, and by data length. All these elements are relevant when dealing with real-world signals. In order to find a similar non-linear measure to quantify unpredictability from real-world data, Bandt and Pompe^{10} introduced the Ordinal Pattern (OP) analysis, allowing to encode any signal into OPs and approximate its SE. This approximation is known as Permutation Entropy (PeEn). In contrast to other methods, PeEn is a time-series complexity measure that is simple to implement, is robust to noise and short time-series, and works for arbitrary data sets^{13,16,17,18,19,20,21,22,23,24}. In particular, it has been shown that PeEn applied to EEG signals captures different states associated with the level of consciousness, both during anesthesia^{24,25,26,27} and sleep^{28,29}. Hence, in order to study the thalamo-cortical function during W and sleep, PeEn is a practical and reliable method, where results can be understood from primary principles, and can be related to the signal characteristics.

Previous works have analyzed PeEn in standard EEG recordings^{25,26,27,28,29}. However, EEG signals have frequency limitations due to scalp-filtering, are often recorded with low sampling rates, and pre-acquisition filters are commonly applied. In addition, as the recording electrodes are placed above the scalp’s skin, other sources can interfere with the cortical neural activity (e.g., muscular activity)^{30}. These limitations exclude the possibility of considering high-frequency oscillations; for example, \(\gamma \) frequency band (\(30-100\,Hz\)), which is known to vary substantially during the sleep-wake cycle and is an active field of research in Neuroscience^{3,5,6,7,8,9,31,32}. Thus, PeEn analysis of standard EEG signals is technically limited and is unable to assess the significance of the broad frequency spectrum in relation with the thalamo-cortical function and its cognitive counterpart. Consequently, it is still uncertain whether previous results hold when considering ECoG measurements and whether these results would depend on cortical location, frequency content, or PeEn parameters.

In the present study, we characterized the PeEn of recordings from freely moving rats during W and sleep. We found that ECoG’s PeEn is maximal during W and decreases during both sleep states. Moreover, we noted that these results are independent of the cortical location (namely, the electrodes placement), pointing towards a global cortical pattern for each sleep-wake state that is captured by the PeEn analysis but is missed by classical methods.

## Results

### Permutation entropy during wakefulness and sleep

Figure 1a shows examples of polysomnographic recordings obtained from electrodes placed directly above the cortex of a representative rat. Electrode locations are shown on the left panel and the intra-cranial polysomnographic recordings for W (blue), NREM (green), and REM sleep (red) states are shown on the right panels, which have been distinguished by means of the standard sleep scoring criteria (see Methods). In Fig. 1b we show, for the same animal, the hypnogram (top), as well as the spectrogram (middle) and PeEn values (bottom) processed from the ECoG recorded with the V2r electrode (with a sampling rate of \(1024\ Hz\) and \(D=3\) embedding dimension for the PeEn analysis; see Methods for details). The hypnogram shows the standard sleep scoring, the spectrogram shows the ECoG frequency content, and the PeEn quantifies its complexity; namely, its randomness or unpredictability. Maximal PeEn values were achieved during W, PeEN values decreased during NREM sleep and reached minimum values during REM sleep. This result states that the ECoG becomes more predictable – less random – during sleep, especially during REM sleep. More importantly, we found that PeEn is able to detect transitions between behavioral states, which are typically difficult to be noticed from raw data or from the spectrogram. For example, the power spectrum in Fig. 1b (middle panel) shows similarities between W and REM sleep, but PeEn values are drastically different between these states (W epoch at 11 to 13 minutes and REM sleep epoch at 22 to 24 minutes). The average PeEn values for all rats, behavioral states, and cortical locations are shown in Fig. 1c and Table 1, there are significant differences among behavioral states for all recorded neocortical regions; in the Olfactory Bulb (OBr, archicortex) there was a tendency to decrease \((p=0.056)\) when REM was compared to NREM sleep (first row in Table 1). Consequently, the PeEn of the ECoG characterizes and follows the state transitions regardless of the electrode’s location.

### Permutation entropy dependence on the embedding dimension

We characterized how PeEn reflects the ECoG temporal complexity during W and sleep. In order to do this characterization, we modified the embedding dimension \(D\), which is the parameter that sets the ordinal pattern (OP) length encoding the ECoG signal. Specifically, each OP captures the relationship between the relative amplitudes (ranking its values) inside a \(D\)-sized non-overlapping time-window of the signal (see Methods for details on the encoding procedure). Hence, changing \(D\) modifies the time scale of the ECoG being analyzed and the resultant PeEn calculation. The larger the OP, the more details are obtained from the signal; thus, the less random the signal becomes and the smaller its PeEn value. For example, Fig. 2 shows that the PeEn values consistently decrease as we increased the embedding dimension from \(D=2\) to \(D=4\), either for W or sleep. Overall, averaged PeEn values during W were larger than during sleep for all \(D\)s. Also, the fact that PeEn variability is minimal for \(D=2\) is because this dimension has the greatest sensitivity to random fluctuations: i.e., it mainly captures noise.

### Permutation entropy relationship with the frequency spectrum

As our results show that REM sleep had the lowest temporal complexity out of all states considered, we examined whether the frequency content could be influencing our PeEn assessment. In order to associate the PeEn values with the different frequency bands, we performed successive down-samples to the ECoG signals. This process allows for the ordinal patterns to capture lower frequency components of the ECoG signal, while keeping constant the embedding dimension, \(D\).

We down-sampled the ECoG from a sampling rate of \(1024\ Hz\), halving it down to \(64\ Hz\); thus, changing the maximum frequency resolution from \(512\ Hz\) to \(32\ Hz\). By doing this, the PeEn value changed, revealing its relationship to the frequency spectrum. Fig. 3a shows averaged PeEn using \(D=3\) for all rats and electrode locations, for W (blue), NREM (green) and REM sleep (red). The shaded areas indicate the mean \(\pm \) standard error of these averages, showing that the states differentiate in average significantly (the exact statistics are exhibited in Table S1 at the Supplementary Material). Average PeEn values for the ECoGs during REM sleep are larger than NREM sleep until the maximum frequency resolution increases beyond \(128\ Hz\), remaining lower than W values for all frequencies. Although Fig. 3a shows only the PeEn values for \(D=3\), we obtained similar results for larger embedding dimensions (data not shown). The relationship between the PeEn values and the sampling frequency can be further understood by comparing these results with the power spectral density (PSD) analysis shown in Fig. 3b. In general, the PSD of a signal is the probability distribution function of its frequency content; namely, the degree of presence that each frequency component has in the signal. As we down-sampled the ECoG signals, as in Fig. 3a, the higher frequencies are cut-off from the PSD [Fig. 3b]. For the higher frequencies, i.e., \( > 200\ Hz\), there is a large difference in the PSD value between W and sleep. However, when lower frequencies are considered, REMs PSD increased above NREMs. Note that below \(200\ Hz\) REMs lower frequencies become more relevant (Fig. 3b) and PeEn (Fig. 3a) values are larger than NREM sleep and closer to W.

### Ordinal pattern probability distributions

In addition to the Entropy quantification, we considered the qualitative differences and variations appearing in the OP probability distributions during W and sleep. The OP distributions shown in Figs. 4 and 5 quantify the relative frequency of appearance that each OP has in the encoded ECoG signal; namely, the OP probability. Figure 4a shows the \(6\) possible OPs when the embedding dimension is \(D=3\) (top panel), and the resultant OP probability distribution we found from the ECoGs in each sleep-wake state (bottom panel). Similarly, Fig. 4b shows the OPs and OP distribution for \(D=4\). It is readily observed from both panels that the increasing or decreasing OPs (i.e., labels \(1\) and \(6\) in Fig. 4a and labels \(1\) and \(24\) in Fig. 4b) have a larger probability of occurrence, irrespective of the sleep-wake state or the embedding dimension (results hold for larger \(D\) – not shown). We note that, in spite of having qualitatively similar distributions for \(D=4\), other OPs start to emerge, such as labels \(7\) and \(18\), which are modified versions of labels \(1\) and \(24\), respectively. Nevertheless, these OPs are not statistically significant, since they fall within the null hypothesis confidence interval (signaled by the shaded grey areas in both panels). On the contrary, the OP distribution in Fig. 4a for \(D=3\) during sleep (red and green) significantly departs from the null hypothesis, which corresponds to the uniform distribution (shaded grey area).

### Comparison with classical amplitude encoding

Classical analysis of time-series uses the probability distribution function of the signal; namely, the signal is encoded using a histogram of its amplitudes. This process discards the information coming from the signal’s time stamps; in other words, the amplitude time-dependence. We compared the entropy values using histograms with \(18\) bins of the ECoG, where the results are shown in Fig. 5. As can be directly observed, there were some differences among the sleep states (either NREM or REM), but there were no consistent global pattern and no single electrode was able to differentiate between all sleep-wake states (see Table S2). Moreover, these results remain practically invariant when using larger number of bins (data not shown).

## Discussion

In this work, we described that the collective cortical activity measured by ECoG in male adult rats fluctuates between periods of high temporal complexity during W, and periods of low temporal complexity during sleep (see Fig. 1b,c). These ECoG complexity variations reflect the differences in the thalamo-cortical function between sleep-wake states. Consequently, our results strongly support and extend studies in human that carried out PeEn analyses and other complexity measures in standard EEG recordings^{25,26,27,28,29,33}.

We also showed that PeEn profile during W and sleep did not change according to the cortical recording site, reflecting a common micro-structure motif and a dynamical behavior which are independent from the origin of the cortical signal. The average randomness of these micro-structure patterns distinguished sleep from W, regardless of the changes in the embedding dimensions employed in PeEn analysis (Fig. 2) and the sampling frequencies considered (Fig. 3a). These results suggest the use of PeEn as a quantitative tool for understanding thalamo-cortical dynamics during various physiological conditions, the influence of psychoactive drugs, or pathological conditions.

A strong benefit from PeEn analyses is that PeEn variations across states can be explained by dynamical systems theory^{10,16,34}; conversely, with other techniques the tractability is lost (such as, machine-learning approaches). During NREM sleep, the neuro-modulation coming from the activating systems drastically decreases, which favors the occurrence of slow \(\delta \) waves (\(1-4\ Hz\)) and sleep spindles (\(9-12\ Hz\)) in the thalamus and cortex^{1}. This means that, as the animal transits from W to sleep, the higher-frequency cortical patterns (complex signals) decrease, while lower-frequency oscillations (less complex signals) rise (Fig. 3b). As a consequence, the OPs probability distribution becomes less uniform (in other words more predictable). Specifically, we found that strictly increasing or decreasing OP motifs are strongly favored in all ECoG signals, particularly during sleep (Fig. 4), making the remaining OP motifs to appear less frequently.

Surprisingly, we found that NREM’s PeEn is larger than REM’s PeEn, which contradicts previously reported results^{28,29}. However, we showed that as the frequency content of the ECoG varies, the PeEn changes its value. For example, Fig. 3a exhibits that as we down-sampled the ECoG, REM sleep PeEn becomes larger than NREM’s PeEn; these low sampling rates are similar to those used in previous studies^{28,29}. Moreover, we analyzed the results from the PeEn as a function of the maximum frequency resolution (Fig. 3a) in conjunction with those from the power spectral density (PSD) of the ECoG (Fig. 3b). We observed that the rise in REM’s PeEn as the frequency content decreased follows the variations in the PSD. Specifically, REM sleep presents larger power than NREM sleep around and below \(120\ Hz\) corresponding to the high frequency oscillations and gamma band oscillations^{5,6}. This means that when higher frequencies are cut-off, the PSD slope significantly increases approaching a more uniform frequency distribution, which corresponds to a more complex time-series. These analyses reveal that PeEn results depends on the frequency content of the signal. In particular, REMs temporal complexity resembles W when gamma oscillations are captured by the PeEn.

One of the main differences between W and sleep, is that muscle tone and movements are mainly absent during sleep (specially during REM sleep). In this regard, the power of the higher frequencies of the spectrum is significantly higher during W than during sleep. It is possible that exists a contribution of muscular activity on the ECoG (by volume conduction) on the high frequency bands (\( > 100\ Hz\)), as supported by experimental evidence^{30}. Hence, the high values of PeEn during W could be determined by the muscle electrical activity (produced mainly by the muscle tone, because epochs with movement artifacts were discarded from the analysis) that inevitably pollutes the ECoG. Nevertheless, the PeEn values remained constant during W following downsampling, in spite of the fact that higher frequencies were bypassed and the contribution from muscle tone became less relevant. Still, more research is needed in order to quantify the weight of the muscle artifact in the PeEn results.

As a final remark, sleep classification is usually performed by visual analysis, or automated spectral methods usually in research contexts. For instance, in rodents methods which employ spectral ratios (such as the theta/delta ratio) obtained from hippocampal or intra-craneal recordings in rodents, are able to distinguish sleep-wake states^{35,36}. Thus, these methodologies rely heavily upon the use of narrow band characteristics of the EEG signal. In contrast, our data suggest that the sleep-wake states differ globally in their time-series complexity as assessed by PeEn. Hence, we suggest that cheap, robust, and reliable sleep monitoring could be achieved by means of PeEn analysis of a single ECoG channel.

## Methods

### Experimental animals

All experimental procedures were conducted in agreement with the National Animal Care Law (No. 18611) and with the “Guide to the care and use of laboratory animals” (8th edition, National Academy Press, Washington DC, 2010). Furthermore, the Institutional Animal Care Committee (ComisiÃşn de Etica en el Uso de Animales) approved the experiments (Exp. No 070153-000332-16), where \(12\) Wistar adult rats were maintained on a \(12-h\) light/dark cycle (lights on at \(07:00h\)) with food and water freely available. The animals were determined to be in good health by veterinarians of the institution. We took adequate measures to minimise pain, discomfort, and stress in the animals, and all efforts were made to use the minimal number of animals necessary to obtain reliable scientific data.

### Surgical procedures

The animals were chronically implanted with electrodes to monitor the states of sleep and W. We employed similar surgical procedures as in previous studies^{5,6}. Anaesthesia was induced with a mixture of ketamine-xylazine (\(90\ mg/kg\); \(5\ mg/kg\) i.p., respectively). The rat was positioned in a stereotaxic frame and the skull was exposed. To record the ECoG, stainless steel screw electrodes were placed on the skull above motor, somatosensory, visual cortices (bilateral), the right olfactory bulb, and cerebellum, which was the reference electrode (see Fig. 1a and Table 2). In order to record the EMG, two electrodes were inserted into the neck muscle. The electrodes were soldered into a \(12\)-pin socket and fixed onto the skull with acrylic cement. At the end of the surgical procedures, an analgesic (Ketoprofen, \(1\ mg/kg\), s.c.) was administered. After the animals had recovered from these surgical procedures, they were left to adapt in the recording chamber for \(1\) week.

### Experimental sessions and sleep scoring

Animals were housed individually in transparent cages (\(40\times 30\times 20\ cm\)) containing wood shaving material in a temperature-controlled (\(21\,-\,2{4}^{\circ }\)C) room, with water and food *ad libitum*. Experimental sessions were conducted during the light period, between 10 AM and 4 PM in a sound-attenuated chamber with Faraday shield. The recordings were performed through a rotating connector, to allow the rats to move freely within the recording box. Polysomnographic data were amplified (\(X1000\)), acquired and stored in a computer using Dasy Lab Software employing \(1024\ Hz\) as a sampling frequency and a \(16\) bits AD converter. The states of sleep and W were determined in 10 s epochs. W was defined as low voltage fast waves in the motor cortex, a strong theta rhythm (\(4\,-\,7\ Hz\)) in the visual cortices, and relatively high EMG activity. NREM sleep was determined by the presence of high voltage slow cortical waves together with sleep spindles in motor, somatosensory, and visual cortices associated with a reduced EMG amplitude; while REM sleep as low voltage fast frontal waves, a regular theta rhythm in the visual cortex, and a silent EMG except for occasional twitches. An aditional visual scoring was performed to discard artifacts and transitional states.

### Ordinal pattern encoding

In order to quantify the EEGs’ randomness, we encoded the time-series into ordinal patterns (OPs) following Bandt and Pompe method^{10}. The encoding involves dividing a time-series, \(\{x(t),\ t=1,\ldots ,T\}\), into \(\lfloor (T-D)/D\rfloor \) non-overlapping vectors, where \(\lfloor y\rfloor \) denotes the largest integer less than or equal to \(y\) and \(D\) is the vector’s length, which is much shorter than the time-series length (\(D\ll T\)). Then, each vector is classified according to the relative magnitude of its \(D\) elements. The classification was done by determining how many permutations are needed to order its elements increasingly; namely, an OP is associated to represent the vector’s permutations. For example, for \(D=2\), the time-series would be divided into vectors containing two consecutive values, such as {\(x({t}_{i}),x({t}_{i+1})\)}, that are non-overlapping (the next vector to {\(x({t}_{i}),x({t}_{i+1})\)} is the {\(x({t}_{i+2}),x({t}_{i+3})\)} vector, where \({t}_{i}\) is the \(i\)-th time stamp). These vectors have only two possible OPs for any time \({t}_{i}\): either \(x({t}_{i}) < x({t}_{i+1})\) or \(x({t}_{i}) > x({t}_{i+1})\), which correspond to making \(0\) permutation or \(1\) permutation, respectively. It is worth noting that the number of possible permutations increases factorially with increasing vector length; i.e, for vectors of length \(D\) there are \(D!\) possible OPs. In particular, we labeled the OPs as the number of permutations plus one; hence, our OPs are labeled by means of integers, \(\alpha \), that range from \(\alpha =1\) to \(\alpha =D!\). For \(D=2\), \(\alpha =1\) or \(2\). Similarly, for \(D=3\), the OPs \(\alpha =1\) and \(\alpha =2\) correspond to having a vector from the time-series with \(3\) values ordered as \(x({t}_{i}) < x({t}_{i+1}) < x({t}_{i+2})\) and \(x({t}_{i}) < x({t}_{i+2}) < x({t}_{i+1})\), respectively, but there are \(4\) more possibilities (for \(D=3\), \(\alpha =1,\ldots ,3!=1,\ldots ,6\)). Small noise fluctuations were always introduced into the time-series in order to remove degeneracies; i.e., avoid the cases where, for example, \(x({t}_{i})=x({t}_{i+1})\).

### Randomness quantification

Shannon entropy (SE) is a quantity used in Information theory to quantify the average randomness (information content) of a signal. It is defined as^{15} \(H(S)=-{\sum }_{\alpha \in S}p(\alpha )\ {\rm{\log }}\left[p(\alpha )\right]\), where \(p(\alpha )\) is the probability of finding symbol \(\alpha \) in the signal (among the set of symbols \(S\)) and the summation is carried over all possible symbols. In other words, SE shows that \(H(S)\) is the average value of \({\rm{\log }}(1/p)\) with respect to an alphabet \(S\). Hence, in order to find \(H\) for any real-valued time-series, we need to transform the time-series into a symbolic sequence. When using OPs, the resultant symbolic sequence has a finite number of symbols; i.e., the alphabet, which is given by the OP’s length \(D\) and holds \(D!=\#\{S\}\) possible symbols. For bin histograms, the number of possible symbols depends on the number of bins, \({N}_{b}\), used to create the time-series histogram, which is another way of encoding any bounded time-series into a finite set of values. In order to compare entropy values coming from OPs or bins, we need to set both quantities such that the probabilities involved in the summation of \(H(S)\) are found with identical statistics. For example, when using non-overlapping OPs with \(D=3\), there are \(D!=6\) possibly different symbols in an encoded time-series of length \(T\), which accounts to \( \sim T/D\) total encoded symbols.

We highlight that the number of bins we chose corresponds to making an amplitude encoding that has the same statistical average as the OP encoding with dimension, \(D\). Namely, a signal with \(T\) time-stamps, is encoded by non-overlapping OPs into a symbolic sequence of length \(S=\lfloor (T-D)/D\rfloor \simeq T/D\), where \(\lfloor \cdot \rfloor \) indicates the smaller integer closer to the argument. The resultant range for the symbolic sequence distribution is \(D!\), which is the different OP possibilities. This means that a length \(T\) time series has an OP statistical average of \(S/D!\simeq T/D\times D!\). On the other hand, the statistical average for histograms with \({N}_{b}\) bins of the same time-series is \(T/{N}_{b}\). Consequently, in order to have the same statistical average per bin and be able to compare the results, we need to set \({N}_{b}=D\times D!\), which for \(D=3\) corresponds to having \({N}_{b}=3\times 6=18\) bins.

### Power spectral density and statistical analysis

The power spectral densities were performed using the *pwelch* function on MATLAB by employing the following parameters: \(\,{\rm{window}}=30s,{\rm{noverlap}}\,=[],\,\)\({\rm{fs}}=1024,{\rm{nfft}}\,=1024\). These parameters correspond to \(30\) second sliding windows with half windows overlap, a \({f}_{s}=1024\ Hz\) sampling frequency and a frequency resolution of \(1Hz\).

On the other hand, the statistics for each ECoG PeEn calculations were based on non-overlapping windows of size \(D\times D!\times {N}_{S}\), where \({N}_{S}=200\) is the statistical average we use for our null-hypothesis. Namely, our null-hypothesis is a Bernoulli process where each ordinal pattern of size \(D\) has an equal probability of appearance, \({p}_{NH}=1/D!\), and a standard error of the mean \({\sigma }_{NH}=\sqrt{{p}_{NH}\ (1-{p}_{NH})/{N}_{S}}\). For example, for ordinal patterns with \(D=3\), the non-overlapping windows contained \(3\times 6\times 200=3600\) data points, which accounts to approximately \(3.5\) seconds at a \({f}_{s}=1024\ Hz\) sampling frequency. The null-hypothesis in this case has an average probability \({p}_{NH}=1/3!=1/6\simeq 0.167\) and a standard error of the mean \({\sigma }_{NH}=\sqrt{{p}_{NH}\ (1-{p}_{NH})/{N}_{S}}\)\(\simeq 2.64\times 1{0}^{-2}\), which makes its confidence interval \({p}_{NH}\pm 2{\sigma }_{NH}\) narrow and the statistical significance of the PE results robust. In general, given an embedding dimension \(D\), any time-series with \(T\) data points is analysed using non-overlapping windows with \(D\times D!\times {N}_{S}\) data points. OP probabilities – as well as the corresponding PeEn value – are found for each of the \(T/D\times D!\times {N}_{S}\) data windows and then averaged (namely, results are time-averaged).

For the state comparisons, we verified that PeEn distributes normally through Lilliefors test, and then applied a repeated measures ANOVA together with the Bonferroni *post-hoc* test and \(p < 0.05\) in order for the result to be considered significant.

## Data availability

Data is available upon reasonable request to the authors.

## References

Carskadon, M. A., Dement, W. C. Principles and Practice of Sleep Medicine (Sixth Edition), Chapter 2 - Normal Human Sleep: An Overview, Pages 15– 24.e3.Editor(s): Meir Kryger, Thomas Roth, William C. Dement. Elsevier (2017).

Dresler, M.

*et al*. Neural correlates of dream lucidity obtained from contrasting lucid versus non-lucid REM sleep: a combined EEG/fMRI case study.*Oxford University Press***35**(7), 1017–1020 (2012).Uhlhaas, P. J. High-frequency oscillations and the neurobiology of schizophrenia.

*Dialogues Clin Neurosci***15**(3), 301–313 (2013).Carhart-Harris, R. L.

*et al*. The entropic brain: a theory of conscious states informed by neuroimaging research with psychedelic drugs.*Front. Hum. Neurosci.***8**, 20 (2014).Cavelli, M.

*et al*.Absence of EEG gamma coherence in a local activated cortical state: a conserved trait of REM sleep, Translational Brain Rhythmicity, 21132017.Cavelli, M.

*et al*.Power and coherence of cortical high-frequency oscillations during wakefulness and sleep.*European Journal of Neuroscience*(2017).Rodriguez, E.

*et al*. Perception’s shadow: long-distance synchronization of human brain activity.*Nature***397**, 430–433 (1999).Castro, S., Falconi, A., Chase, M. & Torterolo, P. Coherent neocortical 40-Hz oscillations are not present during REM sleep.

*European Journal of Neuroscience***37**, 1330–1339 (2013).Buzsáki, G. & Schomburg, E. W. What does gamma coherence tell us about inter-regional neural communication?

*Nat. Neurosci.***18**(4), 484–489 (2015).Bandt, C. & Pompe, B. Permutation Entropy: A Natural Complexity Measure for Time Series.

*Phys. Rev. Lett.***88**(17), 174102 (2002).Bak, P., Tang, C. & Wiesenfeld, K. Self-organized criticality: An explanation of the 1/f noise.

*Phys. Rev. Lett.***59**(4), 381 (1987).Peng, C. K., Shlomo Havlin, H., Stanley, E. & Goldberger, A. L. Quantification of scaling exponents and crossover phenomena in nonstationary heartbeat time series.

*Chaos***5**, 82 (1995).Kulp, C. W., Zunino, L., Osborne, T. & Zawadzki, B. Using missing ordinal patterns to detect nonlinearity in time series data.

*Phys. Rev. E***96**(2), 022218 (2017).Oizumi, M., Albantakis, L. & Tononi, G. From the Phenomenology to the Mechanisms of Consciousness: Integrated Information Theory 3.0.

*PLoS Comput. Biol.***10**(5), e1003588 (2014).Shannon, C. E. A mathematical theory of communication (parts I and II).

*Bell System Tech. J.***27**, 379–423 (1948).Amigó, J. M.

*Permutation Complexity in Dynamical Systems-Ordinal Patterns, Permutation Entropy, and All That*(Springer Verlag, Berlin, 2010).Parlitz, U.

*et al*. Classifying cardiac biosignals using ordinal pattern statistics and symbolic dynamics.*Computers in Biology and Medicine***42**, 319–327 (2012).Keller, K., Unakafov, A. & Unakafova, V. Ordinal patterns, entropy, and EEG.

*Entropy***16**(12), 6212–6239 (2014).Amigó, J. M., Keller, K. & Unakafova, V. A. Ordinal symbolic analysis and its application to biomedical recordings.

*Philosophical Transactions of the Royal Society***373**(2034), 20140091 (2015).Zunino, L., Soriano, M. C., Fischer, I., Rosso, O. A. & Mirasso, C. R. Permutation-information-theory approach to unveil delay dynamics from time-series analysis.

*Physical Review E***82**(4), 046212 (2010).Aragoneses, A., Perrone, S., Sorrentino, T., Torrent, M. C. & Masoller, C. Unveiling the complex organization of recurrent patterns in spiking dynamical systems.

*Scientific reports***4**, 4696 (2014).Masoliver, M. & Masoller, C. Sub-threshold signal encoding in coupled FitzHugh-Nagumo neurons.

*Scientific reports***8**(1), 8276 (2018).Quintero-Quiroz, C.

*et al*. Differentiating resting brain states using ordinal symbolic analysis.*Chaos***28**(10), 106307 (2018).Ouyang, G., Dang, C., Richards, D. A. & Li, X. Ordinal pattern based similarity analysis for EEG recordings.

*Clinical Neurophysiology***121**(5), 694–703 (2010).Sitt, J. D.

*et al*. Large scale screening of neural signatures of consciousness in patients in a vegetative or minimally conscious state.*Brain.***137**(8), 2258–2270 (2014).Jordan, D., Stockmanns, G., Kochs, E. B., Pilge, S. & Schneider, G. Electroencephalographic Order Pattern Analysis for the Separation of Consciousness and Unconsciousness: An Analysis of Approximate Entropy, Permutation Entropy Recurrence Rate, and Phase Coupling of Order Recurrence Plots.

*Anesthesiology***109**(6), 1014–1022 (2008).Thul, A.

*et al*. EEG entropy measures indicate decrease of cortical information processing in Disorders of Consciousness.*Clin Neurophysiol.***127**(2), 1419–1427 (2016).Bandt, C. A New Kind of Permutation Entropy Used to Classify Sleep Stages from Invisible EEG Microstructure.

*Entropy***19**(197), 1–12 (2017).Nicolaou, N. & Georgiou, J. The use of permutation entropy to characterize sleep electroencephalograms.

*Clinical EEG and Neuroscience***42**, 24–28 (2011).Whitham, E. M.

*et al*. O.Scalp electrical recording during paralysis: Quantitative evidence that EEG frequencies above 20 Hz are contaminated by EMG.*Clin Neurophysiol***118**, 1877–1888 (2007).Buzsáki, G. & Wang, X. J. Mechanisms of Gamma Oscillations Annual.

*Review of Neuroscience***35**, 203–225 (2012).Llinas, R., Ribary, U., Contreras, D. & Pedroarena, C. The neuronal basis for consciousness.

*Phil.Trans.R.Soc Lond***353**, 1841–1849 (1998).Croce, P., Quercia, A. & Costa, S. Zappasodi Circadian Rhythms in Fractal Features of EEG Signals.

*Frontiers in Physiology***9**, 1567 (2018).Keller, K. & Sinn, M. Ordinal analysis of time series.

*Physica A***356**(1), 114–120 (2005).Gervasoni, D.

*et al*. Global forebrain dynamics predict rat behavioral states and their transitions.*J. Neurosci.***24**(49), 11137–11147 (2004).Pava, M. J., Makriyannis, A. & Lovinger, D. M. Endocannabinoid Signaling Regulates Sleep Stability.

*PLoS One***11**(3), e0152473 (2016).Paxinos, G. & Watson, C. The Rat Brain in Stereotaxic Coordinates. London: Academic Press. (2007).

## Acknowledgements

This study was supported by the “Programa de Desarrollo de Ciencias Básicas”, PEDECIBA; Agencia Nacional de investigación e innovación (ANII), (FCE_1_2017_1_136550) and the “Comisión Sectorial de Investigación Científica” (CSIC) I + D - 2016 - 589 grant from Uruguay. N.R. acknowledges the CSIC group grant “CSIC2018 - FID 13 - Grupo ID 722”.

## Author information

### Authors and Affiliations

### Contributions

J.G., N.R. and P.T. designed the study. J.G., A.M. and M.C. performed the experiments and data collection. J.G. and M.C. carried out the data analysis and N.R. developed the software. J.G., M.C., A.M., S.C., C.P., P.T. and N.R. were involved in the discussion and interpretation of the results. J.G., N.R. and P.T. wrote the manuscript. P.T. and N.R. provided the financial support. All the authors participated in the critical revision of the manuscript, added important intellectual content, and approved the definitive version.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing financial and non-financial interests.

## Additional information

**Publisher’s note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

González, J., Cavelli, M., Mondino, A. *et al.* Decreased electrocortical temporal complexity distinguishes sleep from wakefulness.
*Sci Rep* **9**, 18457 (2019). https://doi.org/10.1038/s41598-019-54788-6

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s41598-019-54788-6

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.