Introduction

Major depressive disorder (MDD) is a common mental illness with high incidence and significant disability [1]. Cognitive impairment a core symptom of MDD that persists throughout the course of the disorder, impacting treatment efficacy, prognosis, and potentially leading to substantial psychosocial and functional impairment [2]. However, the mechanisms underlying cognitive impairment in patients with MDD remain unclear.

The gut microbes are closely linked to the brain and its cognition in health and disease [3,4,5]. Dysregulation of neurotransmitters produced by gut microbes may contribute to central nervous system disorders [6]. Short-chain fatty acids produced by gut microbiota influence cognition and mood through the “microbiome-gut-brain” axis [7]. Probiotic supplementation and gut microbiota transplants have also shown promise in enhancing cognitive function [8]. In the first-episode MDD, cognitive impairment has been associated with alterations in gut microbiota, including changes in α-diversity, β-diversity, and the relative abundance of the Bacteroides and Bacteroidaceae, which are linked to performance on the Color Trail Test [9]. However, other studies indicate no significant difference in gut microbiota diversity between patients with MDD and healthy controls(HCs), though variations in the abundance of Bifidobacterium and Blautia were observed, with some strains correlating with Stroop test performance. Studies on the connection between cognitive impairment and gut microbiota disturbances in depression have been limited and have yielded inconsistent findings [10]. Additionally, the relationship between gut microbiota and brain function in patients with MDD and cognitive impairment remains poorly understood.

In recent years, the research of neuroimaging in cognitive impairment of depression is increasing. Previous study of structural magnetic resonance imaging have shown that has revealed that specific brain regions, subcortical lesions, or reduced activity in specific brain areas may mediate cognitive impairment in individuals with MDD [11]. The functional magnetic resonance studies revealed that regional homogeneity (ReHo) in localized brain areas was elevated in patients with first-episode MDD and positively correlated with working memory and visual learning [12], as well as cognitive scores were found to be negatively associated with low-frequency fractional amplitude of low-frequency fluctuation (fALFF) and positively associated with high-frequency fALFF [13]. Besides, functional connectivity (FC), which reflects the synchronization or coordination of neural activity across brain regions during tasks or at rest [14], has shown region-specific alterations such as the left posterior cingulate cortex/precuneus and the left thalamus, and between the right dorsolateral prefrontal cortex and right angular gyrus in first episode MDD [15, 16], which was espectively correlated with Stroop Color and Word Test (SCWT) scores [15] and social cognitive function [16]. Additionally, neuroimaging studies suggest that brain networks may serve as key mediators between gut microbiota and cognitive function. Research using resting-state functional magnetic resonance imaging (rs-fMRI) has shown that individuals with mild amnestic cognitive impairment exhibit unique patterns in gut microbiome, intrinsic brain activity, and cognitive function [17]. In healthy individuals, longitudinal studies have found that multi-strain probiotic intake can alleviate depressive symptoms and enhance attention by influencing resting-state FC [18].

Therefore, we hypothesized that alterations in gut microbiota are present in patients with first-episode MDD and cognitive impairment, potentially associated with abnormal resting-state FC. This study aimed to investigate the brain-gut mechanisms underlying cognitive impairment in first-episode MDD by examining neuroimaging and gut microbiome data, including rs-fMRI characteristics of abnormal brain function, gut microbiota specificity, and cognitive function.

Methods

Participants

This study was approved by the Ethics Committee of the Affiliated Brain Hospital of Guangzhou Medical University(Number AF/SC-02/02.1), and informed consent was obtained from all participants prior to enrollment. Patients were recruited from in- and out-patients, while HCs were recruited publicly through posters or forums. Both patients and HCs were from Guangdong Province, China, and shared similar dietary habits. The inclusion criteria for patients with MDD were as follows: (1) diagnosis met the criteria for MDD according to the Diagnostic and Statistical Manual of Mental Disorders Fifth Edition (DSM-5); (2) age 18–45 years, with at least 6 years of education; (3) of Han ethnicity and right-handed; (4) first-episode patients with a disease duration of <2 years; (5) no history of psychiatric medication use; (6) a score of ≥17 on the 17-item Hamilton Rating Scale for Depression (HAMD-17); and (7) a score of ≤5 on the Young Manic Rating Scale (YMRS). HCs were matched with patients based on age, education and ethnicity and had no personal or family history of mental disorders.

