The association between heavy metal exposure and increased susceptibility to depression is well established. This study aimed to develop an interpretable predictive model for depression based on heavy metal exposure levels using data from the National Health and Nutrition Examination Survey (2005–2020). Multiple machine learning algorithms, including AdaBoost, decision tree, k-nearest neighbors, random forest, support vector machine, and XGBoost were evaluated to determine the optimal model for predicting depressive disorder. Model interpretability was enhanced through an integrated pipeline combining permutation feature importance analysis, partial dependence plots, and Shapley additive explanations. Data from 5,092 eligible participants were randomly partitioned into training and validation sets. The random forest model demonstrated the strongest performance, achieving an accuracy of 90%, an area under the curve of 0.9, and an F1-score of 0.47 in the validation set. Key metals identified as influential predictors included blood mercury, urinary tungsten, urinary thallium, and blood cadmium with contribution weights of 2.16% ± 0.19%, 1.26% ± 0.10%, 0.79% ± 0.10%, and 0.66% ± 0.08%, respectively. Partial dependence analysis revealed inverse associations between depression risk and both blood mercury (0.1–0.62 µg/L) and urinary thallium (0.011–0.12 µg/L) within specific concentration ranges. Conversely, urinary tungsten (0.013–0.096 µg/L) and blood cadmium (0.068–0.29 µg/L) exhibited positive correlations. Interaction analysis further indicated that mercury and tungsten showed potential interaction as primary determinants of depression risk. Our findings highlight the potential of specific heavy metals as predictive biomarkers and demonstrate the power of interpretable machine learning in uncovering complex environment-health associations.
No takes yet. Share an insight, caveat, or question.
Guo et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: