Skip to content
Another Fire
← All Advances

ADVANCES

An AI-assisted audit asks whether clinical studies share reusable code

Researchers at MIT and Dana-Farber used language models to examine nearly 4,000 clinical prediction studies. Few shared code, and making a repository public did not guarantee that another researcher could work with it.

Medical researchPublished · scoping review

The paper is published. Can the analysis travel?

A clinical prediction model puts a number on a question such as whether a patient is likely to deteriorate during a hospital stay. How well it performs depends on who was included, what information was available when the prediction was made and how the outcome was defined. Those decisions are part of the model’s practical meaning, even if none appears in the equation that returns the final number.

Suppose a prediction model looks useful enough that a second hospital wants to try it. The paper tells the hospital what the model predicts and how it performed in the original study. The next task is more particular: find the exact analysis, work out what the inputs mean, run the model and see how the result changes in a different population. A link to a repository looks like the bridge between the paper and that work. Much depends on what is at the other end.

A Nature Medicine scoping review led by researchers at MIT and Dana-Farber examined 3,967 studies in the open-access clinical prediction literature. Of those, 482, or 12.2 percent, included a code-sharing statement. That number describes the papers sampled and the presence of a statement; it is not the proportion of all clinical studies with software that a second team can run. The researchers looked separately at the repositories they could locate. They found considerable variation in what authors had left for the next reader, from the instructions needed to make sense of the files to the dependencies and structure needed to execute them.

This is not primarily a story about tidier GitHub pages. Clinical prediction papers can describe models whose apparent performance depends on a long series of choices. The publication may report that a model used a blood measurement, for instance, while the code reveals how several measurements were reconciled, what counted as a missing result and when the clock started. A second hospital may keep the same kinds of records but collect them on a different schedule. A model that appears to work in one setting can behave differently when those details change. You cannot isolate that difference if you are also guessing what the original analysis did.

Counting two different things

The researchers assembled a sample by tracing papers that cited TRIPOD or TRIPOD+AI, guidelines for reporting prediction-model studies. That is a useful place to look: the papers come from a literature already in contact with explicit reporting standards. It also determines what the 12.2 percent can tell us. The sampling rule leaves out studies outside its citation and access criteria. It offers a view into reporting practice, not a census of every prediction model used in medicine.

Language models helped screen the research literature, look for statements about code-sharing and extract links. The team examined repositories against 14 predefined features related to reproducibility. Two human reviewers independently checked 500 papers, and the researchers also checked a repository sample. The division of labor is the point: the models worked through a volume of prose that makes a manual audit expensive; people supplied an independent comparison for judging how that extraction performed. The assessment asked whether useful artifacts and instructions were present. It did not treat a language model’s opinion about the code as a substitute for running an analysis.

There is a difference between asking whether authors said something about code and asking whether a reader can obtain it. There is another difference between obtaining files and being able to do anything with them. A public address can lead to an incomplete snapshot, a collection of notebooks without their order, or a working package whose dependencies have moved on. A complete archive can still be difficult to reuse if it gives no clear permission to do so. These are distinct failures. Counting the existence of a link collapses them into success.

Three kinds of reconstruction

Start with the easiest version of the second hospital’s problem. Imagine it has the original data and wants to reproduce a published table. It needs a description of the computational environment, the code that produced the table and a way to match the released files to the version used in the paper. If a dependency changes numerical defaults or if the repository only shows the latest implementation, a disagreement with the table can be hard to locate. The first gain from better sharing is that a second team can distinguish a difference in the computation from a difference in the underlying result.

Now suppose the hospital needs to test the model on its own patients. An executable release is a starting point, not the whole job. A human analyst still has to line up definitions: what counted as admission, when an input became available and what time horizon the model predicted over. Some mismatches can be resolved. Others tell the analysts that their hospital is asking a different question. The better documented the original analysis, the sooner they can spend time on these substantive choices rather than reverse-engineering a directory.

Finally suppose the model works on the second hospital’s records and someone asks whether using it improves care. That is a further study. It is possible for a model to predict an outcome well and still be unhelpful if the people receiving the prediction cannot act on it in time or if it directs attention toward cases they already know about. Software sharing makes the first two reconstructions possible; those reconstructions let the third question be asked with a definite model, rather than with a name and a performance number. The steps are connected, and each takes a different kind of work.

A paper another lab can begin from

Patient confidentiality does not require a choice between releasing private records and giving readers nothing they can inspect. Analysts can often separate code, definitions and instructions from the underlying records. A small example input can demonstrate the expected format without disclosing the study data; an explicit statement can tell authorized analysts where protected data would enter. Whether another group can recreate the exact analysis depends on its access, but the public artifacts can make clear which difficulty is a legitimate access restriction and which is simply an undocumented step.

A useful reporting standard also has to distinguish older studies from new ones. For older work, the original environment may no longer be recoverable. For new work, capturing the environment when the analysis is run is much easier than reconstructing it after publication. That shifts part of the burden upstream, to the point where a record of the decisions is still at hand.

The review was designed to inform TRIPOD-Code, an effort to clarify expectations for code reporting. A journal can ask not just for a link but for an identifiable release and enough information to understand the route from inputs to results. A research group can check its own repository by handing it to a colleague who did not write the analysis and seeing where that colleague gets stuck. Such a test does not require agreement about the promise of any one model. It asks whether a paper gives readers enough to disagree productively.

That is the larger gain. Much of science depends on a result being available to people who did not produce it. If an outside team can identify the exact model, understand how the inputs were made and run a comparison, it can ask a better question than whether it trusts the original authors. It can find where a result holds, where it breaks and which part of the work can be carried into a new setting. A published prediction then becomes something the next hospital can examine and build on, rather than something it must first reconstruct from clues.

← Return to Advances