Efficient inference for agent-based models of real-world phenomena

Andreas Christ Sølvsten Jørgensen, Atiyo Ghosh, Marc Sturrock, Vahid ShahrezaeibioRxiv 2021

Abstract

The modelling of many real-world problems relies on computationally heavy simulations. Since statistical inference rests on repeated simulations to sample the parameter space, the high computational expense of these simulations can become a stumbling block. In this paper, we compare two ways to mitigate this issue based on machine learning methods. One approach is to construct lightweight surrogate models to substitute the simulations used in inference. Alternatively, one might altogether circumnavigate the need for Bayesian sampling schemes and directly estimate the posterior distribution. We focus on stochastic simulations that track autonomous agents and present two case studies of real-world applications: tumour growths and the spread of infectious diseases. We demonstrate that good accuracy in inference can be achieved with a relatively small number of simulations, making our machine learning approaches orders of magnitude faster than classical simulation-based methods that rely on sampling the parameter space. However, we find that while some methods generally produce more robust results than others, no algorithm offers a one-size-fits-all solution when attempting to infer model parameters from observations. Instead, one must choose the inference technique with the specific real-world application in mind. The stochastic nature of the considered real-world phenomena poses an additional challenge that can become insurmountable for some approaches. Overall, we find machine learning approaches that create direct inference machines to be promising for real-world applications. We present our findings as general guidelines for modelling practitioners.

Introduction: The Inference Bottleneck

Agent-based models (ABMs) are powerful tools for simulating complex systems like tumor growth or pandemics. By tracking individual agents—such as cancer cells or infected individuals—these models provide mechanistic insights into real-world phenomena. However, their stochastic nature and high computational cost make traditional statistical inference painfully slow.

The "stumbling block" is the process of finding which model parameters best explain observations. Traditional Bayesian methods like Approximate Bayesian Computation (ABC) or Markov Chain Monte Carlo (MCMC) require running simulations millions of times to sample the parameter space. For complex ABMs, this is often computationally insurmountable. This research explores how machine learning can bypass this bottleneck without sacrificing accuracy.

Methods: Emulators and Direct Inference

The authors compare two primary machine learning strategies to accelerate inference:

  1. Emulators (Surrogate Models): A machine learning model is trained to mimic the ABM. This fast "emulator" is then used within a standard Bayesian framework (like ABC or MCMC) instead of the heavy simulation.
  2. Direct Inference Machines: A model is trained to look at the data and directly predict the parameter posterior distribution, skipping the iterative sampling step entirely.

Architectures tested include Deep Neural Networks (NN) with dropout for uncertainty estimation, Mixture Density Networks (MDN) for multi-modal distributions, and Gaussian Processes (GP) for non-parametric regression.

Case Study 1: Brain Tumour Growth

The first case study utilizes a cellular automata model of glioblastoma multiforme. The model tracks various cell types and nutrient diffusion, producing complex spatial patterns. As shown in the performance metrics, accuracy generally improves as the training set size (Resolution) increases, with Neural Networks (NN) proving particularly effective for this application.

Performance metrics for the Brain Tumour CA model across varying training set sizes (Resolution) and ML architectures.

Case Study 2: Epidemic Spread

The second case study employs a lattice-based SIRDS model tracking disease spread through social networks and random encounters. This model's high stochasticity presents a different challenge. Notably, the Mixture Density Network (MDN) showed superior performance for several epidemiological summary statistics, reinforcing the idea that no single algorithm is a universal solution.

Performance metrics for the Epidemic SIRDS model across varying training set sizes (Resolution) and ML architectures.

Key Insights and Results

  • Massive Speedups: ML approaches achieved accuracy comparable to classical methods but were orders of magnitude faster. Good inference accuracy was reached with as few as $10^4$ simulations, whereas classical ABC might require $10^7$.
  • No "Silver Bullet": The optimal architecture depends on the problem. The NN outperformed others on the cancer model, while the MDN was superior for the epidemiological model.
  • Direct Inference is the Speed King: Direct inference machines are highly promising because they minimize simulation overhead. Once trained, they can infer parameters for new datasets almost instantaneously.
  • The Stochasticity Trap: The inherent randomness of ABMs makes MCMC convergence difficult. Even with emulators, "noisy" likelihood surfaces can lead to disconnected peaks and poor sampling.

Conclusion

Machine learning provides a robust framework for making agent-based modeling practical for real-world applications. While Gaussian Processes struggle with large datasets and stochasticity can hinder MCMC, direct inference machines and neural-network-based emulators offer significant efficiency gains. Practitioners should choose their inference technique based on the specific characteristics of their model and the available computational budget.

Summary updated

BibTeX
@misc{jrgensen2021efficient,
  author = {Andreas Christ Sølvsten Jørgensen and Atiyo Ghosh and Marc Sturrock and Vahid Shahrezaei},
  title = {{Efficient inference for agent-based models of real-world phenomena}},
  year = {2021},
  doi = {10.1101/2021.10.04.462980},
  howpublished = {bioRxiv},
}
Figure