Nicholas Gray

Profile

Physicist by training with a PhD in Risk and Uncertainty. My subject is what happens to a model once it leaves the conditions it was built in: where it stops being trustworthy, how much of the answer is real, and what evidence justifies the decision taken on top of it. I work on problems that do not have a textbook answer.

I have taken that question into three settings. In a regulated clinical environment, on a ten-month industrial secondment, I took raw radar time-series to a validated detection prototype and worked out why performance collapsed between the sensor rig and the real ward. In healthcare research, I develop and evaluate probabilistic models for clinical risk prediction, judged on calibration and robustness rather than headline accuracy. In engineering, I worked on uncertainty quantification for simulation models on a digital twin programme, and deployed one of them as a public web application.

Alongside the research I build the tooling. Puffin is a source-to-source compiler with its own ANTLR grammar that rewrites uncertainty-naive scientific code so it propagates uncertainty correctly. PBA-for-Python is my research code turned into a tested, documented, pip-installable package that other researchers use and that I support. Eight peer-reviewed publications plus two preprints, spanning uncertainty quantification, machine learning, simulation, statistics, and safety and reliability — see Papers.

Experience

Postdoctoral Research Associate — Medical AI

University of Liverpool, Liverpool, UK

Details
  • Researched distribution-free uncertainty quantification and calibration for clinical risk models, including selective prediction and abstention mechanisms.
  • Developed and evaluated probabilistic machine-learning models for clinical risk prediction, assessed on calibration, out-of-distribution robustness and selective prediction rather than headline accuracy.
  • Led a scoping review of how AI-based clinical decision support systems are deployed in real-world healthcare settings, examining how predictive uncertainty is communicated from algorithms to clinicians and patients. Accepted by ACM Transactions on Computing for Healthcare.
  • Examined the ethical implications of AI systems operating under epistemic uncertainty, including trust, deference and accountability.
  • Delivered the modelling and evaluation pipeline in Python under version control, with tests and reproducible environments, so every result could be regenerated and independently checked.
  • Worked closely with clinicians and non-technical stakeholders to translate model performance and uncertainty into actionable risk information.

Research Data Scientist (Secondment)

Safehinge Primera, Glasgow, UK

Details
  • Embedded with a commercial client and owned the science end-to-end, from framing the problem with them to a validated prototype and a written account of what to build next.
  • Repurposed radar systems to extract clinically useful information about patient activity and sleep quality in an inpatient mental health setting.
  • Built the data preparation, feature engineering, model training and evaluation pipeline in Python that took raw, high-volume radar time-series to a validated detection prototype, evaluated against real clinical operating conditions.
  • Created algorithms to infer behavioural patterns from sensor-derived time series, including unsupervised methods for activity classification on unlabelled data.
  • Reduced false positive alarms in a safety-relevant monitoring system by improving target tracking, and diagnosed the distribution shift between controlled sensor conditions and the real clinical environment.
  • Reset operating thresholds against the asymmetric cost of a false alarm versus a missed event.
  • Worked in a cross-functional team of hardware, software, product and clinical specialists, and documented the technical constraints and deployment barriers with evidence-based recommendations.

Research Assistant — Department of Engineering

University of Liverpool, Liverpool, UK

Details
  • Worked on uncertainty quantification for simulation models of physical systems on a UKRI-funded engineering Digital Twin project.
  • Built tooling to make complex models usable outside the research environment via a web-based interface.
  • Built and deployed a dam-break simulation model as a public web application on AWS: JavaScript front end, Flask backend REST service, EC2 and S3 hosting.
  • Held concurrently with the final phase of the doctorate, within the same Digital Twin programme.

Research Assistant

Imperial College London, London, UK

Details
  • Researched human-in-the-loop machine learning for criminal justice decision-making, examining how AI outputs influence human judgement in high-stakes, ethically sensitive contexts.
  • Investigated logic-based machine-learning methods to inform rules-based decision processes from behavioural data.
  • Explored and prototyped novel methodologies through exploratory data analysis and rapid modelling to assess feasibility, limitations and operational risk.
  • Co-authored a systematic literature review on how human-in-the-loop systems can be classified, evaluated and governed, and produced the stakeholder report setting out the findings and recommendations.
  • Held concurrently with doctoral research at Liverpool.

Teaching Assistant

University of Liverpool, Liverpool, UK

Details
  • Planned and delivered lectures in AI Ethics, Machine Learning and Data Engineering, and practical workshops in software engineering and statistics, to audiences with no modelling background.
  • Designed and marked coursework and examinations.
  • Supervised undergraduate dissertation projects.

Education

