Neurocognitive characterization of behaviour and mental illness through time-varying brain network analysis

Domain: neuroscience
Published: 2026-02-03
Editorial outcome: major_revision

Abstract
Humancognitiveprocessinginvolvesdynamicinteractionsacrossbrainregions,evolvingovertime.Traditionalneuroimaginganalysisoftenoverlooksthistemporalaspect,limitinginsightsintohowfunctionalnetworkconnectivity(FNC)supportsongoingcognitionandbehaviour.Usingslidingwindowanalysis,wecapturedFNCchangesduringtasks,reflectingnetworkreconfigurationincognitiveprocesses.Wefurtherdeterminedbehaviouralrelevanceoftime-varyingFNCbyrelatingnetworkmeasurementswithtaskperformancesandpsychopathology.Wefoundthatseveralwhole-brainFNCpatterns,orstates,persistacrossrestingandtask-basedfMRI,withstateoccurrencesfluctuatingwiththemostprominenttaskstimuli.RegionalFNCdistinguishesspecifictaskconditions,andtime-varyingFNCexplainsmorevarianceinpsychopathologysymptomscomparedtostaticconnectivity.Thesefindingshighlightthatcognitivetasksreshaperegionalandwhole-brainconnectivity.ByconsideringthedifferentFNCstates,time-varyingconnectivityprovidesamorecomprehensiverepresentationofbraininteractionsandthusmayrepresentabetterneuralproxyforcognitionandbehaviour.

Introduction
Reinforcement-related processes, including reward processing, cognitive inhibition and emotional processing arecomposed ofseveral fundamental,intertwinedaspectsofhumancognition1.Dysfunctionofreinforcement-relatedcognitionhasbeenlinkedtoarangeofmentalhealth problems during adolescence, including internalizing and externalizing symptoms, many of which transition into mental disordersduringadulthood2,3.

Reinforcement-related cognitive processes engage interactions betweenbrainnetworks,oftenmeasuredasfunctionalnetworkconnectivity(FNC)derivedfromfunctionalmagneticresonanceimaging(fMRI)duringexecutionofcognitivetasks.Forexample,facialemotional processing involves a network centered on the orbitofrontal cortex, amygdala and the superior temporal sulcus4,5. Reward processingislinkedtoinhibitoryregulationbetweenthemedialprefrontalcortexandthestriatum6,7.Meanwhile,regionalbraininteractionsarealsopartofthelarge-scale,whole-brainnetworkorganization8,9.Onthewhole-brain level, studies found that brain network organization is highly similar (r>0.9) among resting-state and multiple tasks fMRI sessions10–12.Howbrainnetworkreorganizestosupportongoingcognitivetasksisyetanunresolvedquestion.

Whilebrainfunctionalnetworkconnectivityissubjecttodynamicmodulations13, traditional FNC analyses assume a constant connectivitystrength(staticconnectivity)withinasessionorataskcondition. As a consequence, static FNC analyses, including the FNC analysescitedabove,donotprovidethesensitivitynecessarytoregistermoment-to-moment FNC fluctuations, which are thought to reflectongoingcognitiveactivity14,15.Intheabsenceofthisinformation, the exact relation between cognitive task demands and FNC remainsunclear.

Time-varyingFNCanalysesappliedtoresting-statefMRI16,17have demonstratedtheexistenceofdistinctconnectivitypatterns18.These whole-brainconnectivitypatterns(i.e.FNCstates)arethoughttobere latedtobothintrinsicthoughts,arousal,neuromodulationaswellasto non-neural sources such as head movement and random fluctuations19,20. In resting-state analyses, it can be challenging to determine cognitive correlates of FNC fluctuations, whereas task-basedfMRIcanprovideabenchmarktotesttheassociationbetweenFNCchangesandongoingcognitiveprocesses14,15.Initialtime-varying analysesappliedtotask-basedfMRIhaveobservedthatwhole-brain networkchangeswiththeonsetandoffsetoftaskblocks,andthattheir occurrencesmaydifferbetweentasks13,21.However,themoredetailed cognitiveandbehaviouralrelevanceofFNCstatesacrosstasksconditionsremainstobeelucidated.

Symptomsofreinforcement-relatedcognitivedysfunctionareat thecoreofmanypsychiatricdisorders.Forexample,dysfunctionsin reward processing, cognitive inhibition and emotional processing affectpatientswithdepressionaswellaspatientswithalcoholusedisorder,amongmanyothers22,23.Yet,correlationsbetweenfunctional connectivity and individual symptoms of cognitive dysfunction, or indeedpsychiatricdiagnoses,areneitherhighnorspecific24.Previous studieshaveshownthattime-varyingFNCispredictiveofupcoming behaviouralresponseandcorrelateswithtaskperformance15,21,25.Thus, time-varyingFNCmayserveasamoreprecisedneuralcharacterization ofcognitivedysfunctionandmayincreasebothstrengthandspecificityofthecorrelationswithbehaviouralsymptoms26.

Inthisstudy,weappliedintheIMAGENcohort,alargeEuropean sampleofyoungadults,atime-varyingFNCanalysisframeworktothe resting-state(REST)andthreereinforcement-relatedtasksfMRIsessions. These fMRI tasks, namely the emotional faces task (EFT)27, monetary incentive delay task (MID)28 and stop-signal task (SST)23, interrogate emotional processing, reward processing and cognitive inhibition, respectively. We replicated and extended our findings in STRATIFY,anindependentdatasetofpatientswithmajordepression andalcoholdependencewhohavebeencharacterisedinasimilarway toIMAGEN.Ouraimswereto1)understandthecognitiverelevanceof time-varyingFNCbyrelatingthewhole-brainandregionalFNCwith ongoingtaskstimuliandperformances;2)determinetaskspecificityof the whole-brain and regional FNC changes across multiple reinforcement-relatedtasks;3)investigatetheutilityoftime-varying connectivity in explaining mental health symptoms in the general population and in patients. Our overarching goal is to improve understanding of the neural basis of cognitive processing by elucidatingbrainnetworkreconfigurationinatime-resolvedmannerandto provide a better neural correlate for psychopathology using time-varyinganalysis.

Results
Summaryofanalysisstrategy
Weanalyzedresting-stateandthreereinforcement-relatedtask-fMRI of 1,417 participants of the IMAGEN cohort1 at age 19 years (TableS1–S2).(i)Time-varyingfunctionalnetworkconnectivity(FNC) ofeachscanningsessionwasderivedusingslidingwindowanalysis18 (Fig. 1a) on time-series of 61 components from group independent componentanalysis (ICA)29 (Fig.S2and TableS3).Inthisstudy, we used the term FNCto refer to the correlationbetween ICAcomponents’time-courses30;(ii)WeexaminedthesimilarityofFNCmatrix derivedfromaslidingwindow(windowedFNC)betweentimepoints foreachscanningsession(Fig.1b);(iii)Toextractreoccurringpatterns ofwhole-brainFNC(FNCstate),weperformedk-meansclusteringon FNC windowedFNCmatrices.(iv)Thenwesystematicallyexaminedcouplingbetweentaskconditionswithwhole-brainFNCstateandregional FNC to determine the relevance of FNC fluctuation in relation to ongoingcognitiveprocess(Fig.1c);(iv)Weinvestigatedtheutilityof time-varyingFNCinexplainingreinforcement-related psychopathologyandcognition(Fig.1d).BehaviouralvarianceexplainedwascomparedusingthesamesetofFNCfromtime-varyingFNCandstaticFNC. (v) In the independent STRATIFY dataset (n=439, Table S13), we validatedthegeneralizabilityoftime-varyingFNCinexplainingclinical symptoms(Validationanalysis).Throughoutthemanuscript,age,sex, recruitmentsitesandheadmotionwereregressedinbetween-subject analyses. Unless specified, two-sided p-values were reported, and multiple testing was corrected using the false discovery rate (FDR) atp<0.05.

