Manuscript Offprint

arXiv:2611.24877

Auditing black-box clinical prediction models with a large language model through queries alone: a blinded test with planted flaws

Zhiyu Liu, Xinyu Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large language models (LLMs) are used to explain clinical prediction models, on the promise that they can say what a model computes, find its faults and even reveal new knowledge in it. We tested the three promises where the answers could be checked. From the International Stroke Trial we trained four kinds of model (logistic regression, explainable boosting machine, gradient-boosted trees, neural network) for two outcomes on patients randomised earlier, planted one flaw in each of 24 copies (an under-predicted subgroup, a reversed risk factor or an implausible step) and mixed them with the 8 clean models. GPT-6 Astra audited each model three times, blind, through a tool that only returned the model’s predictions; the judging rules were committed before any run and applied by program. Its surrogate models, with a median of 128 terms, reproduced the audited models’ log-odds with a mean R2R^{2} of 0.976 (0.959 for an additive surrogate of 42 terms fitted by an analyst). It found the planted flaw in 69 of 72 runs (96%; 95% CI 80% to 99%); a script written for the purpose found all 24. It also reported many more problems: 60% of 1,089 checkable reports failed the pre-specified check against the model’s average behaviour; post hoc, most of these were real but small steps, and 15% of the checkable reports were not found in the model. Of 601 unexpected relationships it read out of the clean models, 11% held in patients randomised later (random pairs 6%; a regression scan’s shorter list of its strongest candidates, 28%); after a check on the training data, 33% against 30%. With query access alone, an LLM can describe a black-box model faithfully and find nearly every planted flaw, as a purpose-written script also did; its reports of problems must be checked on the model and its discoveries on data.

1 Introduction

A clinician or a regulator who faces a prediction model wants to know three things: what it computes, where it is wrong, and whether the unexpected patterns it shows are real. For most models these questions are hard to answer. The model is a black box, post hoc explanations can mislead [1, 2], and a commercial model is often available only through an interface that returns predictions.

Large language models (LLMs) have been proposed as a way through. They can read transparent additive models and point out surprising effects [3, 4], and it has been claimed that they can read and edit the weights of neural networks directly [5]. In an earlier study with simulated networks whose content was known, we found that an LLM with a calculation tool described and audited such networks equally well whether it saw the weights or could only query the network: the ability came from computation, not from access to weights [6]. A similar audit, from weights, has been reported for rule networks in radiotherapy planning [7].

What is missing is a test on models trained on real patient data in which the answers are known in advance. Real models carry natural irregularities and noise, so a planted error is harder to tell apart, and an auditor that reports everything it sees is not useful. Planting known defects and asking whether they are found is an established way of testing explanation methods and auditors in machine learning [8, 9], and functions with known descriptions serve to test automated interpretability [10, 11]. And a faithful description of a model is not yet knowledge about patients: a model may have learned noise, and a faithful reader will report the noise.

We tested an LLM as an auditor of clinical prediction models under these conditions. Our contributions are:

  • a protocol for blinded audits of prediction models trained on real data: flaws of three kinds are planted in the model’s output, the auditor sees only predictions, it reports in a form that a program can check, and the rules for judging are committed before any run;
  • comparators that use no LLM for each question: an analyst’s surrogate, a purpose-written audit script, and candidates from regression scans and from the model’s own strongest interactions, with positive and negative controls;
  • a guard for the blinding: the tool shows nothing of the planted layer, even when a call fails, and every tool call was read afterwards;
  • results for 32 models trained on an open trial database: faithful surrogates, planted flaws found in 96% of runs, many reported problems that do not pass a check on the model, and unexpected relationships that hold in later patients no more often than those from a regression scan;
  • all prompts, replies, tool calls, models and judging code.

References (23)