Abstract
Background:
The integration of machine learning with advanced neuroimaging has emerged as a powerful approach for uncovering the relationship between neuronal activity patterns and behavioral traits. While resting-state neuroimaging has significantly contributed to understanding the neural basis of cognition, recent fMRI studies suggest that task-based paradigms may offer superior predictive power for cognitive outcomes. However, this hypothesis has never been tested using electroencephalography (EEG) data.
Methods:
We conducted the first experimental comparison of predictive models built on high-density EEG data recorded during both resting-state and an auditory working memory task. Multiple data processing pipelines were employed to ensure robustness and reliability. Model performance was evaluated by computing the Pearson correlation coefficient between predicted and observed behavioral scores, supplemented by mean absolute error and root mean square error metrics for each model configuration.
Results:
Consistent with prior fMRI findings, task-based EEG data yielded slightly better modeling performance than resting-state data. Both conditions demonstrated high predictive accuracy, with peak correlations between observed and predicted values reaching r = 0.5. Alpha and beta band functional connectivity were the strongest predictors of working memory performance, followed by theta and gamma bands. Additionally, the choice of parcellation atlas and connectivity method significantly influenced results, highlighting the importance of methodological considerations.
Conclusion:
Our findings support the advantage of task-based EEG over resting-state data in predicting cognitive performance, aligning with the results of fMRI studies. The study underscores the critical role of frequency-specific functional connectivity and methodological choices in model performance. These insights should guide future experimental designs in cognitive neuroscience.
Impact Statement
This study provides the first direct comparison of EEG-based functional connectivity during rest and task conditions for predicting working memory performance using connectome-based predictive modeling (CPM). It demonstrates that task-based EEG data slightly outperforms resting-state data, with alpha and beta bands being the most predictive. The findings highlight the critical influence of methodological choices, such as parcellation atlases and connectivity metrics, on model outcomes. By bridging gaps in EEG research and validating CPM’s applicability, this work advances the optimization of neuroimaging protocols for cognitive assessment, offering insights for future studies in cognitive neuroscience.
Introduction
Working memory is one of the crucial components of executive functions, allowing an organism to successfully perform a wide range of complex tasks and adapt to rapidly changing environmental demands. Over the past decade, significant progress has been made in understanding the neural mechanisms of working memory (Emch et al., 2019; Murphy et al., 2020; Wischnewski et al., 2024). An important role in this was played by the rapid development of network neuroscience and the active introduction of machine and deep learning methods into brain sciences, as well as the emergence of an independent field of research called computational neuroscience.
It is well known that any complex cognitive functions rely on the functioning of distributed neural ensembles that interact closely with each other (Christophel et al., 2017; Rezayat et al., 2021). Patterns of such activity can be noninvasively quantified by applying functional connectivity (FC) methods, which reflect the nature and degree of connection between different brain regions. However, the final outcome of such calculations directly hinges upon the choice of specific FC metrics, as well as the parcellation atlas, which determines the number of regions into which the brain is segmented (Arslan et al., 2018; Mahjoory et al., 2017). Therefore, it is fundamentally important in such studies to assess the potential impact of choosing a specific method of analysis on the final result by benchmarking different data processing pipelines.
Earlier studies have consistently and convincingly demonstrated a possibility of predicting real-life behavioral performance in a variety of cognitive tasks based on resting state neuroimaging data (Oswald et al., 2017; Rogala et al., 2020). Moving forward, more recent studies have shown a greater predictive power of task-based paradigms for predicting specific behavioral characteristics, like working memory, attention and general cognitive ability (Finn, 2021; Zhao et al., 2023). The relevance of this issue lies in identifying the optimal conditions for conducting neuroimaging studies that allow for the most accurate prediction of an individual’s cognitive, emotional, and behavioral characteristics. To the best of our knowledge, all these studies have been carried out using fMRI and it remains to be determined whether these results can be applied to electroencephalography (EEG).
In this study, we sought out to systematically compare resting state and task conditions while utilizing EEG connectome-based predictive modeling (CPM) in order to prognosticate working memory performance in a sample of young healthy subjects. In addition, we used different data processing pipelines to estimate the impact of FC method and brain atlas choice on experimental results.
Materials and Methods
Dataset
In this study, we utilized an openly available dataset (Pavlov et al., 2022), comprising resting state and task-related EEG records from 65 participants, along with demographic and behavioral data. EEG recordings were obtained using a 64-channel EEG device with active electrodes (ActiCHamp, Brain Products, Germany). The resting state data were recorded under an eyes-closed condition for a period of 4 min. Task-related EEG data were obtained during a working memory test involving digit spans of lengths 5, 9, and 13, presented in a random order within a single recording session. Auditory presentation of digits via speakers included a 2-second delay between digits and a 3-second delay between stimulus presentation and response. The experiment consisted of 108 trials, in which participants had to memorize and verbally recall as many digits as possible. For detailed procedural information, refer to (Pavlov et al., 2022).
The working memory score for each participant was calculated as the number of correctly recalled digits until the first error normalized by the length of the span. Subsequently, this measure was used as a dependent variable in the CPM.
Preprocessing
The raw data were preprocessed with MNE (Gramfort et al., 2014) and Autoreject (Jas et al., 2017) libraries. The data were filtered within a 1–45 Hz band, downsampled to 100 Hz, and rereferenced to an average electrode. Artifact rejection was fully automated, involving ICA-based ocular artifact correction and utilizing the Autoreject library to address other artifacts. Resting state data were segmented into 6-second intervals with a 1-second overlap. Task-related data were epoched into intervals of (−0.5; 2) seconds centered around the stimuli. Different span lengths (5, 9, and 13 digits) were analyzed separately, with epochs grouped based on the span length.
Source reconstruction
The clean preprocessed data were utilized to reconstruct brain sources using the eLORETA algorithm (Pascual-Marqui et al., 2011). The fsaverage object (Fischl et al., 1999) served as the template brain model due to the unavailability of MRI scans of the participants. Two atlases were selected for brain parcellation: the Desikan–Killiany atlas (Desikan et al., 2006) (68 regions, 34 per hemisphere) and the Destrieux atlas (Fischl et al., 2004) (148 regions, 74 per hemisphere). The selection of these atlases was based on the fact that they are the most frequently used atlases and significantly differ in the number of brain regions, which would allow us to assess the impact of this factor on the research results.
Functional connectivity
Reconstructed source time series were applied pairwise to build connectivity matrices. Six frequency bands were delineated: theta (4–8 Hz), low alpha (8–10 Hz), high alpha (10–13 Hz), low beta (13–20 Hz), high beta (20–30 Hz), and gamma (30–45 Hz). For this study, we selected three commonly used connectivity metrics: weighted phase lag index (wPLI) (Vinck et al., 2011), imaginary part of coherence (imCoh) (Nolte et al., 2004), and phase locking value (PLV) (Lachaux et al., 1999).
Here
Connectome-based predictive modeling
FC matrices were used as input for the CPM procedure (Shen et al., 2017). We utilized the Python implementation of CPM provided by Shen and colleagues and made modifications to align it with our study objectives. Our code is freely accessible at the following link https://github.com/Goliath-dev/MemoryCPM. The key concept for CPM is the notion of an edge, which is defined as a connection between two brain regions with an associated weight that indicates the “strength” of the connection in terms of FC; that is, the greater the weight, the more synchronized the regions are. Given a specific edge, the procedure computes a partial correlation (with sex and age being the covariates) between edge weights across participants and their behavioral characteristics (i.e., working memory scores). If the p value of the correlation falls behind a predetermined threshold, then the edge is marked as valuable. For each participant in the training subsample, the sum of valuable edges is calculated and these sums and the behavioral characteristics then serve as a basis to fit the regression curve. In this study, we used a threshold p value of 0.01 and the first order of the regression curve. For the regression method, we used Huber regression in order to deal with outliers.
Nested cross-validation
We conducted a thorough evaluation of the performance of each experiment via a nested leave-one-out cross-validation (LOOCV) process. Ordinary LOOCV involves developing a predictive model using the data from all participants except one (the training set) to predict the score of the remaining participant (the test set) in each iteration. The nested LOOCV process includes a nested cross-validation cycle, with one cross-validation cycle (the outer cycle) wrapped around another (the inner cycle). In each iteration of the outer cycle, the sample is split into training and testing sets of size N-1 and 1, respectively. The testing set from this outer cycle is held out and not involved in the training process of the inner validation loop. The training set from the outer cycle is then used as input for the inner cross-validation process, which itself involves splitting the data into inner training and testing sets. The inner training set is used to train the CPM model, obtaining the valuable edges that form the basis for prediction. This inner training and testing process is repeated N-1 times, resulting in N-1 predictions for the test set. Moreover, N-1 sets of valuable edges are obtained. To filter out the edges that only appear in some iterations, we compute the intersection of all these sets. If this intersection is not empty, we use it to predict the test element in the outer cross-validation cycle. This entire procedure is then iterated N times, resulting in a final prediction for each element in the sample. Finally, all of the valuable edge sets from the outer CV loop are intersected once again to yield a final set of valuable edges, which we will refer to simply as the valuable edges.
Quality metrics and statistics
We report the Pearson correlation (r), mean absolute error (MAE), and root mean squared error (RMSE) based on the results of successful experiments, comparing observed and predicted values. Pearson correlation coefficients range from −1 to 1, with 0 indicating the poorest prediction and 1 representing the highest accuracy (only positive correlations are reported). Both MAE and RMSE serve as metrics that measure the deviation of predictions from observed values, and they are expressed in the same units as the data being evaluated.
The vector
To address the issue of multiple comparisons, individual p values were adjusted using the False Discovery Rate (FDR) method. Experiments that did not meet the specified threshold were excluded from further analysis.
We assessed the normality of data with the Shapiro–Wilk test. Based on the results of this test, we applied either t-test or Mann–Whitney test to assess the significance of difference between result distributions.
Prediction quality comparison between resting state and task EEG and robustness analysis
To evaluate the impact of task and resting state records on prediction outcomes, we conducted two types of analyses. First, we directly compared the values of quality metrics obtained from these two modes using either a t-test or a Mann–Whitney test. This comparison was carried out on two sets of results: those from the final predictions derived from the outer loop of cross-validation and those from the inner loop iterations of CV corresponding to the results of the outer loop.
Second, we assessed the stability of predictions in task and resting state modes through a lesioning approach. For each prediction result, we identified valuable edges and used them to re-predict memory scores in a standard LOOCV procedure. We then iteratively removed one valuable edge at a time and constructed predictions using the reduced set. The quality metrics from all lesioned runs were subsequently collected and compared between task and resting states to determine the statistical significance of any differences observed (Fig. 1).

