Interactions between upper respiratory microbiota and psychological distress in pulmonary nodule patients: a retrospective nested case-control study based on machine learning and exploratory mediation analysis Authors: Xin Ye, Shiyan Tan, Qiong Ma, Zifan Wang, Taoyu Wu, Zongyi Mao, Qian Wang, Chuan Zheng, Xingchen Peng, Fengming You, Yifeng Ren Published: 2026 ABSTRACT Background:The role of upper respiratory microbiota in the context of psychological distress (PD), particularly in patients with pulmonary nodules (PNs), remains largely unexplored. The study investigates anxiety and depression prevalence, clinical risk factors, and upper respiratory microbiota composition in patients with PNs, and their associations.Methods:A retrospective nested case-control study (August 2022 to May 2024) surveyed 381 PNs participants using a standardized questionnaire. Univariate analysis and logistic regression examined associations with PD. 16S ribosomal RNA sequencing compared microbiota between groups. Spearman correlation and exploratory mediation analysis explored associations between microbiota, clinical features, and PD. Machine learning algorithms were trained to identify features associated with PD.Results:This study analyzed the sociodemographic and disease characteristics of 381 participants with PNs, revealing that approximately 32% exhibited symptoms of PD. Results showed female patients (OR = 1.77), those with ground-glass nodules (OR = 1.77) and history of nodular disease (OR = 1.94) were associated with a higher prevalence of PD. The main differential bacterial genus between no psychological distress (NPD) and PD groups such as g_Prevotella, g_Neisseria, and g_Haemophilus. The machine learning algorithms revealed that factors such as g_Aggregatibacter, g_Rhodococcus and gender constituted the best predictive group (Area under the curve, AUC = 0.75). Furthermore, exploratory mediation analysis identified associations suggesting that g_Haemophilus (β = 0.738 and β = − 0.523), and g_Dialister (β = 0.452 and β = 0.29) may be involved in the links between BAI and BDI-II scores with clinical factors.Conclusion:Our findings highlight the complex associations among clinical factors, upper respiratory microbiota, and the presence of PD in patients with PNs, laying the groundwork for future research into whether microbiota modulation could be a strategy for improving mental health in PNs patients. Introduction Lung cancer remains one of the leading causes of cancer incidence and mortality worldwide, accounting for 11.4% of overall cancer cases and 2.2 million deaths annually[1,2]. A major challenge in lung cancer management is the high proportion of patients diagnosed at advanced stages. However, the increasing use of lung cancer screening, particularly through low-dose computed tomography (LDCT), has led to early detection of lung cancer and a reduction in mortality[1,3]. While LDCT has high sensitivity, its low specificity has resulted in a significant rise in the detection of pulmonary nodules (PNs), with approximately 96.4% of these nodules being benign[1,3,4]. This uncertainty creates a psychological burden for patients, as the potential for a cancer diagnosis often leads to heightened anxiety and depression[5–7]. Emerging diagnosis of PNs usually is accompanied by a silent psychological impact, such as anxiety and depression. A wide range of factors may contribute to the occurrence of anxiety and depression. One important reason is uncertainty from “near-cancer” leads to high levels of distress[8]. Additionally, the invasive procedures such as biopsies and prolonged follow-up monitoring of PNs contribute to increased psychological strain, further exacerbating symptoms like insomnia, agitation, and low mood[9–11]. These psychological issues significantly reduce the overall quality of life[12]. Previous studies have reported that the incidence of anxiety (17.96%-61.92%) and depression (14.67-61.15%) in patients with PNs[9,13,14]. However, the understanding of the psychological burden in this population remains incomplete, particularly regarding the factors that influence the development of these conditions and the specific populations at greater risk. American Thoracic Society Research proposed that tests should be evaluated for their impact on patient-centered outcomes[15]. Thus, it remains an especially interesting and critical importance topic to explore the psychological effects of patients with PNs for developing effective management strategies and clinical guidelines. The significant relationship between the microbiome and the pathophysiology and treatment of psychiatric disorders has been extensively studied[16–19]. The microbiome participates in behavior regulation and brain communication through various pathways, including the immune system, tryptophan metabolism, the vagus nerve, and the enteric nervous system, involving microbial metabolites such as short-chain fatty acids, branched-chain amino acids, and peptidoglycans[20–22]. Evidence shows that dysbiosis of the lung microbiome is associated with some neurological diseases[22–25]. Recent studies by Hosang et al. have elucidated the role of the lung microbiome in regulating brain immune responsiveness, revealing its involvement in modulating microglial cell function[26,27]. Microglial cells are activated in various neurological diseases and play a crucial role in the development of affective disorders, including major depressive disorder[28–30]. Furthermore, existing studies have shown that patients with pulmonary diseases often experience symptoms of anxiety and depression, suggesting that alterations in the respiratory microbiome may be linked to occurrence of mental health issues. However, the impact of the respiratory microbiome on mood disorders remains underexplored. Notably, our previous investigations have suggested the potential of oral microbiome polymorphisms in the differential diagnosis of PNs[31–33]. Therefore, given the growing evidence of the microbiome’s influence on mental health, it is crucial to explore its potential association with psychological outcomes in patients with PNs. We conducted a nested case-control study building upon our previous large cohort study to comprehensively investigate the factors associated with psychological distress (PD) and clinical factors in the Chinese population with PNs. In addition, we utilized 16S ribosomal RNA (rRNA) sequencing to characterize the microbiome profiles of individuals with anxiety and depression associated with PNs. Finally, we employed Spearman correlation and exploratory mediation analyses to investigate the relationships among clinical characteristics, upper respiratory microbiota composition, and anxiety and depression symptom scores in this population. Our findings offer new insights into the potential role of the upper respiratory microbiota in the context of anxiety and depression in individuals with PNs and provide valuable reference data for promoting mental health in this patient group. This study has been reported in line with the STROCSS guidelines[34].HIGHLIGHTSFemale gender, ground-glass nodules, and prior nodular disease were associated with psychological distress in Chinese patients with pulmonary nodules, offering new insights into the intersection of physical and psychological health.The study revealed distinct microbiota profiles in the upper respiratory tract associated with the presence or absence of psychological distress, suggesting a potential link of microbes like Prevotella, Neisseria and Haemophilus to psychological well-being.By combining clinical variables and microbial data, the predictive model for psychological distress achieved high accuracy (AUC = 0.75), setting the stage for more precise mental health assessments in pulmonary nodule patients.Notably, Exploratory analysis suggested that Haemophilus and Dialister may partially account for the observed associations between clinical factors (such as nodule density and gender) and anxiety/depression scores, providing preliminary mechanistic hypotheses for future validation.This research underscores the potential of respiratory microbiota as biomarkers for mental health screening and as candidates for future intervention studies, opening a new frontier in the holistic management of pulmonary nodule patients. HIGHLIGHTS Female gender, ground-glass nodules, and prior nodular disease were associated with psychological distress in Chinese patients with pulmonary nodules, offering new insights into the intersection of physical and psychological health. Female gender, ground-glass nodules, and prior nodular disease were associated with psychological distress in Chinese patients with pulmonary nodules, offering new insights into the intersection of physical and psychological health. The study revealed distinct microbiota profiles in the upper respiratory tract associated with the presence or absence of psychological distress, suggesting a potential link of microbes like Prevotella, Neisseria and Haemophilus to psychological well-being. The study revealed distinct microbiota profiles in the upper respiratory tract associated with the presence or absence of psychological distress, suggesting a potential link of microbes like Prevotella, Neisseria and Haemophilus to psychological well-being. By combining clinical variables and microbial data, the predictive model for psychological distress achieved high accuracy (AUC = 0.75), setting the stage for more precise mental health assessments in pulmonary nodule patients. By combining clinical variables and microbial data, the predictive model for psychological distress achieved high accuracy (AUC = 0.75), setting the stage for more precise mental health assessments in pulmonary nodule patients. Notably, Exploratory analysis suggested that Haemophilus and Dialister may partially account for the observed associations between clinical factors (such as nodule density and gender) and anxiety/depression scores, providing preliminary mechanistic hypotheses for future validation. Notably, Exploratory analysis suggested that Haemophilus and Dialister may partially account for the observed associations between clinical factors (such as nodule density and gender) and anxiety/depression scores, providing preliminary mechanistic hypotheses for future validation. This research underscores the potential of respiratory microbiota as biomarkers for mental health screening and as candidates for future intervention studies, opening a new frontier in the holistic management of pulmonary nodule patients. This research underscores the potential of respiratory microbiota as biomarkers for mental health screening and as candidates for future intervention studies, opening a new frontier in the holistic management of pulmonary nodule patients. Methods Trial design This retrospective nested case-control study, a sub-study of a non-randomized controlled trial involving patients with PNs, was conducted in accordance with the STROCSS criteria (Fig. 1) [34]. The study followed guidelines by the principles of the Declaration of Helsinki and was approved by the ethics committees. The recruitment work was carried out in multiple hospitals from August 2022 to May 2024. Figure 1.Schematic of the study design. The figure summarizes the analysis process and flow of outcomes in the study, illustrating the pathway from participant recruitment to final statistical analyses. Schematic of the study design. The figure summarizes the analysis process and flow of outcomes in the study, illustrating the pathway from participant recruitment to final statistical analyses. Participants Selection of case and control groups Cases and controls were selected from a prospective cohort of patients with PNs confirmed by LDCT. The case group (PD group, n = 122) comprised all patients who met pre-defined scale cut-offs for psychological distress during follow-up (Detail in Supplemental Digital Content Method 1, available at:http://links.lww.com/JS9/G395)[35]. Controls (NPD group, n = 259) were randomly selected from the same cohort from patients who did not meet the distress criteria, resulting in a case-to-control ratio of 1:2. No matching was performed. The sample size was deemed adequate based on an Events per Variable (EPV) of 17.4 for the primary model, well above the recommended minimum of 10. Data and sample collection Clinical data collection, extraction, and assessment Sociodemographic and clinical data were collected using a study-specific questionnaire. The questionnaire consisted of 2 parts: sociodemographic [name, age, gender, study ID, weight, height, body mass index (BMI), location and educational level] and disease characteristics [number of PNs, density, risk stratification and history of pulmonary disease, nodular disease, tumor, smoking, alcohol consumption, surgery, as well family history of tumor]. Notably, key variables were defined as follows: Participants were categorized as “ever smokers” if they reported having smoked more than 100 cigarettes in their lifetime; “History of nodular disease” referred to any benign/indeterminate thyroid or breast nodule documented prior to the current pulmonary nodule. Symptoms of anxiety and depression were assessed using the validated Beck Anxiety Inventory (BAI) and Beck Depression Inventory-II (BDI-II) (Supplemental Digital Content Method 2, available at:http://links.lww.com/JS9/G395)[36,37]. We selected these instruments to ensure a detailed assessment of clinical symptom severity and measurement specificity. It supported by their robust validation and widespread use in Chinese populations[38–42]. Data collection was conducted following a standardized operating procedure (SOP) to ensure consistency and minimize bias. All sociodemographic, clinical, and psychological data were extracted using a pre-piloted data collection form by two trained investigators working independently. Any discrepancies between the two investigators were resolved by a third senior researcher. Data were stored in Excel 2019 (Microsoft), with two investigators independently extracting and screening the data. Missing data in covariates were handled using multiple imputation in SPSS, and all subsequent multivariable analyses were performed on the pooled results from the imputed datasets. The clinical malignancy of PNs was assessed using the Mayo Clinic prediction model and Chinese expert consensus (2018) (Supplemental Digital Content Method 3, available at:http://links.lww.com/JS9/G395)[35,43]. Biological sample collection Following the initial detection of PNs, participants provided upper respiratory tract samples. Before sample collection, participants rinsed their mouths with water to reduce contamination. Nasopharyngeal secretions were collected and stored in sterile centrifuge tubes under standardized conditions. Samples were immediately stored at −80°C to preserve microbial DNA integrity. Microbial DNA extraction and sequencing DNA extraction from the collected samples was carried out according to manufactures instruction (Omega Bio-tek, Norcross, GA, USA). DNA quality and concentration were assessed using 1.0% agarose gel electrophoresis and a NanoDrop2000 spectrophotometer (Thermo Scientific, USA). 16S rRNA gene sequencing was employed to characterize the microbial communities in the respiratory tract of pulmonary nodule patients. The V3-V4 region of the 16S rRNA gene was amplified using primers specific to this region [338 F (5’-ACTCCTACGGGAGGCAGCAG-3’) and 806 R (5’-GGACTACHVGGGTWTCTAAT-3’) primers] using PCR amplification. Sequencing was performed on the Illumina Nextseq2000 platform (Illumina, San Diego, USA) following standard protocols provided by Majorbio Bio-Pharm Technology Co. Ltd. (Shanghai, China). Raw sequencing data were processed using a standardized bioinformatics pipeline. Paired-end reads were quality-filtered and merged using fastp and FLASH, followed by denoising with DADA2 in QIIME2 to generate amplicon sequence variants (ASVs). Potential contaminants were minimized through rigorous chimera removal and prevalence/abundance filtering during statistical analysis. Detailed parameters are provided in Supplemental Digital Content Method 4, available at:http://links.lww.com/JS9/G395. Statistical analysis Mothur was used to calculate alpha diversity indices such as Ace, Chao, Sobs, and Pd indices, and Wilcoxon rank sum test analysis was applied to analyze significant differences. Principal Coordinates Analysis (PCoA) based on hellinger distance algorithm was used to assess the similarity in microbial community structure between samples. Additionally, the PERMANOVA non-parametric test was applied to analyze whether the differences in microbial community structure between sample groups were statistically significant. Community barplot analysis and Circos plots were used to display the microbial composition and their relative abundances between groups. Upset diagrams representing the results of the core microbiota were drawn using the web tool. Differences in microbial composition between groups were analysed with the Wilcoxon rank sum test. In the LEfSe analysis, the linear discriminant analysis (LDA) score was calculated to identify taxa with differential abundance between the two groups (LDA score>2, p<0.05) (http://huttenhower.sph.harvard.edu/LEfSe). To further assess functional potential, we summarized the relative abundance of Kyoto Encyclopedia of Genes and Genomes (KEGG) and Clusters of Orthologous Groups (COG) from the relative abundance of the corresponding gene. The PICRUSt2 algorithm was used to predict the functional profiles of upper respiratory microbial genes in the no psychological distress (NPD) and PD groups, and biological functions were annotated using the KEGG and COG databases. We used IBM SPSS Statistics 26 (IBM Corp) for all the statistical analysis. Qualitative data were reported as frequency and proportion. We calculated mean and standard deviation (SD) for quantitative data conforming to normal distribution, median and range for quantitative data not conforming to normal distribution. The chi-square test or t-test were used in univariate analysis. The minimal sufficient adjustment set was pre-specified based on a Directed Acyclic Graph (DAG). The DAGs framework was created and analyzed using DAGitty v3.1 (https://dagitty.net/). Following the DAG, candidate confounders were further screened using univariate analysis. Variables with a P-value < 0.05 were also included in the final multivariable logistic regression model to ensure robust adjustment. Results were performed as odds ratio (OR), 95% confidence intervals (CI) and P value. Two side P<0.05 was considered as a significant difference. Six sets of sensitivity analyses including complete case analyses ascertained robustness of our findings. As the data did not conform to a normal distribution, Spearman rank correlation (ρ) was used to evaluate the relationships between the top 50 most abundant genus and clinical variables. A two-tailed P-value < 0.05 was considered statistically significant. Machine learning algorithms were used to identify features associated with PD. It was implemented using Python 3.8.10, scikit-learn 1.2.2, XGBoost 1.7.5, and SHAP 0.41.0. Employed stratified sampling to divide the dataset into training and test sets at a 7:3 ratio, ensuring consistent class distribution across both sets to avoid selection bias. Implemented 5-fold cross-validation during hyperparameter optimization and used both 5-fold and 10-fold cross-validation for robustness assessment during model performance evaluation. Utilized Bayesian optimization with 30 iterations per model, using ROC AUC as the primary optimization metric to ensure near-optimal hyperparameter combinations. The final hyperparameter settings for all models are detailed in Supplementary Data (The Supplemental Digital Content Data Statement, available at:http://links.lww.com/JS9/G396 and its corresponding code are available in the following GitHub repository: https://github.com/klpkyx1029-cmd/ML-PN-Data.git). An exploratory analysis was conducted to investigate potential indirect pathways whereby microbial features (M) might link clinical variables (X) to anxiety/depression scores (Y). Using PROCESS Macro Model 4 with 5,000 bootstrap samples, we examined the X→M→Y path while adjusting for age, weight, and height. Results Characteristics of participants In this study, among the 381 participants were included in the analysis. Multiple imputation was applied for handling minimal missing data (<1.5% for any variable). Similar results were observed in the complete case analysis as in the main analysis that utilized multiple imputation for missing values (Supplemental Digital Content Table 1, available at:http://links.lww.com/JS9/G395). The total sample [male (n = 163); female (n = 218)] had a mean age of 51.75 ± 12.07 years old. Sociodemographic and disease characteristics for all patients were presented in Table 1. According to Mayo Clinic prediction models and Interpretation of Chinese expert consensus on the diagnosis and treatment of PNs (2018 version), 149 (39.1%) were judged as low risk stratification, 194 (50.9%) were judged as moderate risk stratification, and 38 (10.0%) were judged as high risk stratification.Table 1Sociodemographic and disease characteristics for 381 patients with lung nodules.ParametersTotal participants (n = 381)• Sociodemographic characteristicsGender, na (%) Male163 (42.8%) Female218 (57.2%)Age, years (Mean ± SDb)51.75 ± 12.07Weight, kg,c median (range)60 (38, 117)Height, m,d median (range)1.60 (1.45, 1.81)BMI,e n (%) < 25293 (76.9%) ≥ 2588 (23.1%)Educational level, n (%) Low (less than high school)131 (34.4%) Medium (high school or equivalent)47 (12.3%) High (college graduate or above)203 (53.3%)• Disease characteristicsState anxiety, n (%) No276 (72.4%) Mild76 (19.9%) Moderate23 (6.0%) Severe6 (1.6%)State depression, n (%) No324 (85.0%) Mild31 (8.1%) Moderate21 (5.5%) Severe5 (1.3%)Number of PNs,f n (%) Single76 (19.9%) Multiple305 (80.1%)Density of PNs, n (%) Solid153 (40.2%) Part-solid46 (12.1%) Ground-glass182 (47.8%)Risk stratification of PNs, n (%) Low149 (39.1%) Moderate194 (50.9%) High38 (10.0%)History of pulmonary disease, n (%) No260 (68.2%) Yes121 (31.8%)History of nodular disease, n (%) No267 (70.1%) Yes114 (29.9%)Personal history of tumor, n (%) No287 (75.3%) Yes94 (24.7%)Family history of tumor, n (%) No247 (64.8%) Yes134 (35.2%)History of smoking, n (%) No276 (72.4%) Yes105 (27.6%)History of alcohol consumption, n (%) No310 (81.4%) Yes71 (18.6%)Surgical history, n (%) No245 (64.3%) Yes136 (35.7%)an, numberbSD, standard deviationckg, kilogramdm, metereBMI, body mass indexfPNs, pulmonary nodules Table 1Sociodemographic and disease characteristics for 381 patients with lung nodules.ParametersTotal participants (n = 381)• Sociodemographic characteristicsGender, na (%) Male163 (42.8%) Female218 (57.2%)Age, years (Mean ± SDb)51.75 ± 12.07Weight, kg,c median (range)60 (38, 117)Height, m,d median (range)1.60 (1.45, 1.81)BMI,e n (%) < 25293 (76.9%) ≥ 2588 (23.1%)Educational level, n (%) Low (less than high school)131 (34.4%) Medium (high school or equivalent)47 (12.3%) High (college graduate or above)203 (53.3%)• Disease characteristicsState anxiety, n (%) No276 (72.4%) Mild76 (19.9%) Moderate23 (6.0%) Severe6 (1.6%)State depression, n (%) No324 (85.0%) Mild31 (8.1%) Moderate21 (5.5%) Severe5 (1.3%)Number of PNs,f n (%) Single76 (19.9%) Multiple305 (80.1%)Density of PNs, n (%) Solid153 (40.2%) Part-solid46 (12.1%) Ground-glass182 (47.8%)Risk stratification of PNs, n (%) Low149 (39.1%) Moderate194 (50.9%) High38 (10.0%)History of pulmonary disease, n (%) No260 (68.2%) Yes121 (31.8%)History of nodular disease, n (%) No267 (70.1%) Yes114 (29.9%)Personal history of tumor, n (%) No287 (75.3%) Yes94 (24.7%)Family history of tumor, n (%) No247 (64.8%) Yes134 (35.2%)History of smoking, n (%) No276 (72.4%) Yes105 (27.6%)History of alcohol consumption, n (%) No310 (81.4%) Yes71 (18.6%)Surgical history, n (%) No245 (64.3%) Yes136 (35.7%)an, numberbSD, standard deviationckg, kilogramdm, metereBMI, body mass indexfPNs, pulmonary nodules Sociodemographic and disease characteristics for 381 patients with lung nodules. n, number SD, standard deviation kg, kilogram m, meter BMI, body mass index PNs, pulmonary nodules Mental state analysis in participants BAI and BDI-II were used to screen 381 patients for anxiety and depression symptoms. Almost one-third of participants (32%) were assessed as state of anxiety or depression, which was regarded as a PD, and one-tenth (10.5%) had both. Our data show that 76 (19.9%) had mild anxiety; 23 (6.0%) had moderate anxiety; 6 (1.6%) had severe anxiety disorder that requires immediate intervention. Also, 31 (8.1%) reported mild depression, 21 (5.5%) reported moderate depression, and 5 (1.3%) reported severe depression. Potential risk and protective factors analysis for PD in PN patients To assess potential risk and protective factors associated with PD in patients of PNs, univariate analysis and binary logistic regression analysis was utilized. Univariate analysis suggested that the presence of psychological distress was significantly associated with gender, density of PNs, history of nodular disease and history of smoking (all p<0.05), whereas age, weight, height, BMI, educational level, number of PNs, risk stratification of PNs, history of pulmonary disease, personal and family history of tumor, history of alcohol consumption as well surgical history were not (all p> 0.05) (Table 2). Based on the DAG, the following variables were included in the multivariable analysis: Density of PNs, History of nodular disease, History of pulmonary disease, Personal history of tumor, and Risk stratification of PNs. (Supplemental Digital Content Figure 1, available at:http://links.lww.com/JS9/G395). Multivariate logistic regression (Fig. 2) revealed that female patients had a higher prevalence of PD than males (OR = 1.77, 95%CI: 1.09-2.89, p = 0.022). Furthermore, individuals with ground-glass nodules were associated with a 1.77-fold increased risk of anxiety and depression relative to those with solid nodules (OR = 1.77, 95%CI: 1.08-2.89, p = 0.022) (Supplemental Digital Content Table 2, available at:http://links.lww.com/JS9/G395). A history of nodular disease showed a trend toward elevated PD risk (OR = 1.94, 95%CI: 1.19-3.15, p = 0.008). Sensitivity analyses had no major impact on the results (Supplemental Digital Content Tables 3-11, available at:http://links.lww.com/JS9/G395). Figure 2.Multivariate stepwise logistic regression analysis. Variables included in the multivariable model were selected based on a Directed Acyclic Graph and a p-value < 0.05 in univariate analysis. The forest plot displays odds ratios (OR) with 95% confidence intervals for each significant predictor of psychological distress. Table 2Univariate analysis of sociodemographic disease parameters associated with mental disorders (anxiety or depression).ParametersNPDa group (n = 259)aPDb group(n = 122)bOR (95%CI)P-valueSociodemographic characteristics• Gender, nc (%) Male127 (49%)36 (29.5%)2.30 (1.45, 3.64)< 0.001 Female132 (51%)86 (70.5%)• Age, years (Mean ± SDd)52.36 ± 11.9950.44 ± 12.160.99 (0.97, 1.01)0.148• Weight, kg,e median (range)60 (40, 85)59 (38, 117)0.99 (0.96, 1.01)0.218• Height, m,f median (range)1.60 (1.45, 1.80)1.60 (1.47, 1.81)0.21 (0.01, 4.89)0.333• BMI,g n (%) < 25199 (76.8%)94 (77%)0.99 (0.59, 1.65)0.963 ≥ 2560 (23.2%)28 (23%)• Educational level, n (%) Low (less than high school)94 (36.4%)36 (29.8%)NAh1NA Medium (high school or equivalent)31 (12.1%)16 (13.1%)1.32 (0.64, 2.71)0.447 High (college graduate or above)133 (51.4%)70 (57.0%)1.36 (0.83, 2.20)0.221Disease characteristics• Number of PNs, i n (%) Single46 (17.8%)30 (24.6%)0.66 (0.39, 1.12)0.120 Multiple213 (82.2%)92 (75.4%)• Density of PNs, n (%) Solid116 (44.8%)37 (30.3%)NANA Part-solid31 (12%)15 (12.3%)1.52 (0.74, 3.11)0.256 Ground-glass112 (43.2%)70 (57.4%)1.96 (1.22, 3.15)0.006• Risk stratification of PNs, n (%) Low96 (37.2%)53 (43.4%)NANA Moderate133 (51.4%)60 (49.3%)0.82 (0.52, 1.30)0.405 High29 (11.2%)9 (7.3%)0.56 (0.25, 1.28)0.170• History of pulmonary disease, n (%) No179 (69.1%)81 (66.4%)1.13 (0.72, 1.79)0.595 Yes80 (30.9%)41 (33.6%)• History of nodular disease, n (%) No197 (76.1%)70 (57.4%)2.36 (1.49, 3.73)< 0.001 Yes62 (23.9%)52 (42.6%)• Personal history of tumor, n (%) No196 (74.5%)94 (77%)0.87 (0.53, 1.45)0.593 Yes66 (25.5%)28 (23%)• Family history of tumor, n (%) No176 (68.0%)71 (58.2%)1.52 (0.98, 2.38)0.063 Yes83 (32.0%)51 (41.8%)• History of smoking, n (%) No176 (68.0%)100 (82.0%)0.47 (0.28, 0.79)0.005 Yes83 (32.0%)22 (18.0%)• History of alcohol consumption, n (%) No208 (80.3%)102 (83.6%)0.80 (0.45, 1.41)0.441 Yes51 (19.7%)20 (16.4%)• Surgical history, n (%) No169 (65.3%)76 (62.6%)1.14 (0.73, 1.78)0.574 Yes90 (34.7%)46 (37.7%)aNPD, no psychological distressbPD, psychological distresscn, numberdSD, standard deviationekg, kilogramfm, metergBMI, body mass indexhNA, not applicableiPNs, pulmonary nodulesBold P-values (P < 0.05) identify significant predictors from the univariable logistic regression analysis comparing the NPD group to the PD group. Multivariate stepwise logistic regression analysis. Variables included in the multivariable model were selected based on a Directed Acyclic Graph and a p-value < 0.05 in univariate analysis. The forest plot displays odds ratios (OR) with 95% confidence intervals for each significant predictor of psychological distress. Table 2Univariate analysis of sociodemographic disease parameters associated with mental disorders (anxiety or depression).ParametersNPDa group (n = 259)aPDb group(n = 122)bOR (95%CI)P-valueSociodemographic characteristics• Gender, nc (%) Male127 (49%)36 (29.5%)2.30 (1.45, 3.64)< 0.001 Female132 (51%)86 (70.5%)• Age, years (Mean ± SDd)52.36 ± 11.9950.44 ± 12.160.99 (0.97, 1.01)0.148• Weight, kg,e median (range)60 (40, 85)59 (38, 117)0.99 (0.96, 1.01)0.218• Height, m,f median (range)1.60 (1.45, 1.80)1.60 (1.47, 1.81)0.21 (0.01, 4.89)0.333• BMI,g n (%) < 25199 (76.8%)94 (77%)0.99 (0.59, 1.65)0.963 ≥ 2560 (23.2%)28 (23%)• Educational level, n (%) Low (less than high school)94 (36.4%)36 (29.8%)NAh1NA Medium (high school or equivalent)31 (12.1%)16 (13.1%)1.32 (0.64, 2.71)0.447 High (college graduate or above)133 (51.4%)70 (57.0%)1.36 (0.83, 2.20)0.221Disease characteristics• Number of PNs, i n (%) Single46 (17.8%)30 (24.6%)0.66 (0.39, 1.12)0.120 Multiple213 (82.2%)92 (75.4%)• Density of PNs, n (%) Solid116 (44.8%)37 (30.3%)NANA Part-solid31 (12%)15 (12.3%)1.52 (0.74, 3.11)0.256 Ground-glass112 (43.2%)70 (57.4%)1.96 (1.22, 3.15)0.006• Risk stratification of PNs, n (%) Low96 (37.2%)53 (43.4%)NANA Moderate133 (51.4%)60 (49.3%)0.82 (0.52, 1.30)0.405 High29 (11.2%)9 (7.3%)0.56 (0.25, 1.28)0.170• History of pulmonary disease, n (%) No179 (69.1%)81 (66.4%)1.13 (0.72, 1.79)0.595 Yes80 (30.9%)41 (33.6%)• History of nodular disease, n (%) No197 (76.1%)70 (57.4%)2.36 (1.49, 3.73)< 0.001 Yes62 (23.9%)52 (42.6%)• Personal history of tumor, n (%) No196 (74.5%)94 (77%)0.87 (0.53, 1.45)0.593 Yes66 (25.5%)28 (23%)• Family history of tumor, n (%) No176 (68.0%)71 (58.2%)1.52 (0.98, 2.38)0.063 Yes83 (32.0%)51 (41.8%)• History of smoking, n (%) No176 (68.0%)100 (82.0%)0.47 (0.28, 0.79)0.005 Yes83 (32.0%)22 (18.0%)• History of alcohol consumption, n (%) No208 (80.3%)102 (83.6%)0.80 (0.45, 1.41)0.441 Yes51 (19.7%)20 (16.4%)• Surgical history, n (%) No169 (65.3%)76 (62.6%)1.14 (0.73, 1.78)0.574 Yes90 (34.7%)46 (37.7%)aNPD, no psychological distressbPD, psychological distresscn, numberdSD, standard deviationekg, kilogramfm, metergBMI, body mass indexhNA, not applicableiPNs, pulmonary nodulesBold P-values (P < 0.05) identify significant predictors from the univariable logistic regression analysis comparing the NPD group to the PD group. Univariate analysis of sociodemographic disease parameters associated with mental disorders (anxiety or depression). NPD, no psychological distress PD, psychological distress n, number SD, standard deviation kg, kilogram m, meter BMI, body mass index NA, not applicable PNs, pulmonary nodules Bold P-values (P < 0.05) identify significant predictors from the univariable logistic regression analysis comparing the NPD group to the PD group. Respiratory microbial features distinguish from PD and NPD patients Psychological disorders are common in patients with PNs, and the body’s microbiota may influence brain function through immune, inflammatory, and endocrine pathways, affecting mood and cognition. To explore this, we collected upper respiratory microbiome samples from 210 patients for 16S rRNA gene sequencing. The flowchart (Fig. 3A) outlines the screening and inclusion/exclusion criteria for the analysis. Figure 3.Study population flowchart and upper respiratory microbial community diversity analysis between NPD and PD groups. (A) A flow chart schematic of the sample and screening process. (B) Pan analysis comparing the total gene repertoire between NPD and PD groups; Pan-genus analysis showing the total number of observed genera as sample size increases. The plateau indicates adequate sampling depth. (C) Core microbiome analysis between the two groups; Core microbiome analysis illustrating the number of shared genera across samples. (D) PCoA at the ASV level. PCoA was conducted using Hellinger distance and the significances of grouping were tested by analysis of dissimilarity (ADONIS) with 999 permutations. (E-H): Alpha diversity indices: (E) ACE, (F) Chao, (G) Sobs, and (H) Pd index between NPD and PD groups. Statistical significance was assessed using the Wilcoxon rank-sum test. (I) Beta diversity difference analysis between NPD and PD groups. Statistical significance was assessed using the Wilcoxon rank-sum test. Abbreviations: NPD, No Psychological Distress; PD, Psychological Distress; PCoA, Principal Co-ordinates Analysis; ASV, Amplicon Sequence Variant. Study population flowchart and upper respiratory microbial community diversity analysis between NPD and PD groups. (A) A flow chart schematic of the sample and screening process. (B) Pan analysis comparing the total gene repertoire between NPD and PD groups; Pan-genus analysis showing the total number of observed genera as sample size increases. The plateau indicates adequate sampling depth. (C) Core microbiome analysis between the two groups; Core microbiome analysis illustrating the number of shared genera across samples. (D) PCoA at the ASV level. PCoA was conducted using Hellinger distance and the significances of grouping were tested by analysis of dissimilarity (ADONIS) with 999 permutations. (E-H): Alpha diversity indices: (E) ACE, (F) Chao, (G) Sobs, and (H) Pd index between NPD and PD groups. Statistical significance was assessed using the Wilcoxon rank-sum test. (I) Beta diversity difference analysis between NPD and PD groups. Statistical significance was assessed using the Wilcoxon rank-sum test. Abbreviations: NPD, No Psychological Distress; PD, Psychological Distress; PCoA, Principal Co-ordinates Analysis; ASV, Amplicon Sequence Variant. Our analysis showed that the Pan and Core species curves plateaued, indicating sufficient sequencing depth and robust results (Fig. 3B-C). Alpha diversity analysis revealed significantly lower microbial diversity in PNs with PD compared to NPD, with marked reductions in Ace, Chao, Sobs, and Pd indices (p = 0.040, p = 0.040, p = 0.040, p = 0.029), but no change in the Shannon index (p = 0.123) (Fig. 3E-H, Supplemental Digital Content Figure 2, available at:http://links.lww.com/JS9/G395 and Supplemental Digital Content Table 12, available at:http://links.lww.com/JS9/G395). PCoA and beta diversity analysis confirmed significant microbial community structure differences between the two groups (p = 0.005 and p = 0.029). (Fig. 3D-I). To further explore the characteristics of the upper respiratory microbiota in PD individuals, we assessed the microbial composition between groups. The core microbiota, consistent across groups, was dominated by g_Streptococcus, g_Veillonella, and g_Prevotella among others (Fig. 4A-B). Comparative analysis revealed differences at specific genus level (Fig. 4C-D). LEfSe analysis further identified 84 taxa differentially abundant between groups (Fig. 4E). Figure 4.Upper respiratory Microbial Community Comparison between NPD and PD Groups. (A) Circos plot visualizing genus-level abundance and links between groups. (B) Community bar plot showing taxonomic composition at the genus level between NPD and PD Groups. (C) Upset diagrams of Genus between NPD and PD Groups illustrating overlaps and unique genus-level taxa. (D) Bar plot of differentially abundant genera identified by the Wilcoxon rank-sum test. Bars represent mean relative abundance, and P-values are adjusted for multiple comparisons using the FDR method. (E) LEfSe analysis between NPD and PD Groups identifying taxa with significant differential abundance (LDA score > 2). (F) Spearman correlation heatmap between clinical variables and microbial genera. Correlation coefficients and significance levels (*p < 0.05, **p < 0.01, ***p < 0.001) are shown. Abbreviations: NPD, No psychological Distress; PD, Psychological distress; FDR: False discovery rate; LEfSe, Linear discriminant analysis Effect Size; LDA, Linear discriminant analysis. Upper respiratory Microbial Community Comparison between NPD and PD Groups. (A) Circos plot visualizing genus-level abundance and links between groups. (B) Community bar plot showing taxonomic composition at the genus level between NPD and PD Groups. (C) Upset diagrams of Genus between NPD and PD Groups illustrating overlaps and unique genus-level taxa. (D) Bar plot of differentially abundant genera identified by the Wilcoxon rank-sum test. Bars represent mean relative abundance, and P-values are adjusted for multiple comparisons using the FDR method. (E) LEfSe analysis between NPD and PD Groups identifying taxa with significant differential abundance (LDA score > 2). (F) Spearman correlation heatmap between clinical variables and microbial genera. Correlation coefficients and significance levels (*p < 0.05, **p < 0.01, ***p < 0.001) are shown. Abbreviations: NPD, No psychological Distress; PD, Psychological distress; FDR: False discovery rate; LEfSe, Linear discriminant analysis Effect Size; LDA, Linear discriminant analysis. Exploring correlations between clinical indicators and upper respiratory microbiota composition for PD in PN patients To explore the potential associations between different microbial species, clinical factors, and PD related symptoms, we conducted a Spearman correlation analysis. Spearman correlation analysis revealed significant associations between clinical factors and respiratory microbiota (Fig. 4F). Specific correlation of PNs density /gender/nodular disease history and microbiota were observed in correlation heatmap. Furthermore, BDI-II and BAI scores were linked to specific microbial abundances (Supplemental Digital Content Figure 3, available at:http://links.lww.com/JS9/G395). We developed machine learning models using two distinct feature sets: a microbiome-only feature set and a combined feature set integrating microbial and clinical variables. From an initial pool of 11 algorithms, we selected the top 5 performing models from each category for detailed analysis (Fig. 5 A-B). Feature selection was performed separately for each approach. For the microbiome-only model, the optimal feature subset contained 10 microbial taxa, while the combined model utilized 25 features comprising both microbial and clinical variables. Figure 5.Comprehensive evaluation of machine learning models and functional pathway analyses for PD prediction based on microbial and clinical data. (A-B) Evaluation of machine learning models using top 30 important bacteria (A) and bacteria plus clinical factors (B) by AUC; (C-D) Summary plot of the SHAP values for each feature on only microbiota sets (C) and bacteria plus clinical factors sets (D). (E-F) Radar charts summarizing performance metrics (AUC, PR-AUC, F1, Sensitivity, Specificity, 1-Brier Score) for the top 5 models under on only microbiota (E) and bacteria plus clinical factors sets (F). (G-H) COG functional pathway differences between NPD and PD groups, including (G) functional enrichment visualization and (H) Wilcoxon test results for significant pathways. (I-J) KEGG pathway analysis showing (I) pathway mapping and (J) statistical comparison of enriched pathways between groups. Abbreviations: NPD, No psychological distress; PD, Psychological distress; AUC, Area under the curve; SHAP, SHapley additive exPlanations; PR-AUC, Precision-recall area under the curve; COG, Clusters of orthologous groups; KEGG, Kyoto encyclopedia of genes and genomes. Comprehensive evaluation of machine learning models and functional pathway analyses for PD prediction based on microbial and clinical data. (A-B) Evaluation of machine learning models using top 30 important bacteria (A) and bacteria plus clinical factors (B) by AUC; (C-D) Summary plot of the SHAP values for each feature on only microbiota sets (C) and bacteria plus clinical factors sets (D). (E-F) Radar charts summarizing performance metrics (AUC, PR-AUC, F1, Sensitivity, Specificity, 1-Brier Score) for the top 5 models under on only microbiota (E) and bacteria plus clinical factors sets (F). (G-H) COG functional pathway differences between NPD and PD groups, including (G) functional enrichment visualization and (H) Wilcoxon test results for significant pathways. (I-J) KEGG pathway analysis showing (I) pathway mapping and (J) statistical comparison of enriched pathways between groups. Abbreviations: NPD, No psychological distress; PD, Psychological distress; AUC, Area under the curve; SHAP, SHapley additive exPlanations; PR-AUC, Precision-recall area under the curve; COG, Clusters of orthologous groups; KEGG, Kyoto encyclopedia of genes and genomes. The predictive performance of the selected models is summarized in Figure 5 C-F, as well Supplemental Digital Content Table 13, available at:http://links.lww.com/JS9/G395 and Supplemental Digital Content Table 14, available at:http://links.lww.com/JS9/G395. Among the models based on microbiome-only sets, Gradient Boosted Decision Trees (GBDT) demonstrated the highest discriminative ability with an AUC of 0.72 (95% CI: 0.60-0.85), followed by K-Nearest Neighbors (KNN, AUC: 0.68; 95% CI: 0.54-0.82), while Logistic Regression and Random Forest both achieved AUCs of 0.66, and Gaussian Naive Bayes showed an AUC of 0.61. The algorithms based on combined sets enhanced predictive performance across all algorithms. Logistic Regression emerged as the top performer with an AUC of 0.75 (95% CI: 0.64-0.87), closely followed by Gaussian Naive Bayes (AUC: 0.74; 95% CI: 0.62-0.86). Tree-based ensemble methods including Random Forest, GBDT, and LightGBM all achieved AUCs of 0.72, though with varying. CIs Supplemental Digital Content Figure 4-5, available at:http://links.lww.com/JS9/G395 demonstrates the contribution of each feature by SHAP values. Potential biological functions of the upper respiratory microbiota Employing PICRUSt2, we predicted functional profiles of the upper respiratory microbiome in NPD and PD groups using KEGG and COG databases (Fig. 5G-J). Significant differences were identified in the top 20 pathways, including Xenobiotics biodegradation and metabolism, Cell growth and death, Lipid metabolism, and Signal transduction. COG classification confirmed these disparities, highlighting differences in RNA processing/modification and intracellular trafficking/secretion. These disparities may be closely associated with inflammatory responses, mental health disorders, and alterations in neurological function. Exploratory mediation analysis of upper respiratory microbiota between clinical factors and PD To explore potential mechanisms, we conducted an exploratory mediation analysis to investigate whether the upper respiratory microbiome plays a role in the associations between clinical factors and BAI/BDI-II scores, adjusting for age, weight, and height (Fig. 6). Initial analyses identified that g_Haemophilus may account for part of the associations of solid (β = 0.738, 95%CI: 0.081-1.721) and ground-glass PNs (β = − 0.523, 95%CI: − 1.325, − 0.021) with anxiety (BAI) scores. Meanwhile, g_Dialister appeared to mediate the associations of both gender (β = 0.452, 95%CI: 0.071-1.141) and a history of nodular disease (β = 0.297, 95%CI: 0.051-0.607) with depression (BDI-II) scores (Supplemental Digital Content Tables 15-19, available at:http://links.lww.com/JS9/G395). Notably, these results should be interpreted as exploratory. Figure 6.Mediation analysis of upper respiratory microbiota between clinical factors and PD. (A) Diagram of the natural indirect effect of clinical factors on PD mediated through microbial taxa. Statistical significance of indirect effects was assessed using bootstrapping with 95% CIs. (B) Mediation models illustrating the indirect effects of g_Haemophilus and g_Dialister on PD via specific clinical pathways. Path coefficients and bootstrap confidence intervals are provided. Abbreviations: PD: Psychological distress; CI: Confidence interval. Mediation analysis of upper respiratory microbiota between clinical factors and PD. (A) Diagram of the natural indirect effect of clinical factors on PD mediated through microbial taxa. Statistical significance of indirect effects was assessed using bootstrapping with 95% CIs. (B) Mediation models illustrating the indirect effects of g_Haemophilus and g_Dialister on PD via specific clinical pathways. Path coefficients and bootstrap confidence intervals are provided. Abbreviations: PD: Psychological distress; CI: Confidence interval. Discussion To the best of our knowledge, this is the first study to comprehensively explore the associations between clinical factors, the upper respiratory microbiota, and psychological distress in patients with PNs. Our findings not only confirm a high prevalence of anxiety and depression in this population but also point to the respiratory microbiome as a potential intermediary link in the lung-brain axis, which may be leveraged for effective risk prediction. First, psychological disorders are common in patients with PNs. Our results showed that the prevalence of PD was 32%, and the overall prevalence of anxiety and depression among participants were 27.6% (95%CI: 23.1%–32.3%) and 15.0% (95%CI: 11.5 %–18.9%), significantly higher than in healthy people (4.8% and 3.6%)[44]. Our findings align with research by Li et al. and Xiao et al. on the occurrence of anxiety and depression[9,13], underscoring the mental health challenges faced by this patient group. Our study also identified specific clinical characteristics that associated with mental health outcomes. The study also identified specific clinical characteristics that contribute to mental health outcomes. Female patients were more likely to experience PD, consistent with epidemiological data indicating that women have a higher prevalence of anxiety and depression[45]. Although psychological, social and cultural elements probably contribute to gender differences, potential biological mechanism including the changing levels of hormones in the brain such as estradiol and progesterone may also explain the results[46–48]. Additionally, ground-glass nodules were associated with a higher risk of anxiety and depression compared to solid nodules, possibly due to their potential for adenocarcinoma in situ or minimally invasive adenocarcinoma[49]. Longer follow-up is advised for these patients[50]. Our findings also suggest that positive cancer screening results, such as for breast and thyroid nodules, increase psychological burden, which is in accordance with recent research[51–53]. These psychological symptoms can affect quality of life, highlighting the need for attention to mental health in patient care. Another important finding is the lack of correlation between PD and a higher risk of lung cancer. Similar findings were reported by recent multicenter studies[54,55]. Their study including 490 patients showed 25% subjects accurately estimated their cancer risk according to the Mayo model, the actual median risk was 7.1%[55]. Similar trends have been observed in other screening contexts, such as breast cancer, where individuals often overestimate their lifetime risk[51,52,56,57]. This suggests that the perceived cancer risk often exceeds the actual risk, leading to unnecessary psychological distress. This overestimation of cancer risk may contribute to unnecessary anxiety, with patients demanding extended or lifetime follow-up despite guidelines recommending shorter surveillance periods[55]. For instance, 39% of patients in other studies believed they required more frequent follow-ups, reflecting a lack of understanding of the true risk and the psychological burden associated with such misperceptions. These findings suggest that there is a pressing need for improved risk communication strategies and psychological support to help patients align their perceptions of risk with evidence-based estimates. With a detailed insight into respiratory and neurological diseases, particularly due to recent studies on SARS-CoV-2, researchers have gradually discovered that the lungs and the brain are an interrelated physiological system, where injuries tend to affect each other[26,58,59]. Our findings revealed significant microbiome differences between PD and NPD groups. Specifically, the NPD group exhibited higher microbial diversity, which has been associated with better psychological outcomes. Spearman correlation analysis further identified significant associations between microbial species and clinical factors, supporting the hypothesis that microbial composition may be linked to psychological health in patients with PNs. Several microbial species were identified as potential key players in the mental health status of these patients. Prevotella, a prominent bacterium in healthy respiratory microbiota, plays a critical role in maintaining microbial diversity and regulating immune responses[60–63]. It has been shown to reduce toll-like receptor (TLR)-4, MAPK, and NF-κB (p65) signaling pathways, as well as the release of pro-inflammatory cytokines such as IL-6 and IL-8, thereby mitigating systemic inflammation[64]. We hypothesize that in the NPD group, the higher abundance of Prevotella could be linked to healthier immune regulation, lower inflammation, and improved psychological well-being. Conversely, the lower abundance of Prevotella in the PD group may indicate immune dysregulation and chronic inflammation, potentially contributing to psychopathology development. Of note, a microbial signature involving Prevotella shows potential for distinguishing between different mental health states, suggesting its utility as a biomarker for auxiliary diagnosis and precision subtyping[65]. Neisseria, another key genus, is part of the normal upper respiratory microbiota[66,67]. Its presence has been correlated with inflammatory processes and immune modulation, which could hypothetically influence mental health. In patients with asthma and chronic obstructive pulmonary disease, Neisseria abundance is linked to immune activation and inflammation[68]. Moreover, BAFF overexpression mice induced a secretory IgA-biased systemic immune response to Neisseria infection[69]. It is thus plausible that the interaction between Neisseria and the host immune system may indirectly affect mood and cognitive function through systemic inflammation. In the PD group, Haemophilus abundance genus was significantly elevated. Haemophilus, commonly found in the upper respiratory tract, can promote pro-inflammatory cytokine production, such as IL-1β and TNF-α, contributing to inflammation[70,71]. These bacteria are known to mediate pro-inflammatory responses via TLR4 activation, inhibit corticosteroid-related pathways, and induce inflammatory Th2 pathways, contributing to chronic low-grade inflammation in the upper airway[72–75]. This inflammation is associated with various mental health disorders, including depression and anxiety. Based on these known mechanisms, we speculate that the elevated Haemophilus abundance in the PD group may exert direct effects on brain immune and neural functions through mechanisms involving lipopolysaccharides and metabolic products. In our exploratory mediation analysis, results were consistent with a model in which Haemophilus could partially offset the effects of solid and ground-glass PNs on PD, reflecting the complex interplay among these variables. One hypothetical interpretation is that the direct protective effect of solid nodules was weakened by the indirect risk posed by the increased abundance of g_Haemophilus, whereas the direct risk of ground-glass nodules was buffered by the indirect protective effect of the reduced g_Haemophilus abundance. We put forward the hypothesis that solid nodules may provide favorable conditions for Haemophilus growth by altering the pulmonary microbiome or through immune responses, while ground-glass nodules may represent an early or subclinical stage where the immune system more effectively controls the bacterial community and inhibits the excessive growth of Haemophilus. These proposed pathways remain speculative and require direct experimental validation. Another key mediator identified was Dialister in our exploratory analysis, a genus may link to gender differences and history of nodular disease in depression. Our data were consistent with a model where gender differences in BDI-II scores were partially mediated by Dialister, and the species fully mediated the relationship between a history of nodular disease and depression. The abundance of Dialister, is negatively correlated with depression scores. Notably, Dialister is considered a potential psychobiotic genus[75,76]. Recent studies indicate that, depression patients have a significantly reduced abundance of Dialister compared to healthy individuals, and its abundance is positively correlated with quality of life indicators[76–78]. It may play a role in regulating the gut-brain axis by participating in the synthesis of metabolic products such as short-chain fatty acids[79]. While the role of Dialister in the gut microbiome has been extensively studied, its presence in the upper respiratory tract and its impact on depression are emerging research areas. Another interesting point is that gender differences may be closely related to the abundance of Dialister through mechanisms such as hormone level variations and immune response differences[80,81]. Dialister is also considered a potential risk factor for ovarian cancer, further suggesting that this species may play a role in certain immune responses and cancer development[82]. The relationship between history of nodular disease and Dialister suggests that this species may play a role in certain aspects of immune system dysregulation. Although our data are associative, it is tempting to speculate on these potential biological mechanisms. However, the role of Dialister in the upper respiratory tract and its association with immune modulation, gender differences, and history of nodular disease remain largely hypothetical and require further exploration through additional studies. Our evaluation of algorithms revealed a critical trade-off between predictive power and clinical utility. While tree-based models like GBDT effectively captured complex nonlinear relationships in microbiome data (AUC: 0.72), they frequently exhibited clinical metric imbalances: GBDT showed critically low sensitivity (0.41), while Random Forest in the combined model achieved extremely high sensitivity (0.955) at the expense of unacceptable specificity (0.439)[83,84]. In contrast, linear models such as Logistic Regression, when integrated with clinical variables, not only achieved the best AUC (0.754) but also maintained an excellent balance between sensitivity and specificity (0.727/0.732), demonstrating superior clinical applicability. This study confirms that focusing solely on high AUC can be misleading; a multi-metric evaluation combining microbiome and clinical data represents the optimal strategy for achieving accurate and balanced predictions[85]. This methodology exemplifies the expanding application of artificial intelligence (AI) in complex biomedical data interpretation, a trend that is transforming fields from anatomical education to clinical biomarker discovery[86,87]. In this study, we revealed the relationship between clinical factors, mental health status, and upper respiratory microbiota in patients with PNs. No prior research has examined this link in patients with PNs, and this is the first retrospective nested case-control study. Our findings underscore the importance of integrating psychological care into the management of patients with PNs, particularly those at higher risk due to gender, nodule characteristics, or microbial imbalances. Furthermore, our study highlights the need for more refined risk communication strategies to address the overestimation of cancer risk, which can lead to unnecessary anxiety and prolonged follow-up. Finally, our research opens avenues for future studies investigating the role of microbiome modulation in mental health. However, several limitations should be noted. First, our study design was cross-sectional, limiting our ability to establish causal relationships between microbiota composition and mental health but also precludes definitive conclusions from our mediation analyses, as the temporal sequence between variables cannot be verified. Furthermore, these mediation analyses were exploratory and hypothesis-generating. And detection bias could have influenced the observed associations. These preliminary findings require independent validation in prospective cohorts or interventional studies. Additionally, our study lacks pathological diagnoses and long-term clinical outcomes. Future studies incorporating these data are essential to investigate the direct correlation between the respiratory microbiome and the pathological nature or progression of pulmonary nodules, thereby validating and extending our findings on the potential role of microbial signatures. To address these, our research team is conducting a larger, prospective, multi-center study to examine long-term changes, microbiota composition, and their effects on anxiety and depression in patients with PNs. Furthermore, future prospective studies that incorporate pathological confirmation are essential to validate and extend our findings on microbial signatures. Additionally, the translational potential of our signatures requires future validation in animal models to establish causal relationships[88,89]. Building on the exploratory associations reported in this work, we also plan to investigate the translational potential of microbiota modulation, including the feasibility of targeted probiotic interventions, as a novel adjunctive strategy for mitigating psychological distress in this patient population. Conclusion In conclusion, this study indicates a high prevalence of psychological distress (PD) among patients with PNs, particularly associated with female patients, those with ground-glass nodules, and individuals with a history of nodular disease. Significant differences in the microbiome were found between PD and NPD groups, particularly involving Prevotella, Neisseria, Haemophilus, and Dialister. Machine learning models integrating microbial features with clinical variables demonstrated superior and balanced predictive performance. Furthermore, exploratory mediation analysis proposed that g_Haemophilus and g_Dialister may play a role in the relationship between clinical factor and anxiety/depression scores. Collectively, these findings highlight the upper respiratory microbiome as a promising target for identifying PD and advancing mental health screening in PN patients. Future studies should focus on developing microbiota-based approaches, such as validating microbial biomarkers and elucidating underlying pathways, to formulate personalized strategies for alleviating psychological distress in this vulnerable population.