Introduction

The sleep EEG is a continuous signal reflecting ongoing electrical activity in the brain, and its spectrum reflects the relative contribution of different frequencies to the final waveform. In contrast, the envelope of the sleep EEG estimates the instantaneous amplitude of the signal (typically after filtering to frequencies of interest), and its spectrum estimates the periodicity of all band-limited activity. In other words, the envelope spectrum estimates the typical rhythm at which signal amplitude at certain frequencies waxes and wanes (Fig. 1).

Figure 1
figure 1

The principle of EEG envelope spectrum analysis. (A) Shows a simulated EEG signal, consisting of the sum of a 2 Hz sinusoid modulated by a 0.2 Hz carrier frequency, a 12 Hz sinusoid modulated by a 1 Hz carrier frequency, and pink noise. Overlain blue and red lines show the instantaneous amplitude or envelope (modulus of the Hilbert transform) of the delta (1–4 Hz) and sigma (10–16 Hz) frequency ranges, respectively. (B) Shows the power spectral density of the original signal (left) and the delta (middle) and sigma (right) envelopes. Note that the carrier frequencies are accurately recovered from spectral analysis of the envelopes (with some impurities due to added noise and the fact that the modulus of the Hilbert transform of a modulated signal is not fully sinusoidal). The spectrum of the envelope reveals periodic fluctuations in the amplitude of higher-frequency activities.

The spectrum of the sleep EEG signal is one of the best-established general-purpose human biomarkers. First, it shows a fingerprint-like intra-individual stability and inter-individual variability across measurements1,2,3,4,5, stabilized mostly by genetic factors6,7,8,9. Second, the neural generators of several prominent oscillations contributing to this spectrum have been extensively studied10,11,12,13,14,15,16 often highlighting specific neuronal population assemblies in specific brain structures as their origin17,18. Third, the sleep EEG spectrum has been shown to be a highly reliable marker of age19,20 and linked to sex21,22, psychological phenotypes23,24,25, and a multitude of clinical conditions26,27,28,29,30,31,32,33,34,35,36,37,38,39.Therefore, the current state of knowledge about the sleep EEG spectrum allows a mechanistic interpretation of how healthy human variability40 or disease41 is reflected in neural functioning.

In contrast there has been no systematic research describing the periodicity, generating mechanism or real-life correlates of the EEG envelope, in spite of the fact that as a mathematical function of the oscillations from which the ordinary sleep EEG spectrum is calculated it has the theoretical potential to be an equally promising biomarker with potential incremental validity. On June 1, 2021 we searched PubMed and ScienceDirect with the search terms “eeg envelope spectrum”, “eeg envelope psd” and “eeg envelope power”. Our search returned no relevant papers. We also screened the first 100 Google Scholar hits with these search terms, but also found no relevant papers. Nevertheless, we are aware of some previous studies which do not explicitly assess the spectrum of the EEG envelope but which are still of interest to this field.

An early paper42 described that sleep spindles followed each other in periods slightly exceeding four seconds, corresponding to a hypothetical 0.25 Hz envelope oscillation. Two studies43,44 calculated PSD from short windows, smoothed the resulting power estimates and relied on the spectral analysis of the resulting signal to establish the periodicity of certain frequencies of interest. The first study43 reported a 20 s (~ 0.05 Hz) periodicity for slow waves and a 4 s (~ 0.25 Hz) periodicity for sleep spindles, respectively. The second study44 described a 50 s (~ 0.02 Hz) periodicity for both sleep spindles and slow waves, but analyses were restricted to carrier frequencies <  ~ 0.12 Hz. Even slower rhythms have been reported for sleep spindle occurrence45, replicating the finding of higher amplitude at posterior locations44. Long-range temporal correlations, especially in the alpha range, were also reported in the wakeful EEG46,47. Some studies48,49 described cyclic alternating patterns (CAPs) as periodic (~ 60–90 s, 0.011–0.017 Hz rhythms) bursts of both low- and high-frequency activity in NREM sleep, mostly based on visual analysis of the EEG signal.

Several studies of slow EEG rhythms described infraslow oscillations, very slow EEG components typically recorded with direct-current EEG setups which do not impose hardware filter constraints on the lowest detectable frequencies50,51. Infraslow oscillations are relevant for the study of the EEG envelope because it is a general feature of the sleep EEG that high-frequency rhythms are phase-locked to slower rhythms. As spindles are locked to slow waves and ripples to spindles13,52,53, virtually all faster rhythms were also shown to be phase-locked to infraslow oscillations50. Therefore, prominent frequencies in the infraslow oscillation imply prominent frequencies in the envelope of higher rhythms as well.

