## Abstract

The capacity of the brain to adaptively and flexibly reconfigure into different network connectivity patterns may underlie general cognitive ability, or g. Network reconfiguration can be captured via assessments of dynamic connectivity (dFC), which quantifies dominant temporally recurrent connectivity patterns, or “states”, common across the population. While standard dynamic measures focus on quantifying relative time spent within states, or the probability transitioning between states, these metrics fail to capture variability between individuals present in connectivity patterns across states. Here, we provide individualized assessments of connectivity flexibility and stability over time by considering within-state pattern stability, the difference in patterns across state transitions, and how well a given state represents the “typical” state in a particular individual. We leveraged resting-state fMRI data from the large-scale Human Connectome Project and data-driven multivariate Partial Least Squares Correlation to examine emergent relationships between dynamic network properties and cognition. We found that higher g was associated with maintaining distinct states over other states, efficient reconfiguration (i.e., less pattern change during common small-magnitude state transitions such as a state to itself, and greater pattern change among rare transitions between very different states), and less reconfiguration away from population-typical patterns. These results demonstrate that higher cognitive abilities are associated with greater state-specific stability, greater connectivity differences when transitioning between distinct states, and reconfiguration into more typical, potentially optimal, connectivity patterns within states. This suggests a link between general cognition and the efficiency of reconfiguration connectivity patterns into stable, well-defined, and typical network states.

**Significance Statement** Cognitive performance can be summarized by a general capability - “g”. g has been associated with academic and professional achievement and is critical in a world where higher-order cognition is increasingly necessary to excel. Attempts to improve g are hampered by a lack of mechanistic understanding. A recent theory suggests that the capacity to reconfigure brain connectivity drives g. We investigate metrics which characterize switches in recurring dominant connectivity patterns and propose novel metrics which investigate connectivity changes during the switches and connectivity pattern deviation from the population. Our findings suggest that g is associated with the maintenance of special patterns, greater pattern changes when necessary, and having population-typical patterns. This advances our understanding of g and informs future interventions.

## 1) Introduction

The g-factor (g) measures general capacity across cognitive domains (Spearman, 1961). Estimates of g can be obtained by summarizing diverse cognitive tests (Gignac and Bates, 2017). Lower general capacity is associated with unfavorable outcomes like incarceration and poverty (Gottfredson, 2002, 2003), whereas higher values relate to physical and mental health, academic and professional success, and longevity (Terman, 1954; Whalley and Deary, 2001). Moreover, genetic analyses suggest that such effects can be intergenerational (Panizzon et al., 2014). Since g measures general capacity, it is thought to be driven by common neurobiology across cognitive abilities (Barbey, 2018).

The Network Neuroscience Theory of Human Intelligence (Barbey, 2018) hypothesizes that g arises from the capacity to adaptively reconfigure brain networks. Traditionally, brain networks are examined via functional connectivity (FC), calculated by correlating fMRI signals between brain regions across extended time. In contrast, time-varying dynamic FC (dFC) characterizes FC evolution using FC calculated in segments of the fMRI timeseries - the dFC(*t*) at each temporal segment *t* (Hutchison et al., 2013). dFC therefore allows us to examine individual capacity to reconfigure brain networks and relate this capacity to cognitive ability (Barbey, 2018; Girn et al., 2019).

dFC(*t*) from all *t* can be clustered into different “states” characterized by the recurring FC configuration that dominates each *t* (Cabral et al., 2017). Dynamic switches between states characterize network reconfiguration, and the frequency of state changes or FC variability while maintaining a state can be used to define network flexibility. Girn et al. (2019) suggested that this network flexibility definition might relate to g, as maintenance of states with low FC strength with high FC variability relates to better performance in executive function domains (Nomi et al., 2017). However, Hilger et al. (2020) found that higher general intelligence quotient (IQ) relates to modular stability across dFC(*t*). Specific state changes have also been related to a range of cognitive metrics - such as general cognitive integrity (Cabral et al., 2017), and verbal reasoning and visuospatial ability (Xia et al., 2019).

During time points dominated by the same state, minor variability in connectivity remains. Differences in FC within or between states can be evaluated via distance metrics, where lower distance represents greater similarity across timepoints. Average distance traveled was found to be positively correlated with visuomotor performance by Battaglia et al. (2020).

However, they also showed that the dFC(*t*) trajectory consists of repeated short jumps (“knots”, presumably state maintenance) and distant jumps (“leaps”, presumably state changes). Recent work has also highlighted how “typicality” or “idiosyncrasy” of brain activity (in comparison to the general population) may relate to cognition (Hahamy et al., 2015; Hawco et al., 2020; Gallucci et al., 2022), suggesting that group averages reflect optimal patterns evolutionarily selected for across the population. Characteristics of dFC(*t*) reconfiguration during short and distant jumps, and maintaining dFC(*t*) near optimal state configurations might facilitate cognitive processing and improve g.

This study explores relationships between dynamic reconfiguration and g using a series of standard and novel metrics, including frequency of state entrances and switching, distance during state maintenance and transitions, and state idiosyncrasy. In addition to a univariate approach which captures g a priori, we used more data-driven Partial Least Squares Correlation (PLSC; Wold, 1982). PLSC is a multivariate approach which identifies latent variables (LVs) capturing the greatest covariance between two matrices; in this case, cognitive tests and dFC reconfiguration metrics (Wold, 1982; McIntosh et al., 1996; McIntosh and Lobaugh, 2004). By including all cognitive tests in the PLSC, we can consider if g emerges as a property of network configuration (i.e., we identify a latent variable with large loading on many/most cognitive tests), as well as identify additional LVs related to specific cognitive domains such as processing speed or working memory (Agelink van Rentergem et al., 2020). We hypothesized that associations would exist between g and network reconfiguration metrics (i.e., state dynamics, transition distance, and idiosyncrasy).

