# Predicting the loss of responsiveness when falling asleep in humans

Mélanie Strauss, Jacobo D Sitt, Lionel Naccache, Federico Raimondo

► To cite this version:

Mélanie Strauss, Jacobo D Sitt, Lionel Naccache, Federico Raimondo. Predicting the loss of responsiveness when falling asleep in humans. NeuroImage, 2022, 251, pp.119003. 10.1016/j.neuroimage.2022.119003. hal-04502209

HAL Id: hal-04502209

https://hal.science/hal-04502209v1

Submitted on 13 Mar 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
<figure><img src="image_2.png" /></figure>

# Predicting the loss of responsiveness when falling asleep in humans

Mélanie Strauss<sup>a,b,c,*</sup>, Jacobo D. Sitt<sup>d,e</sup>, Lionel Naccache<sup>d,f</sup>, Federico Raimondo<sup>d,g,h,i,**</sup>

<figure><img src="image_3.png" /></figure>

## ARTICLE INFO

### Keywords:

Drowsiness

N1 sleep

Sleep onset

Micro-sleep

P300

MEG

## ABSTRACT

Falling asleep is a dynamical process that is poorly defined. The period preceding sleep, characterized by the progressive alteration of behavioral responses to the environment, which may last several minutes, has no electrophysiological definition, and is embedded in the first stage of sleep (N1). We aimed at better characterizing this drowsiness period looking for neurophysiological predictors of responsiveness using electro and magnetoencephalography. Healthy participants were recorded when falling asleep, while they were presented with continuous auditory stimulations and asked to respond to deviant sounds. We analysed brain responses to sounds and markers of ongoing activity, such as information and connectivity measures, in relation to rapid fluctuations of brain rhythms observed at sleep onset and participants' capabilities to respond. Results reveal a drowsiness period distinct from wakefulness and sleep, from alpha rhythms to the first sleep spindles, characterized by diverse and transient brain states that come on and off at the scale of a few seconds and closely reflects, mainly through neural processes in alpha and theta bands, decreasing probabilities to be responsive to external stimuli. Results also show that the global P300 was only present in responsive trials, regardless of vigilance states. A better consideration of the drowsiness period through a formalized classification and its specific brain markers such as described here should lead to significant advances in vigilance assessment in the future, in medicine and ecological environments.

## 1. Introduction

Falling asleep is a dynamical process characterized by blurred perceptions, hypnagogic hallucinations, and decreased responsiveness to the environment (Casagrande et al., 1997; Foulkes and Vogel, 1965; Ogilvie et al., 1989; Yang et al., 2010). This drowsiness period may last several minutes before entering in effective sleep, defined behaviourally as the moment when subjects cease to be responsive. At the electrophysiological level, brain activity changes from rapid wakefulness rhythms to slower ones, and to the occurrence of phasic events specific to sleep, such as K-complexes and sleep spindles. Yet, the precise time course of responsiveness fading during this wake-sleep transition and the corresponding electrophysiological markers remain unknown.

The current reference classification of sleep stages (American Academy of Sleep Medicine and Iber, 2007) does not define any drowsiness period, but embeds it in both wakefulness and the first stage of sleep (N1 sleep). Moreover, N1 sleep appears as a heterogeneous stage that regroups different behavioural, cognitive and conscious states (Bareham et al., 2014; Goupil and Bekinschtein, 2012; Strauss et al., 2015;). Especially, in a previous study (Strauss et al., 2015) where we monitored responsiveness in healthy subjects during wakefulness and sleep using a nearly-continuous behavioural measure, the participants' motor response to auditory deviant stimuli (local-global paradigm, see also figure 1.A), we observed that in N1 sleep subjects could be responsive or not to stimuli. Simultaneous brain activities recorded using electro- and magneto-encephalography (M/EEG) showed that subjects

## ARTICLE INFO

<footnote><sup>a</sup> Cognitive Neuroimaging Unit, CEA DSV/I2BM, INSERM, NeuroSpin Center, Université Paris-Sud, Université Paris-Saclay, Gif-sur-Yvette, France</footnote>

<footnote><sup>b</sup> Neuropsychology and Functional Imaging Research Group (UR2NF), Center for Research in Cognition and Neurosciences (CRCN), Université Libre de Bruxelles, B-1050 Brussels, Belgium</footnote>

<footnote><sup>c</sup> Departments of Neurology, Psychiatry and Sleep Medicine, Cliniques Universitaires de Bruxelles, Hôpital Erasme, Université Libre de Bruxelles, B-1070 Brussels, Belgium</footnote>

<footnote><sup>d</sup> Institut du Cerveau et de la Moelle épinière, ICM, PICNIC Lab, F-75013 Paris, France</footnote>

<footnote><sup>e</sup> Inserm U 1127, F-75013 Paris, France</footnote>

<footnote><sup>f</sup> Department of Neurophysiology, Hôpital de la Pitié-Salpêtrière, AP-HP, F-75013 Paris, France</footnote>

<footnote><sup>g</sup> GIGA-Consciousness, Coma Science Group, University of Liège, Liège, Belgium</footnote>

<footnote><sup>h</sup> Institute of Neuroscience and Medicine, Brain & Behaviour (INM-7), Research Centre Jülich, Jülich, Germany</footnote>

<footnote><sup>i</sup> Institute of Systems Neuroscience, Medical Faculty, Heinrich Heine University Düsseldorf, Düsseldorf, Germany</footnote>

<footnote>* Corresponding author at: Departments of Neurology, Psychiatry and Sleep Medicine, Cliniques Universitaires de Bruxelles, Hôpital Erasme, Route de Lennik, 808, B-1070 Brussels, Belgium.</footnote>

<footnote>** Institute of Neuroscience and Medicine Brain & Behaviour (INM-7), Forschungszentrum Jülich, Wilhelm-Johnen-Strasse, 52425 Jülich, Germany.</footnote>

<footnote>E-mail addresses: melanie.strauss@erasme.ulb.ac.be (M. Strauss), f.raimondo@fz-juelich.de (F. Raimondo).</footnote>
A

<figure><img src="image_4.png" /></figure>

B

<figure><img src="image_5.png" /><figcaption>**Figure 1.** Experimental Design. A. Experimental paradigm. Auditory sequences of 5 sounds were presented with local and global deviancies, defined respectively as sequences with a deviant 5th sound (sound B), and rare sequences presented 20% of time (in red). B. Hori stages (labelled with H) of drowsiness and their simplified version (labelled with D). Ongoing brain activity (power spectrum density, permutation entropy, weighted symbolic mutual information) and response to local and global deviancy were recorded with electro-and magnetencephalography during wakefulness, drowsiness and sleep.</figcaption></figure>

who were still responding kept exhibiting a P300, a brain response associated with predictive coding and consciousness (Bekinschtein et al., 2009; Dehaene and Changeux, 2011; Wacongne et al., 2011), while those who were not responding did not exhibit any P300. There were then clear-cut differences in behavioural and brain responses to external stimulations within this same stage of N1 sleep, raising the question of the real electrophysiological markers of sleep onset. Improving our knowledge of those markers seems critical in order to properly assess vigilance and related cognitive and behavioural states, whether it be in the fields of medicine, research or public health, such as in the evaluation of drowsiness while driving or operating machinery.

Such a fuzziness in behavioural and brain responses observed in N1 sleep is largely favoured by the large time window used for sleep scoring (typically 30 sec.), which necessarily leads to the averaging of multiple brain activities, and implies that what is called N1 sleep (and preceding wakefulness) is likely to include periods of wakefulness, drowsiness and sleep. Indeed, N1 sleep may regroup within the same 30 sec. epoch alpha rhythms, alpha suppression with a flattening of the signal, theta rhythms, and grapho-elements such as vertex sharp waves or incomplete sleep spindles. The presence of those different electroencephalographic (EEG) patterns before entering N2 sleep, when occur the first sleep spindle or K-Complex, has already been described a few

decades ago (Gibbs and Gibbs, 1950; Hori, 1991; Santamaria and Chiappa, 1987). Hori and colleagues (Hori, 1991; Hori et al., 1994) developed a 5 seconds-epoch classification of drowsiness based on the different EEG patterns (figure 1.B), enabling to better reflect the rapid rhythm modifications that occur during the wake-sleep transition. They showed that both hypnagogic perceptions and reaction times evolved in correlation with these successive EEG modifications. More recently, alpha suppression and the occurrence of theta rhythms have been associated with decreased brain connectivity (Noreika et al., 2020) and modifications in conscious threshold (Noreika et al., 2017), and the theta-alpha ratio was shown to discriminate non-responsive periods in deep drowsiness from responsive wakefulness (Comsa et al., 2018).