This preceding literature, however, has not systematically revealed the characteristics of EEG oscillation amplitudes. First, periodicity was estimated only for very specific frequencies or oscillations, usually slow waves or spindles. Second, somewhat surprisingly, virtually no study used the modulus of the Hilbert transform (or wavelet analogues) as an estimate of instantaneous amplitude, and instead relied on the spectral analysis of smoothed proxies43,44,45,46. Third, as infraslow oscillation studies focused on very slow rhythms, the full range of possible carrier frequencies of interest (especially > 0.1 Hz) have not been adequately explored. Fourth, there is little data on the neuron-level generating mechanisms, reliability and real-life correlates of the periodicity of sleep EEG oscillations. In our study, we seek to close this gap by combining data from invasive EEGs of epileptic patients and scalp EEGs of a large sample of healthy participants. We show that the EEG envelope spectrum has at least as many remarkable features as the ordinary EEG spectrum: it reflects neuronal population firing, it is highly reliable within individuals, and it can be used to predict age and sex (but not intelligence) with reasonable accuracy. In line with previous literature, we identify prominent 0.05 Hz and 0.25 Hz rhythms (20 s and 4 s periods, respectively). We also show that the ageing is specifically associated with the loss of 0.25 Hz (4 s) periodicity of sleep EEG oscillations and the relative amplification of faster rhythms.

Results

The envelope reflects cortical neuronal firing

In Study 1, we used invasive human EEG data from epileptic patients. We correlated multiple-unit activity (MUA) measured by cortex-penetrating microelectrodes with the envelope of EEG signals measured on the adjacent cortical surface. We found that in all frequency bands and across the entire cortical mantle, the envelope of the surface signal reflected firing patterns, with a typical average magnitude-squared coherence value of 0.15–0.2. The pattern of coupling was different as a function of frequency range (Fig. 2).

Figure 2
figure 2

Coupling between EEG envelope in the cortical surface and MUA within the adjacent cortex in NREM sleep. (A) Cross-correlation of the two signals. The horizontal axis indicates time lags, the vertical axis indicates IME channel (N = 23, deeper channels shown at the bottom), while the color axis indicates correlation coefficients. Black outlines show statistically significant results after FDR correction. (B) Magnitude-squared coherence between the two signals. Overlain lines represent individual IME channels. Because of the large number of channels and no substantial between-channel differences, no particular pattern in color coding was used. Dots indicate statistical significance after FDR correction on the corresponding channel. Deeper channels are shown at the top. (C) Mean MUA amplitude (in within-segment z-scores) by ECoG envelope phase bins. Dots indicate statistical significance after FDR correction on the corresponding channel. A sinusoid is overlain in the low delta subplot for illustration. On (B,C), for better visibility only IME channels are shown where at least one data point reached significance.

In the delta through the theta range, MUA was lowest during or slightly after the peak of the envelope, also reflected by the fact that the largest cross-correlations were negative and observed when a zero to slightly negative MUA delay was added. In the sigma through gamma ranges, MUA was highest during the ascending phases of the envelope, also reflected by the fact that the largest cross-correlations were positive in case of a positive MUA delay. The alpha range exhibited an intermediate pattern with only a few IME channels reaching significance.

Findings in individual patients are available in the Supplementary Data. See also Fig. 3B for an illustration of envelope-MUA coupling. We note that in 3 patients the envelope-MUA coupling was absent or restricted to very specific channels. As data issues (problems with synchronization in case of an absent coupling, and poor MUA data quality in case of both absent and spatially restricted coupling) is a possible explanation for this pattern, we re-analyzed coupling excluding these three patients. Results were virtually identical even in this case (Supplementary Fig. S1).

Figure 3
figure 3

An illustration of EEG envelopes, the colliding window method and its results. (A) Illustrates the colliding window method. (B) Shows a single epoch of illustrative envelope and MUA data (ECoG low delta envelope and smoothed MUA from the fifth IME channel located in cortical layer III). The Pearson correlation of the two signals is shown for reference. Both the ECoG envelope and the MUA is detrended and demeaned, but not z-transformed. (C) Shows the distribution of available sleep data after artifact rejection using the colliding window method. For each participant, black lines mark the data segments used in analysis. The lower panel shows the total number of participants with available data as a function of time after recording start. Note the lack of systematic undersampling of any part of the night. (D) Illustrates the log-transformed envelope spectra. All data was z-transformed by frequency band to eliminate mean differences. The frequency axis is shown on a log scale to enhance the low frequency ranges which are of particular interest. Note spectral peaks at ~ 0.05–0.06 Hz, ~ 0.25 Hz and ~ 1 Hz, the latter most prominent in the beta range.

The envelope spectrum is stable within individuals

For Study 2, we used scalp EEG data from healthy volunteers to calculate the spectrum of the envelope using a novel colliding window method (see “Methods” and Fig. 3A). This method ensured optimal data availability in case of artifacts (Fig. 3C), which is a particular concern for the estimation of very low frequency spectral power which requires long windows. We found characteristic spectral peaks at ~ 0.05 Hz (20 s periodicity) for all frequency bands, ~ 0.25 Hz (4 s periodicity) for several frequency bands, in particular the sigma band corresponding to sleep spindles, and ~ 1 Hz mainly for the beta and gamma bands (Fig. 3D).

