CITCoM: Casual Inference for Testing of Computational Models

Lead Research Organisation: University of Sheffield
Department Name: Computer Science

Abstract

Computational models are being used increasingly to offer answers to important questions that affect us all. Scientists are increasingly resorting to computational models to simulate phenomena as diverse as the effects of drugs on a physiology, transmissions of diseases in a society, or the flow of blood through an artery. Within the public sector, computational models are fundamental to enabling the prediction of weather patterns, both in the short term and also to predict the impact of global warming in the longer term. They are also increasingly vital for supporting decisions on infrastructure spend; our project partners in the DAFNI project are developing computational modelling infrastructure to support the investment of £460bn over the course of the coming decade.

Given the high-stakes decisions that are usually involved, mistakes or "bugs" in a model can lead (and have led) to disastrous consequences. It is critical that these systems are rigorously tested to minimise this risk.

Computational models are however not amenable to traditional software testing and debugging techniques. They can include large numbers of parameters and configuration options. They can take a very long time (and require a lot of computational resources) to execute a single test run, which makes it infeasible to run large numbers of test executions. The data structures that they operate on can be particularly complex (e.g. 3D models of cities or coronary arteries), which means that these can be difficult to synthesise and inspect. Finally, if a test run is found to produce an incorrect result, these factors can make it very difficult to identify where the bug is in the source code of the model.

CITCoM is based on the observation that the challenge is in many ways rooted in data-analysis. In the presence of large numbers of input variables, there is the challenge of analysing the tested behaviour and ensuring that the observed behaviour is caused by the parameters that are the focus of the test (and not accidentally caused by other incidental parameters). There is the converse challenge of selecting which inputs need to be varied and which ones need to be controlled to demonstrate that a given combination of inputs causes a particular behaviour whilst keeping the number of test cases this requires to a minimum. If a fault occurs, there is the challenge of interrogating the data to locate the fault in the code.

Similar problems arise in a wide range of disciplines, and especially in the field of Epidemiology - where population data are scrutinised to determine the effects of drug treatments or medical interventions. Again, there are many variables at play (lifestyle, cultural background, genetic traits, habits). Collecting data can be expensive and time-consuming. Outcomes can be difficult to measure and complex to scrutinise. For such situations, the last decade has seen the rapid rise of a family of statistical analysis approaches called Causal Inference. This has enabled statisticians to design and reason about epidemiological trials and data in new and powerful ways to efficiently sample data, handle missing data-attributes, and use existing data to answer "what-if" questions, even if the data in question has not been collected yet.

CITCoM will use these powerful Causal Inference analysis capabilities to address the problems that arise when testing computational models. We will generate Causal Inference-driven automated test-generation techniques, test oracles, and debugging techniques. These will be trialled and honed on a set of large case-study models in collaboration with our partners on the DAFNI project at STFC, at DSTL, and within The University of Sheffield.

Ultimately, CITCoM will enable us to generate, collect, and analyse evidence from computational models to ensure that they do not contain faults, so that any decisions that they feed into are well-founded and trustworthy.

Planned Impact

The ability to rigorously test computational models can potentially have a significant positive impact upon the following areas:

Economy: The goal of putting "the UK at the forefront of the AI and data revolution" is one of the four grand challenges set out by the Government's Industrial Strategy. Computational models, which enable computers to simulate and predict phenomena, are fundamental to achieving this aim. The National Infrastructure Commission's report "Data for the Public Good" shows how modelling approaches (such as Digital Twins) have the potential to save society billions of pounds: Complex machinery can be constructed and simulated virtually, providing an opportunity to eliminate faults before the investment is made to physically manufacture and deploy the product. The value of such virtual models however ultimately depends on their validity and trustworthiness, for which the ability to systematically and rigorously test them is critical. CITCoM will provide the tools and techniques to enable this. Thanks to our collaboration with DSTL and the DAFNI consortium we will be ideally positioned to ensure this impact, by ensuring that the CITCoM techniques are available to a wide range of modelling projects within industry and the industrial sector.

Society: Computational models are increasingly crucial for designing complex systems to improve them with respect to factors that have a societal impact: the safety of aircraft control systems, the security of communication systems, the energy-efficiency of turbines or heat-efficiency of buildings. All of these factors represent direct positive consequences for society. CITCoM would provide techniques that can serve to explore the functionality of these systems, not just to establish their trustworthiness, but also to explore and interrogate their behaviours in a more general sense.

