Search papers, labs, and topics across Lattice.
This paper introduces a novel numerical framework that maps infection histories into Boolean matrices to efficiently simulate multi-strain epidemic dynamics, overcoming the computational burden of explicit strain combination iteration. By preserving biological processes like sequential infection and partial cross-immunity, this approach enables faster numerical exploration of complex epidemiological models. Benchmark tests reveal significant performance gains, with speedups exceeding two orders of magnitude for models with 11 strains, demonstrating its utility for real-world applications like COVID-19 variant dynamics.
Mapping infection histories to Boolean matrices unlocks two orders of magnitude speedup for multi-strain epidemic simulations, enabling unprecedented computational efficiency.
Epidemiological models often take the form of systems of differential equations of varying levels of complexity. In multi-strain models, complexity arises from the interaction of diverse pathogen types that may exhibit different patterns of cross-immunity due to the host's immune system. Where previous work has tended to focus on theoretical analysis of this complexity, or model simplification, less effort has been given to efficient numerical exploration of full multi-strain disease dynamics. Here, we propose a computational framework for representing multi-strain disease transmission models, through a mathematically transparent hard-coded mapping between sets and integers. By mapping infection histories into Boolean matrices, the framework eliminates explicit iteration over strain combinations while preserving key biological processes, including sequential infection and partial cross-immunity. Benchmark comparisons of numerical solutions of our matrix formulation and a set-indexed implementation demonstrate substantial performance gains. Across models with increasing numbers of strains, the matrix formulation consistently reduces runtime, with a speedup exceeding two orders of magnitude for systems with 11 strains. We present an application of this approach to the case of COVID-19 in Indonesia, focusing on the replacement of the Delta variant by Omicron. We hope that our approach represents a robust computational approach to automatically generate diverse multi-strain epidemic models that can be solved in a computationally efficient manner for a variety of scientific and public-health questions.