According to the DSM-5 Axis I diagnostic criteria, patients with MDD were screened to exclude any mental disorders other than MDD, whereas HCs were screened to exclude all mental disorders. Exclusion criteria for both groups included: (1) presence of organic brain disorders or severe physical conditions; (2) history of head trauma or loss of consciousness; (3) other disorders that might affect emotional state, such as substance use, thyroid dysfunction, or anemia; (4) pregnancy or lactation; (5) contraindications for MRI; (6) recent history (within 3 months) of gastrointestinal disorders, including diarrhea or antibiotic use; and (7) inability to complete cognitive assessments. To ensure adequate power to detect a pre-specified effect size, the sample sizes of patients and healthy controls were respectively 96 and 48, according to the medium effect size (Cohen’s d = 0.5), significance level 0.05, and statistical test power 0.80. Totally 105 patients and 53 HCs were initially enrolled. However, data from 18 patients were excluded due to non-compliance with MRI scanning protocols or excessive head-movement, and image data from these participants was were removed during quality control. Fecal samples from 27 patients and 19 HCs were excluded due to unsuccessful retention or contamination. Ultimately, 60 patients and 34 HCs were included in the study.

Clinical data and cognitive function assessment

Demographic data, including sex, age, education, and body mass index (BMI), were collected at enrollment. Patients provided clinical details, such as medical history, age at first episode, and disease course. Depression, mania, and anxiety symptoms were assessed using the HAMD17, YMRS, and Hamilton Anxiety Rating Scale (HAMA), respectively. These scales are widely used and validated in China, with all assessments conducted by qualified psychiatrists trained for consistency.

Cognitive function was evaluated in all participants using the MATRICS consensus cognitive battery (MCCB) [19], which includes seven of cognitive domains: processing speed, visual learning, verbal learning, working memory, attention/vigilance, social cognition, and reasoning/problem-solving. This study focused primarily on the first five domains. MCCB assessments were conducted by two trained and qualified professionals, achieving an internal consistency of >80%.

Fecal sample collection and analysis of metagenomic data

Fecal samples in the morning were collected from participants’ first bowel movement after fasting. Using sterile techniques, samples were collected with a sterilized spoon, placed in a sterile container, and stored at −80 °C within an hour for a unified metagenomic analysis. Collection was carried out by personnel trained in aseptic techniques [20, 21].

The metagenomic sequencing process included DNA extraction, Library construction, and Metagenomic sequencing (Supplementary file 1). Data including diversity of Alpha and Beta diversity, between-group differences and correlation analysis were analyzed using the vegan package in R (version 4.32). Four indices including Shannon, Simpson, Chao1 and ACE were selected to characterize the Alpha diversity. Between-group differences were tested using the Wilcoxon test with a false discovery rate correction (p < 0.05).

In the functional analysis step, the metabolic potential and ecological functions of the microbial community were explored. Firstly, the high-quality data after quality control were de novo assembled by MEGAHIT, and the generated contigs were used for subsequent gene prediction. And then, functional annotation was conducted using EggNOG mapper. At last, enrichment analysis of metagenomic functions was performed by the generalized report score method. Detailed procedures are provided in the Supplementary file 2.

Acquisition, preprocessing and analysis of MRI data