PhD in Risk and Uncertainty

Institute for Risk and Uncertainty, University of Liverpool, Liverpool, UK

Details
  • Research in risk science, applied statistics and artificial intelligence, focused on uncertainty-aware decision systems in high-risk domains.
  • Designed and evaluated machine-learning models to characterise epistemic uncertainty, operational risk and failure behaviour under data and model limitations.
  • Investigated how AI model outputs, uncertainty estimates and risk signals affect downstream human decision-making.
  • Carried out within the EPSRC programme grant Digital Twins for Dynamic Design.
  • Applied probabilistic and simulation methods across unrelated domains, from orbital mechanics to epidemiological policy simulation to regression on interval-valued data.
Thesis
The Importance of Risk and Uncertainty for Humane Algorithms
Abstract
Algorithms have no idea of the significance of the calculations that they are performing. They just mindlessly output the results of complex mathematical operations, often requiring untenable assumptions to be made, irrespective of the risk posed by even simple errors, frequently in inhumane ways. My PhD argued that careful consideration of the uncertainties within systems and environments can aid ethical human-AI decision-making (especially under epistemic uncertainty) in high-risk scenarios. It was multidisciplinary in nature, spanning AI ethics, engineering, statistics and risk science.

BSc (Hons) Physics with Theoretical Physics

University of Nottingham, Nottingham, UK

Details
  • Mathematical modelling, statistical analysis, theoretical physics, nuclear physics.

Skills

Programming
Python (advanced): NumPy, SciPy, pandas, scikit-learn, PyTorch, TensorFlow, matplotlib. R, MATLAB, JavaScript, SQL, Excel and VBA. Source-to-source compiler construction with an ANTLR grammar: parsing, source transformation, code generation.
Machine Learning
Supervised and unsupervised learning, deep learning, classification, clustering, anomaly detection, probabilistic modelling; human-in-the-loop systems; model evaluation with ROC-AUC and confusion-matrix metrics, calibration, sensitivity and specificity trade-offs, out-of-distribution robustness and behaviour under distribution shift; elements of statistical learning theory.
Uncertainty Methods
Distribution-free uncertainty quantification, calibration, selective prediction and abstention; probability bounds analysis, probability boxes and confidence boxes, Singh plots, interval arithmetic, imprecise probabilities, Bayesian inference; Monte Carlo propagation, intrusive and non-intrusive; dependency modelling, copulas and the repeated-variable problem; sensitivity analysis.
Statistics
Generalised linear models, mixed-effects models, survival analysis, decision-curve analysis; time-series and biosignal analysis including raw actigraphy processing and sleep staging (TST, WASO, SOL, fragmentation); time-series alignment of continuous sensor streams against longitudinal self-reported outcomes; diagnostic-test statistics under uncertainty and classification without a gold standard.
Simulation & Modelling
Agent-based modelling; compartmental epidemiological simulation with testing and quarantine dynamics; cellular-automaton traffic modelling; physics-based modelling from dam-break hydraulics to satellite attitude determination and conjunction probability; uncertainty quantification for engineering digital twins.
NLP & LLMs
NLP for text data: embeddings, classification, topic modelling. Applied use of LLMs for research and code workflows; daily user of agentic coding tools, principally Claude Code, for development and code review.
Software & Deployment
Git and GitHub, Docker, testing and reproducible environments as routine practice; packaging and release to PyPI with Read the Docs documentation; open-source licensing (MIT, GPLv3); R package development including the S4 class system; Flask backend and REST API services, React front ends; cloud deployment on AWS (EC2, S3).
Communication
Explaining technical results to people who will act on them and are not modellers; risk and uncertainty communication; science-to-policy translation; authoring technical documentation and teaching material; four years lecturing.

Domain Expertise

Health & Clinical AI
Clinical risk prediction and calibration; deployment, evaluation and governance of AI decision support in regulated healthcare settings; clinical software and SaMD in regulated environments; health data science and biosignal analysis.
Safety & Reliability
Published at ESREL (European Safety and Reliability Conference) and at ECCOMAS UQ in Computational Sciences and Engineering. Reasoning about correlated failure defeating designed redundancy; risk assessment under deep uncertainty. Professional service with the Society for Risk Analysis and ESRA.
Responsible AI
Accountability, trust and deference in AI decision support under epistemic uncertainty; risk and uncertainty communication from algorithms to the people acting on them; human-in-the-loop and human factors research; four years teaching AI ethics.
Engineering & Digital Twins
Uncertainty quantification for engineering simulation models; digital twin methodology; making complex models usable outside the research environment.
Aerospace & Space Systems
Satellite attitude determination under uncertainty; satellite conjunction (collision) probability.
Public Health & Policy
COVID-19 mass-testing policy modelling and the effect of imperfect diagnostic tests on disease spread; first author on an eleven-author PLoS ONE paper written to a policy deadline.
Financial Risk
Investment risk for vertical farms under imprecise probability (Sustainability, 2022).

