Introduction

Resilience, which is crucial for mental health, refers to the capacity for positive adaptation in coping with stress1. Childhood trauma (e.g., emotional abuse, physical abuse and sexual abuse), affecting over a billion people globally2, heightens the risk of emotional disorders such as depression and anxiety3. These disorders have been linked to dysfunctions in the brain’s emotion processing system (e.g., brain regions activated during emotion perception and emotion regulation)4, which is influenced by genetics during adolescent brain development5,6. Advanced knowledge of the genetic influences on the brain’s role in resilience can enhance the prediction of emotional disorders and aid in accurately identifying vulnerable individuals to facilitate early intervention.

In population-based neuroimaging studies, a brain marker of resilience is typically identified by its association with fewer emotional symptoms following childhood trauma1,7. Emotional disorders are characterised by dysfunctions in the brain’s emotional circuits, especially for processing negative emotional information8. Accordingly, many previous studies have focused on brain responses to negative emotional stimuli (e.g., angry and fearful faces) in predefined regions of interest9,10,11,12, including the orbitofrontal cortex (OFC), medial prefrontal cortex, anterior cingulate cortex, and amygdala13. These regions have been employed as candidate regions for identifying brain markers of resilience1. Following childhood trauma, maladaptive responses in these regions (e.g., hyper amygdala reactivity14, weaker medial prefrontal cortex activity15, etc.) to negative emotional stimuli are associated with susceptibility to emotional disorders, whereas adaptive responses indicate resilience16. These adaptive responses are considered brain markers of resilience. However, these regional findings remain inconclusive. For example, the role of the amygdala in resilience appears inconsistent in the literature, with both hyper-17 and hypo-14 amygdala responses to negative emotional stimuli linked to resilience. Emerging evidence suggests that brain networks, rather than isolated regions, provide more robust associations with emotion processing18. This implies that resilience may be a property of functional networks as a whole. Therefore, functional networks for emotion processing in adolescent brains may serve as better candidate networks for identifying brain markers of resilience.

Meanwhile, sex differences in the brain markers of resilience have also been reported in the literature19,20,21. For instance, resilience is associated with stronger spontaneous OFC activation in boys, but weaker activation in girls19, as well as larger prefrontal volume in boys and smaller volume in girls20. Such sex differences have also been observed in the temporal and frontal volumes21. Although boys and girls may share the same brain networks for emotion processing, sex differences have been observed in the maturation processes of these networks22. Therefore, these brain networks may play different functional roles in resilience between boys and girls.

These previous studies have primarily focused on the association between a brain feature, as a marker of resilience, and reduced emotional symptoms in individuals exposed to trauma. However, this association does not exclude the possibility that the brain feature could correlate with fewer emotional symptoms independent of childhood trauma, i.e., a trauma-independent form of protection. A marker of resilience may instead be defined by a two-way interaction between a brain feature (e.g., higher / lower activations) and childhood trauma (e.g., exposure / non-exposure), where this brain feature reduces the impact of childhood trauma on emotional symptoms, i.e., a trauma -related form of protection. Studying resilience based on interactions between childhood trauma and brain markers is rare in the literature, but it is important to distinguish between trauma -related and trauma -independent forms of protection when defining the brain marker of resilience to developing emotional disorders following childhood trauma1. This is crucial, as emotional symptoms during childhood and adolescence have been associated with an elevated risk of developing major depressive disorders (MDD) in adulthood23,24. Thus, such a two-way interaction could enhance the ability to predict emotional disorders.

In another line of research, the diathesis-stress model25 suggests that genetic predispositions, which may cause maladaptive brain changes following childhood trauma, can increase the risk of developing emotional disorders. A classic example is the depression-related 5-HTTLPR short variant, where carriers exhibit negative associations between amygdala responses to emotional faces and life stress, while non-carriers show positive associations26. A recent example is that following negative life events, frontal and parietal volumes decreased (i.e., adaptive changes following environmental stress) in healthy controls but increased (i.e., maladaptive changes) in MDD patients27. Particularly, lower amygdala responses to looming faces are significantly associated with higher resilience, as measured by the Connor-Davidson resilience scale, in nondepressed young adults with, but not in those without, a family history of depression28. Therefore, we hypothesised that the roles of brain networks in resilience might differ between subpopulations of individuals with varying genetic risk profiles, such as higher or lower polygenic risk scores for MDD (PRSMDD)29. To assess whether PRSMDD moderates these roles, a three-way interaction involving brain networks, childhood trauma, and PRSMDD should be tested. Identifying such an interaction could define a genetic risk-dependent brain marker of resilience (GRBMR), which is associated with fewer emotional symptoms following childhood trauma within a genetic risk-stratified subpopulation only, but does not indicate universal resilience in the whole population. However, previous studies have struggled to detect significant three-way interactions due to limited sample sizes. Recently, the IMAGEN study, a neuroimaging cohort of adolescents30, provided a uniquely large sample size to detect this interaction effect.