We then propose here to go further in the definition of sleep onset, in specifying the time-course of responsiveness fading in association with physiological markers, and trying to extract the physiological predictors of responsiveness at each given time. We re-analysed the wake-sleep transition of our above-mentioned study (Strauss et al., 2015) taking advantage of the detailed Hori classification (Hori et al., 1994) and its simplified version (Nittono et al., 2001) (figure 1.B), and extracted related markers of ongoing activity reflecting information and connectivity in the brain (Denis A. Engemann et al., 2018; Sitt et al., 2014) and event-related responses (ERFs) to stimuli. We used machine learning methods to extract the predictors of responsiveness. We demonstrate here the existence of a period of drowsiness distinct from wakefulness and sleep, characterized by transient brain states that come on and off at the scale of a few seconds and where brain activity and long-distance communication in specific frequency bands, especially the alpha band, are the best predictors of responsiveness.

## 2. Materials and Methods

### 2.1. Procedure

The current paper is a reanalysis of data described in Strauss et al. (2015). Subjects were recorded in magneto- and electroencephalography (M/EEG) in wakefulness and sleep during a morning nap, after a night of sleep restriction (4h of sleep, controlled by actimetry - Actiwatch 7, Sleepwatch software 7.5 CamNtech).

### 2.2. Stimulation

Stimuli were pairs (AB) of phonetically distant French vowels (100 ms duration). Each pair was used to form 2 types of blocks with 100 sequences of 5 vowels (150ms stimulus onset asynchrony (SOA) between vowels). Sequences were separated by silent gaps of variable duration (700 to 1000ms inter-trial interval (ITI), 50ms steps). In one block type (aa), the 5 vowels within the sequence were identical (aaaaa, 'local standard' sequence, LS) in the 10 first sequences of habituation and then in 80% of the sequences of the block, defining then the 'global standard' (GS) sequence (cf figure 1.B). In the 20% remaining sequences ('global deviants', GD), the 5th vowel differed from the 4 first ones (aaaaB, 'local deviant', LD). In the other block type (aB), reversely 'local deviant' sequences were used as 'global standards', and 'local standards' sequences as 'global deviants'. The global effect was then computed contrasting the global deviant sequences to the global standard ones, and the local effect contrasting the local deviant sequences to the local standard ones. Each type of blocks was repeated twice in order to counterbalance vowels.

Auditory sequences were presented during sleep and during wakefulness before and after the nap. To monitor responsiveness to the environment, subjects were asked to give a motor response whenever they heard a global deviant (in pressing a button, hand was balanced across subjects), and to try to continue responding even as they were falling asleep during the sleep session. As we asked subjects to respond as soon as they were aware of deviant sounds, responsiveness and consciousness were confounded in this study. We confirmed this association in showing
that the M/EEG global effect (P300) was not present in non-responsive trials (cf figure 3.). Importantly, we controlled in a previous publication (Strauss et al., 2015) that the presence of the P300 was associated with conscious detection and not only with motor responses by asking subjects not to respond but to be attentive to GD sequences in half of the blocks during wakefulness. We confirmed that a P300 was still elicited after global deviant sequences in those no-report but attentive blocks.

## 2.3. Subjects

31 healthy right-handed subjects and good sleepers between 18 and 35 years old were recruited on a voluntary basis after giving written informed consent. The study was approved by the Ethical Committee Ile de France VII (Comité de Protection des Personnes 08-021). They had no history of neurological, psychiatric or sleep disorders, and were refrained to use stimulating beverages (coffee, tea, energy drinks) in the 24h before the experiment. Only subjects who correctly applied the motor detection task when falling asleep and who had enough N1 trials to extract a clear auditory event-related field were kept for analysis (N=15). Those reporting having stopped on purpose to respond to global deviant sequences in order to fall asleep were rejected (for detailed sleep parameters see table S1). We then excluded one of the remaining subjects because of the absence of alpha rhythms during eyes-closed calm wakefulness (which is the case in about 10% of the general population (Santamaria and Chiappa, 1987)), which prevented to score the Hori stages before the occurrence of theta waves.

## 2.4. Simultaneous M/EEG Recording

MEG and EEG signals were simultaneously recorded with the Elekta Neuromag system in supine position (204 planar gradiometers and 102 magnetometers) and its built-in EEG system (60 channels, referenced to an additional nose electrode). Electrocardiogram (ECG), electrooculogram (EOG) (horizontal and vertical) and chin electromyogram (EMG) were recorded as auxiliary bipolar channels. During the acquisition the signal was low-pass filtered at 330 Hz, high-pass filtered at 0.1 Hz and sampled at 1 KHz. EEG, EOG and EMG signals were used to monitor sleep stages on-line. The head position in the MEG sensor array was continuously acquired during each block thanks to four head-position indicator coils attached to the scalp and previously digitized with respect to three anatomical landmarks (nasion and preauricular points, Polhemus Isotrak system).

## 2.5. Data analysis

### 2.5.1. Sleep Onset Analysis

Wakefulness and sleep stages were scored off-line (Nocturnal software, v.4.4.2) on EEG, EOG and EMG signals by a sleep expert according to both the reference 30s-epoch sleep classification (American Academy of Sleep Medicine and Iber, 2007) and the Hori scale of drowsiness (Hori et al., 1994), based on epochs of 5 sec. (fig. 1.A). We also defined different sub-stages within N2 sleep: in addition to the Hori stage 9 (H9), that we scored as epochs containing the first sleep spindles in the first 15 s. of N2 sleep, we separated the ‘early-N2’ from the consolidated or ‘late-N2’, with epochs respectively in the first 5 minutes of N2 or later. We also differentiated epochs with sleep spindles, K-complexes or slow waves in addition to the theta background, which were manually detected.

The time spent in each Hori stage were not similar and some of them were only poorly represented (Tanaka et al., 1996) (ex: H6 to H8, cf fig. 1.C). In order to increase the number of trials per condition and to be able to compute event related fields (ERFs), we used a simplified drowsiness (D) classification regrouping some of the Hori stages with similar EEG activity, thus ending up with only 4 D stages (see also (Nitto no et al., 2001)). Epochs containing alpha rhythms (H1 to H3) were grouped in D1. Epochs with flattening of the signal (H4) and theta

waves (H5) were kept apart in D2 and D3. Epochs with sharp waves or incomplete spindles (H6, H7 and H8) were grouped in D4.

### 2.5.2. Behaviour

Statistical analysis for response rates and reaction times were performed with Kruskal-Wallis ANOVA tests for comparison across multiple stages, and with paired Wilcoxon sign rank tests for comparison between two stages.

### 2.5.3. MEG preprocessing

Signal analyses are only reported on MEG data considering its much higher number of sensors, better source localization and signal-to-noise ratio compared to EEG. Data were preprocessed with successively signal space separation correction, continuous head movement compensation and bad channels correction (MaxFilter, Elekta Neuromag). Signal was then down-sampled (250Hz), filtered (0.3-80Hz) and epoched from -200 to 1450ms around the sequence onset. Bad trials were visually detected and excluded.

### 2.5.4. Event Related Fields (ERFs)