Resting-stateandtask-fMRIsessionscontainreoccurring FNCstates
WefirstexaminedthesimilarityofwindowedFNCmatricesbetween timepoints and found thatwhole-brain FNCcorrelations wereconstantlychangingwithscanningtime(Fig.1b).Interestingly,FNCcorrelations of the block-designed tasks (EFT and MID) showed a periodicaltemporalstructure,suggestingthattheirwhole-brainnetworkischangingwithinongoingtasks.

Toextractrecurringnetworkpatterns,weusedk-meansclusteringonwindowedFNCmatrices.Wepredefinedfourclustersusingthe elbowcriterion31(Fig.S3).Thefourdifferentnetworkstatesidentified in this way were present during both, task-fMRI and resting state (REST) sessions (Fig. 2a). Connectivity profiles of the same state in different sessions have a higher correlation (average r=0.86±0.17) than correlations between different states (average r=0.67±0.10, two-sample t-test: t 118=7.17, p=6.93×10−11, 95% CI=[0.13, 0.24], Coden’d=1.63).TheonlyexceptionistheMIDstate3,whichdoesnot resemblestate3inothersessions.Wehypothesizethatoccurrenceof state3isrelatedtoreducedvigilance,andasMIDistheonlytaskwith immediate incentives, it is easier for participants to maintain high levelsofvigilancethroughoutthetest.SSTandEFTshowedthefour similarconnectivitypatternsastheREST.

TheconnectivityprofilesindicatethatFNCstateshavedifferent degreesofintegrationandsegregationbetweenfunctionaldomains, whichcanbe quantified bymodularityand participation coefficient fromgraphmetrics32(Fig.2bandTableS4).TheLouvainmodularity algorithmwasappliedtodetecttheoptimalcommunitystructureof network33(SupplementaryInformation).FNCstate1hasasignificantly higher participation coefficient (positive FNC: F (3,12)=22.13, p=3.52×10−5, η2=0.85; negative FNC: F (3,12)=34.38, p=3.58×10−6, η2=0.90) and a lower modularity (F (3,12)=37.81, p=2.16×10−6, η2=0.90)thantheotherstates(Fig.2c).

Theconnectogramplotshowedthestrongest100connectivityof eachstate(Fig.S4).FNCstate1istheleastmodularstate,withmainly weaklypositiveconnectivitywithinfunctionaldomains.Bothstate2 and state 3 exhibited segregation (strong negative connectivity) between primary regions (visual and sensorimotor networks) and higher-orderregions(defaultmode,cognitivecontrolnetworks),with state3exhibitinghighermodularityandsegregationbetweenprimary regions and subcorticaland cerebellum.The connectivity profile of state 4 is similar to state 1 but with stronger connectivity within functionaldomainsandalowerparticipationlevel.

We demonstrated the robustness of our results by confirming reproducibility of the FNC states and dwell time of each state using different window lengths (from 8.8s to 70.4s, Figs. S5–6, TableS5)anddifferentclusteringnumbers(from2to5clusters,Figs. S7-8,TableS6).

FNCstatesaredifferentiallymodulatedbyongoingtaskevents
HavingidentifiedfourstableFNCstates,weexaminedhowtaskevents modulate their occurrences by calculating the Pearson correlation betweenFNCstateoccurrenceandtaskconditionsforeachtasksession. FortheEFTandMID,wherestimulionsetanddurationarethesamefor allparticipants,thestateoccurrenceswerecalculatedastheproportion ofsubjectshavingagivenstateataparticulartimepointatthegroup level.Pearson’scorrelationwasperformedbetweenstateoccurrences andtaskconditionsatthegrouplevel,andcomparedwithanullmodel todeterminetheirsignificance(SupplementaryInformation).Wealso comparedthecorrelationcoefficientsbetweenconditions(acontrastof interest)usingPearsonandFilon’sz-statistic34.FortheSST,asstimuli onsetsvariedacrossparticipants,wecalculatedthepartialcorrelations betweenstateoccurrencesandtaskstimuli(controllingforothertypes of stimuli) at the individual level. Correlation coefficients were comparedto0usingaone-samplet-testtodeterminetheirsignificance.

IntheEFTtask(Fig.3a),state1andstate4showedpositivecorrelationswithangryfaces(allr>=0.27,p<=0.0002,TableS7)andnegative correlations with non-face stimuli (r<=−0.55, p<0.0001).
Comparing between conditions, state 1 and state 4 exhibited significantlyhighercorrelationsforfacesstimuli(angry,happyandneutral faces)thannon-facestimuli(allPearsonandFilon’sz>=6.79,p<0.0001, TableS8).Incontrast,FNCstate2showedstrongpositivecorrelation withnon-facesstimuli(r=0.85,p<0.0001),andnegativecorrelations withall types offacesstimuli(r<=−0.26,p<0.0001). Occurrenceof state 3 linearly increased with scanning time and exhibited positive correlationswithnon-facestimuli(r=0.20,p=0.007).

IntheMIDtask(Fig.3b),state1hadahighercorrelationwithlarge-winthansmall-wintrials(z=2.35,p=0.02,TableS8),whereasstate2 showedtheinversepatternagain(z=−2.79,p=0.005),andnegative correlationswithlarge-wintrials(r=−0.20,p=0.008,TableS7).

IntheSSTtask(Fig.3c),stimulionsetsdifferacrosssubjects.We thereforecalculatedpartialcorrelationsbetweenstateoccurrenceand taskstimuliattheindividualsubjectlevelandcomparedcorrelations betweenconditionsusingone-samplet-test.Weanalysedstopsignals (stop-success and stop-failure) and go errors (go too-late and go-wrong).FNCstate1showedapositivecorrelationwithstopsuccess (t=2.60,p=0.01,TableS7),whereasFNCstate2exhibitedanegative correlation(t=−4.60,p=4.63x10−6).Forgo-relatederrors,FNCstate 3showedastrongpositivecorrelationwithgotoo-lateerror(t=15.86, p=2.88x10−43),whileotherstatesexhibitednegativecorrelations(t<-4.01,p<6.72x10−5).State1and4showedpositivecorrelationswithgo wrong errors(t>4.32, p<1.72x10−5) and state 2 showed a negative correlation(t=-10.33,p=5.45x10-24).

Consideringallthreetasks,FNCstate1positivelycorrelatedwith themostprominenttaskstimuli(EFTfacesstimuli,MIDlarge-winand SST stop signals), whereas state 2 negatively correlated with these conditions,suggestingthatstate1and2representtaskengagement anddisengagement,respectively.State3occurrenceintheEFTand SSTlinearlyincreasedwithscanningtime,suggestinganindicatorof attentionlapses.State4onlypositivelycorrelatedwithangryfacesin the EFT, which may reflect passive emotional processing. This hypothesiswassupportedbycorrelationbetweenFNCstatedwelltime and taskperformances(Figs.S9-10).We found thatSSTgotoo-late error positively correlated with state 3 (Spearman’s rho=0.42, p=9.03x10−24) and negatively associated with state 1 (rho=−0.10, p=9.29x10−4), suggesting that FNC state 1 facilitates and state 3 interfereswithongoingtaskperformances.NotethatFNCstatefluctuationswerenotdrivenbychoiceofwindowlength(Fig.S11).

Whole-brainFNCstatescorrelatewithreinforcement-related behaviours
Next,weexaminedbehaviouralrelevanceofFNCstatesbycarryingout sparsePartialLeastSquare(sPLS)analysis35andhold-outvalidationon theFNCstatedwelltimeand29behaviouralitems,includingmental health assessments (DAWBA, SDQ, ADRS), substance uses (ESPAD, AUDIT,SURPS)andreinforcement-relatedcognitions(MCQ,CANTAB) (Fig.4aandTableS9).FNCstates1and4werenegativelyassociated withpsychopathologyandsubstanceusebehaviours,whereasstates2 and3showedpositiveassociations(Fig.4bandTableS10).Specifically, FNCstate1intheEFTandSSTwasnegativelycorrelatedwithinternalizingsymptoms(specificphobiaandpeerproblems)andexternalizingsymptoms(smoking,bingedrinkingandrisk-taking).FNCstate2 in the MID and SST was positively correlated with internalizing symptoms,includingphobia,depression,eatingdisorders,aswellas externalizingproblems,includingobsessive-compulsivedisorderand ADHDsymptoms.FNCstate3intheREST,EFTandSSTsessionswas positively correlated with substanceuse such as smoking, drinking, andrelatedpersonalityincludingimpulsivityandsensationseeking. FNCstate4intheEFT,MIDandSSTwerenegativelycorrelatedwith internalizing symptoms, including phobia, depression, anxiety and positively correlated with impulsivity, sensation seeking and delay aversion,risk-takingfromCANTABgamblingtask.