Based on these studies and considerations, we hypothesise that the adolescent brain’s emotional processing networks, rather than any single brain region, are more suitable candidates for identifying resilience markers that are predictive of subsequent emotional disorders. Importantly, the roles of these networks in resilience should be examined in a genetically dependent manner and analysed separately for boys and girls. To test this hypothesis, we aim to answer the following four main questions (Fig. 1): (1) Can we isolate functional networks in the adolescent brain’s emotion processing system as candidate networks for identifying markers for resilience? (2) Can we identify the GRBMR by detecting significant three-way interactions among these functional networks, childhood trauma and PRSMDD, when analysed separately for boys and girls? (3) Can these identified GRBMR predict subsequent emotional disorders? (4) Are these predictions generalisable to other developmental stages and independent datasets?

Fig. 1: Data analysis flowchart.
figure 1

a Longitudinal cohorts included in the study. b Distinct functional networks were identified as candidate networks whose adaptive responses to angry faces may indicate resilience, using sparse non-negative matrix factorisation (sNMF) applied to brain responses to angry faces. c Genetic risk-dependent brain markers of resilience (GRBMR) were identified by testing a three-way interaction among childhood trauma, PRSMDD and candidate networks (shown in b) in relation to emotional symptoms at age 19, analysed separately for boys and girls. The error bands denote 95% confidence intervals around the regression lines. d The predictive utility of GRBMR was assessed using machine learning models. e Generalisability of the prediction was evaluated across developmental stages and in an independent dataset.

Results

Summary of experimental steps

Instead of using brain areas as candidate regions for identifying markers of resilience, the first analysis was to isolate functional networks within the brain’s emotion processing system as better candidates. Using a large neuroimaging sample of adolescents (19.02 ± 0.75 years; N = 809, 430 girls; the IMAGEN cohort30; Table 1), we decomposed brain responses to angry faces into distinct functional networks by sparse non-negative matrix factorisation (sNMF). These networks were further characterised by their neuroanatomy, function, development, and sex differences. Second, for each of these candidate networks, we evaluated the interaction effect between its response to angry faces and childhood trauma on emotional symptoms separately for boys and girls. To identify GRBMRs, we further examined three-way interactions on emotional symptoms, involving the candidate networks, childhood trauma and PRSMDD. Third, we conducted longitudinal analyses to assess predictive values of the identified GRBMRs in genetically stratified populations. We built prediction models using the data collected at age 14 to predict emotional disorders at age 19. Finally, we tested the generalisability of the prediction models using both the latest follow-up data at age 23 in the IMAGEN cohort and another independent cohort, namely the Adolescent Brain Cognitive Development (ABCD) cohort31 (Fig. 1).

Table 1 Demographic characteristics of the IMAGEN sample in this study

Candidate networks for identifying brain markers of resilience

The brain’s emotion processing system was activated by an fMRI face task30. We analysed the angry>neutral contrast map for activations responding to angry faces higher than those to neutral faces (Figs. 1b, 2a). By applying the sNMF with optimal parameters to these brain activation data (Supplementary Fig. S2), we identified two distinct functional networks, including the orbitofrontal- and occipital-related networks (Fig. 2b). The orbitofrontal-related network mainly covered the lateral orbitofrontal cortex (OFC), ventromedial prefrontal cortex (vmPFC), medial superior prefrontal cortex, anterior cingulate cortex (ACC), precuneus, posterior cingulate cortex and dorsolateral prefrontal cortex (dlPFC) (Supplementary Table S2). The occipital-related network was mainly located in visual cortical regions: the lingual gyrus, cuneus, part of the inferior occipital gyrus (including the occipital face area, OFA), fusiform gyrus (including the fusiform face area, FFA), insula, amygdala, and Heschl’s gyrus (Fig. 3a and Supplementary Table S3). Using a database of brain functions (i.e., the NeuroSynth32), we found that the orbitofrontal-related network was mainly related to high-level cognitive terms, such as episodic memory, memory retrieval and self-reference, while the occipital-related network showed associations with perceptual terms, such as vision and perception (Fig. 3b).

Fig. 2: Identification of functional networks within the brain’s emotion processing system.
figure 2

a Brain responses to angry faces were decomposed into factors (i.e., functional networks) and factor weights (i.e., network activation) using sparse non-negative matrix factorisation. b Brain maps show the orbitofrontal-related and occipital-related networks. The colour scale indicates voxel-wise factor values, with brighter colours representing higher contributions to the spatial profile of each network. Source data are provided in the Source Data file.

Fig. 3: Neuroanatomical and functional characterisation of the two identified networks.
figure 3

a Proportion of voxels within AAL2 regions covered by the orbitofrontal- and occipital-related networks. b NeuroSynth decoding of the two networks. The lollipop charts show the correlation coefficients for each network with the top 10 functional terms. CING, cingulate cortex; INS, insula; SM, sensorimotor. Source data are provided as a Source Data file.