MRI data were acquired using a 3.0T Siemens Prisma scanner equipped with a 64-channel coil. Participants lay supine with their eyes closed, were instructed to stay calm and avoid mental activity, and wore non-magnetic headphones and head stabilizers to reduce noise and movement. rs-fMRI was performed using a gradient echo-planar imaging (GRE-EPI) sequence with parameters: repetition time = 800 ms, echo time = 30 ms, flip angle = 56°, field of view = 208 mm × 208 mm, and voxel size = 2 mm × 2 mm × 2 mm. Multiband scanning was applied along the anteroposterior axis of the brain, capturing 72 layers and 450 time points. T1-weighted imaging was conducted using an MPRAGE sequence with parameters: repetition time = 2000 ms, Echo time = 2.32 ms, flip angle =8°, field of view =230 mm × 230 mm, Voxel size = 0.9 mm × 0.9 mm × 0.9 mm, Matrix = 256 × 256, layer thickness = 0.9 mm, and 208 layers. MRI data were processed using MATLAB 2017b using the Restplus toolkit (version 2.7) [22, 23, 24] for rs-fMRI preprocessing (Supplementary file 3).

Whole-brain FC was analyzed using Gretna (version 2.0) [25]. The brain functional connectome atlas (BN246) [26], comprising 246 subregions, was used as the template, with subregion serving as a node in the FC network. The average time series for each voxel in in a sub-region was calculated as the time series for that subregion. Pearson correlation coefficients between subregion time series were calculated, representing the edge weight in the connectivity matrix. Data were normalized using Fisher–z transformation, resulting in a 246 × 246 weighted undirected matrix per participant, with each edge representing FC between subregions.

Using sex, age, years of education and mean head movement as covariates, an independent samples t-test compared FC networks between patients and HCs through the Metric Comparison module. FC was categorized into seven brain subnetworks [27]: somatomotor (SMN), visual, ventral attention (VAN), dorsal attention (DAN), frontoparietal (FPN), limbic (LMB), and default mode network (DMN). Network-based statistical analysis (NBS) was used for multiple comparison corrections, with the connection threshold set at p = 0.001 and 5000 permutations. The edge value, representing the difference in FC between patients and HCs, was extracted.

Partial correlation analysis using SPSS software (version 23.0) explored associations between FC values and scores across cognitive function dimensions, with corrections applied using the Benjamini–Hochberg method. Statistical significance was set at p < 0.05 significant.

Statistical analysis

Statistical analyses were conducted using SPSS software (version 23.0) with a significance threshold of α = 0.05 for all two-tailed tests. Continuous variables that met the normality test assumption were reported as mean ± standard deviation (SD), non-normally distributed variables were described as median (interquartile distance). Categorical variables were analyzed using the chi-squared test. Years of schooling were included as a covariate for comparing MCCB scores. After adjusting for education level and head movement, partial correlation analysis was performed to examine relationships MCCB scores, the relative abundance of gut microbiota, and brain FC networks, with correction applied using the Benjamini–Hochberg method. To further explore moderating effects among these variables, the statsmodels library in Python 3.11.7 was utilized (supplement file 4).

Results

Comparison of clinical data between patients and HCs

As shown in Table 1, patients had lower cognitive function scores and fewer years of education compared to HCs (p < 0.05). No significant differences were found between the two groups in terms of sex, age or BMI (p > 0.05).

Table 1 Comparison of clinical data between patients with MDD and HCs.

Alteration in gut microbiota and its relationship with cognitive function

Differences of gut microbiota between patients and HCs

Our study compared gut microbiota species differences between patients and HCs at the species level, identifying 43 different strains between the two groups (Supplementary Table 1). Compared to HCs, 11 strains showed increased abundance in patients, with the top being Leptospira kmetyi, Nitrobacter hamburgensis, Rhodococcus pyridinivorans, Acinetobacter sp. TR11, and Vibrio scophthalmi. In contrast, 32 strains showed a significant decrease in patients, with the top five being Nannocystis sp. fl3, Halomonas sp. MCCC 1A13316, Gordonia insulae, Arsenophonus apicola and Paraglaciecola sp. L1A13 (Supplementary Table 1 and Fig. 1A). There was no significant difference in Alpha (Fig. 1B, C) and Beta diversity (Fig. 1D, E) between the MDD group and the HC group at the genus and species levels (p > 0.05).

