Abstract
Nonoscillatory measures of brain activity such as the spectral slope and Lempel–Ziv complexity are affected by many neurological disorders and modulated by sleep. A multitude of frequency ranges, particularly a broadband (encompassing the full spectrum) and a narrowband approach, have been used especially for estimating the spectral slope. However, the effects of choosing different frequency ranges have not yet been explored in detail. Here, we evaluated the impact of sleep stage and task engagement (resting, attention, and memory) on slope and complexity in a narrowband (30–45 Hz) and broadband (1–45 Hz) frequency range in 28 healthy male human subjects (21.54 ± 1.90 years) using a within-subject design over 2 weeks with three recording nights and days per subject. We strived to determine how different brain states and frequency ranges affect slope and complexity and how the two measures perform in comparison. In the broadband range, the slope steepened, and complexity decreased continuously from wakefulness to N3 sleep. REM sleep, however, was best discriminated by the narrowband slope. Importantly, slope and complexity also differed between tasks during wakefulness. While narrowband complexity decreased with task engagement, the slope flattened in both frequency ranges. Interestingly, only the narrowband slope was positively correlated with task performance. Our results show that slope and complexity are sensitive indices of brain state variations during wakefulness and sleep. However, the spectral slope yields more information and could be used for a greater variety of research questions than Lempel–Ziv complexity, especially when a narrowband frequency range is used.
Significance Statement
We demonstrate that the spectral slope and Lempel–Ziv complexity differentiate between sleep stages, quiet wakefulness and active tasks, thus making them reliable noninvasive biomarkers of brain states. Critically, these markers were previously assessed in isolation only. Here, we provide evidence that they track highly similar information about the underlying brain state in a broad frequency range (1–45 Hz). Within this range, slope and complexity distinguish brain states better than in a more narrowband range (30–45 Hz). However, the slope calculated from the narrowband range is superior in differentiating REM from wakefulness and tracking behavioral performance. Our results demonstrate that the choice of frequency range critically affects the information reflected by the spectral slope and Lempel–Ziv complexity.
Introduction
Neural oscillations are a dominant electrophysiological signature of human brain activity. For instance, quiet wakefulness is characterized by pronounced alpha-band activity (Klimesch et al., 1993; Jensen and Mazaheri, 2010), and sleep stages are defined by oscillatory events like sleep spindles and slow oscillations (Terzano et al., 2002; Richard et al., 2012). However, recent evidence suggests that non-oscillatory, irregular brain activity, assessed by Lempel–Ziv complexity (Lempel and Ziv, 1976; Welch, 1984) or the spectral slope (He, 2014), also carries meaningful information about electrophysiological variations across brain states.
The spectral slope is obtained in the frequency domain and reflects the steepness of the power spectrum. In contrast, Lempel–Ziv complexity (Welch, 1984) is computed in the time domain and reflects the regularity of a signal (Lau et al., 2022). Thus, Lempel–Ziv complexity is still strongly influenced by oscillatory activity (Extended Data Fig. 1-4), whereas the spectral slope captures mainly aperiodic activity (Donoghue et al., 2020).
Computational modeling has demonstrated that the spectral slope constitutes a marker of the brain's excitation to inhibition (E/I) balance (Gao et al., 2017), which is impaired in a variety of clinical conditions (Rubenstein and Merzenich, 2003; Gao and Penzes, 2015; Robertson et al., 2019; Karalunas et al., 2022). Interestingly, some disorders, for instance, epilepsy, have been associated not only with alterations in the spectral slope but also in complexity (Wong, 2010; Aarabi and He, 2012; Zhu et al., 2017). Overall, previous studies suggest that both, spectral slope and Lempel–Ziv complexity, capture brain state changes in similar ways. The slope steepens (i.e., decreases) under anesthesia (Gao et al., 2017; Colombo et al., 2019; Lendner et al., 2020; Waschke et al., 2021) and during sleep (Ma et al., 2018; Miskovic et al., 2019; Lendner et al., 2020). Similarly, Lempel–Ziv complexity is reduced under anesthesia (Zhang et al., 2001; Ferenets et al., 2007) and with increasing sleep depth (Andrillon et al., 2016; Schartner et al., 2017). Evidence from Waschke et al. (2021) suggests that the spectral slope further tracks the level of attention, whereby faster response times are indexed by flatter slopes. This is in line with work demonstrating that the slope is indicative of cognitive processing speed (Ouyang et al., 2020; Pathania et al., 2022) and modulated by cognitive decline (Voytek et al., 2015; Voytek and Knight, 2015; Dave et al., 2018). Relatedly, higher task-related Lempel–Ziv complexity has also been suggested to track higher processing speed (Mediano et al., 2021).
A big issue, however, that has hampered the assessment of and comparability between slope and complexity is the huge heterogeneity in frequency ranges used to calculate these measures. While there will be no frequency range without potential confounds, it is important to compare different frequency ranges and calculation settings to gain a better understanding of how the choice of a certain frequency range affects the data. Particularly for the spectral slope, researchers have argued either in favor of broadband (Podvalny et al., 2015; Waschke et al., 2021; Karalunas et al., 2022) or more narrowband (Gao et al., 2017; Lendner et al., 2020) frequency ranges, commonly within 1–45/50 Hz. While broadband ranges (e.g., 1–45 Hz) encompass more of the total signal and result in better overall fits (Donoghue et al., 2020; Gerster et al., 2022), narrowband ranges (e.g., 30–45 Hz) are less affected by slower oscillatory activity and reflect mostly aperiodic activity (Gao et al., 2017; Lendner et al., 2020). But also regarding complexity, recent evidence demonstrated that this metric is strongly affected by different frequency contents and might be mainly driven by lower frequencies (González et al., 2022).
Taken together, a functional overlap between the spectral slope and Lempel–Ziv complexity is suggested in the literature. However, direct comparisons between the two measures are rare and limited to quiet wakefulness and anesthesia (Medel et al., 2023). Thus, even though slope and complexity are both biomarkers of arousal that are similarly modulated by changes in brain states, it is yet unclear how they behave in comparison. Moreover, it remains unclear how the selection of different frequency ranges affects the information captured by them.
Here, we leverage a within-subject design with multiple sleep and wake recordings over 14 days (1) to investigate whether spectral slope and Lempel–Ziv complexity are modulated by sleep stages and tasks during wakefulness and (2) to assess their significance for cognition in different frequency ranges. Additionally, we aim (3) to evaluate which parameter might be better suited under different circumstances and for different research questions. Finally, by using multiple recordings per subject, we assess the stability of these measures as indices of underlying brain states.
Materials and Methods
Participants and inclusion criteria
We recorded data from 28 biologically male participants (18–25 years; mean age, 21.54 ± 1.90 years) to avoid previously reported sex effects on sleep, attributed to hormonal variations (Alonso et al., 2021; Plamberger et al., 2021). Final sample sizes varied for each analysis between N = 26–28 as some participants had missing data for specific tasks or timepoints (the exact sample size for each analysis is provided in the corresponding figure caption). All participants were free of medication and did not suffer from a mental or physiological illness or reported sleep problems. They adhered to a regular sleep–wake rhythm (i.e., regular bedtimes with ∼8 h of sleep per night) and refrained from drug use and above-average caffeine consumption (more than three cups of coffee per day) during participation. For screening purposes, all subjects filled in an entrance questionnaire in which we checked for sleep quality, mood, anxiety, perceived stress level, and chronotype to exclude individuals with clinical symptoms in advance (compare Extended Data Fig. 1-1). Written informed consent was obtained from every participant, and they were remunerated with either 100€ and 16 h course credit or 50€ and 24 h course credit. The study was approved by the local ethics committee and conducted in agreement with the Declaration of Helsinki.
Experimental protocol
Study design
Each subject participated over a time span of 14 days (for an outline of the protocol, see Fig. 1). From that day on, participants wore an actigraph (MotionWatch 8; CamNtech; Table 1) and filled in daily online sleep protocols (LimeSurvey), which were checked for compliance with a regular sleep–wake rhythm. An overview of all key resources is given in Table 1.
Figure 1-1.
Entrance questionnaire results (mean and standard deviation; N = 28). Download Figure 1-1, DOCX file.
Figure 1-2.
Whole night sleep architecture for all lab visits (median and interquartile range; N = 28). Download Figure 1-2, DOCX file.
Figure 1-3.
Mean number of clean epochs (min, max) for all tasks and sleep stages per experimental condition (i.e., different lab-visits). For the wakefulness recordings, the data is averaged over the multiple measurements per lab-visit and the encoding session has been pooled over both runs per visit (N = 28). Download Figure 1-3, DOCX file.
Figure 1-4.
Illustration of the effect of signal regularity on resulting Lempel-Ziv complexity values and the shape of their power-spectra. The complexity values increase from a binary boxcar signal (purple) to a pure 10 Hz alpha oscillation (blue), further to the same oscillation with additional pink noise (red) and to pure pink noise (orange). Completely random white noise (green) has the highest complexity. Download Figure 1-4, TIF file.
The first recording was scheduled on day 4 for adaptation purposes to avoid potential first night effects (Browman and Cartwright, 1980; Curcio et al., 2004). After electrode placement, participants were familiarized with the resting session and Go/Nogo (GNG) task. Bedtime was scheduled for ∼11:00 P.M., and participants were woken up 8 h after lights out, thereby adhering to general sleep hygiene recommendations (Watson et al., 2015; Chaput et al., 2018). The experimental recordings were scheduled on days 7, 10, and 13. Participants arrived at 6:00 P.M. and electrodes were mounted again. Recordings started with an initial resting session (3 min eyes closed and 3 min eyes open) and the GNG task (10 min), which was followed by the encoding sessions (two times 14 min) of a declarative memory task. Before the first cued recall, another resting and GNG session was conducted. Afterward, participants had a break of 1.5 h in which they read standardized stories under different light conditions. These conditions consisted of either reading from a smartphone with or without a blue light filter or from a printed book, leading to varying levels of short-wavelength light exposure with dim background room lighting (Höhn et al., 2021; Schmid et al., 2021). Before going to bed at ∼11:00 P.M., participants completed the last resting and GNG session of the day. After awakening, a morning session of resting and the GNG task as well as another cued recall session were performed. During all wake recordings, daylight mimicking room lights (provided by Emilum) were dimmed to 4.5 photopic lux, and room temperature was adjusted via air conditioning based on participant's preferences.
Go/Nogo task
To assess objective levels of attention and inhibitory control, we implemented an auditory version of the Go/Nogo paradigm (Donders, 1969) via the Psychophysics Toolbox (PTB-3; Kleiner et al., 2007) in MATLAB (Release 2018b, The MathWorks). Due to the plentitude of tasks already included in the study design, we opted for an attention task that measures various aspects of attention and inhibitory control and therefore chose the Go/Nogo paradigm over a classical psychomotor vigilance task. Thus, participants were asked to react as quickly as possible on a response time box (RTBox v5/6; Ohio State University) whenever they heard a “Go” sound and needed to inhibit their reaction when a “Nogo” sound was played. The task comprised 400 trials with Go sounds being presented in 80% of the trials (the order of Go and Nogo sounds was randomized each time). The two stimuli used for the Go and Nogo sounds were low- (1,000 Hz) and high-pitched (1,500 Hz) tones, which were presented for 50 ms with a varying interstimulus interval (1,480–1,880 ms). Whether the low- or high-pitched sound represented the Go-signal was determined by chance at the beginning of each session. Participants had to react within 500 ms for the response to be considered valid, and reaction times longer than 500 ms were regarded as attentional lapses. From each session, the performance score was computed by dividing the percentage of correct trials by the median reaction time of all valid responses (≤500 ms, no errors) in milliseconds (Figueiro et al., 2016).
Declarative memory task
Participants encoded a set of 80 word pairs on days 7, 10, and 13. To avoid learning effects over time, we presented a different but similarly difficult set of 80 word pairs on each of the 3 days. The order of the sets was randomized across subjects. Each set was presented twice for 14 min during encoding, and the data from both encoding sessions was pooled. Each word pair was presented for 1,500 ms, followed by a fixation-cross for 8,500 ms. Participants were instructed to encode the word pair as vividly as possible during the presentation of the fixation-cross by imagining a semantic connection between the two words. During the cued recall sessions, only the first word of a pair was presented, and participants were asked to press a button on the response time box as soon as they remembered the second word. Whenever a button was pressed, the participant was instructed to name the missing word and a fixation-cross appeared for 3,500 ms while the experimenter noted the answer. When no button was pressed, the fixation-cross appeared automatically after 6,500 ms. Recall performance was measured as the percentage of correctly recalled word pairs during each retrieval session. To assess the overnight change in performance, we computed the increase in percentage from the evening performance to the following morning.
EEG recording and analyses
All electrophysiological data were recorded with a sampling rate of 500 Hz via the BrainVision Recorder software (Version 2.11) using a 32-channel BrainAmp system (Brain Products). We placed 11 gold-cup electrodes (Grass Technologies, Astro-Med) according to the international 10–20 system on the positions: F3, Fz, F4, C3, Cz, C4, P3, Pz, P4, O1, and O2. Linked mastoids were used for offline re-referencing as the data were online referenced against Cz. The position Fpz was used as ground electrode. Additionally, two EMG electrodes were placed on the musculus mentalis for measuring muscle activity during sleep and four EOG electrodes around the eyes to record horizontal and vertical eye movements. Impedances were always kept below 10 kΩ.
Polysomnography
Time in bed was standardized for all polysomnography recordings to 8 h. For sleep staging, the data were first low-pass filtered at 30 Hz and re-referenced to contralateral mastoids with the BrainVision Analyzer software (Version 2.2.0.7383, Brain Products GmbH, 2019). EOG and EMG channels were referenced bipolarly and the data were down-sampled to 128 Hz for further staging. Sleep stages were classified for each 30 s epoch with the Somnolyzer 24 × 7 algorithm (Koninklijke Philips N.V.) in accordance with the criteria of the American Academy of Sleep Medicine (Richard et al., 2012). The results were finally verified by a human expert scorer. The general sleep architecture of each night is presented descriptively in Extended Data Figure 1-2.
EEG preprocessing
In a first step, the raw data were processed with the BrainVision Analyzer software, and we applied a 0.3 Hz high-pass as well as a 50 Hz notch filter. EEG channels were re-referenced to linked mastoids and the online reference Cz was restored. We corrected for eye movements with the Gratton and Coles method (Gratton et al., 1983; only implemented for data during wakefulness) and ran an automatic artifact detection procedure on all scalp EEG channels, which was manually checked afterward. Events with a voltage jump exceeding 50 μV/ms, an absolute voltage difference of >400 μV within 200 ms or activity <0.5 μV for at least 100 ms were marked as bad intervals. If severe muscle or movement artifacts were missed, they were additionally marked manually. The data were then down-sampled to 250 Hz and exported for further analyses in MATLAB. The continuous data were subsequently segmented into epochs of 4 s for each task and sleep stage using the FieldTrip toolbox (Oostenveld et al., 2011). To be able to compare all task and sleep data, we decided to set the epoch length to 4 s as this enabled the best tradeoff between sufficient epochs even for the shortest tasks (3 min resting sessions) and an adequate frequency resolution. All artifact-containing epochs (defined as >1% being detected as artifact) were removed. Since the remaining number of clean epochs from the tasks (resting, Go/Nogo, encoding, and retrieval) and sleep stages (WAKE, N1, N2, N3, and REM) varied due to different recording lengths, we balanced the number of epochs across tasks and sleep stages for the multivariate pattern (MVPA) analyses. We set the maximum number of epochs for the MVPA analyses to the highest possible number of epochs from the shortest task (i.e., 45 epochs as the resting sessions only comprised 3 min). To do so, we drew a random subset of 45 epochs from all data that contained >45 clean epochs. For all other analyses, we used all available data to maximize the signal-to-noise ratio wherever possible (compare Extended Data Fig. 1-3).
Spectral slope
To obtain the spectral slope, we first calculated power spectra between 0.5 and 45 Hz from the preprocessed, 4 s segmented data via the mtmfft method in FieldTrip (Oostenveld et al., 2011) using a multitaper approach (1 Hz frequency smoothing). To extract the slope, we applied robust linear fits (using the robust fit MATLAB function) in log–log space between 30 and 45 Hz. We decided to use robust linear fits instead of using the FOOOF algorithm (Donoghue et al., 2020) for the narrowband frequency range since this approach has already been established to yield a sensitive aperiodic marker of arousal by Lendner et al. (2020) and because in this frequency range also the FOOOF would approximate a linear fit, thus leading to highly comparable results. However, for the broadband frequency range (1–45 Hz), we applied the FOOOF algorithm to extract the slope since linear fits would have been skewed by oscillatory bumps in the power spectrum.
Lempel–Ziv Complexity
We followed previous approaches (Schartner et al., 2015; Mediano et al., 2021; Medel et al., 2023) and calculated the Lempel–Ziv-Welch complexity (Lempel and Ziv, 1976; Welch, 1984) per channel and epoch. To obtain the complexity in the same frequency ranges in which we calculated the spectral slope, we applied additional 1 or 30 Hz high-pass and 45 Hz low-pass filters. As Rivolta et al. (2014) demonstrated that 1,000 datapoints are sufficient for reliable Lempel–Ziv complexity analyses during sleep, we used the same 4 s segmented data (corresponding to 1,000 sampling points per epoch in our down-sampled data) as for the spectral slope. We then applied a Hilbert transformation on each epoch to obtain the instantaneous amplitude. Afterward, we binarized the resulting single epoch data around its median amplitude and transformed it into a binary sequence. Values of 1 were given for amplitude samples above the median and values of 0 for amplitudes below (or equal with) the median. This binary sequence of ones and zeros was subjected to the Lempel–Ziv–Welch complexity algorithm (Comsa, 2019) in MATLAB. In general, higher complexity values (normalized between 0 and 1) reflect more random and unpredictable signals (compare Extended Data Fig. 1-4).
Statistical analyses
Statistics were calculated in RStudio (Version 4.1.2.). MATLAB functions from the FieldTrip toolbox and the ggplot-framework (Wickham, 2016) in R were adapted for data visualization.
ANOVA-type analyses and correlations
All analyses involved three repeated measurements (days 7, 10, and 13; compare Fig. 1) and therefore at least two factors (lab-session and task or sleep stage). Since in most cases at least one assumption for parametrical testing was violated, we decided to compute more conservative semiparametrical analyses with the MANOVA.RM package (Friedrich et al., 2019). For these factorial analyses, data were averaged over all EEG electrodes to facilitate interpretation of the results. In the statistical results, we always refer to the Wald-type statistics (WTS) with empirical p values obtained from permutation resampling procedures and 10,000 iterations. Whenever multiple comparisons were conducted, p values were corrected with the Benjamini–Hochberg procedure (Benjamini and Hochberg, 1995).
For correlational analyses, we computed the Spearman rho coefficients instead of Pearson’s correlations whenever the normality assumption was significantly violated (indicated by Shapiro–Wilk tests) and for all cluster correlations on the whole scalp level. For the cluster corrected correlation approach, we used the Monte Carlo method with 10,000 iterations to assess the relationship between EEG parameters per channel and behavioral measures.
Multivariate pattern analyses
Since it is difficult to take topographical patterns into account in classical factorial designs, we additionally computed MVPA analyses using the MVPA-Light toolbox (Treder, 2020) to exploit the information present in the complexity and slope data as patterns across electrodes. For each task and sleep stage, the complexity and slope from every epoch and electrode was fed into the classifier. Thus, the single epochs per subject were used for training and testing while the complexity and slope patterns over electrodes represented the multivariate information. For comparisons between more than two tasks or sleep stages, multiclass linear discriminant analyses (LDAs) were used and regular LDA for two-condition comparisons. We calculated classification accuracies per subject via leave-one-out cross-validation (LOO-CV) to account for the restricted amount of data available for training and testing. Since no effects regarding the different lab-sessions emerged, we pooled the data from the different lab-sessions for each participant to improve the reliability of the MVPA analyses.
Data and code accessibility
The data and code necessary to reproduce the main results and figures is freely available online at https://doi.org/10.17605/OSF.IO/QGPW4.
Results
We calculated the spectral slope and Lempel–Ziv complexity for all sleep stages and tasks in a narrowband (30–45 Hz) and broadband (1–45 Hz) frequency range (compare Fig. 1B,C; Colombo et al., 2019; Lendner et al., 2020, 2022; Jacob et al., 2021; Kozhemiako et al., 2022; Ameen et al., 2023; Helson et al., 2023). We set the upper frequency limit to 45 Hz to avoid line-noise influences ∼50 Hz and the need for fitting a knee in higher frequencies. Likewise, we decided to set the lower frequency boundary for the broadband range at 1 Hz since the area below often exhibits a plateau that would require fitting an additional knee or would otherwise also distort the data (He et al., 2010; Gerster et al., 2022). The 30 Hz lower limit for the narrowband range was selected based on original modeling work for the spectral slope, demonstrating that the 30–45 Hz range is capable of tracking changes in the brain's excitation/inhibition balance (Gao et al., 2017). Furthermore, a large replication study with >10,000 polysomnography recordings confirmed that the 30–45 Hz range tracks the hypnogram accurately (Kozhemiako et al., 2022), a finding that has also been supported by others who used a data-driven fitting algorithm to compare different frequency ranges for slope estimation (Lendner et al., 2020, 2022).
Spectral slope and Lempel–Ziv complexity delineate brain states during sleep
The narrowband slope and complexity were significantly modulated by sleep stage (N1, N2, N3, and REM sleep: WTS(4) = 133.57, p < 0.001 and WTS(4) = 21.64, p = 0.004, respectively). The narrowband slope was significantly steeper in all sleep stages compared with wakefulness with the steepest slope during REM sleep. In contrast, the narrowband complexity slightly increased from wakefulness to all sleep stages (Fig. 2). To control for muscular activity in the 40–70 Hz range, we also computed the slope and complexity of the EMG channels (Extended Data Figs. 2-1, 2-2). When partialling out the EMG from the EEG data, the modulation of the EEG slope and complexity remained largely unaffected, indicating that EMG activity did not significantly confound the results.
Figure 2-1.
Control analyses including the narrowband spectral slope from the EMG. A: The negative correlations between EEG slope and sleep stage do not change when partialling out the EMG slope. B: While the average EEG slope is negatively correlated with sleep stage, the EMG slope is even slightly positively correlated with sleep stage and significantly different from the EEG slope correlation. C: The positive correlations between EEG slope and the cognitive tasks (ordered ascendingly regarding their slope) are not diminished when controlling for the EMG. D: While the correlation between the EMG slope and the tasks is slightly higher than between the EEG slope and the tasks, partialling out the EMG from the EEG slope does not significantly reduce the correlation. E & F: Differential modulation of the EEG & EMG slopes across sleep stages and tasks. Download Figure 2-1, TIF file.
Figure 2-2.
Control analyses including the narrowband Lempel-Ziv complexity (LZC) from the EMG. A: The positive correlations between EEG complexity and sleep stage do not change when partialling out the EMG complexity. B: While both, the average EEG and EMG complexity are positively correlated with sleep stage, the partial correlation controlling for EMG complexity does not shrink substantially. C: The negative correlations between EEG complexity and the cognitive tasks are not changed substantially by partialling out the EMG. D: Both, the average EEG and EMG complexity are negatively correlated with the tasks during wakefulness but the partial correlation between EEG complexity and the tasks controlled for the EMG is not significantly smaller. E & F: Differential modulation of the EEG & EMG complexity across sleep stages and tasks. Download Figure 2-2, TIF file.
When the broadband frequency range was used for estimation, the effect of sleep stage was even more pronounced in both parameters (spectral slope: WTS(4) = 1,088.28, p < 0.001; Lempel–Ziv complexity: WTS(4) = 857.60, p < 0.001). Both, broadband slope and complexity, significantly decreased from shallow (N1) to deep NREM sleep (N3). For REM sleep, however, both markers increased again (Fig. 3), arguably reflecting more wake-like brain activity. While REM sleep was significantly different from wakefulness in both frequency ranges for both parameters (all p < 0.025), it was best discernable with the narrowband slope. We found no significant effects of the repeated measurements (all padj. ≥ 0.419), revealing that the effect of sleep stage robustly emerged in all individual recordings per subject.
Spectral slope and Lempel–Ziv complexity vary across tasks
Next, we investigated whether spectral slope and Lempel–Ziv complexity can differentiate between resting and task engagement as well as between the different active tasks. We calculated both markers from resting sessions with eyes closed (REC) and eyes open (REO), an auditory Go/Nogo (GNG) task, an encoding session (ENC) from a declarative memory task, as well as its retrieval session (RET). For this, we focused on the task data from the evening recordings (see dashed dark-green rectangle in Fig. 1A). Theoretically, a task engagement effect, representing a shift toward excitation (i.e., flatter slopes and higher complexity), should be visible between the resting sessions and the GNG or learning task. Since the GNG task was mainly auditory and should rely on different cognitive resources compared with the visual/verbal memory task, we also expected differences between the GNG, ENC, and RET sessions.
In the narrowband range, we observed a significant flattening of the slope (WTS(4) = 56.64, p < 0.001) along with a decrease in complexity (WTS(4) = 199.55, p < 0.001) from resting sessions to active tasks, including GNG, ENC, and RET (Fig. 4). As expected, the slope was flatter during the GNG, ENC, and RET tasks than during resting. However, there was an additional flattening of the narrowband slope during RET compared with that during GNG and ENC, potentially reflecting higher cognitive engagement. Narrowband Lempel–Ziv complexity did not differ between the resting and GNG sessions (all padj. > 0.110) but decreased from the GNG to the ENC session and was lowest during retrieval.
Figure 4-1.
Slope and complexity (30 – 45Hz) across tasks averaged over all timepoints. Download Figure 4-1, TIF file.
Figure 4-2.
Slope and complexity (30 – 45Hz) across tasks using a different task-order (REC#1, GNG#1, ENC, REO#2, RET#1 instead of ENC, REC#2, REO#2, GNG#2, RET#1, cf., Figure 1). Download Figure 4-2, TIF file.
When investigating the broadband frequency range, we found that the diverging pattern between spectral slope and Lempel–Ziv complexity disappeared and both parameters were increasing from rest to active task engagement (slope: WTS(4) = 40.46, p < 0.001; complexity: WTS(4) = 46.24, p < 0.001; Fig. 5). In addition, Lempel–Ziv complexity differed between the two resting sessions (eyes closed and eyes open), likely reflecting a difference in alpha power (8–12 Hz). This further supports the notion that oscillatory components exert a greater influence on Lempel–Ziv complexity than those on the spectral slope. Again, we did not observe any effects of the repeated measurements (all padj. ≥ 0.222).
Figure 5-1.
Slope and complexity (1 – 45Hz) across tasks averaged over all timepoints. Download Figure 5-1, TIF file.
Figure 5-2.
Slope and complexity (1 – 45Hz) across tasks using a different task-order (REC#1, GNG#1, ENC, REO#2, RET#1 instead of ENC, REC#2, REO#2, GNG#2, RET#1, cf., Figure 1). Download Figure 5-2, TIF file.
Figure 5-3.
Effect of choosing 1s epochs around a stimulus (GO or NOGO) or 1s epochs during an interstimulus interval (ISI) or 4s epochs across the whole task. While the general epoch-length has a strong impact on the complexity estimates (C – D), neither the slope nor the complexity is strongly affected by different epoch-types (A – D). Download Figure 5-3, TIF file.
To control for task order and potential influences of exhaustion, we repeated the analyses with the task data averaged over all timepoints (compare Fig. 1A; i.e., the resting and GNG data were averaged over four timepoints, the RET data were over two timepoints, and the ENC was only completed once) and with a different order of tasks. Both control analyses showed the same pattern as the original analysis (compare Extended Data Figs. 4-1, 4-2 as well as Extended Data Figs. 5-1, 5-2). Further, we tested in the GNG task whether it would have made a difference if we focused only on epochs with or without stimulus presentation and did not detect strong differences between different epoch types (compare Extended Data Fig. 5-3).
To evaluate the topographical distribution of the spectral slope and Lempel–Ziv complexity, we also ran MVPA analyses with multiclass LDAs. Thus, we quantified how well sleep stages and tasks could be decoded by taking the topographical distribution of the slope and complexity into account. In both frequency ranges and for both parameters, classification accuracies were significantly above chance level (20%; p < 0.001). In the narrowband range, the slope was significantly more informative about the underlying brain state (i.e., yielded higher classification accuracies) than complexity (sleep: WTS(1) = 166.15, p < 0.001; wake: WTS(1) = 82.28, p < 0.001; compare Fig. 6A). Within the broadband range, this was only true for the sleep stage classification (WTS(1) = 19.84, p < 0.001). As for the classification of tasks during wakefulness, the Lempel–Ziv complexity was more informative (WTS(1) = 22.38, p < 0.001; compare Fig. 6B). An overview of the pairwise classification accuracies for all sleep stages and task pairings is presented in Extended Data Figures 6-1 and 6-2. Correlations between slope and complexity as well as analyses of the robustness across repeated measurements are presented in Extended Data Figures 6-3, 6-4, and 6-5.
Figure 6-1.
Classification accuracy for all pairwise combinations of sleep stage and task (30 – 45Hz). Upper triangular matrix shows the results for Lempel-Ziv complexity and lower triangular matrix for the spectral slope. Data was pooled over all lab-visits for each subject. Download Figure 6-1, TIF file.
Figure 6-2.
Classification accuracy for all pairwise combinations of sleep stage and task (1 – 45Hz). Upper triangular matrix shows the results for Lempel-Ziv complexity and the lower triangular matrix for the spectral slope. The data was pooled over all lab-visits for each subject. Download Figure 6-2, TIF file.
Figure 6-3.
Correlations between spectral slope and Lempel-Ziv (LZ) complexity from 30 – 45Hz and 1 – 45Hz. The sleep (A) and task (B) data per subject were averaged across all lab-sessions. For task data, only the evening assessments highlighted by the dashed dark-green rectangle in Figure 1 were considered. Significant correlations (p ≤ .050 after correcting for false discovery rate) are highlighted with a cross on the topographical maps (color codes for the size and directionality of the correlation coefficients). Download Figure 6-3, TIF file.
Figure 6-4.
Robustness of the spectral slope and Lempel-Ziv complexity across lab-visits. Correlation coefficients over all electrodes for each parameter between the three experimental recordings (1 x 2, 1 x 3 and 2 x 3). Each of the experimental recordings refers to one lab-visit per subject. Download Figure 6-4, TIF file.
Figure 6-5.
Correlation of the slope and complexity with themselves in the narrow- or broadband frequency range during sleep (A) and wakefulness (B). Download Figure 6-5, TIF file.
The narrowband spectral slope as an electrophysiological marker of task performance
Having established that slope and complexity are not only modulated by sleep but also differ between tasks in a frequency range-specific manner, we next investigated their relationship with task performance. We correlated the slope and complexity from the narrow- and broadband frequency range during the GNG task with the according performance scores (percentage of correct trials divided by median reaction time) over multiple sessions.
Within the narrowband range, the slope was more consistently related to higher task performance than the complexity, reaching statistical significance at 3 out of 4 timepoints (compare Fig. 7). In the broadband range, the relationship with task performance was also consistently positive for both parameters but did not reach statistical significance (compare Extended Data Fig. 7-1). Thus, only the narrowband slope reliably predicted GNG task performance.
Figure 7-1.
Results when using the broadband (1 – 45Hz) frequency range. No significant relationships emerged for the spectral slope and Lempel-Ziv complexity, even though correlations were consistently positive for both parameters. Download Figure 7-1, TIF file.
Next, we determined whether the narrowband slope would also track memory performance. Thus, we correlated slope and complexity during the RET sessions of the declarative memory task with recall performance (i.e., percentage of correctly recalled word pairs). Even though the slope was again consistently positively correlated with recall performance, only few correlations (C4 and P4 at the delayed retrieval) reached statistical significance (Fig. 8). Despite the lack of statistical significance, the positive trend of tracking recall performance was only observed for the narrowband spectral slope. In the broadband frequency range, both parameters did not show a consistent relationship with recall performance (Extended Data Fig. 8-1).
Figure 8-1.
Results when using the broadband 1 – 45Hz frequency range. No relationship observable between recall performance and slope or complexity. Download Figure 8-1, TIF file.
Finally, we assessed whether the performance in the GNG and RET task were related, resulting from better overall attention and higher task engagement. However, there was no significant relationship between the performance scores in the two tasks (evening: rho = 0.10, p = 0.611; morning: rho = 0.06, p = 0.766). Thus, subjects that performed well in the GNG task did not necessarily achieve high recall performance scores.
Discussion
In this study comprising three experimental recordings with multiple measurements per subject, we demonstrated that the spectral slope and Lempel–Ziv complexity (1) reliably delineate sleep stages and (2) are modulated by different cognitive tasks. Critically, we provided evidence that (3) the modulation of the slope and complexity strongly depends on the frequency content. While the broadband (1–45 Hz) slope and complexity were more strongly modulated by sleep stages in general, the narrowband (30–45 Hz) slope best differentiated REM sleep from wakefulness and reflects mainly aperiodic activity. Moreover, we found that (4) active task engagement (i.e., switching from resting to an attention or learning task) was associated with flatter slopes in the narrow- and broadband range, but only with higher complexity in the broadband range. The broadband range was also better suited to capture differences between tasks in the classification analyses. However, (5) only the narrowband slope tracked task performance in an auditory attention task and trended toward significance regarding memory performance.
The narrowband slope uniquely tracks aperiodic brain activity in REM
Our findings corroborate previous research demonstrating that the spectral slope and Lempel–Ziv complexity are sensitive markers of sleep stage (Abásolo et al., 2015; Schartner et al., 2017; Lendner et al., 2020; Bódizs et al., 2021; Kozhemiako et al., 2022; Pascovich et al., 2022). We extended these findings by leveraging repeated EEG recordings per subject and confirmed that the two parameters can robustly differentiate between all sleep stages and wakefulness across multiple recording days. In contrast to complexity, the calculation of the slope was ∼3.5 times more computationally efficient with our implementations, highlighting its practical applicability for closed loop and clinical settings.
Overall, sleep stages could be better delineated within a broadband frequency range. This is probably because the broadband range encompasses the frequencies typically used for traditional sleep scoring, such as slow wave activity (0.5–4 Hz) and sleep spindles (11–15 Hz; Dijk, 1995), thereby increasing the sleep stage-specific information in the underlying signal. Interestingly, REM sleep was only clearly distinguished from all other sleep stages by the narrowband slope, in line with findings from Lendner et al. (2020). In the broadband range, both parameters showed a relative, more wake-like, increase during REM sleep. Since REM sleep (sometimes called “paradoxical sleep”; Peigneux et al., 2001 or Siegel, 2011) is characterized by a more desynchronized EEG pattern that lacks prominent oscillations (Peever and Fuller, 2017; Blumberg et al., 2020), these disparate results between the two frequency ranges support the notion that the narrowband slope mainly measured aperiodic activity. The relative increase in broadband complexity during REM has been attributed to higher levels of conscious content that accompany vivid dreaming and thus require more complex brain activity than deeper, mostly dreamless sleep stages (Mateos et al., 2018; Lau et al., 2022).
Previous modeling work has linked the narrowband slope with the E/I balance in the brain (Gao et al., 2017). Within this framework, steeper slopes during REM sleep potentially reflect stronger inhibitory brain activity. This might allow the brain to decouple from its environment and, by maintaining muscle atonia, to enable the consolidation of emotional memories and the experience of vivid dreams (Aime et al., 2022) without acting them out. The narrowband complexity, however, does not appear to yield informative results and stayed almost constant across sleep stages. Thus, for complexity it might not be sensible to select a narrowband frequency range. Other research also provided evidence that complexity changes are mainly driven by frequencies at the lower end of the frequency spectrum (González et al., 2022).
Aperiodic brain activity tracks task engagement and performance
We demonstrated that the spectral slope and Lempel–Ziv complexity can also track different tasks and are affected by task engagement. That slope and complexity are modulated during wakefulness is in line with other research (Sheehan et al., 2018; Jacob et al., 2021; Mediano et al., 2021; Waschke et al., 2021). However, to our best knowledge this is the first study comparing multiple tasks and different rest conditions as well as the effect of different frequency ranges. Like for sleep, we observed a homogenous modulation of the broadband slope and complexity, where flatter slopes and higher complexity values were associated with active task engagement.
In the E/I balance framework, flatter slopes are the result of higher excitation in the brain (Gao et al., 2017; Chini et al., 2022). Thus, our observed pattern of a flattening of the slope with task engagement and between cognitive tasks might be attributed to differences in the amount of required cognitive resources, leading to stronger excitatory brain activity (Harris and Thiele, 2011; He, 2011; Kanashiro et al., 2017). Unlike Waschke et al. (2021), who reported a stronger occipital flattening of the slope in a visual compared with an auditory task, we did not observe clear topographical differences between the auditory Go/Nogo task and the declarative memory task that relied on visual content. However, this lack of topographical distinctiveness might be due to a partial overlap of involved brain areas since both, auditory discrimination and learning, involve frontotemporal brain regions (Ackerman, 1992; Halsband, 1998).
When relating slope and complexity to behavior, we observed that only the narrowband slope was consistently correlated with attentional task performance across almost all recordings per subject (with the exception of the third session, compare Fig. 7). This association between flatter narrowband slopes and better task performance might even translate to cognitive tasks that do not solely rely on attention since we also observed a consistent but weaker and not statistically significant relationship with memory performance. However, in larger-scale studies which offer more reliable effect sizes and confidence intervals, the broadband slope and complexity were also significantly correlated with task performance (Mediano et al., 2021; Waschke et al., 2021). Taken together, our findings suggest that the narrowband slope serves as a particularly sensitive marker for task-dependent fluctuations in brain states relevant for behavioral performance.
Narrow- and broadband frequency ranges track different facets of brain activity
Based on the results from the broadband range, it is tempting to assume that the spectral slope and Lempel–Ziv complexity are indexing similar features of brain activity. Indeed, according to Medel et al. (2023), both parameters might be driven by the transition entropy of the underlying cortical system (i.e., the predictive capacity of the current signal for the upcoming signal). Thus, flatter slopes and higher complexity values could be characteristic of the same cortical states. However, the divergence between the slope and complexity in the narrowband range clearly demonstrates that the two parameters are not redundant and indeed track different facets of the underlying signal. Different contributions of oscillatory and aperiodic brain activity might account for the diverging patterns. At first, it appears paradoxical that flatter slopes, representing an increase in aperiodic activity, should be accompanied by a decrease in complexity as complexity should also increase with higher irregularity. However, others have also reported this type of counterintuitive behavior. For instance, Mediano et al. (2021) showed that in MEG within 0.5–30 Hz, active tasks exhibited lower complexity values than quiet wakefulness. Additionally, a recent review from Lau et al. (2022) discussed several studies that reported contradicting modulations of signal complexity in different clinical conditions, where some report lower and others higher levels of complexity. So far, these contradictory findings seem to be best explained by the notion that higher complexity values can represent both, either more complex or more random systems (de la Torre-Luque et al., 2016), which makes it difficult to argue whether higher complexity always represents a healthier brain.
Limitations
In this study, we focused exclusively on two specific EEG derivatives: spectral slope and Lempel–Ziv complexity. Consequently, we did not compare these measures against other established analytical techniques such as spectral power, entropy, or network analyses (e.g., coherence). However, regarding spectral power, previous research demonstrated that the spectral slope is superior in discriminating REM sleep from wakefulness compared with slow oscillation or gamma power and performs similarly to beta power (Lendner et al., 2020; Kozhemiako et al., 2022). Additionally, Biggs et al. (2022) showed that Lempel–Ziv complexity also performed similarly well in comparison with alpha power and outperformed permutation entropy in capturing age-related changes in brain activity induced by anesthesia. Nevertheless, comparisons with other biomarkers, such as heart rate variability or blood pressure (Radha et al., 2019; Mitsukura et al., 2020; Kuula and Pesonen, 2021), as well as specific benchmark tests involving both spectral slope and Lempel–Ziv complexity, are still lacking and merit exploration in future large datasets.
It should also be noted that the tasks in this study were not specifically designed for the analysis of varying levels of task demand or difficulty as the dataset was originally designed for other purposes. Even though the participants reported differences in task difficulty, other significant factors that could potentially influence the results include differences in task modality. While there is evidence that attentional and learning tasks do differ regarding their level of cognitive demand (Sweller, 2011; Bambrah et al., 2019), it also seems to be dependent on the specific task instructions and modalities. In the future, it might be promising to contrast tasks that exclusively rely on different cognitive resources and sensory modalities.
Despite using only 11 scalp electrodes and no high-density EEG caps due to the need for long-term EEG data collection (14–16 h), we still robustly detected modulations by sleep stage and task engagement, thereby providing evidence for the practical usability of the slope and complexity as indices of different brain states. Nevertheless, research with high-density or intracranial EEG might further contribute to the understanding of which topographical areas are most influential in driving changes in slope or complexity across brain states.
Finally, we only recruited healthy biologically male adults in a restricted age range (18–25 years) to avoid potential sex differences and hormonal effects (Plamberger et al., 2021; Kozhemiako et al., 2022) and because controlling for hormonal variations by exclusively recording female participants in the follicular phase would have been extremely challenging with our study design. Therefore, it is unclear to what extent our results generalize to other populations.
Conclusions
Our results demonstrate that EEG spectral slope and Lempel–Ziv complexity are powerful indices of brain states during sleep and wakefulness. We present robust evidence from multiple recordings of three within-subject measurements, revealing that sleep stages and various cognitive tasks are reliably indexed by both spectral slope and Lempel–Ziv complexity. When derived from the full spectrum, slope and complexity capture redundant information and are influenced by oscillatory activity, particularly during sleep. In contrast, the narrowband slope (30–45 Hz) mainly indexes aperiodic brain activity, offering additional insights into underlying brain states. It provides a means to infer potential changes in the excitation/inhibition balance using only scalp electrodes, thus characterizing the spectral slope as a unique electrophysiological marker and distinguishing it from other measures such as spectral power. Moreover, recent evidence has shown that aperiodic activity on the scalp level can even offer insights into excitability changes on a cellular basis and reflects variations in pyramidal cell calcium activity (Lendner et al., 2023).
In the present study, the narrowband slope also proved to be the most powerful index of behavioral performance and was best suited to differentiate REM sleep from wakefulness and all other sleep stages without the additional use of EOG or EMG. Computing complexity in the narrowband range, however, did not yield any particularly meaningful results and should be undertaken with caution. Therefore, considering the faster computation time and the more diverse range of applications when using different frequency ranges as well as its correlation with task performance, the slope might be more practical and useful in most circumstances compared with complexity. Taken together, our study emphasizes the importance of considering the parametrization of brain activity into full, oscillatory, and aperiodic components to comprehensively understand the dynamics underlying passive and active brain states during sleep and wakefulness.
Footnotes
The authors declare no competing financial interests.
This research was funded by the Austrian Science Fund (FWF, P32028) and the Centre for Cognitive Neuroscience Salzburg (CCNS). C.H. further received funding from the Doctoral College “Imaging the Mind” (FWF; W1233-B). M.A.H. was supported by the PRIME programme of the German Academic Exchange Service (DAAD) with funds from the German Federal Ministry of Education and Research (BMBF). J.D.L. received a grant from the German Research Foundation (DFG LE 3863/2-1) and received further funding from the Intramural Funding University of Tübingen (TÜFF Nr. 2744-0-0). We thank Sarah R. Schmid, Selina Schindlmayr, Daniela Niebler, Lucy Matthews, Marina Thierauf, Leoni Bernstorf, Lorenz Rapp, Henrik Rheinwald, and Leonard van Dyck for their help with the data collection process and recruitment of participants.
Austrian Science Fund (FWF; P32028, W1233-G17, and W1233-B); German Research Foundation (DFG: LE 3863/2-1 and HE8329/2-1); Centre for Cognitive Neuroscience Salzburg (CCNS); German Academic Exchange Service (DAAD); Intramural Funding University of Tübingen (TÜFF Nr. 2744-0-0) and Jung Foundation for Science and Research.
This is an open-access article distributed under the terms of the Creative Commons Attribution 4.0 International license, which permits unrestricted use, distribution and reproduction in any medium provided that the original work is properly attributed.