Skip to main navigation Skip to search Skip to main content

Predicting mental health problems in gay men in Peru using machine learning and deep learning models

  • Alejandro Aybar-Flores
  • , Elizabeth Espinoza-Portilla

Research output: Contribution to journalArticle in a journalpeer-review

Abstract

Mental health disparities among those who self-identify as gay men in Peru remain a pressing public health concern, yet predictive models for early identification remain limited. This research aims to (1) develop machine learning and deep learning models to predict mental health issues in those who self-identify as gay men, and (2) evaluate the influence of demographic, economic, health-related, behavioral and social factors using interpretability techniques to enhance understanding of the factors shaping mental health outcomes. A dataset of 2186 gay men from the First Virtual Survey for LGBTIQ+ People in Peru (2017) was analyzed, considering demographic, economic, health-related, behavioral, and social factors. Several classification models were developed and compared, including Logistic Regression, Artificial Neural Networks, Random Forest, Gradient Boosting Machines, eXtreme Gradient Boosting, and a One-dimensional Convolutional Neural Network (1D-CNN). Additionally, the Shapley values and Layer-wise Relevance Propagation (LRP) heatmaps methods were used to evaluate the influence of the studied variables on the prediction of mental health issues. The results revealed that the 1D-CNN model demonstrated the strongest performance, achieving the highest classification accuracy and discrimination capability. Explainability analyses underlined prior infectious diseases diagnosis, access to medical assistance, experiences of discrimination, age, and sexual identity expression as key predictors of mental health outcomes. These findings suggest that advanced predictive techniques can provide valuable insights for identifying at-risk individuals, informing targeted interventions, and improving access to mental health care. Future research should refine these models to enhance predictive accuracy, broaden applicability, and support the integration of artificial intelligence into public health strategies aimed at addressing the mental health needs of this population.

Original languageEnglish
Article number60
Number of pages35
JournalInformatics
Volume12
Issue number3
DOIs
StatePublished - Sep 2025
Externally publishedYes

Bibliographical note

Publisher Copyright:
© 2025 by the authors.

UN SDGs

This output contributes to the following UN Sustainable Development Goals (SDGs)

  1. SDG 3 - Good Health and Well-being
    SDG 3 Good Health and Well-being
  2. SDG 5 - Gender Equality
    SDG 5 Gender Equality
  3. SDG 10 - Reduced Inequalities
    SDG 10 Reduced Inequalities
  4. SDG 16 - Peace, Justice and Strong Institutions
    SDG 16 Peace, Justice and Strong Institutions
  5. SDG 17 - Partnerships for the Goals
    SDG 17 Partnerships for the Goals

Keywords

  • Deep learning
  • Gay men
  • LRP
  • Machine learning
  • Mental health
  • Peru
  • Shapley values

Fingerprint

Dive into the research topics of 'Predicting mental health problems in gay men in Peru using machine learning and deep learning models'. Together they form a unique fingerprint.

Cite this