DOI: 10.5061/dryad.cc2fqz6jg
title: Data and code from: Preserved temporal hierarchy but frequency-specific alterations in dynamical regimes of EEG microstate multimers during reversible unconsciousness

description: Employing a spectral analysis framework based on Chaos Game Representation
 (CGR), we investigated the higher-order dynamics of EEG microstate
 sequences across delta, theta, alpha, beta, gamma, and broad frequency
 bands during reversible unconsciousness (anesthesia and sleep). Robust
 periodic components consistently emerged within microstate sequences
 across theta, alpha, beta, and gamma bands, persisting across distinct
 states of consciousness. Converging evidence from both deconstruction via
 surrogate data and reconstruction via a hierarchical generative model
 demonstrates that the multimer structure, along with the conditional
 duration distribution, constitutes the underlying mechanism of microstate
 periodicity. Furthermore, we show that temporal smoothing abolishes these
 intrinsic periodic components. Most notably, during both deep sedation and
 N3 sleep, the beta band microstate sequence exhibited a consistent
 increase in peak power and a decrease in center frequency, resulting in
 highly characteristic patterns in the CGR spectra. To dissect the
 structural basis of these periodicities, we developed a data-driven
 algorithm to extract multimers and calculate their metrics. We identified
 distinct, frequency-dependent alterations in multimer dynamics during
 reversible unconsciousness, suggesting that the transition to
 unconsciousness marks a shift towards specific dynamical regimes.
 Collectively, our findings confirm that microstate sequences exhibit
 precise temporal orchestration. By elucidating the generative mechanisms
 of microstate periodicity and establishing a multimer-based analytical
 framework, this study provides a solid methodological foundation for
 investigating higher-order temporal structures, while offering promising
 neurophysiological biomarkers for consciousness assessment and novel
 insights into the temporal organization of large-scale neural dynamics.