RegionalFNCinvolvesintask-specificcognitiveprocesses
Inadditiontodescribingongoingtaskmodulationonawhole-brain level (Fig. 3), we further investigated task effects on regional FNC betweentwoICAcomponents(pair-wiseFNC).Unlikethewhole-brain FNCstate,regionalFNCcoulddistinguishtaskconditionsrelatedto emotional processing, reward sensitivity or motor inhibition. These taskconditionsincludedangryversusneutralfacesinEFT;large-win versus no-win in MID and stop-success versus stop-failure in SST. Amongall1830(61×60/2)pair-wiseFNC,559FNCweresignificantfor EFTcontrast;333and303FNCweresignificantforMIDandSSTcontrasts,respectively(one-samplet-statistic)(Fig.5a-c).

TodeterminethespecificityoftheseregionalFNC,weplotted20 connectionswiththehighestt-statisticsinonetask,andcomparedtheir t-statisticswiththoseintheothertwotasks.FNCassociatedwithemo- tionalprocessing(withthehighestt-statisticsofangryversusneutral faces)donotdistinguishtaskconditionsintheMIDorSST(Fig.5a).A similartaskspecificitywasobservedfortheMIDandSST(Fig.5b,c). Anatomiclocationsofthe20task-specificFNCareshownintheconnectogramplot(Fig.5d).TheEFTtask-specificconnectionsaremainly betweenthebilateralsuperiortemporalregionsandthedefaultmode, prefrontalareas,andvisualcortices.FortheMID,connectionsofthe default mode regions with frontoparietal regions, visual and sensorimotorareasshowedhighercorrelationswiththelarge-wincondition compared to the no-win condition. For the SST, connections of the sensorimotorareaswithdefaultmodeandtemporalregions,aswellas connectionsbetweentheputamenandfrontoparietalregions,showed higher correlations with the stop-success condition compared to the stop-failurecondition.DetailedFNClabelsandt-statisticsarelistedin Table S11. Taken together, our results suggest that whole-brain and regionalFNCmayreflectdifferentaspectsofcognitiveprocessing:while whole-brainFNCstatesarebroadlymodulatedbythemostsalientstimuli(EFTfacesstimuli,MIDlarge-winandSSTstopsignals),regional FNCarerelatedtomoresubtletaskprocessesandshowtaskspecificity.

Time-varyingFNCexplainsmorebehaviouralvariancethan staticFNC
Finally, we tested whether measuring task-specific regional FNC in different FNC states increases the explanation of variance of reinforcement-relatedbehavioursintheIMAGENcohort.Weaveraged thetop20task-specificconnections(Fig.5)fromeachtime-varying FNCstateandstaticFNC,andthenregressedthe29behaviouralitems (Table S9) on time-varying FNC and static FNC. We focused on 23 behavioursthatcanbefittedusingbothtime-varyingFNCandstatic FNC (full model, model significance uncorrected p <0.05, one-tail TableS12).Whilevarianceexplainedofindividualbehavioursbysingle neuroimagingmeasuresisgenerallylow,wefoundthattime-varying FNC explained a higher proportion of variance (R2) in 22 out of 23 behaviours(adjustedR219/23behaviours)comparedtothestaticFNC regressiobnmodel(Fig.6a).Othermodelfittingparametersincluding adjusted R2 and log-likelihood (which balance model accuracy and modelcomplexity)alsosuggestedabetterfittingusingtime-varying FNCforbehaviouralregression(Fig.S13bandTableS12).

We show one behavioural fitting from each task using time-varying FNC and static FNC as an illustration (Fig. 6b). In the EFT, variance explained of peer problem from Strengths and Difficulties Questionnaire (SDQ) by time-varying FNC was 0.71% compared to 0.07% by static FNC. Correlation between the fitted and observed behavioural score using a time-varying FNC regression model was r=0.08, p=0.003, 95% CI=[0.03, 0.14] and r=0.03, p=0.36, 95% CI=[−0.03,0.08]inastaticFNCmodel.IntheMID,varianceexplained of emotional problems from SDQ by time-varying FNC was 0.86% comparedto0.64%bystaticFNC.Correlationbetweenthefittedand observed score using time-varying FNC was r=0.09, p=0.001, 95% CI=[0.04, 0.15] and r=0.08, p=0.006, 95% CI=[0.02, 0.14] using staticFNC.IntheSST,varianceexplainedofEuropeanSchoolSurvey ProjectonAlcoholandOtherDrugs(ESPAD)bingedrinkscorebytime-varyingFNCwas0.53%comparedto0.15%bystaticFNC.Correlation betweenthefittedandobservedscoreissignificantfortime-varying FNC (r=0.07, p=0.01, 95% CI=[0.02, 0.13]) but not static FNC (r=0.04,p=0.19,95%CI=[-0.02,0.10]).

Validationinanindependentdataset
WevalidatedourresultsintheindependentSTRATIFYdatasetwhich includes patients with alcohol use disorder (AUD, n=125), major depressivedisorder(MDD,n=131)andhealthycontrols(CON,n=183, TableS13)36,37.PatientswithMDDwereincludedifthey(i)hadaPatient HealthQuestionnaire-9(PHQ-9)score≥15,and(ii)metthediagnostic criteria for a current major depressive episode. AUD patients were included if they (i) scored ≥ 15 on the Alcohol Use Disorders Identification Test (AUDIT), and (ii) met the diagnostic criteria for alcoholdependenceorharmfulalcoholuse(SupplementaryInformation).TheMRIacquisitionprotocolofSTRATIFYwasidenticaltothe IMAGENcohortandisdescribedindetailin:https://stratify-project. org/documentation/.Usingtheslidingwindowandk-meansclustering analysis (Supplementary Information), we derived four FNC states fromeachsessionoftheSTRATIFYcohort(REST,EFT,MIDandSST), which showed a high-level of correspondence with the FNC states derivedfromtheIMAGENresting-state(within-statecorrelationranges from0.80to0.96,exceptforMIDstate3,Fig.S14).Overall,theFNC stateswerereproducibleintheindependentSTRATIFYsample.

Our replication of the correlation between occurrences of FNC stateandongoingtaskstimuli(Fig.S15)yieldedresultssimilartothe IMAGENdataset(Fig.3andTableS8).Specifically,intheEFT,states1 and4positivelycorrelatedwithfacesstimuli,whilestate2positively correlated with non-faces stimuli. MID state 2 negatively correlated withlarge-wincondition,butthiswasobservedonlyinMDDpatients. SSTstate3positivelycorrelated,andstate2negativelycorrelatedwith gotoo-lateerrorsacrossallthreegroups.

InreplicatingthecorrelationbetweenFNCstatedwelltimeand task performances (Fig. S10), we confirmed significant associations betweenSSTgotoo-lateerrorswithdwelltimeinstate1(rho=−0.26, p=0.01)andstate3(rho=0.31,p=0.003)withintheSTRATIFYCON group(TableS14).AmongindividualswithMDDandAUD,SSTgotoo-late errors were positively correlated with dwell time in state 3 (rho=0.28,0.34;p=0.02,0.004respectively).GroupcomparisonsoftaskperformanceshowedthatMDDpatientsexhibitedloweraccuracy andlongerreactiontime(RT)duringtheMIDtaskcomparedtoCON, whileAUDpatientsshowedonlylongerRTrelativetoCON(Fig.S16). ForSSTtaskperformances,AUDpatientshadlongerRTinresponseto stopsignals,andMDDpatientsexhibitedlongerRTforgosignals.

