Abstract Body

Background

Achieving consistent retention of people living with HIV (PLHIV) in care remains a challenge in Uganda, despite substantial progress towards UNAIDS 95-95-95 targets. This study used advanced machine learning and deep learning techniques applied to deidentified longitudinal treatment and demographic data routinely collected in HIV clinics to predict clients at greatest risk of missing treatment appointments.

Methods

This retrospective study used a longitudinal dataset of 66,206 PLHIV who initiated HIV care during 2000-2023, with 1,479,121 clinical visits from 86 health facilities in Uganda, extracted from the central case-based surveillance database. We trained and compared the performance of traditional machine learning models (Decision Tree, Random Forest, AdaBoost, and XGBoost) and the Bidirectional Encoder Representations from Transformers (BERT), model, which is more suitable for analyzing sequential data (e.g., medical records). Feature importance was analyzed using the shapely additive explanations method to identify the most influential predictors. We also investigated the impact of various sampling techniques, including undersampling, oversampling, and synthetic minority oversampling to address class imbalance and improve model performance. Model performance was evaluated using accuracy, precision, recall, F1-score, and AUC-ROC metrics.

Results

The dataset comprised 43,132 (65.1%) females with a median age of 36.0 years and 23,074 (34.9%) males with a median age of 41.0 years. Each client had an average of 22.34 clinical visits, with 10.7% of appointments missed and 74.9% missing at least one appointment. The BERT model demonstrated superior performance, achieving an AUC score of 0.96, 94.8% accuracy, 97.1% precision, 100% recall, and an F1-score of 94.2%. In comparison, the XGBoost model with undersampling achieved an AUC score of 0.90, 80.7% accuracy, 97.1% precision, 80.8% recall, and an F1-score of 88.2%. Feature importance analysis showed that historical treatment adherence, visit frequency, treatment duration, and visits on the current regimen are the most influential predictors of appointment interruption.

Conclusions

This study highlights the efficacy of transformer-based models like BERT in handling sequential clinical data and improving patient retention predictions. Integrating these predictive models into electronic medical systems could facilitate proactive treatment strategies, enabling the identification of clients at risk of missing their appointments. 

Table or Figure