Agent-based models
While traditional compartmental models are powerful and relatively simple to implement, they may not be the best solution for every modeling problem. As the complexity of the research question or the biological systems involved increases, the limitations of compartmental models can become apparent. Agent-based models (ABMs) simulate the behavior and interactions of individuals, or agents, through time to answer questions about complex real-world systems.
In their simplest forms, agent-based models can be configured to mimic compartmental models. Agents can be largely homogeneous, and move through the disease states of susceptible - infected - recovered. The strength of ABMs becomes clear when heterogeneity is necessary to understand the dynamics of the system: by tracking individuals instead of populations, each agent can have a suite of individual characteristics that impact how they interact with other agents or the environment. Individual risk factors and complex contact networks can be added to the models, such that the impact of interventions can be assessed under realistic scenarios. This enables modeling of location-specific scenarios to evaluate the most likely outcome for a given suite of interventions, such as to understand the impact of a new vaccine, or a mix of pharmaceutical and non-pharmaceutical interventions, on a particular pathogen within in a community.
Overall, ABMs are incredibly flexible and powerful. Their ability to incorporate heterogeneity, complex dynamics, and cascades of events allows them to be used to model almost any scenario. However, that flexibility comes with costs. ABMs often contain complex code bases and are computationally expensive and often slow to run. Further, ABMs are stochastic, so each scenario requires numerous model runs to examine potential outcomes. A common complaint about ABMs is that they tend to be "black boxes," where underlying processes and model dynamics are difficult to understand or not well-defined. It can also be difficult to test ABMs, as unexpected model outcomes may be due to emergent properties of agent interactions or faulty code. Calibration is also notoriously difficult, as ABMs tend to have high numbers of parameters and parameter selection is not straightforward. Finally, ABMs require large amounts of data, which may not be available for many questions of interest.
Considerations for ABMs
Picking the correct model for a particular research question often does not have a single "correct" answer, so it is important to weigh the pros and cons of various model types against factors such as: desired informational outcomes, available computational resources, and data availability and quality.
Strengths of ABMs
The hallmark of an ABM is the rules we can assign to each individual or agent. The flexibility and power of agent-based models makes them one of the best options for modeling of research questions that require features such as:
-
Heterogeneity in individual characteristics or risk factors. We can give each individual their own suite of characteristics, such as rate of infection, infection history, age, sex, or other risk factors.
-
Complex contact networks. We can assign each individual their own set of contacts, create community or social networks, or even include migration patterns. Further, for vector-borne diseases, we can include specific contact rates for human-vector interactions.
-
Inclusion of spatial or climate data. Specific geography, terrain, or other environmental factors including climate or weather patterns can be included, such that individuals interact with their geography in a realistic manner. This enables seasonal dynamics, land-use change, the inclusion of socio-economic patterns, and many more features.
-
Implementation of realistic interventions. For many policy decisions, understanding how numerous or novel interventions will impact a community are of high importance. ABMs allow the inclusion of highly detailed interventions, such as precision medicine, contact tracing, active case detection, non-pharmaceutical interventions, vaccine introduction, nutritional supplementation, etc., to help inform outcomes of a variety of scenario testing.
-
Inclusion of co-infection. In many real-world problems, a particular public health concern does not arise in isolation. For example, individuals living with HIV are at a significantly higher risk of contracting tuberculosis, and co-infection of these two pathogens presents novel issues that may not arise in individuals with one of the infections.
-
Probabilistic dynamics for the occurrence of events. Instead of fixed rates for an event, decision, or interaction, ABMs allow for probability distributions to govern the dynamics of event occurrence, which can then vary based on that individual's particular characteristics. This results in both stochasticity in outcomes as well as more realistic dynamics, including feedback loops between agents and the environment and evolving agent characteristics.
Drawbacks of ABMs
While the features and advantages of ABMs may make them sound like the most useful of models, those features come at costs. Simplicity in modeling is almost always the best option when a simple model can provide decent outcomes. The fewer the assumptions required to run a model, the easier it will be to fit the model and understand the results. However, when complexity is required, it is important to understand the associated costs. For ABMs, these include:
-
High computational cost. The stochastic nature of an ABM (and multitude of non-linear interactions in the model) means that numerous iterations of the model need to run, so that the mean trajectories and variation over time can be observed. This requires high compute power.
-
Complex code bases and slow running speed. ABMs may be difficult to code, and that difficulty increases as the complexity of the model increases. As ABMs are typically useful for examining unique situations, it is often required to add code to existing models to best fit the novelty of the scenario. Along with the complexity in coding these models, these code bases are often very slow to run due to the multitude of events that occur and the tracking of changes in agents.
-
Difficulty in fitting ABMs. ABMs require large amounts of (high-quality) data, as they are simulating complex interactions. Various types of data are needed, including demographic, behavioral, epidemiological, and potentially geographical or climatic. Not only can it be difficult to acquire the data needed to run an ABM, but fitting parameters and calibrating the models also becomes problematic. Choosing parameters to calibrate to, selecting appropriate initial conditions for the model, and determining when fitted parameters have a "good fit" can be very complex. For more information on calibration and parameter selection, see define parameters.
-
The "black box" problem and emergent properties. Understanding the underlying dynamics of an ABM is not a straightforward issue, as there can be many simple interactions building upon one another to create more complex dynamics (e.g., emergent properties of the model). This causes many modelers to feel as if the model itself is a "black box," such that they have little understanding of actual model dynamics. Further, while in some cases the emergent properties of complex dynamics may be useful in understanding how real-world complexities form, they can be difficult to understand or explain when they are contrary to expectations. Are these new outcomes new insights, or due to bugs in the code?