Knowledge: The techniques developed as part of this project will have a significant impact upon software testing. Many systems share the attributes of computational models - complex input types, large parameter sets, complex outputs, and long execution times. The testing techniques developed within CITCoM (or elements thereof) stand to be transferrable to other domains, such as cyber-physical systems.

People: The project will have a positive impact on the careers of the investigators, the RA, and the Ph.D. student. Walkinshaw, Hierons, White and the Ph.D. student (funded by The University of Sheffield) will gain valuable experience of testing industrial and established academic computational models, and will establish themselves as leading researchers in this area within the UK. Latimer will build upon his Causal Inference expertise, and will develop new links with the Computational Modelling community (both within the university of Sheffield and beyond), which will feed into new research opportunities in his work on health economics. Wagg will gain valuable experience of new testing practices, which can be directly applied to the Digital Twin models within the EPSRC DigiTwin project.

Publications

10 25 50
publication icon
Anness AR (2022) Maternal hemodynamics and neonatal birth weight in pregnancies complicated by gestational diabetes: new insights from novel causal inference analysis modeling. in Ultrasound in obstetrics & gynecology : the official journal of the International Society of Ultrasound in Obstetrics and Gynecology

publication icon
Ataiefard F (2021) Deep State Inference: Toward Behavioral Model Inference of Black-box Software Systems in IEEE Transactions on Software Engineering

publication icon
Clark A (2021) Test case generation for agent-based models: A systematic literature review in Information and Software Technology

 
Title Modelling Uncertainty in State Based Systems 
Description A diverse set of state machines, which were used for the basis of two experiments, to investigate the value of Subjective Logic State Machines.This repository includes: * A curated set of state machines, encoded into dot files (sources in submitted paper).* A jar version of the Mint tool, which included the test prioritisation and state machine inference code.* CSV files containing the accuracy results and prioritisation results data.* R scripts used to analyse the results data and to generate the various figures for the paper. 
Type Of Material Database/Collection of data 
Year Produced 2021 
Provided To Others? Yes  
Impact This was submitted to support a paper currently under review, so there are no impacts to report beyond supporting the immediate publication of this paper for now. 
URL https://figshare.shef.ac.uk/articles/dataset/Modelling_Uncertainty_in_State_Based_Systems/14287040/2
 
Title Modelling Uncertainty in State Based Systems 
Description A diverse set of state machines, which were used for the basis of two experiments, to investigate the value of Subjective Logic State Machines.This repository includes: * A curated set of state machines, encoded into dot files (sources in submitted paper).* A jar version of the Mint tool, which included the test prioritisation and state machine inference code.* CSV files containing the accuracy results and prioritisation results data.* R scripts used to analyse the results data and to generate the various figures for the paper. 
Type Of Material Database/Collection of data 
Year Produced 2021 
Provided To Others? Yes  
Impact This was submitted to support a paper currently under review, so there are no impacts to report beyond supporting the immediate publication of this paper for now. 
URL https://figshare.shef.ac.uk/articles/dataset/Modelling_Uncertainty_in_State_Based_Systems/14287040/1
 
Description Application of Causal Inference to Investigation of Birth-weight Data 
Organisation University Hospitals of Leicester NHS Trust
Country United Kingdom 
Sector Academic/University 
PI Contribution This was a collaboration of mutual benefit. We could train up members of our team to get them acquainted with Causal Inference, by applying this to a data-set collected at Leicester University Hospitals. This was for the sake of investigating diabetes in maternity, and specifically the relationship between cardiac blood flow and the birth weight of children. This research has since been published.
Collaborator Contribution The partners contributed data, and framed the research questions.
Impact Anness, A. R., et al. "Maternal hemodynamics and neonatal birth weight in pregnancies complicated by gestational diabetes: new insights from novel causal inference analysis modeling." Ultrasound in Obstetrics & Gynecology (2022).
Start Year 2021
 
Title CITCOM Causal Testing Framework 
Description This is a software application framework, which can be used as a basis for causal testing of computational models. As a proof of concept we have applied this to a variety of published models, including the CovaSIm model. 
Type Of Technology Webtool/Application 
Year Produced 2021 
Open Source License? Yes  
Impact We detected a bug in CovaSim using the testing approach, which led to a fix. 
URL https://github.com/CITCOM-project/CausalTestingFramework