Skip to main content

Could artificial intelligence help prevent HIV? 

Hester Phillips

07 June 2023

South African study develops machine learning model that assesses behaviour to predict HIV risk

Shot of an female IT technician in a server room and using a laptop
Photos are used for illustrative purposes. They do not imply health status or behaviour. Credit: iStock/Charday Penn

Researchers in South Africa have developed a digital survey to collect data on people’s demographics and behaviours, then used this data to build an artificial intelligence model to predict people’s HIV risk. Could this new tool change the face of HIV prevention? 

What is the research about? 

Using machine learning (a type of artificial intelligence or AI) to predict which people are most likely to get HIV.  

The study used a digital survey involving around 1,600 people to assess behaviour. Participants were involved in two HIV research trials in rural and urban areas of South Africa where HIV prevalence ranges between 13.1% to 27.8%. 

All survey participants reported being negative or unsure of their status before they took the survey. After answering the questions, all participants were tested for HIV.  

Researchers then used the data to train and evaluate different AI models. From this, a final model for predicting HIV risk was identified and evaluated.  

Why is this research important? 

Machine learning has the potential to identify people who are at high risk of HIV by quickly processing big amounts of population and health-related data. This, and the rise of mhealth interventions that collect digital data, means AI could play an important part in ending the HIV epidemic.  

What did they find out? 

HIV prevalence was 16%. 

Key demographic associated with having HIV were: 

  • being female (22% of women had HIV, compared to 12% of men) 

  • having receptive vaginal sex (linked to higher HIV prevalence among women) 

  • being older  

  • having a lower level of education 

  • travelling for work 

  • having a sexually transmitted infection in the last year 

  • having tuberculosis 

  • being assaulted in the last year. 

There was no difference in the number of sexual partners between people with and without HIV.  

People with HIV were less likely to have taken an HIV test in the last year. They were also less likely to report consistent condom use (43% of people with HIV consistently used condoms compared to 55% of people without HIV). 

The machine learning models were between 78% to 83% accurate at predicting HIV risk.  

What does this mean for HIV services? 

This study shows that a machine learning model can be built using digital survey data in a low-middle income setting like South Africa.  

With enough data, it may be possible to model HIV risk in different communities and use this to adjust the public health response. For example, if limited condom use and high-levels of STIs are the two things that are most contributing to a community's HIV risk, targeted action could be taken to address both these issues. This means health resources could be used more efficiently.  

Models that can predict individual-level risk could be used to identify the people who would benefit most from PrEP or behaviour change counselling. 

However, given the criminalised nature of people most affected by HIV, the use of AI must be handled with extreme caution and not used to increase rights violations. 

Get our news and blogs by email

Keep up-to-date with all our latest news stories and blogs by signing up to the Be in the KNOW news digest.

Share this page

Did you find this page useful?
See what data we collect and why