Flexible brain transitions between hierarchical network segregation and integration predict human behavior

Cognition involves locally segregated and globally integrated processing. This process is hierarchically organized, linking to evidence from hierarchical modules in brain networks. However, it remains a mystery how flexible transitions between these hierarchical processes are associated with human behavior. Here, we used a multisource interference task and measured hierarchical segregation and integration across multiple levels. Our results show more flexible transitions between segregated and integrated brain states in the task state. Crucially, brain flexibility in resting and task states was associated with human behavior. To achieve a better performance, the resting brain is optimized to be more flexible, such that it is prepared to more efficiently switch into a task state where the brain needs less flexibility to stably perform the task. Our hierarchical modular analysis was more effective in detecting the alterations in functional organization and the phenotype of human behavior than graph-based network measures at a single level. between changes in functional flexibility and cognitive performance. The differences


Introduction
The brain is a complex network consisting of separate functional subsystems 1 . Successful cognitive behaviors require not only the relatively isolated communication within subsystems, i.e., functional segregation, but also the effectively global interaction between them, i.e., functional integration 2,3 . Recent studies have suggested that the functional segregation and integration of complex brain networks are associated with brain cognitive functions [4][5][6][7] . For example, higher segregation within the brain network has been linked to motor execution, and higher integration has been shown to underlie working memory 8 . In fact, complex brain networks dynamically reconfigure to adapt to the environment to flexibly support variable cognitive demands 8,9 . Dynamic brain network analyses can detect the temporal evolution in brain functional patterns and are believed to effectively capture relevant features of cognitive behaviors [10][11][12] . In principle, flexible transitions in brain network organization between segregated and integrated states support the efficient communication of brain network subsystems across local and global scales, which is essential for successful cognitive performance. Despite great progress in understanding the dynamic transition between segregation and integration at rest and during tasks 8,9,13,14 , how cognitive behaviors are associated with dynamic reconfigurations in large-scale brain functional organization is still not clear. Complex brain networks display adaptive modular structures across time 13,15 that involve strong functional connectivity (FC) within modules and relatively weak connectivity between them. This modular feature allows for an integrated process within modules and segregation between them 16,17 . Indeed, module-based network measures offer a powerful approach for characterizing segregation and integration in brain functional organization. Many groups have explored the relationship between modules of brain networks, cognitive functions and mental disorders 8,9,13,16,[18][19][20] . However, brain networks have a deeper signature of hierarchical modules within these structural and functional organizations [21][22][23][24][25] , where small modules are successively embedded within larger modules. This hierarchical organization provides several promising advantages regarding brain dynamics, including greater robustness, adaptivity and functional diversity 21,23,26 . The classic modular partition based on the modularity maximization method or previously defined modular partitions (e.g., functional subsystems) is performed at a single level 3 and is incapable of revealing the hierarchical modular organization 2,27,28 , which limits further inference about how the hierarchical segregated and integrated processes shape an individual's cognitive abilities. Recently, a nested-spectral partition (NSP) method based on eigenmodes was found to effectively detect hierarchical modules in brain networks 21 , and a concept of hierarchically nested segregation and integration was proposed based on these hierarchical modules. However, whether a hierarchical modular analysis can effectively detect more specific alterations in functional organization during task performance and how the brain enables the flexible transition between hierarchically segregated and integrated states to dynamically adapt to cognitive demands are still unclear.
In this study, we explored whether brain characteristics of flexible transitions between hierarchical segregation and integration during rest and task are associated with human cognitive behavior. We addressed this question using resting-and task-state functional magnetic resonance imaging (fMRI) data and a behavioral measure of response time (RT) by using a multisource interference task (MSIT), which reliably activates the localized cingulo-frontal-parietal cognitive network and is a useful task to study normal human cognition and psychiatric pathophysiology 29 . Using the NSP method to detect hierarchical modules in brain FC networks 21 , we first defined hierarchical segregation and integration and investigated specific alterations at the local and global scales in the task state. We then compared the temporally flexible transition between hierarchically segregated and integrated states in resting and task states. Finally, we tested whether the brain measures based on hierarchical modules captured more intrinsic phenotypes of human cognitive behavior than graph-based network measures at a single level.
We found that the brain resolved into a greater number of hierarchical modules resulting in higher segregation in the task state on the global scale and in most brain subsystems; conversely, the task state required a stronger integrated process in the brain control subsystem. The flexible transition between segregated and integrated states was significantly enhanced during task performance at the global and local scales. Furthermore, flexible brain transitions were an apparent biomarker for human cognitive behavior. Functional flexibility in the whole-brain network and default mode network (DMN) subsystem during rest was positively correlated with cognitive performance, and there were significantly negative correlations with the whole-brain network, dorsal attention, 4 limbic and visual subsystems in the task state. Meanwhile, alterations in functional flexibility between the task and resting states in the whole-brain network and most functional subsystems were robustly negatively related to cognitive performance. Crucially, these relationships to cognitive performance were not significant for graph-based network measures at a single level, suggesting the effectiveness of our method to study segregation and integration based on hierarchical modules in brain FC networks. Our results showed that flexible transitions between hierarchical segregation and integration during rest maintained an intrinsic ability to flexibly support successful cognitive task performance. In contrast, better human performance required stability in functional organization during task performance, which was achieved by effectively reconfiguring the functional organization in the transition from the resting to task states.