ERFs for local and global effects were computed for each drowsiness stage with subjects presenting at least 10 trials in the considered stage. Statistical analyses were performed with cluster permutation tests corrected for multiple comparisons over time and sensor space for each type of sensors (magnetometers and gradiometers, with Field-trip, Monte-Carlo method, 1000 permutations). Search windows were defined between 0 and 400ms after the 5th deviant sound for the local mismatch effect (MMN time window) and between 48 and 700ms for the global effect (P300 time window). For simplicity and based on Strauss et al. (2015), we report topographies, time series and statistical analyses conducted on one type of MEG sensors (gradiometers oriented on the dy axis). If several clusters were significant for the same effect, we reported the time of the significant time-window over the different clusters, and the p-value and effect size (Cohen's d) of the biggest cluster (see SI table S3 for complete results with all clusters and sensor types). Based on previous MEG studies using the same paradigm (Bekinschtein et al., 2009; Wacongne et al., 2011; Strauss et al., 2015), a sensor lying next to the auditory cortex and lateralized to the left hemisphere was selected to display MEG time series for local and global effects. ERFs amplitude analysis are performed on the average of 4 sensors in the left temporal area.

### 2.5.5. Measures of ongoing brain activity

To assess ongoing brain activity, we computed three classes of measures based on oscillations: 1) spectral power, comprising raw and normalized Power Spectral Density (PSD), Median Spectral Frequency (MSF), spectral edge 90 (SEF90), spectral edge 95 (SEF95) and the theta/alpha ratio, 2) metrics quantifying the information content of the MEG signal, comprising Spectral Entropy (SE), Kolmogorov-Chaitin complexity (K) and Permutation Entropy (PE; (Bandt and Pompe, 2002)) and 3) functional connectivity measures, including Symbolic Mutual Information (SMI) and weighted Symbolic Mutual Information (wSMI) (King et al., 2013), that quantify the amount of information shared between distant sensors. PSD markers were computed in delta (1-4), theta (4-8Hz) alpha (8-12Hz), beta (12-30Hz), gamma (30-60Hz) and high gamma (60-80Hz) bands. PE was computed in theta, alpha, beta and gamma. SMI and wSMI were computed in theta and alpha bands. All markers were computed for each epoch and channel, using the interval between the baseline and 600 ms (the onset of the last stimulus).

PSD was computed using the welch method (Welch, 1967), dividing the signal into segments of 512 ms, with 400ms overlap between segments. Segments were windowed using a Hann window and zero padded to 4096 samples. The power in each band was computed by integrating the power within the band.

Kolmogorov-Chaitin complexity was computed by compressing a discretization of the signal using a histogram approach with 32 bins. Permutation Entropy was obtained by computing the entropy of a symbolic
transformation of the signals (King et al., 2013). SMI and wSMI is then computed from the same symbolic transformation, but data was first filtered using Current Source Density estimates (Kayser and Tenke, 2006) to diminish the volume conduction.

Subject's markers were computed by averaging across sensors (mean) and epochs (80% trimmed mean) for each of the Hori stages. For the connectivity metrics, each sensor's connectivity was estimated as the median connectivity to all other sensors. Group statistics were calculated using Page's L test for multiple comparisons between ordered correlated variables (Page, 1963).

### 2.5.6. Decoding

To relate the ongoing brain activity to the subjects' responsiveness, we employed a multivariate decoding approach. We computed each of the previously described markers and averaged across sensors, obtaining 26 values for each epoch. As predictive model, we used an Extremely Randomized Trees classifier (ET) (Geurts et al., 2006). We used the Area Under the Receiver-Operator Characteristic curve (ROC-AUC) as the performance metric. To assess its variability, we used repeated (10) stratified 10-fold cross-validation (when training and testing in the same stage) and the percentile bootstrap approach (Efron and Tibshirani, 1994) repeated 1000 times (for training and testing in different stages). In each of the bootstrap repetitions, we randomly subsampled each subject's data independently, maintaining the same number of responsive and unresponsive epochs. Each time we trained the ET classifier, we also trained a 'dummy' classifier to obtain the empirical chance level of the training samples distribution. This type of classifier generates predictions based on the distribution of training samples for each class without accounting for the features. Finally, we computed the differences between the ET and the empirical chance level estimation for each test case and computed the 2.5 and 97.5 percentiles of the distribution to test if the model's predictive capacity was above chance level as equivalent to $p < 0.05$ (Tan, 2010).

## 2.6. Software and Data

MEG data was preprocessed with Fieldtrip (Oostenveld et al., 2011). Markers were computed using NICE (Denis A Engemann et al., 2018) and MNE-Python (Gramfort et al., 2013). Decoding was computed using scikit-learn (Abraham et al., 2014; Pedregosa et al., 2012;). All scripts used for the analysis after pre-processing the data are available at https://github.com/fraimondo/lg_sleep_paper. Raw and epoched MEG data are subject to the data privacy, ethics requirements and informed consents signed by the participants at the moment of acquisition. It can be shared upon reasonable request to authors and with a formal data sharing agreement. The MEG-extracted markers for the analysis are available from figshare with the DOI: 10.6084/m9 figshare.14039315.

# 3. Results

## 3.1. Behaviour

Subjects were continuously presented during wakefulness and the transition to sleep with sequences of five sounds (local-global paradigm, see figure 1.A) embedding local (low-level, within sequences) and global (high-level, between sequences) violations of regularities. They were asked to give a motor response to global deviancies as soon as they were aware of them, until they fell asleep.

Behavioural results relative to drowsiness classifications (figure 1.B) are presented in figure 2 and table S2. All subjects emitted motor responses to global deviant sequences in wakefulness and in the first drowsiness stages, when alpha rhythms were present (Awake and H1-H3/D1: 100%). Then, during the descent to sleep, we observed a progressive decrease in the number of responsive subjects, with a clear drop coinciding with the occurrence of sharp waves (from 85.7% in H5/D3 to 28.6% in H6/D4). In the first few minutes of N2 sleep, few subjects were

still responding (H9 and early-N2: 14.3%), but no subject continued to respond during consolidated N2 sleep (late-N2). The motor response rate to global deviants, computed over all the subjects, also decreased with drowsiness depth (Page's L=1159, p<1e-15, see table S2), with an important decrease coinciding with the occurrence of theta waves (from H4/D2: 38.8% to H5/D3: 13.1%). In parallel, reaction times increased (Page's L=325, p=0.006).

## 3.2. Event related fields

### 3.2.1. Local effect

The local mismatch response (MMR) was analysed by comparing brain responses elicited by standard and deviant sounds (aaaaa vs aaaaB). We showed previously (Strauss et al., 2015) that during wakefulness the MEG MMR was composed of 3 parts: the early and the late components (respectively <100ms and >200ms post deviant sounds) that reflect adaptation processes and are preserved during sleep, and the intermediate one (100-200ms, the proper mismatch negativity – MMN – in EEG) that reflects the prediction error signal and vanishes as the depth of sleep increases during N2 and REM sleep. We confirmed here that adaptation was preserved during drowsiness and sleep (figure 3), with a significant early and/or late MMR, except in D4 (Awake: late 196-244ms, p=0.026, d=1.21; D1: early 68-116ms, p=0.033, d=0.68 and late 188-332ms, p=0.001, d=1.37; D2: late 224-280ms, p=0.021, d=1.22; D3: early 88-180ms, p=0.024, d=1.60 and late 228-372ms, p=0.006, d=2.11; D4: NS; N2: late 164-324ms, p=0.006, d=2.17; n=14 except for N2 n=13). Adaptation processes may vanish during sharp waves (D4) and be recovered during N2 sleep, but more probably the effect failed to reach significance because of insufficient and noisier data in this stage (with only few trials per subject, cf figure 2.B). On the contrary, the prediction error signal (intermediate MMR/MMN in EEG) decreased progressively in amplitude (in $x10^{-12}$ T/m$^2$, Awake: 2.56, D1: 1.97, D2: 1.47, D3: 1.03, D4: 1.24, N2: 0.15, Page's L=1073, p=7e-06) and was slightly delayed through drowsiness stages (Awake: 157ms, D1: 159ms, D2: 169ms, D3: 171ms, D4: 170ms, N2: 167ms, Page's L=1026, p=0.005). It failed to reach significance at the moment of the occurrence of theta waves (D3) (cluster analysis, Awake: 116-168ms, p=0.016, d=1.79; D1: 120-184ms, p=0.016, d=1.33; D2: 120-184ms, p=0.038, d=1.12; D3, D4 and N2 NS; n=14 except for N2 n=13).

Note that this analysis of the local effect combined responsive and non-responsive trials, while the MEG-MMR may behave differently depending on responsive states. The decrease in amplitude with drowsiness could be explained by an absence of MMR in non-responsive trials, whose number increases with drowsiness depth. We therefore computed the local effect only in blocks where responsiveness could be monitored (when local deviants are also global deviants, aaaaa/aaaaB blocks, see figure S1). Indeed, we found that the amplitude of the MMR peak was significantly modulated by the responsive state, with significant effects only in the responsive conditions and not in non-responsive conditions, and with significant increased amplitude of the MMR peak within the same drowsiness stage in the responsive compared to the non-responsive condition (for example in D1, p=0.035). Within a given responsive state, the MMR peak was actually only slightly modulated by vigilance.

