{'fraction_non_alphanumeric': 0.03670215135183288, 'fraction_numerical': 0.015500423143735245, 'mean_word_length': 4.877486910994764, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On the relation between EEG microstates and cross-spectra

Brain function as measured by multichannel EEG recordings can be described to a high level of accuracy by microstates, characterized as a sequence of time intervals within which the sign invariant normalized scalp electric potential field remains quasi-stable, concatenated by fast transitions. Filtering the EEG has a small effect on the spatial microstate scalp maps, but a large effect on the dynamics (e.g. duration, frequency of occurrence, and transition rates). In addition, spectral power has been found to be strongly correlated with microstate dynamics. And yet, the nature of the relation between spectra and microstates remains poorly understood. Here we show that the multivariate EEG cross-spectrum contains sufficient generative information for estimating the microstate scalp maps and their dynamics, demonstrating an underlying fundamental link between the microstate model and the multivariate cross-spectrum. Empirically, based on EEG recordings from 203 participants in eyes-closed resting state, their cross-spectral matrices were computed, from which stochastic EEG was generated. No significant differences were found for the microstate model (maps and dynamics) estimated from the actual EEG and from the stochastic EEG based solely on the cross-spectra. In addition, with the aim of quantifying the spatio-cross-spectral properties of the microstate model, we introduce here the topographic likelihood spectrum, based on the Watson distribution, which provides a frequency-by-frequency account of the contribution of a normalized microstate map to the normalized EEG cross-spectrum, independent of power. The topographic likelihood spectra are distinct for the different microstate maps. In a comparison between eyes-closed and eyes open conditions, they are shown to be significantly different in frequency specific patterns.


Introduction
Brain function as measured by multichannel EEG recordings can be described to a high level of accuracy by microstates, characterized as a sequence of time intervals within which the sign invariant normalized scalp electric potential field remains quasi-stable, concatenated by fast transitions. Up to 70% of explained variance is attained with just four microstate scalp maps, with average duration range 60 to 120 ms. In the early 1970's Lehmann published this phenomenological description based on careful and reproducible visual inspection of multichannel EEG during rest, under an appropriate broad band-pass filter (Lehmann 1971; see also Lehmann et al 1987).
The spatio-temporal aspects of the model are the actual microstate scalp maps, and temporal dynamic parameters (e.g. percent of time in each state, average state duration, number of occurrences per second, and Markov transition rates).
By definition, and due to its very nature, band-pass filtering of the EEG will significantly affect the estimated dynamics, as has been shown empirically (see e.g. Ferat et al 2022). In related research, significant associations have been described between EEG frequency domain parameters and broadband microstate dynamic parameters (see e.g. Milz et al 2017;Zulliger et al 2022).
In contrast, band-pass filtering has been shown empirically to have little effect on the spatial pattern of the microstate maps (see e.g. Ferat et al 2022).
This present study aims at finding a general relation between the multivariate EEG spectral density and the microstate model. Two main results are presented.
We show that the multivariate EEG cross-spectrum contains sufficient generative information for estimating the microstate scalp maps and their dynamics. This means that original EEG recordings, and stochastic EEGs generated from the cross-spectral matrices, produce microstate scalp maps and dynamics that are statistically similar.
This result is not trivial. This result shows that even the quasi-non-linear aspects of the microstate model can be well approximated as a multivariate linear Gaussian quasi-stationary process, for which the cross-spectrum is known to represent a sufficient statistic. Moreover, this result shows that there is an underlying fundamental link between the microstate model and the frequency domain cross-spectrum.
As a second contribution, we introduce here the "topographic likelihood spectrum" (TLS) as a complimentary descriptor for microstate analyses. The TLS provides a frequency-by-frequency account of the contribution of a normalized microstate map to the normalized EEG cross-spectrum. In other words, it is a measure of alignment of each normalized map with the shape of the space spanned by all the generators of activity at each frequency. A spectral peak in TLS means that at the peak frequency, the map is strongly associated with the predominant normalized generator distribution at that frequency.
Note that the TLS measure is not the power spectrum of an estimator for the microstate signal. Examples of estimators for the microstate signals are of the multivariate type, as in Pascual-Marqui et al (2014) Equation 8 therein, or of the univariate type, as in Ferat et al (2022).
All statistical tests are carried out with non-parametric randomization of the maximum-statistic, thus correcting for multiple testing, and valid even for non-Gaussian data (Karniski et al. 1994;Nichols and Holmes 2002). In addition, and of equal importance, comparisons are also evaluated using effect sizes, following the general guidelines proposed in Poldrack et al (2008).

The real EEG data
Babayan et al (2019) have made available in open source form the EEG data used in this study. All details can be found in the original paper, whereas a description of the most important data characteristics can be found in Ferat et al (2022 The EEG cross-spectrum of each participant was estimated in the form of the average multivariate periodogram over 180 epochs, using a Hann taper, see e.g. Brillinger (2001), Oppenheim and Schafer (2014), Frei et al (2001). Cross-spectra are computed for all discrete frequencies from 2 Hz to 44 Hz.
The estimated cross-spectrum for the i-th participant is denoted as is the number of electrodes, and  denotes the discrete frequency. Note that the crossspectral matrices are Hermitian and non-negative definite.

The stochastic EEG data
Stochastic EEG generated from the estimated cross-spectra is obtained as follows. In a first step, random complex Gaussian independent and identically distributed data are generated as Eyes-closed stochastic EEGs were generated, matching exactly the sample size of the real eyesclosed EEG recordings used in this study, described above. I.e., 180 seconds of stochastic EC EEG, in the form of

Microstates: model and estimation
Keeping in mind the phenomenology of ongoing EEG activity that led to the theory of EEG microstates (i.e. brain function as measured by multichannel EEG recordings can be described as a sequence of time intervals within which the sign invariant normalized scalp electric potential field remains quasi-stable, concatenated by fast transitions), the aim here is to use the simplest possible mathematical description of those empirical observations. For this purpose, the model and corresponding estimation algorithm introduced in Pascual- Marqui et al (1995) is used here, which is aimed at finding the best fitting maps and labels to the EEG measurements. In essence, it is a clustering algorithm of the K-means type, where instead of finding centroids, the method finds the axes in the form of normalized vectors. In summary, the algorithm follows: Step-A1a: Input scalp maps ( ) . If the scalp maps correspond to EEG recordings, then specify the band-pass filter (optional). Alternatively, the maps need not be a time series, e.g. the collection of all the microstate maps for many participants, in which case no band-pass filter takes place.
Step-A1b: Input the number of microstates N  .
Step-A1c: Input the maximum number of iterations and value for small epsilon for testing convergence. Convergence occurs if the absolute value of relative change in global explained variance is smaller than epsilon, or if the number of iterations exceeds the defined maximum.
Step-A1d: Must select one of the two options in Step-A1d1 or Step-A1d2: Step-A1d1: Input user defined initial normalized microstate maps. Could be, e.g., template microstate maps. Go to Step-A2.
Step-A1d2: Program generated initial normalized microstate maps, by randomly selecting maps from input scalp maps followed by normalization. Go to Step-A2.
Step-A2: For each scalp map ( ) , compute its microstate label as: is the error of fit for the model: Step-A4: Go to Step-A5 if convergence criteria satisfied, otherwise go to Step-A2.
Note that when the input data to the algorithm from Step-A1 to Step-A5 is actual EEG, then the labels ( ) Lt correspond to a time series with possibly "noisy" transitions. In this case, optionally, one can apply Besag's (1986) iterated conditional modes algorithm to the labels ( ) Lt . This algorithm will smooth possibly noisy transitions in the label time series, by way of a Markov random field model, which adds a penalized term to the likelihood function, which implements the fact that if ( ) Note that this method can be extended to larger time windows. A detailed account of the implementation of Besag's algorithm is given in Pascual-Marqui et al (1995).
On occasion, several random re-initializations at Step-A1d2 are performed, and the model parameters corresponding to the highest global explained variance are kept.
As in Ferat et al (2022), five microstates ( ) A 2-20 Hz band-pass filter was applied within the microstate estimation algorithm to the EEG (for real recordings, and for stochastically generated data).
For each participant and each condition separately, the best fitting microstates were estimated by running the algorithm with 20 random-reinitializations, and 50 maximum iterations.
In a second step, the collection of 406 best fitting normalized microstates (203 participants, in EC and EO conditions), were again submitted to the microstate estimation algorithm. This produced the best overall common best fitting five microstates, reordered to the A,B,C,D,C1 template of Ferat et al (2022).
In a final step, the common microstate maps were used in the algorithm as initialization in Step-A1d1, and all the filtered 2-20Hz EEGs (real recordings and stochastic EEGs) were processed by the algorithm with 100 maximum iterations, giving the final set of microstate parameters, for each participant and condition (EC, EO, real, stochastic). Note that the initialization step with the common microstate maps does not force these maps on the data. It only forces comparable order of estimated maps and parameters, ready for statistical analyses. Without this step, the estimated maps are in arbitrary order.

Microstate parameters
The microstate parameters computed in this study are described next.
Global explained variance percent: Explained variance percent by the k-th microstate: Time fraction in the k-th microstate: The frequency of occurrence per second (i.e. number of occurrences per second) of the k-th microstate is defined as total number of occurrences of the k-th microstate, divided by the total recording time. Referring to Figure 1, there are four occurrences of microstate "A" per "T" seconds, three occurrences of microstate "B" per "T" seconds, and one occurrence of microstate "C" per "T" seconds. Figure 1: Horizontal axis is time, and total time from start to end duration is "T" seconds. Small vertical arrows denote transitions between three microstates denoted A,B,C. The occurrences of each microstate are numbered in the subscript.
The average duration of the k-th microstate is another important parameter. For instance, referring to Figure 1, the average duration of microstate "A" is the average of the four durations "A1, A2, A3, and A4". Note that care should be taken at the borders (start and end of each epoch), since the actual durations are always larger. One solution is to simply trim out the start and end microstates and to redefine the start and end of the epoch accordingly.

Rates of transitions between microstates
In this study, we emphasize that transitions between microstates will not be modeled as a discrete Markov chain, as in vonWenger et al 2017. In our study, it is deemed incorrect to use such a model, because it does not consider the fact that when each state occurs, it does so for a random finite amount of time.
A more appropriate model for describing the transitions is to use a continuous time Markov process model. In this case, the parameters of interest are the transition rates (in number of jumps per unit time) from the i-th to the j-th microstate, with maximum likelihood estimator: corresponds to the rate of escaping the i-th state. I.e., the more negative, the shorter average duration of the i-th state. While the self-transition rate might seem redundant since it shares very similar information with the "average duration" parameter previously defined, the transition rate matrix in its entirety contains novel information.
We emphasize that even if the transitions do not follow a Markov process, the transition rates constitute an important descriptor for the process. This is in much the same way that the mean and standard deviations are descriptors of data, regardless of the possibility that the data does not have a Gaussian distribution.

The topographic likelihood spectrum (TLS)
The topographic likelihood spectrum (TLS) for each normalized microstate map k  , with 1... kN  = , is defined as: is the unit trace cross-spectral matrix at frequency . This definition is loosely based on the Watson probability density function, see e.g. Mardia and Jupp (1999), Equation 10.3.30 therein.
Note that the global field power spectra for ( ) tr  S is constant. I.e. it has a flat spectrum, which is devoid of power information. For this reason, the TLS is not related to the power spectra of the microstate maps.
This measure provides a frequency-by-frequency account of the contribution of a normalized microstate map to the normalized EEG cross-spectrum. In other words, it is a measure of alignment of each normalized map with the shape of the space spanned by all the generators of activity at each frequency. A spectral peak in TLS means that at that the peak frequency, the map is strongly associated with the predominant normalized generator distribution at that frequency. In other words, a microstate map has large contribution to a cross-spectral matrix if it is close to some of its largest eigenvectors.

4.
Results and discussion

Microstate scalp maps
Figure 2 displays the five best fitting common microstates estimated in this study, based on 3 min EC and 3 min EO EEG for 203 participants, band-pass filtered 2-20 Hz. These microstates are qualitatively similar to those from Ferat et al (2022). This result serves as a sanity check.

Average microstate parameters
Using the microstate template from Figure 2 as initialization, the best fitting microstates (maps and labels) were computed separately for each participant, and each condition (EC, EO, real recordings, generated stochastically), for band-pass filtered data 2-20 Hz. After convergence allowing for a maximum of 100 iterations, the initialization only guarantees a similar ordering of the individual best fitting microstates. The set of averages of each individual microstate parameter over 203 participants is shown in Table 1.

Comparisons between microstate parameters for real EEG recordings and EEG generated stochastically from cross-spectra
Comparisons between EC microstate parameters for real EEG recordings and EEG generated stochastically from cross-spectra are shown in Table 2. For the sample size of 203 participants, the effect size values for Cohen's d, and their equivalent univariate t-statistic values are (small, d=0.2, t=2.84), (medium, d=0.5, t=7.09), (large, d=0.8, t=11.34). No significant differences were found, and all effect sizes were below medium. Table 2: Univariate t-statistics corresponding to microstate parameters for EC data, comparison for "EEG generated stochastically from cross-spectra" minus "Real EEG". Two-sided threshold corrected for multiple testing t(p<0.01)=3.68 and t(p<0.05)=3.18. Effect sizes, in t-statistic units, are (small, t=2.84), (medium, t=7.09), (large, t=11.34). The meaning of the results in Table 2 can be illustrated as in Figure 3. Figure 3: Illustration showing that microstate analysis on real EEG recordings, and on stochastically generated EEG from the cross-spectrum, produce results that are statistically indistinguishable. Table 3 reports the statistical comparisons for microstate parameters for "EC" minus "EO", for the real EEG recordings. As expected, there are many significant differences between the two states (EC vs EO). Table 3: Univariate t-statistics corresponding to microstate parameters for "EC" minus "EO", for the real EEG recordings. Two-sided threshold corrected for multiple testing t(p<0.01)=3.741 and t(p<0.05)=3.202. Effect sizes, in t-statistic units, are (small, t=2.84), (medium, t=7.09), (large, t=11.34). The threshold used for shading corresponds to medium effect size for abs(t)>7.09, which is very much higher than the p<0.01 threshold. Red colors for EC>EO, and green colors for EO>EC. As a sanity check, note that the t-values in Table 3, comparing EC minus EO, for %ExpVar (percent of explained variance per microstate), %TotTime (fraction of time spent in each microstate), and for average duration in seconds, are in the same direction as those reported in Ferat et al 2022. These are the parameters which are common to both studies. Furthermore, it is important to emphasize that the qualitative agreement between these results and those of Ferat et al (2022) occurs despite many methodological differences, such as difference in broad-band limits, and the use of EEG maps at global field power peaks in Ferat et al (2022).

Comparisons between microstate parameters for eyes-closed and eyes open conditions
With respect to the continuous time Markov process parameters, eyes open condition has significantly higher transition rates than eyes-closed condition, which means that transitions are more frequent during eyes open leading more often to microstates A, B, and C1.

Topographic likelihood spectra (TLS)
The average TLS, over 203 participants, for eyes-closed and eyes open conditions are shown in Figure 4 and Figure 5, respectively. Note that TLS was calculated from the cross-spectrum of each of 203 participants for both eyes open and closed conditions, using the common five microstates (Figure 2). From Figure 4 for EC condition, microstates C and D have the highest spatio-spectral contribution for all frequencies range 2-44 Hz. This is followed by lower spatio-spectral contribution from microstates A and B. And finally microstate C1 has the lowest spatio-spectral contribution. The two strongest spatio-spectral contributors, C and D, have dissociated alpha range peaks, with D for low alpha (around 9 Hz), and C for high alpha (around 11 Hz). In addition, C and D display local maxima close to 20 Hz. A and B have similar spectra, but with peaks (A at 10 Hz) and (B at 12.5 Hz). Microstate C1 peaks at around 3 Hz. From Figure 5 for EO condition, microstates C and D have the highest spatio-spectral contribution for all frequencies range 2-44 Hz. This is followed by lower spatio-spectral contribution from microstates A and B. And finally microstate C1 has the lowest spatio-spectral contribution. The two strongest spatio-spectral contributors, C and D, have dissociated peaks, with D displaying a 7 Hz theta peak, and C with a 10 Hz alpha peak. In addition, D displays a local maximum close to 14 Hz. A and B have similar spectra, but with peaks at 11 to 12 Hz. Microstate C1 peaks at around 3 Hz. The statistical comparison of TLS for EC minus EO is shown in Figure 6. The major significant features of the comparison for TLS(EC-EO) are: 1. Microstate C1 in eyes open condition has larger topographic likelihood at 10 Hz. 2. Microstates C and D in eyes-closed condition have larger topographic likelihood at 10 Hz. 3. In eyes-closed condition, microstates A, B, C, and D have larger topographic likelihood at around 20 Hz.

5.
Concluding summary It was shown here empirically that microstate model parameters (maps and dynamics) can be estimated from stochastic EEG generated from its multivariate cross-spectrum. It is important to note that: 1. This result is not trivial. This result shows that even the quasi-non-linear aspects of the microstate model can be well approximated as a multivariate linear Gaussian quasi-stationary process, for which the cross-spectrum is known to represent a sufficient statistic. Moreover, this result shows that there Hz is an underlying fundamental link between the microstate model and the frequency domain crossspectrum. 2. The cross-spectrum is a sufficient statistic for linear, quasi-stationary, Gaussian signals. Even if linearity and Gaussianity are violated, the cross-spectrum is still very informative, since it corresponds to the multivariate second order moment. This seems to suffice for reproducing the microstate model. 3. Even though cross-spectra are embedded with microstate information, they are no substitute for the microstate model. Cross-spectra are difficult to interpret in their raw form, while the microstate model provides a set of meaningful, interpretable features.
The topographic likelihood spectrum (TLS) constitutes a quantification of the spatio-crossspectral properties of the microstate model. It provides a frequency-by-frequency account of the contribution of a normalized microstate map to the normalized EEG cross-spectrum, independent of power. In other words, it is a measure of alignment of each normalized map with the shape of the space spanned by all the generators of activity at each frequency. A spectral peak in TLS means that at the peak frequency, the map is strongly associated with the predominant normalized generator distribution at that frequency.
Different microstate maps have different TLS, which are also different in different brain states. This motivates its use as a possible biomarker.
Again: the TLS measure is not the power spectrum of the microstate signal. 6.