As in IMAGEN, task-specific regional FNC (Fig. 5) derived from time-varyingFNCwassuperiortostaticFNCinexplainingbehavioural varianceintheSTRATIFYsample(Fig.6c-d).Whilethesamplesizeof STRATIFY being smaller than IMAGEN increases the risk for R2 inflation38(seeexampleinFig.S17),itdoesnotaffecttherelationofR2 betweentime-varyingandstaticFNCmeasurements.Regressionanalysis in STRATIFY controls revealed that time-varying FNC has a numerichigherR2usingtime-varyingFNCin14outof19behavioural items,whereasstaticFNConlyshowedahigherR2 in5behavioural items (Fig.6c). For example, in the EFT,varianceexplained ofpeer problem from SDQ by time-varying FNC was 8.21% compared to 1.52% by static FNC. In the MID, variance explained of reward delay discounting from MCQ by time-varying FNC was 3.77% compared to 2.98%bystaticFNC.IntheSST,varianceexplainedofESPADbinge drinking by time-varying FNC was 5.13% compared to 0.25% by staticFNC.Correlationbetweenthefittedandobservedscoreissignificantfortime-varying FNC (r=0.07, p=0.01, 95% CI=[0.02, 0.13]) but not static FNC (r=0.04,p=0.19,95%CI=[-0.02,0.10]).

Testingtheclinicalrelevanceoftime-varyingFNC
To investigate the clinical relevance of our model, we used logistic regressiontotesttheperformanceoftime-varyingFNCandstaticFNC indistinguishingdiseasestatus(CONvs.MDD,CONvs.AUD,CONvsall patients(PAT)).We found thattime-varyingconnectivityin the EFT explained4.38%ofthevarianceofMDD,comparedto0.51%instatic FNC,whichwasmainlydrivenbythetime-varyingconnectivityofstate 3 that was significantly different between CON and MDD patients (t=3.53,p=0.0005,Fig.S18).IntheSST,therewasahighexplanation ofvarianceofAUDbytime-varyingFNCof7.70%vs.6.14%bystatic FNC, consistent with the association with the binge drinking score observedinIMAGENandSTRATIFYcontrols.Post-hocanalysisshowed thattime-varyingconnectivityofstates1,2,and4(t=3.74,3.18,3.38, p=2.23×10−4,0.002,8.29×10-4,respectively),aswellasinstaticFNC (t=4.32, p=2.21x10−5), are significantly different between CON and AUDpatients(Fig.S18).Time-varyingFNCcomparedtostaticFNCin theMIDexplained0.47%vs.0.06%inMDD,2.67vs.2.06%inAUDand 1.14%vs.0.70%inallpatientscomparedtocontrols.Theclinicalutility oftime-varyingFNCwasparticularlyevidentintheEFTandSST,where the explained variance was higher in patients with MDD and AUD, respectively,consistentwiththesuperiorperformanceoftime-varying FNC in explaining behavioural symptoms in population-based samples.

Sensitivityanalysis
Toassesswhethertheresultswereinfluencedbypotentialsiteeffects (TableS2),wefirstextractedthefourFNCstatesseparatelyforeachof theeightrecruitmentsites(Fig.S19).Wethencalculatedthespatial correlation of the FNC states and their occurrences between each individual site and the combined data fromall sites combined. The resultsshowedthattheFNCstatesderivedfromindividualsiteswere highly similar to those from the all sites, and their occurrences exhibitedmoderatetolargeconsistencyacrosssites.Furthermore,we replicatedthemainanalyseswithineachrecruitmentsite,including:(i) thecorrelationbetweenFNCstateoccurrenceandtaskconditions(Fig. S20);(ii)thecorrelationbetweenFNCstatedwelltimeandtaskperformance(Fig.S21);and(iii)thebehavioralvarianceexplainedbytime-varyingandstaticFNC(Fig.S22).Themainfindingswerereproducible, supportingtherobustnessofourresultsacrossrecruitmentsites.

To minimize the influence of head motion on our results, we excludedsubjectswithexcessiveheadmotion(meanframewisedisplacement(FD)>0.2mm;seeTableS1).Additionally,intheestimation oftime-varyingFNC,weincludedthesixrealignmentparametersas covariates in the sliding window analysis to reduce the impact of micro-movements on FNC estimation (Materials and Methods). We evaluated the correlationbetween FDand state occurrences during eachscanningsession(Fig.S23),whichshowedconsistentlylowcorrelations(medianrange:–0.046to0.078).Furthermore,weincluded headmotionasacovariateinthecorrelationanalysesbetweenstate occurrencesandtaskevents(Fig.S24),andfoundthattheresultsfrom the EFT and SST sessions remained robust. In all between-subject analyses, covariates including age, sex, recruitment site, and head motion(meanFD)wereregressedout.

Methods
Participants
The dataset is part of a population-based neuroimaging-genetics study:theIMAGENcohort1,aimingtoidentifyneurobiologicalcorrelates of reinforcement related behaviours in adolescents followed from14to22yearsold.Forthisstudy,weanalyzedneuroimagingand behaviouraldatafrom1417participantsatmeanageof19.09±0.76 years old, including 733 female subjects (51.73%). Participants were recruited fromeight research centers in the United Kingdom, German,FranceandIreland.Ethicsapprovalwasobtainedateachsite by local research ethics committee. Written consent was obtained from each participant. After a multi-step quality control pipeline (TableS1),weanalyzeddatafrom991subjectswithresting-statefMRI, 1263participantswithEFT,1221withMIDand1218subjectswithSST (TableS2).

Neuropsychologicalassessments
Weincludedbehaviourquestionnaireswhichmeasurementaldisorder symptoms,substanceuseandneuropsychologicalfunctionsofadolescents.SymptomseveritywereassessedusingtheDevelopmentand Well-Being Assessment (DAWBA)54 and Strengths and Difficulties Questionnaire(SDQ)55,whichcoverscommonemotional,behavioural andhyperactivitysymptomsinadolescents.Weusedself-ratedquestions(symptomcounts)oftheDAWBAandsubscalescoresoftheSDQ. Depressionsymptomwasadditionallyassessed with the Adolescent DepressionRatingScale(ADRS)56.Smokinganddrinkingbehaviours weremeasuredusingtheEuropeanSchoolSurveyProjectonAlcohol andOtherDrugs(ESPAD)57andAlcoholUseDisordersIdentification Test (AUDIT)58. Substance Use Risk Profile Scale (SURPS) measures personality risk for substance abuse, including four dimensions: hopelessness,anxietysensitivity,impulsivityandsensationseeking59. Neuropsychological functions such as reward sensitivity, affective processing and cognitive control were assessed with the following questionnaires:Monetary-ChoiceQuestionnaire(MCQ)wasadministeredtoassessdelaydiscountingi.e.thetendencytochoosesooner but smaller over later but larger rewards60. Affective Go-Nogo task (AGN)andCambridgeGamblingTask(CGT)werecompletedwiththe computerized Cambridge Neuropsychological Test Automated Battery(CANTAB,www.cambridgecognition.com),whichassesstheperceptual bias in facial emotion perception and risk-taking behaviour outside a learning context. Toavoid multi-collinearity, we removed behavioural itemswith a correlationcoefficient larger than0.8.We further removed near-zero variance predicator, which has a unique valuelessthan5%,i.e.morethan95%ofparticipantshavingthesame value61.Intotal,29behaviouralitemsassessingreinforcement-related psychopathologyandfunctionswereincludedintheanalysisandlistedintheTableS9.Distributionsofallparticipants’scoreswereplottedonFig.S12.