Sex differences in these networks

We found significant sex differences in these two networks at age 19 years and in their developmental trajectories between ages 14 and 19 years. Compared with boys at age 19, we found that the network activation (i.e., the factor weight) of the occipital-related network was smaller in girls (\(\beta \)=− 0.230, 95%CI = [− 0.369, − 0.090], p = 0.001; Supplementary Table S7). During the 5-year follow-up period, we found that the activation of the orbitofrontal-related network increased in both boys (\({\eta }_{p}^{2}\) = 0.012, F = 4.509, p = 0.034) and girls (\({\eta }_{p}^{2}\) = 0.010, F = 4.142, p = 0.042). Meanwhile, the activation of the occipital-related network significantly increased in boys (\({\eta }_{p}^{2}\) = 0.012, F = 4.593, p = 0.033) but not in girls (p = 0.643; Supplementary Tables S8, 9).

Genetic moderations of the brain networks’ roles in resilience

As expected, higher levels of childhood trauma were associated with more emotional symptoms at age 19 in both boys (\(\,\beta \) = 0.205, 95% CI = [0.091, 0.319], p = 0.0004, N = 379) and girls (\(\,\beta\, \)= 0.146, 95%CI = [0.059, 0.234], p = 0.001, N = 430; Fig. 4a).

Fig. 4: Distinct brain markers of resilience for girls within different genetic risk strata.
figure 4

Childhood trauma was dichotomised based on clinical cut-offs (see “Methods”). a Girls with childhood trauma (N = 100) exhibited more emotional symptoms than those without exposure (N = 330; t = 5.139, ptwo-sided = 8.18\(\times \)10−7; two-sample t test). b No significant two-way interactions between trauma and either PRSMDD or network activations. c,d For illustration, PRSMDD was binarised by median split. After controlling for main effects and all two-way interactions, significant three-way interactions were observed among trauma, PRSMDD and activations of the orbitofrontal- and occipital-related networks. e,f Network activations were similarly binarised. Group differences in symptom levels were assessed using two-sample t tests. e In girls with high PRSMDD, those with low orbitofrontal-related activation and trauma exposure (N = 32) had more symptoms than those with low activation but without exposure (N = 73; t = 5.764, ptwo-sided = 3.19\(\times \)10−7), and also more than those with high activation despite exposure (N = 21; t = 2.152, ptwo-sided = 0.037). f In girls with low PRSMDD, those with high occipital-related activation and exposure (N = 25) had more symptoms than those with high activation but without exposure (N = 81; t = 2.929, ptwo-sided = 0.004), and also more than those with low activation despite exposure (N = 22; t = 2.082, ptwo-sided = 0.043). In a, e and f, the upper and lower whiskers represent the Q3 + 1.5 × IQR and Q1 − 1.5 × IQR, respectively. The upper and lower edges of a box represent the Q3 and Q1, and the central line represents the median. In b-d, the error bands represent the 95% confidence intervals of the linear fitted models. *p < 0.05; **p < 0.01; ***p < 0.001; ns, non-significant. Source data are provided in the Source Data file.

For both boys and girls, we found no significant two-way interactions between childhood trauma and either PRSMDD or activations of the two networks identified above (Fig. 4b). These findings suggest that neither PRSMDD nor network activations per se are sufficient to independently indicate resilience.

In girls, we identified two GRBMRs as defined by two significant three-way interactions between childhood trauma, PRSMDD, and the activations of both the orbitofrontal-related (Cohen’s f2 = 0.058, \(\beta \,\)= − 0.128, 95%CI = [− 0.224, − 0.031], p = 0.009; Fig. 4c) and occipital-related (Cohen’s f2 = 0.067, \(\beta \)=− 0.148, 95%CI = [− 0.253, − 0.043], p = 0.005; Fig. 4d) networks in predicting emotional symptoms at age 19 (Supplementary Table S10 and 11). The Shapiro-Wilk normality test33 confirmed the applicability of these linear models with three-way interaction terms by testing the normality of model residuals (all W > 0.96 and p > 0.05).

As binarized for illustrative purpose in Fig. 4e, among girls with higher PRSMDD, we observed a two-way interaction between the orbitofrontal-related network activation and childhood trauma (\(\beta \)=− 0.147, 95%CI = [− 0.262, − 0.032], p = 0.012, N = 215), where higher network activation reduced the association between childhood trauma and increased emotional symptoms, and thereby defined a brain marker of resilience for girls with higher PRSMDD. However, this two-way interaction was not significant among girls with lower PRSMDD.

