Methods
Participants
This study was conducted at the Second Hospital of Hebei Medical University in Shijiazhuang, China. Good sleep controls (GSC) and ID patients were recruited from outpatient clinics. Individuals aged between 18 and 65 years who were right-handed were screened based on the diagnostic criteria for ID in the Diagnostic and Statistical Manual of Mental Disorders, Fifth Edition. A total score of ≥5 on the Pittsburgh Sleep Quality Index (PSQI) and ≥8 on the Insomnia Severity Index (ISI) was required for enrolment. Those with severe neurological or medical illness, other sleep disorders, restless leg syndrome and pregnancy (for females) were excluded. Additionally, individuals who received psychiatric medication, hypnotics or treatment with cognitive behavioural therapy for insomnia within the past 2 weeks were also excluded. For GSC, age-matched and gender-matched individuals were included based on the following criteria: no symptoms or history of psychiatric or sleep disorders, a total PSQI score of <5 and a total ISI score of <8 at the time of screening and no lifetime use of any psychotropic or hypnotic medication. For both groups, exclusion criteria included comorbid other psychiatric disorders and Beck Depression Inventory (BDI) scores >20 or Beck Anxiety Inventory (BAI) scores >45. To screen for other sleep disorders, participants were questioned in person about conditions including obstructive sleep apnoea syndrome, restless leg syndrome, etc. Also, the PSG data of the participants were collected and analysed. Individuals with other sleep disorders were excluded from the study.10
Two datasets were included in this study. The primary dataset included 40 GSC and 60 patients with ID. Patients with ID were randomly divided into active rTMS treatment (n=30) and sham rTMS treatment (n=30) groups. This dataset was used to explore abnormal brain microstates in patients with ID and to assess the effect of rTMS intervention on abnormal microstates in patients with ID. The second dataset included 90 patients who received active rTMS treatment; it was used to validate whether baseline microstates in patients with ID could predict the outcomes of 20-day active rTMS treatment. The inclusion and exclusion criteria for ID patients recruitment in the second dataset were consistent with those in the primary dataset. A flowchart of participant registration and follow-up is shown in figure 1. The characteristics of the participants are summarised in online supplemental table S1 and online supplemental table S2.
Figure 1Flowchart of the study. BAI, Beck Anxiety Index; BDI, Beck Depression Index; CBT-I, cognitive behavioural therapy treatment for insomnia; DSM-V, Diagnostic and Statistical Manual of Mental Disorders, Fifth Edition; GSC, good sleep controls; ID, insomnia disorder; ISI, Insomnia Severity Index; PSG, polysomnography; PSQI, Pittsburgh Sleep Quality Index; rTMS, repetitive transcranial magnetic stimulation.
Repetitive transcranial magnetic stimulation treatment
The rTMS therapy was carried out by using a pulsed magnetic stimulation device (M-100 Ultimate; Shenzhen Yingchi Technology, Shenzhen, China) with a figure-eight stimulation coil at the left DLPFC, as described in our previous study.10 The specific parameters were as follows: stimulus frequency at 1 Hz, stimulus intensity at 80% of the motion threshold, stimulation number at 10 pulses per string and 150 strings, string interval at 2 s, and total stimulation pulses at 1500. For each rTMS session, the total stimulation time is 30 min, one session per day. Sham rTMS was performed by orienting the coil away from the skull at 90°. Twenty active or sham sessions of left DLPFC rTMS treatment were delivered over four consecutive weeks, with a frequency of five times per week.
Clinical assessment
All patients with ID received pre-treatment and post-treatment clinical assessments, including full-night sleep PSG recordings using a Grael 4 K system (Compumedics, Victoria, Australia) and sleep-related scales. The Yet Another Spindles Algorithm (YASA) was used for sleep stage classification, and PSG metrics were calculated, including sleep onset latency (SOL), sleep efficiency (SE) and non-rapid eye movement sleep stage 3 (NREM 3) duration. The scales included the PSQI, ISI, Epworth Sleepiness Scale (ESS), BDI, BAI, Mini-Mental State Examination (MMSE) and the Montreal Cognitive Assessment (MoCA). GSC participants were subjected to the same assessment but only measured at baseline (ie, pre-treatment).
Resting-state electroencephalography data acquisition and preprocessing
The 10 min resting-state EEG recording was carried out in a shielded, sound-attenuated room. Participants were instructed to remain awake with their eyes closed, and relax without any active thinking. Resting-state EEG data were acquired at a sampling rate of 512 Hz (analogue bandpass filtering: 0.1 and 100 Hz), with a 19-channel Nicolet system (Cephalon, Denmark). The ground electrode was attached to the forehead, and reference electrodes were located on A1 and A2. For each electrode, the impedance was maintained below 10 kΩ. EEGLAB toolbox and custom MATLAB (MathWorks, Massachusetts, USA) scripts were employed for EEG data offline preprocessing.21 By using a notch filter, we removed the 50 Hz AC line noise artefact. After filtering with a 2–20 Hz bandpass, the filtered EEG data were re-referenced to the common average. The bad channels and bad epochs were manually rejected and then interpolated from the EEG signals of adjacent channels. Finally, the eye movement and blink artefacts were removed using independent component analysis.
Microstates analysis
The microstate analysis was conducted using the functions from the EEGLAB plugin for microstates (http://www.thomaskoenig.ch/index.php/software/Microstates-in-eeglab) in MATLAB R2021b. The process of EEG microstates analysis is described in detail below (online supplemental figure S1).
First, the global field power (GFP) was calculated:
Where k is the number of electrodes in the EEG data (19 in this case); is the potential of the ith electrode at a certain time point and is the average value of the instantaneous potential across electrodes.
Based on the above equation, a GFP curve that reflects the degree of change in the EEG potential between all electrodes at a given time can be obtained. GFP curve local maxima represented instants of the highest field strength.22 EEG topographies tend to remain stable during high GFP periods and change rapidly around the local minima of the GFP. Therefore, topographies at GFP peaks are representative of topographies at surrounding time points, and restricting the microstate analysis to these GFP peaks provided optimal topographic signal-to-noise ratios.23
Second, for the resting-state recording, all topographies at GFP peaks were selected and submitted to modified k-means clustering (despite spatial polarity) with 100 repetitions. The number of clusters was set to 4, and microstate maps (ie, cluster centres) were estimated. Third, a second cluster was performed among the subjects within each group. All microstate maps were submitted to modified k-means clustering (despite spatial polarity) with 100 repetitions. Finally, the group microstate maps were then fit back to the original data at GFP peaks, assigning each GFP peak to one microstate class based on the maximal spatial correlation between topographies. Microstate labels for data points between GFP peaks were interpolated with microstates starting and ending halfway between two GFP peaks. Potentially truncated microstates at the beginning and end of each epoch were excluded from the analysis.
After obtaining the microstates, the corresponding EEG microstates temporal parameters were extracted: (a) Duration_X: the mean duration of microstates of class X, in seconds; (b) Mean Duration: the mean microstate duration across all classes in seconds; (c) Occurrence_X: the mean frequency of observation of microstates of class X, per second; (d) Mean Occurrence: the mean frequency of observation of microstates across class X, per second; (e) Contribution_X: the proportion of the total time spent in microstates of class X; (f) Mean GFP_X: the mean GFP of microstates of class X in microvolts; (g) OrgTM_X->Y: the proportion of all observed microstate transitions from X to Y; (h) ExpTM_X->Y: the proportion of expected microstate transitions from X to Y, given only the observed occurrences; (i) DeltaTM_X->Y: the difference between the observed and the expected transition probabilities. Details are available in the online supplemental material.
Statistical analyses
The Shapiro-Wilk test was used to test for the normality of distribution. Independent samples t-test was used to compare the differences between the ID and GSC groups (basic information, scale scores, microstate indicators and PSG indicators). The Wilcoxon rank-sum test was performed on the gender of participants in the ID and GSC groups. Two-way repeated measure analysis of variance and post hoc Tukey tests were used for differences before and after active and sham rTMS (scale scores, PSG indicators and microstate indicators).
The topographies of the different microstate classes between the groups were compared using topographical analysis of variance (TANOVA) implemented in the Ragu software.24 TANOVA was based on powerful and assumption-free randomisation statistics and could be used for the statistical comparison of EEG scalp field maps between two or more conditions.
Pearson’s correlation analysis was used to explore the potential significant correlation between abnormal microstate parameters and subjective and objective sleep quality in patients with ID. Data were analysed using SPSS V.26.0 (SPSS, Chicago, Illinois, USA). Graphs were plotted using GraphPad Prism V.8.0.2 (GraphPad Software, California, USA).
Construction of efficacy prediction model
PSQI scale scores were collected from patients with ID before and after treatment. Then, the percentage of improvement in the subjects’ PSQI scale scores was calculated using the formula shown below:
The percentages of improvement were sorted in ascending order, and the subjects were divided into optimal and suboptimal groups using the median 54 baselines. EEG microstate characteristics (Duration_X, Mean Duration, Occurrence, Mean Occurrence_X, Contribution_X, Mean GFP_X, OrgTM_X->Y, ExpTM_X->Y, DeltaTM_X->Y) were used as the features to build the dataset. Details of the characteristics are given in the ‘microstate analysis’ section. The dataset (10n) was divided into a training set (9n) and a test set (1n) using a hierarchical 10-fold cross-validation strategy. First, feature preprocessing of normalisation was performed for the features, and then principal component analysis dimensionality reduction was carried out to remove redundant features. The specific strategy retained 99% of the explainable variance. The remaining features were then input to a logistic regression classifier for model training. The test set was input to the trained model according to the same feature preprocessing and feature selection strategies for model evaluation. The performance metrics (accuracy, precision, recall, F1-score, area under the curve (AUC)) were calculated for each fold of the model, and the average performance metrics were averaged for each fold of the model to obtain the average performance metrics of the model.