Age-Stratified Mental Health Prediction Using SHAP: An Explainable Artificial Intelligence Framework

Abstract

Mental health disorders present a growing global concern, yet predictive models often overlook age-specific variations in risk factors. This study introduces an explainable artificial intelligence (XAI) framework for age-stratified mental health risk prediction using Shapley Additive Explanations (SHAP). Using the Open Sourcing Mental Illness (OSMI) dataset, the study stratifies individuals into five different age groups (18-55+ years) and applies machine learning models - Random Forest, extreme gradient boosting, and support vector machine - enhanced with SHAP to identify key predictors across life stages. The findings reveal significant variations in risk factors: younger adults (18-24) are influenced by social support, while familial history and past mental health disorders gain prominence in middle-aged groups (25-54). For older adults (55+), social networks and environmental stressors become critical. Unlike traditional «black box» AI models, SHAP provides interpretable insights, ensuring transparency in predictive decision-making. This study contributes to the literature by demonstrating that mental health risks are not static but evolve with age, necessitating tailored interventions. The framework advances age-specific predictive modelling and offers actionable insights for policymakers and clinicians, particularly in resource-constrained settings. By addressing the limitations of conventional AI approaches, this research establishes a foundation for personalised, explainable, and effective mental health risk assessment across diverse populations. The integration of XAI with age stratification sets a new benchmark for mental health research, highlighting the transformative potential of AI-driven, context-sensitive solutions in addressing the global burden of mental health disorders.
  • Referencias
  • Cómo citar
  • Del mismo autor
  • Métricas
Balogun, A. O., Lafenwa-Balogun, F. B., Mojeed, H. A., Adeyemo, V. E., Akande, O. N., Akintola, A. G., Bajeh, A. O., & Usman-Hamza, F. E. (2020). SMOTE-Based Homogeneous Ensemble Methods for Software Defect Prediction (pp. 615-631). https://doi.org/10.1007/978-3-030-58817-5_45

Bowers, A. J., & Zhou, X. (2019). Receiver Operating Characteristic (ROC) Area Under the Curve (AUC): A Diagnostic Measure for Evaluating the Accuracy of Predictors of Education Outcomes. Journal of Education for Students Placed at Risk (JESPAR), 24(1), 20-46. https://doi.org/10.1080/10824669.2018.1523734

Byeon, H. (2023). Advances in Machine Learning and Explainable Artificial Intelligence for Depression Prediction. International Journal of Advanced Computer Science and Applications, 14(6). https://doi.org/10.14569/IJACSA.2023.0140656

Ding, H., Li, N., Li, L., Xu, Z., & Xia, W. (2025). Machine learning-enabled mental health risk prediction for youths with stressful life events: A modelling study. Journal of Affective Disorders, 368, 537-546. https://doi.org/10.1016/j.jad.2024.09.111

Domínguez-Olmedo, J. L., Gragera-Martínez, Á., Mata, J., & Pachón, V. (2022). Age-Stratified Analysis of COVID-19 Outcome Using Machine Learning Predictive Models. Healthcare, 10(10), 2027. https://doi.org/10.3390/healthcare10102027

Dwivedi, R., Dave, D., Naik, H., Singhal, S., Omer, R., Patel, P., Qian, B., Wen, Z., Shah, T., Morgan, G., & Ranjan, R. (2023). Explainable AI (XAI): Core Ideas, Techniques, and Solutions. ACM Computing Surveys, 55(9), 1-33. https://doi.org/10.1145/3561048

Fergus, P., & Chalmers, C. (2022). Performance Evaluation Metrics (pp. 115-138). https://doi.org/10.1007/978-3-031-04420-5_5

González-Nóvoa, J. A., Busto, L., Rodríguez-Andina, J. J., Fariña, J., Segura, M., Gómez, V., Vila, D., & Veiga, C. (2021). Using Explainable Machine Learning to Improve Intensive Care Unit Alarm Systems. Sensors, 21(21), 7125. https://doi.org/10.3390/s21217125

Ikram, M., Shaikh, N. F., Vishwanatha, J. K., & Sambamoorthi, U. (2022). Leading Predictors of COVID-19-Related Poor Mental Health in Adult Asian Indians: An Application of Extreme Gradient Boosting and Shapley Additive Explanations. International Journal of Environmental Research and Public Health, 20(1). https://doi.org/10.3390/ijerph20010775

