From algorithm to outbreak control: how Heriot-Watt helped New Zealand combat a cattle epidemic
New Zealand’s economy is deeply rooted in agriculture, with food and fibre exports accounting for 82% of national exports and 11% of GDP. Cattle farming plays a pivotal role, with dairy and meat alone comprising nearly two-thirds of the sector’s export value.
In 2017, the country faced a serious threat: the detection of Mycoplasma bovis, a bacterial disease affecting dairy and beef cattle. Left unchecked, M. bovis causes severe animal health issues and significant economic losses. In response, the New Zealand Government’s Ministry for Primary Industries (MPI) launched a ten-year eradication programme, projected to cost NZ$886 million (£470 million). The alternative—doing nothing—was estimated to cost the nation NZ$1.3 billion.
To track, understand, and contain the spread of the disease, New Zealand needed a robust digital tool capable of integrating diverse sources of outbreak data, accommodating uncertainty, and supporting urgent public health decisions.
The solution
Enter BORIS—Bayesian Outbreak Reconstruction Inference & Simulation—a computer model initially developed by Associate Professor Simon Firestone at the University of Melbourne to help map and understand disease transmission routes. However, it was the underlying algorithm, created by Heriot-Watt’s Dr Max Lau, along with Professors Gavin Gibson and George Streftaris, that became the backbone of BORIS’s predictive power.
The team’s breakthrough work at Heriot-Watt and the Maxwell Institute for Mathematical Sciences, in collaboration with Biomathematics & Statistics Scotland, had previously developed an advanced modelling framework that uniquely combined genetic information with epidemiological data to reconstruct outbreak pathways.
Dr Lau and Assoc Prof Firestone adapted the algorithm for use in R, a widely adopted statistical programming language, and expanded its capabilities to handle partial and incomplete data—a common reality in outbreak investigations.
This innovation was pivotal: where traditional models faltered due to missing links or uncertain data, Heriot-Watt’s algorithm allowed these gaps to be incorporated as variables within the model, producing results that acknowledged uncertainty but still offered robust, actionable insights.
Impact and outcomes
The BORIS model played a critical role in helping New Zealand navigate the M. bovis crisis. By December 2022:
- 272 farms had been cleared of M. bovis, with only six remaining infected
- Over NZ$230 million had been paid in compensation across 2,829 claims
- Decision-makers used BORIS alongside testing and tracing to identify hidden transmission routes, supporting targeted interventions
The work received acclaim from researchers and government officials alike:
The framework developed by Max Lau in his doctoral research under Professor Gavin Gibson was crucial to the development of BORIS. Their paper and corresponding code are an exemplar of high-quality, high-impact, reproducible research. The algorithms they developed were ground-breaking.
Combining the output from BORIS with other information we’ve gathered has been key to tackling the spread of M. bovis and supporting our country’s farmers.
I feel very strongly that the algorithms we develop at universities should have real-world uses… The BORIS programme is a great example of our methods being used to make a difference to industries and people.
Global legacy and future applications
What began as a cattle disease control initiative has since evolved into a globally relevant disease modelling platform. The BORIS framework, and the Heriot-Watt algorithm that powers it, has been repurposed and applied to a range of other high-profile outbreaks:
- COVID-19 modelling in Australia, informing national response efforts
- Foot-and-mouth disease in Japan, supporting outbreak reconstruction
- Ongoing development of expanded tools under an Australian Research Council-funded COVID-19 project
Everything we’ve undertaken to date has been packaged up into BORIS. Under ongoing work, we’re expanding the application of these algorithms and may develop separate software to deal with more complex modelling needs in future outbreak contexts.
The collaboration continues with partners like Massey University in New Zealand, using BORIS to provide highly detailed, transmission-focused insights in conjunction with national response programmes.
This case study exemplifies how Heriot-Watt’s mathematical and data science research can power critical global infrastructure—helping governments, industries, and communities respond to urgent challenges with confidence, agility, and scientific precision.