### 3.2.2. Global effect

The global effect was analysed comparing brain responses elicited by standard and deviant (rare) sequences, an effect known to be associated with the P300 in EEG (Bekinschtein et al., 2009; Wacongne et al., 2011; Strauss et al., 2015). Data were split according to the subject's responsiveness to global deviant sequences (figure 3), which was, critically, reflecting the presence or absence of awareness of those sequences. The global effect when subjects were responsive could be computed only until D3, since too few sequences were detected after this stage to compute an ERF (<10 trials per subject and condition). Until D3, a significant global effect was found in all stages (Awake: 140-900ms, p=0.003, d=2.61, n=14; D1: 144-900ms, p=0.001, d=2.10, n=14; D2: 188-584ms,
<figure><img src="image_6.png" /><figcaption>**Figure 2.** Behavioural Results. A. Example of the sleep onset period in one given subject, from top to bottom: spectral analysis, AASM 30 sec. sleep scoring, behavioural responses, Hori 5 sec. epoch drowsiness scoring, theta/alpha ratio. B. Total number of trials in the different vigilance states (Hori stages). C. Percentage of subjects responding, response rate and reaction times to global deviants are shown for the different Hori stages (top) and the simplified drowsiness stages (bottom). When falling asleep, both the number of subjects responding and the response rate per subject decrease, and reaction times increase. Responses are no longer emitted in consolidated N2 sleep (after the first 5 minutes of N2 - late N2 Sleep) and in epochs containing spindles or K-complexes (Sp/KC). Error bars represent standard error to the mean (sem).</figcaption></figure>

p=0.006, d=3.69, n=7; D3: 128-192ms, p=0.035, d=5.02, n=5). The effect started over bilateral temporal areas and spread to anterior areas in later latencies (>350ms). This late anterior effect was shortened through drowsiness stages and failed to reach significance in D3. Of note, the more advanced stages of drowsiness were also associated with a decreased statistical power, with fewer subjects and trials in each condition, and a lower signal to noise ratio, especially in D3, characterized by an increase in physiological noise with slower rhythms of larger amplitude (for example, the same global effect analysis repeated 10 times on subsampled data of 5 randomly different subjects from wakefulness to D2 retrieve non-significant results 3 times in wakefulness, 5 times in D1 and 1 time in D2). Contrary to the responsive condition, no global, P300 effect was detected in the non-responsive condition, whatever the vigilance stage (Awake: n=4, D1: n=14, D2: n=11, D3: n=14, D4: n=12, N2: n=13, NS).

### 3.3. Information and connectivity decreases accompanying drowsiness

To assess ongoing brain activity in the wake-sleep transition, we computed for each subject on each vigilance stage 26 markers across frequency bands, encompassing three classes of measures: spectral power, information metrics and functional connectivity measures. We first considered the signal during constant stimuli between the onsets of the 1st and the 5th sounds (before the deviant sound). In line with the visual classification, Power Spectral Density (PSD) measures significantly and progressively decreased in alpha band from wakefulness to N2 (figure 4 bottom; Page's L trend test =3794, p<1e-14) but increased in theta band (Page's L=3766.0, p<1e-14, figure 4; top). However, information (PE) and connectivity (wSMI) significantly decreased in both frequency bands across Hori stages (alpha: L=3989, p<1e-14 for PE, L=4002, p<1e-14 for wSMI; theta: L=3963, p<1e-14 and L=3755, p<1e-14 respectively), pointing towards a general loss of integrated information and more local processes. An alternative visualization can be found in Figure S2, comparing the absolute change in the markers value between each of the Hori stages and wakefulness.

<figure><img src="image_7.png" /></figure>

Similar results were obtained when considering the neural responses after the deviant sound (see supplementary figure S3). The theta/alpha ratio, which has been proposed as a marker of drowsiness and a predictor of responsiveness (Comsa et al., 2018), also presented a significant positive trend (L=3983, p<1e-14; see supplementary figure S4). For additional spatial information, see figure S5.

### 3.4. Responsiveness is driven by the ongoing brain state

We then tested if responsiveness during these vigilance stages could be related to the overall ongoing brain state. We evaluated the capacity to distinguish the responsive (MR+) from non-responsive (MR-) trials on a trial-by-trial basis, based on the MEG markers computed just before the global deviant stimuli (between the onsets of the 1st and the 5th sounds). To this aim, we trained Extremely Randomized Trees classifiers (ET) to distinguish between markers computed during trials where the subject did respond (MR+) and trials where the subjects' response was absent (MR-). We first measured the ROC-AUC using cross-validation on separate classifiers trained with data from single drowsiness stages. We found above chance classification in every stage, namely AUC=0.67 (95% CI = [0.58 0.75]) in Awake, 0.61 (95% CI = [0.52, 0.70]) in H1, 0.64 (95% CI = [0.50, 0.76]) in H2, 0.68 (95% CI = [0.58, 0.79]) in H3, 0.73 (95% CI = [0.63, 0.80]) in H4 and 0.75 (95% CI = [0.64, 0.85]) in H5. Furthermore, we tested if a model trained in one Hori stage could also decode responsiveness in the other stages. Overall, we found that models trained in the awake state were able to achieve higher performance in decoding responsiveness in states of lower vigilance (H3 to
<figure><img src="image_8.png" /><figcaption>B. Global Deviance</figcaption></figure>

<figure><img src="image_9.png" /></figure>

**Figure 3.** Event Related Fields to auditory deviancies. A. The MEG-Mismatch response (the prediction error signal) peaks at around 160 ms after deviant sound (vertical line on time series, time of topographies) in wakefulness and progressively decreases through drowsiness stages. It fails to reach significance from the occurrence of theta waves (D3). At the contrary, earlier and later effects, that reflect adaptation processes, are preserved in drowsiness and sleep. B. The P300 is present in the responsive but not in the non-responsive condition, whatever the vigilance state. Significant clusters are shown (\*p<0.05, \*\*p<0.01) on topographies (t=350ms) with green lines on time series for significant effects in the left temporal sensor (p<0.05).

H5), a model trained in H1 was only able to decode responsiveness in wakefulness, a model trained in H2 was capable of decoding responsiveness in states of lower vigilance and H3 to H5 presented similar decoding capabilities between them. Results are summarized in figure 5 and Table S4. Additionally, we tested the models using the markers computed on the signals after the global deviant stimuli. We obtained lower AUC values and less generalizable models with higher variability (see supplementary figure S6 and table S5).

Finally, to test for the existence of a common pattern able to predict responsiveness across all stages, we used a single model trained on data encompassing wakefulness and H1 to H5. We employed the same methodology, but keeping data balanced across stages for each bootstrap repetition. None of the models presented higher accuracy than any of the stage-specific models, neither with the pre-stimulus nor the post-stimulus data (see supplementary figure S7). Indeed, only the model using the post-stimulus data presented a confidence interval above chance level, implicating that creating general models encompassing all stages are not possible with the hereby employed markers and data.

The uni-directional transfer of decoding means that the best decoder for a given Hori stage is also capable of decoding in other stage. Given

the hereby employed markers, it means that at a given stage, the interaction between spectral, information and connectivity markers that best predict responsiveness are indeed also capable of doing so in another stage, indicating a common pattern that is present in both stages. On the other hand, failure to transfer decoding means that the neural signatures that best decode responsiveness on a given stage are not present in the other stage. While this proves that there are distinctive patterns, it cannot be used to conclude that there are no common patterns. Furthermore, in case of set of stages with bi-directional transfer, as for the decoders for H3, H4 and H5, one could argue that this is due to the fact that this stages are, in terms of markers, equal. To further test if these predictive models were indeed capturing common patterns across distinct Hori stages or the Hori stages were simply not distinct, we employed the same methodology, but now using the decoder to predict the stages instead of the motor responses. We found above chance-level classification performance across all Hori stages when considering only responsive, non-responsive, or both conditions mixed, meaning that Hori stages were indeed distinct in terms of information and connectivity markers. Results are summarized in table S6, S7 and S8.
<figure><img src="image_10.png" /><figcaption>**Figure 4.** Evolution of measures of oscillatory activity and information sharing throughout the successive vigilance stages. Measures of ongoing brain activity in theta (top panel) and alpha bands (bottom panel). Each dot depicts the mean value for the marker at each Hori stage. Each coloured line represents a subject. The mean for each stage are depicted in black, with the error bars representing the standard error of the mean. While spectral power decreases in alpha and increases in theta across drowsiness stages, entropy and connectivity decrease in both frequency bands.</figcaption></figure>