Graphical representation of the study design.
Results
Participants’ information and behavioral data
A total number of participants enrolled to take part in the experiment was 86. The resting state EEG data were collected from 65 participants, while the task-related data were available only for 63 individuals (56 females, 7 males, aged 18–37 years, median = 20, interquartile range [IQR] = 1). Two participants were excluded due to data processing issues. Fifty-six individuals were right-handed, six participants showed left-hand preference, and the remaining two persons were ambidextrous. Handedness was assessed using the Annett Handedness Scale.
The working memory scores for different digit span lengths were as follows: for the 5-span, the median was 0.9 with an IQR of 0.12; for the 9-span, the median was 0.38 (IQR = 0.17); and for the 13-span, the median was 0.19 (IQR = 0.14). These distributions are visualized in Figure 2.

Raincloud plots showing probability density distributions of working memory scores for different digit span lengths accompanied with boxplots for corresponding distributions. The working memory score for each participant was determined by counting the number of correctly recalled digits prior to the first mistake, adjusted for the length of the span.
Comparison of prediction accuracy in resting state and task conditions
We conducted CPM modeling for digit sequences of varying lengths (5, 9, and 13 digits) using two different brain atlases and three distinct FC measures. The main results for 5, 9, and 13 digit span conditions are summarized in Table 1. All reported p values were FDR-adjusted.
Modeling Results for Resting State and Task-Based Functional Connectivity EEG Data
The findings are shown for two parcellation atlases and three connectivity metrics used in the study. The term «positive» refers to a positive association between functional connectivity in a specific frequency band and working memory score, while «negative» is used to indicate a negative correlation between these variables. Theta band: 4–8 Hz, low alpha: 8–10 Hz, high alpha: 10–13 Hz, low beta: 13–20 Hz, high beta: 20–30 Hz, and gamma band: 30–45 Hz.
imCoh, imaginary part of coherence; MAE, mean absolute error; PLV, phase lag index; RMSE, root mean squared error; wPLI, weighted phase lag index.
In the resting state data obtained from the Destrieux brain atlas, we found that prediction of task performance outcomes for a 5-digit task could be done using significant edges in the low beta range (r = 0.4, p = 0.0048). Some additional significant results were obtained when task-based FC data were employed. Utilizing imCoh as a FC measure, we were able to attain correlation coefficient value of 0.41 (p = 0.0048) in the low beta frequency range (13–20 Hz; Fig. 3), whereas valuable edges in the high beta rhythm (20–30 Hz) were predictive of working memory performance at the level of r = 0.32 when using PLV (p = 0.05). Among the selected imCoh edges, two exhibited connections from the left precentral gyrus to the left superior temporal cortex, other two connected right postcentral sulcus and right occipital cortex, while the remaining edges linked the left pericallosal sulcus to the right inferior occipital cortex and anterior insula in the right hemisphere with the left frontopolar cortex. The PLV-based edges were exclusively interhemispheric, featuring connections between left marginal sulcus (cingulate cortex) to right parieto-occipital and calcarine sulci. Alternatively, using the Desikan–Killiany brain parcellation with a reduced number of regions, significant results were obtained for the high beta ranges in the resting state condition (imCoh 20–30 Hz: r = 0.35, p = 0.012). In this frequency range, three valuable edges were found. The first edge linked the left temporal pole and the right middle temporal gyrus. The second one connected the right posterior cingulate and left lateral orbitofrontal cortices. The last valuable edge is coupled right precuneus and caudal middle frontal gyrus. In addition, task-based FC allowed for a prediction of working memory scores in the 10–13 Hz range (r = 0.32, p = 0.03). We identified four intrahemispheric valuable edges in this condition. In the right hemisphere, these were connections from transverse temporal to caudal anterior cingulate cortex, and from pars triangularis to parahippocampal gyrus. In the left hemisphere, superior parietal to middle temporal and pericalcarine to middle temporal edges were revealed.