Islam, M. T., Ashraf, K., Hosen, Md. H., Nawar, S., & Asgar, S. (2024). Predictive Modeling of Anxiety Levels in Bangladeshi University Students: A Voting-Based Approach with LIME and SHAP Explanations. 2024 International Conference on Advances in Computing, Communication, Electrical, and Smart Systems (ICACCESS), 01-06. https://doi.org/10.1109/iCACCESS61735.2024.10499576

Javed, A., Lee, C., Zakaria, H., Buenaventura, R. D., Cetkovich-Bakmas, M., Duailibi, K., Ng, B., Ramy, H., Saha, G., Arifeen, S., Elorza, P. M., Ratnasingham, P., & Azeem, M. W. (2021). Reducing the stigma of mental health disorders with a focus on low -and middle- income countries. Asian Journal of Psychiatry, 58, 102601. https://doi.org/10.1016/j.ajp.2021.102601

Kabir, M. M., Hafiz, M. S., Bandyopadhyaa, S., Jim, J. R., & Mridha, M. F. (2024). Tea leaf age quality: Age-stratified tea leaf quality classification dataset. Data in Brief, 54, 110462. https://doi.org/10.1016/j.dib.2024.110462

Kerz, E., Zanwar, S., Qiao, Y., & Wiechmann, D. (2023). Toward explainable AI (XAI) for mental health detection based on language behavior. Frontiers in Psychiatry, 14. https://doi.org/10.3389/fpsyt.2023.1219479

Khan, A. E., Hasan, M. J., Anjum, H., Mohammed, N., & Momen, S. (2024). Predicting life satisfaction using machine learning and explainable AI. Heliyon, 10(10), e31158. https://doi.org/10.1016/j.heliyon.2024.e31158

Kusuma, K., Larsen, M., Quiroz, J. C., & Torok, M. (2024). Age-stratified predictions of suicide attempts using machine learning in middle and late adolescence. Journal of Affective Disorders, 365, 126-133. https://doi.org/10.1016/j.jad.2024.08.043

Lee, H., Operario, D., Yi, H., Choo, S., & Kim, S.-S. (2019). Internalized Homophobia, Depressive Symptoms, and Suicidal Ideation Among Lesbian, Gay, and Bisexual Adults in South Korea: An Age-Stratified Analysis. LGBT Health, 6(8), 393-399. https://doi.org/10.1089/lgbt.2019.0108

Leng, Q., Guo, J., Tao, J., Meng, X., & Wang, C. (2024). OBMI: oversampling borderline minority instances by a two-stage Tomek link-finding procedure for class imbalance problem. Complex & Intelligent Systems, 10(4), 4775-4792. https://doi.org/10.1007/s40747-024-01399-y

Letoffe, O., Huang, X., Asher, N., & Marques-Silva, J. (2024). From SHAP Scores to Feature Importance Scores. http://arxiv.org/abs/2405.11766

Li, M., Sun, H., Huang, Y., & Chen, H. (2024). Shapley value: from cooperative game to explainable artificial intelligence. Autonomous Intelligent Systems, 4(1), 2. https://doi.org/10.1007/s43684-023-00060-8

Mbuya, E., Mokheleli, T., Bokaba, T., & Ndayizigamiye, P. (2023). A Multiclass Approach to Predicting Diabetes Using Machine Learning. https://aisel.aisnet.org/acis2023/140

Mohamed, E. S., Naqishbandi, T. A., Bukhari, S. A. C., Rauf, I., Sawrikar, V., & Hussain, A. (2023). A hybrid mental health prediction model using Support Vector Machine, Multilayer Perceptron, and Random Forest algorithms. Healthcare Analytics, 3, 100185. https://doi.org/10.1016/j.health.2023.100185

Mokheleli, T., Bokaba, T., & Museba, T. (2023). An In-Depth Comparative Analysis of Machine Learning Techniques for Addressing Class Imbalance in Mental Health Prediction. https://aisel.aisnet.org/acis2023/15

Mokheleli, T., Bokaba, T., Museba, T., & Ntshingila, N. (2024). A Machine Learning Approach to Mental Disorder Prediction: Handling the Missing Data Challenge (pp. 93-106). https://doi.org/10.1007/978-3-031-63999-9_6

Montesinos López, O. A., Montesinos López, A., & Crossa, J. (2022). Support Vector Machines and Support Vector Regression. In Multivariate Statistical Machine Learning Methods for Genomic Prediction (pp. 337-378). Springer International Publishing. https://doi.org/10.1007/978-3-030-89010-0_9