Additionally, by inspecting the predictive models that learned to distinguish MR+ from MR-, we can obtain a quantification of the involvement of each electrophysiological marker for the classification. This metric, named feature importance, can be interpreted as the mutual information between the marker and the outcome label, conditional to the rest of the markers. The results, summarized in figure 5, indicate that the results obtained in terms of transfer learning (i.e. decoding across Hori stages) reflect the fact that the same markers are ranked as highly important in all stages. In particular, PE $\alpha$, Theta/Alpha ratio and normalized delta share highly ranked positions in most of the stages. H1, on the other hand, presents a distinctive signature in terms of importance, which might be the reason why a model train in this stage is not capable of decoding responsiveness in other stages.

### 3.5. Whole-brain vs modular processes?

While markers of ongoing brain activity are able to distinguish responsiveness within and across Hori stages, we then tested if they were reflecting overall whole-brain processes or were consequences of highly spatially-specific processes. We performed a non-parametric statistical test on the contrasts between MR+ and MR- within each Hori stage. The obtained results, summarized in table S9, indicate that not all of the important markers present statistically significant differences. For example, gamma power is ranked second in importance for H4, but the cluster test indicates a p-value of 0.265. Precisely, these results indicate that the interactions among markers is a key element that allows the distinction of vigilance stages. Furthermore, a closer analysis on the location of these differences between MR+ and MR- trials, depicts the presence of spatially specific patterns of activity. Particularly, differences in mark-

ers of spectral power and information are located in posterior regions of the scalp (see figure S8).

Although connectivity was not included among the relevant markers for decoding responsiveness, it is important to analyse connectivity separately. Obtaining a single value of connectivity across all pair of scalp sensors might not disclose specific networks of information sharing across the brain. An appropriate analysis of connectivity markers indicates that both wSMI $\theta$ and wSMI $\alpha$ show significant differences modulated by the Hori stage, responsiveness and the interaction between them (see table S10 for ANOVA results). Post-hoc tests showed significant differences in connectivity in theta band (wSMI $\theta$) between frontal, temporal and parietal regions, only for the H6 to 8 stage (and in a lesser extend in H3 and H4, figure 6, top). No particular connections were deemed informative in H1, H2 and H5 or in alpha band (figure 6, bottom), suggesting that information sharing mechanisms in these stages are highly specific and not captured by the employed metric or an interaction between markers that were captured only by the decoding models. Note however that the same analysis using the Drowsiness stages retrieved significant differences in connectivity within the alpha band in the D1 stage (grouping H1 to H3), in posterior regions (Figure S9). Overall, these results suggest that different regional processes occur in the different drowsiness stages to predict responsiveness.

## 4. Discussion

Falling asleep is not an on-off mechanism, nor a gradual incursion of a unique process leading to sleep. Our results highlight the existence of a drowsiness period in the transition to sleep, where the probability to be responsive to the environment decreases in a stepwise manner, from alpha rhythms to the firsts sleep spindles. This drowsiness period is char-
<figure><img src="image_11.png" /><figcaption>**Figure 5.** Responsiveness during Hori stages can be decoded from the ongoing brain state prior to the stimuli. The top figure depicts the ROC-AUC values distribution by training and testing set. Each dot represented the ROC-AUC value for one cross-validation iteration in the case of within-stage decoding and one bootstrap iteration in the case of cross-stage decoding. Boxplots depict the median, inter-quartile ranges and 95% confidence intervals. The middle figure depicts the difference between the respective predictive models and a dummy classifier which predicts based on the number of training samples from each class, without considering the markers. The positive lower bound of the confidence intervals indicate that the predictive models ROC-AUC are statistically significant above chance level. The bottom figure reveals which electrophysiological markers are most important for the prediction of responsiveness across the different drowsiness stages. Each plot depicts the rank (top 6) of mean feature importance in the decoding of responsiveness in each Hori stage.</figcaption></figure>

acterized by successive and transient brain states that come on and off at the scale of a few seconds, and where activity and long-distance communication in specific frequency bands, especially the alpha and theta band, are the best predictors of responsiveness. We also show that the ability to respond is closely associated with predictive coding capabilities of the brain, reflected by the mismatch negativity (MMN) and the P300. We clearly define here the drowsiness period in humans, with associated modifications in behaviour, cognition and physiological brain activities, and demonstrate its distinction with wakefulness and sleep.

We used a detailed 5 sec. epochs classification of drowsiness (Hori et al., 1994; Nittono et al., 2001) to monitor precisely the rapid modifications in vigilance and responsiveness that take place during the wake-sleep transition, and characterized their corresponding brain states with MEEG methods. We showed that the probability of being conscious and responsive decreases progressively from wakefulness to sleep and in relation with drowsiness stages, with decreasing response rates, a decreasing number of responsive subjects, and increasing reaction times. Importantly, this process is often non-monotonous and characterized by

frequent rises and falls in vigilance. This period of altered behaviour, or drowsiness period, is already detectable in the first stage of calm wakefulness (with alpha rhythms, D1) and lasts until the occurrence of the firsts sleep spindles. Stable non-responsiveness is indeed only achieved few minutes after the first sleep spindles, a time that appears to also correspond to the subjective perception of sleep onset, often delayed from the onset of N1 sleep (Bonnet and Moore, 1982). This delayed behavioural onset of consolidated sleep could account for the classical misperception of sleep onset when referring the usual sleep classification, especially in patients with insomnia (Hermans et al., 2019). Besides, even in wakefulness (H0) subjects presented a certain amount of misses (response rate of 85.4%), indicating they probably presented lapses in attention (without clear modifications in vigilance). In H1 in presence of alpha waves, an early decrease in vigilance may be also possible, as we know that other signs such as slow eye movements can be present in drowsiness before EEG modifications (Santamaria and Chiappa, 1987).

We also explored cognitive capabilities during this drowsiness period, by analysing the participants' ability to extract rules and detect
<figure><img src="image_12.png" /></figure>

<figure><img src="image_13.png" /><figcaption>**Figure 6.** Connectivity in theta and alpha band depicts connectivity hubs. Each panel shows the pairwise connections between 8 regions of interest (ROI; frontal, parietal, temporal and occipital regions in left and right hemispheres) for wSMI in theta (top) and alpha (bottom) bands. The statistical matrixes show the corrected p-values of the post-hoc tests after an ANOVA model with connection, motor response and Hori stage as factors.</figcaption></figure>
auditory deviancies. We analysed the hierarchical prediction error signals emitted in response to local and global auditory deviancies, characterized respectively by the MMN and the P300. In line with previous results (Bekinschtein et al., 2009; Sergent et al., 2005; Sitt et al., 2014; Strauss et al., 2015), we confirmed that the ability to report the conscious detection of global deviancies was associated with the occurrence of the P300, and that this P300 was absent when the subjects were not responsive, whatever the vigilance state (awake, drowsy or asleep). Importantly, we previously showed that the P300 was also present in non-responsive but *attentive* trials in wakefulness in a no-report task (Strauss et al., 2015), and then that the P300 was not a simple marker of the motor response, but an index of conscious detection of deviant sounds. The absence of P300 in non-responsive trials across all vigilance states suggests that non-responsive trials were indeed non-consciously detected, and that responsiveness did reflect conscious access in our study, as expected by the nature of the task (subjects should respond when conscious, and subjects who reported having voluntarily stopped responding when falling asleep were discarded from analysis). These results highlight the dissociation between vigilance and consciousness and their related brain markers.

Considering the MMN (MEG MMR peak), overall across vigilance states, we found that its amplitude decreased progressively with drowsiness depth and failed to reach significance from the occurrence of theta waves (D3). These results replicate those of Nittono et al. (2001), who described the MMN at sleep onset using the Hori classification and its simplified version, as such as we did in this study. We note nevertheless a residual pic still present at the time of the MMN. It would then be possible that a small effect persists in drowsiness and sleep, which could explain other findings in the literature of a MMN present in various non-conscious states (Atienza et al., 1997; Bekinschtein et al., 2009; Fischer et al., 1999; Heinke et al., 2004; Naccache et al., 2005; Nashida et al., 2000; Schlossmacher et al., 2020). Those analyses, however, did not systematically take into account the effect of conscious access of deviant sounds on the MMN (but see (Schlossmacher et al., 2020)). When we analysed the MMN in trials where responsiveness could be monitored, we found that the MMN was actually mostly driven by the responsive state, i.e. here conscious access, and only weakly by vigilance. While these last results may be interpreted with caution, they are in line with other studies having shown the important modulation of the MMN by conscious access (Chen et al., 2020; Kimura et al., 2010; Wei et al., 2002). When falling asleep, the brain's low (MMN) and high (P300)-level prediction capabilities seem to be largely determined by the conscious access of deviancies.