In the condition with increased working memory demands (9 digits) resting state data analysis under Destrieux parcellation was able to reasonably predict task performance based on two frequency bands. The theta range exhibited a correlation coefficient value of 0.41 for negative edges (p = 0.0036). Gamma band showed both positive and negative valuable edges with wPLI-based positive edges giving r = 0.34, p = 0.036 and imCoh-based negative edges resulting in correlation values of r = 0.42, p = 0.003. A total of 14 negative edges were selected in the theta band (see Supplementary Table S1 for specific results). Five out of nine positive valuable edges featured connections involving circular insula. Two other prominent regions were the middle cingulate cortex and subparietal sulcus. Negative working memory predicting edges tended to cluster around the parietal cortex. Furthermore, all but one negative connections (seven out of eight) were specific to the left hemisphere (Supplementary Table S1).
When CPM was performed on FC matrices obtained during task execution, prediction accuracy was improved in terms of the number of models that gave positive correlations and the value of such correlations, while overall comparison showed no statistically significant difference between sets of quality metrics in rest and task. Specifically, the theta band positive edges demonstrated correlation between predicted and actual working memory (WM) scores of r = 0.46 (p = 0.0003). Among eight selected valuable edges, five involved cuneus and three featured calcarine sulcus. Overall, these connections mostly span occipito-parietal cortices. Moreover, both low and high alpha bands were shown to be predictive of cognitive task performance measures (imCoh 8–10 Hz: r = 0.41, p = 0.0018; PLV 8–10 Hz: r = 0.5, p = 0.0002 [Fig. 4]; PLV 10–13 Hz: r = 0.3, p = 0.026). In the specified EEG ranges, all PLV-based edges exhibited positive values, while imCoh-based edges displayed negative values. Notably, a significant majority of PLV-based connections across the entire alpha range were predominantly localized in parieto-occipital regions and cingulo-insular cortices. Conversely, imCoh low alpha connections prominently featured frontal nodes in conjunction with temporal and occipital regions. Furthermore, a distinct set of functional connections within the low beta band demonstrated a positive correlation with working memory capacity (r = 0.3, p = 0.026). Three valuable edges were retained, all centered around calcarine sulcus: right calcarine sulcus to the ipsilateral cuneus, left lunatus sulcus to the ipsilateral calcarine sulcus, and left calcarine sulcus to occipital middle gyrus.