The ordinary sleep EEG spectrum is known to have a trait-like quality by being stable within individuals, but varying between individuals2,4. In the absence of multiple recordings from participants, in Study 2 we assessed the trait-like nature of the envelope spectrum by calculating even–odd reliabilities (intraclass correlation coefficients between the spectral densities calculated separately from the even or odd numbered sampling windows of the same individual) and split-half reliabilities. Split-half reliability is a method frequently used in psychometric literature. It refers to the similarity of the first and second halves of a non-instantaneous measurement (most typically, the scores derived from the first and second halves of a psychological questionnaire)54. In our current interpretation, split-half reliabilities were defined as the Pearson correlations between the spectral densities calculated separately from only the first and last 50% sampling windows of the same individual.

Based on this analysis, the envelope spectrum was highly trait-like in NREM sleep and moderately so in REM sleep. The mean reliability of the envelope EEG spectrum (pooled across channels, frequency bands and envelope frequencies) was 0.886 (even–odd, SD = 0.085) and 0.819 (split-half, SD = 0.14) for NREM and 0.513 (even–odd, SD = 0.157) and 0.684 (split-half, SD = 0.141) for REM. No clear trend was seen by envelope frequency (Fig. 4). The reliability of the mid-frequency EEG bands (alpha and low sigma) was the highest, falling off towards both low and high frequencies (Supplementary Fig. S2), while no clear trend was seen by scalp channel (Supplementary Fig. S3).

Figure 4
figure 4

The reliability of the sleep EEG envelope spectrum. (A) Shows raincloud plots55) by vigilance state and reliability type, showing raw data overlain with box plots on the left side and kernel density curves on the right side. Data from all frequency bands, envelope frequency bins and scalp channels are pooled for estimating the box plot, while individual instances are shown as data points. (B) Illustrates reliability by envelope frequency bin. Data from all frequency bands and scalp channels are pooled, shading indicates 95% confidence intervals of the mean.

The envelope spectrum reflects age and sex, but not general cognitive ability

The envelope spectrum of the sleep EEG was significantly associated with demographic variables, but not with general cognitive ability (Figs. 5, 6). This association was the strongest between the NREM envelope PSD and age. Older age was generally associated with a loss of low-frequency oscillations in the power of NREM EEG frequencies, often with an increase of higher-frequency oscillations. Specifically, a reduced oscillation of low delta power at ~ 0.5 and ~ 1.6–1.8 Hz, but increased oscillation at 1–1.5 Hz; a reduced ~ 0.25 Hz oscillation of theta, alpha, sigma and beta power with an increased 0.5–1 Hz oscillation of theta and sigma power was seen. In REM sleep, a general tendency for increased low- and high-frequency power oscillations and a corresponding decrease at ~ 0.5–1 Hz was seen, but this only reached statistical significance in the high delta, alpha and low sigma frequency bands.

Figure 5
figure 5

Correlations between the NREM envelope spectrum and age, sex and general cognitive ability (IQ). Colored lines represent correlation coefficients by scalp channel. Color codes indicate scalp region, with individual channels from the same region shown with the same color. Black horizontal lines show the threshold of conventional (p = 0.05) significance. Colored dots (with color coding identical to lines) above the lines indicate a statistically significant correlation after FDR correction on the corresponding channel.

Figure 6
figure 6

Correlations between the REM envelope spectrum and age, sex and general cognitive ability (IQ). Colored lines represent correlation coefficients by scalp channel. Color codes indicate scalp region, with individual channels from the same region shown with the same color. Black horizontal lines show the threshold of conventional (p = 0.05) significance. Colored dots (with color coding identical to lines) above the lines indicate a statistically significant correlation after FDR correction on the corresponding channel.

Male sex was associated with a lower amplitude of ~ 0.05–0.1 and ~ 0.5–1.5 Hz NREM low sigma power oscillations, but a higher amplitude of power oscillations of the same frequency band at ~ 0.25–0.5 Hz and > 1.75 Hz. Male sex was also associated with a lower amplitude of < 0.75 Hz and > 1.75 Hz, but a higher amplitude of ~ 1 Hz beta power oscillation irrespective of sleep state.

General cognitive ability was not significantly associated with the envelope spectrum of either NREM or REM sleep EEG.

Multivariate models

The relationship between human phenotypes and single biological markers, such as single genetic polymorphisms or individual features of brain morphology is usually modest. However, multivariate models using a large number of such biological markers as independent variables are able to capture the additive, independent contribution of each single marker to reach a much more substantial correlation between the totality of biological markers and phenotypes56. Therefore, beyond demonstrating correlations between single spectral features of the sleep EEG envelope and age, sex and intelligence, we set out to investigate the relationship between these features using multivariate models. Because of the modest sample size (N = 176) for the very large number of possible features (200 PSD values from 8 bands on 18 channels, separately from NREM and REM sleep), we used elastic net regression, a learning algorithm for training (N = 154), with an independent validation sample (N = 22), we only used the first 100 PSD bins as these exhibited the largest bivariate correlations with phenotypes, and we ran models separately by channel.