As illustrated in Fig. 4f, among girls with lower PRSMDD, we also found a two-way interaction between the occipital-related network activation and childhood trauma (\(\, \beta \,\)= 0.183, 95%CI = [0.015, 0.351], p = 0.011, N = 215), where lower network activation reduced the association between childhood trauma and increased emotional symptoms, and thereby defined another brain marker of resilience for girls with lower PRSMDD. However, this two-way interaction was not significant among girls with higher PRSMDD.

No such three-way interactions were significant in boys; thus, we focused on girls in the following analyses.

Sensitivity analyses

The three-way interactions identified above remained significant in the following sensitivity analyses. First, we confirmed that our current sample provided enough statistical power to detect those three-way interactions. To detect a three-way interaction with a small-to-medium effect size (Cohen’s f2 = 0.058) at a significance level of 0.05, and a desired power of 0.8, a sample size of 358 was required, as indicated by the power analysis in the R package ‘pwr’ (version 1.3.0). Second, these interactions were confirmed when the childhood trauma was binarised by clinical cut-offs (Supplementary Table S15). Third, these interactions remained significant after additionally controlling for the age, childhood neglect, IQ and substance use (Supplementary Table S16). Fourth, these interactions were specific to emotional symptoms only and were not significant for the other four types of behavioural problem scores in the SDQ. Fifth, these interactions on the emotional symptoms were specific to PRSMDD and were not significant for either PRSADHD or PRSSCZ (Supplementary Table S17).

Prediction of emotional disorders

Next, we assessed the predictability of the two GRBMRs identified above for emotional disorders. Separately for girls with the higher and lower PRSMDD, we built machine learning models using data collected at age 14 to predict emotional disorders at age 19 (N = 430), and compared the model performance by the 5-fold cross-validation with 10 repetitions (see “Methods”). Among girls with higher PRSMDD, we found that the GRBMR model using the interaction term between the orbitofrontal-related network activation and childhood trauma outperformed the network model without using the interaction term, which in turn outperformed the baseline model without using the network activation. These findings were consistent across various thresholds for the higher PRSMDD (Table 2; see “Methods”). These findings were not significant for either girls with lower PRSMDD or when using the occipital-related network.

Table 2 Comparison of model performance for the prediction of emotional disorders in girls at age 19

Generalisability of the prediction model

Using the latest follow-up data collected in the IMAGEN cohort, we found that the predictability of the GRBMR model extended into early adulthood. Specifically, the GRBMR model with the orbitofrontal-related network activation at age 19 significantly improved the prediction of emotional disorders at age 23 in girls with higher PRSMDD (Table 3).

Table 3 Comparison of model performance for the prediction of emotional disorders in girls at age 23

In the independent ABCD cohort31, the emotional n-back (EN-back) task34 is an emotional face paradigm used to probe the brain’s emotion processing system. We used the fMRI data from the EN-back task to obtain the corresponding network activations for the two networks identified above in the IMAGEN cohort. Again, we demonstrated that the GRBMR models using the orbitofrontal-related network activation at age 10 enhanced the prediction of emotional disorders at age 11 among girls with higher PRSMDD (Table 4).

Table 4 Comparison of model performance for the prediction of emotional disorders in girls from ABCD cohort

Discussion

Guided by our hypotheses, this study investigated the functional role of the adolescent brain’s emotional processing networks in resilience in a genetically dependent manner, with analyses separately for boys and girls. First, we isolated two candidate networks, the orbitofrontal- and occipital-related networks, for identifying markers of resilience. These networks exhibited different developmental patterns and significant sex differences. Second, building on our established two-way interaction approach for identifying brain markers of resilience (i.e., a brain marker is associated with a reduced trauma-symptom association), we hypothesised distinct neural mechanisms of resilience in subpopulations carrying different genetic risk profiles. Indeed, our three-way interaction analyses identified two GRBMRs: (1) Within the group of girls carrying high PRSMDD exposed to childhood trauma, higher orbitofrontal-related network engagement during angry-face processing is associated with fewer emotional symptoms, a sign of resilience; (2) Within the group of girls carrying low PRSMDD exposed to childhood trauma, lower occipital-related network reactivity to angry faces is associated with fewer emotional symptoms, a sign of resilience. Thus, we have identified two brain markers of resilience, strengthened regulatory engagement and reduced threat reactivity, for girls carrying high and low polygenic depression risks, respectively, where resilience refers to fewer emotional symptoms following childhood trauma within their respective genetic contexts. Third, we found that among girls with higher PRSMDD, the orbitofrontal-related GRBMR at age 14 significantly improved the prediction of emotional disorders at age 19. Fourth, this predictive improvement was validated using the latest follow-up data collected at age 23 in the IMAGEN cohort and was generalisable to another independent cohort (i.e., ABCD). These findings highlight the genetic influences on orbitofrontal cortex function related to resilience, suggesting how markers for resilience can be used, and having implications for targeting treatment to appropriate individuals at risk.