Switching from Destrieux to Desikan–Killiany atlas resulted in a notable disappearance of gamma band significant edges and emergence of a more prominent focus on lower frequencies. Resting-state theta band negative edges demonstrated statistically significant correlations between predicted and observed WM scores (imCoh: r = 0.28, p = 0.03; wPLI: r = 0.3, p = 0.05). The only valuable edge for imCoh-based prediction was interhemispheric connection between the right superior parietal cortex and left postcentral gyrus. Meanwhile, six valuable edges were selected for wPLI-based model. These connections were widely distributed across the entire cortex and involved both hemispheres (see Supplementary Table S1). FC in the high alpha band during resting state could reasonably predict task outcomes (r = 0.36, p = 0.0075). In this case, the left transverse temporal cortex was connected to the right precuneus and right medial orbitofrontal cortex builded a link with left caudal anterior cingulate. Additionally, low beta range models were shown to contribute significantly to WM prediction (positive edges: r = 0.42, p = 0.0025; negative edges: r = 0.42, p = 0.0024). In terms of beta band connectivity, four valuable edges were identified for positive connections and three edges for negative ones. The selected positive edges mostly spanned fronto-central brain regions, including those on medial surface, whereas all negative connections linked inferior frontal cortex regions to temporale pole and precentral gyrus.
The only task-based connectivity model in 9-digit condition was developed in the high beta band (r = 0.44, p = 0.0012). Seven valuable edges without any specific preference for engagement in a particular brain lobe (Supplementary Table S2).
Finally, a condition with the highest mental workload of 13 digits was run. In this scenario, resting-state EEG data using Destrieux parcellation led to only one significant association between brain connectivity patterns and WM scores in the low alpha band (r = 0.31, p = 0.036). Notably, this predictive capability was achieved through two interhemispheric connections linking the right intraparietal area with the left middle frontal sulci and left anterior occipital sulcus to right parietal intermediate sulcus of Jensen. No predictive edges were identified with task-based EEG data. On the other hand, Desikan–Killiany parcellation’s main findings were confined to the beta EEG rhythm. Resting state data analysis within the 13–20 Hz range yielded a predictive accuracy of r = 0.32 for positive edges (p = 0.036) and r = 0.35 for high beta range based on task brain connectivity (p = 0.008; Fig. 5). The dominance of selected edges in the left hemisphere was evident for the 13–20 hz range. Three out of the four valuable edges included sagittally located cuneus and posterior cingulate cortex. Among the two positive connections that were retained during the task connectivity data analysis, the right IFG pars opercularis was linked to the insular cortex on the same side, while the left precuneus exhibited a connection with the right inferior parietal cortex.