Fig. 1: Comparison of gut microbiota between patients and HCs.
Fig. 1: Comparison of gut microbiota between patients and HCs.
Full size image

A Species differences of gut microbiota at the species level in patients with MDD and HCs, Note:log2(MDD:HC) represents the log2-transformed value of the abundance ratio between the MDD group and the HC group for each species. B Alpha diversity of gut microbiota at the genus level in the patients with MDD and HCs. C Alpha diversity of gut microbiota at the species level in the patients with MDD and HCs. D Beta diversity of gut microbiota at the genus level in the patients with MDD and HCs. E Beta diversity of gut microbiota at the sepcies level in the patients with MDD and HCs.

Our study investigated the differences in metabolic pathways between the two group. In MDD, metabolic pathways such as endocytosis, cell cycle, nucleoplasmic transport, ubiquitin-mediated protein degradation, Huntington’s disease, amyotrophic lateral sclerosis, neurodegenerative disease pathways, cerebellar spinal ataxia, and prion disease were enriched. In HCs, biofilm formation, phosphotransferase system, ATP-binding cassette transporters, aminoacyl-trna biosynthesis, peptidoglycan biosynthesis, valine, leucine and isoleucine biosynthesis, glycolysis/gluconeogenesis, pyrimidine metabolism, starch and sucrose metabolism, and amino acid biosynthesis were significantly enriched (Fig. 2).

Fig. 2: The difference in metabolic pathways between MDD patients and HCs.
Fig. 2: The difference in metabolic pathways between MDD patients and HCs.
Full size image

The greater the absolute value of Reporter Score, the more enriched the pathway was between the two groups of samples. A positive value (Reporter Score > 4) indicates significant enrichment in the HCs. A negative values (Reporter Score < −4) indicates significant enrichment in the MDD patients.

Correlation between differential gut microbiota and cognitive function in patients

The relationship between gut microbiota and cognitive function was analyzed using partial correlation analysis. The relative abundance of Shewanella livingstonensis positively correlated with verbal learning, while the relative abundance of Amycolatopsis sp. Hca4 negatively correlated with processing speed (p < 0.05) (Fig. 3).

Fig. 3: Correlation between differential gut microbiota and cognitive function in patients.
Fig. 3: Correlation between differential gut microbiota and cognitive function in patients.
Full size image

Star shapes indicate that the relative abundance of Shewanella livingstonensis positively correlated with verbal learning, and the relative abundance of Amycolatopsis sp. Hca4 negatively correlated with processing speed (p < 0.05).

Alteration in FC networks and its relationship with cognitive function

Differences in FC networks between patients and HCs

A whole-brain FC network was constructed using the BN246 template to compare FC networks between patients and HCs. Our results indicated that, compared to HCs, patients with MDD showed significantly enhanced connections between subnetworks, including 43 FCs across 47 subregions. These were primarily distributed between the LMB and the VAN (13 FC networks), and between the DMN and the VAN (9 FC networks) (Supplementary Table 2, Fig. 4).

Fig. 4: Comparison of functional connectivity networks between patients with MDD and HCs.
Fig. 4: Comparison of functional connectivity networks between patients with MDD and HCs.
Full size image

Compared to HCs, patients with MDD showed significantly enhanced connections between subnetworks, primarily distributed between the LMB and the VAN (13 FC networks), and between the DMN and the VAN (9 FC networks). Abbreviations: VN visual network, DAN dorsal attention network, LMB limbi network, DMN default mode network, SMN somatomotor network, VAN ventral attention network, FPN frontoparietal network.

Correlation between FC networks and cognitive function in patients

Partial correlation analysis between cognitive function and abnormal FC in patients with MDD revealed the following associations: FC between the central anterior lobe of the SMN and the parahippocampal gyrus of the LMB was positively correlated with processing speed (r = 0.243, p = 0.017). FC between the superior frontal gyrus of the DMN and the basal ganglia of the LMB was negatively correlated with working memory (r = −0.235, p = 0.021). Additionally, the FC between the parahippocampal gyrus of the LMB and the medial frontal gyrus of the FPN was significantly negatively correlated with working memory (r = −0.203, p = 0.048). (Supplementary Table 3, Fig. 5).