MRIacquisitionandpreprocessing
Neuroimagingdatawascollectedon3Tscannersateightstudycen- ters with different manufacturers (Siemens: 4 sites, Philips: 2 sites, GeneralElectric:1site,andBruker:1site).Standardizedhardwarefor visualandauditorystimuluspresentation(NordicNeurolabs,Norway) was used at all sites. Scanning parameters were harmonized across sites prior to study. For each participant, we collected a high-resolution T1-weighted MRI (T1) scan using the Magnetization Prepared Rapid Acquisition Gradient Echo (MPRAGE) sequence. Blood-oxygen-level-dependent(BOLD)functionalimageswereacquiredwith gradient-echo, echo-planar imaging (EPI) sequence during resting-stateandthreecognitivetasks:emotionalfacestask(EFT)27,monetary-incentivedelaytask(MID)28andstop-signaltask(SST)23.Detailedtask protocol was provided in the Supplementary Information. Scanning parametersofT1-weigthedimagesare:repetitiontime(TR)=2300ms; echotime(TE)=2.8ms;flipangle(FA)=8°;isotropicvoxelsize1.1mm; 256×256×160matrix;sagittalsliceplane.Acquisitionparametersof functional images are: TR=2,200ms, TE=30ms, FA=75°; 64×64×40matrix,voxelsize=3.4×3.4×2.4mm,slicegap=1mm.In thisstudy,resting-statefMRIdatawasonlyusedtoprovideasetof spatialtemplatesfromthegroupindependentcomponentanalysisfor threetasksessions.

Resting-statefMRIdatawerepre-processedwithFMRIBsSoftware Library(FSLversion5.0.9)andAdvancedNormalizationTools(ANTs version 1.9.2). Non-brain tissue was removed (FSL BET) and images were corrected for head motion (FSL MCFLIRT), then spatially smoothedusinga4mmFWHMGaussiankernel.Inaddition,artifact components were removed for each data set using an automatic classificationalgorithm(ICA-AROMAv0.3).Theresultingcleaneddata setwasdetrendedandnormalizedtoMNIstandardspaceusingthe customEPItemplate(ANTs).Pre-processeddatawerereslicedto3mm isotropicvoxels.Qualitycontrolwascarriedoutinthesamemanneras task-based fMRI data, excluding subjects with incomplete demographic or scanning information, excessive head motion (mean framewisedisplacement>0.2mm);orwithunsuccessfulnormalization. Finally, resting-state datasets from 991 subjects entered the group independentcomponentanalysis.

Task-basedfMRIscanswerepre-processedusingStatisticalParametric Mapping (SPM12, http://www.fil.ion.ucl.ac.uk/spm/). Pre-processingstepsinclude:non-braintissueremoval,slice-timingcorrection,headmovementrealignmentusingarigidbodytransformation,andimageswerenon-linearlywarpedontheMNIspaceusinga customized EPI template. Normalized images were smoothed using 5mm FWHM Gaussian kernel. Pre-processed data were resliced to 3mmisotropicvoxels.

To ensure quality of data for further analysis, we excluded: 1) subjectswithincompletedemographicinformationortaskonsetfiles simultaneouslyrecordedduringscanning;2)subjectswithexcessive headmovement(meanframewisedisplacement>0.2mm);3)subjects withunsuccessfulnormalization(usingthecriterionofacorrelation betweenindividualmaskand groupmask<0.85)62.Intotal,weanalyzed1263participantswithEFT,1221subjectwithMIDand1218subjectswithSSTneuroimagingdata(TablesS1–S2).

Groupindependentcomponentanalysisandpostprocessing
Group independent component analysis (ICA) was applied on pre-processed functional images using the GIFT software (https:// trendscenter.org/software/gift/). We selected a relative high model order of 100 independent components to achieve a functionalparcellationofbraincorrespondingtoknownanatomicalandfunctional segmentations12,18,62,63. To ensure wehave a set of comparableindependentcomponents(ICs)fromICAamongthethreetask-basedfMRI sessions, we firstapplied ICA to the resting-state dataset, and used aggregatedgroupspatialmapsfromtheresting-stateasareferenceto guideICAfortaskfMRIdata64.Specifically,fortheresting-statedataset,wefirstappliedatwo-stepdatareductiontoreducethecomputationaldemand:1)individualsubjectdataweredecomposedinto110 components using standard principal component analysis (PCA); 2) individual data were concatenated into one group, and further reducedto100componentsusingtheexpectationmaximation(EM) algorithm.ThenInfomaxICAalgorithm65wasappliedtothereduced groupdatatoobtainaggregatedgroupspatialmapsfromallsubjects. InfomaxICAwasrepeated10timestoavoidlocalminimainICASSO. Next,aggregatedgroupspatialmapswereusedasareferencetoguide subject-levelICAforeachtasksession.Aboveprocedureresultsin100 ICsofeachtasksessioncorrespondingtotheresting-statespatialmaps foreverysubject.

We selected a set of ICs whichexhibitpeak activations in gray matter,lowspatialoverlapwithknownvascular,ventricular,motion, and susceptibility artifacts, and corresponding time-courses dominatedbylow-frequencyfluctuations18.Componentselectionwasconfirmedbytworesearchers(XCandZNF,TableS3).Time-coursesofthe selectedcomponentsunderwentpost-processingto1)removelinear, quadratic, and cubic trends; 2) regress 6 head motion parameters estimatedduringrealignment;3)de-spikedetectedoutliers;4)low-passfilterwithacut-offfrequencyof0.18Hz.Thelow-passfilterwas chosentoremovephysiologicalsources(heartbeat,respiration)and motorresponseintaskswhicharehigherthan0.18Hz21,66.

Time-varyingfunctionalnetworkconnectivity(FNC)estimation
Time-varying FNC was estimated between eachpair of the selected componentsinasegmentofscanningperiod(timewindow),instead of using the entirescanning session. The tapered timewindow was createdbyconvolvingarectanglewithaGaussiankernel(sigma=3TR) to obtain a time-specific, whole-brain connectivity profile. Window lengthis8TRor17.6sfortheREST,EFTandSSTsessions,and4TRor 8.8sfortheMIDtoaccommodatetheblockdurationofMID(∼10s). Thenthetimewindowwasmovedforward1TRtogetthenextwhole-brain connectivity matrix and repeated until the end of a scanning session.Toestimatefullcovariancematrixusingrelativelyashorttime segment,weusedL1penalizedgraphicalLASSOmethodtoestimate regularized precision matrix (inverse covariance matrix) and calculatedthecovariationmatrixfromtheprecisionmatrix67.Thisresultsin a series of windowed FNC matrices for every subject of each data session.Thenumberofwindowsequalstothescanningtimepoints (unitofTR)minusawindowlength.Foreverysubject,thescanning periodconsistsof197EFTscansand191MIDscans.Thestop-signal taskwasdesignedtoautomaticallyadjusttosubjects’performance(to ensureeverysubjecthas,onaverage,50%successfulratetorespondto stopsignals).Therefore,thescanninglengthofstop-signaltaskvaries from310to350scansacrosssubjects.Weincludedthefirst310scans toensurethenumberoftimewindowsarecomparablebetweensubjects.Aspreviousstudiessuggestthattask-inducedbrainactivation might inflate estimation of connectivity by imposing co-occurring changes in BOLD signal due to task stimuli presentation68,69, we regressedtask-evokedactivationfromBOLDsignalbyincludingtask designmatrixandthesixrealignparametersascovariatespriortothe slidingwindowanalysis.Toshowtherobustnessoftime-varyingFNC estimation19,70, we repeated the time-varying FNC analysisusing differentwindowlengthsof8.8s(4TR),17.6s (8TR),35.2s(16TR)and 70.4s(32TR)(Figs.S5,6),andcalculatedspatialcorrelation(Pearson’s correlation)betweenFNCstateswithdifferentslidingwindowlengths (TableS5).