Task/rest comparison and robustness analysis
We conducted a comparative analysis of results obtained from task-based and rest-based EEG recordings to evaluate the statistical significance of the differences between these two conditions. For this analysis, we focused on results that demonstrated a positive correlation between the observed and predicted working memory scores. Our approach involved a two-fold procedure: we compared the conditions based on the differences in quality metrics and the robustness of the predictions.
The comparison of quality metrics for the final predictions revealed no significant differences across all metrics, span lengths, and the combined results of the spans (p > 0.05). Given the limited size of the final result samples, we also repeated the analysis using data from the inner CV loop. In this scenario, all metrics for all spans (including combined spans) demonstrated p < 0.001, with the exception of the RMSE for the nine-span scenario, where p = 0.04. These mixed results create uncertainty regarding the existence of a meaningful difference in predictive power between rest and task conditions. However, the statistically significant findings from the inner loop analysis suggest a trend favoring the task condition for producing more accurate predictions across all spans.
Furthermore, we assessed the two conditions in terms of prediction robustness, specifically examining robustness to edge deletion. In this case, every span and metric yielded statistically significant differences (p < 0.001) in favor of the task condition (see Fig. 6 for correlation data and Supplementary Data for additional metrics). Additionally, we analyzed the number of valuable edges in both task and rest conditions and found no significant differences (p > 0.05 for all spans).