Fig. 5: Correlation between dimensions of the MCCB and abnormal functional connectivity in the MDD group.
Fig. 5: Correlation between dimensions of the MCCB and abnormal functional connectivity in the MDD group.
Full size image

A Connections related to processing speed. B, C Connections related to working memory.

Regulatory effect among gut microbiota, FC of brain regions, and cognitive function in patients

A regulatory effect model was employed to explore the relationships among gut microbiota, the FC of brain regions, and cognitive function. FC from rs-fMRI was considered an independent variable related to cognitive function, gut microbiota served as a moderating variable, and cognitive function dimension scores were treated as dependent variables relative to FC in specific brain areas. After adjusting for covariates including sex, age, BMI, and years of education, Amycolatopsis sp. Hca4 was found to significantly modulate the relationship between FC of the middle frontal gyrus and the parahippocampal gyrus with working memory (β3 = 0.52; SE = 0.20; 95% CI: 0.12, 0.92; p = 0.01) (Supplementary Table 4).

To further investigate the regulatory effects of varying relative abundances of gut microbiota on working memory and the FC between the parahippocampal gyrus and medial frontal gyrus, the relative abundance of Amycolatopsis sp. Hca4 was divided into three groups based on mean ± 1 SD. The results indicated that the when Amycolatopsis sp. Hca4 was at medium abundance, the slope between the FC and working memory was relatively flat. At higher abundance levels (mean + 1 SD), FC between the medial frontal gyrus and parahippocampal gyrus showed a positive correlation with working memory, whereas at lower abundance levels (mean﹣1 SD) was negatively correlated with working memory (Fig. 6).

Fig. 6: Amycolatopsis sp. Hca4 modulates the relationship between functional connectivity of brain regions and working memory.
Fig. 6: Amycolatopsis sp. Hca4 modulates the relationship between functional connectivity of brain regions and working memory.
Full size image

Purple dashed line indicated FC between the medial frontal gyrus and parahippocampal gyrus showed a positive correlation with working memory at the abundance levels of mean +1 SD. Blue dashed line indicated was negatively correlated with working memory at the abundance levels of mean −1 SD.

Discussion

To the best of our knowledge, our study firstly explored cognitive impairment in MDD using metagenomic analysis of gut microbiota and FC of brain networks, based on the BN246 template. The main findings were as follows: (1) At the species level, 43 gut microbiota strains in patients with first-episode MDD differed from those in HCs, with lower relative abundances of Amycolatopsis sp. Hca4 and Shewanella livingstonensis. And there were the differences in metabolic pathways between the two group. Besides, in patients with MDD, the relative abundance of Amycolatopsis sp. Hca4 was negatively correlated with processing speed, while Shewanella livingstonensis showed a significant positive correlation with verbal learning. (2) Brain network analysis revealed that, compared HCs, patients with first-episode MDD had significantly enhanced connections between subnetworks. Cognitive function was closely correlated with FC between the SMN and LMB, the DMN and LMB, and the FPN and LMB (3) Notably, Amycolatopsis sp. Hca4 modulated the relationship between working memory and FC between the parahippocampal and middle frontal gyri, with the relationship varying based on its abundance.

Alterations in gut microbiota and its relationship with cognitive function

We identified 43 strains that differed in patients with first-episode MDD compared to HCs, with 11 strains showing significantly increased abundance (dominant strains) and 32 strains significantly decreased (inferior strains). Most strains belonged to Proteobacteria, with two belonging to Actinomycetes, similar to findings from previous 16S rRNA. studies [10]. Interestingly, the most dominant strain in patients with MDD, Leptospira kmetyi, is a zoonotic bacterium found worldwide in humans and animals. This raises a potential link between leptospirosis and the incidence of MDD, which could be explored further. Additionally, previous studies have reported that cat ownership correlated with more severe depressive symptoms [28], though we did not assess pet ownership in this study. Future research could examine this as a factor.

