Meridia Insight Science Breakthroughs Knowledge

How a 100x Faster Model Could Transform Pandemic Forecasting

A new computational framework speeds up multi-strain epidemic modeling by over 100x, enabling real-time simulation of variant competition.

100x faster: new model simulates 11 virus strains in seconds, not hours.

11 strains. 2,048 possible infection histories. One breakthrough: a new computational framework slashes simulation time by over 100-fold, unlocking real-time modeling of complex viral evolution.

For decades, epidemiologists have faced a brutal trade-off: simulate multi-strain diseases with biological realism, or do it fast enough to inform public health. The more variants in circulation—Delta, Omicron, XBB, JN.1—the more the math explodes. Track every possible infection history across four dengue serotypes? That’s 16 immune states. Add five SARS-CoV-2 variants? You’re suddenly juggling over a thousand. Traditional models choke under this load, looping through sets of strains like a librarian manually sorting every book in a growing library. As a result, critical questions—Will Omicron displace Delta? Could a new flu variant evade prior immunity?—have remained computationally out of reach.

Now, a team led by Fadilah Ilahi at the University of Manchester has cracked the bottleneck. In a 2026 paper, they unveil a matrix-based framework that transforms multi-strain epidemic modeling from a computational slog into a streamlined numerical operation. By mapping infection histories to integers and encoding strain interactions in Boolean matrices, they eliminate the need for explicit iteration. The payoff? A speedup of over two orders of magnitude—100 times faster—for systems with just 11 strains. This isn’t just optimization. It’s a paradigm shift: one that could let health agencies simulate variant competition in real time, test intervention strategies on the fly, and finally model pathogens like dengue, influenza, and HIV with the complexity they demand.

The Science

At the heart of this advance is a decades-old model: the history-based multi-strain framework pioneered by Andreasen et al. in 1997. That model tracks not just who is infected, but who has been infected by what. When a person recovers from dengue serotype 1, their immune system remembers—and that memory shapes how they respond to serotypes 2, 3, or 4. Some secondary infections are milder; others, terrifyingly, are more severe due to antibody-dependent enhancement (ADE). The same logic applies to SARS-CoV-2: prior infection with Delta alters susceptibility to Omicron, and vice versa.

Mathematically, this is elegant. Each person belongs to a compartment defined by their infection history—a subset , where is the set of all strains. The force of infection from strain depends on all individuals currently infected with , regardless of their past. The susceptibility of someone with history to strain is modulated by a cross-immunity factor , which can range from 0 (complete protection) to 1 (no protection). The full system is described by differential equations for strains—manageable for , unwieldy for , and impossible for .

The problem isn’t the biology—it’s the computation. Traditional implementations loop over every subset and every strain , checking conditions like and summing over infectious individuals. As grows, the number of operations scales exponentially. For , there are possible infection histories and infected compartments. Simulating this in real time? Forget it.

Ilahi, Hall, and House don’t change the model. They change how we compute it. Their insight is simple but profound: replace set operations with linear algebra. Instead of iterating over subsets, they map each history to a unique integer using a bijective function—essentially, treating the history as a binary number where each bit represents exposure to a strain. A person infected with strains 1 and 3 (but not 2) in a 3-strain system becomes the binary 101, or integer 5.

With this mapping, the entire system can be vectorized. The susceptible population becomes a vector of length . The infected population becomes a matrix of size , where each column corresponds to active infection with a given strain. The force of infection is no longer a sum over sets—it’s a dot product between a row of an indicator matrix and the -th column of . Cross-immunity becomes a matrix of size , applied via element-wise multiplication.

The result is a system of equations rewritten in matrix form:

These expressions look dense, but their power lies in what they enable: the use of optimized linear algebra libraries like NumPy to compute entire operations in parallel. No more loops. No more set checks. Just matrix multiplications, element-wise products, and diagonal extractions—operations that modern CPUs and GPUs handle at lightning speed.

What They Found

The performance gains are staggering. In benchmark tests, the matrix formulation outperforms the traditional set-based implementation across the board. For a system with 5 strains, the speedup is already 10-fold. At 8 strains, it’s 50 times faster. And at 11 strains? The matrix model runs over 100 times faster—a two-orders-of-magnitude improvement.

Runtime Comparison: Matrix vs. Set-Based Implementation

Simulation runtime (seconds) as a function of number of strains (n)

Runtime Comparison: Matrix vs. Set-Based Implementation
LabelValue
Set-based0.1 s
Set-based0.3 s
Set-based1.2 s
Set-based5.1 s
Set-based22 s
Set-based98 s
Set-based450 s

This isn’t a marginal gain. It’s the difference between waiting hours for a simulation to finish and getting results in seconds. It means researchers can now run thousands of model iterations to explore uncertainty, test intervention scenarios, or fit models to real-world data—tasks that were previously computationally prohibitive.

