Integrating social cognitive theory with machine learning to predict MSM-women sexual behavior: a multicenter random forest model development study in China

Abstract Understanding and predicting sexual behavior patterns through the lens of Social Cognitive Theory (SCT) is essential for identifying behavioral bridges that facilitate HIV transmission. MSM who engage in sexual activity with women (MSM-W) represent a critical yet underexplored subgroup in China. However, existing studies lack theory-driven predictive frameworks that explicitly integrate psychological mechanisms with robust analytics. This study aimed to develop and validate an SCT-guided machine-learning model to predict MSM-W behavior and to evaluate its discriminatory and calibration performance across population subgroups. We developed a theory-driven machine-learning framework integrating SCT with a random forest–guided logistic regression model. Data were collected from 2,403 MSM across six urban regions in China. Model development included: (1) SCT-guided candidate variable construction, (2) random-forest feature screening using mean decrease accuracy (MDA), (3) nested cross-validation and bootstrap optimism correction, (4) calibration assessment, and (5) threshold selection using the Youden index. Model performance was evaluated using ROC-AUC, PR-AUC, Brier score, calibration slope/intercept, subgroup analyses (age, education, marital status, migrant status), and comparison with a baseline demographic-only model. Among all participants, 406 (16.9%) reported sexual behavior with women in the past six months. The final SCT-guided model incorporating nine predictors (GAD-7, PHQ-9, self-esteem, age, education level, marital status, sexual orientation, recent group sex with men, and pre-sex drug use) demonstrated good discrimination (AUC = 0.80), moderate PR-AUC (0.53), and good overall accuracy (Brier score = 0.107). Calibration analysis showed a slope of 0.91 (95% CI: 0.76–1.09) and intercept of − 0.20 (95% CI: −0.53 to 0.15), indicating acceptable agreement between predicted and observed risks. The optimal probability threshold selected by the Youden index was 0.148 (sensitivity 0.72; specificity 0.77; NPV 0.93). Subgroup analyses demonstrated stable performance across age, education, marital, and migrant strata. Compared with the baseline demographic-only model (AUC = 0.76; Brier = 0.113), the full SCT-integrated model showed consistent improvement. Results were translated into an individualized nomogram for practical risk assessment. This study provides a theory-informed and statistically robust framework for predicting MSM-W behavior. By integrating SCT with machine learning, the model captures the joint influence of psychological distress, self-evaluation, and behavioral context on bisexual behavior patterns. The tool offers a non-stigmatizing, early-screening approach for identifying behavioral risk bridges in MSM populations and may inform targeted HIV prevention strategies in China.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-01-22
DOI
https://doi.org/10.1038/s41598-026-36202-0
Primary Topic
Adolescent Sexual and Reproductive Health
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Integrating social cognitive theory with machine learning to predict MSM-women sexual behavior: a multicenter random forest model development study in China

Chen Jianyu, Ying Gao, Shangbin Liu, Huifang Xu et al.
Scientific Reports
Adolescent Sexual and Reproductive Health
article

Integrating social cognitive theory with machine learning to predict MSM-women sexual behavior: a multicenter random forest model development study in China

Chen Jianyu, Ying Gao, Shangbin Liu, Huifang Xu, Yong Cai, Quyige Gao, Gang Xu, Ying Wang
article en

Abstract

Abstract Understanding and predicting sexual behavior patterns through the lens of Social Cognitive Theory (SCT) is essential for identifying behavioral bridges that facilitate HIV transmission. MSM who engage in sexual activity with women (MSM-W) represent a critical yet underexplored subgroup in China. However, existing studies lack theory-driven predictive frameworks that explicitly integrate psychological mechanisms with robust analytics. This study aimed to develop and validate an SCT-guided machine-learning model to predict MSM-W behavior and to evaluate its discriminatory and calibration performance across population subgroups. We developed a theory-driven machine-learning framework integrating SCT with a random forest–guided logistic regression model. Data were collected from 2,403 MSM across six urban regions in China. Model development included: (1) SCT-guided candidate variable construction, (2) random-forest feature screening using mean decrease accuracy (MDA), (3) nested cross-validation and bootstrap optimism correction, (4) calibration assessment, and (5) threshold selection using the Youden index. Model performance was evaluated using ROC-AUC, PR-AUC, Brier score, calibration slope/intercept, subgroup analyses (age, education, marital status, migrant status), and comparison with a baseline demographic-only model. Among all participants, 406 (16.9%) reported sexual behavior with women in the past six months. The final SCT-guided model incorporating nine predictors (GAD-7, PHQ-9, self-esteem, age, education level, marital status, sexual orientation, recent group sex with men, and pre-sex drug use) demonstrated good discrimination (AUC = 0.80), moderate PR-AUC (0.53), and good overall accuracy (Brier score = 0.107). Calibration analysis showed a slope of 0.91 (95% CI: 0.76–1.09) and intercept of − 0.20 (95% CI: −0.53 to 0.15), indicating acceptable agreement between predicted and observed risks. The optimal probability threshold selected by the Youden index was 0.148 (sensitivity 0.72; specificity 0.77; NPV 0.93). Subgroup analyses demonstrated stable performance across age, education, marital, and migrant strata. Compared with the baseline demographic-only model (AUC = 0.76; Brier = 0.113), the full SCT-integrated model showed consistent improvement. Results were translated into an individualized nomogram for practical risk assessment. This study provides a theory-informed and statistically robust framework for predicting MSM-W behavior. By integrating SCT with machine learning, the model captures the joint influence of psychological distress, self-evaluation, and behavioral context on bisexual behavior patterns. The tool offers a non-stigmatizing, early-screening approach for identifying behavioral risk bridges in MSM populations and may inform targeted HIV prevention strategies in China.

Scientific ReportsVol. 16(1)
Shanghai Jiao Tong University (CN), Tongren Hospital (CN), Shanghai University of Medicine and Health Sciences (CN)
Gender equality
Openalex Percentile: Top 82%
Adolescent Sexual and Reproductive Health
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.