- 1South African Medical Research Council/University of Johannesburg Pan African Centre for Epidemics Research Extramural Unit, Faculty of Health Sciences, University of Johannesburg, Johannesburg, South Africa
- 2Department of Statistics, Faculty of Science, University of Johannesburg, Johannesburg, South Africa
Background: The human immunodeficiency virus (HIV) remains one of the leading causes of death globally, with South Africa bearing a significant burden. As an effective way of reducing HIV transmission, HIV testing interventions are crucial and require the involvement of key stakeholders, including healthcare professionals and policymakers. New technologies like machine learning are remarkably reshaping the healthcare landscape, especially in HIV testing. However, their implementation from the stakeholders’ point of view remains unclear. This study explored the perspectives of key stakeholders in Gauteng Province on the status of machine learning applications in HIV testing in South Africa.
Methods: The study used an exploratory qualitative approach to recruit 15 stakeholders working in government and non-government institutions rendering HIV testing services. The study participants were healthcare professionals such as public health experts, lab scientists, medical doctors, nurses, HIV testing services, and retention counselors. Individual-based in-depth interviews were conducted using open-ended questions. Thematic content analysis was used, and results were presented in themes and sub-themes.
Results: Three main themes were determined, namely awareness level, existing applications, and perceived potential of machine learning in HIV testing interventions. A total of nine sub-themes were discussed in the study: limited knowledge among frontline workers, research vs. implementation gap, need for education, self-testing support, data analysis tools, counseling aids, youth engagement, system efficiency, and data-driven decisions. The study shows that integration of machine learning would enhance HIV risk prediction, individualized testing through HIV self-testing, and youth engagement. This is crucial for reducing HIV transmission, addressing stigma, and optimizing resource allocation. Despite the potential, machine learning is underutilized in HIV testing services beyond statistical analysis in South Africa. Key gaps identified were a lack of implementation of research findings and a lack of awareness among frontline workers and end-users.
Conclusion: Policymakers should design educational programs to improve awareness of existing machine learning initiatives and encourage the implementation of research findings into HIV testing services. A follow-up study should assess the feasibility, structural challenges, and design implementation strategies for the integration of machine learning in HIV testing in South Africa.
1 Introduction
The human immunodeficiency virus/acquired immunodeficiency syndrome (HIV/AIDS) remains one of the leading causes of death globally, with South Africa bearing a significant burden (1). With an adult prevalence rate of 15.6%, Gauteng Province ranked sixth in 2022, according to the South African HIV Prevalence, Incidence, and Behavior Survey (SABSSM) (2). As an effective way of reducing HIV transmission, HIV testing interventions are crucial and require the involvement of key stakeholders, including healthcare professionals and policymakers (3, 4). The National HIV Testing Services Policy's emphasis on enhancing HIV Testing Services (HTS) within government and private health facilities significantly improved the uptake and acceptability of HIV testing (4). However, there are still hard-to-reach populations whose HIV status remains unknown, highlighting the need to adopt new testing strategies.
New technologies like artificial intelligence (AI) and machine learning are remarkably reshaping the healthcare landscape, especially in HIV testing (3, 5). Essentially, machine learning algorithms are sets of AI tools used in analyzing complex healthcare data to enhance early diagnosis and treatment of HIV (3, 5–7). Machine learning can be supervised or unsupervised, depending on whether the algorithm is trained on labeled data or the system self-defines the data structure from unlabeled input (8). They are used in various forms. In HIV risk/test predictions, common statistical machine learning tools used include logistic regression, random forest, support vector machines, extreme gradient boosting machines, principal component analysis, etc (5). They can also be useful in enabling HIV self-testing (HIVST) when integrated with digital devices in the form of chatbots or conversational agents (9, 10). Machine learning recently emerged as an integral tool for improving the accuracy and efficacy of HIV diagnostic devices (5).
In establishing prioritized testing and resource optimization, studies have utilized machine learning techniques to predict high-risk individuals, such as key populations (KPs) (5, 8, 11). Such strategies are crucial, especially due to the current reductions in funding for HIV interventions, which heavily affect developing countries, including South Africa (12). Thus, targeted HIV testing enhances efficient resource allocation and contributes to the efforts aimed at ending the HIV epidemic (13). For instance, multiple machine learning models demonstrated strength in effectively classifying HIV risk among men who have sex with men (MSM) in China (14). The study recommends clinicians use comparable strategies to help priority groups self-monitor their risk for targeted testing, early diagnosis, and reduce HIV transmission (14). Likewise, a supervised machine learning technique with four different models repeatedly achieved high accuracy in predicting HIV testing among South African adults (15). The use of random forest for enabling data-driven decisions, while leveraging digital platforms to enhance HIV testing programs, was emphasized in the study (15).
Furthermore, a key function of machine learning is mitigating the tendency of false HIV test results (5). Elkhadrawi et al. (16) achieved more than 90% accuracy in classifying false and true positive HIV results from clinical data in the United States of America (USA). In South Africa, machine learning algorithms deployed as mobile applications achieved 98% sensitivity and 100% specificity in interpreting HIV rapid test images as true positives/negatives (17). Even though HTS counselors are trained in quality assurance, ensuring HIV testing results are highly accurate, human errors are sometimes inevitable (17, 18). Hence, machine learning plays a critical role in ensuring the accuracy of HIV diagnosis.
Moreover, HIVST was introduced in 2016 in South Africa (19); the same year, HIVST and partner notifications guidelines were released by the World Health Organization (WHO) to address stigma, discrimination, and privacy concerns in screening services (20). Many studies found HIVST acceptable to various sociodemographic groups in South Africa, giving preferences to its convenience and privacy over traditional HIV testing (21–25). However, HIVST alone presents limitations in pre- and post-test counseling and lacks the ability to link users' results to care (26). Thus, digital initiatives, including AI tools, have been introduced to address these challenges (21, 26). Studies show that machine learning, when interacting with mobile devices, can facilitate self-pre- and post-counseling, link HIV results to health facilities, and enhance index testing while maintaining users' privacy and confidentiality (27–30). A pilot study using AI conversational agents in mobile devices exhibited strong capability in aiding HIV counseling, with high acceptability reported among users in low-resource settings (9). Machine learning-driven HVST, particularly when accompanied by voice-overs, has been proven feasible and accepted by high-risk individuals (10). According to Ni et al. (31) Machine learning promotes the distribution of HIVST among KPs in China, increasing the uptake of HIV testing.
Despite the opportunity, research has shown that machine learning is underutilized in HIV testing interventions in South Africa. Additionally, machine learning applications in HIV testing in South Africa, from the stakeholders' point of view, remain unclear. This study explored the perspectives of key stakeholders in Gauteng Province on the status of machine learning in HIV testing in South Africa. Insights from frontline workers such as public health experts, HTS counselors, lab scientists, medical doctors, nurses, and program managers are critical in designing policies to integrate machine learning in testing programs.
2 Materials and methods
2.1 Study design
An exploratory design was used to explore stakeholders' perspectives on the application of machine learning in HIV testing in South Africa. Empirical evidence highlights expanded HIV testing coverage with machine learning in certain countries; however, developing countries, including South Africa, are left behind (5, 32). To understand the status quo, we employed a qualitative method to obtain in-depth knowledge of relevant stakeholders engaged in HIV testing interventions. The qualitative approach was necessary to understand how far South Africa has gone with the integration of machine learning and what gaps and opportunities exist in the implementation.
2.2 Study participants
This study purposefully selected 15 key stakeholders from relevant institutions within Gauteng Province, South Africa. The study participants were healthcare professionals and program managers from government facilities and non-governmental organizations (NGOs) in Johannesburg and Pretoria. The healthcare professionals, such as HTS counselors, medical doctors, a retention counselor, and a nurse, work in two government health facilities. The program managers were from different government agencies and NGOs. The inclusion criteria for this study considered stakeholders involved in HIV testing-related interventions who were aged 18 years and had expressed willingness to participate in the study.
2.3 Recruitment and data collection
A purposive sampling technique was used to recruit 15 stakeholders from February to March 2025. The purposive sampling technique ensured that relevant stakeholders in HIV testing-related services and programs with an understanding of machine learning applications were recruited for this study. Machine learning is emerging and less utilized in real testing settings in South Africa, requiring insights from individuals with relevant expertise to communicate comprehensive results. Upon receiving ethical approval from the University of Johannesburg and Johannesburg Health District, relevant facilities and organizations were identified. A total of 10 healthcare professionals were recruited from two health facilities in Johannesburg, and five program managers/leads were from NGOs and HIV implementing organizations in Johannesburg and Pretoria. The facility managers were the point of contact, and they later introduced the researcher to the potential study participants. The healthcare professionals were informed about the study by the managers before being referred to the researcher. The researcher reintroduced the study to the participants and gave them the informed consent and information letters to read. Those who were interested and signed the consent forms participated in the study. The program managers were contacted via email, and those who agreed to participate scheduled an appointment with the researcher.
An individual-based, face-to-face, in-depth interview with a semi-structured guiding questionnaire was used to collect qualitative data (Appendix A). The interview guide consists of two main sections. The first part was about the participants' characteristics. The second section asks questions about the status of machine learning in HIV testing in South Africa. The interviews were recorded with a tape recorder, and additional notes were also jotted down during the interviews. Each interview lasted for about 30–45 minutes. The study completed the interviews after data saturation was reached with 15 stakeholders.
2.4 Data analysis
The qualitative data were analyzed using thematic content analysis. The Web version of Microsoft Word 365 was used to transcribe the interview audio. The transcripts were read and reread for familiarity and accuracy while listening to the recordings. Before coding, the transcripts were cleaned, and language editing was done without changing the original meaning of the transcripts. The transcripts and additional notes were uploaded to ATLAS.ti version 23.4.0 for analysis. The software developed codes and linked them to meaningful quotes. The results were presented in themes and sub-themes (Table 1).
2.5 Rigor and trustworthiness
The rigor was ensured through the Guba and Lincoln principles of credibility, dependability, confirmability, and transferability (33). (i) Credibility: The researchers (MJ and ED) independently analyzed the data, and an external coder was used to confirm the conceptualization and modifications of the codes. Potential bias due to researchers' expertise and interest in machine learning was noted, and objective model evaluation, with cross-validation, and independent review of research were employed to ensure credibility and mitigate bias. (ii) Dependability: This principle was ensured by coding and recording the transcripts by the authors (MJ and EP) and an independent coder until consistent results were achieved. (iii) Confirmability: The constructions of the themes and sub-themes, as well as the accuracy and alignment of the results, were confirmed by all the co-authors. (iv) Transferability: This principle was attained by providing a comprehensive methodology for replicability. During the recruitment process, the research considered diversity in terms of age, sex, professional roles, and stakeholders' experience.
2.6 Ethical considerations
This study was conducted in accordance with the Helsinki Declaration. Before the commencement of the study, the protocol was approved by the University of Johannesburg Research and Ethics Committee (REC-2725-2024). Additional approval was obtained from the Johannesburg Health District (NHRD REF. NO.: GP_202404_085). The researcher adhered to the guidelines of the Personal Information Protection Act (POPIA), and standard ethical principles were followed. The principles of informed consent, voluntary participation, privacy, confidentiality, beneficence, and non-maleficence were firmly guarded. The researcher ensured that participants read and understood the personal information letters, and consent forms were signed before the commencement of the interviews. After the participants signed the consent forms, they were kept in a different file to prevent re-identification. Participants' sociodemographic information and additional notes were written on pieces of paper labeled with unique codes, and the data were anonymized. The recordings strictly contain only conversations around the status of machine learning and HIV testing, and no personal or sensitive topic was discussed. Only participants who agreed to participate voluntarily were included, and they were given the opportunity to withdraw at any stage of the study. The study did not subject participants to any physical or psychological harm.
3 Results
3.1 Participants' characteristics
The demographic characteristics of the stakeholders are summarized in Table 2. The study included 15 stakeholders, with the majority (n = 10) being health professionals from government health facilities in Johannesburg, consisting of HTS counselors (n = 6), medical doctors (n = 2), retention counselors (n = 1), and professional nurses (n = 1). Five participants were program managers/leads from both government institutions and NGOs within Johannesburg and Pretoria. Most of the stakeholders were females (n = 10) between the ages of 32 and 52 years, with 4–30 years of professional experience in HIV testing-related services.
3.2 Themes and sub-themes on the status of machine learning in HIV testing
The study produced three main themes describing the status quo on the application of machine learning in HIV testing interventions in South Africa. The central themes and sub-themes shown in Figure 1 are discussed below.
3.3 Theme 1: awareness levels of existing machine learning interventions
The awareness level of the existing machine learning interventions implemented to enhance HIV testing in South Africa became a central topic of discussion in this study. While awareness levels of such innovations are low, some stakeholders perceive that the benefits of machine learning could be realized if the existing gaps are effectively addressed. This theme was further divided into three sub-themes as illustrated in Figure 2.
3.3.1 Sub-theme 1.1: limited knowledge among frontline workers
The study shows that most frontline workers, especially healthcare workers, have limited knowledge about machine learning and its intersection with HIV testing. When participants were asked if machine learning has been integrated into HIV testing interventions in South Africa, some of them responded,
“No, I don't see them.” (P01, 50 years)
“No, I haven't heard of it.” (P02, 32 years)
“I'm not sure about it. No. Maybe we can see after they implement it.” (P04, 37 years)
“Not that I know of, because what I know is those conventional testing methods, I haven't seen machine learning yet..” (P05, 32 years)
“Currently, I don't think so.. I don't know of any actual programs..” (P06, 32 years).
3.3.2 Sub-theme 1.2: research vs. implementation gap
Even though machine learning is underutilized in HIV testing programs in South Africa (5), stakeholders believe it is important to generate research evidence confirming the effectiveness of machine learning interventions. While this is true, participants expressed a gap in implementing research findings in South Africa. A stakeholder said,
“Research has always been done, but the only gap that we have is the communication of research findings to the decision-makers and programmers. Here's why you will end up with these studies that speak to machine learning and all the goodness that they have. But eventually the same studies are shelved somewhere. If we only focus on research, then most of these findings will remain the research findings, and they will never see daylight in terms of implementation.” (P12, 42 years)
Other participants expressed a lack of effective implementation of research findings in their day-to-day activities,
“I find it truly not much helpful to do research, and it ends at the point where you've done research and you've published, and that's it. But whatever strategy and whatever it is that you are researching, we don't see how we can replicate it and implement it to benefit the broader society.” (P13, 52 years)
“Maybe they have it in the department, from the statistical point of view, but from the day-to-day accessibility, we don't.” (P06, 32 years)
3.3.3 Sub-theme 1.3: need for education
The study shows a need to strengthen education programs on machine learning interventions. For instance, studies reveal that machine learning enhances HIVST through mobile apps. However, some stakeholders claimed that a lack of knowledge of operating such technologies would be a barrier.
“Exactly. Those uneducated people are people from rural areas. They have never been to school, you understand? So how, then, is it going to be helpful to them? That's why I always say that you know what? When the government creates things, think about the civilization of our country. You understand… because people from rural areas…” (P03, 44 years)
“They wouldn't even be aware of machine learning. What is it? So, that lack of knowledge and understanding of the platform itself may just be the barrier because you still have to teach everyone what it is. What is it used for, and how is it used and how will it benefit and also the cost-effectiveness of such platform?” (P12, 42 years)
“So, I would say learning from people who are already using it. And just how to adapt and adopt some of these methods would benefit.” (P13, 52 years)
3.4 Theme 2: existing applications
The study participants noted existing machine learning applications, such as HIVST support, counseling aid, and data analysis, that are enhancing HIV testing. The applications are further described in Figure 3 below.
3.4.1 Sub-theme 2.1: self-testing support
Recently, studies have integrated machine learning features in mobile applications to aid HIV self-counseling and testing. Some of the stakeholders believe this will make HIV testing more convenient and efficient for both clients and testers. For instance, a participant asserted that machine learning, through HIVST, could address stigma related to HIV testing, especially in a generalized setting.
“I think it will be more conducive and helpful regarding those people who are maybe scared to come to the clinic, maybe because of the stigma.” (P09, 37 years)
A program manager suggested that users would like to provide honest responses to the machine learning-added HIVST tool rather than to the HTS counselor.
“I think it's going to be a great tool, firstly in the areas where we can get to identify people that are eligible for testing… because one of the gaps that we've seen is that in as much as we do have the screening tool that has questions where a tester can actually ask different questions, then people tend to lie there.” (P11, 43 years)
Despite the perceived benefits of HIVST, an HTS counselor claimed a lack of linkage between the existing HIVST devices and health facilities, suggesting the need to address such a gap using machine learning.
“We used to give them HIVST kits to take home but.. we don't get feedback from them.” (P01, 50 years)
3.4.2 Sub-theme 2.2: counseling aids
The study reveals that machine learning or AI can provide clients with information about HIV before taking a test. A stakeholder perceived that machine learning-aided HIV self-counseling and testing would be more appealing to young people who frequently face HIV-related stigma.
“Young people, especially those who are at higher risk and would need the information, seem to be much more comfortable and engaging with AI and feel less judged than when opening up to an adult service provider.” (P13, 52 years)
A tester indicated that clients informed about HIV by machine learning make her job easy.
“Maybe a patient will come with, you know, being informative already. So, my job will just be to conduct the test.” (P02, 32 years)
3.4.3 Sub-theme 2.3: data analysis tools
A key strength of machine learning is its ability to make accurate predictions from complex datasets. Studies utilized these techniques to predict individuals who are most eligible for HIV testing to enhance targeted HIV testing.
“Would also be able to identify the high-risk individuals. I mean, I think that's something that we all are always looking forward to in ensuring that we're able to give people appropriate services, especially people who are at high risk of acquiring this HIV and not being aware that they are at high risk. So, with machine learning, we would be able to do all these.” (P13, 52 years)
“I think maybe your machine learning tool will also be aligned with it…. we also tried to use the index data that we're having because when we are offering index patients, then we collect like the addresses and whatever and we try to map in the communities using some geospatial mapping of some sort to say in which areas.” (P15, 35 years)
“Maybe it will help us reduce the paperwork. Maybe we'll get some new information.” (P04, 37 years)
3.5 Theme 3: perceived potential
Machine learning is perceived to be a viable tool for improving HIV testing among youth as well as enhancing data-driven decisions. The perceived potentials of machine learning are elaborated below (see Figure 4).
3.5.1 Sub-theme 3.1: youth engagement
The study reveals that machine learning possesses great potential for increasing the uptake of HIV testing among South African youths. Technology-driven initiatives can increase access to information regarding HIV and testing locations and even assist with pre-and post-counseling in the case of HIVST. Since young people nowadays are technologically inclined, it is perceived that such interventions would be beneficial to them.
“I think because the generation that we are dealing with now are very mobile, they are tech savvy, so anything that has got to do with information technology, AI, machine learning, I think it also assists. For instance, if it's a sporting event, if you put it into technology, then they will come. If it's an HIV-related system, then if it's technology-based, then they will come. So, machine learning will come in handy and assist greatly amongst South Africans in this regard.” (P11, 43 years)
“Yeah, it may just be one of those things that will encourage young people, especially, to test. They are more techno-savvy. So having such platforms that will allow them to interact with someone without really having to present themselves to the facility may just increase our uptake of HIV testing.” (P12, 42 years)
A stakeholder added that,
“Most of the organizations that are using it are using it targeting adolescents and young people because we are all aware that is very wary of getting the traditional counseling from the healthcare providers. So, they would prefer to engage with technology, something online, and say, hey, I want to; I think I've just exposed myself to HIV. What can I do?” (P13, 52 years)
3.5.2 Sub-theme 3.2: system efficiency
Researchers have used machine learning models to predict individuals at high risk of HIV from various data sources. Such predictions ensure optimal use of resources, reduce the workload on healthcare providers and improve HIV testing outcomes. Stakeholders stated the following:
“So, the advantages of machine learning.. I think it would have a higher advantage because.. we are struggling to actually identify the high at-risk population.. AI can actually come in and assist.” (P14, 40 years)
“I think it's going to be quite helpful. If it is able to predict high-risk patients, then it actually makes our job a bit easier.” (P05, 32 years)
“ It will reduce the workload for us, and it will help us to know if the patient indeed tested, and what the results are I think it will help a lot.” (P01, 50 years)
3.5.3 Sub-theme 3.3: data-driven decisions
Predictive models are particularly helpful in designing and implementing data-driven decisions for prioritized HIV testing and resource optimization. Program managers highlighted that,
“You kind of need to come up with a predictive model.. different data sources.. to assist with HIV testing and identification of people at high risk.” (P12, 42 years)
“It will also improve by correctly identifying those people that are due or that need to be tested for HIV. Instead of wasting resources testing everyone, we can focus efforts where they're needed most.” (P11, 43 years)
4 Discussion
This study aimed to understand the status of machine learning applications in HIV testing interventions in South Africa by exploring stakeholders' perspectives within Gauteng Province. The study reveals a low utilization of machine learning initiatives in HTS, compounded by gaps in implementing research findings and a lack of awareness among frontline workers and users. Despite these challenges, the findings highlight the potential of machine learning to improve HIV testing. Most stakeholders perceived that machine learning could address barriers to generalized testing, including stigma, discrimination, and privacy issues. A key theme from the study was integrating machine learning into digital devices to facilitate self pre- and post-counseling in HIVST. This innovation is a practical solution to testing gaps in today's world, especially for technology-oriented young people and KPs.
In this study, stakeholders claimed that machine learning is a viable tool for predicting high-risk people for HIV testing. This agrees with studies where machine learning was used in identifying similar groups of people (11, 34, 35). Predictive models in HIV testing ensure that PLHIV who are unaware of their status and their contacts are identified and linked to treatment for reduced HIV transmission (13, 15). South Africa, among many other countries, is facing a deficit in health finances due to the reductions in global HIV funding (12). Hence, the efficient use of national resources for testing programs is imperative. Furthermore, the suitability of machine learning in enabling data-driven decisions was highly praised in this study. Research shows that existing HIV testing predictive models benefit evidence-based decisions, thus improving screening services (3). Thus, policymakers should use predictive models developed by studies to inform HIV testing interventions in South Africa.
Stigma, discrimination, and privacy issues have consistently impeded the uptake of HIV testing worldwide (36–38). Based on our findings, machine learning exerts great potential in addressing these gaps. Most participants believed that using machine learning in HIVST will not only improve self-pre- and post-counseling but also offer the opportunity to feel less judged. Young people are prone to certain risky behaviors, making them vulnerable to HIV, yet they feel less empowered by conventional HIV testing methods. Studies have shown that HIV testing becomes more acceptable to youths when integrated with digital health, including machine learning (26, 39–42). A qualitative study conducted in Cape Town by Janssen et al. (23) shows that HIVST through mobile apps provided guidance and, at the same time, gave users flexibility and freedom to decide who to include during HIV testing. The study further highlighted accessibility and usability issues of smartphones for the older adult and people from rural areas (23). It has been determined in our study that machine learning supports self-led HIV testing programs.
However, the level of awareness regarding machine learning became a critical theme in this study. Healthcare professionals, especially HTS counselors, disclosed a lack of knowledge about any existing machine-learning interventions in routine HTS. This indicates evidence of limited application of machine learning in HIV testing programs besides their statistical functions. Developing countries like South Africa are generally disadvantaged in harnessing emerging technologies due to limited expertise, ineffective infrastructure, and resource constraints. A systematic review by Jaiteh et al. (5) shows low utilization of machine learning in developing countries because of the same factors discussed in this study. To address this challenge, there is a need to provide educational programs on the existing machine learning applications among key stakeholders (43, 44).
Studies assessed the feasibility of advancing HIV self-counseling and testing through machine and digital devices (10, 26, 27, 42). This is particularly important for KPs and young people who mostly avoid generalized HIV testing due to stigma and privacy matters (10). While the existing HIVST services are well-received, concerns about their overall effectiveness have been raised (45, 46). In our study, stakeholders expressed worries about the lack of linkage between HIVST results and HIV facilities. They also noted the issues surrounding access and usability for illiterates, older people, and rural users. With effective educational programs, the participants affirmed that the integration of machine learning could enhance counseling services and improve linkage to HIV care. These findings align with several studies that highlighted similar challenges but ascertained the feasibility of HIVST through digital interventions (10, 23, 27, 45–47).
The study noted implementation gaps in research findings regarding the use of machine learning in HIV testing. Previous studies revealed many advantages of machine learning in terms of improving prediction, diagnostic accuracy, and HIV testing uptake (5, 15, 35, 48–50). These studies usually recommend adopting models that possess high accuracy and precision in facilitating such tasks. However, there are several barriers limiting the integration of machine learning. Despite highlighting perceived potentials of machine learning, the study noted a lack of translating research evidence into practice. Beyond a lack of knowledge and limited expertise, machine learning comes with its own challenges (5, 15). Some models are still developing, making them complex, not user-friendly, and difficult to interpret (51). Simpler models that are commonly used and have been validated by experts should guide HIV testing policy decisions, while newer models are being improved. Additionally, the lack of trust and ethical dilemmas surrounding machine learning continue to exist among policymakers and clinicians. The assurance as to how AI tools protect patients' data remains a debate among experts, hence posing misconceptions and underutilization of machine learning in testing programs (51). Policymakers and machine learning experts should strengthen compliance with data protection regulations and data anonymization to enhance data privacy. The practicality of effectively applying machine learning in HIV testing programs requires the appropriate infrastructure to accommodate modern technologies, but low and middle-income countries fail to meet these technological requirements (5). While this issue was faintly discussed in this current study, a follow-up study should explore infrastructural gaps, ethical issues, and other structural barriers to determine the feasibility of applying machine learning in HIV testing in South Africa. The study underscored the need to develop robust predictive models and frameworks to improve the utilization of research findings in the context of machine learning in HIV testing.
4.1 Strengths and limitations of the study
To our knowledge, this is the first study to explore the perspective of stakeholders in Gauteng regarding the status of machine learning applications in HIV testing in South Africa. This will serve as a baseline study for future research on the subject. The study interviewed stakeholders from various healthcare disciplines, such as public health experts, laboratory scientists, program managers, HTS counselors, medical doctors, and nurses. The diversity of opinion in this study was critical in ensuring equitable insights on the status of machine learning are established.
However, some limitations were noted in this study. We only interviewed service providers and program managers, which excluded the perspective of the end-users (patients or public) of HIV testing. A follow-up study assessing the feasibility, acceptability, usability, acceptance, and stigma among HIV testing end-users would enhance the practicality of implementing machine learning in testing initiatives. Nevertheless, the status quo about the utilization of machine learning could be better explained by HTS providers and program implementers due to its novelty and technical requirements. Moreover, the study only recruited stakeholders working within Gauteng Province. Thus, the findings do not represent the views of HIV stakeholders in South Africa. Since this qualitative study used purposive sampling, which is limited in data representativeness and generalizability, follow-up studies should apply quantitative triangulation or mixed methods approach with broader and representative sampling methods. Another potential limitation relates to the researchers' position as public health experts with a deep interest in machine learning. This might have led to unintentional bias in interpreting the results in favor of machine learning. We address this by prioritizing the objective model evaluation metrics and findings were independently reviewed by all co-authors and cross-validated with the existing literature to enhance credibility and minimize bias.
5 Conclusion
This study explored the perspectives of key stakeholders in Gauteng Province on the status of machine learning in HIV testing in South Africa. The findings highlighted that integrating machine learning initiatives will potentially improve HIV testing in South Africa. Using machine learning to predict high-risk individuals would help to optimize resource allocation and reduce HIV transmission. Additionally, most stakeholders expressed the capabilities of machine learning in addressing barriers to generalized testing, including stigma, discrimination, and privacy issues, through HIVST for young people and KPs. However, limited utilization of machine learning initiatives in HTS beyond statistical analysis was noted in the study. Major barriers include gaps in implementing research findings and a lack of awareness among frontline workers and end-users. Hence, policymakers should design educational programs on existing machine learning applications and how they aid HIV testing interventions. Tailored training programs on HIV testing predictions for researchers across government institutions and NGOs should be established to increase the use of machine learning in statistical analysis. Service providers should be trained and provided with innovative machine models (e.g., diagnostic devices) designed for improving testing services. Community-based awareness campaigns focusing on the use of machine learning – digital devices to facilitate HIVST should target young people and priority groups, especially in remote settings. Evidence from studies using machine learning approaches should also be translated into HTS for improved HIV testing in South Africa.
Data availability statement
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.
Ethics statement
The studies involving humans were approved by University of Johannesburg Research and Ethics Committee. The studies were conducted in accordance with the local legislation and institutional requirements. The participants provided their written informed consent to participate in this study.
Author contributions
MJ: Conceptualization, Methodology, Writing – review & editing, Data curation, Investigation, Writing – original draft, Formal analysis, Software, Resources, Visualization. EP: Writing – review & editing, Resources, Methodology, Validation, Funding acquisition, Conceptualization, Project administration, Formal analysis, Supervision. YS: Supervision, Writing – review & editing. RP-M: Funding acquisition, Resources, Writing – review & editing, Conceptualization, Project administration, Supervision, Methodology.
Funding
The author(s) declare that financial support was received for the research and/or publication of this article. The work herein was made possible through funding by the SAMRC through its Division of Research Capacity Development under the Mid-Career Scientist program using funding received from the South African National Treasury [Project Code Number: 57035 (SAMRC File ref no: HDID8528/KR/202)]. The authors, RP-M, EP, and MJ, are supported by the above-mentioned grant. This work was conducted under the guidance of the SAMRC/UJ PACER Extramural Unit. The content herein is the authors’ sole responsibility and does not represent the views of the SAMRC or UJ. This paper also forms part of a doctoral study by Mr. Musa Jaiteh, whose studies are funded by the Global Excellence Stature Scholarship (GES) 4.0 at UJ.
Acknowledgments
We would like to express our sincere appreciation to SAMRC and UJ GES 4.0 for providing funding for this project. Our heartfelt thanks go to all the stakeholders who participated in this study. The authors would also like to thank Dr. Ayobami Precious Adekola for his assistance during the thematic content analysis. An abstract from this manuscript titled “The Status of Machine Learning in HIV Testing in South Africa: A Qualitative Study Among Stakeholders in Gauteng Province” was presented at the 7th DIRISA Annual National Research Data Workshop from 2 to 3 July 2025, Council for Scientific and Industrial Research – International Conference Centre.
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declare that no Generative AI was used in the creation of this manuscript.
Publisher's note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
1. World Health Organization. Data | South Africa | Health Data Overview for the Republic of South Africa (2024). Available online at: https://data.who.int/countries/710 (Accessed April 11, 2025).
2. Human Science Research Council. SABSSM VI summary sheet (2023). Available online at: https://hsrc.ac.za/wp-content/uploads/2023/11/SABSSMVI-SUMMARY-SHEET-2023.pdf (Accessed April 12, 2025).
3. Xiang Y, Du J, Fujimoto K, Li F, Schneider J, Tao C. Review of application of artificial intelligence and machine learning for HIV prevention interventions to eliminate HIV. Lancet HIV. (2021) 9(1):e54. doi: 10.1016/S2352-3018(21)00247-2
4. Department of Health. National HIV Testing Services: Policy 2016 (2016). Available online at: https://knowledgehub.health.gov.za/system/files/elibdownloads/2023-04/National%252520HIV%252520Testing%252520Services%252520Policy%2525202016.pdf (Accessed April 11, 2025).
5. Jaiteh M, Phalane E, Shiferaw YA, Voet KA, Phaswana-Mafuya RN. Utilization of machine learning algorithms for the strengthening of HIV testing: a systematic review. Algorithms. (2024) 17(8):362. doi: 10.3390/a17080362
6. Wang Y, Liu C, Hu W, Luo L, Shi D, Zhang J, et al. Economic evaluation for medical artificial intelligence: accuracy vs. cost-effectiveness in a diabetic retinopathy screening case. NPJ Digit Med. (2024) 7(1):43. doi: 10.1038/s41746-024-01032-9
7. Jin R, Zhang L. AI applications in HIV research: advances and future directions. Front Microbiol. (2025) 16:1541942. doi: 10.3389/fmicb.2025.1541942
8. Fieggen J, Smith E, Arora L, Segal B. The role of machine learning in HIV risk prediction. Front Reprod Health. (2022) 4:1062387. doi: 10.3389/frph.2022.1062387
9. Van Heerden A, Ntinga X, Vilakazi K. The potential of conversational agents to provide a rapid HIV counseling and testing services. Conference Proceedings - 2017 International Conference on the Frontiers and Advances in Data Science, FADS 2017 (2017). p. 80–4
10. Garett R, Young SD. Potential application of conversational agents in HIV testing uptake among high-risk populations. J Public Health (Bangkok). (2023) 45(1):189–92. doi: 10.1093/pubmed/fdac020
11. Feller DJ, Zucker J, Yin MT, Gordon P, Elhadad N. Using clinical notes and natural language processing for automated HIV risk assessment. J Acquir Immune Defic Syndr. (2018) 77(2):160–6. doi: 10.1097/QAI.0000000000001580
12. UNAIDS. Impact of US funding freeze on HIV response in South Africa | UNAIDS (2025). Available online at: https://www.unaids.org/en/resources/presscentre/featurestories/2025/march/20250307_South-Africa_fs (Accessed April 11, 2025).
13. Marcus JL, Sewell WC, Balzer LB, Krakower DS. Artificial intelligence and machine learning for HIV prevention: emerging approaches to ending the epidemic. Curr HIV/AIDS Rep. (2020) 17(3):171. doi: 10.1007/s11904-020-00490-6
14. Lin B, Liu J, Li K, Zhong X. Predicting the risk of HIV infection and sexually transmitted diseases among men who have sex with men: cross-sectional study using multiple machine learning approaches. J Med Internet Res. (2025) 27(1):e59101. doi: 10.2196/59101
15. Jaiteh M, Phalane E, Shiferaw YA, Jallow H, Phaswana-Mafuya RN. The application of machine learning algorithms to predict HIV testing using evidence from the 2002–2017 South African adult population-based surveys: an HIV testing predictive model. Trop Med Infect Dis. (2025) 10(6):167. doi: 10.3390/tropicalmed10060167
16. Elkhadrawi M, Stevens BA, Wheeler BJ, Akcakaya M, Wheeler S. Machine learning classification of false-positive human immunodeficiency virus screening results. J Pathol Inform. (2021) 12(1):46. doi: 10.4103/jpi.jpi_7_21
17. Turbé V, Herbst C, Mngomezulu T, Meshkinfamfard S, Dlamini N, Mhlongo T, et al. Deep learning of HIV field-based rapid tests. Nat Med. (2021) 27(7):1165–70. doi: 10.1038/s41591-021-01384-9
18. Mohlala AA, Phalane E, Siyamayambo C, Jaiteh M, Phaswana-Mafuya RN. Factors associated with accuracy of rapid HIV test performance in the eastern cape, South Africa. South Afr J HIV Med. (2025) 26(1):9. doi: 10.4102/sajhivmed.v26i1.1641
19. Southern African HIV Clinicians Society. South African HIV SelfTesting Policy and Guidance Considerations: A Supplement to the National HIV Testing Services Policy 2016. Johannesburg, South Africa: Southern African HIV Clinicians Society (2017). Available online at: www.mrc.ac.za (Accessed April 14, 2025).
20. World Health Organization. Guidelines on HIV self-testing and partner notification: supplement to consolidated guidelines on HIV testing services (2016). Available online at: https://iris.who.int/handle/10665/251655 (Accessed April 12, 2025).
21. Adeagbo O, Herbst C, Blandford A, McKendry R, Estcourt C, Seeley J, et al. Exploring people’s candidacy for mobile health-supported HIV testing and care services in rural KwaZulu-natal, South Africa: qualitative study. J Med Internet Res. (2019) 21(11):e15681. doi: 10.2196/15681
22. Harichund C, Karim QA, Kunene P, Simelane S, Moshabela M. Exploring factors that influence the integration of HIVST with HCT using a qualitative comparative cross-over design in KwaZulu-natal, South Africa. Glob Public Health. (2019) 14(9):1275–87. doi: 10.1080/17441692.2019.1587638
23. Janssen R, Engel N, Esmail A, Oelofse S, Krumeich A, Dheda K, et al. Alone but supported: a qualitative study of an HIV self-testing app in an observational cohort study in South Africa. AIDS Behav. (2019) 24(2):467. doi: 10.1007/s10461-019-02516-6
24. Harichund C, Kunene P, Moshabela M. Feasibility of HIV self-testing: experiences of people seeking HIV testing in rural and urban KwaZulu-natal, South Africa. Afr J AIDS Res. (2019) 18(2):115–22. doi: 10.2989/16085906.2019.1621358
25. Spyrelis A, Abdulla S, Frade S, Meyer T, Mhazo M, Taruberekera N, et al. Are women more likely to self-test? A short report from an acceptability study of the HIV self-testing kit in South Africa. AIDS Care. (2017) 29(3):339–43. doi: 10.1080/09540121.2016.1234687
26. Fischer AE, Abrahams M, Shankland L, Lalla-Edward ST, Edward VA, De Wit J. The evolution of HIV self-testing and the introduction of digital interventions to improve HIV self-testing. Front Reprod Health. (2023) 5:1121478. doi: 10.3389/frph.2023.1121478
27. Van Heerden A, Ntinga X, Vilakazi K. The potential of conversational agents to provide a rapid HIV counseling and testing services. Conference Proceedings - 2017 International Conference on the Frontiers and Advances in Data Science, FADS 2017; 2017 Jul 1; 2018-January. p. 80–4.
28. Jing F, Zhang Q, Ong JJ, Xie Y, Ni Y, Cheng M, et al. Optimal resource allocation in HIV self-testing secondary distribution among Chinese MSM: data-driven integer programming models. Phil Trans R Soc A. (2021) 380:20210128. doi: 10.1098/rsta.2021.0128
29. Cheah MH, Gan YN, Altice FL, Wickersham JA, Shrestha R, Salleh NAM, et al. Testing the feasibility and acceptability of using an artificial intelligence Chatbot to promote HIV testing and Pre-exposure prophylaxis in Malaysia: mixed methods study. JMIR Hum Factors. (2024) 11(1):e52055. doi: 10.2196/52055
30. Jing F, Ye Y, Zhou Y, Ni Y, Yan X, Lu Y, et al. Identification of key influencers for secondary distribution of HIV self-testing kits among Chinese men who have sex with men: development of an ensemble machine learning approach. J Med Internet Res. (2023) 25(1):e37719. doi: 10.2196/37719
31. Ni Y, Lu Y, Jing F, Wang Q, Xie Y, He X, et al. A machine learning model for identifying sexual health influencers to promote the secondary distribution of HIV self-testing among gay, bisexual, and other men who have sex with men in China: quasi-experimental study. JMIR Public Health Surveill. (2024) 10(1):e50656. doi: 10.2196/50656
32. Jaiteh M, Phalane E, Shiferaw YA, Amusa LB, Twinomurinzi H, Phaswana-Mafuya RN. Application of machine learning and emerging health technologies in the uptake of HIV testing: bibliometric analysis of studies published from 2000 to 2024. Interact J Med Res. (2025) 14(1):e64829. doi: 10.2196/64829
33. Guba E. research YLH of qualitative, 1994 undefined. Competing paradigms in qualitative research. miguelangelmartinez.net (1994). Available online at: http://miguelangelmartinez.net/IMG/pdf/1994_Guba_Lincoln_Paradigms_Quali_Research_chapter.pdf (Accessed April 12, 2025).
34. Mutai CK, McSharry PE, Ngaruye I, Musabanganji E. Use of machine learning techniques to identify HIV predictors for screening in Sub-Saharan Africa. BMC Med Res Methodol. (2021) 21(1):1–11. doi: 10.1186/s12874-021-01346-2
35. Ahlström MG, Ronit A, Omland LH, Vedel S, Obel N. Algorithmic prediction of HIV status using nation-wide electronic registry data. EClinicalMedicine. (2019) 17:100203. doi: 10.1016/j.eclinm.2019.10.016
36. Logie CH, Okumu M, Musoke DK, Hakiza R, Mwima S, Kyambadde P, et al. Intersecting stigma and HIV testing practices among urban refugee adolescents and youth in Kampala, Uganda: qualitative findings. J Int AIDS Soc. (2021) 24(3):e25674. doi: 10.1002/jia2.25674
37. Bogart LM, Kgotlaetsile K, Phaladze N, Mosepele M. HIV self-testing may overcome stigma and other barriers to HIV testing among higher-socioeconomic status men in Botswana: a qualitative study. Afr J AIDS Res. (2021) 20(4):297–306. doi: 10.2989/16085906.2021.2000450
38. Viljoen L, Bond VA, Reynolds LJ, Mubekapi-Musadaidzwa C, Baloyi D, Ndubani R, et al. Universal HIV testing and treatment and HIV stigma reduction: a comparative thematic analysis of qualitative data from the HPTN 071 (PopART) trial in South Africa and Zambia. Sociol Health Illn. (2021) 43(1):167–85. doi: 10.1111/1467-9566.13208
39. Logie CH, Okumu M, Loutet MG, Coelho M, Berry I, Gittings L, et al. Todurujo na kadurok (empowering youth): study protocol of an HIV self-testing and edutainment comic cluster randomised trial among refugee youth in a humanitarian setting in Uganda. BMJ Open. (2022) 12(11):e065452. doi: 10.1136/bmjopen-2022-065452
40. Ow N, Zivanovic R, Tee K, Mathias S, Barbic SP. Health through the eyes of youths: a qualitative study. Front Public Health. (2024) 12:1271215. doi: 10.3389/fpubh.2024.1271215
41. Adebayo O. P415 the decision-making process of self-initiated HIV testing among youth: a qualitative study. Sex Transm Infect. (2019) 95:A198–9. doi: 10.1136/sextrans-2019-sti.501
42. Beecroft A, Vaikla O, Pai NP. Digital HIV self-testing as an exemplar: a perspective on benefits, challenges, and opportunities. Expert Rev Mol Diagn. (2024) 24(10):913–25. doi: 10.1080/14737159.2024.2406974
43. Pérez G Martínez, Cox V, Ellman T, Moore A, Patten G, Shroufi A, et al. ‘I know that I do have HIV but nobody saw me’: oral HIV self-testing in an informal settlement in South Africa. PLoS ONE. (2016) 11(4):e0152653. doi: 10.1371/journal.pone.0152653
44. Ndlovu SMS, Ross A, Ndirangu J. Knowledge of HIV and/or AIDS and HIV testing services among young men in South Africa. Afr J Prim Health Care Fam Med. (2023) 15(1):a3796. doi: 10.4102/phcfm.v15i1.3796
45. Hlongwa M, Nicol E. Improving linkage to HIV care following a reactive HIV self-testing result among men in KwaZulu-Natal, South Africa. BMC Health Serv Res. (2024) 24:552. doi: 10.1186/s12913-024-10981-6
46. Nguyen VTT, Dunkley Y, Son VH, Choko AT, Huong PTT, Manh PD, et al. Investigating the effectiveness of web-based HIV self-test distribution and linkage to HIV treatment and PrEP among groups at elevated risk of HIV in Viet Nam provinces: a mixed-methods analysis of implementation from pilot to scale-up. J Int AIDS Soc. (2024) 27:e26264. doi: 10.1002/jia2.26264
47. Matovu JKB, Nambuusi A, Nakabirye S, Wanyenze RK, Serwadda D. Formative research to inform the development of a peer-led HIV self-testing intervention to improve HIV testing uptake and linkage to HIV care among adolescents, young people and adult men in Kasensero fishing community, Rakai, Uganda: a qualitative study. BMC Public Health. (2020) 20:1582. doi: 10.1186/s12889-020-09714-1
48. Haas O, Maier A, Rothgang E. Machine learning-based HIV risk estimation using incidence rate ratios. Front Reprod Health. (2021) 3:756405. doi: 10.3389/frph.2021.756405
49. Alie MS, Negesse Y. Machine learning prediction of adolescent HIV testing services in Ethiopia. Front Public Health. (2024) 12:1341279. doi: 10.3389/fpubh.2024.1341279
50. Dong Y, Liu S, Xia D, Xu C, Yu X, Chen H, et al. Prediction model for the risk of HIV infection among MSM in China: validation and stability. Int J Environ Res Public Health. (2022) 19(2):1010. doi: 10.3390/ijerph19021010
51. Rasheed K, Qayyum A, Ghaly M, Al-Fuqaha A, Razi A, Qadir J. Explainable, trustworthy, and ethical machine learning for healthcare: a survey. Comput Biol Med. (2022) 149:106043. doi: 10.1016/j.compbiomed.2022.106043
Appendix A
Keywords: HIV testing, machine learning, qualitative study, Gauteng province, South Africa
Citation: Jaiteh M, Phalane E, Shiferaw YA and Phaswana-Mafuya RN (2025) The status of machine learning in HIV testing in South Africa: a qualitative inquiry with stakeholders in Gauteng province. Front. Digit. Health 7:1618781. doi: 10.3389/fdgth.2025.1618781
Received: 28 April 2025; Accepted: 10 July 2025;
Published: 1 August 2025.
Edited by:
Sojib Zaman, James Madison University, United StatesReviewed by:
Getanew Aschalew Tesfa, Dilla University, EthiopiaBongs Lainjo, Cybermatrice International Inc, Canada
Copyright: © 2025 Jaiteh, Phalane, Shiferaw and Phaswana-Mafuya. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Musa Jaiteh, bWphaXRlaDE5OTNAZ21haWwuY29t