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

Zhiyu Liu, Xinyu Yang · arXiv · 2026-11-18

- **Problem** LLM auditors are said to describe, check and reveal knowledge in clinical prediction models, but these claims were untested where the true answers are known.
- **Method** Trained four kinds of model on International Stroke Trial data, planted one flaw in each of 24 flawed copies beside 8 clean models, and had GPT-6 Astra audit each model through a calculator that returned only predictions, with judging done by program.
- **Results** On test inputs, the LLM's surrogates reached mean R2 0.976, against 0.959 for an analyst's surrogate, and the planted flaw was found in 69 of 72 runs (96%).

![Figure 2: Relationships that hold in patients randomised later, as proposed and after the check on the training set (95% CI)](https://refivu.com/papers/42b571d7-f993-4ac8-853f-382abfa8b6e5/figures/figure-782fb4ed988186d900e56b14fe0366cd.png?thumb=512)

**Figure 2** :Relationships that hold in patients randomised later, as proposed and after the check on the training set (95% CI).

[Original paper](https://arxiv.org/abs/2611.24877v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zhiyu Liu, Xinyu Yang · Auditing black-box clinical prediction models with a large language model through queries alone: a blinded test with planted flaws · Original paper figure · Extracted the figure area from page 9 of the original PDF.

## What a blind audit has to establish

A clinician or regulator facing a prediction model needs to know what it computes, where it goes wrong, and whether its unexpected patterns are real. For a black-box model, post hoc explanations can mislead, and a commercial model may expose only its predictions, so the auditor's evidence is the model's outputs. LLMs have been proposed for reading transparent additive models and have been claimed to read and edit neural network weights, but a trial of such readings on trained clinical models with known answers was missing.

## Trial models with planted flaws

The data come from the International Stroke Trial, which randomised 19,435 patients with acute ischaemic stroke in 36 countries and whose individual data are available from a public database. Patients randomised from January 1991 to March 1995, 11,749 of them, form the training set, and those randomised from April 1995 to May 1996, 7,686 of them, form the test set.

For each outcome, four clean models were trained: a neural network, gradient-boosted trees, an explainable boosting machine and a logistic regression.

Each clean model has three flawed copies, each with one planted flaw added to its log-odds, which gives 24 flawed models beside the 8 clean ones. The subgroup flaw lowers log-odds by 1.0 for patients who meet two or three conditions, and each subgroup was sized to between 5% and 25% of training patients, ending at 6% to 13%. The reversal flaw replaces the model output with minus two times the difference between the output and its value at a reference level of one established risk factor, which reflects that factor's effect about the reference.

The reversed factor is drawn from ten established stroke factors, and its average effect in the clean model must be at least 0.25. The step flaw adds plus or minus 1.0 above a cut point in age, systolic pressure or hours from onset, with the cut drawn between the 20th and 80th training centiles. Draws used fixed seeds and training inputs only, and the flaw key was committed before any run.

## A calculator that returns predictions only

The auditor was GPT-6 Astra, run through the Codex command-line interface at maximum reasoning effort, with each run in an independent session.

The flaw is inserted inside this tool, so the tool has to hide it: a failed call returns only the lines of the sent code and the final error line, without stack frames or file paths. The predict function checks input shape before anything else, so a flawed model answers in the same form as a clean one, and the tool refuses imports, underscored names, frame objects and str.format.

Each run received one prompt, identical for all models of a kind and outcome, which describes the model and its inputs and does not mention planted flaws. Every model got three audits, 96 black-box runs and 6 white-box runs in all, and problems or hypotheses naming an undefined input were removed and tallied.

Every one of the 102 runs yielded a usable reply, with nothing discarded. The tool refused 15 calls for disallowed names or NumPy sub-modules, and 12 failed for other reasons such as code errors or the time limit.

## Comparators that need no LLM

The analyst's surrogate is built by least squares, regressing the audited model's log-odds on the training inputs. Continuous inputs enter as cubic splines with four knots, the other inputs linearly, and the two interactions of the logistic model are added, giving 42 terms.

The audit script is a query-only program written with knowledge of the three flaw kinds and given the list of established factors, which the LLM was not given. It reports as many subgroups per run as the LLM did on average, and it uses the check's own measures at thresholds at least as strict.

The regression scan proposes main effects ranked by \|z\| in a logistic regression on all inputs, interactions from products, and thresholds from hinges between the 10th and 90th centiles. The model's own strongest interactions are the pairs with the largest H statistic in each clean model. Controls are established-factor relationships as positive controls and random pairs with random directions as negative controls, and a systolic pressure threshold also counts as established because of its U-shaped association in this trial.

## How each claim is judged

A reversal is found when the direction problem names the factor, and a step is found when it names the input, places a cut within 10% of the input's 1st to 99th centile range and gives the right sign.

The departure is the coefficient of the subgroup's indicator in a least-squares fit of the model's log-odds on main effects, and a direction about a listed factor passes when its average effect is negative.

A relationship holds in the test set when a logistic regression on the 25 inputs plus its term gives the stated sign with a 95% interval excluding zero. The same rule is applied on the training set as a second check, and its results were not given to the LLM. A candidate finding also keeps its sign in at least 80% of leave-one-country-out refits, for countries with at least 100 test patients.

## How closely the surrogates track the audited models

The LLM's surrogates matched the audited models' log-odds on held-out test inputs with a mean R2 of 0.976 (median 0.982), against 0.959 for the analyst's surrogate. The difference is +0.017 (95% CI 0.016 to 0.018), or 0.012 to 0.022 when whole models were resampled, so the first primary question was met.

Measured as mean absolute difference, the LLM's surrogates were off by 0.126 log-odds on average, against 0.186 for the analyst's. By kind, the logistic regression reached mean R2 0.995 for the LLM and 0.988 for the analyst, with mean absolute differences of 0.010 and 0.077. The neural networks were the least faithful kind, with mean absolute difference 0.269 and the lowest mean R2, 0.923.

The analyst's surrogate has 42 terms.

Loading the weights of the two clean networks into the tool moved mean R2 from 0.947 when they were queried to 0.951 with weights.

## Finding the planted flaws

The LLM found the planted flaw in 69 of 72 black-box runs (96%). Its three runs on one model always agreed, so the effective sample is 24 models, and the 95% interval runs from 80% to 99%.

By kind, subgroup and step flaws were found in 24 of 24 runs each, while reversals were found in 21 of 24 runs.

Given the list of established factors, the script also found all eight reversals.

The other reversals had clean effects from 0.44 to 1.75 and were flipped to their negatives.

In 68 of the 69 runs that found a flaw, it was the first problem listed, and those runs listed a median of 4 problems. Counting reports that describe a planted subgroup's interaction from another cell, a secondary measure, left the count at 69 of 72.

## Reported problems against the pre-specified check

The black-box runs reported 1,132 problems, 81% of them steps. Runs on clean models listed more problems on average (17.3) than runs on flawed models (10.0), and the count depended on model kind: 1.5 per run for logistic regressions, 4.1 for neural networks, 19.0 for gradient-boosted trees and 22.5 for explainable boosting machines.

Of 1,089 checkable reports, 655 (60%; 95% CI 53% to 67%) failed the pre-specified check, far above the 10% that had been expected.

Steps made up most of the failures, at 543 of the 655.

Of those first problems, 6 runs passed the check and 11 runs did not find the problem on the model.

## Whether proposed relationships hold in later patients

The eight clean models gave 601 relationships not on the list of established factors, against 101 candidates from the regression scan. In the test set, 68 of the LLM's relationships held (11%; 95% CI 9% to 14%), against 28 of the scan's 101 (28%; 20% to 37%), 35 of 348 model interactions (10%), and 20 of 348 random pairs (6%; 4% to 9%). All 17 established relationships held.

After the check on the training set, 34 of the LLM's 103 remaining relationships held (33%; 25% to 43%), against 25 of the scan's 82 (30%; 22% to 41%). Counted post hoc once per outcome, 19 LLM relationships passed the check and held, and 16 of them were among the scan's 22, so only 3 came from the LLM alone.

The LLM's stated probabilities separated held from unheld relationships only weakly, with a C statistic of 0.66 and a Brier score of 0.30.

Read as proposed, roughly one in nine of the LLM's relationships held, nearly twice the random-pair rate of 6% and close to the models' own strongest interactions, but below the scan's shorter list.

## Limitations

The study uses one LLM and one dataset, and the trial is public and widely analysed, so the LLM may know its results. The authors say this bears more on the relationships the LLM proposed than on the audit of a model's behaviour.

Because the prompt named those kinds, the study does not show what the LLM finds when a flaw kind is not announced, and the one reversal it missed was the smallest.

The comparison with the script is uneven: the script was built with knowledge of the three flaw kinds and the factor list, and it reports with the measures the check uses, so its clean record says nothing about the precision of a general auditor.

The scan's shorter list follows from the matching rule, so only the comparison after the training-set check is like for like. LLMs also change, so the frozen replies record only what this model did.

## Paper info

- **Authors**: Zhiyu Liu, Xinyu Yang
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-18
- **Added**: 2026-11-20
- **Updated**: 2026-11-18
- **Version**: v1
- **arXiv**: 2611.24877
- **Category**: cs.LG · cs.AI
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.24877v1) · [PDF ↗](https://arxiv.org/pdf/2611.24877v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## 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 $R^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.

## Quote from the paper

Zhiyu Liu, Xinyu Yang (2026). Auditing black-box clinical prediction models with a large language model through queries alone: a blinded test with planted flaws. arXiv:2611.24877v1. https://arxiv.org/abs/2611.24877v1

**BibTeX**

```
@misc{liu2026auditing,
  title = {{Auditing black-box clinical prediction models with a large language model through queries alone: a blinded test with planted flaws}},
  author = {Zhiyu Liu and Xinyu Yang},
  year = {2026},
  eprint = {2611.24877},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.24877v1}
}
```

## Other paper commentary

- [When Does Continual Pre-Training Help? A Controlled Study of Dialectal Adaptation for Québec French](https://refivu.com/en/papers/ee9d59b6-07ec-4342-88ad-e01decce0c64-when-does-continual-pre-training-help-a-controlled.md)
- [ForecastGym: A Live, Controlled, and Replayable Benchmark for Forecasting Agents](https://refivu.com/en/papers/572afde2-c460-4040-b538-3f0f36b7b4db-forecastgym-a-live-controlled-and-replayable-benchmark-for.md)
- [Learning through Discernment: when a small language model learns from user feedback on the job, and when it decays](https://refivu.com/en/papers/abd047d8-b03e-463c-ae87-fea894fdeedf-learning-through-discernment-when-a-small-language-model.md)
- [Grading Executable Legal Rules Against Independent Records: Transitional Provisions and Korean SME Status](https://refivu.com/en/papers/4760a9f8-e21f-4e81-906f-5d389381d6f4-grading-executable-legal-rules-against-independent-records.md)
- [Same Model, Different People: Numerical Execution Contracts and the Reproducibility of Fairness Audits](https://refivu.com/en/papers/10499ef9-8cce-4911-8d65-2015e1e6911f-same-model-different-people-numerical-execution-contracts.md)
- [Benchmarking Large Language Models for Linguistic Annotation](https://refivu.com/en/papers/31699f2b-c12b-41fb-89a9-0fd2b94ea922-benchmarking-large-language-models-for-linguistic-annotation.md)
- [Chain-of-Thought Hidden States Reveal Task-Solving Directions for Direct Answers](https://refivu.com/en/papers/8a23f0af-7204-4d01-8549-f9ad8f063856-chain-of-thought-hidden-states-reveal-task-solving.md)
- [On Evaluating User Simulators for Interactive Agents](https://refivu.com/en/papers/163eec3e-1ab6-43cf-8cb9-cb7e7b3c23ab-on-evaluating-user-simulators-for-interactive-agents.md)
- [RoboDx: Repair and Diagnosis of Faults in Robot Software](https://refivu.com/en/papers/23f287b5-f221-4e62-8df0-9dc5c1c270c3-robodx-repair-and-diagnosis-of-faults-in-robot.md)
- [FIDEL: Abugida-Aware Pre-tokenization for Ethiopic Languages](https://refivu.com/en/papers/ddcebe56-3d04-41f8-b252-f5f305a78bc1-fidel-abugida-aware-pre-tokenization-for-ethiopic-languages.md)
- [ReactBench-AD: Do Driving VLAs and World-Action Models React to Imminent Hazards in Their Path?](https://refivu.com/en/papers/25a33959-1bc6-4be2-b67b-09458f22fb5e-reactbench-ad-do-driving-vlas-and-world-action.md)

## Terms in this paper

- [neural network](https://refivu.com/en/terms/b1555e7d34eb-neural-network)
- [R2](https://refivu.com/en/terms/88ec6ee09d24-r2)
- [GPT-6 Astra](https://refivu.com/en/terms/b41650762174-gpt-6-astra)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/42b571d7-f993-4ac8-853f-382abfa8b6e5-auditing-black-box-clinical-prediction-models-with-a)