description: # Data and Code for: Preserved temporal hierarchy but frequency-specific
 alterations in dynamical regimes of EEG microstate multimers during
 reversible unconsciousness --- ## 1. General Description This repository
 contains the processed EEG microstate sequences, analysis code (MATLAB),
 and figure generation data associated with the manuscript mentioned above.
 The study investigates the temporal dynamics of EEG microstates during
 different states of consciousness using Chaos Game Representation (CGR)
 and multimer analysis. The data is organized into three main datasets
 (Datasets 1, 2, and 3). --- ## 2. Folder Structure Overview The main
 compressed file `Data_and_codes.zip` contains the following directories: *
 **Dataset1/**: Contains microstate sequences (.txt), analysis scripts
 (.m), and result variables (.mat) for the sedation dataset. *
 **Dataset2/**: Contains data and scripts for the sedation dataset. *
 **Dataset3/**: Contains data and scripts for the sleep dataset. *
 **Figures/**: Contains specific data and code used to generate the figures
 presented in the manuscript. * **Functions/**: Contains common MATLAB
 functions required by the analysis scripts. --- ## 3. Detailed Data
 Description ### A. Datasets (Dataset1, Dataset2, Dataset3) Each Dataset
 folder contains three types of files: 1. **Microstate Sequences (`.txt`)**
 * **Description:** These files contain the discrete microstate class
 labels derived from the preprocessed EEG data. * **Format:** Text files
 where each row represents an observation, and the character (e.g., A, B,
 C, D) represents the assigned microstate class map. 2. **Analysis Scripts
 (`.m`)** * **Description:** MATLAB scripts used to process the `.txt`
 sequences. * **Function:** These scripts calculate metrics such as Chaos
 Game Representation (CGR) spectrum, multimer duration, coverage,
 occurrence, and monomer count. 3. **Result Variables (`.mat`)** *
 **Description:** MATLAB binary files containing the computed statistics
 used for final statistical analysis and plotting. ### B. Functions Folder
 (`/Functions`) This folder contains necessary functions called by the main
 analysis scripts. Ensure this folder is added to your MATLAB path before
 running any analysis. Key functions include: * `chaos_game_mapping.m` /
 `chaos_game_mapping_ngon.m`: Implements the CGR algorithm to map
 microstate sequences into 2D space. * `calc_multimer_stats.m`: Identify
 and extract multimer patterns and their dynamic metrics from sequences
 using the algorithm described in the manuscript. ### C. Figures Folder
 (`/Figures`) This folder is organized by the figures as they appear in the
 manuscript. Each subfolder contains the specific `.mat` data and `.m`
 plotting script to reproduce that figure. * **Figure1/**: * Contains
 code/data for **Figure 1B & 1C**. * *Context:* Illustrates the
 CGR-based spectral analysis framework and group-level spectra across
 frequency bands and consciousness states. * **Figure2/**: * Contains
 code/data for **Figure 2**. * *Context:* Comparison of periodic dynamics
 (Peak Power and Center Frequency) in EEG microstate sequences across
 Datasets 1, 2, and 3. * **Figure3/**: * Contains code/data for **Figure
 3A, 3B, & 3E**. * *Context:* Shows temporal regularities, comparing
 empirical data to shuffled/Markov surrogates, and illustrates multimer
 coverage across Datasets 1, 2, and 3. * **Figure4/**: * Contains code/data
 for **Figure 4B & 4C**. * *Context:* CGR spectra of
 multimer-constrained surrogate sequences and temporally smoothed sequences
 (Dataset 1). * **Figure5/**: * Contains code/data for **Figure 5B**. *
 *Context:* Reproduction of spectral periodicity using a 3-layer
 hierarchical generative model. * **Figure67/**: * Contains code/data for
 **Figure 6 and Figure 7**. * *Context (Fig 6):* Statistical comparison of
 multimer duration and occurrence across consciousness states. * *Context
 (Fig 7):* Statistical comparison of multimer coverage and monomer counts.
 * **FigureS1/**: * *Context:* Group-level CGR spectra for Datasets 2 &
 3 (Empirical vs. Shuffled vs. Markov). * **FigureS2/**: * *Context:*
 Surrogate analysis and temporal smoothing results for Datasets 2 & 3.
 * **FigureS3/**: * *Context:* Generative model results for Datasets 2
 & 3. * **FigureS456/**: * *Context:* Empirical distributions of
 microstate durations compared with exponential and log-normal fits for
 Datasets 1 (Fig S4), 2 (Fig S5), and 3 (Fig S6). Uses AIC for goodness of
 fit. * **FigureS7/**: * *Context:* Validation of the CGR framework using
 six microstate classes (instead of four), focusing on Beta-band dynamics.
 --- ## 4. Source Data Citations The microstate sequences in this
 repository were derived from the following publicly available or
 previously published EEG datasets. Please cite the original sources if you
 use the raw data: **Dataset 1 Source:** &gt; Chennu, S., O'Connor,
 S., Adapa, R., Menon, D.K., Bekinschtein, T.A., 2016. Brain Connectivity
 Dissociates Responsiveness from Drug Exposure during Propofol-Induced
 Transitions of Consciousness. *PLoS Comput Biol* 12, e1004669. **Dataset 2
 Source:** &gt; Bajwa, I.J., Nilsen, A.S., Skukies, R., Aamodt, A., Ernst,
 G., Storm, J.F., Juel, B.E., 2025. A repeated awakening study exploring
 the capacity of complexity measures to capture dreaming during propofol
 sedation. *Sci Rep* 15, 32746. **Dataset 3 Source:** &gt; Wei, X.,
 Avigdor, T., Ho, A., Minato, E., Garcia-Asensi, A., Royer, J., Wang, Y.L.,
 Travnicek, V., Schiller, K., Bernhardt, B.C., Frauscher, B., 2024.
 ANPHY-Sleep: an Open Sleep Database from Healthy Adults Using High-Density
 Scalp Electroencephalogram. *Sci Data* 11, 896. --- ## 5. Software
 Requirements * **MATLAB**: The code was developed and tested using MATLAB
 (MathWorks). If you have any questions regarding the code or data, please
 contact: [zhoudongdong@cqmu.edu.cn](mailto:zhoudongdong@cqmu.edu.cn)