SHCS

Swiss HIV Cohort Study

& Swiss Mother and Child HIV Cohort Study

Bartl et al., Machine learning to predict tuberculosis

16th July, 2025

Machine learning-based prediction of active tuberculosis in people with human immunodeficiency virus using clinical data

Tuberculosis (TB) is a serious health concern for people living with HIV, who are at higher risk of developing active TB after infection. Early identification of who is at risk remains a major challenge, as current screening tests—such as the tuberculin skin test (TST) and interferon-gamma release assay (IGRA)—often miss cases, particularly in those with weakened immune systems.

This study, conducted using data from the SHCS, developed a machine learning model to predict which individuals newly diagnosed with HIV are most likely to develop active TB at least six months later. For this analysis, Bartl et al. focused on 9’828 participants enrolled between 2000 and 2023, excluding those who already had TB or had received TB preventive therapy. Among these, 55 individuals went on to develop incident active TB.

The model was trained using 48 routinely collected variables—such as immune cell counts, body mass index, and HIV viral load—at the time of HIV diagnosis. When tested, it achieved a predictive accuracy (AUC) of 0.83, indicating strong performance in distinguishing individuals who would go on to develop TB. This was substantially better than standard TB tests, which had lower sensitivity and predictive value. For instance, the model required only about two people (1.96) to be screened to correctly identify one future TB case—twice as effective as standard testing, which needed four people to be screened for one correct diagnosis.

The model was also externally validated in the Austrian HIV Cohort Study, using a simplified version based on the top 20 predictive variables. It retained useful performance (AUC of 0.67), suggesting the approach is transferable across different clinical settings.

Crucially, this tool relies entirely on data already collected in routine HIV care. It does not require any new tests or added clinical visits, making it a practical, cost-effective strategy for improving TB prevention in people with HIV. It also highlights the value of long-term cohort studies like the SHCS, which provide high-quality, comprehensive data enabling innovative and impactful research.

PubMed

SHCS public beta

If you spot a bug or have a suggestion, let us know:

What happened? (Details help!)
What device are you using?
Screenshot? (Optional but helpful)

Your feedback goes straight to the SHCS dev team and helps us improve faster.
Thanks for making the SHCS website better!

You can upload up to 5 images (JPG or PNG only).