Results
Eighteen healthy participants were recruited to perform the MSIT according to the standard protocol [29][30][31] . RTs were recorded by the computer, and the coefficient of variation in task performance, that is, RT/(Stdev(RT)), was chosen as the primary behavioral measure of interest 32 . The brain was parcellated into 90 regions to construct dynamic FC networks with a sliding time window method, and negative connectivity was excluded. The functional modes (i.e., eigenvalues  and eigenvectors U ) were obtained from the eigenvalue decomposition in FC matrices, which were sorted in the descending order from  . Given the noise and finite size of fMRI data, few eigenvalues had negative values and were set as zero.

Hierarchical modular organization in brain functional networks
The NSP method successively detected the hierarchical modules in brain FC networks from low-order functional modes to high-order ones. Briefly, the group-averaged FC networks had the largest module (i.e., whole-brain network), and this was referred to as the first level, which corresponds to the first eigenvector with the same sign for each region (Figures 1a, b). In the second level, FC networks were partitioned into two large modules that corresponded to positive and negative signs in the second eigenvector. Each module in the second level was subdivided into two modules in the third level based on the negativity and positivity of eigenvector values (Figures 1a, b). The FC networks can be modularly partitioned into multiple levels with increasing order of functional modes, wherein the connection density and average link weights within large 5 modules were clearly higher than those between modules at the same level (Figure 1a), indicating that the functional modes reflected the hierarchical modular partition in brain FC networks, especially low-order modes corresponding to pronounced modular levels. The difference in module number between task and resting states in each level across all subjects, where the module number is significantly increased from the 5 th to 19 th levels (red range; two-sample t-test, p<0.05). (d) The comparison of the contribution (i.e., eigenvalue) in the first level (left panel) and that summed from the 2 nd to 90 th levels (right panel) in resting and task states. Here, "**" represents p<0.01 (two-sample t-test).

