An Explainable XGBoost Framework for Mortality Prediction in People Living with HIV Receiving Antiretroviral Therapy
Downloads
Mortality remains an important concern among people living with HIV (PLHIV) receiving antiretroviral therapy (ART), particularly when high-risk patients are not identified early. This study presents an explainable mortality prediction approach based on an optimized Extreme Gradient Boosting (XGBoost) classifier. A retrospective dataset containing 393 clinical records was analyzed. Before model training, duplicate entries were removed, missing values were imputed, categorical variables were encoded, and class imbalance in the training data was addressed using the Synthetic Minority Over-sampling Technique (SMOTE). Optuna was employed to determine suitable XGBoost hyperparameters, while SHapley Additive exPlanations (SHAP) were used to examine how individual predictors affected the model output. Performance was evaluated on an independent testing set using accuracy, precision, recall, F1-score, and the area under the receiver operating characteristic curve (ROC-AUC). The resulting classifier achieved an accuracy of 89.87%, weighted precision of 0.91, weighted recall of 0.90, weighted F1-score of 0.90, and an ROC-AUC of 0.948. For the mortality class, recall reached 0.97, with 30 of 31 mortality cases correctly detected. Follow-up duration and functional status contributed most strongly to the predictions. SHAP analysis further showed whether these predictors shifted individual outputs toward mortality or survival. The integration of optimized predictive modeling with explainable artificial intelligence enabled accurate mortality prediction while providing transparent insight into how individual predictors influenced the model output. The findings suggest that the model may assist in identifying patients who require closer monitoring, although validation using external and multicenter data is necessary before clinical implementation.
Copyright (c) 2026 Ni Putu Likayuni Viona, Ngakan Nyoman Kutha Krisnawijaya, Desak Nyoman Widyanthini (Author)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlikel 4.0 International (CC BY-SA 4.0) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).