Our findings revealed two separable and interacting networks processing angry facial expressions in adolescents. The existing literature has hypothesised that there are multiple interconnected emotional circuits in the brain for facial emotion processing35, and these systems have hierarchically developmental trajectories during adolescence36. Here, combining a longitudinal functional neuroimaging sample of the emotional face task for adolescents with an advanced matrix factorisation approach, we identified a two-network system underlying angry face processing. Many key parts of the orbitofrontal-related network, including the vmPFC37, the ACC38 and the lateral OFC39, have long been implicated in the neural representations of negative emotion40. Notably, this network covering more than 80% of the lateral OFC but less than 23% of the medial OFC (Supplementary Table S2) provided strong evidence supporting the theory of a positive-to-negative gradient in the medial-to-lateral OFC41. Meanwhile, the occipital-related network, which is in fact a ventral cortical stream network that includes the FFA, that is involved in visual perception, is well supported by a 2022 meta-analysis of 141 fMRI studies showing the occipital cortex as a key part of the emotion processing system42. Longitudinally, the medial prefrontal activity in the orbitofrontal-related network implicated in emotion regulation grows throughout adolescence43, while the occipital activity, including those in the face-selective regions (i.e., the fusiform gyrus) in the occipital-related network often shows substantial developmental changes before adolescence44. These changes in the two-network emotion processing system may confer some adaptive advantages, such as greater flexibility in adjusting one’s intrinsic motivations and goal priorities amidst changing social contexts in adolescence.

The current findings emphasise that different brain systems can have different functional roles related to resilience to developing emotional disorders following childhood trauma within subpopulations carrying distinct genetic risk profiles. Our hypotheses and analyses focus on the resilience, referring to fewer emotional symptoms following childhood trauma within each genetic risk-stratified subgroup. This is different from previous studies investigating the resilience that is universal in the whole population45. For example, following childhood trauma, individuals with the high orbitofrontal-related network activity had fewer emotional symptoms when compared with their peers within the subgroup carrying high PRSMDD; however, this did not hold when compared across the genetic subgroups, i.e., with low-PRSMDD individuals following childhood trauma. The functional networks (i.e., the orbitofrontal- and occipital-related networks), where we identified the GRBMRs, covered the brain regions that have been implicated in resilience in the literature1, such as the OFC and ACC in the orbitofrontal-related network and the amygdala in the occipital-related network. Different from previous studies, we could not uncover any brain marker of resilience on the whole population despite the large size of the IMAGEN sample. Instead, our finding of genetic moderation of the resilience-brain network relationship provided a possible explanation for the inconsistent findings reported in the literature. For example, following stressful life events, genetically high-risk individuals (i.e., carriers with the depression-related 5-HTTLPR short variant) displayed elevated amygdala activation in response to fearful faces, while the low-risk individuals showed inverse activation patterns26. Such moderation is not so surprising, as the genetic risks for depression have already been associated with both structures and functions of the brain’s emotion processing system46. Furthermore, our finding of the resilience-related advanced maturation in orbitofrontal function provided new evidence for the stress acceleration hypothesis of resilience47, suggesting that it should account for individuals with varying genetic risks. The stronger function of the orbitofrontal-related network, including the dlPFC, OFC and hippocampus, may be linked to resilience through a better neurocognitive function of the top-down suppression of traumatic memories48. This link was further supported by a clinical rTMS study of patients with MDD, where depression symptoms were ameliorated through enhanced activations in both OFC and hippocampus49. This is also supported by the overlap between this network and the default mode network (DMN), particularly medial frontoparietal regions, which have been implicated in remembering the past and self-referencing50. In an imaging genetic study, the alterations of the DMN have been associated with both childhood trauma and the gene expression of SLC6A451. Furthermore, our enrichment finding of the dopaminergic synapse pathway (Method S5, Supplementary Figs. S4, 5) provided a neurobiological link between the orbitofrontal-related network and the dopaminergic signature of resilience52.

Our finding of non-significant three-way interactions in boys may be due to the fact that boys exhibit fewer emotional symptoms at age 19 when compared with girls53. Furthermore, girls have been found to exhibit greater developmental reorganisation of the depression-related brain system during adolescence than boys, a process modulated by expression of X chromosome genes22. This heightened plasticity may increase girls’ neural sensitivity to environmental stressors like childhood trauma54. In addition, sex differences in depression risk mechanisms are evident: postmortem brain studies reveal distinct molecular changes between male and female MDD patients55, and animal models demonstrate that female-specific resilience genes (e.g., LINC00473) are downregulated in depressed female mice but not males56. Together, these literatures suggest that girls’ dynamic neurodevelopment and stronger genetic susceptibility create a biological context where gene-environment-brain interactions are more readily detectable. In contrast, boys’ neurodevelopmental trajectories may be less influenced by such interactions due to their lower baseline emotional vulnerability, reduced depression-related neural plasticity, and/or sex-specific genetic buffering mechanisms, potentially explaining the absence of detectable resilience markers in our study.