Comparison of lesioned task- and rest-based condition predictions. Each point represents the correlation value between the observed and predicted memory scores, with predictions made by removing one edge from a set of valuable edges. The black horizontal line indicates the median value. The results are presented for different experiment conditions.
Discussion
In this study, we compared the performance of models run on resting state and task-based EEG connectome data in predicting individuals’ working memory scores. We found that prediction accuracy varied significantly depending on the task difficulty, parcellation atlas, and FC measures used. The task set with 9 digits turned out to be the most predictive in terms of cognitive performance both in number of significant results and magnitude of prediction. Across different task and resting state settings, we observed that the alpha and beta frequency bands consistently demonstrated better modeling results, leading to a more precise prediction of working memory load. These results are in line with the available literature findings showing that alpha oscillations can be an integral part of a control mechanism over the sensory content of working memory representations (Bonnefond and Jensen, 2012; de Vries et al., 2020; Zanto et al., 2011). Moreover, it has also been demonstrated that alpha band connectivity between frontal and parietal brain areas may hold a key to adaptive working memory control (Chen et al., 2023). In general, brain alpha rhythm is commonly believed to implement inhibitory control over neural activity, shaping complex interactions between distant neural populations and giving rise to sophisticated intra- and internetwork balanced functioning (Jensen and Mazaheri, 2010; Klimesch, 2012). Notably, low (8–10 Hz) and high (10–13 Hz) alpha frequencies in our dataset differed in resultant modeling accuracy. Prognostic capacity of the low alpha range was overall higher than that of the high alpha. Earlier studies proposed that lower alpha range may be more concerned with attentive processes, whereas upper alpha frequencies tie more directly to mnestic functions (Klimesch, 1997).
We also discovered that beta band connectivity was highly predictive of working memory load. Prior studies have provided valuable insights regarding the computational roles that can be ascribed to this frequency band during cognitive task execution (Bogaerts et al., 2020; Engel and Fries, 2010). Increase of beta activity in temporal regions has previously been demonstrated for auditory working memory tasks (Chen and Huang, 2015; Leiberg et al., 2006). In our study, we showed an involvement of these regions as well. According to the state-of-the-art framework, detailing possible contribution of beta band computations to cognitive processes, this 13–30 Hz dynamics may reflect active maintenance of working memory representations (Schmidt et al., 2019). Both low (13–20 Hz) and high (20–30 Hz) beta bands in our study could predict working memory capacity reasonably well (up to r = 0.44). In a recent study, it was discovered that the power of low beta frequencies allowed researchers to successfully differentiate between successful and failed memory trials prior to stimulus onset (Scholz et al., 2017). Additionally, it has recently been reported that temporal predictions for sensory stimuli are linked to low beta activity (Betti et al., 2021). High beta band oscillations may serve similar functions as activity in this range is known to increase during cognitive tasks (Baravalle et al., 2018; Chen et al., 2024; Vecchio et al., 2022).
Theta oscillations (4–8 Hz) are also prominently featured in studies of working memory, both in relation to power and connectivity alterations during gradually increasing mental workload. This frequency range has long been known as being crucial for the formation of both short- and long-term memories (Herweg et al., 2020). Previous EEG studies emphasized the critical role played by theta rhythm in cognitive control in general and in working memory processing in particular (Cavanagh and Frank, 2014; Pavlov and Kotchoubey, 2022). In this study, we were able to show that the brain connectivity in the 4–8 Hz range was predictive of working memory performance in the nine-digit condition independent of the parcellation employed.
At the same time, we only found a couple of significant associations between gamma rhythm and working memory scores. Interestingly, both were identified in a resting state and when using the Destrieux atlas. It is well-known that gamma oscillations reflect local computational processes in neural ensembles residing in close proximity to each other, as opposed to slower wave oscillations that ensure synchronous operation of distantly located neuronal groups (Ray and Maunsell, 2015). Gamma rhythm may be a key oscillatory mechanism for grouping individual elements maintained in working memory at the peak of slower rhythms (McLelland and VanRullen, 2016). Destrieux atlas, which parcellates the cortex into smaller areas compared with Desikan–Killiany atlas, is likely better suited for detecting such local neuronal interactions. However, this hypothesis requires further experimental confirmation.
Given that we identified a significant influence of different brain atlases on the experimental results, it is pertinent to note that the choice of brain parcellation scheme is now an active area of investigation among EEG/MEG researchers. Considerable efforts are made in an attempt to mitigate the discrepancies in results obtained under different parcellations (Arslan et al., 2018; Messé, 2020; Popovych et al., 2021; Revell et al., 2022). The authors of the cited studies propose several solutions to this issue, including standardization through the development of universal standards for parceling methods; multiscale analysis that employs multiple parceling schemes to test the robustness of results; individualization that considers the unique characteristics of the brain when selecting parceling; and dynamic approaches that involve the creation of adaptive atlases that take into account the functional and dynamic aspects of the brain. The majority of the studies are conducted using fMRI, whereas EEG investigations are scarce. The rare exception is a study of Farahibozorg and colleagues who introduced adaptive cortical parcellation algorithms enabling researchers to determine the optimal number of parcels by minimizing leakage between them (Farahibozorg et al., 2018). In their study, they explicitly compared two such algorithms, both of which converged to a solution with around 70 cortical areas. Since our findings were heavily dependent on the brain atlas used, and considering the points mentioned above, it is possible that the Desikan–Killiany parcellation is less susceptible to the signal leakage and thus better suited for EEG data with low spatial resolution. Thus, the selection of a particular parcellation scheme constitutes a crucial determinant that significantly influences the ultimate outcomes of the study.
It is noteworthy that the selection of FC methods also strongly impacted the experimental results. We employed three different connectivity metrics (imCoh, wPLI, PLV) with their own unique ways of measuring a relationship between activation patterns of brain regions (Fraschini et al., 2020; Nolte et al., 2020). We did not find any patterns regarding better or worse predictive power of models built based on the specific FC method. Currently, there is no consensus among scientists about which FC methods are the most accurate and dependable for assessing neural connectivity (Bakhshayesh et al., 2019; Marquetand et al., 2019; Yoshinaga et al., 2020). It is conceivable that each of the methods we used can gauge different and specific aspects of neural communication between brain regions, with none considered superior to the others. Previous research has uncovered a wide range of complementary mechanisms that the brain can utilize to effectively execute cognitive processes, including those required for maintaining working memory (Miller et al., 2018; Zylberberg and Strowbridge, 2017). Future studies may explore recently developed sophisticated frameworks for measuring connectivity in an attempt to mitigate uncertainty related to method selection (Wang et al., 2018).
Finally, the main focus of this article was to compare predictive accuracy of models derived from EEG resting state and cognitive task FC data using CPM framework. CPM is a machine learning method that is now widely used for neuroimaging data with the goal of predicting cognitive outcomes, as well as other relevant behavioral and clinical variables (Gao et al., 2019; Yoo et al., 2018). Earlier studies employing CPM on fMRI data proved effective in precisely forecasting working memory outcomes and uncovering the neural mechanisms involved in task performance (Avery et al., 2020; Zhu et al., 2021). Additionally, a growing body of work indicates that task neuroimaging data may outperform resting state one in predicting brain–behavior associations (Gal et al., 2022associations (Gal et al., 2022; Greene et al., 2018; Zhao et al., 2023). To the best of our knowledge, our current study is a first attempt to explicitly apply CPM to EEG resting state and working memory task data. In general, based on the findings described above, we cannot conclusively state that task-based FC patterns consistently outperform resting state ones when it comes to the prediction of cognitive outcomes. Nevertheless, there was still a tendency for slightly better overall predictions based on task FC data in condition with 9 digits. It is conceivable that task engagement leads to less variable interindividual neural dynamics in comparison to resting state condition unrestrained by external cognitive demands, which might enable better predictive accuracy of the models (Finn, 2021). In contrast, in trials when working memory load increased up to 13 digits, we found that prediction accuracy based on resting state data was superior to that of task FC profiles (both in Destrieux and Desikan–Killiany atlases). We also found that conditions with 5 and 13 digits led to fewer statistically significant relationships between patterns of FC and working memory scores. A possible explanation for the observed results may be phenomena of cognitive overload for the condition with 13 digits and low cognitive demands of the condition with only 5 digits, which potentially can lead to a decrease in attention focusing, effort investment, and, as a consequence, participant’s disengagement from the task. This is indirectly supported by data from a recent study, where the authors employed pupillometry in addition to EEG (Kosachenko et al., 2023). The pupil diameter steadily increased with increasing cognitive load, reaching a peak at about 9 digits, followed by a marked decrease as the load increased. This phenomenon remains poorly understood in modern cognitive neuroscience and deserves closer examination.
It should additionally be noted that a wide range of personal characteristics, such as gender, age, educational background, occupational and social statuses, health-related issues, and the current functional state of the organism, can significantly affect FC profiles and ultimately moderate the relationship between neural activity and behavioral variables. Moreover, the type of task given to a participant can be considered a key factor in improving or worsening a model’s predictive ability. Systematic comparison of resting state and task-based data in terms of accuracy in predicting cognitive outcomes remains an underexplored area of research, especially in EEG studies. The preliminary results obtained in this study can be seen as an important step in that direction and require further replication on larger samples using different datasets before any broad conclusions can be drawn.
In our comparison of task and rest conditions, we encountered mixed results regarding the prediction quality and the prevalence of task conditions when assessing the robustness of the outcomes in relation to edge lesion manipulation. Notably, we found no significant differences between rest- and task-based results in terms of prediction quality metrics, whether assessed separately for each span or when aggregated across all spans. Conversely, a statistically significant difference emerged when we analyzed results from the inner loop of CV, where this distinction was evident for every quality metric and across all spans (reported in Supplementary Fig. S2).
Although it has been suggested that predictions based on task-related data may outperform those based on rest data, caution is warranted in interpreting the findings from the inner CV loop in support of this hypothesis, given that the final results ultimately demonstrated no discernible differences. Moreover, our robustness analysis yielded a clear outcome, revealing a statistically significant difference in prediction quality for lesioned sets of valuable edges. This difference was consistently observed across all spans and for every assessed quality metric.
However, the specific values for correlations, MAE, and RMSE should also be interpreted with caution. These metrics were derived from predictions based on valuable edges evaluated within the same dataset, thereby increasing the risk of overfitting. Nonetheless, the differences in predictions between task and rest conditions can still be regarded as valid measures, as overfitting is likely to similarly influence the quality metrics in both contexts. Our results demonstrated relatively high correlations in the task-based data, while correlations approached zero in the rest-based data.
We hypothesize that the valuable edges identified in the task-based experiments may exhibit greater robustness to edge manipulations; however, the underlying reasons for this robustness remain unclear. Initially, we speculated that this phenomenon could be attributed to a differing number of valuable edges obtained under rest and task conditions—suggesting that the removal of a single edge would have a more pronounced effect in scenarios with a smaller total number of edges. However, this hypothesis was rejected as our analysis revealed no significant differences in the number of valuable edges.
An alternative explanation may rest in the distribution of correlations between FC values and memory scores across the valuable edges. If the correlation weights for all edges are relatively uniform, the removal of a single edge would minimally impact the final results, particularly compared with a situation where a few edges significantly drive the prediction quality. Further research is needed to investigate whether such “most valuable” edges exist and how they influence outcomes, as well as to explore the neurophysiological mechanisms that delineate task from rest conditions.
Additionally, we observed the presence of clusters in the task-based results during the lesioning experiment. These clusters were clearly evident in the mixed span results, as well as in the 5- and 9-span data, although they were absent in the 13-span results. The median values of these clusters closely approximated those of the rest-based results, suggesting potential shared characteristics between these outcomes. However, further investigation is required to elucidate the implications of this observation.
Despite the overall promising results, which are consistent with the previous findings, it is worth mentioning several limitations of the current study. First, the lack of external validation in this study may limit the generalizability of the results obtained. Unfortunately, we were unable to find a suitable dataset that would allow us to attempt reproducing the experimental results. Second, in this study, the data analysis was limited to the frequency range of 1–45 Hz. Although this narrow focus on traditionally investigated EEG bands is conventional for EEG studies, it might prevent the discovery of novel mechanisms underlying optimal working memory performance in delta, high gamma or ultraslow oscillations, which may be relevant for cognitive computations, as has been previously shown in a number of studies (Carver et al., 2019; Demanuele et al., 2013; Rac-Lubashevsky and Kessler, 2018). Finally, it is important to note that the stringent criteria applied to valuable edges, stemming from the characteristics of the double-validation process—where an edge is excluded from the set of valuable edges if it is omitted in even a single iteration of cross-validation—might have impacted the results. Employing more lenient criteria for edge inclusion could lead to a greater number of valuable edges being identified, potentially altering the overall outcome.
Our analyses demonstrate that CPMs derived from both resting-state and task-based EEG connectivity reliably predict working memory performance, with alpha- and beta-band connections consistently emerging as key contributors. While neither task nor resting-state data universally outperformed the other in predictive accuracy, task-based connectivity exhibited enhanced robustness under specific load conditions, suggesting that controlled cognitive demands may refine relevant network features. Furthermore, we show that both parcellation schemes and connectivity metrics significantly influence model outcomes, highlighting the critical role of methodological choices in EEG-based predictive modeling. Together, these findings advance the use of EEG connectomics for probing and predicting cognitive function.
Footnotes
Authors’ Contributions
A.P.: Conceptualization, formal analysis, project administration, and writing—original draft. I.D.: Conceptualization, data curation, and writing—review and editing.
Ethics Approval Statement
Original study was conducted in accordance with the Declaration of Helsinki and was approved by the local ethics committee (Ural Federal University ethics committee).
Author Disclosure Statement
The authors declare no conflicts of interest.
Funding Information
All authors listed confirm that their research is supported by an institution that is primarily involved in education or research.
Supplementary Material
Supplementary Data
Supplementary Figure S1
Supplementary Figure S2
Supplementary Figure S3
Supplementary Figure S4
Supplementary Figure S5
Supplementary Figure S6
Supplementary Figure S7
Supplementary Figure S8
Supplementary Figure S9
Supplementary Table S1
Supplementary Table S2
References
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.