We also found the differences in microbial metabolic pathways between HCs and patients with MDD. MDD patients show significant deficits in key metabolic pathways such as amino acid synthesis, carbohydrate metabolism, and energy production, which may disrupt physiological and metabolic homeostasis, and negatively affect the function of the nervous system and cellular energy supply. Previous studies have also supported the link between amino acid metabolism disorders and intestinal microbial community imbalance and amino acid synthesis in patients with depression, suggesting that microbial metabolism abnormalities may be an important factor in the occurrence of depression [29, 30]. Recent studies have found a significant association between increased carbohydrate intake and reduced risk of MDD [31]. However, increasing dietary carbohydrate intake can promote the absorption of tryptophan in the brain, thereby increasing the synthesis of 5-hydroxytryptamine, which is crucial for emotional regulation [32]. Therefore, we hypothesized that the reduced activity of microbial metabolic pathways may contribute to the reduction of host energy intake, the adequacy of which is essential for the normal functioning of neural activities and cognitive functions. The significant enrichment of protein degradation, cellular stress response, and neurotransmitter metabolic pathways in MDD patients reveals the potential role of these biological processes in the pathology of depression. Chronic stress is considered to be a key factor leading to brain adaptive abnormalities and neuronal plasticity disorders. Stress stress may activate ubiquitin ligases, leading to protein degradation and intracellular acid-base homeostasis imbalance; these changes may further damage synaptic structure and transmission function and promote the development of depressive symptoms [33]. These findings highlight the importance of modulating protein degradation, improving cellular stress responses, and restoring neurotransmitter balance in the treatment of depression. Notably, first-time diagnosed and medication-naive depressed patients showed abnormal neurotransmitter levels [34], which further confirms the role of disturbed neurotransmitter metabolism in depression. These findings not only advance our understanding of the pathogenesis of depression, but also provide possible targets for the development of new treatment strategies.

Besides, few studies have assessed the impact of gut microbiota on cognition in MDD using metagenomics. A study combining 16S rRNA gene sequencing with metagenomic sequencing found that the gut microbiota displayed altered species classifications in patients with MDD and correlated with cognition assessed by SCWT scores [10]. Our study firstly reported that the relative abundance of Amycolatopsis sp. Hca4, a Strain within the Actinomycetes phylum, is negatively correlated with processing speed in patients with MDD. Previous research linking Actinomycetes and cognitive function has primarily focused on AD and changes in Actinomycetes abundance have been associated with AD pathogenesis [35]. Studies of the AD gut microbiome identified a reduction in the Bifidobacterium genus, which belongs to the Actinomycetes phylum [36]. Additionally, Ningthoujam et al. purified two keratinase enzymes (Ker1 and Ker2) from the Amycolatopsis sp. MBRL 40, which were shown to degrade β-amyloid fibrils, potentially alleviating cognitive dysfunction in AD [37]. We also found that the relative abundance of Shewanella livingstonensis was lower in patients with MDD and positively correlated with verbal learning. This gram-negative bacterium, classified under the Schwanella genus within the Proteobacteria phylum, has been minimally studied in the context of MDD cognition. However, research on cognitive disorders has shown that Proteobacteria and Actinomycetes are among the most common phyla influencing cognitive function [38]. Animal studies have further demonstrated that a traditional Indian medicine reduces inflammation, restores the gut-brain axis, and enhances cognitive function by promoting growth in the gut microbiome, including Proteobacteria and Actinobacteria, both of which are crucial for maintaining intestinal homeostasis. In summary, Proteobacteria and Actinobacteria appear closely linked to cognitive function and may serve as biomarkers for predicting the processing speed and potential targets for cognitive enhancement in MDD. Although culturing Proteobacteria and Actinobacteria remains challenging, metagenomic approaches offer a solution by enabling genome recovery directly from environmental samples without the need for traditional culture methods [39].

