Codeberg · Codeberg.org

Overview

The purpose of this UK Medical Research Council project (grant X/011658/1) is to make rule-based modelling methodology more easily accessible to the infectious disease modelling community. A rule-based approach is in contrast to writing differential equations, and there can be human as well as technical advantages to this.

The natural history of a disease is the story of its progress in individual humans or animals. No matter how the disease starts, it has a process and an endpoint - the patient may be in many states including remission, recovered, chronicity or death, and of course we hope they receive treatment. The natural history arises from a combination of the empathy of a physician with the observational skill of a scientist, and has been a foundation of medical care for thousands of years. An epidemiological model takes another step, where the natural history is made suitable for calculating on computers so that we can draw conclusions about what happens across entire populations as we manage a disease.

A difficulty in epidemiological models is that the computer language expressing the disease equations can look very different from the natural history it is modelling. This in turn makes it difficult to explain what the model is doing, and for other people to reproduce the results of a model. It isn't immediately obvious even to experts what natural history a model is encoding, and in an emergency that can be a problem.

In this project our goal is to:

Provide a good language for writing down the natural history of a disease as a story, describing and explaining how a person moves from one state to another, and what comes next. This language needs to be easy to read so humans can understand and improve it, but also suitable for computers to perform calculations on it. The language needs to be easy to set up and run so that it can become part of the daily discourse in investigating disease.

We hope this may be a useful additional tool to the many which already exist.

Pandemic background

The first application of rule-based modelling to epidemics was under the extreme challenges of COVID-19. As the Royal Society's 2020 initiative Rapid Assistance in Modelling the Pandemic made clear, existing techniques were often insufficient. We agreed, and contributed our 2021 paper to the Society's review in which we said:

Real-time modelling and the vast amount of models developed in the last 24 months have highlighted gaps in the existing technical frameworks that ought to be addressed in preparedness for possible future pandemics.

This was confirmed in 2025, when the UK COVID-19 enquiry published its first two reports containing about 250 references to mathematical modelling. Epidemiologists providing advice in times of crisis need the tools to demonstrate their reasoning in a reproducible manner, easily explainable to their scientific peers.

Current project

Our approach is detailed in our 2021 paper in the Journal of Theoretical Biology:

Rule-based models allow to combine transparent modelling approach with scalability and compositionality and therefore can facilitate the study of aspects of infectious disease propagation in a richer context than would otherwise be feasible.

Having validated this approach with many examples in the paper, we now seek to make it more accessible. Here we bring together existing techniques and tools and demonstrate practically how to:

  • easily get up and running to produce epidemiological results
  • have a reproducible environment, which is a precondition for reproducible results
  • computational techniques can be overlaid on the basic rule-based system
  • integrate into existing disease modelling workflows
  • which additional work is needed to make the rule-based modelling systems better

Getting started

Read the original on codeberg.org ↗