Our findings also have significant clinical implications for promoting adolescent mental health. In this study, we also examined whether three-way interactions between activations of two identified networks, childhood trauma and PRSMDD were associated with emotional symptoms at age 14 in the IMAGEN cohort and at age 10 in the ABCD cohort. We found that these interactions had the same trend as the main finding at age 19 but did not reach a statistical significance level (Supplementary Table S18). This result might be understood by the developmental change from childhood to adolescence22. Despite the lack of replication in three-way interactions in different age groups, the prediction of subsequent emotional disorders using the interaction term between orbitofrontal-related network activation and childhood trauma demonstrated generalisability. This suggests that while cross-sectional interactions may be age-specific, the underlying predictive mechanism is developmentally robust, and the window for building resilience by enhancing the function of this network may extend from preadolescence to late adolescence. The predictive value might come from the significant maturation processes of this network during adolescence, as the occipital-related network with non-significant change during the same period was not predictive. Recently, neurofeedback training, such as the real-time fMRI feedback training of OFC57 and amygdala58, have been used to enhance emotion regulation skills and reduce emotional symptoms. However, the intervention results are mixed59. Our findings suggest that the OFC-targeted interventions might be particularly effective for those individuals carrying high genetic risks for depression. Therefore, the genetic-informed and neuroimaging-targeted approach might offer a promising way of promoting adolescent mental health.

The current study is not without limitations. First, we focused only on the brain function involved in facial emotion processing. Future studies are needed to test the generalisability of our findings to other types of emotional processing, which might lead to the discovery of additional brain markers for resilience. Second, data on childhood trauma exposure were collected retrospectively at age 19. Future prospective cohort studies are needed to exclude the potential for recall bias. Third, although our main findings in the IMAGEN cohort were generalisable to the independent ABCD cohort, these two cohorts mainly cover the White population with middle-to-high socioeconomic status. Therefore, future studies are needed to test whether the main findings could generalise to broader populations with diverse socioeconomic or racial/ethnic backgrounds. Fourth, apart from the covariates considered in the current study, many other psychosocial, cognitive and environmental factors (e.g., intervention programme, school engagement, etc.) can also contribute to the recovery from the exposure to childhood trauma60. Future researches with comprehensively characterised information of these factors are needed to assess the effects of these factors on resilience. Fifth, recent literature highlights that resilience may manifest across multiple domains of functioning61. While our study focused on mental health symptoms, future studies could examine other social, academic and cognitive domains of functioning. Sixth, we only found significant results for emotional symptoms in girls. Future studies could investigate externalising symptoms, which may be more prevalent in boys, to identify brain markers of resilience for them. Seventh, future pre-registered studies should validate the finding that the relationship between childhood trauma and emotional symptoms would differ as a function of orbitofrontal-related network activation in a sex-dependent fashion. Finally, the clinical value of building resilience through the genetic-informed and neuroimaging-targeted intervention strategy needs to be tested by randomised clinical trials.

Taken together, our study uncovered distinct brain markers, associated with fewer emotional symptoms following childhood trauma—whose effects differed between two subpopulations stratified by polygenic risk for depression (high vs. low), as revealed by a significant three-way interaction.

Methods

Participants

Participants were drawn from the IMAGEN project, a multicenter longitudinal study of adolescent brain development and mental health that recruited 2000 participants at age 14 in Europe and the UK30. Among them, 1335 participants had neuroimaging data at both ages 14 and 19. Following the previous work62, we selected 1269 participants with consistent activation patterns by examining the similarity of brain activations across research sites. Since genotype data were only available for Caucasian participants, this study included 809 Caucasian adolescents (430 girls) with complete neuroimaging, mental health, childhood trauma, and genome data (Table 1 and Supplementary Fig. S1). Notably, the included sample did not differ significantly from the excluded IMAGEN participants in key demographic or psychological variables (Supplementary Table S1). The local research ethics committees approved this study, and written consent was obtained from each participant and a parent or guardian.

Measurements

Behavioural and emotional problems

The Strengths and Difficulties Questionnaire (SDQ63) is a valid and reliable assessment and is often used to measure the emotional and behavioural problems in adolescents, including emotional symptoms, conduct problems, hyperactivity/inattention, peer relationship problems, and prosocial behaviour. SDQ questionnaires gathered directly from adolescents themselves are more reliable than those from their parents, especially for the emotional symptom subscale64. Therefore, the self-reported versions of the SDQ at ages 14 and 19 were used in this study.

Childhood trauma measurements

The Childhood Trauma Questionnaire (CTQ65) is a 28-item self-report inventory used to assess the history of abuse and neglect before the age of 19 years. Given that the IMAGEN study is based on a population cohort, the severity of reported abuse may be underestimated. In this study, three abuse subscales (i.e., emotional abuse, physical abuse and sexual abuse) were summed to generate a composite measure of childhood trauma66. The higher the composite score, the greater the severity of childhood trauma.

