1 of 1

Starsim: A new agent-based framework for �modeling HIV and STI co-transmission

Cliff Kerr1★, Robyn Stuart1, Jamie Cohen1, Alina Muellenmeister2, Romesh Abeysuriya2, Darcy Rao1, Daniel Klein1

1 Institute for Disease Modeling, Bill & Melinda Gates Foundation, USA; 2 Burnet Institute, Australia

We are unable to present the poster in person, but please contact us at: info@starsim.org

Fig. 6: Participants and facilitators at the agent-based modeling training in Nairobi, Kenya in April.

Introduction

  • Agent-based models (ABMs) allow the simulation of detailed scenarios and population heterogeneities.
  • However, ABMs tend to slow and cumbersome to use, limiting their uptake for practical research questions.
  • To overcome these limitations, we developed Starsim as a high-performance and easy-to-use agent-based disease modeling framework.
  • Starsim is capable of simulating co-transmission of HIV with other sexually transmitted infections (STIs), other transmissible diseases (such as TB), and non-communicable diseases.
  • More information is available at starsim.org.

Sim

People

Diseases (& health states)

Connectors

Interventions

Analyzers

Results

Vaccines

Diagnostics

Treatment

Calibration

Age binning

Trans. trees

Plotting

Export

Disease interactions

Network interactions

States [alive, age, vaccinated, HPV infected, etc.]

Networks

Demographics

Pregnancy

Death

Migration

Respiratory

Household

Community

Custom

Sexual

School

Workplace

Risk-stratified

Preference

Age-mixed

Injecting

Environmental

HPV

HIV

Typhoid

+ Custom

Syphilis

TB

States

Results

Diabetes

Nutrition

Design philosophy

  • We believe that common tasks should be simple. For example: defining parameters, running a simulation, and plotting results.
  • However, while uncommon tasks can't always be simple, they should still be possible. For example: using a nonstandard function for updating viral load; writing a custom goodness-of-fit function for calibration; or defining a new population structure.
  • An example of "common tasks should be simple" is shown in Figs. 1-2.

Fig. 1: Simple Starsim simulation in Python, illustrating how common tasks (setting parameters, running a simulation, and plotting results) can be executed in just a few lines of code.

import starsim as ss

# Define the parameters

pars = dict(

n_agents = 50_000, # Number of agents to simulate

networks = dict( # "Networks" define how agents interact w/ each other

type = 'random', # Here, we use a 'random' network

n_contacts = 10 # Each person has 10 contacts with other people

),

diseases = dict( # "Diseases" add detail on what diseases to model

type = 'SIR', # Here, we're creating an SIR disease

init_prev = 0.01, # Proportion of the population initially infected

beta = 0.05, # Probability of transmission between contacts

)

)

# Make the sim, run and plot

sim = ss.Sim(pars) # Create the simulation

sim.run() # Run the simulation (takes 1 second for 50,000 agents)

sim.plot() # Plot all the simulation results

sim.diseases.sir.plot() # Plot the standard SIR curves

Fig. 2: Outputs from the code shown in Fig. 1. Starsim has a default plot showing all simulation results (above), as well as disease-specific plots (right).

Structure and performance

  • Starsim is composed of modules. Each module performs a different function.
  • Modules include networks (which handle interactions between agents, including sexual relationships), demographics (including pregnancy and death), diseases (including HIV and syphilis), and interventions (including diagnostics, treatments, and vaccines). A schematic illustrations of Starsim's structure is shown in Figs. 4.
  • Starsim is written in Python, and is also available for use with R. It uses high- performance numerical libraries like Numba, so it runs as fast as C++. Simple simulations with hundreds of thousands of agents can be run in seconds on a laptop.

Fig. 4: Modular structure of Starsim. Everything is contained by the "Sim" object. The "People" object coordinates all properties of the agents, allowing disease interactions.

Application and summary

  • While Starsim is still a very new tool, it has been used to simulate HIV-syphilis coinfection, to evaluate the impact of new syphilis diagnostics and treatments on both syphilis and HIV infections and morbidity (Fig. 5). These simulations used structured sexual networks, detailed HIV and syphilis disease progressions, and were calibrated to HIV and syphilis data from Zimbabwe (not shown).
  • In partnership with the African Population and Health Research Center (APHRC) and the Center for Epidemiological Modelling and Analysis (CEMA), in April 2024, we co-facilitated an agent-based modeling training session in Nairobi, Kenya which used the Starsim tool (Fig. 6).
  • The next Starsim training will be at the Institute for Disease Modeling Symposium (October 1-3, Seattle, USA; see idmod.org).
  • We are excited to work with new collaborators and users! Reach out to us at info@starsim.org for more information.

Fig. 5: Example of an HIV-syphilis coinfection simulation, showing the importance of accounting for each disease during calibration (left) and evaluating intervention impact (right).