Nadkarni, A., Hanlon, C., & Patel, V. (2024). Mental Health Care Models in Low- and Middle-Income Countries. In Tasman’s Psychiatry (pp. 3347-3393). Springer International Publishing. https://doi.org/10.1007/978-3-030-51366-5_156

Naslund, J. A., & Deng, D. (2021). Addressing mental health stigma in low-income and middle-income countries: A new frontier for digital mental health. Ethics, Medicine and Public Health, 19, 100719. https://doi.org/10.1016/j.jemep.2021.100719

OSMI. (2023). About OSMI. Open Sourcing Mental Health. https://osmihelp.org/about/about-osmi.html

Páez, A., & Boisjoly, G. (2022). Exploratory Data Analysis (pp. 25-64). https://doi.org/10.1007/978-3-031-20719-8_2

Pinto, M. F., Batista, J., Leal, A., Lopes, F., Oliveira, A., Dourado, A., Abuhaiba, S. I., Sales, F., Martins, P., & Teixeira, C. A. (2023). The goal of explaining black boxes in EEG seizure prediction is not to explain models’ decisions. Epilepsia Open, 8(2), 285-297. https://doi.org/10.1002/epi4.12748

Pirjatullah, Kartini, D., Nugrahadi, D. T., Muliadi, & Farmadi, A. (2021). Hyperparameter Tuning using GridsearchCV on The Comparison of The Activation Function of The ELM Method to The Classification of Pneumonia in Toddlers. 2021 4th International Conference of Computer and Informatics Engineering (IC2IE), 390-395. https://doi.org/10.1109/IC2IE53219.2021.9649207

Ratantja Kusumajati, F., Rahmat, B., & Junaidi, A. (2024). IMPLEMENTATION OF BALANCING DATA METHOD USING SMOTETOMEK IN DIABETES CLASSIFICATION USING XGBOOST. Jurnal Ilmiah Kursor, 12(4), 201-212. https://doi.org/10.21107/kursor.v12i4.410

Sagi, O., & Rokach, L. (2021). Approximating XGBoost with an interpretable decision tree. Information Sciences, 572, 522-542. https://doi.org/10.1016/j.ins.2021.05.055

Shiraly, R., Jazayeri, S. A., Seifaei, A., Jeihooni, A. K., & Griffiths, M. D. (2024). Suicidal thoughts and behaviors among untreated illicit substance users: a population-based study. Harm Reduction Journal, 21(1), 96. https://doi.org/10.1186/s12954-024-01015-9

Sun, Z., Wang, G., Li, P., Wang, H., Zhang, M., & Liang, X. (2024). An improved random forest based on the classification accuracy and correlation measurement of decision trees. Expert Systems with Applications, 237, 121549. https://doi.org/10.1016/j.eswa.2023.121549

Talukder, Md. A., Sharmin, S., Uddin, M. A., Islam, M. M., & Aryal, S. (2024). MLSTL-WSN: machine learning-based intrusion detection using SMOTETomek in WSNs. International Journal of Information Security, 23(3), 2139-2158. https://doi.org/10.1007/s10207-024-00833-z

Wang, C., Feng, L., & Qi, Y. (2021). Explainable deep learning predictions for illness risk of mental disorders in Nanjing, China. Environmental Research, 202, 111740. https://doi.org/10.1016/j.envres.2021.111740

World Health Organisation. (2024, October 10). Mental health of adolescents. World Health Organization. https://www.who.int/news-room/fact-sheets/detail/adolescent-mental-health

Zhang, J., Feng, X., Wang, W., Liu, S., Zhang, Q., Wu, D., & Liu, Q. (2024). Predicting the Risk of Loneliness in Children and Adolescents: A Machine Learning Study. Behavioral Sciences, 14(10), 947. https://doi.org/10.3390/bs14100947
Mokheleli, T. (2026). Age-Stratified Mental Health Prediction Using SHAP: An Explainable Artificial Intelligence Framework. ADCAIJ: Advances in Distributed Computing and Artificial Intelligence Journal, 14, e32910. https://doi.org/10.14201/adcaij.32910

Downloads

Download data is not yet available.

Author Biography

Tsholofelo Mokheleli

,
University of Johannesburg, Johannesburg, South Africa

Department of Applied Information Systems, University of Johannesburg, Johannesburg, South Africa

+ −