Conversation with Dr Maria Namaganda on Using AI to Spot HIV Treatment Failure Early

HIV virological failure remains a persistent challenge in resource‐limited settings, undermining the long‐term success of antiretroviral therapy among people living with HIV. In Uganda, evidence reports that nearly one in five individuals on treatment eventually experience virological failure. This highlights the urgent need for more effective, timely, and scalable strategies to detect and manage emerging treatment failures. 

Dr Maria Namaganda, a recent PhD graduate at Macquarie University, and a fellow of the ACTS AI4D Scholarship programme as a PhD scholar, worked to turning a decade of clinic data into a model that flags who is likely to fail HIV treatment, without the need for costly tests. 

Her model identifies individuals at risk of virological failure to enable early interventions and targeted drug resistance testing. Her research applies machine learning to a decade of clinical data, spanning demographic factors, treatment regimens, adherence levels, and viral loads. 

Q: Maria, what interested you in this work?

A: I grew up in Kampala and studied here, so I understand many of the contextual realities that shape my work. My PhD is on HIV virological failure, where I am building machine learning model to predict which people living with HIV who are on treatment are likely to fail on it. The data comes from The AIDS Support Organisation (TASO) in Uganda, and I am working with about 10 years of it.

The project was not handed to me. It grew from first principles: literature reviews, and part of my master’s work, where I noticed that socioeconomic data in the records had gone untouched.

Q: What problem is your research tackling, and who is it for?

A: HIV has been around for close to 40 years and has been studied heavily. Uganda has been a pioneer in managing treatment, through policy changes, programmes and campaigns. Antiretroviral therapy means HIV is no longer a death sentence if someone manages it well. Yet some people still fail on treatment. That is virological failure, or viral non-suppression: the drugs are meant to suppress the virus so a person can stay healthy and keep working, and for some people that does not happen.

The reasons vary. Some come down to adherence, and some to limited resources, because a country like Uganda is very different from a high-income setting. The same structural barriers show up across Kenya, South Africa and much of Sub-Saharan Africa. Meanwhile, data has been collected for years and much of it has not been put to innovative use. We are also now in the era of machine learning and AI, so we saw an opportunity to use both to predict who is likely to fail.

Our data comes from TASO, the largest caregiver of HIV treatment in Uganda, which runs 11 centres of excellence across the Central, Eastern, Western and Northern regions. That makes the data representative. We are working with records on about 54,000 people living with HIV.

Many prediction models have been developed in high-income settings. What is special here is that ours is built on real-world data, not computer-generated data, so it reflects the context of the people it is meant to serve. We have also built it to be robust and to generalise beyond the settings we studied.

Q: How does your work respond to the challenges Uganda faces?

A: We could not build prediction models without first doing some groundwork, so the PhD runs in four stages: The first sub-study looked at the prevalence and predictors of HIV virological failure in East Africa. We pulled published studies from 2014 to 2024 and, after applying inclusion criteria, concluded with those from 2016 to 2023. It gave us a clear view of the regional landscape and fed into feature selection later. The second characterised the TASO population: the patterns, trends and variables, and what treatment outcomes have looked like.

The third developed an implementation framework. Research too often stays in the books and on the benches, so we wanted to understand the gap between research and deployment. In an era of precision medicine, people seeking treatment need personalised attention, so we looked at each person’s variables and why they might be failing.

Finally we trained the machine learning models, including logistic regression, random forests and gradient boosting. We assessed their accuracy and precision, and whether they can reliably tell apart people likely to fail from people likely to respond well.

Why does this matter in Uganda? It is a low-resource setting. Many people living with HIV cannot access state-of-the-art services such as genotypic testing, which is expensive, and many are lost along the way. Our model does not require many tests. It uses data that is already routinely collected to stratify people by risk, so those likely to fail can get early, individualised support.

Q: What role has the scholarship played in your model development?

A: First, visibility. In a setting like Uganda, research needs to be seen. Knowing my work was assessed, valued and funded, by a programme willing to invest in researchers, gave me confidence.

