Accepted for/Published in: JMIR AI
Date Submitted: Oct 30, 2024
Date Accepted: Nov 17, 2025
Date Submitted to PubMed: Dec 8, 2025
XAI-Driven Comparative Analysis of Machine Learning Models for Predicting HIV Viral Non-Suppression in Ugandan Patients: A Retrospective Cross-Sectional Study
ABSTRACT
Background:
HIV viral suppression is essential for improving health outcomes and reducing transmission rates amongst people living with HIV (PLWH). In Uganda, where HIV/AIDS is a major public health concern, machine learning (ML) models can predict viral suppression effectively. However, limited use of explainable artificial intelligence (XAI) methods affects model transparency and clinical utility.
Objective:
This study aimed to develop and compare ML models for predicting viral non-suppression in Ugandan PLWH on ART, then systematically apply comprehensive XAI techniques to the best-performing model to identify key predictors and demonstrate interpretability at both population and individual patient levels.
Methods:
We retrospectively analysed clinical and demographic data from 1101 Ugandan PLWH on ART at the HIV clinic in Muyembe HCIV between June 2016 and April 2018, focusing on predicting viral non-suppression (viral load >1000 copies/mL). The dataset was divided into model-building (training: 80%) and validation (test: 20%) sets. To address class imbalance, the synthetic minority over-sampling technique (SMOTE) was applied. For global explanation, eight machine learning algorithms—logistic regression, stacked ensemble, random forest, support vector machines, extreme gradient boosting, k-nearest neighbours, naïve Bayes and artificial neural networks—were compared. Model performance was evaluated using metrics such as accuracy, precision, recall, F1 score, Cohen's kappa and AUC. For local explanation, individual conditional expectation (ICE) plots, SHapley Additive exPlanations (SHAP), break-down and SHAP force plots were used to provide insights into predictions for individual patients.
Results:
The XGBoost ensemble model demonstrated superior performance with an accuracy of 0.89, precision of 0.59, recall of 0.65, and AUC of 0.80. The model achieved high specificity (0.93) and moderate sensitivity, yielding a Cohen's kappa of 0.55 and F1 score of 0.62, indicating good discriminative ability for viral non-suppression prediction. SHAP feature importance analysis identified adherence assessment over the preceding three months as the most influential predictor of viral non-suppression, followed by age group, urban residence, and duration on ART. Local SHAP explanations consistently demonstrated that poor adherence was the primary driver of both correctly identified non-suppressed cases and false positive predictions, reinforcing adherence as the critical determinant of treatment outcomes.
Conclusions:
The XGBoost model demonstrated optimal performance for predicting viral non-suppression amongst Ugandan PLWH on ART, achieving an AUC of 0.80. Comprehensive XAI analysis identified adherence assessment as the primary predictor, followed by age group, residence type, and ART duration. XAI methods provided transparent interpretation of model predictions at both population and individual patient levels, enabling identification of key risk factors for targeted clinical interventions in resource-limited settings.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.