## 2) Materials and Methods

### 2.1) Participants and Data

Data was obtained from the Human Connectome Project 1200 release (HCP1200) (Smith et al., 2013). The sample consisted of 950 participants (male = 448, age = 28.7 ± 3.70) with all four 3T resting-state fMRI (rsfMRI) scans, all 10 selected cognitive test scores, and mean relative framewise displacement (FD) < 0.2 in each scan.

### 2.2) Cognitive Domain Scores

We selected 10 cognitive tests used in a factor analysis on HCP data by Dubois et al. (2018) to derive *g*. These include Dimensional Change Card Sort (CardSort), Flanker Inhibitory Control and Attention (Flanker), List Sorting Working Memory (ListSort), Picture Sequence Memory (PicSeq), Picture Vocabulary (PicVoc), Pattern Comparison Processing Speed (ProcSpeed), and Oral Reading Recognition (ReadEng) from the NIH Toolbox (http://www.nihtoolbox.org), and Penn Progressive Matrices (PMAT24), Penn Word Memory (WordMem), and Variable Short Penn Line Orientation (LineOrient) (Gur et al., 2010) from the Penn Computerized Neurocognitive Battery. Given contention in factor analyses (Agelink van Rentergem et al., 2020), we estimated g by the first principal component (PC) from Principal Component Analysis (PCA) similar to Trampush et al. (2017).

### 2.3) fMRI Collection & Preprocessing

3T resting-state fMRI (rsfMRI) acquisition and preprocessing details can be found in the original publications (Smith et al., 2013; Salimi-Khorshidi et al., 2014). In brief, rsfMRI data was collected over two sessions (one per day) and two 15 min runs that differed in phase-encoding direction (left-right and right-left). Participants were instructed to lie still and fixate on a central cross. A multiband slice acquisition sequence was done using 3T MRI Siemens “Skyra” scanner (TR = 720 ms, TE = 33 ms, flip angle = 52°, voxel size = 2 mm isotropic, 72 slices at multiband acceleration factor = 8, 104 x 90 matrix). Selected surface-based data had undergone HCP minimal preprocessing (including B0 distortion correction, co-registration to T1-weighted images, and normalization to the surface template), ICA-FIX, and regression with 24 motion regressors. Voxel timeseries was first demeaned within each voxel, then averaged for the 360 cortical regions according to the Glasser atlas (Glasser et al., 2016).

#### 2.4.1) Leading Eigenvector Dynamics Analysis (LEiDA)

We used Leading Eigenvector Dynamic Analysis (LEiDA; Cabral et al., 2017) to generate states while minimizing computational costs and avoiding the challenges of the traditional “sliding window” approaches (Preti et al., 2017; Fig. 1). LEiDA analyzes phase dFC (Cabral et al., 2017), which is a granular approach to calculate dFC(*t*) at each time point. The phase *θ*(*k*, *t*) at each time point *t* in each *k* region’s timeseries was derived by the Hilbert transform, which expresses the regional signal *x*(*k*, *t*) as the product of the amplitude *A* and the phase *θ*, *x*(*k, t*) = *A*(*k, t*)**θ*(*k, t*). The phase *θ* adds a third “imaginary” axis (along with the real and time axes) that converts the rise and fall of fMRI signals into an angle (Cabral et al., 2017; Lord et al., 2019). At each *t*, cosine of the phase difference between regions *n* and *m* quantifies the fMRI signal synchronization and thus FC, namely dFC(*k _{1-2}*,

*t*)

*=*cos(

*θ*(

*k*,

_{1}*t*) -

*θ*(

*k*,

_{2}*t*)); cos(0°) = 1 indicates perfect coherence, cos(90°) = 0 indicates an orthogonal (i.e., uncorrelated) relationship, and cos(180°) = -1 indicates perfect anti-coherence. Eigendecomposition of dFC(

*t*) at each

*t*was done to reduce the dimensionality of each phase connectivity matrix to its dominant pattern, as indicated by the first eigenvector (i.e., the leading eigenvector), LE(

*t*). The dominant pattern at each

*t*was reconstructed by LE(

*t*) x LE(

*t*)

^{T}. The first and last time points were removed to exclude boundary artifacts (Vohryzek et al., 2020).

#### 2.4.2) Identification of States

Clustering analysis was applied to LE(*t*) to classify time points into discrete clusters, representing recurring states (Cabral et al., 2017). k-medians clustering with Manhattan distance was conducted on all participants and time points for better performance in high-dimensional data (compared to *k*-means clustering with Euclidean distance), with 500 repetitions to escape local minima (Aggarwal et al., 2001; Allen et al., 2014). dFC states were visualized by the median dFC(*t*) of each LE(*t*) cluster. Different numbers of clusters (*k*) produce states which can be useful for answering specific neuroscientific questions (Figueroa et al., 2019; Lord et al., 2019). To choose *k* for the main analysis, we repeated k-medians clustering for *k* = 2-12 on a random half of the participants to reduce computational costs. Prior analyses usually choose *k* = 4-5 based on the elbow method (Allen et al., 2014; Damaraju et al., 2014; Cabral et al., 2017; Nomi et al., 2017). In line with this, we depict similar results for the elbow method in the half-sample. In addition, the configuration of a state consists of at least one intrinsic connectivity network (ICN) which is anti-coherent with the rest of the brain, represented by LE loadings with a different sign (Vohryzek et al., 2020). Given the unique relationship between general cognitive ability and the frontoparietal network (FPN; Jung and Haier, 2007; Duncan, 2010) and to choose a *k* close to the *k* = 4-5 chosen by prior analyses, we chose *k* = 6 in the main analysis to include a state where the FPN is isolated by anti-coherence with all other networks as defined by the Cole-Anticevic parcellation (Ji et al., 2019). To further explore how the choice of *k* contributes to our results, we also repeated analyses post-hoc for *k* = 2-5 on the full sample. We stopped at *k* = 6 due to the greater computational costs associated with further *k*.

### 2.5) State FC Variability and Strength

Prior work suggests that higher g is associated with the prevalence of states with low FC strength and corresponding high FC variability; maintaining low strength, high variability states may be an index of reconfiguration flexibility (Nomi et al., 2017; Girn et al., 2019). We investigated, post-hoc, the strength and variability of edges in the dFC matrices. For each state, FC variability was obtained for each edge by the standard deviation (*SD*) of dFC(*t*) across corresponding time points for each participant and run (Nomi et al., 2017). Group FC variability was obtained by averaging across participants and runs. FC strength was obtained for each edge by the mean of the absolute values of dFC(*t*) across corresponding time points for each participant and run. Group FC strength was obtained by averaging across participants and runs.

#### 2.6.1) State Dynamics

To investigate network reconfiguration as defined by state dynamics for each participant, we used the state clustering to calculate 6 state occurrences - the proportion of dFC(*t*) classified to each of the six states (*high values indicate that the participant enters that state more frequently on average*); 6 dwell times - the mean number of dFC(*t*) classified to a given state of the six before switching to another state (*high values indicate that the participant stays in that state longer on average*); 1 transition number - the total number of state switches (*high values indicate that the participant switch between states more on average*); and 6 x 6 transition probabilities - the ratio of the count of each state switch (e.g., from State 1 to 2) to all state switches initiated from the same starting state (e.g., all state switches from State 1 to another state) (*high values indicate that the participant makes that specific transition more often when starting from a given state on average*). Note that transition probability includes both the probability of staying in a state, as well as switching between states. Each metric was averaged across all runs for each participant.

#### 2.6.2) State Transition Distance

6 x 6 state transition distances measure the average magnitude of connectivity difference during a specific state-to-state switch *(larger distances indicate a more drastic change of connectivity during the given state switch on average*). Formally, the Manhattan distance between all sequential pairs of LE(*t*) in each participant’s runs was calculated. Each of these LE(*t*) pairs was categorized as a specific state-to-state switch. The mean Manhattan distance was computed, across all runs for each participant, for all possible combinations of state switches (e.g., State 1 to 1, 1 to 2, etc).

#### 2.6.3) State Idiosyncrasy

State idiosyncrasy was obtained for all 6 states by the average deviation of each participant from the group average *(high values indicate that the participant’s LE(t) are more different from the group average*). Formally, state idiosyncrasy was obtained by finding the Manhattan distance between each participant LE(*t*) and the group median of the corresponding LE state, then averaging for each state to quantify its idiosyncrasy.

### 2.7) Experimental Design and Statistical Analysis

#### 2.7.1) Univariate Analysis

To adjust for confounds, we regressed out age and sex from both brain metrics and g (Agelink van Rentergem et al., 2020). To identify brain metrics related to g, we performed Spearman’s correlation tests for each brain metric and g, controlling for False-Discovery Rate (FDR) (*q* < .05) across the 91 comparisons (Benjamini and Hochberg, 1995). We did this because we found that several variables had non-normal distributions based on visual observation of quantile-quantile (QQ) plots.

We estimated g using the first PC of 10 cognitive tests. The stability of the loadings for each cognitive test variable was quantified using the bootstrap test (Beaton et al., 2014) with 10,000 replicates. For each loading, the bootstrap ratio (BR) was calculated as a *Z*-approximate that determines whether a given loading is stably different from 0. We used a critical value of 2.5 (equals, approximately, the critical value at *α* = .05 for a two-tail *Z*-test) to determine whether the loading is stable.

#### 2.7.2) Multivariate PLSC

We explored the multivariate association between the 91 network reconfiguration characteristics (including 49 state dynamic, 36 transition distance, and 6 idiosyncrasy metrics) and the 10 variables of cognitive performance (from 10 cognitive tests) using PLSC (Krishnan et al., 2011). Age and sex were regressed out from both sets of variables prior to analyses to control for their effects (Agelink van Rentergem et al., 2020). To allow comparison across measures, the variables were also standardized by computing their *Z*-scores.

PLSC extracts pairs of new variables, called latent variables (LVs), representing components of maximum covariance between the two input matrices (network characteristics and cognitive scores, respectively). Each pair of latent variables comprises a dimension, with the constraint that dimensions are uncorrelated (i.e., the latent variable from one input matrix is uncorrelated with the latent variable from the other input matrix of other dimensions). This is accomplished via singular value decomposition, which also generates singular values (SVs) representing the covariance for each dimension. Dimensions are organized according to explained covariance of the total covariance between the two input matrices, with loadings assigned to each variable in each matrix reflecting the contribution of the variable onto a given dimension. Importantly, because dimensions are identified via covariance across both matrices, dimensions are driven by the relationships across these matrices rather than just correlations within each matrix - that is, each dimension represents a data-driven reflection of a brain-behavior relationship. Dimensions can identify aspects of the data which are reflected in different relationships, in our case, PLSC could identify relationships reflective of generalized cognition and/or of specific cognitive domains that share common network characteristics. The loadings on specific variables allow interpretation of the dimension, reflecting the cognitive and network characteristics driving each dimension. For more details, see Krishnan et al. (2011).

##### 2.7.2.1) Reliability of PLSC Dimensions

Non-parametric permutation tests on the singular values were used to examine if the latent dimensions are reliable, or significant (McIntosh and Lobaugh, 2004). This procedure was iterated 10,000 times. If *p <* .05, we considered the SV, thus the latent dimension, reliable (*α* = .05).

##### 2.7.2.2) Stability of PLSC Loadings

To identify variables that contribute stably, we also used the bootstrap test to estimate the stability of the cognitive and reconfiguration PLSC loadings for each dimension (McIntosh and Lobaugh, 2004). This procedure was iterated 10,000 times to generate BRs for each loading. We also used a critical value of 2.5 (equals, approximately, the critical value at *α* = .05 for a two-tail *Z*-test) to determine whether the loading is stable.

##### 2.7.2.3) Reproducibility of PLSC Dimensions and Loadings

To quantify the reproducibility of the singular values, we performed a split-half PLSC procedure (Churchill et al., 2013, 2016; McIntosh, 2021). In each iteration, the data was split into random split-half samples, and singular value decomposition was conducted on both halves. To identify the reproducibility of the dimension across split-half samples in a “train-test” approach, “test” SVs were derived from using the latent variable pairs of the first “train” half and the correlation matrix of the second “test” half. Higher SVs would mean higher reproducibility of the dimension. To identify the reproducibility of loadings across split-half samples, the similarity between the latent variables of **X** (or **Y**) the first half and the latent variables of **X** (or **Y**) the second half were derived by the dot product of the latent variables. A higher dot product score means greater similarity for a specific latent variable of **X** (or **Y**) between the first and second halves. We repeated split-half resampling 10,000 times. For each dimension, the reproducibility score was calculated by approximating a Z-score - the mean of the “test” SVs divided by the standard deviation. For each latent variable of **X** (or **Y**), the reproducibility score was also calculated by approximating a Z-score - the mean of the dot product for the latent variables of **X** (or **Y**) across the two halves divided by the standard deviation. Values greater than 1.95 were used to determine reproducibility (approximately 95% confidence interval).

## 3) Results

### 3.1) State characteristics

We investigated k-medians clustering for *k* = 2-12 on a random half of the participants to choose *k* while minimizing computational costs (Extended Data Fig. 2-1). Phase-difference dFC corresponded well with established ICNs - specifically, regions of each ICN tended to have similar phase differences with other regions within a given state. Each state generally had at least one intrinsic connectivity network (ICN) which is anti-coherent with the rest of the brain, represented by LE loadings with a positive sign (Vohryzek et al., 2020). For each state, we plotted LE x LE^{T} matrices and all positive LE values on the brain. In the main analysis for *k* = 6, State 1 had a uniform phase direction, but other states were characterized by at least one ICN with anticoherence with other ICNs (Fig. 2). State 2 was characterized by the coherence of attention and sensorimotor ICNs and the posterior multimodal network (PMM); the weak coherence of default mode network (DMN) and FPN; and the anticoherence of DMN and FPN with most ICNs. State 3 was characterized by the weak coherence of visual and language ICNs, FPN, and DMN; the weak coherence of the cingulo-opercular network (CON) and dorsal attention network (DAN); and the anticoherence of the CON and DAN with most ICNs (with strong anticoherence between CON and DMN). State 4 was characterized by the weak coherence of the FPN and DMN and the weak anti-coherence of the secondary visual network (VIS2) with most ICNs. State 5 was characterized by the coherence of attention and visual ICNs, FPN, and PMM; and anticoherence of the DMN and the language network (LAN) with most ICNs. State 6 was characterized by the coherence of sensorimotor ICNs, LAN, and PMM; and anticoherence of the FPN with most ICNs.

It has been hypothesized that greater prevalence of states with low FC strength and corresponding high FC variability would relate to g (Nomi et al., 2017; Girn et al., 2019). Thus, we also investigated, post-hoc, the strength and variability of edges in the dFC matrices (Extended Data Fig. 2-2). As expected, states with lowest FC strength across edges tended to have the highest FC variability. Notably, States 3 and 4 had the lowest FC strength and highest FC variability across edges.

### 3.2) Network reconfiguration characteristics

Across states, salient patterns emerge when examining state dynamics and transition distance (Extended Data Fig. 3-1; also see Fig. 4 below). Within-state transition probability (probability of remaining in the same state) was the highest and within-state transition distance (average transition distance to itself) was the lowest among all types of state transitions. The distributions of transition distances seemed to be similar for the same pair of states (e.g., comparing transition from 1-2 or from 2-1). We found State 1 to be special. State 1 had the highest and most variable values for occurrence, dwell time, and within-state transition probability. State 1 also had slightly higher mean and variance in target transition probability (transition probability towards that state). Furthermore, State 1 had the lowest within-state transition distance, lower participating transition distances, and the lowest and most variable idiosyncrasy.

### 3.3) Univariate and PLSC results were similar for the first PLSC latent dimension

The first PC of the cognitive tests explained 32% of the variance and captured the commonality across all tests as indicated by the unidirectional pattern of stable (BR > 2.5) loadings (PMAT24, PicVoc, ProcSpeed, CardSort, Flanker, ListSort, PicSeq, ReadVoc, WordMem, LineOrient; Loading = 20, 22, 14, 16, 14, 18, 14, 23, 12, 19; BR = 17.87, 16.48, 13.20, 14.83, 13.40, 16.72, 13.27, 17.51, 9.80, 15.28); the PC scores were used to quantify g for the participants (Extended Data Fig. 3-2). Such a unidirectional pattern was also found in the loadings of the first dimension of PLSC (Fig. 3). The network reconfiguration measures that significantly correlated with g (*p* < .05 with FDR correction) (Extended Data Fig. 3-2) were similar to the measures which contributed reliably to the first dimension of PLSC (BR > 2.5) (Fig. 3). All univariate correlations, *p*-values, and FDR-adjusted *p*-values are noted in Extended Data Figure 3-3. As the univariate results approximated the more data-driven PLSC results for Dimension 1, we focus on PLSC results for brevity.

### 3.4) PLSC indicated two significant and reproducible latent dimensions

The permutation test indicated that the first three latent dimensions each explained a reliable (*p* < .05) proportion of covariance, as measured by the SV (singular values) (Extended Data Fig. 3-4). The first dimension accounted for 58.83% (SV = 1187, *p* = .0001) of the total covariance between the cognitive space and the network reconfiguration space. Dimensions 2 and 3 accounted for 24.24% (SV = 762, *p* < .0001) and 6.57% (SV = 397, *p* < .0001) respectively. The reproducibility analysis indicated that the **Y** cognitive loadings (Dimensions 1-3; Z = 4.83, 2.35, 2.48) and **X** network reconfiguration loadings (Dimensions 1-3; Z = 2.65, 2.75, 2.074) of all three dimensions were reproducible (*Z* > 1.95), but only the SV in Dimensions 1 and 2 were reproducible (Dimensions 1-2; Z = 3.77, 3.00). Thus, we will focus our main analysis on the first two dimensions.

### 3.5) The first PLSC latent variable reflects relationships between g and network reconfiguration

On the first dimension of PLSC, only a selected set of cognitive test loadings stably (BR > 2.5) contributed (PMAT24, ListSort, PicSeq, ReadVoc, WordMem, LineOrient; Loading = 555.16, 508.13, 405.00, 400.24, 303.05, 466.53; BR = 4.31, 4.31, 3.52, 3.56, 2.54, 3.89), delineating the cognitive tests that drove the cognitive-network association captured by the first dimension (Fig. 3). Besides Picture Vocabulary, the loadings where we failed to find stability were notably among cognitive tests which account for reaction speed. Loadings and bootstrap ratios for cognitive measures are shown in Extended Data Figure 3-5, and for network reconfiguration measures in Extended Data Figure 3-6.

#### 3.5.1) State dynamics and cognition in Dimension 1

As indicated in Fig. 3, the first dimension of the PLSC revealed stable (BR > 2.5) positive loadings for the dwell time of States 2 (Loading = 176, BR = 3.21) and 3 (Loading = 146, BR = 2.69), within-state transition probability of States 2 (Loading = 190, BR = 3.48) and 3 (Loading = 151, BR = 2.72), and target transition probability (transition probability towards the state) for State 2 (Loading = 145, BR = 2.76). Notably, these states were not both States 3 and 4, which had the lowest FC strength and highest FC variability (Extended Data Fig. 2-2). The first dimension also revealed stable (BR < -2.5) negative loadings for the target transition probability of State 6 (1-6, 3-6; Loading = -184, -132; BR = -3.46, -2.58).

#### 3.5.2) State transition distance and cognition in Dimension 1

As transition distances were usually mirrored for a specific transition (e.g., comparing transition 1-2 to 2-1) (Extended Data Fig. 3-1), relationships between transition distance and cognition for a specific pair of states were also commonly mirrored (Fig. 3). The first dimension of the PLSC revealed stable (BR > 2.5) positive loadings for the transition distances between States 2 and 3 (2-3, Loading = 153, BR = 2.64), States 2 and 4 (2-4, 4-2; Loading = 264, 238; BR = 4.49, 3.97), States 3 and 5 (3-5, 5-3; Loading = 171, 145; BR = 3.11, 2.53), and States 4 and 6 (4-6, 6-4; Loading = 235, 200; BR = 4.25, 3.61). Notably, these transitions were among the highest transition distances across subjects (Fig. 4), indicating that g was related to a larger transition distance when moving to states which are dissimilar. The first dimension also revealed stable negative loadings (BR < -2.5) for within-state transition distances (2-2, 3-3, 4-4, 5-5; Loading = - 199, -228, -153, -169; BR = -3.56, -4.16, -2.63, -2.99), between State 1 and other states (1-3, 3-1, 1-4, 1-5, 5-1; Loading = -256, -184, -176, -195, -211; BR = -4.88, -3.53, -3.40, -3.38, -3.87), and between States 2 and 5 (2-5, 5-2; Loading = -227, -140; BR = -4.093, -2.67). These transitions were among the lowest transition distances across subjects, indicating that a lower transition distance when moving between similar states was associated with higher g.

##### 3.5.2.1) Visualizing state-space to contextualize state transition distance in Dimension 1

To aid interpretation of transition distances between states, we used PCA to reduce the LE(*t*) of all time points of all participants to visualize the points in 3D “state-space”. We took the first three PCs of the LE(*t*) of each time point of each participant (Fig. 5). In Fig. 5A, the 25%, 50%, and 75% quartiles along the PCs were plotted as error bars. Note that these three PCs only accounted for 7.89%, 6.69%, and 4.70% of the variance respectively, leaving significant variance unexplained, but this visualization allows some understanding of the relative distance across states. PC1-PC2 exhibited the proximity of States 2 and 5, States 3 and 4, and States 1 and 6. The PC3-PC2 and PC3-PC1 maps indicate that State 1 lies at the bottom of a “funnel” in the state-space. These patterns are also demonstrated in the LE(*t*) points in three exemplar participants shown in Fig. 5B (where LE(*t*) are colored according to state assignment).

#### 3.5.3) State idiosyncrasy and cognition in Dimension 1

Dimension 1 of the PLSC had stable (BR < -2.5) negative idiosyncrasy loadings for States 2 through 5 (idiosyncrasy 2, 3, 4, 5; Loading = -183, -215, -194, -182; BR = -3.30, -4.0032, -3.59, -3.42) (Fig. 3), indicating that having a more typical pattern for each state was associated with g.

### 3.6) Dimension 2 reflects relationships between processing speed and network reconfiguration

Dimension 2 of PLSC indicated that only the processing speed test loading was stable (BR > 2.5) (ProcSpeed; Loading = 452; BR = 3.11) (Fig. 3). The other loadings seemed to reflect the contrast between variables related to reaction speed and those that do not - besides vocabulary tests (Picture Vocabulary and Reading), the processing speed test loaded in the same direction with other tasks which account for reaction speed. Thus, Dimension 2 might generally characterize speed of processing.

#### 3.6.1) State dynamics and cognition for Dimension 2

For PLSC Dimension 2, the stable (BR > 2.5) dynamics loadings implicated a higher transition number (Loading = 121, BR = 3.50), higher occurrence of all states other than State 1 (occurrence 2, 3, 4, 5; Loading = 111, 118, 106, 129; BR = 3.28, 3.59, 2.97, 3.78), higher dwell time in States 3 and 5 (dwell 3, 5; Loading = 112, 85; BR = 3.39, 2.52), higher within-state transition probability in States 3 and 5 (3-3, 5-5; Loading = 116, 94; BR = 3.45, 2.78), higher transition probability away (exit transition probability) from States 1 and 6 (especially to 3, 4, and 5) (1-3, 1-4, 1-5, 6-3, 6-5; Loading = 121, 111, 132, 83, 99; BR = 3.67, 3.13, 3.96, 2.60, 2.97), and higher transition probability from State 4 to 5 (Loading = 88, BR = 2.64). It also implicated lower occurrence (Loading = -149, BR = -4.47), dwell time (Loading = -149, BR = - 4.38), within-state transition probability (Loading = -126, BR = -3.74), and target transition probability of all states for State 1 (2-1, 3-1, 4-1, 5-1, 6-1; Loading = -155, -118, -127, -121, - 136; BR = -4.70, -3.69, - 3.87, -3.44, -4.14).

#### 3.6.2) State transition distance and cognition for Dimension 2

For PLSC Dimension 2, the stable (BR > 2.5) transition distance loadings implicated a higher within-state transition distance of all states except State 3 (1-1, 2-2, 4-4, 5-5, 6-6; Loading = 159, 92, 98, 85, 107; BR = 4.52, 2.60, 2.77, 2.51, 3.094), and the transition distance between State 6 and States 1 and 2 (1-6, 6-2; Loading = 95, 99; BR = 2.76, 2.77). Notably, these transitions were among the lowest transition distances across subjects (Fig. 4).

#### 3.6.3) State idiosyncrasy and cognition for Dimension 2

For PLSC Dimension 2, the stable (BR > 2.5) idiosyncrasy loadings implicated higher individual idiosyncrasy from the group of States 1 and 6 (idiosyncrasy 1, 6; Loading = 165, 117; BR = 4.98, 3.53) (Fig. 3).

### 3.7) Post-hoc investigation of state FC strength and FC variability suggests that g is (and processing speed is inversely) associated with strong, stable, and typical states

Higher transition distance among the most distant transitions was associated with better general cognitive ability (Fig. 3), so we surmised that one contributing factor might be that individuals with high transition distances in those transitions had more defined states (i.e., higher FC strength; Fig. 7). To investigate this, we calculated the absolute FC strength for each edge in each dFC(t) classified to the state and averaged across both time points and edges for all six states. To create a single “between-distance” score for each participant, we averaged the participant scores for all transition distances where higher transition distance was associated with better cognitive performance in the PLSC Dimension 1(those with positive loadings on Fig. 4; 2- 3, 2-4, 3-5, 4-2, 4-6, 5-3, 6-4). After regressing out age and sex from both scores (Agelink van Rentergem et al., 2020), Spearman’s correlation tests were conducted for all states (data was not all normally distributed). FDR-correction was done across all 48 tests further outlined in this section. All correlations between FC strength and between-distance were significant (FDR- corrected *p* < 1*10^{-13}) and positive (rho ranging from 0.24 to 0.57) (Table 1). That is, participants displaying greater transition distances between specific states with higher transition distance also displayed a stronger connectivity profile. This suggests more defined network states and greater segregation between distant states are both associated with higher g.

Lower transition distance among same-state transitions was also associated with better general cognitive ability (Fig. 3). This can also be interpreted as an index of having more stable states, in other words, lower FC variability. To test this, we calculated the FC strength for each edge in each dFC(t) classified to the state, found the SD for each edge across time points, and averaged across edges (creating a measure of variability within states) for all six states. To create a single “within-distance” score, we averaged participant scores for same-state transition distances where lower transition distance was associated with better cognitive performance in the first PLSC dimension (2-2, 3-3, 4-4, 5-5). All correlations were significant (FDR-corrected *p* < 1*10^{-13}) and positive (rho ranging from 0.60 to 0.81) for all states (Table 1). In other words, participants displaying lower transition distances when maintaining the same state also displayed lower connectivity variability. It should also be noted that same-state transitions are most frequent (Extended Data Fig. 3-1), indicating that transition distance among same-state transitions is a measure of stability for the majority of time points. This suggests that individuals with higher g display both stronger and more stable connectivity, potentially more “deeply-entering” a given state.

Lower idiosyncrasy was also associated with higher general cognitive ability (Fig. 3). We hypothesized that the “defined” strong state patterns that individuals with higher g stably reconfigured near were also population-typical state patterns. To investigate this, we used a single average idiosyncrasy score for each participant by averaging participant idiosyncrasy scores for states where lower idiosyncrasy was associated with higher g (2, 3, 4, 5). As expected, all Spearman’s correlations between idiosyncrasy and FC strength for all six states were significant (FDR-corrected *p* < 1*10^{-13}) and negative (rho ranging from -0.49 to -0.79), and all correlations between idiosyncrasy and FC variability were significant (FDR-corrected *p* < 1*10^{-} ^{13}) and positive (rho ranging from 0.58 to 0.79) (Table 1). That is, participants displaying lower idiosyncrasy for states where lower idiosyncrasy was associated with higher g, or more typicality, also displayed stronger and more stable connectivity.

Interestingly, when these analyses were repeated for processing speed, the opposite was found - higher between-distance (higher distance was associated with higher processing speed; 1-6, 6-2) related to lower FC strength, higher within-distance (higher distance was associated with higher processing speed; 1-1, 2-2, 4-4, 5-5, 6-6) related to higher FC variability, and higher idiosyncrasy (higher idiosyncrasy was associated with higher processing speed; 1, 6) related to lower FC strength and higher FC variability (Table 1) - weak, variable, atypical states. Notably, higher transition distance among the most frequent same-state transitions (Extended Data Fig. 3- 1) was associated with processing speed, further suggesting that greater variability on average is associated with processing speed. In brief, higher scores for processing speed might be associated with higher variability (which accompanies weaker strength), which might also be reflected in higher variation away from group states.

### 3.8) Post-hoc investigation of other k

We also explored *k* = 2-5 post-hoc. PLSC for *k* = 2, 3, or 4 were not found to be reproducible for all dimensions and latent variables (Z ≤ 1.95), so we show *k* = 5 as an example (Extended Data Fig. 3-7). *k* = 5 produced the same pattern of PLSC reproducibility results as *k* = 6, where all metrics were reproducible (Z > 1.95) except for the singular value for the third dimension. Across *k*, main findings replicated with minor discrepancies, suggesting that our findings generalize across choice of *k*.

## 4) Discussion

Our results suggest that higher g is related to the capacity to reconfigure into stable, defined, and typical states. Consistent with studies suggesting that g might relate to established state dynamics such as dwell time, occupancy, transition number, and state transition probability (Nomi et al., 2017; Girn et al., 2019), we find that g related to dynamics characterizing stability (i.e., maintenance of states, such as dwell time). Frequency-based metrics might not fully capture the rich information embedded in individuals’ patterns and their changes. Moving beyond prior studies, we consider transition distance as a measure of reconfiguration magnitude during transitions between states (Shine et al., 2019; Battaglia et al., 2020). From this, g related to both state stability (lower transition distances for frequent within-state transitions) and definition (higher transition distances for distant transitions). We also integrate novel research on brain typicality (Hawco et al., 2020; Gallucci et al., 2022) by investigating idiosyncrasy of states across participants. We find that g related to typicality (lower idiosyncrasy). Critically, PLSC replicated univariate analyses, demonstrating that these associations emerge in a data-driven way and represent the strongest relationships between cognition and dynamic network features. A PLSC dimension related processing speed to dynamic metrics reflecting frequent state change, higher transition distance among frequent transitions, and greater variability around group-average states. While g related to state stability, processing speed reflected the capacity to flexibly transition. This study advances understanding of efficient brain organization, clarifying nuanced relationships between network reconfiguration and general cognitive performance.

Higher g was associated with stability in States 2 through 5, particularly in States 2 and 3. Specifically, g was associated with lower within-state transition distance in States 2 through 5 and greater dwell time in States 2 and 3. States 2 and 5 have similar patterns, which might also make the g and State 2-5 transition relationship another form of the relationship between g and within-state transitions. Given that within-state transitions were most frequent, this can explain why less overall network reconfiguration has been found to be associated with better performance - stable modular brain organization has been related to IQ (Hilger et al., 2020), while average dFC(*t*) similarity has been related to general cognitive integrity (Cabral et al., 2017). Notably, dynamics did not implicate both States 3 and 4, which have the lowest FC strength and highest FC variability, detracting from the hypothesis that greater prevalence of such states best relates to g (Nomi et al., 2017; Girn et al., 2019). Instead, we offer alternative explanations for why States 2 and 3 were implicated. Common network patterns in States 2 and 3 included CON-DAN coherence, CON and DAN anti-coherence with DMN, and FPN-DMN coherence. CON and DAN are task-positive attentional ICNs that are anticorrelated with task-negative internally-oriented DMN (Zhou et al., 2018). As intelligence is linked to CON-DAN correlation and DAN-DMN anticorrelation (Hearne et al., 2016), the segregation between these networks might be beneficial. FPN is also task-positive, but FPN-DMN correlation increases with both higher intelligence and task complexity (Hearne et al., 2015, 2016). This association might relate to FPN’s task-general control and DMN’s global information integration (Vatansever et al., 2015), where DMN contributes to internal idea generation, and FPN controls DMN activity towards external goals (Beaty et al., 2018). Increased prevalence of States 2 and 3 might amplify such ICN communication patterns (i.e., static FC is a proportion-weighted sum of dFC*(t*); Cabral et al., 2017) and thus enhance g. Our study contributes to the literature indicating that higher g is related to maintaining network patterns, and adds to it by considering the specific patterns.

There was evidence that stronger FC is associated with higher g. Higher transition distance in rare distant transitions was associated with higher g, and higher distance among these transitions was associated with higher FC strength. This is consistent with a study suggesting that general cognition and IQ is associated with higher average “leap size” (i.e., a distance measure) during state transitions (Ramirez-Mahaluf et al., 2020). Here, we integrate findings on stability with studies which suggest that greater reconfiguration is also cognitively favorable, suggesting that higher g relates to both maintenance of states and greater reconfiguration during rare transitions to fit distant states. In other words, stably entering defined states, or the capacity to “deeply-enter” states.

We found that g was associated with lower idiosyncrasy of States 2-5. Participants with lower idiosyncrasy for states implicated for g also tended to have lower FC variability and higher FC strength. This suggests a closer average fit with prototypical population patterns. Recent studies have shown that typicality in fMRI task signals and static FC relates to better cognitive performance (Hawco et al., 2020; Corriveau et al., 2022; Gallucci et al., 2022). Our study adds to this by suggesting that “deeply-entered” state patterns associated with higher g are also optimal patterns captured in population averages.

The favorability of attaining and maintaining states can be explained by interpreting the resting-state as an exploration of “attractor” states in state-space, where task demands constrain the potential repertoire (Deco and Jirsa, 2012). Assuming that participants reconfigure the network for processing in the current cognitive context, being able to attain and maintain the ideal state might be beneficial for general cognitive ability. We speculate that these participants had stronger and more defined attractors that forced dFC(*t*) to travel large distances when participants transitioned between states; thus, these attractors kept dFC(*t*) within more circumscribed areas of state-space and facilitated state maintenance. Supporting our interpretation of the relationship between rest and task, FC stability during task-state has also been observed and related to increased accuracy and decreased reaction time during cognitive performance (Elton and Gao, 2015; Hutchison and Morton, 2015). While suggestive, future studies could replicate these analyses to confirm whether indices of attaining and maintaining states remain predictors of g in tasks.

Similar to prior work, transitions back to State 1 were more probable than to other states. State 1 also had uniform phase direction, was most prevalent, and was located at the bottom of the state-space “funnel” after dimensionality reduction. As a result, State 1 has been interpreted as a meta-stable state which is returned to after entering “cognitive-processing” states (Cabral et al., 2017; Vohryzek et al., 2020). Lower transition distance from State 1, suggesting a better capacity to leave State 1 for cognitive-processing states, was associated with higher g. Prior work finds that “update efficiency” - greater similarity between resting-state and task-states - is related to higher general cognitive performance (Schultz and Cole, 2016; Xiang et al., 2022). Lower necessary goal-directed reconfiguration might conceptually relate to efficient transition from State 1 to other cognitive-processing states. Transition probability into State 6 was associated with lower g, where State 6 is characterized by the global anticoherence of FPN. FPN might alter its FC with other ICNs to act as a substrate for cognitive control (Cole et al., 2013). The anticoherence of the FPN from other ICNs implies isolation, so prevalence of State 6 might indicate a predisposition to enter a state where FPN does not accomplish this task-general cognitive control function - lowering g.

Dimension 2 of PLSC described a relationship between network reconfiguration and processing speed. Interestingly, less entry and more exits for State 1 was associated with higher processing speed - better capacity to leave the meta-state for cognitive-processing states might be beneficial for processing speed. Processing speed was also associated with the capacity to “weakly-enter” states - to have more flexible reconfiguration, which accompanies weak connectivity. Prior work has also related processing speed to state switching (de Lacy et al., 2019), greater average distance between successive dFC(*t*) (Lombardo et al., 2020), total distance traveled, and maximum between-state distance (de Lacy et al., 2019). In addition, having connectivity which varies further from prototypical group connectivity for States 1 and 6 was favorable for processing speed. One interpretation might be that the variation from group connectivity is a side-effect of greater general connectivity variability, but another interesting interpretation is that idiosyncratic divergence in a specific situation (i.e., during States 1 and 6, for processing speed) might benefit cognitive performance.

Current approaches to cognitive enhancement target specific cognitive domains at the expense of deleterious effects and can be short-lived (Schifano et al., 2022). Properly optimized enhancement of g requires thorough understanding of brain system interplay. This understanding might also lend itself to another application - brain-inspired artificial intelligence. Adaptively changing underlying network weights to control transitions between network configurations could potentially be used to instantiate general intelligence. Our study progresses this understanding of cognition by investigating the theory that network reconfiguration underlies intelligence. Future steps might include exploration of further indices, such as regional levels or state-free metrics (Barbey 2018; Girn et al. 2019), until an evidence-based model can be generated.

In summary, our framework finds that entering stable, defined, and typical network states is associated with better overall cognitive ability, suggests a shift beyond studies focusing on state frequency, and emphasizes the importance of examining connectivity observed across states in more individualized ways.

## Conflict of Interest Statement.

The authors declare no competing financial interests.

## Code Accessibility.

All relevant code for this analysis can be located at: https://github.com/14jwkn/FLEXCOG.

## Acknowledgments.

This work was supported by funding from the Natural Sciences and Engineering Research Council (NSERC).