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:2611.24877v1When people talk about using large language models to explain clinical prediction models, there are really three promises hidden in that idea. First, can the model tell us what a black-box predictor is actually computing? Second, can it find faults in that predictor? And third, can it point to surprising patterns that are genuinely real, rather than artifacts of the model or the data? This paper tests all three, but it does so in a very careful way: by making the answers checkable in advance. That matters because clinical prediction models are often deployed in settings where transparency is limited. A clinician, researcher, or regulator may only get predictions from an interface, not the model itself. In that situation, post hoc explanations can be seductive but misleading. They may sound convincing while failing to reflect the actual computation. And even if an explanation is faithful to the model, that still does not mean the pattern is clinically meaningful. The model may have learned noise, quirks of the training set, or accidental regularities that do not generalize to future patients. The broader background here is interpretability and auditing. There is a long history of trying to explain models after the fact, and a more recent wave of work using LLMs as assistants for that job. Some systems let an LLM interrogate a model through natural-language questions; others feed it model structure, such as the graphs of an explainable boosting machine, and ask it to describe or repair the model. There are also claims that frontier LLMs can read weights directly. But a key unresolved question is what the LLM is really doing when it succeeds. Is it genuinely “reading” the model, or is it mainly doing computation over outputs it can query? The authors’ earlier work suggested that, at least in some settings, query access alone was enough. This paper extends that idea to real clinical data, where the task is much harder because the models are noisy, irregular, and not fully known in advance. The study uses the International Stroke Trial, a large randomized trial with individual patient data. The input variables are the sort of features you would expect in acute stroke prognosis: age, sex, consciousness level, neurological deficits, stroke syndrome, atrial fibrillation, blood pressure, timing from onset, imaging findings, and prior aspirin or heparin. The authors split patients by month of randomization so that training and test sets are separated in time, which is a sensible way to mimic future deployment. They trained models on the earlier patients and evaluated some relationships on later patients. The outcomes were death or dependency at six months, and death within six months. They trained four different model families for each outcome: logistic regression with splines and a few prespecified interactions, an explainable boosting machine, gradient-boosted trees, and a neural network. So in total there are eight clean models, two outcomes times four model types. In the test set these models had reasonably similar discrimination, with C statistics around 0.789 to 0.794. That is not the main point of the paper, but it tells us these are plausible clinical predictors rather than toy examples. The crucial design choice is that the authors then created flawed versions of each clean model. They planted three kinds of defect. One kind was subgroup under-prediction: for a selected subgroup defined by a few conditions, the model’s log-odds were shifted downward. Another kind was reversal of a known risk factor: they deliberately flipped the direction of an established clinical predictor, such as age or atrial fibrillation, so that the model would behave opposite to medical knowledge. The third kind was an implausible step: a sudden jump up or down in risk above some cut point of age, blood pressure, or time from onset. These flaws were generated programmatically from the training inputs, with fixed seeds, and the model identities were randomized and blinded before any audit began. That blinding is important: neither the auditor nor the judging logic knew which model was clean or flawed. The auditor was GPT-6 Astra, accessed through a command-line interface and given only one tool: a calculator that could query the model for predictions on input arrays. It could not see weights, files, or model internals. In the black-box condition, the only thing it could do was ask for predictions. The authors also took care to protect the blinding. The tool was designed so that if a call failed, it would not leak stack traces or file paths that might reveal the hidden flaw layer. Every call was later reviewed to make sure the LLM was not trying to inspect the tool or the model object directly instead of querying it. As a secondary comparison, the two neural networks were also audited with their weights exposed, creating a white-box condition for those models. The task given to the LLM was quite ambitious. For each model, it had to explain what the model computes, list its problems, and list every relationship it considered unexpected or not standard medical knowledge. Its reply had to end in a machine-readable block so the authors could check it automatically. The block included three things: a surrogate model, a list of problems, and a list of hypotheses about relationships that might hold in later patients. The surrogate was meant to approximate the audited model’s predictions using simple terms such as linear effects, hinge terms, and pairwise interactions. The “problems” had to be stated in a form that could be checked against the planted flaws: a subgroup, a reversed direction, or a step. The hypotheses were the LLM’s candidate discoveries, and the authors later tested whether these held in the later test patients. To make the study more informative, the authors compared the LLM against several non-LLM baselines. One was an analyst’s surrogate model fit directly to the audited model’s log-odds on the training data. Another was a purpose-written audit script that knew the three planted flaw types and searched for them using queries only. This script was, by design, a strong comparator for flaw detection. They also compared the LLM’s reported relationships against candidates from regression scans and against the strongest interactions in the model itself. And for controls they used known clinical relationships, which should be found if the method is sensible, and random pairs with random directions, which should not. So what happened? First, on faithfulness, the LLM did very well. Its surrogate models reproduced the audited models’ log-odds with a mean R-squared of 0.976, using a median of 128 terms. Even the analyst’s simpler surrogate, with 42 terms, reached an R-squared of 0.959. The practical takeaway is that, given enough querying and computation, the LLM can recover a very accurate approximation of the black-box model’s behavior. In other words, query access alone was enough for faithful description in this setting. Second, on planted flaw detection, the LLM found almost all of them. It identified the planted flaw in 69 of 72 black-box runs, which is 96 percent, and the confidence interval is reported as 80 to 99 percent. The purpose-written audit script found all 24 planted flaws. That comparison matters: it shows the LLM is strong, but not magical. A script built specifically for the task, and given knowledge of the flaw types, can do at least as well and in this case perfectly. So the LLM is capable, but not uniquely so. Third, the LLM produced many more problem reports than just the planted ones. The authors had pre-specified a check for whether a reported problem really existed in the audited model. By that check, 60 percent of the 1,089 checkable reports failed. But when the authors looked more closely afterward, many of those failures were actually small real steps that did not meet the stricter threshold, and only 15 percent of the checkable reports were not found in the model at all. That is a subtle but important result. It suggests the LLM often noticed something real, but its descriptions were not always calibrated to the exact rules of the audit. In other words, “there is something there” is not the same as “the exact reported flaw passes the pre-registered criterion.” The paper also evaluates the LLM’s unexpected relationships, which is the hardest and most interesting part. Across 601 such relationships read out of the clean models, only 11 percent held in later patients. That is not much better than random pairs, which held 6 percent of the time. A regression scan’s shorter list of its strongest candidates did better, at 28 percent. After an additional check on the training data, the rates were 33 percent versus 30 percent. The overall message is that merely extracting unusual-looking relationships from a model does not reliably identify true new clinical knowledge. Some of those relationships may be real, but many do not replicate in later patients. Faithful model reading is not the same thing as discovering robust patient-level insight. There are a few limitations and cautions to keep in mind. The study is carefully designed, but it is still one trial dataset, one clinical domain, and one particular style of prompt and tool setup. The planted flaws are realistic in the sense that they mimic types of model error that matter in practice, but they are still synthetic insertions. The auditor was also given a very structured task with machine-readable output; that helps evaluation, but it is not how many real users would interact with an LLM. And although query access was enough here, that does not prove the same would hold for every model family or every data modality. The most important takeaway is balanced. With query access alone, an LLM can reconstruct a black-box clinical model quite faithfully and can find nearly every planted flaw, especially when the flaw is of a type it can systematically probe. But its reports of problems should be checked directly on the model, and its “discoveries” should be checked on data from later patients. The paper’s deeper lesson is not that LLMs are unreliable, but that they are powerful auditors whose outputs need the same kind of validation we would demand from any scientific tool. They can help us inspect models, but they do not replace the discipline of verification.
Also spotted that day
Previous daily papers