FNCstatesderivedfromclusteringontime-varyingFNC matrices
To identify reoccurring whole-brain FNC states, we applied the k-means clusteringanalysistowindowedFNCmatricesforeachsession. SimilartotheidentificationofEEGmicrostate71,72,wefirstidentifiedthe windows which have local maxima in connectivity variance across componentpairs(subjectexemplars)18.Clusteringanalysiswasapplied to the set of subject exemplars with 150 repetitions. The resultant groupcentroidwasusedastheinitialcentroidforclusteringanalysis onallwindowedFNCmatrices.Usingtheelbowcriterion31,theoptimal clusternumberswerefourforthreesessions(REST,EFTandMID),and five for the SST (Fig. S3). We set four as the predefined clustering number in the main text. To evaluate the influence of clustering numbersonFNCstatesestimation,werepeatedtheclusteringanalysis usingkvaryingfrom2to5(Figs.S7-8)andcalculatedspatialcorrelations (Pearson’ correlation) between FNC states with different clusteringnumbers(TableS6).

NetworkgraphmetricscomparisonofFNCstates
WequantitativelycomparedlevelofnetworkintegrationandsegregationofthederivedFNCstatesusingtheBrainConnectivityToolbox (BCT)73.Acommonlyusednetworksegregationmeasureismodularity, whichquantifiesthedegreetowhichanetworkcanbedividedinto several subnetworks with maximal within-group connectivity and minimal between-group connectivity. The Louvain modularity algorithmwasappliedtodetecttheoptimalcommunitystructureofthe network and calculate modularity33. In addition, we calculated the participationcoefficient,whichassessesthediversityofconnections betweensubnetworksofnodes(i.e.regions).Theparticipationcoefficient was calculated for positive and negative FNC separately and averagedacrossallregions.Asnetworkmetricscanbeinfluencedby basiccharacteristics,suchasconnectionweightsanddistributions,we compared the modularity and participation coefficient of eachFNC state with metrics calculated from 100 randomized networks. The randomized networks preserved the degree distribution of positive andnegativeFNCwhilerewiringtheconnectionsatrandom.Normalized modularity and participation coefficient were calculated by dividingempiricalvaluesbyrandomizedmetrics.

Whole-brainFNCstateoccurrencescorrelatedwithtaskevents andperformances
WefurtherinvestigatedwhethertheFNCstatesco-occurwithongoing taskevents(i.e.taskstimuliandsubjects’performance).ForEFTand MIDtasks,experimentaldesigns(stimulisequenceandonsettime)are thesameacrossallparticipants,andthuswecalculatePearson’scorrelation between occurrences of task events and FNC state at the grouplevel.Theoccurrenceofataskeventwasgeneratedusingstimuli onsets and duration convolved with canonical hemodynamic responsefunction(HRF).Theoccurrenceofastateatthegrouplevel wascalculatedastheproportionofsubjectshavingthegivenstateata particulartimepoint.Correlationcoefficientswerecomparedbetween conditions using Pearson and Filon’s z-statistic from the R package ‘cocor’34 (Fig. 3 and Table S8). For the SST, as stimuli onsets differ acrosssubjects,wecalculatedthepartialcorrelationsbetweenstate occurrences and a given task stimulus, while controlling for other typesofstimuliattheindividuallevel.Correlationcoefficientswere compared to 0 using a one-sample t-test to determine their significances.Multipletestingeffectwascontrolledusingthefalsediscoveryrate(FDR,q<0.05)fornumberoftaskevents×4FNCstates.

Next, we examined correlation between FNC states’ dwell time withtaskperformancesintheMIDandSSTacrossparticipants(EFT does not require responses). Spearman’s rank correlation was performedastaskperformancesdonotfollownormaldistribution(Fig. S9).MIDperformancesincludeaccuracy(ACC)andresponsetime(RT) oflarge-win,small-winandno-wintrials.SSTperformancesincludego responsetime,stopresponsetime,percentageofgo-wrongerror,go too-lateerrorandstop-failureerror.Stopresponsetimewascalculated as mean go signal responsetimeminus mean stop signal delay per subject(Fig.S10).

Sparsepartialleastsquares(sPLS)betweenFNCstatedwelltime andreinforcement-relatedbehaviours
TotestifFNCstatedwelltime(theaveragelengthofasubjecthavinga certain state)30isrelated toindividualdifferencesinreinforcement-relatedbehaviours(Fig.S12andTableS9),weappliedamultiplehold-out framework for sPLS analysis using the CCA/PLS Toolkit35. Data weresplitintoatrainingandtestset(20%),andthetrainingsetwas furtherdividedintoatrainingandvalidationset(20%)toselectthe best hyperparameter (L1 penalty). The statistical significance of the test set association was determined by 5000 times permutation inference(p<0.05).Therandomdatasplitprocedurewasrepeated three times to improve model robustness, and the split with the highest test set association was reported in the Results (Fig. 4 and TableS10).Covariatesofage,sex,recruitmentsitesandheadmotion (meanframewisedisplacement)wereregressedbeforeanalysis.

Correlationbetweenpair-wiseFNCandtaskevents
To examine whether pair-wise FNC correlated with task events and show task-specific effect, we calculated the Pearson correlations betweenstrengthofpair-wiseFNCandoccurrenceoftaskconditions within a task session for every subject. For the EFT, we compared correlationcoefficientsofFNCwithangryfacesversusneutralfaces condition using one-sample t-test. Resultant t-statisticsreflects how strongly the tested FNC fluctuate with angry versus neutral faces conditions.FortheMID,wecomparedcorrelationsbetweenlarge-win andno-winconditionstoexaminewhetherthetestedFNCshowing reward sensitivity effect. For the SST, correlations are compared betweenstop-successandstop-failureconditionstotestmotorinhibition effect (Fig. 5). Next, we performed a specificity analysis to examinewhetherconnectionsshowingthehighestt-statisticsinone taskalsohavehight-statisticsintheothertwotasks.Forexample,we selectedthe20FNCwiththelargestt-statisticofangryvsneutralfaces conditionsfromEFT,andcalculatedtheirt-statisticintheMIDorSST conditions.Ifthet-statisticishigh,itsuggeststhatthetop20FNCalso distinguishMIDandSSTconditions.Otherwise,itsuggeststhatthetop 20FNCarespecificallymodulatedbyEFTconditions.Thisanalysiswas performedforallthreetasks(TableS11).

Behaviouralvarianceexplainedbytime-varyingFNCand staticFNC
To examine the variance explained for reinforcement-related behaviours (Table S9) by regional time-varying FNC and static FNC, we extractedthe20task-specificFNC(Fig.5d)fromthefourFNCstatesof eachparticipant(Fig.2ashowstheclustercentroidofeachFNCstate). In parallel, we derived the same20 task-specific regionalFNC from static connectivity analysis(i.e., to calculate a connectivity strength usingthetimecourseofanentirescanningsession,ratherthanfroma segmentoftimewindow).Toreducethenumberofbehaviouralfitting parameters, we averaged the connectivity strength of the 20 task-specific regional FNC. Therefore, we obtain four state-based time-varyingFNC,andonestaticFNCforeveryparticipant.Linearregressionmodelswerefittedforeverybehaviourwiththetime-varyingFNC, staticFNCorboth(fullmodel).Wefocusedonbehavioursthatcanbe fittedusingbothtime-varyingFNCandstaticFNC(fullmodel,model significancep <0.05,uncorrected).Amongthesebehaviours,we one-tail comparedvarianceexplained(R2),adjustedR2andlog-likelihoodto assess model fitting performance (Table S12). A higher R2 and log-likelihoodindicateabetterfitting.Weshowedonebehaviouralfitting fromeachtaskusingtime-varyingFNCandstaticFNCasanillustration(Fig.6).