In addition to brain responses to deviances, we analysed the brain ongoing activity specific to the different drowsiness stages. When characterising drowsiness and sleep, frequency-selective brain activity play a key role. In fact, the currently employed classification relies on the presence or absence of alpha and theta rhythms. The functional aspects of those rhythmic activities are still a matter of debate. Previous work shows evidence for alpha-band activity as attention-related inhibitors of sensory input that facilitate the suppression of distractors (Sokoliuk et al., 2019) and as a supporter of brain idling, while other works indicate that particular rhythms in alpha band are dependent on the task and scalp location (Nunez et al., 2001). Very recently, functional connectivity in the alpha band was also suggested to reflect the level of disconnection from the external environment in sleep (Imperatori et al., 2021). Overall, whole-brain reduction in alpha activity points towards the predominance of local brain processes over globally coordinated ones. As concerns the theta band, this frequency range has been linked to phased-locked neural information exchange (Buzsáki, 2002; King et al., 2013), coupling sensory and memory-activated neurons (Buzsáki, 2002). Interestingly in the wake-sleep transition, while overall alpha power decreases and theta activity increases, results indicate that both theta and alpha rhythms become more predictable and localized within the brain across the brain.

In order to determine which electrophysiological markers of brain activity are predictive of consciousness and responsiveness during drowsiness, we analysed the relations between MEG markers, drowsiness (Hori) stages and responsiveness at the single-trial level. We first found that a classifier trained with these markers can predict responsiveness given the Hori stage. We then found that while the markers can still capture the visually-detected differences across stages, there are still common components across stages that predicts responsiveness. Indeed, responsiveness could be decoded in several Hori stages in deep drowsiness using the same model, pointing toward a common underlying set of brain mechanisms responsible for conscious responsiveness. Nevertheless, it is important to remark that each Hori stage presented a different set of features as part of the optimal decoding model. This indicates that each stage has a distinctive neural signature with respect to conscious responsiveness. Detailed investigation of the decoding algorithms and markers indicate that these brain mechanisms are evidenced by rhythms in delta, theta, alpha and beta bands, with a major component of information in alpha band particularly located in posterior scalp regions. Connectivity analyses confirmed this critical posterior-parietal hub in alpha band for responsiveness, while theta band evidenced responsiveness through fronto-temporo-parietal information sharing. Two recent studies (Bourdillon et al., 2020; Imperatori et al., 2021) highlighted also the functional connectivity (wSMI) in high delta-theta band as a marker of consciousness across vigilance states. Our results in theta may partially overlap with those findings, with the limit that the continuous stimulation constrained our analyses to too short epochs to analyse connectivity in the delta band.

Interestingly, depicting the existence of a set of transient brain states, each one with a diverse set of properties that predict the subjects' response, is a first step towards shedding light on deeper research questions. Future works could focus on studying the relation between the transitions across these states and the subject's response: is the stimulation/response changing the state of the brain? What are the dynamic properties of these states? It is also interesting to note that the brain markers best predicted responsiveness in the pre-deviant period than in the post-deviant period, suggesting that the ongoing brain state drove responsiveness to sounds more than the sound drove the ongoing brain state. This also shows that brain responses to stimulations (such as in the pre-deviant period) did not mask the ongoing physiological activity, and that rhythms driven by physiological modifications of vigilance were predominant. The specific context of auditory stimulations, which may change the brain state that we want to characterize, appears then to not critically influence physiological rhythms and should not invalidate the visual classification of drowsiness, nor the electrophysiological marker analyses. Although we are aware that experimental conditions may slightly influence our measures, such as described in the context of the "Psychological Uncertainty Principle" (Lindsay and Anderson, 2000), we believe that this limitation is inherent to our question of research. Also, even ecological conditions for sleep are varied and not devoid of environmental stimulations and constrains.

Overall, these results depict the existence of a diverse set of transient brain states in the wake-sleep transition, reinforcing the increasing evidence for a transient and local modulation of vigilance and sleep (Andrillon et al., 2021; Siclari and Tononi, 2017). This study highlights the high variability of brain patterns over time, across and within drowsiness stages, but also over brain space. In the future, using distinct spatial filters may help to capture those local sleep patterns. Along with those local and transient modulations, capabilities of humans to integrate sensory stimuli, learn rules, predict input, update priors, consciously access information and execute motor actions are progressively impaired. This period of rapidly changing brain states defines the drowsiness period, distinct from wakefulness and sleep, i.e. stable non-responsiveness, but currently embedded in calm wakefulness and N1 sleep when referring to the reference sleep classification (American Academy of Sleep Medicine and Iber, 2007). Heterogeneity of N1 sleep has already been highlighted in other behavioural
and neuro-imaging studies (Bareham et al., 2014; Magnin et al., 2010; Ogilvie, 2001; Stevner et al., 2019; Strauss et al., 2015), and shows the lower inter-scorer reliability (Rosenberg and Van Hout, 2013). While this classification based on 30 sec. time windows (American Academy of Sleep Medicine and Iber, 2007) is convenient for manual scoring and to identify sleep disorders in consolidated sleep, finer-grained EEG monitoring with shorter epochs appears to be critical when assessing vigilance and the falling asleep process. In this line, micro-sleep episodes, defined as alpha suppression of less than 15 sec., have been very recently explored for evaluating vigilance (Hertig-Godeschalk et al., 2019; Skorucak et al., 2020). We demonstrate here, supported by behavioural and in-depth brain activity measures, that using shorter epochs is indeed relevant, but that the different EEG patterns should also be analysed to assess the level of drowsiness. The proposed classification of drowsiness, considering alpha suppression, theta activity and sharp waves can easily be monitored in routine EEG. If it originates from descriptions of sleep onset made few decades ago (Hori et al., 1994; Santamaria and Chappa, 1987;), recent data suggest it reflects clear behavioural and brain modifications (Bareham et al., 2014; Noreika et al., 2020;) and we here demonstrate it nicely reflects the decreasing probability to be conscious and responsive. In addition to visual scoring that may be time consuming in clinical routine, more dynamical measures should also be considered, such as the theta-alpha ratio, strongly correlated with this drowsiness classification (Noreika et al., 2020, 2017), along with other methods of automatic scoring (Jagannathan et al., 2018). And finally, the extraction of even finer information through brain makers described here, such as entropy in the alpha band, will enable to significantly increase the prediction of responsiveness and associated cognitive capabilities.

## 5. Conclusion

In conclusion, evaluating vigilance is a general concern, in clinical routine in neurological or sleep disorders (such as in insomnia or when performing maintenance of wakefulness tests), as well as in ecological environments. The present research brings significant advances in our understanding of the wake to sleep transition, and advocate for a better recognition of the drowsiness period. Currently embedded in calm wakefulness and the first stage of sleep (N1), it should be recognized in itself as a transition process leading to but different from sleep, i.e. from a stable minimally responsive brain state. Using a formalized classification of drowsiness or related brain markers such as described here should significantly improve vigilance assessment in the future. And finally, if we aim to match behavioural, perceptive and electrophysiological definitions of sleep onset, sleep itself should starts after the first sleep spindles or K-complexes.

## Declaration of Competing Interest

The authors declare no competing interests.

## Acknowledgment

We are grateful to Stanislas Dehaene for his essential support in data acquisition and for helpful comments, to Bernadette Martins and the Neurospin staff for administrative support, to nurses Laurence Laurier, Véronique Joly-Testault, and Gaëlle Mediouni for their help in recruitment and data acquisition and to Kaustubh Patil for his feedback on predictive modelling. This work was supported by grants from Institut National de la Santé et de la Recherche Médicale (INSERM) and Journées de Neurologie de Langue Française (to M.S.), Stic-Amsud "RTBRAIN" (to J.D.S.) and Wallonia-Bruxelles International IN Excellence Grant (to F.R.). The Neurospin MEG facility is sponsored by grants from INSERM, CEA, Fondation pour la Recherche Médicale, the Bettencourt-Schueler Foundation, and the Région Île-de-France. This study was supported by the European Union's Horizon 2020 Research and Innovation Programme Grant Agreement No. 945539 (HBP SGA3).