Abnormal FC of brain networks and its relationship with cognitive function

Insights emerging from mapping intrinsic brain connectivity networks provide a potentially mechanistic framework for an understanding of aspects of human behavior [40,41,42]. Using the BN246 template, we observed that first-episode MDD patients had significantly enhanced connections between subnetworks, particularly between the VAN and LMB, and between the VAN and the DMN. These findings align with previous studies indicating that these networks are crucial for emotional processing [43], attention [44], and cognitive function [45]. Additionally, we found that cognitive function in patients with MDD was closely related to FC within several networks, including connections between the SMN and LMB, DMN and LMB, and the FPN and LMB. FC abnormalities within these brain networks were primarily associated with cognitive domains affected by MDD, such as processing speed and working memory.

Prior FC studies using seed-point analyses have similarly identified associations between MDD-related cognitive function and FC abnormalities [46, 47]. However, analyses using the BN246 templates have rarely been applied to study resting-state brain networks and FC alterations in MDD-related cognitive impairment. Upon further investigating the relationship between brain network connectivity and cognitive function, we found that FC between the central anterior lobe of the SMN and the parahippocampal gyrus of the LMB was positively correlated with processing speed. Functionally, the primary motor cortex in the precentral gyrus executes motor commands, while the somatosensory cortex processes sensory information from the body, integrating sensory and motor information. The parahippocampal gyrus plays a vital role in spatial analysis and episodic memory [48]. Enhanced network connectivity between the SMN and LMB, positively correlated with processing speed, may represent a compensatory response mechanism supporting basic cognitive function in MDD.

We also found that abnormal FC between the superior frontal gyrus and basal ganglia, as well as between the middle frontal gyrus and parahippocampal gyrus, was significantly negatively correlated with working memory. The superior frontal gyrus, a core region for cognitive control, is essential for self-awareness [49], while the basal ganglia maintain extensive FC with various brain regions. The frontal-limbic network is closely related to depression and working memory, and this network is not only associated with negative mood in depression, but also significantly affects working memory in depressed patients [50]. Executive dysfunction, often linked to dopaminergic depletion affecting basal ganglion-cortical circuits, may result in deficits in attention, working memory, and goal-oriented behavior [51]. Hazy et al. proposed PBWM (prefrontal cortex, basal ganglia working memory model) based on a number of basic medical studies and they mentioned that the model relies on the representation of active maintenance in the frontal cortex, based on the cerebral dopaminergic system, and activation of the system through the basal ganglia and amygdala, so that the human brain is able to perform challenging working memory tasks [52]. This may be an underlying physiological mechanism of the working memory. Our findings on the correlation of FC between the superior frontal gyrus and the basal ganglia complement previous findings by confirming the relationship between the frontal-limbic network and working memory from a functional brain network perspective. Interestingly, a study on the gray matter structure of the brain found that different components of the prefrontal-limbic network associated with depression experience gray matter loss, and that the main loss is a loss of synapses [53], suggesting that a multi-omics approach should be applied more often to the study of the frontal-limbic network to help researchers explore the network from an integrative perspective. On the other hand, both the middle frontal gyrus and the parahippocampal gyrus have been shown to be related to working memory by previous studies. Studies have shown that the parahippocampal gyrus is one of the key sources of event-related fields in healthy individuals when performing working memory tasks [54]. A study of cognitively impaired patients found that the middle frontal gyrus and parahippocampal gyrus showed more activation in the group of mildly cognitively impaired patients relative to HCs [55]. Garrett et al. conducted a task-state fMRI study of depressed patients and found that the psychotic depression group showed abnormal parahippocampal activation at lower levels of demand compared to the nonpsychotic depression group [56]. Our findings show that FC between the frontal middle gyrus and the parahippocampal gyrus is enhanced and negatively correlated with working memory in depressed patients, suggesting that neural activity between the frontal middle gyrus and the parahippocampal gyrus is over-enhanced in depressed patients, which is in line with previous findings. It also suggests that their working memory dysfunction may be more severe once this enhanced connectivity begins to decay, which also implies that the enhanced connectivity may be a surrogate for the brain’s efforts to maintain a certain level of cognitive function. Overall, FC alterations in these network components may increase the risk of cognitive impairment in MDD and could serve as potential therapeutic targets for addressing MDD-related cognitive deficits in future research and clinical practice.