STRATIFYcohort
TheSTRATIFYcohort36,37recruitedpatients(ages19-25)withalcohol use disorder (AUD), major depression disorder (MDD) and healthy controls (CON) from three recruitment sites in Berlin, London and Southampton,ofwhichBerlinandLondonarealsorecruitmentsites forIMAGEN.Forthecurrentstudy,weincludedparticipantswithAUD (n=125),MDD(n=131),andCON(n=183).
PatientswithMDDwereincludedifthey(i)exhibitedcurrentand acute depressive symptoms, with a Patient Health Questionnaire-9 (PHQ-9)score≥15,and(ii)metthediagnosticcriteriaforacurrent majordepressiveepisode,confirmedbyscoring“1”onatleastoneof the following M.I.N.I. modules: MINI_A_MDEC, MINI_A_MDEMFC, or MINI_A_MDER.
Patients with AUD were included if they (i) scored ≥ 15 on the Alcohol Use Disorders Identification Test (AUDIT), and (ii) met the diagnostic criteria for alcohol dependence or harmful alcohol use, confirmedbyscoring“1”ontheMINI_J_AACorMINI_J_ADCmodules.
Healthycontrolswereexcludediftheymetcriteriaforanyofthe abovediagnoses.DemographicinformationisprovidedinTableS13.
MRIacquisitionparametersandtaskdesignsinSTRATIFYwereharmonizedwiththeIMAGENcohorttomaximizecomparabilitybetween datasets.Additionaldetailsonstudyprotocolsareavailableat:https:// stratify-project.org/.

ReplicationofFNCstatesintheSTRATIFYcohort
Resting-stateandthethreetaskfMRIdata(EFT,MID,SST)werepre-processedwithfMRIPrep20.2.374.WethenappliedguideICAfortask fMRIdatausinggroupspatialmapsfromtheIMAGENresting-stateasa reference.Time-varyingFNCandfourFNCstateswerederivedinthe same procedure described above. We calculated spatial correlation between STRATIFY FNC states and those obtained from IMAGEN resting-stateusingPearson’scorrelation.
Next,weexaminedcognitiverelevanceoftheFNCstatesinthe STRATIFYbycorrelatingFNCstateoccurrenceswithtaskstimuliand taskperformancesasinthemainanalysis.Pearson’scorrelationwas performedbetweenoccurrencesofFNCstateandtaskstimulioccurrence of the EFT and MID session. Spearman’s correlation was performedbetweendwelltimeofFNCstateandperformancesoftheMID and SST across participants. Multiple comparison effects were controlledusingFDRcorrection(numberoftestedtasksevents×number ofFNCstates).
Finally,wetestedwhethertask-specificregionalFNCderivedfrom time-varyingFNCcanbetterfitbehaivoursinSTRATIFYcontrolsand distinguishdiseasestatus(CONvs.MDDorCONvs.AUD)thanstatic FNC. In STRATIFY controls, 19 behavioural items were available as IMAGENcohort(TableS9).Wecomparedthemodelfittingparameters R2,adjustedR2andlog-likelihoodinthetime-varyingFNCandstatic FNC regression model. In STRATIFY controls and patients, we performedalogisticregressionusingtime-varyingFNCandstaticFNCon diseasestatus(0controls,1patients).