Polygenic risk scores

Since emotional disorders are not single-gene diseases, it is promising to use PRS to reflect the complex genetic architecture in the context of environment-gene-brain interactions7. We used GWAS summary data from European-ancestry participants (135,458 cases and 344,901 controls) provided by the Psychiatric Genomics Consortium67 as the discovery sample. Cases were required to meet international consensus criteria (DSM-IV, ICD-9, or ICD-10)68,69,70 for a lifetime diagnosis of MDD, while controls were screened for the absence of lifetime MDD. 493,592 single-nucleotide polymorphisms (SNPs) were shared by the discovery sample and the IMAGEN cohort. After the quality control measures (Method S1), a total of 123,481 SNPs were selected to compute the PRSMDD in our sample using the genetic analysis tool PLINK (version 2.0). The means of the PRSs at 7 p-value thresholds (i.e., 0.001, 0.05, 0.10, 0.20, 0.30, 0.40, and 0.50) were used in the current study in keeping with a previous study62. The principal component analysis of ancestral information was performed, and the first 8 principal components (PCs) were used as covariates when PRS was considered as the predictor in the models.

Nuisance covariates

Pubertal status was assessed using the Pubertal Development Scale. A total neglect score was generated from the summation of two types of neglect (i.e., emotional neglect and physical neglect) in the CTQ. Socioeconomic status was rated according to the total score derived from all the 16 items related to family stress of the Development and Well-being Assessment, with each item offering three response options: 0 (‘No, or does not apply’), 1 (‘A little’), and 2 (‘A lot’). Therefore, a lower score represents a better socioeconomic condition. The IQ score of each participant was calculated as the total score derived from the Wechsler Intelligence Scale for Children-Fourth Edition (WISC-IV). Substance use was measured using the European School Survey Project on Alcohol and Drugs (ESPAD) as ever/never smoking cigarettes, drinking alcohol, or using illicit drugs.

The face task and fMRI preprocessing

The face task paradigm was used to elicit strong activation in the brain’s emotion processing system. In this task, participants passively watched 18 s blocks of either a face movie (presenting faces with angry, happy or neutral expressions) or a control stimulus (concentric circles). Details can be found in the initial report on this paradigm71. In this study, we explored the neural reactivity associated with angry expressions, as neuroimaging data on these expressions was available at both ages 14 and 19. After the fMRI pre-processing (Method S2), the contrast map of angry vs. neutral faces was obtained for each participant. The angry > neutral (i.e., the activations responding to angry faces were higher than those to neutral faces) activations were used to measure the activation of the emotion processing system in the brain responding to angry faces. Although the mechanisms underlying the neutral > angry activations remained unclear, we still examined such activations in the supplementary materials to enhance the comprehensiveness of our study. The voxels within the automated anatomical labelling (AAL2) template72 for grey matter were considered in the following analyses (47,640 voxels).

Matrix decomposition

We constructed an activation matrix for the angry>neutral activations. The activation matrix has a number of rows equal to the voxel count (m = 47,640) and a number of columns corresponding to the number of subjects (n = 809). Sparse non-negative matrix factorisation (sNMF) was employed to decompose the activation matrix at age 19 into a factor matrix and a weight matrix (Fig. 2a). To facilitate meaningful sparse representation, we explicitly incorporated 0 -sparseness constraints73 on the columns of the factor matrix. Meanwhile, each row of the factor matrix can have only one non-zero value to ensure that no overlapping voxels among the latent factors are obtained by the decomposition (Method S3). To determine the optimal parameter for sparsity (\(\lambda=L/m\), L is the maximal number of non-zeros voxels in each factor, m is the total number of voxels) and the optimal number of factors, we tested both the reconstruction error and the reproducibility of the obtained decompositions by a random half split for 80 times (Method S4).

Characterisation analysis of the functional networks

Neuroanatomical characterisation

We identified the respective positions of the non-zero values in each column of the factor matrix (i.e., each latent factor) within 47,640 voxels in the AAL2 template.

Functional characterisation