Alterations in hierarchical segregation and integration in the task state
Hierarchical modular detection by the NSP method includes the physical foundation concept that regions within a module are more likely to be coactivated to produce functional integration, and regions between modules are oppositely activated to generate segregation 21 . The first level contains one module corresponding to the whole-brain network, wherein all regions with the same 6 sign of eigenvector values are cooperatively activated to produce the global integration. This globally coactivated pattern is crucial for communication between regions across the whole-brain network and requires the highest contribution (i.e., the largest eigenvalue, see Supplementary We observed that the contribution in the first level with one module was significantly decreased in the task state ( Figure 1d, left panel), indicating a decreased degree of global integration in brain FC networks. Meanwhile, the module number was significantly increased at specific levels (from the 5 th to 19 th levels, see Figure 1c and Supplementary Figure 2), indicating that the brain recruited more hierarchical modules in FC networks during task performance. In addition, in the high-order levels (i.e., from 2 nd to N th ), the total contribution was significantly enhanced (Figure 1d and Supplementary Figure 1), revealing that the levels with increased modules were more dominant in the task state. These results showed that the brain generates less global integration and more hierarchical segregation to match the functional demand of cognitive tasks.
To further confirm the above results, we proposed a measure of hierarchical segregation and integration by multiplying the contribution to the corresponding module number (i.e., weighted While the higher-order modes (i.e., from 2 nd to N th ) were more dominated with larger module numbers and contributions, the FC network was sparely connected and preferred segregation  To test the reasonableness of the hierarchical segregation and integration (i.e.,  higher segregated process in these subsystems. In contrast, the control subsystem showed decreased F H during the task state, reflecting a stronger integrated process. Thus, while the brain needed a more segregated process across the whole network to perform the task, the control subsystem maintained higher integration to effectively handle cognitive demand during the task.

Greater flexibility in transitions between segregated and integrated states during the task
The functional organization of the brain is dynamically reconfiguring during rest and task performance, wherein the flexible transition between segregated and integrated states was shown to be a significant signature for many cognitive abilities 13,[39][40][41] . When all functional subsystems are temporally cooperatively activated, brain functional organization is in an integrated state with low and a higher F reflects a stronger transition between segregated and integrated states.
Apparently, the functional organization during the task more flexibly transitioned between segregated and integrated states than during rest (Figure 4a), as confirmed by the significantly increased functional flexibility (see Figure 4c for the whole-brain network), indicating that brain functional subsystems are more isolated and operated to flexibly transition between segregated and integrated states during the task state. Meanwhile, increased functional flexibility in the task state was also observed in all functional subsystems except for the limbic subsystem (Figure 4c  of functional flexibility between resting and task states for the whole-brain network and seven functional subsystems, wherein "*" is a significant difference (two-sample t-test, p<0.05, FDR 11 corrected) and "**" represents p<0.01.

Functional flexibility predicts cognitive performance
Since the resting analysis can reveal the 'intrinsic'/context-independent functional organization of the brain and has been linked to many cognitive abilities 9,13,20,40 , we next tested whether the intrinsically flexible transition in functional organization during rest can predict human cognitive performance. The intrinsic functional flexibility Rest Task F was significantly higher in these functional subsystems than that in the whole-brain network, indicating that the localized functional patterns captured more dynamic phenotype of human behavior due to the robust activation of local neural circuits during MSIT performance.
Conversely, the functional flexibility Task F of these subsystems and whole-brain network was positively correlated to RT/(Stdev(RT)) (Supplementary Figure 6), revealing that brains with higher functional flexibility in the task state were associated with worse cognitive performance.
Brains with more efficient switching from resting to task states were shown to be associated with higher cognitive abilities 9,13,20,40 , and thus, it was important to subsequently investigate the correlation between changes in functional flexibility and cognitive performance. The differences 12 in flexibility Rest    Task F F F measures switching efficiency in brain functional organization from resting to task states, and a smaller F reflects more efficient switching. The differences in flexibility F was extremely correlated to the RT/(Stdev(RT)) in the whole-brain network (Figure 5c), and it was also significant in the DMN, dorsal attention, ventral attention, limbic and visual subsystems (Figure 5f), indicating that the differences in flexibility F was a robust biomarker for human cognitive behavior. More importantly, the differences in flexibility in the whole-brain network and significant subsystems were positively correlated to the RT/(Stdev(RT)) ( Figure 5c and Supplementary Figure 6), revealing that the weaker changes in brain functional flexibility in the task state corresponded to better performance. This result provides further evidence that brains with more efficient switching from resting to task states were associated with better cognitive performance. Notably, when functional flexibility was measured by the standard variance in modularity or participation coefficient, Rest F , Task F and F were not statistically correlated to RT/(Stdev(RT)) 13 (see Supplementary Figure 7 and Table 1), indicating that our measures based on hierarchical modules in FC networks more effectively captured phenotypes of cognitive performance than classic graph-based network measures at a single level.
Overall, these results confirmed that, based on the hierarchical modules in FC networks, the flexible brain transition between segregated and integrated states is an effective biomarker for human cognitive behavior. Brains that are inefficient in transitioning between segregated and integrated states during rest require more effort to switch to a task state, and subsequently are associated with worse cognitive performance.

Discussion
In this study, we investigated the relationship between the dynamic reconfiguration of brain functional organization and human cognitive behavior. We proposed a hierarchical measure of network segregation and integration based on hierarchical modules in brain FC networks. Our results showed that brain FC networks dynamically reconfigure their hierarchical modular organization to generate higher segregation at the global scale and most functional subsystems in the task state. In contrast, the brain control subsystem shows stronger integration. Through a dynamic connectivity analysis, we found that brain functional organization more flexibly transitions between segregated and integrated states at global and local scales during task performance than during rest. In addition, we observed strong correlations between flexible transitions in the brain's functional organization and human cognitive performance. Specifically, intrinsic flexibility in the resting state in the whole-brain network and DMN subsystem was positively correlated with cognitive performance, and flexibility in the task state in whole-brain network, dorsal attention, limbic, and visual subsystems was negatively correlated with cognitive performance. Differences in flexibility between task and resting states in the whole-brain network, DMN, dorsal attention, ventral attention, limbic and visual subsystems were negatively related to cognitive performance. Most importantly, these associations with cognitive performance were not observed with graph-based network measures (i.e., modularity and participation coefficient) at a single level. Our results suggest an effective method to study functional segregation and integration by stressing hierarchical modules in brain FC networks and greatly promote the understanding of the relationship between cognitive functions and dynamical reconfiguration of 14 brain functional organization across different brain states.

Hierarchical modules in brain functional organization
Emerging evidence has suggested that the hierarchical modular structure of brain networks may index changes in neural activity patterns underlying critical aspects of cognition and provide clinically relevant information [21][22][23]25,26 . There is growing interest in the hierarchical modular structure of brain networks as a new approach to understand information processing across different brain states and disease states. However, the current modular partition approach mainly focuses on one level of analysis 27 , which cannot detect the multiple levels of information contained in brain networks. Recently, we found that network eigenmodes can effectively reflect the pronounced modular partitioning in brain structural networks and artificial hierarchical networks across multiple levels 21 , and the NSP method was successively proposed to detect the hierarchical modules in complex brain networks. With the NSP method, we demonstrated that the hierarchical modules in the brain structural network provide a large capacity for functional diversity 21 . From a methodological viewpoint, the NSP method based on orthogonal eigenmodes has a natural physical foundation that regions within a module at a specific level are likely to be cooperatively activated to generate efficient communication. This is in line with the traditional concept of modules that supports more efficient communication within modules 27 , and as such, our indexes are highly correlated with the modularity and participation coefficients. However, compared to the traditional method at a single level 22,23,27 , the NSP method detects the modules in hierarchical levels that correspond to eigenmodes with different orders. Here, we utilized the NSP method to detect the hierarchical modules in brain FC networks across resting and task states and proposed a novel definition (i.e., F H ) to measure hierarchical segregation and integration. Our measures are more sensitive to the detection of individual subtle changes in functional organization at the task state and more effectively detect the phenotypes of human cognitive behavior than classic graph-based network measures ( Figure 5 and Supplementary Figures 6-7).
Thus, our method across multiple levels is intrinsically different from graph-based network analysis at a single level. Indeed, brain functional segregation and integration reflect the competition between information communicating processes in local and global networks 16,42 . In the framework of hierarchical modular analysis, global communication is extracted at the first level. As the level-order increases, more localized information communication within small modules is formed, allowing higher segregation. This detection of local information communication among smaller modules in deeper levels is intrinsically different from graph-based network analysis at a single level and provides our method with intrinsic advantages to capture the brain signatures of human cognitive behavior. Therefore, this work highlights the important role of hierarchical modules in studying segregation and integration and provides a sufficiently effective method to analyze brain functional organization and its relation to cognitive abilities.

Decreased brain network global integration at the task state
Brain regions within network modules are tightly connected to support efficient communication, but the brain also needs enough strong information flow between them, which eliminates the modules 16,42 . This competition among modules in brain functional organization is dynamically adjusted to support cognitive functions that involve alterations in functional segregation and integration 13,15 and allows highly flexible information communication across local and global scales. Indeed, different cognitive tasks have heterogeneous demands regarding segregated and integrated brain network processes 13,16,[43][44][45][46] . For example, a previous study found increased segregation underlying successful motor execution and increased integration underlying successful working memory 8 . According to Chen and Deem's theory 47 , simple tasks require highly modular architectures, which can be completed in a short time and draw mainly on a specific module (or functional subsystem). Here, we found a higher degree of segregation in the whole-brain network in the task state, which was a result of more hierarchical modules.
Furthermore, even though most brain subsystems show higher levels of segregation, the control subsystem had higher levels of integration to maintain stable performance in the task state. The MSIT reliably and robustly activates the cingulo-frontal-parietal regions of the brain implicated in processes of executive attention 29,30 , which are mainly contained within the control subsystem. As a simple cognitive task, the MSIT mainly engages the control subsystem to perform the task, and this consequently produces higher segregation in the whole-brain network. This finding provided further evidence supporting Chen and Deem's theory. In fact, the MSIT has been widely adopted to train the cognitive executive function in attention-deficit/hyperactivity disorder (ADHD) patients 48 and heart failure (HF) patients 49 . Our work revealed a specific response of the control 16 subsystem in the brain and may be helpful for the evaluation of cognitive functions.

Higher flexible transitions during rest support better cognitive performance
The intrinsic properties of brain functional organization at rest constrain the cognitive performance of human behavior 10 . The resting state analysis, independent of specific tasks, provides outstanding advantages in predicting intrinsic cognitive abilities 13,40,50 . For example, pain-free resting states can predict individual pain sensitivity without applying any painful stimulation, which has implications for translational research and the development and assessment of analgesic treatment strategies 50 . In fact, functional patterns during rest mirror part of task-induced activity patterns and predict behavioral performance 13,40,50 , although the signature is not always obvious due to the lack of specific neural responses to tasks. Here, we found a significant correlation between intrinsic functional flexibility Re st F in the resting state and cognitive performance, and thus, the flexible transition between hierarchical segregation and integration in functional organization may be another intrinsic signature for cognitive performance.
Intrinsic flexibility was positively related to cognitive performance in the whole-brain network, indicating that brains with higher rates of reconfiguration of functional organization in the resting state was associated with better task performance. Indeed, a possible explanation is that brain functional organization in the resting state should be flexibly reconfigurable to quickly switch to the task state to support ongoing task performance 51 . Several studies have found that the reconfiguration of functional organization during rest was positively related to attention level, and the ability to reconfigure can be decreased by high levels of fatigue 52 . In addition, drug-induced arousal also resulted in increased reconfiguration in dynamic FC 53 , indicating that the normal brain in the resting state may need highly flexible reconfiguration in functional organization. Here, we provided further evidence that the resting brain maintains fast reconfiguration to prepare for better cognitive task performance.
We also found that at the local scale, the DMN was the only functional subsystem with a significant association with human cognitive performance. The DMN is specifically interesting since it is highly active during rest but becomes deactivated during task performance [54][55][56] . In the resting state, DMN subregions have high degrees of connectivity and actively regulate information communication across local and global scales. This activity is related to many cognitive abilities and brain disorders 57 . However, the special role of the DMN in brain cognition is not completely clear and needs ongoing investigation. Here, we showed that the intrinsic flexibility of the DMN was positively associated with cognitive performance, indicating that more flexible information communication within the DMN contributed to better cognitive performance. Furthermore, we found that the DMN and whole-brain network had the most similar levels of flexibility in the resting state compared to other brain functional subsystems (see Figure S8), indicating that the DMN may capture the main signature of functional flexibility in the whole-brain network. As a result, the DMN and whole-brain network have similar significant relationships to cognitive performance. Therefore, our results may indicate that the DMN is crucially important for the resting brain to maintain highly flexible transitions between localized processing and global integrated processing that is necessary for better human cognitive performance.

Higher flexibility in the task state constrains cognitive performance
As a neural response to tasks, the brain needs faster reconfiguration in functional organization to process information in a timely manner to support better cognitive performance. Previous study has found increased reconfiguration of functional organization in task states compared to the resting state 39 , and we also found a similar result in that the brain in the task state needs faster transitions between segregated and integrated states on local and global scales. Thus, even though functional subsystems have different responses to the task in term of segregation and integration, they all need fast reconfiguration to support cognitive demand. However, higher flexibility may not always benefit cognitive performance. In fact, we observed that brains with higher functional flexibility in the task state had worse cognitive performance. A possible explanation for this phenomenon is that to effectively and stably process the information in the task state, the brain needs to maintain the stability in the dynamic functional organization 10 . Several previous studies have supported this hypothesis. It has been found that brains with more stable dynamic connectivity during tasks were associated with better performance 39,41 , and this stability was higher in the speeded condition 39 . Furthermore, higher stability in the functional organization was related to execution difficulty and better attention abilities 40 and more intelligence 13 . Here, we found that the global flexibility in the task state is slightly negatively related to cognitive performance, but the functional flexibility in the dorsal attention, limbic and visual subsystems 18 was more negatively correlated with cognitive performance. Especially, the functional flexibility in the limbic subsystem was most correlated to task performance ( Figure 5E). Indeed, even for a simple cognitive task (MSIT), the subjects still needed a complex neural process to identify when attention was distracted and press the button. Our results indicated that better cognitive performance relies on the stability of information communication around local and global networks, and the dynamic reconfiguration in the limbic subnetwork may most effectively reflect the neural process during task performance.

Efficient state transitions allow higher cognitive ability
It is a long-standing hypothesis that the resting brain is vigilant and able to switch to a task state in a timely manner to support better cognitive performance. Thus, the more efficient transition from resting to task states is thought to be associated with higher cognitive abilities. This hypothesis has been gradually verified in multiple cognitive tasks 9,58,59 . By using FC similarity between resting and task states to measure the cognitive state transition efficiency, Schultz and Cole confirmed that a more efficient transition corresponded to better performance in language, reasoning and working memory tasks 9 , and Harrewijn et al. also found that a more efficient brain was related to greater bias towards threat in children 59 . This phenomenon has further been observed at the broader scale of cognitive ability, i.e., general intelligence 9 . Furthermore, the efficient state transitions are decreased in older as compared to younger adults 60,61 . Interestingly, we also found that the differences in flexibility between task and resting states was positively related to cognitive performance in the whole-brain network and multiple functional subsystems (Figures 5c, f), indicating that the brain with a more efficient transition from resting to task states supports better task performance. However, previous studies were performed at a single level and did not observe that the correlation between FC similarity and cognitive performance was driven by either the resting state or task state 9,59 . Our analysis was performed at hierarchical levels and found that for the whole-brain network, global flexibility in the resting and task states was associated with cognitive performance ( Figure 5). These phenomena were different from previous findings and suggested that high intrinsic flexibility provides the brain with the ability to efficiently switch from resting to task states, and the efficient state transition is driven by functional patterns in both resting and task states. Therefore, our results further enhance the understanding of efficient brains 19 in that high flexibility for transitioning during rest allows the brain to switch to task states more easily. As a result, an efficient brain obtains higher stability in functional organization allowing stable, successful performance of cognitive tasks.
In conclusion, our results based on a hierarchical modular structure in FC networks provide a systemic understanding of how brain functional organization dynamically switches between segregated and integrated states to support successful cognitive behaviors in terms of resting and task states. The resting brain is optimized to maintain a state with high levels of functional transitions between segregated and integrated states and prepared to most efficiently transition to the task state. This optimized switch in states allows the brain to stably process neural information during tasks to enhance performance.

Limitation of the study
The small sample size may be a limitation. Indeed, studies with different sample sizes may extract inconsistent observations [62][63][64] . Our results provide systemic and reasonable relationships between brain flexibility and human cognitive behavior, and part of the results were consistent with previous findings. However, a larger sample size would be expected to enhance these relationships and reveal more neural signatures of human behavior. The second limitation is the single task (MSIT) that reliably and robustly activates the control subsystem. Thus, the relationship between brain flexibility and human behavior should be examined in the context of more complex cognitive tasks, especially considering the heterogeneity in brain responses to cognitive tasks with different complexity 8 . Additional investigations would be valuable to further elucidate the cognitive mechanisms underlying flexible transitions between different states in the brain. Finally, this work focused on normal people, but brain disorders can change functional patterns 37,41 . It would be interesting to further investigate whether these relationships between brain flexibility and cognitive behaviors are maintained in those with brain disorders.

Participations
Eighteen subjects (mean age: 29.3 years, range: 20-49 years) participated in the experiment. All subjects were healthy without a history of neurological or psychiatric episodes. The participants 20 gave written informed consent, and the protocol was approved by the ethics committee of the First Affiliated Hospital of Xi'an Jiaotong University, China.

Multisource interference task (MSIT)
The MSIT was performed according to the standard protocol developed by Bush and colleagues 30 , and the detailed procedure can be found in Refs. [29,31]. Briefly, the task involved trials with four numbers (1,2,3,0) shown in the center of the screen. The participants were required to identify the target number (1, 2 or 3) by pressing one of three buttons, which corresponded to 1, 2 and 3, respectively. There were only three control task trials (100, 020 and 003) with distracter zeros, The response times (RTs) were automatically.

MRI data acquisition
All images were acquired using a 3.0T whole-body scanner (GE Signa HDxt, Milwaukee, WI, USA) equipped with an 8-channel head receiver coil. Head movement was restricted using a pillow and foam, and earplugs were used to minimize scanner noise and maximize patient comfort.
A three-dimensional T1-weighted fast spoiled gradient echo (FSPGR) sequence covering the whole brain was performed to coregister functional data and define regions of interest (ROIs),

fMRI data processing
The fMRI data were pre-processed using AFNI (http://afni.nimh.nih.gov/afni/) and FSL (http://www.fmrib.ox.ac.uk/fsl/) according to standard pre-processing protocols 32 , and the first four volumes were excluded from the analysis to ensure the initial stabilization of the fMRI signal.
To minimize the motion effects, previous study suggests that each framewise displacement (FD) exceed the 0.5 mm should be censored 65 . We found that the mean FD across 18 subjects was 0.023  0.006 mm in the resting state and 0.019  0.006 mm in the task state, significantly smaller than the standard value (0.5 mm). Echo-planar imaging (EPI) images were motion and slice-time corrected and spatially smoothed using a Gaussian kernel of 6 mm full width at half maximum (FWHM). The temporal bandpass filtering 0.01 Hz < f < 0.1 Hz was performed to reduce the effects of low-frequency drift and high-frequency physiological noise. In addition, several sources of nuisance covariates were eliminated using linear regression: 1) 6 rigid body motion correction parameters and 2) the signal from the white matter and the signal from a ventricle ROI. Note that the global component of the fMRI fluctuations measured during the resting state is tightly coupled with the underlying neural activity 66 , and the use of global signal regression as a pre-processing step in fMRI analyses remains controversial and is not universally recommended 66 . Therefore, the global whole-brain signal was not removed in this analysis, and some fMRI signals may inevitably have originated from sources other than brain activity and interactions.
The brain was parcellated into N=90 regions according to the automated anatomical labeling (AAL) atlas 67 , and each region was regarded as a node in brain FC networks. To perform the dynamic connectivity analysis, the sliding time window method was used to construct temporally dynamic FC networks. The fMRI signals of regions were first divided into 120 windows with a sliding step of 2.5 s (1 point) and a window width of 75 s (30 points) 68 . Then, the FC between regions was obtained by computing the Pearson correlation coefficient between sliced fMRI time series. Since the global whole-brain signal was not regressed, most connectivity in FC matrices was positive (80.13 % in the resting state and 79.88 % in the task state). All dynamic FC matrices in each group were averaged to obtain the group-averaged FC matrices (Figure 1a). The negative 22 connectivity in FC matrices was set to zero, and the diagonal elements were kept to one while computing the hierarchical measures.

Nested-spectral partition (NSP) method
Eigenmode-based analysis has been successfully applied to complex networks 21,38,69 . The FC matrix C can be decomposed into Recursively, the hierarchical modular partition was further performed in higher-order modes until to the level wherein each module contains only one region. During the partition process, the module number M in each level was obtained, and regions were optimally reordered.

Measures of hierarchical segregation and integration
Hierarchical modules in brain FC networks indicate the hierarchical segregated and integrated processes in a nested manner across multiple levels. At a specific level, regions within a module having the same sign of eigenvector component (e.g., negative or positive) are jointly activated to form the integration among them, whereas the opposite activation (e.g., negative and positive signs) of regions generates the segregation between modules. Thus, integrating small modules at a high-order level (e.g., th i level) form a large module at the lower-order level (i.e.,   1 th  i 23 level), which further generates the segregation between this large module and other large modules at this lower-order level. This hierarchically segregated and integrated activity reflected by eigenmodes has the contribution  to FC networks. The first level in the FC network has only one single module involving all regions, reflecting the global integration to allow effective communication across the whole brain and thus requires the largest contribution. The second level with two modules supports the strong communication and specialized process within two modules and weaker cooperation between them and thus requires less contribution compared to the first global mode. Consequently, higher-order modes with more modules and smaller modular sizes relate to deeper levels of finer segregated process, generating more localized information flow and coordination, accompanied by lower contributions  . Specifically, the levels with the highest module number allow completely segregated process and require very small contributions. Thus, the functional modes with larger module numbers generate stronger segregation and smaller-scale local integration, corresponding to weaker contributions to the functional organization.
Consistent with the traditional concept of modularity, modules at a given level support the segregation between them and local integration within them. A larger module number M (detected from the NSP method, normalized into [0 1] by dividing N ) reflects higher segregation and smaller local integration at this level. Since this segregated and integrated process has the contribution  to the functional organization, we multiplied the module number M and contribution  to reflect the hierarchical segregated and integrated interactions at each level: Here, i M is the module number in the th i level, and  i is the corresponding contribution (i.e., eigenvalue). Real FC networks contained small negative eigenvalues that have little effect on results and thus were set to zero. The hierarchical segregation and integration in FC networks was defined across all levels: where ij u is the eigenvector value of the jth region in the ith functional mode. Then, the j F H of regions involved in a functional subsystem were averaged to measure the hierarchical segregation and integration of this subsystem.

Graph-based network measures
To compare the results between graph-based network measures and hierarchical measures of functional segregation and integration in FC networks, the modularity and participation coefficient were also computed. The modules in FC networks were detected with a modularity maximization method at a single level, which maximizes the modularity quality function 27 . The modularity Q in undirected weighted networks is defined as follows: . The modularity Q quantifies the degree to which a network is decomposed into densely connected modules, and a larger Q reflects denser modules and higher segregation.
The participation coefficient quantifies the degree to which a node is connected to other nodes across diverse modules; its definition for a node is as follows:  

Data availability
The datasets generated during the current study are available at https://data.mendeley.com/drafts/j4nr4dgppv.

Code availability
The code used in this study is available upon request.