## Authors Contributions

M.S. made contributions to the conception of the work, study design, data acquisition, analysis and interpretation, and have drafted the manuscript. J.D.S. and L.N. made contributions to the conception of the work, study design, and revised the manuscript. F.R. made contributions to the conception of the work, data analysis and interpretation, and have drafted the manuscript.

## Supplementary materials

Supplementary material associated with this article can be found, in the online version, at doi:10.1016/j.neuroimage.2022.119003.

## References

Abraham, A., Pedregosa, F., Eickenberg, M., Gervais, P., Mueller, A., Kossaifi, J., Gramfort, A., Thirion, B., Varoquaux, G., 2014. Machine learning for neuroimaging with scikit-learn. Front. Neuroinformatics 8. doi:10.3389/fninf.2014.00014.

Iber, C.American Academy of Sleep Medicine, 2007. The AASM manual for the scoring of sleep and associated events: rules, terminology and technical specifications. American Academy of Sleep Medicine.

Andrillon, T., Burns, A., Mackay, T., Windt, J., Tsuchiya, N., 2021. Predicting lapses of attention with sleep-like slow waves. Nat. Commun. 12, 3657. doi:10.1038/s41467-021-23890-7.

Atienza, M., L. Cantero, J., Gómez, C.M., 1997. The mismatch negativity component reveals the sensory memory during REM sleep in humans. Neurosci. Lett. 237, 21–24.

Bandt, C., Pompe, B., 2002. Permutation Entropy: A Natural Complexity Measure for Time Series. Phys. Rev. Lett. 88. doi:10.1103/PhysRevLett.88.174102, 174102–174102.

Bareham, C.A., Manly, T., Pustovaya, O.V., Scott, S.K., Bekinschtein, T.A., 2014. Losing the left side of the world: Rightward shift in human spatial attention with sleep onset. Sci. Rep. 4. doi:10.1038/srep05092.

Bekinschtein, T.A., Dehaene, S., Rohaut, B., Tadel, F., Cohen, L., Naccache, L., 2009. Neural signature of the conscious processing of auditory regularities. Proc. Natl. Acad. Sci. 106, 1672–1677.

Bonnet, M.H., Moore, S.E., 1982. The threshold of sleep: Perception of sleep as a function of time asleep and auditory threshold. Sleep J. Sleep Res. Sleep Med. 5, 267–276.

Bourdillon, P., Hermann, B., Guénot, M., Bastuji, H., Isnard, J., King, J.-R., Sitt, J., Naccache, L., 2020. Brain-scale cortico-cortical functional connectivity in the delta-theta band is a robust signature of conscious states: an intracranial and scalp EEG study. Sci. Rep. 10. doi:10.1038/s41598-020-70447-7.

Buzsáki, G., 2002. Theta Oscillations in the Hippocampus. Neuron 33, 325–340. doi:10.1016/S0896-6273(02)00586-X.

Casagrande, M., De Gennaro, L., Violani, C., Braibanti, P., Bertini, M., 1997. A finger-tapping task and a reaction time task as behavioral measures of the transition from wakefulness to sleep: which task interferes less with the sleep onset process. Sleep 20, 301–312.

Chen, B., Sun, P., Fu, S., 2020. Consciousness modulates the automatic change detection of masked emotional faces: Evidence from visual mismatch negativity. Neuropsychologia 107459. doi:10.1016/j.neuropsychologia.2020.107459.

Comsa, I.M., Bekinschtein, T.A., Chennu, S., 2018. Transient Topographical Dynamics of the Electroencephalogram Predict Brain Connectivity and Behavioural Responsiveness During Drowsiness. Brain Topogr doi:10.1007/s10548-018-0689-9.

Dehaene, S., Changeux, J.-P., 2011. Experimental and Theoretical Approaches to Conscious Processing. Neuron 70, 200–227. doi:10.1016/j.neuron.2011.03.018.

Efron, Bradley, Tibshirani, Robert, 1994. An introduction to the bootstrap. Chapman & Hall.

Engemann, Denis A., Raimondo, F., King, J.-R., Rohaut, B., Louppe, G., Faugeras, F., Annen, J., Cassol, H., Gosseries, O., Fernandez-Slezak, D., Laureys, S., Naccache, L., Dehaene, S., Sitt, J.D., 2018. Robust EEG-based cross-site and cross-protocol classification of states of consciousness. Brain 141, 3179–3192. doi:10.1093/brain/awy251.

Engemann, Denis A., Raimondo, F., King, J.-R., Rohaut, B., Louppe, G., Faugeras, F., Annen, J., Cassol, H., Gosseries, O., Fernandez-Slezak, D., Laureys, S., Naccache, L., Dehaene, S., Sitt, J.D., 2018. Robust EEG-based cross-site and cross-protocol classification of states of consciousness. Brain 141, 3179–3192. doi:10.1093/brain/awy251.

Fischer, C., Morlet, D., Bouchet, P., Luaute, J., Jourdan, C., Salord, F., 1999. Mismatch negativity and late auditory evoked potentials in comatose patients. Clin. Neurophysiol. 110, 1601–1610. doi:10.1016/S1388-2457(99)00131-5.

Foulkes, D., Vogel, G., 1965. Mental Activity at Sleep Onset. J. Abnorm. Psychol. 70, 231–243.

Geurts, P., Ernst, D., Wehenkel, L., 2006. Extremely randomized trees. Mach. Learn. 63, 3–42. doi:10.1007/s10994-006-6226-1.

Gibbs, F.A., Gibbs, joint author. Erna L. (Erna Leonhardt), 1950. Atlas of electroencephalography.

Goupil, L., Bekinschtein, T., 2012. Cognitive processing during the transition to sleep. Arch. Ital. Biol. 150, 140–154. doi:10.4449/aib.v150i2.1247.

Gramfort, A., Luessi, M., Larson, E., Engemann, D.A., Strohmeier, D., Brodbeck, C., Goj, R., Jas, M., Brooks, T., Parkkonen, L., Hämäläinen, M.S., 2013. MEG and EEG data analysis with MNE-Python. Front. Neurosci. 7. doi:10.3389/fnins.2013.00267, 267–267.

Heinke, W., Kenntner, R., Gunter, T.C., Sammler, D., Olthoff, D., Koelsch, S., 2004. Sequential effects of increasing propofol sedation on frontal and temporal cortices as indexed by auditory event-related potentials. Anesthesiology 100, 617–625.
Hermans, L.W.A., Leufkens, T.R., van Gilst, M.M., Weysen, T., Ross, M., Anderer, P., Overeem, S., Vermeeren, A., 2019. Sleep EEG characteristics associated with sleep onset misperception. Sleep Med 57, 70–79. doi:10.1016/j.sleep.2019.01.031.

Hertig-Godeschalk, A., Skorucak, J., Malafeev, A., Achermann, P., Mathis, J., Schreier, D.R., 2019. Microsleep episodes in the borderland between wakefulness and sleep. Sleep sz163 doi:10.1093/sleep/zzs163.

Hori, T., 1991. Changes of EEG patterns and reaction time during hypnagogic state. Sleep Res 20, 20.

Hori, T., Hayashi, M., Morikawa, T., 1994. Topographical EEG changes and the hypnagogic experience. Ogilvie RD Harsh JR Ed. Sleep Onset Norm. Abnorm. Process. Wash. DC Am. Psychol. Assoc. 237–253.

Imperatori, L.S., Cataldi, J., Betta, M., Ricciardi, E., Ince, R.A.A., Siclari, F., Bernardi, G., 2021. Cross-participant prediction of vigilance stages through the combined use of wPLI and wSMI EEG functional connectivity metrics. Sleep 44. doi:10.1093/sleep/zsaa247.

Jagannathan, S.R., Ezquetro-Nassar, A., Jachs, B., Pustovaya, O.V., Bareham, C.A., Bekinschtein, T.A., 2018. Tracking wakefulness as it fades: Micro-measures of alertness. NeuroImage 176, 138–151. doi:10.1016/j.neuroimage.2018.04.046.