As recommended by the previous work74, we compared the spatial pattern of the networks (i.e., factors) to the functional anatomy of the human brain using NeuroSynth (http://www.neurosynth.org/)32, an online platform for meta-analysis of functional neuroimaging literature. Specifically, we sorted all correlation coefficients for each network in descending order and adopted the top ten terms to characterise each network. Similar terms (e.g., “percept” and “perception”) were merged into a base form to avoid selecting repetitive terms.

Sex difference

We built a linear regression model to test the association between sex and the activation of each network (i.e., the weights of each factor) at age 19. In this model, we adjusted for the following essential covariates (i.e., research sites, socioeconomic status, BMI at age 1975 and handedness62) in this analysis. These essential covariates were also used in the following analyses where applicable.

Developmental trajectory

We applied the NMF back-reconstruction algorithm to compute the activation of each network of each participant at age 14 (Method S6). Next, for boys and girls separately, we carried out repeated measures analyses of variance (ANOVAs) to investigate the developmental trajectories of the network activations. The age 14 and age 19 network activations were the within-subject variables. In addition to the essential covariates, we incorporated pubertal status as an additional covariate, considering the relationship between pubertal maturation and the reactivity of the brain’s emotion processing system during early adolescence76.

Moderation analysis

For boys and girls separately, associations were assessed by a linear regression model between emotional symptoms at age 19 and childhood trauma before age 19. Next, to identify the GRBMR, we examined the three-way interaction among PRSMDD, the activations of the above identified functional networks, and childhood trauma, in relation to emotional symptoms at age 19 in a linear regression model. In this model, we used 25 predictors, including 3 for main effects, 3 for two-way interaction effects, 1 for the three-way interaction effect, 7 dummy variables for research sites, 8 PCs for PRSMDD, BMI, handedness and socioeconomic status. The coefficients (standardised \(\beta \)) of the linear regression models and their 95% confidence intervals (CIs) are reported. A significant three-way interaction indicates that PRSMDD moderates the association between a higher level of this brain marker and fewer emotional symptoms following childhood trauma.

Sensitivity analyses

We tested whether the three-way interaction remained significant when the childhood trauma score was binarised using the following cut-offs as recommended in the literature77, including a cut-off of 8 for emotional abuse, 7 for physical abuse, and 5 for sexual abuse. If any type of the above abuse occurred, childhood exposure to trauma was scored as “1”; if not, a score of “0” was recorded. We also included age, childhood neglect, IQ or substance use as an additional covariate in the moderation models to examine their potential confounding effects. To investigate the specificity of the moderation effects, we reran the models while (1) replacing the emotional symptom scores with behavioural problem scores from the other four dimensions in the SDQ; (2) replacing the PRSMDD with the PRSADHD or the PRSSCZ.

Prediction models for late-adolescence emotional disorders

Using the GRBMRs identified in the three-way interaction analysis, we built prediction models for emotional disorders at age 19 for girls with higher and lower PRSMDD separately. To reduce the potential bias of using specific thresholds for partitioning genetic risk groups, we defined higher- and lower-risk groups using a range of cutoffs based on the PRSMDD distribution, including the median, the highest and lowest tail cut-offs (45%, 40%, 35%, 30%, 25%, 20%), and the mean ± standard deviation. The emotional disorders were indicated by an emotional symptom score above a clinical cut-off of 4, which has been recommended to favour the instrument’s (i.e., SDQ) sensitivity in identifying depression and generalised anxiety78. We considered the following three kinds of models: (1) The baseline model considered the following variables: childhood trauma, emotional symptom score, sites of data collection, handedness, pubertal status, socioeconomic status, and BMI. (2) A network model incorporated the activation of one brain network identified above into the baseline model. (3) A GRBMR model further included the interaction terms between the network activation and childhood trauma into a network model. These models were implemented using the Python package scikit-learn (version 1.3.2). To evaluate model performance, we repeated a 5-fold cross-validation 10 times to obtain the mean area under the curve (AUC). To assess the predictability of the GRBMR, the paired t test was used to test the significance of the difference in AUC between the GRBMR models and the network models, as well as between the network models and the baseline models.

Generalisability of the prediction models

Generalisability in early adulthood

Using the latest follow-up data at age 23 in the IMAGEN study, we tested the model performance among 256 girls. We applied the aforementioned trained models, without retraining (i.e., fixed weights), to see whether emotional disorders at age 23 can be predicted by the model using measurements at age 19.

Generalisability in an independent dataset

To test whether the GRBMR models could be generalised to an independent dataset, we used the data from the ABCD cohort (the ABCD data used in this study came from Data Release 5.0, https://doi.org/10.15154/8873-zj65) to rerun the prediction models. This independent dataset recruited 11,875 children between 9 and 10 years of age from 21 sites across the United States31. The negative > neutral activations during 0 back in the EN-back task79 were used. To ensure homogeneity of the datasets, only self-reported white people in the ABCD cohort were included. We applied the NMF back-reconstruction algorithm again to compute the activations of the functional networks for each participant. After quality control (the same as the IMAGEN cohort), 1478 participants with complete neuroimaging data, PRSMDD, adverse childhood experiences (ACEs)80, and the essential covariates at baseline, as well as the internalising symptoms of the Child Behaviour Checklist81 at both baseline and the 1-year follow-up were analysed. The emotional disorders were indicated by an internalising symptom t-score above a cut-off of 6082. Similarly, we first built the baseline model using the baseline measurements to predict emotional disorders at the 1-year follow-up for both the high and low genetic risk groups. Next, we added the network activation to construct the network model and further incorporated its interaction with ACEs to form the GRBMR model.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.