The total predictive validity of the envelope spectrum towards each phenotype was expressed as the correlation between predicted and actual values in the validation sample (predictive accuracy) (Fig. 7). Using NREM sleep, age could be predicted with reasonable accuracy (rmean = 0.616, rSD = 0.151, the prediction accuracy for sex was lower but still substantial (rmean = 0.447, rSD = 0.138), but the correlation between predicted and actual IQ was low (rmean = 0.151, rSD = 0.178). Using the REM sleep envelope, age could be predicted with moderate accuracy (rmean = 0.502, rSD = 0.156), but this was not the case for sex (rmean = − 0.019, rSD = 0.224) and IQ (rmean = 0.092, rSD = 0.112). (All means and SDs are across channels.) In case of IQ, elastic net models frequently failed to converge due to the low correlation between PSD values and this phenotype.

Figure 7
figure 7

The performance of elastic net regression models predicting age, sex and IQ from the envelope spectrum. Topographic plots illustrate the correlation between predicted and actual phenotypes in the validation sample. (Elastic net regression models were run separately for each channel). The correlation for channels on which the elastic net model did not converge is set to 0 and not counted towards the average performance described in the text.

Relationship to respiratory rhythms

Low-frequency fluctuations in the EEG signal could theoretically be affected or contaminated by the respiratory cycle, which also occurs with sub-second periodicity. In order to investigate to what extent this occurs, we used the recordings of 29 participants containing a pair of respiration channels to estimate to what extent respiratory activity is correlated with the course of EEG envelopes. We estimated the (1) magnitude-squared coherence between each EEG band envelope and respiratory activity (2) the modulation index between respiratory activity and EEG band envelopes. We performed these calculations with 100 s windows of artifact-free data with 50% overlaps between windows and compared statistics to those calculated from 1000 random surrogates to estimate statistical significance in each participant. Like in other analyses, we transformed the resulting empirical p-values to z-values, averaged them across participants and transformed them back to p-values before application of the Benjamini–Hochberg correction of false discovery rate.

In line with a previous study43 we found no coupling between EEG envelopes and respiratory activity. Neither coherence between respiratory activity and EEG envelopes nor their modulation index was ever significantly higher than in surrogates, illustrated by an almost perfectly circular phase histograms of EEG envelope amplitudes as a function of respiration phase (Supplementary Figs. S4, S5). Thus, our findings confirm that EEG amplitude fluctuations occur largely independently from low-frequency respiratory rhythms, and thus the EEG envelope is not a respiratory artifact.

Relationship to the ordinary EEG spectrum

In contrast to previous studies investigating the spectrum of the EEG signal, we investigated the spectrum of the envelope of the signal. Although there is a mathematical relationship between these two measures, it is unclear how well they are correlated at the individual level. In order to investigate this, we calculated correlation coefficients between the individual mean values of the envelope spectrum (calculated as described above, in all frequency bands and both vigilance states) and the spectrum of the log-transformed absolute signal PSD (calculated with the Welch method, using 4 s epochs with an 50% overlap, in both vigilance states, yielding a spectral resolution of 0.25 Hz). The envelope spectrum was considered in the 0.01–1 Hz range and the signal spectrum was considered in the 0–48 Hz range.In both vigilance states, the correlation between the signal PSD and the envelope PSD was generally low, suggesting that the two measures are largely statistically independent. A full illustration of all correlations are provided on Supplementary Figs. S6 and S7.

However, some correlations were present:

  • NREM low delta envelope: positive correlation with < 2 Hz signal PSD at 0.01–0.2 Hz, negative correlation at > 0.5 Hz.

  • NREM theta and alpha envelope: positive correlation with ~ 8–12 Hz (both band envelopes) and > 15 Hz (theta only) signal PSD at 0.2–0.3 Hz.

  • REM theta, alpha and low sigma envelopes (the latter probably an extension of alpha): positive correlation with mid-frequency (~ 5–25 Hz, with an even wider range for low sigma) signal PSD at < 0.1 Hz, a negative correlation with the same signal PSD frequencies at 0.2–0.8 Hz.

  • REM beta envelope: a positive correlation with 1–5 Hz signal PSD at 0.3–0.6 Hz.

Correlations between the NREM low delta envelope and the low delta PSD likely reflect that in participants with more slow wave activity, this activity tends to fluctuate in rather long cycles. The other observations need replication and specific experimental designs to enable a physiological interpretation, but overall they highlight that fluctuations in EEG power—especially in the mid-frequencies—captured by the envelope spectrum are associated with individual differences in signal PSD beyond the frequency range from which the envelope was calculated. This effect was especially pronounced in REM sleep.

Discussion

In our study, we aimed to describe the sleep EEG envelope in detail and compare its characteristics to the ordinary sleep EEG spectrum to assess its viability as a biomarker. Overall, our study demonstrates that the sleep EEG envelope shares many of the properties of the ordinary sleep EEG: it reflects neuronal population firing, it has characteristic oscillation frequencies, it is highly individually stable and varies between individuals; and it is associated with demographic characteristics.

It has been shown in previous human invasive EEG studies that sleep oscillations recorded either from the cortex or from the scalp closely reflect the rhythmic ensemble firing of neuron populations. For instance, slow waves11,12, sleep spindles57 and the wakeful alpha rhythm15 as field potentials are all associated with waxing and waning patterns in local neuronal firing. We observed a similar pattern for the envelope as well. MUA was significantly suppressed when low-frequency activity was high: specifically, the lowest MUA was observed during the maximum of low delta activity and slightly after the maximum of high delta and theta activity. Curiously, the opposite pattern (increased MUA during periods of reduced low-frequency oscillations) was less typical. This phenomenon may reflect the rhythmic suppression of neuronal firing during slow oscillations11,12,58, which contain ensembles of low frequencies up to the alpha range59. Although such neuronal down-states are generally followed by up-states containing high frequency rhythms52,60, the fact that down-states are generally more prominent12,58 may specifically result in a specific association between the presence of low-frequency activity in the ECoG and reductions in neuronal firing in nearby cortex. For high frequencies (low sigma through gamma, with alpha being an intermediate range), an opposite pattern was seen: MUA was maximal when oscillations in these frequencies were gaining in power, possibly reflecting the role of cortical neuronal assemblies in recruiting these oscillations.

Next, we used scalp EEGs for healthy volunteers to establish further properties of the sleep EEG envelope spectrum. We found that, similarly to the ordinary spectrum, the envelope spectrum was also characterized by higher powers at lower frequencies. In line with previous reports on slow wave and sleep spindle periodicity42,43 we found two characteristic peaks: one at ~ 0.05 Hz (20 s period, most prominent for slow rhythms), and another at ~ 0.25 Hz (4 s period, most prominent for faster rhythms). These frequency peaks were less prominent in REM sleep than in NREM.

Previous reports have established that the sleep EEG spectrum is fingerprint-like with a high intra-individual stability1,2,3,4,5, which is the result of genetic regulating factors6,7,8,9. Although our ability to fully replicate this finding in the envelope spectrum was limited by the absence of multiple recordings and genetically informative data, we could establish that when comparing spectra from the same individual across the two halves of the night or across even and odd numbered sampling windows, reliability was very high for NREM (> 0.8) and reasonably high for REM (> 0.5), with remarkably similar reliability values across all but the lowest frequencies.

The reliability of the sleep EEG envelope spectrum renders it a potential marker of stable individual differences, such as demographic variables, psychological traits or pathological conditions. In a quantitative test of this hypothesis, we found that higher age was associated with reductions in the 0.25 Hz rhythmicity of high delta through beta rhythms. A relative increase in the ~ 1 Hz rhythm of sigma-frequency oscillations, an additional increase in the very low frequency rhythms of low sigma and beta oscillations, as well as a relative reduction of low-frequency and a relative increase of high-frequency low delta oscillations was also seen. These results—together with findings from invasive EEG recordings—can be interpreted as a systematic loss of the medium-scale temporal organization of rhythmic neuronal firing as a function of ageing. Notably, envelope spectra calculated from NREM were much more associated with age than REM spectra, highlighting the functional importance of this vigilance state for ageing-related phenomena19,20,41,61.

Sex was associated with a single EEG envelope feature: low-frequency rhythmicity of the NREM beta rhythm was reduced in males, while high-frequency rhythmicity was higher. The significance of the ~ 1 Hz rhythm suggests that beta rhythms show stronger coupling to slow waves in males, however, the functional importance of this finding is currently unknown.

Although intelligence was found to be associated with multiple sleep EEG spectral features25,62, we found no evidence that it is also associated with the rhythmicity of sleep EEG oscillations.

We used a learning algorithm to perform multivariate predictions of age, sex and intelligence based on the sleep EEG envelope spectra. As expected based on the reliability of spectra, much better predictions could be made based on NREM than REM spectra. Age could be predicted with reasonable accuracy from NREM sleep envelope spectra (r ~ 0.6), although much more accurate predictors were previously constructed based on overall features of the sleep EEG19 or the shape of NREM slow waves20 Sex could be predicted from the NREM envelope spectrum with lower but still substantial accuracy (r ~ 0.45), although the predictive power of the REM spectrum was much lower. Sex prediction based on the envelope spectrum underperforms relative to other predictors based e.g. on brain imaging63,63,65. However, we did not expect the envelope spectrum to be a particularly sexually dimorphic characteristic. The non-significant zero-order correlations between the envelope spectrum and intelligence could not be improved with the use of elastic net regression: models failed to converge on most electrodes and even with this method we found no association between the envelope spectral and intelligence.

What biological process do amplitude fluctuations in the sleep EEG reflect? In Table 1 we provide a non-exhaustive list of known biological oscillations with periods at most on the minute scale. From this list, we had data about two prominent oscillations: the cardiac and the respiratory rhythm. Both oscillations could theoretically drive low-frequency EEG rhythms either through physiological mechanisms (for example, because neuronal firing depends on the availability of oxygenated blood and this is reflected in EEG rhythms) or through electrical artifacts detected by the EEG. However, based on non-significant magnitude-squared coherence and phase-amplitude coupling the respiratory rhythm appears to play a role in low-frequency EEG amplitude oscillations, and the cardiac rhythm is too fast to strongly influence all but the fastest envelope rhythms. Because our recordings did not contain data about other oscillating biological processes, we can only speculate about their role. With their characteristic 20-s periods, gastric rhythms66 oscillate at a frequency strongly overlapping with characteristic envelope frequencies, rendering EEG envelope oscillations a promising potential marker in the study of brain-viscera interactions. Other known biological rhythms are not strong candidates to be the driver of or to be coupled with EEG amplitude oscillations due to differences in their characteristic frequencies. In sum, the precise biological mechanism creating periodic fluctuations in the amplitude of EEG rhythms remains unknown and its discovery is a major task of further studies into this phenomenon.

Table 1 Biological processes with low-frequency oscillations.

In sum, our study revealed that the periodicity of amplitude fluctuations in the sleep EEG, reflected by the envelope, is a promising human biomarker. In an invasive study, it was found to be associated with fluctuations in neuronal firing. In a study of healthy volunteers, it was found to be a highly reliable individual marker, somewhat sexually dimorphic and especially strongly associated with ageing. While we showed that envelope fluctuations reflect fluctuations in neuronal firing, why these fluctuations take place (and why they change with ageing) requires further study.

Our work has a number of limitations. First, using a single IME per patient we were only able to record neuronal firing from a very limited cortical area. EEG recorded on the adjacent cortical surface is likely the summation of neuronal activity in a more extended area, consequently, the correlation between MUA and the envelope was not particularly strong. Second, we had only a single night of measurement from healthy individuals, resulting in a within-night, rather than a more optimal across-night estimation of envelope reliability.

Methods

Participants

Study 1

Sleep electrophysiological data from 13 patients undergoing presurgical electrophysiological evaluation for drug-resistant epilepsy were used. All interventions were approved by the Hungarian Medical Scientific Council and the ethical committee of the National Institute of Clinical Neuroscience. Clinical procedures were not biased for scientific purposes. All patients gave informed consent in line with the Declaration of Helsinki.

Study 2

We used data from 176 healthy participants (mean age 29.8 years, SD 10.66 years, range 17–69 years; 95 males) from a multi-center database of the Max Planck Institute of Psychiatry (Munich, Germany) and the Psychophysiology and Chronobiology Research Group of Semmelweis University (Budapest, Hungary)20,68 was used in this retrospective study. We used participants with available cognitive test scores (Raven’s Advanced Progressive Matrices, the Culture Fair Test and/or the Zahlenverbindungstest [a trail making test]). Test scores were always expressed as IQ scores with a population mean of 100 and a standard deviation of 15, and if multiple tests were available from a single participant, the scores were averaged (see the first publication of the dataset68 for details). Study procedures were approved by the ethical boards of Semmelweis University, the Medical Faculty of the Ludwig Maximilian University or the Budapest University of Technology and Economics. All participants were volunteers who gave informed consent in line with the Declaration of Helsinki. According to semi-structured interviews with experienced psychiatrists or psychologists, all participants were healthy, had no history of neurologic or psychiatric disease, and were free of any current drug effects, excluding contraceptives in females. Consumption of small habitual doses of caffeine (maximum two cups of coffee until noon), but no alcohol, was allowed. Six male and two female participants were light-to-moderate smokers (self-reported), and the rest of the participants were non-smokers. Further details about participant selection criteria and study protocols can be found in the studies reference above.

Electrophysiology

Study 1

Patients underwent electrophysiological recordings using implanted laminar microelectrodes (IME) and subdural grid and strip electrodes, from which only grids were analyzed (ECoG). Detailed descriptions of these methods are described elsewhere11,57,69. In brief, IMEs contain 24 serially referenced contacts on a cortex-penetrating pin spaced evenly at 150 µm, capable of detecting extremely local intracortical electrical activity, including neuron population firing, which is represented by high-frequency data (300–5000 Hz) from this source. Multiple-unit activity (MUA), an index of local neuronal population firing, was calculated by rectifying raw data and filtering it with a 20 Hz low-pass filter, according to standard procedure11,57. ECoG was recorded with a sampling frequency/precision of either 2000 Hz/16 bit or 1024 Hz/16 bit depending on the individual patient, and always with a contralateral mastoid reference.

We manually selected seizure-free data with adequate signal quality (indicated by the absence of continuous, broad-frequency artifacts) from all patients. Sleep staging for the selected ECoG data was performed visually on a 20 s basis based on standard criteria70. Since standard scoring criteria are generally only applicable to scalp EEG channels with a full polysomnography setup (including EOG and EMG), we restricted our scoring to the identification of NREM sleep (regardless of stage) and the separation of it from other sleep states and wakefulness, based on the presence of slow waves and spindles. REM sleep, which is difficult to detect using our setup, was not analyzed in Study 1. Artifacts were excluded from ECoG data on a 4 s basis using visual inspection. Only artifact-free data from NREM sleep was considered for further analysis. For analysis, we selected the ECoG channel closest to the IME without epileptiform activity. For the IME, we treated data from poor-quality channels (based on visual inspection) as missing data.

Study 2

All participants underwent all-night polysomnography recordings for two consecutive nights, and data from the second night was used for all analyses. Scalp EEG electrodes were applied according to the 10–20 system and referenced to the mathematically linked earlobes. Impedances were kept at < 8kΩ. EEG was sampled at 250 Hz for 115 participants, 249 Hz for 29 participants and 1024 Hz for 15 participants, always resampled at 250 Hz. Sleep EEG was visually scored on a 20 s basis according to standard criteria70. A visual scoring of artifacts was also performed on a 4 s basis. EEG preprocessing was implemented in Fercio’s EEG (©Ferenc Gombos, Budapest, Hungary). Further details about the technical details of the sample can be found in the first publication of this dataset68.

For analyses, we pooled all NREM epochs instead of analyzing N2 and SWS separately. This was motivated by observations that sleep depth within NREM is continuous rather than categorical71 and concerns that age-related and sleep depth-related changes in slow wave activity may be confounded in our demographically heterogeneous sample60.

Statistical analysis

All of the procedures described below were implemented using custom code in Matlab 2018a.

Study 1

EEG data preparation

In our main analysis in Study 1, we investigated whether fluctuations in the instantaneous amplitude of ECoG oscillations reflected synchronous fluctuations in neuronal population firing within the underlying cortex. For this purpose, we analyzed all artifact-free NREM sleep in each patient, split up into non-overlapping 20-s segments. In each segment, we demeaned ECoG data and used the modulus of the Hilbert transform to estimate the instantaneous amplitude of the following eight frequency bands: low delta (0.5–2 Hz), high delta (2–4 Hz), theta (4–7 Hz), alpha (7–10 Hz), low sigma (10–12.5 Hz), high sigma (12.5–16 Hz), beta (16–30 Hz) and gamma (30–49 Hz). For coupling analysis with each frequency band, we replaced raw MUA data with its moving average calculated from a window of 1/f seconds, where f is the upper limit of each frequency band. The purpose of this transformation was to remove high-frequency components from the MUA signal exceeding the highest frequency at which the corresponding envelope can oscillate.

ECoG-MUA coupling

For each segment and for each frequency band, we estimated the coupling between ECoG envelope and the MUA by calculating (1) the normalized cross-correlation of the two signals implemented with the xcorr() MATLAB function, allowing lags in the [− 1 1] second range; (2) the magnitude-squared coherence between the two signals at 0.1 Hz intervals between 0.1 Hz and 1 Hz, implemented with the mscohere() MATLAB function; and (3) the coupling of the amplitude of ECoG envelopes to MUA phases. For this last analysis, we first used the phase angle of the Hilbert transform to estimate the instantaneous phase of the MUA signal. Next, we z-transformed the ECoG envelope signal along the time dimension to standardize amplitude across segments. Finally, we calculated the mean standardized ECoG envelope amplitude (expressed in within-segment SD units) concomitant to MUA data in each of 12 equally spaced phase bins of 30 degrees each. For each patient, we averaged each of the three statistics across all segments to generate a mean value. We used this method to estimate phase-amplitude coupling because traditional methods72, only estimate the preferred phase and overall significance of coupling, whereas we aimed to calculate a more fine-grained estimate. We note, however, that our method is theoretically closest to the Modulation Index73, except we estimate the statistical significance of each histogram bin individually instead of relying on a single, Shannon entropy-based estimate of omnibus significance.

Statistical significance calculation

We estimated the statistical significance of coupling statistics by comparing results to surrogates obtained from random EEG segments. For this, we matched each 20-s ECoG envelope segment with a randomly selected artifact-free NREM MUA segment, calculated cross-correlation, coherence and phase-amplitude coupling and finally an average value across all segments. We performed this analysis 1000 times to generate a null distribution of coupling statistics. An empirical p-value was assigned to each statistic based on actual data, defined as the proportion of surrogate-based statistics more distant from zero.

We calculated unweighted means of all comparable statistics across patients. Similarly, we transformed p-values into standard normal deviates (z-scores) and averaged them across patients, similarly to Fisher’s method of averaging logarithmized p-values74 This approach is more conservative and different from ordinary meta-analysis in that it doesn’t add weights to patients based on the amount of data available and it doesn’t increase power over what was originally available in individual patients, so effects which fall short of significance in individual patients do not become significant when data is pooled. Effectively, the alternative hypothesis of this method is that coupling is significantly different from zero in each patient, while in a standard meta-analysis it would be that coupling is significantly different from zero when data from all patients is pooled.

Finally, average standard normal deviates were transformed back to p-values and subjected to correction for false discovery rate using the Benjamini–Hochberg method75 across all lags and IME channels by frequency band (cross-correlation), across frequencies by frequency band and IME channel (coherence), and across phase bins by frequency band and IME channel (phase-amplitude coupling).

Study 2

EEG data preparation

We used two-way least-squares filtering (implemented in the MATLAB EEGLab function eegfilt()) to filter the sleep EEG of each channel of each participant to the following eight frequency bands: low delta (0.5–2 Hz), high delta (2–4 Hz), theta (4–7 Hz), alpha (7–10 Hz), low sigma (10–12.5 Hz), high sigma (12.5–16 Hz), beta (16–30 Hz), gamma (30–49 Hz). The envelope of each of these frequency bands was calculated using the modulus of the Hilbert transform, resulting in eight signals per participant and channel. We used discrete Fourier transform (DFT, implemented in the MATLAB EEGLab function periodogram()) to estimate the power spectral density (PSD) of the envelope using rolling, overlapping 100 s windows (with 20 s steps and thus an 80 s overlap). The envelope signal in each window was demeaned, detrended and Hamming-windowed before DFT. PSD was estimated between 0.01 Hz and 4 Hz with 0.01 Hz increments for each sampling window, and an average PSD across windows was calculated for each participant, channel and frequency band.

Colliding window method and spectrum smoothing

Because fluctuations in the envelope of the EEG signal are expected to take place on a much longer timescale than fluctuations in the signal itself, very low frequencies of the envelope spectrum are of particular interest, but their estimation is only possible with sampling windows much longer than those used to estimate the ordinary power spectrum. This introduces a particular problem when dealing with artifacts. In case of the ordinary power-spectrum, which is estimated using many sampling windows each only a few seconds long, the loss of a few sampling windows due to the presence of artifacts only results in the loss of a comparatively small fraction of the total signal. In case of the envelope spectrum, however, totally discarding a 100-s sampling window due to a presence of a relatively short artifact may result in an unacceptable amount of signal loss. Therefore we used a colliding window method (Fig. 2, Panel A) to deal with artifacts. When the 100-s windows sampling the signal in 20 s steps encountered a segment marked as an artifact, they were progressively shortened to end before the artifact, until a minimum sampling window length of 20 s was reached. At this point, the sampling window skipped the artifact segment and re-started at its original 100-s duration afterwards. PSD from the shortened windows was calculated and used as usual, but PSD estimates of the frequencies below 1/L Hz were discarded and in the calculation of the average PSD data from this window was under-weighted by 1*L/100 (L in both cases refers to the length of the window in seconds). In order to avoid over-sampling of data before artifacts, all envelope signals were sampled both in the forward and backward direction, starting the 100 s windows from the beginning and the end of recordings, respectively. The colliding method ensured a minimum signal loss of 20 s instead of 100 s in case of artifacts.

The resulting average envelope PSDs were smoothed using the Savitzky-Golay method with a 10-degree polynomial, 10-base log-transformed to normalize variances for linear statistics and z-transformed across frequencies within participant and channel to eliminate the effect of between-participant differences in raw EEG signal voltage. Participants with abnormal PSDs (based on visual inspection) on any channel in any frequency band were removed from analyses concerning that frequency band (N = 1–3 participants per frequency band).

Envelope frequencies up to 2 Hz (that is, fluctuations in EEG amplitude with up to two cycles per second) were considered for analysis. Figure 2 illustrates the colliding window process, the amount and temporal position within the night of available artifact-free data and the average spectra. Detailed individual spectra are available in the Supplementary Data.

Envelope reliability

Even–odd reliability was computed by calculating the average PSD for each individual twice, using even and odd numbered sampling windows separately. Because sampling windows were up to 100 s long and overlapped by 20 s steps, only every fifth sampling window was used to avoid non-independent data. The reliability of the PSD in each frequency band, on each channel and at each frequency was estimated by the intraclass correlation coefficient (implemented as Pearson’s correlation coefficient with pooled standard deviations) between the two measurements. For split-half reliability, we also calculated the average PSD for each individual twice, using the first and last 50% of all available sampling windows separately. Because the intraclass correlation coefficient is sensitive to mean differences and we expected mean signal voltage to systematically change between the first and second halves of the night, we computed split-half reliability using the ordinary Pearson correlation instead. Although reliability is generally defined as the square root of the correlation between repeated measurements because they are both expected to be equally affected by unreliability76, we used the more conservative and more easily interpretable unsquared coefficients.

Multivariate analysis

For multivariate predictions, we used elastic net regression implemented in the MATLAB lasso() function. Elastic net regression is an iterative learning algorithm which seeks to maximize the predictive value of a large number of potentially correlated predictors by introducing a penalty term for complexity. Elastic net regression is able to fit reliable models in samples where OLS regression would be underdetermined given the large number of predictors and the small sample size. Technical descriptions77,78 and practical implementations79,80, including in sleep EEG analysis20 are available in the literature. We used fivefold cross-validation and an L1–L2 regularization mixture set at alpha = 0.5 for elastic net regression models. All envelope spectral values between 0.01–1 Hz from all spectral bands (800 variables in total) were used as predictors and age, sex (here treated as a continuous variable81) and IQ were used as dependent variables. These models were fitted independently using data from each electrode (18*3 = 54 models in total). One eighth (N = 22) of the sample was retained as a validation sample, and the models were trained on the remaining participants (N = 154, including the cross-validation samples used to ensure robust regression coefficients). The models resulting from training were used in the fully independent validation sample to check performance. The validation sample was selected by ordering participants by the values of the dependent variable and taking every 8th individual to ensure maximal variance.