Kayser, J., Tenke, C.E., 2006. Principal components analysis of Laplacian waveforms as a generic method for identifying ERP generator patterns: I. Evaluation with auditory oddball tasks. Clin. Neurophysiol. 117, 348–368. doi:10.1016/j.clinph.2005.08.034.

Kimura, M., Widmann, A., Schröger, E., 2010. Top-down attention affects sequential regularity representation in the human visual system. Int. J. Psychophysiol. Off. J. Int. Organ. Psychophysiol. 77, 126–134. doi:10.1016/j.jpsycho.2010.05.003.

King, J.R., Sitt, J.D., Faugeras, F., Rohaut, B., El Karoui, I., Cohen, L., Naccache, L., Dehaene, S., 2013. Information sharing in the brain indexes consciousness in noncommunicative patients. Curr. Biol. 23, 1914–1919. doi:10.1016/j.cub.2013.07.057.

Lindsay, J.J., Anderson, C.A., 2000. From Antecedent Conditions to Violent Actions: A General Affective Aggression Model. Pers. Soc. Psychol. Bull. 26, 533–547. doi:10.1177/0146167200267002.

Magnin, M., Rey, M., Bastuji, H., Guillemant, P., Mauguiere, F., Garcia-Larrea, L., 2010. Thalamic deactivation at sleep onset precedes that of the cerebral cortex in humans. Proc. Natl. Acad. Sci. 107, 3829–3833. doi:10.1073/pnas.0909710107.

Naccache, L., Puybasset, L., Gaillard, R., Serve, E., Willer, J.-C., 2005. Auditory mismatch negativity is a good predictor of awakening in comatose patients: a fast and reliable procedure. Clin. Neurophysiol. 116, 988–989. doi:10.1016/j.clinph.2004.10.009.

Nashida, T., Yabe, H., Sato, Y., Hiruma, T., Sutoh, T., Shinozaki, N., Kaneko, S., 2000. Automatic auditory information processing in sleep. Sleep 23, 821–828.

Nittoho, H., Momose, D., Hori, T., 2001. The vanishing point of the mismatch negativity at sleep onset. Clin. Neurophysiol. 112, 732–739. doi:10.1016/S1388-2457(01)00491-6.

Noreika, V., Canales-Johnson, A., Harrison, W.J., Johnson, A., Arnatkevičiūtė, A., Koh, J., Chennu, S., Bekinschtein, T.A., 2017. Wakefulness state modulates conscious access: Suppression of auditory detection in the transition to sleep. https://doi.org/10.1101/155705

Noreika, V., Kamke, M.R., Canales-Johnson, A., Chennu, S., Bekinschtein, T.A., Mattin-gley, J.B., 2020. Alertness fluctuations when performing a task modulate cortical evoked responses to transcranial magnetic stimulation. NeuroImage 223, 117305. doi:10.1016/j.neuroimage.2020.117305.

Nunez, P.L., Wingeier, B.M., Silberstein, R.B., 2001. Spatial-temporal structures of human alpha rhythms: Theory, microcurrent sources, multiscale measurements, and global binding of local networks. Hum. Brain Mapp. 13, 125–164. doi:10.1002/hbm.1030.

Ogilvie, R.D., 2001. The process of falling asleep. Sleep Med. Rev. 5, 247–270. doi:10.1053/smrv.2001.0145.

Ogilvie, R.D., Wilkinson, R.T., Allison, S., 1989. The detection of sleep onset: behavioral, physiological, and subjective convergence. Sleep 12, 458–474.

Oostenveld, R., Fries, P., Maris, E., Schoffelen, J.-M., 2011. FieldTrip: Open Source Software for Advanced Analysis of MEG, EEG, and Invasive Electrophysiological Data. Comput. Intell. Neurosci. 2011, 1–9. doi:10.1155/2011/156869.

Page, E.B., 1963. Ordered Hypotheses for Multiple Treatments: A Significance Test for Linear Ranks. J. Am. Stat. Assoc. 58, 216. doi:10.2307/2282965.

Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., Duchesnay, É., 2012. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 12, 2825–2830. doi:10.1007/s13398-014-0173-7.2.

Rosenberg, R.S., Van Hout, S., 2013. The American Academy of Sleep Medicine Inter-scorer Reliability Program: Sleep Stage Scoring. J. Clin. Sleep Med. 09, 81–87. doi:10.5664/jcsm.2350.

Santamaria, J., Chiappa, K.H., 1987. The EEG of Drowsiness in Normal Adults. J. Clin. Neurophysiol. 4, 327.

Schlossmacher, I., Dellert, T., Pitts, M., Bruchmann, M., Straube, T., 2020. Differential Effects of Awareness and Task Relevance on Early and Late ERPs in a No-Report Visual Oddball Paradigm. J. Neurosci. 40, 2906–2913. doi:10.1523/JNEUROSCI.2077-19.2020.

Sergent, C., Baillet, S., Dehaene, S., 2005. Timing of the brain events underlying access to consciousness during the attentional blink. Nat. Neurosci. 8, 1391–1400. doi:10.1038/nn1549.

Siclari, F., Tononi, G., 2017. Local aspects of sleep and wakefulness. Curr. Opin. Neurobiol. 44, 222–227. doi:10.1016/j.conb.2017.05.008.

Sitt, J.D., King, J.-R., Karoui, I.E., Rohaut, B., Faugeras, F., Gramfort, A., Cohen, L., Sigman, M., Dehaene, S., Naccache, L., 2014. Large scale screening of neural signatures of consciousness in patients in a vegetative or minimally conscious state. Brain 137, 2258–2270. doi:10.1093/brain/awu141.

Skorucak, J., Hertig-Godeschalk, A., Achermann, P., Mathis, J., Schreier, D.R., 2020. Automatically Detected Microsleep Episodes in the Fitness-to-Drive Assessment. Front. Neurosci. 14. doi:10.3389/fnins.2020.00008.

Sokoliuk, R., Mayhew, S.D., Aquino, K.M., Wilson, R., Brookes, M.J., Francis, S.T., Hanslmayr, S., Mullinger, K.J., 2019. Two Spatially Distinct Posterior Alpha Sources Fulfill Different Functional Roles in Attention. J. Neurosci. 39, 7183–7194. doi:10.1523/JNEUROSCI.1993-18.2019.

Stevner, A.B.A., Vidaurre, D., Cabral, J., Rapuano, K., Nielsen, S.F.V., Tagliazucchi, E., Laufs, H., Vuust, P., Deco, G., Woolrich, M.W., Van Someren, E., Kringelbach, M.L., 2019. Discovery of key whole-brain transitions and dynamics during human wakefulness and non-REM sleep. Nat. Commun. 10, 1035. doi:10.1038/s41467-019-08934-3.

Strauss, M., Sitt, J.D., King, J.-R., Elbaz, M., Azizi, L., Buiatti, M., Naccache, L., van Wassenhove, V., Dehaene, S., 2015. Disruption of hierarchical predictive coding during sleep. In: Proc. Natl. Acad. Sci doi:10.1073/pnas.1501026112.

Tan, S.H., 2010. The Correct Interpretation of Confidence Intervals. Proc. Singap. Healthc. 19, 3.

Tanaka, H., Hayashi, M., Hori, T., 1996. Statistical features of hypnagogic EEG measured by a new scoring system. Sleep 19, 731–738.

Wacongne, C., Labyt, E., van Wassenhove, V., Bekinschtein, T., Naccache, L., Dehaene, S., 2011. Evidence for a hierarchy of predictions and prediction errors in human cortex. Proc. Natl. Acad. Sci. 108, 20754–20759. doi:10.1073/pnas.1117807108.

Wei, J.-H., Chan, T.-C., Luo, Y.-J., 2002. A modified oddball paradigm "cross-modal delayed response" and the research on mismatch negativity. Brain Res. Bull. 57, 221–230. doi:10.1016/S0361-9230(01)00742-0.

Welch, P., 1967. The use of fast Fourier transform for the estimation of power spectra: A method based on time averaging over short, modified periodograms. IEEE Trans. Audio Electroacoustics 15, 70–73. doi:10.1109/TAU.1967.1161901.

Yang, C.-M., Han, H.-Y., Yang, M.-H., Su, W.-C., Lane, T., 2010. What subjective experiences determine the perception of falling asleep during sleep onset period? Conscious. Cogn. 19, 1084–1092. doi:10.1016/j.concog.2009.12.017.