Modeling antiretroviral therapy adherence among people living with HIV: a cross-sectional study at Pantang Hospital, Ghana Authors: Eric Nyarko, Irene A. Kretchy, Grace Lovia Allotey-Babington, Adwoa Oforiwaa Kwakye, Benjamin Tagoe, Nathaniel Opoku Atuahene, Xoese Kalenu, Augustina Koduah, Sheila Gyasi Nimako, Kwabena FM Opuni, Seth Kwabena Amponsah Published: 2026 ABSTRACT BackgroundPoor adherence to antiretroviral therapy (ART) continues to undermine HIV treatment outcomes in sub-Saharan Africa, including Ghana.ObjectiveThis study aimed to quantify ART treatment adherence among people living with HIV (PLHIV) at Pantang Hospital in Ghana.MethodsThis study took place from July to October 2025 among people living with HIV who receive care at Pantang Hospital in Accra, Ghana. Using random sampling, data were collected from 151 participants through interviewer-administered questionnaires assessing sociodemographic characteristics and ART adherence behaviors. A hold-back validation method was used to split the final dataset, allocating 80% to training and 20% to validation. Six machine learning models were applied to identify and rank key adherence predictors, and model performance was compared.ResultsIn all, 151 participants were recruited. Participants had a median age of 42 years; 75.5% were female, and 39.7% were older than 45 years. Most participants were Christian (88.7%), lived in peri-urban areas (70.9%), and were self-employed (72.2%). Non-adherence behaviors were common: 66.9% reported forgetting to take medication, 64.2% reported carelessness, and 85.4% reported stopping medication when feeling worse. Among the six models, Elastic Net regression demonstrated the best overall performance. The strongest predictors of non-adherence were not taking medication over the past weekend (utility estimate 0.3471, 95% confidence interval 0.2292–0.4650) and missing medication 6–10 times in the past week (utility estimate 0.2693, 95% confidence interval 0.1538–0.3848).ConclusionsThe study showed poor adherence to ART among this cohort of PLHIV which increases the risk of community-level transmission. This study provides quantitative data to help develop effective interventions to address poor adherence to improve health outcomes of PLHIV.Supplementary InformationThe online version contains supplementary material available at https://doi.org/10.1186/s12879-026-13836-z. Introduction Human immunodeficiency virus (HIV), first identified in the 1980s, has claimed several lives worldwide. Of the 39 million people worldwide living with HIV, more than two-thirds (≈ 67%) of these individuals are in sub-Saharan Africa, which has the highest number of infections [1]. Antiretroviral therapy (ART) is the most effective way to delay or prevent HIV from advancing to AIDS. As of 2022, over 29.8 million people worldwide had access to ART [1]. Data from Ghana suggest that more people have had access to ART over the last few years [2]. However, poor adherence to ART is one of the biggest barriers to successful HIV care and treatment [2–4]. Earlier treatment options required adherence rates of over 95% for effectiveness [5], whereas modern antiretroviral regimens can achieve viral suppression with adherence levels as low as 80% [6]. The inability to optimally adhere to ART has been associated with therapeutic failure, adversely affecting virologic suppression, immunologic and clinical outcomes which lead to HIV/AIDS-related morbidity and mortality [2, 5, 7]. In 2022, only five countries in Africa, including Botswana, Eswatini, Rwanda, the United Republic of Tanzania, and Zimbabwe achieved the 95-95-95 targets for HIV. The 95-95-95 targets aim to diagnose 95% of people living with HIV, provide ART to 95% of those diagnosed, and ensure that 95% of those treated achieve viral suppression [1, 8]. Despite these well-established principles, achieving optimal adherence to ART is a global health challenge [9]. Evidence from recent studies demonstrates considerable regional variability in adherence; for instance, research conducted in Northern Egypt reported an adherence rate of 66.7% [9], while studies among adult patients in Southern Ethiopia documented similarly low adherence at 67.8% [10]. In sub-Saharan African settings, including Ghana, suboptimal adherence remains a major barrier to effective HIV control, contributing to higher rates of treatment failure and a rapid progression to AIDS [11]. This challenge is driven by a complex interplay of socioeconomic, structural, and psychosocial factors, including adverse drug reactions, co-occurring mental health conditions, HIV-related stigma, forgetfulness and treatment fatigue, and financial constraints [11, 12]. While these contextual factors may uniquely affect ART adherence, empirical data from specific settings remain limited [13]. While most studies have focused on identifying individual predictors of adherence, relatively few studies have used modeling approaches to quantify the influence and interactions of multiple factors driving non-adherence within specific clinical contexts [14–16]. While traditional statistical models, such as multivariate logistic regression, have been used to identify factors affecting adherence to ART, these models often overlook the complex relationships within patient data [17]. This study seeks to fill this gap by using machine learning (ML) models to analyze ART adherence patterns among people living with HIV (PLHIV) at Pantang Hospital in Accra, Ghana. The study highlights treatment adherence patterns and offers actionable insights for targeted interventions, improving HIV services, and helping achieve sustained viral suppression. Methods Study design This cross-sectional study, which used an interviewer-administered questionnaire took place from July to October 2025 in the outpatient setting to gather data on ART adherence among PLHIV who visit the ART clinic at Pantang Hospital in Accra, Ghana, during routine scheduled ART medication refill appointments. Pantang Hospital comprises two main departments: General Hospital Care Services and Specialized Psychiatry Care Hospital. The ART clinic, which was integrated into the General Hospital Care Services in 2008, provides comprehensive services to PLHIV, including testing, counseling, antiretroviral therapy, prevention of mother-to-child transmission, and community education. The clinic serves several patients, including children [18], and provides ART medications that are primarily administered orally. Patients manage their treatment at home according to prescribed regimens that align with national HIV treatment guidelines. These ART medications are offered free of charge through the hospital’s ART pharmacy/clinic during scheduled refill appointments. In this study, individuals living with HIV who visited Pantang Hospital were eligible if they were at least eighteen years old, had been receiving ART for a minimum of six months, were willing to participate, provide consent, and maintained good physical health. Those excluded from the study included clients with speech or hearing impairments, as well as PLHIV who were in critical medical conditions or were hospitalized at the time of data collection. Sample size estimation The minimum number of respondents (N) required for this study is 110. This is based on a sample size (n) calculation [19] and the available choice scenarios (l = 14), with the relationship defined as N = n/l. In this formula, the sample size (n) must be greater than or equal to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{r}^{2}s/v{a}^{2}$$\end{document}. Here, r = 1.96 represents the inverse cumulative distribution function of a standard normal distribution, v = 50% is the true choice proportion of the study population under the assumption of equal choice probabilities, a = 0.05 is the allowable deviation percentage between the estimated value \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\widehat{v}$$\end{document} and the true value v, s equals 1 - v, and α is the 95% confidence level in the estimations [20]. Although the minimum required number of respondents is set at 110 based on this calculation, we enrolled 151 participants, which is sufficient for the study and to enhance statistical power. Statistical experiment block design We used a maximum difference scaling design to gather information on ART adherence among PLHIV. This design approach was chosen over the traditional Likert-scale ratings because it allows respondents to trade off among attributes explicitly, yields more discriminative and reliable preference data, and reduces biases associated with rating scales, such as central tendency and acquiescence bias [21, 22]. To implement this, we identified and slightly modified seven relevant attributes based on the Simplified Medication Adherence Questionnaire [23] and aligned them with the study’s objectives through focus group discussions with 11 PLHIV. We conducted content validity testing with four subject experts in the field, considering scores above 0.78 based on their ratings as valid. The medication adherence related attributes included: “careless at times about taking medicine”, “ever forget to take my medicine”, “have not taken my medications 1–2 times in the past week”, “have not taken my medications 3–5 times in the past week”, “have not taken my medications 6–10 times in the past week”, “have not taken my medications over the past weekend” and “sometimes I stop taking my medication if I start to feel worse”. We employed a statistical experiment block design to create seven choice scenarios of size 3, with two replicates. Each medication adherence attribute appeared three times throughout all sets in the field survey. Importantly, within each choice set generated from the block design, an attribute was included only once. In this context, we assume that each attribute in the choice set has the same chance of being picked. Before the main survey, we conducted a cognitive pretest/pilot study to evaluate the clarity, comprehension, and appropriateness of the items in the choice tasks. This allowed us to make slight modifications for improved clarity and contextual understanding. Data collection and statistical analysis We selected 151 PLHIV out of a sample population of 900 using a random sampling technique, assisted by computer-generated pseudo-random numbers, and employed an interviewer-administered questionnaire (see Supplementary file 1) at the ART Clinic of Pantang Hospital. During the data collection, participants were asked, in English or a Ghanaian language, to identify which attributes they felt were most and least related to their adherence to ARTs. These responses formed the target variable. Moreover, to prevent misinterpretation, enumerators assisted participants in completing the survey on tablets, ensuring neutrality by refraining from viewing their responses in real-time. Seventeen respondents who declined to participate were replaced with new participants selected using computer-generated pseudo-random numbers. We checked the validity of the responses by looking at how consistent the chosen factors related to ART adherence were in the scenarios presented at both the start and the end of the questionnaire. Data cleaning for missing values and outliers was performed using automated imputation controls in JMP. This software identifies missing-data patterns and helps fill in the gaps. We assumed that each choice reflected the participants’ underlying values or utilities, which we estimated using six ML models. We split the final dataset using the hold-back cross validation method, which yielded improved model performance compared to both 5- and 10-fold cross-validation, allocating 80% to training and 20% to validation. This approach allows us to train the six ML models effectively on a substantial amount of data while reserving a portion to assess its performance and ensure its generalizability to new, unseen data. All statistical analyses were performed using JMP Pro (Version 17.0). We also collected individual-level factors, including socio-demographic and behavioral characteristics such as age, gender, residency, marital status, religion, educational status, as well as mental health indicators like depression, anxiety, and post-traumatic stress. Results Socio-demographic characteristics, mental health status and ART adherence among participants The total number of participants comprised 37 males (24.5%) and 114 females (75.5%) (see Table 1). The median age of the participants was 42 years, with nearly equal proportions of individuals aged over 45 years (39.7%) and those aged 31 to 45 years (38.4%). A significant number of participants, 56 (37.1%), were married, and 52 (34.4%) had completed senior high school. The majority identified as Christians, 134 (88.7%), and resided in peri-urban areas, 107 (70.9%). Most participants were self-employed 109 (72.2%), working in occupations such as trading, construction, fashion design, and hairdressing/styling. Our assessment of respondents’ mental status using the Hospital Anxiety and Depression Scale revealed a significant majority experienced low levels of anxiety in the past week. Notably, 119 participants (78.8%) did not feel tense or ‘wound up’ at all, and 122 participants (80.8%) did not experience the feeling of being frightened with ‘butterflies’ in their stomachs. Moreover, 125 participants (82.8%) did not feel as if something awful was about to happen, and also did not feel restless or the need to be on the move. While 112 participants (74.2%) indicated that worrying thoughts went through their minds only occasionally, 126 participants (83.4%) stated they did not experience sudden feelings of panic. It is worth noting that 64 participants (42.4%) admitted they do not often feel at ease. Most of the participants, 129 (85.4%), reported that they sometimes stop taking their medication when they start to feel worse. Additionally, 101 (66.9%) reported forgetting to take their medication at some point, and 97 (64.2%) admitted to being careless about taking their medication. Table 1Socio-demographic characteristics, mental health status and ART adherence among participantsVariableCategoryRespondents (n = 151)Age (years) median (IQR)42 (33–53)Age (years)18–3033 (21.9%)31–4558 (38.4%)> 4560 (39.7%)GenderFemale114 (75.5%)Male37 (24.5%)Marital StatusDivorced26 (17.2%)Married56 (37.1%)Never married (Single)51 (33.8%)Widowed18 (11.9%)Education LevelJHS/Middle school52 (34.4%)None13 (8.6%)Primary/Basic29 (19.2%)SHS/Voc./Tech41 (27.2%)Tertiary16 (10.6%)Employment StatusEmployed16 (10.6%)Self-Employed109 (72.2%)Student4 (2.6%)Unemployed22 (14.6%)Residential StatusPeri-Urban107 (70.9%)Rural6 (4.0%)Urban38 (25.1%)ReligionChristianity134 (88.7%)Islamic14 (9.3%)Traditional3 (2.0%)I sometimes stop taking my medication if I start to feel worseYes129 (85.4%)No22 (14.6%)I ever forget to take my medicineYes101 (66.9%)No50 (33.1%)I haven’t taken my medications 1–2 times in the past weekYes73 (48.3%)No78 (51.7%)I am careless at times about taking medicineYes97 (64.2%)No54 (35.8%)I haven’t taken my medications 3–5 times in the past weekYes101 (66.9%)No50 (33.1%)I feel tense or ‘wound up’A lot of the time16 (10.6%)From time to time, occasionally10 (6.6%)Most of the time6 (4.0%)Not at all119 (78.8%)I get a sort of frightened feeling like ‘butterflies’ in the stomachNot at all122 (80.8%)Occasionally10 (6.6%)Quite often12 (7.9%)Very often7 (4.6%)I get a sort of frightened feeling as if something awful is about to happenA little, but it doesn’t worry me11 (7.3%)Not at all125 (82.8%)Very definitely and quite badly5 (3.3%)Yes, but not too badly10 (6.6%)I feel restless when I have to be on the moveNot at all125 (82.8%)Not very much10 (6.6%)Quite a lot12 (7.9%)Very much indeed4 (2.6%)Worrying thoughts go through my mindA great deal of the time12 (7.9%)A lot of the time19 (12.6%)From time to time, but not too often8 (5.3%)Only occasionally112 (74.2%)I get sudden feelings of panicNot at all126 (83.4%)Not very often10 (6.6%)Quite often10 (6.6%)Very often indeed5 (3.3%)I can sit at ease and feel relaxedDefinitely21 (13.9%)Not at all56 (37.1%)Not Often64 (42.4%)Usually10 (6.6%)Note: Percentages may not sum to exactly 100% due to rounding; IQR: Interquartile range Table 1Socio-demographic characteristics, mental health status and ART adherence among participantsVariableCategoryRespondents (n = 151)Age (years) median (IQR)42 (33–53)Age (years)18–3033 (21.9%)31–4558 (38.4%)> 4560 (39.7%)GenderFemale114 (75.5%)Male37 (24.5%)Marital StatusDivorced26 (17.2%)Married56 (37.1%)Never married (Single)51 (33.8%)Widowed18 (11.9%)Education LevelJHS/Middle school52 (34.4%)None13 (8.6%)Primary/Basic29 (19.2%)SHS/Voc./Tech41 (27.2%)Tertiary16 (10.6%)Employment StatusEmployed16 (10.6%)Self-Employed109 (72.2%)Student4 (2.6%)Unemployed22 (14.6%)Residential StatusPeri-Urban107 (70.9%)Rural6 (4.0%)Urban38 (25.1%)ReligionChristianity134 (88.7%)Islamic14 (9.3%)Traditional3 (2.0%)I sometimes stop taking my medication if I start to feel worseYes129 (85.4%)No22 (14.6%)I ever forget to take my medicineYes101 (66.9%)No50 (33.1%)I haven’t taken my medications 1–2 times in the past weekYes73 (48.3%)No78 (51.7%)I am careless at times about taking medicineYes97 (64.2%)No54 (35.8%)I haven’t taken my medications 3–5 times in the past weekYes101 (66.9%)No50 (33.1%)I feel tense or ‘wound up’A lot of the time16 (10.6%)From time to time, occasionally10 (6.6%)Most of the time6 (4.0%)Not at all119 (78.8%)I get a sort of frightened feeling like ‘butterflies’ in the stomachNot at all122 (80.8%)Occasionally10 (6.6%)Quite often12 (7.9%)Very often7 (4.6%)I get a sort of frightened feeling as if something awful is about to happenA little, but it doesn’t worry me11 (7.3%)Not at all125 (82.8%)Very definitely and quite badly5 (3.3%)Yes, but not too badly10 (6.6%)I feel restless when I have to be on the moveNot at all125 (82.8%)Not very much10 (6.6%)Quite a lot12 (7.9%)Very much indeed4 (2.6%)Worrying thoughts go through my mindA great deal of the time12 (7.9%)A lot of the time19 (12.6%)From time to time, but not too often8 (5.3%)Only occasionally112 (74.2%)I get sudden feelings of panicNot at all126 (83.4%)Not very often10 (6.6%)Quite often10 (6.6%)Very often indeed5 (3.3%)I can sit at ease and feel relaxedDefinitely21 (13.9%)Not at all56 (37.1%)Not Often64 (42.4%)Usually10 (6.6%)Note: Percentages may not sum to exactly 100% due to rounding; IQR: Interquartile range Socio-demographic characteristics, mental health status and ART adherence among participants Note: Percentages may not sum to exactly 100% due to rounding; IQR: Interquartile range Model comparison and ART adherence The traditional maximum difference model produced higher goodness-of-fit values with the corrected Akaike Information Criterion (AICc) at 3752.757 and the Bayesian Information Criterion (BIC) at 3782.4561, compared to the ML models (AICc values ranged from 1553.2838 to 1560.9441, and BIC values ranged from 1575.4565 to 1596.3431). Notably, the Elastic Net model achieved the lowest AICc value of 1553.2838 and the lowest BIC value of 1575.4565, making it the best choice over the traditional model. Both the Elastic Net and LASSO models had the same predictive performance, both achieving a mean Root Average Square Error (RASE) of 0.81177, outperforming other ML candidates whose RASE values ranged from 0.81203 to 0.81519. The Generalized Regression Model (pruned forward selection) had the fastest fit time at 118 milliseconds, followed by the Generalized Regression Model (forward selection) with a fit time of 143 milliseconds. In contrast, the Support Vector Machine took the longest time to fit, completing the process in 2843 milliseconds. Despite its longer fitting time of 1899 milliseconds, the Elastic Net regression model emerged as the preferred candidate due to its outstanding predictive performance and the lowest goodness-of-fit metrics. It is the best option for applications that value fitting quality, predictive performance, and computational efficiency because its outstanding predictive capabilities outweigh the additional processing cost. We decided to present the results from the Elastic Net regression model because it performed the best among all the models we tested. Table 2 presents the results of our model, which highlights the attributes related to ART treatment adherence. It includes utility estimates (UE), standard errors (SE), and confidence intervals (CIs). Out of the seven adherence related attributes we studied, five were found to be statistically significant at the 95% confidence level (indicated by 95% CIs that do not include zero). The only exception was the attribute “have not taken my medications 3–5 times in the past week.” It is important to note that the attribute “sometimes I stop taking my medication if I start to feel worse” serves as the reference factor. Relative to the reference factor, the attribute, “have not taken my medications over the past weekend” received the highest utility estimate (UE: 0.3471; 95% CI: 0.2292, 0.4650), followed closely by “Have not taken my medications 6–10 times in the past week” (UE: 0.2693; 95% CI: 0.1538, 0.3848). Additional attributes include “Have not taken my medications 1–2 times in the past week” (UE: 0.2250; 95% CI: 0.1100, 0.3400) and “ever forget to take my medicine” (UE: 0.1905; 95% CI: 0.0663, 0.3146). Lastly, while still statistically significant, “careless at times about taking medicine” had the lowest utility estimate (UE: 0.1433; 95% CI: 0.0186, 0.2679) among the ART adherence attributes. Table 2Elastic Net regression model results of antiretroviral therapy adherenceAttributeUtility EstimateSEWald ChiSquareProb > ChiSquareLower 95%Upper 95%“Careless at times about taking medicine”0.14330.06365.07600.0243*0.01860.2679“Ever forget to take my medicine”0.19050.06339.05020.0026*0.06630.3146“Have not taken my medications 1–2 times in the past week”0.22500.058614.70720.0001*0.11000.3400“Have not taken my medications 3–5 times in the past week”0.06530.06011.18260.2768-0.05240.1831“Have not taken my medications 6–10 times in the past week”0.26930.058920.9012< 0.0001*0.15380.3848“Have not taken my medications over the past weekend”0.34710.060133.2974< 0.0001*0.22920.4650 Model Fit Statistics AICc6158.2107BIC6204.8637RASE0.8117Negative Log-Likelihood758.3347P-valueP < 0.0001AICc: corrected Akaike Information Criterion; BIC: Bayesian Information Criterion; RASE: Root Average Squared Error; SE: Standard error; *Statistically significant attributes at p-values less than 0.001, 0.01, 0.05 or 95% confidence intervals without zero Table 2Elastic Net regression model results of antiretroviral therapy adherenceAttributeUtility EstimateSEWald ChiSquareProb > ChiSquareLower 95%Upper 95%“Careless at times about taking medicine”0.14330.06365.07600.0243*0.01860.2679“Ever forget to take my medicine”0.19050.06339.05020.0026*0.06630.3146“Have not taken my medications 1–2 times in the past week”0.22500.058614.70720.0001*0.11000.3400“Have not taken my medications 3–5 times in the past week”0.06530.06011.18260.2768-0.05240.1831“Have not taken my medications 6–10 times in the past week”0.26930.058920.9012< 0.0001*0.15380.3848“Have not taken my medications over the past weekend”0.34710.060133.2974< 0.0001*0.22920.4650 Model Fit Statistics AICc6158.2107BIC6204.8637RASE0.8117Negative Log-Likelihood758.3347P-valueP < 0.0001AICc: corrected Akaike Information Criterion; BIC: Bayesian Information Criterion; RASE: Root Average Squared Error; SE: Standard error; *Statistically significant attributes at p-values less than 0.001, 0.01, 0.05 or 95% confidence intervals without zero Elastic Net regression model results of antiretroviral therapy adherence AICc: corrected Akaike Information Criterion; BIC: Bayesian Information Criterion; RASE: Root Average Squared Error; SE: Standard error; *Statistically significant attributes at p-values less than 0.001, 0.01, 0.05 or 95% confidence intervals without zero Multiple comparisons of attributes related to ART adherence Results of multiple comparison of attributes related to adherence to ART is shown in Table 3. Accompanying these comparisons is an overall average decision chart (Fig. 1). This chart shows the group average, the upper decision limit (UDL), and the lower decision limit (LDL) [24]. An adherence attribute is significant if it is higher than the UDL or lower than the LDL (Fig. 1). The adherence attributes “careless at times about taking medicine,” “ever forget to take my medicine,” “have not taken my medications 1–2 times in the past week,” and “have not taken my medications 6–10 times in the past week” were found to be statistically insignificant. In contrast, the attribute “have not taken my medications over the past weekend” demonstrated a significantly positive average. Conversely, “have not taken my medications 3–5 times in the past week” and “sometimes I stop taking my medication if I start to feel worse” showed significant negative average differences (Table 3). Table 3Differences in ART adherence related attributes from overall averageMedication adherenceDifferenceSEAdjusted Lower 95%Adjusted Upper 95%t RatioAdjusted Prob>|t|Careless at times about taking medicine-0.03900.0435-0.15550.0774-0.90000.9441Ever forget to take my medicine0.00810.0430-0.10720.12350.19001.0000Have not taken my medications 1–2 times in the past week0.04270.0359-0.05340.13891.19000.8165Have not taken my medications 3–5 times in the past week-0.11690.0381-0.2192-0.0147-3.06000.0152*Have not taken my medications 6–10 times in the past week0.08700.0363-0.01010.18412.40000.1072Have not taken my medications over the past weekend0.16480.03820.06220.26734.30000.0001*Sometimes I stop taking my medication if I start to feel worse-0.18230.0405-0.2908-0.0738-4.5000< 0.0001* Table 3Differences in ART adherence related attributes from overall averageMedication adherenceDifferenceSEAdjusted Lower 95%Adjusted Upper 95%t RatioAdjusted Prob>|t|Careless at times about taking medicine-0.03900.0435-0.15550.0774-0.90000.9441Ever forget to take my medicine0.00810.0430-0.10720.12350.19001.0000Have not taken my medications 1–2 times in the past week0.04270.0359-0.05340.13891.19000.8165Have not taken my medications 3–5 times in the past week-0.11690.0381-0.2192-0.0147-3.06000.0152*Have not taken my medications 6–10 times in the past week0.08700.0363-0.01010.18412.40000.1072Have not taken my medications over the past weekend0.16480.03820.06220.26734.30000.0001*Sometimes I stop taking my medication if I start to feel worse-0.18230.0405-0.2908-0.0738-4.5000< 0.0001* Differences in ART adherence related attributes from overall average Fig. 1Comparisons of ART adherence related attributes with overall average decision chart Comparisons of ART adherence related attributes with overall average decision chart Discussion This cross-sectional study quantified ART treatment adherence among PLHIV attending Pantang Hospital, Accra, Ghana. The higher proportion of females in this study may indicate that women are utilizing ART and HIV treatment services more than men. Moreover, multiple ML models were applied to identify patterns of ART treatment adherence. Overall, the findings indicate suboptimal adherence despite ongoing engagement with ART services. Notably, a large proportion of participants reported missing doses, with non-adherence particularly pronounced during weekends and within the week preceding assessment. These patterns underscore persistent adherence challenges in urban and peri-urban contexts and align with existing evidence demonstrating that sustained access to ART, while essential, does not by itself guarantee optimal medication adherence [23, 25, 26]. Non-adherence to ART remains a widespread challenge among PLHIV in Ghana, with missed doses observed across nearly all demographic subgroups. On the contrary, other studies have found single population trends [1, 9, 25, 26]. In this study, the adherence behavior shows occasional, unintentional lapses—such as forgetting doses—occurring alongside more frequent and repeated missed doses, indicating a broad spectrum of adherence challenges rather than isolated incidents. In this context, clinicians and clinical HIV coordinators need to consistently assess adherence to ART and provide tailored, ongoing support. A key contribution of the current study lies in the quantitative interpretation of adherence behaviors using ML-derived utility estimates. Among the adherence related attributes modeled, “not taking medications over the past weekend” emerged as the strongest predictor of non-adherence, followed by missing medications 6–10 times within the past week. These results indicate that routine disruption and repeated missed doses are strongly associated with non-adherence, alongside forgetfulness and carelessness. Although forgetfulness and carelessness were found to be predictive (statistically significant) of non-adherence, their lower utility estimates suggest differences in their modeled contribution without implying that they are less important clinically. Together, these findings highlight the multifaceted nature of adherence behavior, in which both recurrent and occasional lapses contribute meaningfully to non-adherence. Studies from other sub-Saharan African settings report similar patterns, showing that repeated missed doses, disruptions to daily routines and forgetfulness are more strongly associated with poor adherence [27–29]. By highlighting that not all missed doses contribute equally to non-adherence, this study adds important nuance to the adherence literature and underscores the need for interventions that consider not only how often doses are missed, but also when those lapses occur. From a programmatic perspective, hospitals may help avert these adherence challenges by routinely screening for missed doses during clinic visits and providing brief, targeted adherence counseling that addresses repeated missed doses. Facility-based reminders, patient-centered counseling, and cues to action delivered by healthcare providers can improve ART adherence. The prominence of weekend non-adherence is particularly noteworthy. Weekend dose lapses are often underexplored in adherence research, yet they may reflect complex behavioral and social dynamics, including changes in daily routines, social activities, alcohol use, stigma-related concealment, and competing responsibilities. Similar patterns have been reported among socially vulnerable populations, where instability in daily structure contributes to inconsistent medication use [30]. The present findings indicate that addressing adherence solely through reminders for daily doses may be insufficient unless high-risk periods, such as weekends, are explicitly targeted in counseling and intervention strategies. From a methodological standpoint, the superior goodness-of-fit of the ML models compared to the traditional maximum difference model offers important insights into adherence. Among the six models evaluated, the Elastic Net regression demonstrated the best overall performance. This finding is consistent with methodological evidence showing that Elastic Net is well suited for datasets characterized by correlated predictors and moderate sample sizes, as is common in behavioral and clinical epidemiology research [31]. Unlike traditional logistic regression models commonly applied in adherence studies [25, 26], Elastic Net effectively balances variable selection and coefficient shrinkage, allowing for more stable and interpretable models in the presence of overlapping behavioral indicators. This study aimed to quantify ART treatment adherence among PLHIV at Pantang Hospital in Ghana. The results of this study align with and extend findings from Ghana and other sub-Saharan African settings. In the Ga West Municipality, Accra, Ghana, Addo et al. [25] reported adherence of 44.6%, emphasizing the role of self-efficacy and cues to action, while Adjei-Mensah et al. [26] identified privacy, client satisfaction, and period of use of ART as significant determinants of ART adherence in urban Accra population. Although the present study did not explicitly model health system or structural variables, the dominance of behavioral attributes suggests that, within this clinical context, routine-related and behavioral factors may outweigh sociodemographic or service-related characteristics in shaping adherence outcomes. Similar conclusions have been drawn in studies from other African countries, where behavioral determinants remain central despite differences in health system structure [32]. Limitations of the study The cross-sectional study limits causal inference, and adherence was assessed using self-reported measures, which may be influenced by recall or social desirability bias, with no way to verify participants’ integrity. Additionally, the single-site setting/moderate sample size may restrict generalizability, and the higher proportion of females may introduce gender-related bias. Nonetheless, the study provides valuable evidence demonstrating how ML approaches can move beyond simple adherence analysis to quantify the relative importance of specific behaviors. Future research should employ a longitudinal study, incorporate objective adherence indicators such as viral load or pharmacy refill data, psychosocial and mental health measures such as anxiety/depression, and validate these models across multiple ART clinics in Ghana and sub-Saharan Africa. Conclusion The findings of this study have important implications for HIV care and public health practice. First, adherence interventions should prioritize identification of patients exhibiting frequent or weekend-specific missed doses, as these behaviors carry the greatest weight for non-adherence. Secondly, ML-based adherence models provide a more promising strategy than traditional methods, which could guide targeted interventions. Evidence from systematic reviews indicates that ML approaches can enhance prediction and personalization in HIV-related outcomes when appropriately implemented [29]. However, such integration must be accompanied by safeguards addressing ethical considerations, data quality, and clinician interpretability. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Supplementary Material 1