Peer review rounds
[{"round": 1, "reviewer_comments": {"reviewer_1": "The manuscript by Chang et al. investigates time-varying functional network connectivity (FNC) during resting-state and three reinforcement-related tasks across 1,417 participants. The authors identify four consistent FNC states, showing that these states are sensitive to task performance and psychopathology. Overall, the manuscript presents valuable findings with solid validation in an independent dataset, providing novel insights into how brain networks adapt to support cognitive tasks and suggesting potential biomarkers for assessing individual psychopathology risk. However, I have several suggestions that could further strengthen the manuscript:\n1. Since the imaging data were collected from multiple sites, it would be important to investigate whether site effects influenced the FNC states and subsequent results. If significant site effects are found, harmonization techniques should be applied to address this issue.\n2. Could the authors provide more explanation as to why modularity and participation coefficient are used to represent brain network segregation and integration? These two metrics are typically negatively correlated, which may fail to capture an optimized network with both segregation and integration. Alternatively, using metrics like Cp/Lp or local/global efficiency may better characterize this issue.\n3. The MID task showed a low correlation with the clustering centroid of state 3 for resting-state and other task, suggesting a unique connectivity pattern in the MID. However, it may not be appropriate to force the MID state into state 3. Did the authors consider conducting clustering on the pooled matrix across all tasks (REST, EFT, MID, and SST)? This approach could better identify both common and task-specific FNC states.\n4. In the independent dataset, the authors observe similar patterns in the four time-varying FNC states and their associations with task performance, which is consistent with the main results. Given that this dataset includes participants with clinical conditions, it would be valuable to investigate whether these individuals exhibit altered FNC values, dynamic characteristics, or behavioral relevance compared to the primary findings. This additional analysis could provide deeper insight into the relationship between time-varying FNC and mental health.\n5. The manuscript discusses the classification capability of time-varying FNC between patients and healthy controls. However, it would be helpful if the authors could clarify which specific FNC states exhibit stronger predictive power for distinguishing between these groups.\n6. In the section \"Regional FNC Involved in Task-Specific Cognitive Processes,\" I recommend that the authors expand on the specific regions associated with each task, as well as those shared across the three tasks. This would provide a clearer understanding of the task-specific brain regions involved in each cognitive process.\n7. Including detailed clinical information about the participants from the independent STRTIFY cohort would be valuable. This should include diagnostic criteria, symptom severity, and task performance scores, along with behavioral questionnaire data. Such information would enable a more comprehensive comparison with the main findings.\n8. The authors mention different preprocessing approaches for resting-state and task-state fMRI data. It would be helpful to explain whether these preprocessing steps might have influenced the results and whether the approach was consistent across tasks.\n9. Time-varying FNC is known to be affected by head motion. A more thorough discussion of head motion in this study would be beneficial. This could include applying \"scrubbing\" to further mitigate motion artifacts or analyzing the correlation between head motion and FNC.\n10. To improve consistency and readability, I recommend formatting all tables in the manuscript as three-line tables.\n11. In Figure 2, could the authors clarify why the percentages for the four FNC states do not sum to 100% in the resting-state fMRI and EFT conditions?\n12. In Figure 6, it would be helpful to explain what the gray dots represent.\n(Remarks on code availability)\nThe code provided is well-written and reproducible, allowing for the analysis reported in the manuscript to be conducted. However, the README file lacks sufficient instructions and clarity in its presentation.", "reviewer_2": "The paper was well written, interesting, and lays out a rigorous set of analyses with an impressive replication. My biggest point of feedback is the methods are very dense which lead me to some confusion between, “states” that were found across tasks were being used as predictors or and the regional FNCs (which aren’t yet clear to me how they are calculated) and other ways functional connectivity used is such as calculating graph metrics. This seems to be a crux of the paper so I have made several suggestions where the authors could clarify the methods, as well as other points of clarification.\nThe introduction is clear and well written. I do wonder about why the authors characterize the three tasks as “reinforcement tasks” could the authors explain that?\nSince the sample is bordering on youth/adult age range and clarification if these were all adults in this sample would be helpful\nCan the authors provide rationale for smoothing the task data (5 mm) more than the rest data (4 mm)?\nSince the authors are using ICA for network definition, can they clarify what the nodes are for the graph metrics calculations of modularity and PC? Were these run voxelwise? Were the networks used to calculate PC the networks that were derived from the Louvain algorithm?\nWhen the authors are describing the correlation between pairwise FNCs and task events (Figure 5) it’s not clear; a. What pairwise FNC refers to, are these pairwise correlations between each ICA component making up each state? Or are these pairwise correlations between networks identified using the Louvain algorithm? Also, how were the regional network components given the labels that appear in Figure 5? Looks like some of this is covered in figure S2 but I missed it in the methods.\nFurther, it isn’t clear which states any of the regional FNCs are from? Or are they not from specific states but averaged along the whole task?\nI found the section describing the time-varying vs. static FNC prediction a little confusing, it’s possible ‘state’ is being used to mean both unique FNC pattern and task in this section as in “The 20 task specific FNC was averaged to derive four state-based time-varying FNC and one static FNC for every participant. “ Are these 4 different FNC’s one for each task? I am also confused by what metric is being used to predict reinforcement related behaviors , is it the average FC of that FNC? How does this capture the time-varying aspect?\nThe discussion felt a little long and repetitive. It would help the reader if the authors slimmed down the results summarizing.\nIn the discussion when the authors state - “These discoveries represent a major refinement in mechanistic characterizations of behaviour and psychopathology compared to standard neuroimaging analyses.” I’m not sure what the mechanism is they are referring to or how it has been refined, I would suggest either laying out the mechanism or avoiding such language.\nSome of the figures such as Figure 3 and 4 and in many of the supplementary figures, the individual plots are very tiny and not legible. Please increase font and plot sizes or consider breaking them into several figures.\n(Remarks on code availability)\nI reviewed the github with the code, I did not attempt to use any of the code myself. It appears as though the code is well commented. There are several changes that could help with code usability The code does not have a README nor a guide to how to use the scripts. The scripts have all paths hardcoded and it's not clear what the structure of the author's data and scripts are so including that in the README would be helpful too.", "reviewer_3": "The manuscript by Chang and colleagues characterizes the time-varying functional connectivity in three different cognitive tasks and investigates the relationship between the dynamic configurations during the task with behavioral and cognitive measures that indicate neuropsychiatric profile of the individuals. The study is exploratory in nature, which is fine given that the study uses a large dataset and they use multiple reinforcement-related tasks with clinically-relevant behavioral measures. The main methodological approaches regarding the derivation of time-varying functional connectivity is sound and consistent. However, there several major issues in the manuscript that should be addressed. In brief, a central point of the manuscript is the discrete FNC states, given the exploratory nature of their study, it is essential to characterize those states, which is not sufficiently done in the manuscript. Another general issue about the manuscript is that the relationship between multiple analysis approaches was not very established. Finally there are some concerns regarding the some of the results that could be addressed by more rigorous approaches.\nMajor comment 1: The manuscript puts little emphasis on characterizing and defining what each state might indicate. For example, how each state is related to the global fluctuations? Do linearly increasing trend in state 3 is also exhibited in the resting-state? What are the proportions of the networks (and how they are similar/different to resting-state networks) at each state? What is the level of anti-correlations for each state and across which networks? Does high number states lead to very frequent jumps between states rather than more continuous dwell times? Do some FNCs coincide with responses, or epochs in which head movement is more probable? The elbow criterion is a straight forward approach to decide the number of states. However, a systematic investigation of these states would affect the decision as well. So far I see the dwell times of each state do not differ much between resting-state and across task scans, which raises doubts on their implication on task. Furthermore, figure 3 suggest that there are very subtle differences between states 2, 3 and 4, which is very difficult to figure out. Although there are a lot of material in supplementary text, they help understanding different number of states or sliding window lengths, but they do not help understanding what each FNC state might indicate.\nMajor comment 2: In Figure 2, the values in radial plot at panel b does not resemble those in the bar plots at panel c. For example, the average participation coefficients of state 2 and state 4 is very similar in panel c, but in the radial plot state 2 and 3 exhibit similar participation neg, whereas state 4 has a much higher values close to state 1. Similarly, modularity of state 4 appears to be around 3 in panel c, but it is around 2.5 in panel b. Please double check or explain why these differences appear in the figure.\nMajor comment 3: I am confused due to the continuous time courses of the state occurrences for EFT and SST tasks in Figure 3. As they used k-means clustering to identify time-varying FNC states, it is expected that for each centroid the occurrences would be in discrete times. I could not find any explanation to understand how that occurrences were calculated. I am guessing that the numbers indicate total occurrences across subjects (or probability of occurrences, which is not clear neither in the text nor in the figure).\nMajor comment 4: The authors claim differences in correlations between FNC states and blocks that indicates certain features of the task. However, they do not show whether these correlations actually mean something significant at first place. Although for EFT task it is pretty clear that there is an association between detected states and task blocks, for the other two task is the correlation is very low and the evidence for a significant effect is not convincing. For example, although the authors claim a significant difference between large-win and small-win correlations of state 1 and 2, the correlations for MID task are very low r < 0.2. Indeed, a visual inspection of the task block suggest that MID task blocks appears to have a temporal structure, i.e. “no-win” trials are concentrated in the beginning of the session, “small-win” trials are concentrated at the middle and “large-win” trials are concentrated at the end of the session. Whether or not this is imposed by chance, it might be imposing a low correlation, also given that the authors seem to report Pearson correlation in this analysis that is sensitive to outliers. The authors should have strictly control for any redundant correlations before claiming any association between FNC states and task blocks. This is even more clear in SST task. The all distributions presented in Figure 3c suggest that the average correlation between FNC states and task blocks might not be different than 0, maybe with an exception of state 3 vs. “go-too-late”. Before comparing the correlations across task blocks, the authors should test whether these distributions are significantly different that 0, preferably against a null model in which the correlations are calculated by random states with matching frequencies but time information is scrambled.\nMajor comment 5: The authors claim that state 3 might be related to “attention lapses”. Related to the previous comment that the authors put insufficient efforts to characterize each of these states, the authors do not present any evidence that might suggest such speculation plausible. In resting state studies similar states can be observed and they are typically seem to be related to changes in arousal or sleep. State 3 appears to be related to activation or deactivation of sensory networks. As I suggested before please check whether this state exhibit similar temporal structure in resting-state as well and carefully support any claims with evidence and/or reference to previous literature.\nMajor comment 6: The results that are presented in Figure 4 is not penetrable and it is not easy to match them to those described in the text. Possibly, there are some latent variables representing externalizing and internalizing symptoms that are correlated with each other. On the righthand side the regression plots suggest that there is a weak but significant effects. However, it is not possible to understand what is being plotted and that what the latent variable indicate. Also the weights for those behavioral abbreviations are difficult to make sense of, it is not possible to spot externalizing and internalizing symptoms. Moreover, the authors do not elaborate how these results make sense in light of other results. As far as I see there is no good correspondence between the results presented in Figure 2 and PLS results. For example despite strong correlations with task blocks with EFT, this task does not appear in PLS analysis. Also, this analysis shows that FNC state 3 also appears to be relevant in resting-state. This also supports the suspicion that the component what is thought to be attention lapse might be sleep/arousal-level related.\nMajor comment 7: I am not sure if I understood very well the analysis regarding task contrasts presented in figure 5. As far as I understood, this analysis shows that other features of FNCs explain task related activity better than discrete states that are extracted by k-means clustering. Indeed, all these results points to a that trying to detect discrete whole-brain states might not be possible and instead there might be overlapping configurations of networks. So far I know, this is a common problem in many time-varying functional connectivity studies. Therefore it is not possible to expect the authors to address this issues completely. However, it is important to consider its implications, which might change the interpretation of the results. Moreover, from the distributions in figure 5, one would expect there would be negative connectivity patterns that are as strong as the positive ones. Why the authors did not include negative connections?\nMinor comment: Please add a legend to Figure 2 indicating the abbreviations used for each network as in supplementary figure 4.\nMinor comment: In figure 3, the time-courses of the first state suggest that indeed this state is almost perfectly in line with presentation of faces regardless of the emotional content. It is clear that if they merge all face trials, the correlations with state 1 would drastically increase.\nMinor comment: In the field of time-varying fMRI, multiple terminologies appears, which is inconvenient. This issue is not addressed well in the paper. One important distinction is that many papers that the authors discussed in the introduction deals with the functional connectivity that defines a cortical area through contagious parcels based on anatomical and/or functional architecture. As far as I understood, the authors especially chose the term functional network connectivity (FNC) to emphasize the fact that they measure the interactions between functional networks from ICA instead of cortical areas. It is important to clearly distinguish these differences throughout the manuscript.\n(Remarks on code availability)", "reviewer_4": "I co-reviewed this manuscript with one of the reviewers who provided the listed reports. This is part of the Nature Communications initiative to facilitate training in peer review and to provide appropriate recognition for Early Career Researchers who co-review manuscripts.\n(Remarks on code availability)"}, "author_response": "Point-by-point response\nReviewer #1 (Remarks to the Author):\nThe manuscript by Chang et al. investigates time-varying functional network connectivity (FNC)\nduring resting-state and three reinforcement-related tasks across 1"}]

Decision letter