Then there’s the data. Much of the health data in Uganda is moving from paper records to electronic ones, but my 10-year window spans both, and a lot of it was still on paper. The scholarship gave me the mileage to go back to files, answer queries and pull extra variables that enrich the model. It also funded a computer and other resources I needed to run the project.

Beyond funding, there are routine check-ins and mentorship sessions where we share our work and get feedback, which helps me refine my methods and see the research from new angles. The programme’s diversity and inclusion sessions pushed me to ask how to account for people with disabilities in the models we build, and that is central to responsible AI. I’m also now having conversations about postdoctoral options, and that continuity is a fruit of being on the scholarship.

I’m deeply grateful. And the good news is that the paper on our predictive models went online the day before we spoke, after rigorous review.

Q: What barriers do African AI researchers still face?

A: Africa AI researchers often face the challenge of Isolation. There are many brilliant minds, but many work alone. AI is a collaborative discipline, and you cannot advance certain ideas without the discussions. Secondly, research funding is limited, especially with the recent cuts by different funders. Programmes like this (AI4D Scholarships) accelerate a researcher’s work.

The third challenge is legitimacy. Some of the challenges are structural and some are personal: doubts about whether work from Africa adds up, imposter syndrome, and a heavy burden of proof for excellence. Finally, computing resources is also a barrier as machine learning needs high computation, good internet speeds and servers, which many researchers here do not have. Without them, progress is slow.

Q: What new knowledge has your research added, and what does it say about the African context?

A: The starting point is simply knowing what is in the data. In settings like Uganda, a wealth of data is collected but ends up sitting in databases, rarely used to address the challenges we face. Each part of the PhD adds something.

The first objective gave us the pooled prevalence of virological failure in East Africa, along with its predictors. That informs the wider HIV research community. It matters because the last of the UNAIDS targets, that 95% of people on treatment are virally suppressed, is not being met. Even one person failing matters to us.

The second objective looked at the trends and patterns in the TASO cohort, and also at its inconsistencies, such as missing and incomplete records. I developed custom scripts in R to handle this. They are available on request, since the data itself is sensitive and access goes through an ethics review board, and I will post the code on GitHub so others can learn how to pre-process and clean real-world data.

The third looked at precision medicine and differentiated service delivery. Treatments and policies have changed over time, so why do some people still fail? Behavioural data, for instance, affects adherence, and it can be incorporated into models.

And finally, the predictive model, our flagship paper, is something we can actually use. Deployment takes time, but it is a starting point for stratifying risk where not everyone has access to state-of-the-art facilities.

Beyond the core publications, several accompanying papers have come out of this work, adding to the body of HIV research on East Africa and Uganda.

Q: What are your plans after the PhD?

A: The quickest answer is deployment, but that takes a series of stages. I am not shelving this work. I expect to carry it forward in parallel with another researcher, perhaps a master’s or PhD student, who can take on external validation. Our data comes from Uganda, so we want to test the model on data from places like Nairobi, Tanzania and South Africa. It is an ambitious goal, but I believe it is achievable with collaborators.

I am also excited about applying my machine learning and data science skills to a question that has not had much attention: what helps women in data science and research across Africa to advance and thrive. It is lived experience for me, so in a way I will be studying myself too. 

The other thread is science communication. I am building CareerBiome, a science communication platform and mentorship space for African researchers, including those in the diaspora. Publications matter, but not many people can access them, and the general public is on YouTube, TikTok and LinkedIn. I want to break the knowledge silo, bring people closer to the research, and perhaps draw them into reading the publications too. After the PhD I plan to devote real time to science communication and public engagement, with implementation, policy and the wider community in mind.

Explore her work here: https://www.frontiersin.org/journals/artificial-intelligence/articles/10.3389/frai.2026.1869992/full

About the AI4D Scholarship

The AI4D Africa Scholarship, implemented by the ACTS AI Institute of the African Centre for Technology Studies (ACTS), supports PhD students and early career academics doing research in responsible artificial intelligence and machine learning at African public universities. This project is funded by the UK government through its Global Research and Technology Development portfolio as well as Canada’s International Development Research Centre (IDRC).

Related resources