The team demonstrates the framework’s utility with a real-world case: the replacement of the Delta variant by Omicron in Indonesia. Using a two-strain model (Delta and Omicron), they simulate the dynamics of strain competition under different assumptions about transmissibility and cross-immunity. The model successfully reproduces the observed pattern: Omicron rises rapidly, overtaking Delta within weeks, driven by a combination of higher intrinsic transmissibility and partial immune escape.

(a)
(a) Source: Fadilah Ilahi, Ian Hall

Crucially, the model captures the role of infection history. Individuals previously infected with Delta are partially protected against Omicron—but not enough to stop transmission. Meanwhile, Omicron’s ability to infect even those with prior immunity fuels its spread. The simulation aligns closely with epidemiological data from Indonesia, validating the framework’s biological fidelity.

The researchers also explore a hypothetical scenario with 11 co-circulating strains—a level of complexity previously unthinkable in mechanistic modeling. Despite the combinatorial explosion of 2,048 immune states, the matrix framework handles it with ease, simulating the full system in under a minute on a standard laptop.

Why This Changes Things

For public health, this is transformative. Today, variant risk assessment often relies on statistical models or simplified frameworks that can’t capture the full immune landscape. When a new SARS-CoV-2 subvariant emerges, we ask: How transmissible is it? How well does it evade immunity? But we rarely simulate the population-level consequences of that variant in real time—because the models are too slow.

This framework changes that. It enables what we might call dynamic strain forecasting: running high-resolution, biologically detailed models of variant competition as outbreaks unfold. Imagine a dashboard that, within hours of a new variant’s detection, simulates its likely trajectory under different assumptions about immune escape, transmissibility, and population immunity. Public health agencies could use this to prioritize surveillance, allocate vaccines, or communicate risk—all based on mechanistic models, not just curve-fitting.

The implications extend far beyond COVID-19. Dengue, with its four serotypes and risk of severe disease upon secondary infection, has long been a modeling nightmare. Traditional models either simplify cross-immunity or limit the number of strains. With this framework, researchers can finally simulate realistic dengue dynamics—testing how vaccination campaigns might alter the risk of ADE, or how climate change could shift serotype dominance.

Influenza is another beneficiary. Flu evolves through antigenic drift and shift, creating a constantly changing landscape of strains. Current forecasting models often treat immunity as a simple decay function. But real immunity is history-dependent: your response to this year’s H3N2 depends on which flu strains you’ve encountered over your lifetime. This framework can encode that complexity, potentially improving seasonal flu predictions.

Even HIV, with its extreme genetic diversity, could benefit. While modeling all HIV variants remains out of reach, this approach could simulate competition among key clades or test how broadly neutralizing antibodies might suppress viral escape.

The broader lesson is about the power of computational reframing. The model itself—the biology—remains unchanged. What changed is how we compute it. This is a recurring theme in science: breakthroughs often come not from new theories, but from new ways of implementing old ones. Think of the Fast Fourier Transform, which turned spectral analysis from a curiosity into a cornerstone of signal processing. Or automatic differentiation, which made deep learning feasible. This matrix framework may be the FFT of multi-strain epidemiology.

What's Next

The authors are careful to note the limitations. The matrix formulation is designed for numerical simulation, not analytical work. If you want to prove theorems about equilibrium stability, the set-based model is still preferable. And while the framework scales to 11 strains, going much higher—say, modeling hundreds of SARS-CoV-2 lineages—would still be challenging, both computationally and data-wise. We simply don’t have the empirical data to parameterize cross-immunity for every possible strain combination.

Another open question is calibration. The model requires specifying for every history and strain—a matrix. For , that’s over 22,000 parameters. In practice, researchers will need to impose structure, such as assuming cross-immunity depends only on the most recent infection or decays with antigenic distance. The paper explores a linear strain space model where , linking immune escape to genetic divergence—a biologically plausible simplification.

Future work could integrate this framework with real-time genomic surveillance. Imagine coupling it with GISAID data: as new sequences arrive, the model automatically updates the strain set , estimates and from growth rates and serology, and runs simulations to forecast dominance. This would bring us closer to a “digital twin” of pathogen evolution.

There’s also potential for integration with machine learning. The matrix structure is inherently differentiable—meaning we could use gradient-based methods to fit the model to data, or even learn the cross-immunity matrix from case reports and serosurveys.

For now, the framework is a proof of concept—a demonstration that we can model complex multi-strain dynamics without sacrificing speed. The code is open-source, hosted on GitHub, inviting others to build on it. As pathogens continue to evolve, and as new threats emerge, we’ll need models that are both biologically rich and computationally agile. This work shows that we don’t have to choose. We can have both.

The next pandemic won’t wait for slow models. Thanks to this advance, we might finally be ready.

Comments (0)

No comments yet. Be the first to share your thoughts.