Awards & Professional Service

Award or role Event or body Location Year
Best Presentation Liverpool Institute for Risk and Uncertainty Showcase Conference Liverpool, UK 2022
Student Merit Award (Risk Policy & Law) SRA Annual Conference Arlington, VA, USA 2019
International Student Travel Award SRA Annual Conference Arlington, VA, USA 2019
Shortlisted for Best Student Poster Award European Safety and Reliability Conference Hannover, Germany 2019
Organising Committee member Conference co-sponsored by the Society for Risk Analysis and ESRA 2025
Secretary, Students & Young Professionals Subcommittee Society for Risk Analysis 2020/21

Projects

Puffin, the Automatic Uncertainty Compiler

  • Source-to-source compiler that rewrites uncertainty-naive scientific code so it propagates uncertainty properly, letting analysts who will not rewrite their own models still get intrusive uncertainty analysis.
  • ANTLR grammar, parsing, source transformation, optimisation and code generation. Released under MIT.
  • Published in the International Journal of Approximate Reasoning and at ECCOMAS UQ.
  • GitHub: github.com/ngg1995/puffin

PBA-for-Python

  • Designed and developed a Python module for probability bounds analysis, transforming prototype research code into a tested, documented, pip-installable package.
  • Published and maintained on GitHub and PyPI, with version management for research and industry use.
  • Authored user documentation on Read the Docs.
  • Provided support for colleagues using the library in their own research across disciplines.
  • Peer-reviewed software paper in Software Impacts.
  • GitHub: github.com/Institute-for-Risk-and-Uncertainty/pba-for-python
  • Docs: pba-for-python.readthedocs.io

Deployment of AI in Medicine

  • Researched how AI-based clinical decision support systems (CDSS) are currently deployed in healthcare settings.
  • Highlighted that current performance evaluation mainly uses ROC-AUC and confusion-matrix metrics, with minimal assessment of how uncertainty presentation impacts clinical decision-making.
  • Concluded that while AI-CDSSs can improve decision speed and quality, many deployed systems inadequately communicate uncertainty, potentially impacting clinician trust and accountability.
  • Recommended further research to establish best practices for clear and intuitive risk and uncertainty communication in clinical AI.
  • Accepted by ACM Transactions on Computing for Healthcare.

Imprecise Logistic Regression

  • Developed a novel probabilistic method incorporating interval-valued data within logistic regression, producing a set-valued model that preserves the epistemic uncertainty traditional methods collapse to a point estimate.
  • Developed as part of the doctorate.
  • GitHub: github.com/ngg1995/Imprecise-Logistic-Regression

Dam Break Simulator (IM AWARE)

  • Designed and implemented a full-stack web application visualising societal risk from tailings dam collapse in Brazil, enabling citizen scientists to explore the risk to their own communities.
  • JavaScript front end and Flask backend REST service, hosted on AWS (EC2, S3).
  • GitHub: front end and backend

Data Analysis for Sleep Study

  • Processed raw triaxial accelerometer data from ActiGraph wGT3X-BT wearable devices to derive objective sleep measures (TST, WASO, SOL, fragmentation).
  • Developed and applied generalised linear and mixed-effects models to examine bidirectional links between sleep quality and mood in day- versus night-shift nurses.
  • Found evidence that night-shift workers report systematically different sleep metrics, with downstream effects on mood and mental health.
  • These results provided evidence for future funding applications for further research into shift work and mental health.

Human-in-the-Loop Machine Learning

  • During a six-month research assistantship at Imperial College London, co-authored a systematic literature review assessing how human-in-the-loop systems can be classified, based on papers published within the last ten years.
  • The review considered: what roles and actions do humans perform within HITL systems? How is the performance of the system assessed? Where does deference to AI judgement pose risks to autonomy and accountability? And what areas of future research are there within this field?
  • Produced the stakeholder report setting out the findings and recommendations.

Other public code

  • pba.r — a probability bounds analysis S4 library for R (GPLv3).
  • CboxBayes — confidence-box Bayesian methods in Python.
  • uq-cookbook — a published cookbook on uncertainty quantification.
  • traffic_model — a Nagel-Schreckenberg cellular-automaton traffic model in MATLAB.
  • Fourteen public repositories at github.com/ngg1995.