Relationship between cognitive function, gut microbiota and brain FC

In this study, we investigated cognitive impairment in MDD by integrating intestinal metagenomics with rs-fMRI analysis of brain FC and identified Amycolatopsis sp. Hca4 as a regulator of brain FC and cognitive function. To date, no studies have explored this specific relationship in results in individuals with depression; however, research in healthy individuals and those with other conditions has examined similar associations. For example, one study in healthy participants found that gut microbiota influenced cognitive function by modulating brain network topological properties and structural-functional coupling in the suboccipital gyrus, fusiform gyrus, and medial superior frontal gyrus [57]. Another study reported that gut microbiota diversity was linked to gray matter volume in the right cerebellar VI and FC in the bilateral paracentral lobules, potentially serving as imaging markers for cognitive impairment [58]. Additionally, the research in both obese and non-obese individuals found the relative abundance of Actinomycetes was associated with MRI diffusion tensor imaging metrics in the thalamus, hypothalamus, and amygdala, as well as performance on cognitive tests for processing speed and attention [59]. These findings suggest that gut microbiota’s regulation of brain and cognitive function is worth further exploration.

To investigate the regulatory effects of different bacterial abundances on brain FC and cognitive function, we divided the relative abundances of Amycolatopsis sp. Hca4 into high, medium, and low groups. Our indicated that low abundance of Amycolatopsis sp. Hca4 was associated with a negative effect of FC on cognitive function, whereas high abundance enhanced cognitive function through increased FC. The brain-gut axis has implicated in depression pathophysiology and may provide new insights into the mechanisms of cognitive impairment in mental health conditions [59]. Gut microbes can influence peripheral neurotransmitter levels and pro-inflammatory cytokines, impacting the enteric nervous system and ultimately regulating cognitive function and behavior [60]. Animal studies have shown that gut microbiota can alter GABA expression in brain regions such as the cingulate gyrus, anterior limb, hippocampus, amygdala, and cerebellum, thereby affecting depression-related behaviors [61]. Furthermore, other studies in psychiatry have linked the prefrontal cortex, hippocampus, and GABA levels to cognitive function [62], suggesting that a high abundance of Amycolatopsis sp. Hca4 may enhance the FC between the middle frontal gyrus and the parahippocampal gyrus, ultimately improving cognitive function. Previous studies have recommended probiotics, prebiotics, and the Mediterranean diet as cost-effective strategies for early prevention of cognitive dysfunction [63], supporting the idea that gut microbiota abundance is crucial for cognitive health.

While our study provides new insights, there are several limitations: (1) The cross-sectional design limits our ability to infer causal relationships among gut microbiota, brain FC and cognitive impairment, necessitating further longitudinal studies. (2) Although age, sex and education were controlled in deriving the MCCB scores, differences in education levels persisted between patients and HCs. Education was therefore included as a covariate to mitigate its impact on outcomes. (3) We controlled for factors such as dietary habits, antibiotic use, and psychiatric medications, but regional and individual dietary differences may still have influenced our findings, which should be more strictly controlled in future studies.

In summary, cognitive function in patients with first-episode MDD is significantly impaired, with processing speed and working memory associated with FC between the SMN and LMB, DMN and LMB, FPN and LMB. Gut microbiota in patients with first-episode MDD differs from that in HCs, with the relative abundances of Amycolatopsis sp.Hca4 and Shewanella livingstonensis closely associated with cognitive function. Amycolatopsis sp. Hca4 regulates the relationship between FC of the middle frontal gyrus, parahippocampal gyrus and working memory. These findings suggest that gut microbiota disturbances in patients with MDD play a regulatory role in brain dysfunction and cognitive impairment.