Why code sharing matters in clinical prediction research
Large language models have been applied to a large corpus of medical literature to reveal that only a fraction of clinical prediction studies make their code publicly available, and when they do, the repositories often lack the documentation needed for true reuse. The findings, reported by MIT News, come from an international team led by researchers at MIT and the Dana-Farber Cancer Institute, who examined a substantial number of papers and many code repositories.
In short, the study shows that code sharing is relatively uncommon, and the quality of those shared resources varies dramatically, leaving researchers without the clear, reproducible foundations needed to validate and build upon published models.
How the investigation was conducted
The team focused on studies that cite the TRIPOD and TRIPOD+AI reporting guidelines—checklists designed to standardize the description of clinical prediction models. Using the open-access collection of PubMed Central, they identified a large set of papers that develop, update, or validate such models. The challenge, as first author Thomas Sounack explains, was the inconsistent way authors mention code availability. He notes that authors discuss and link to code in many different ways.
To tackle this, the researchers deployed large language models (LLMs) to scan the full texts, flag statements about code sharing, and extract any URLs pointing to repositories. Automated scripts then retrieved the linked code bases for further analysis. Human reviewers cross-checked a sample of papers and a separate set of repositories, resolving disagreements before comparing their judgments with the LLM output. The review found stronger agreement on concrete items—such as the presence of a license file—than on subjective assessments of documentation adequacy.
Key gaps uncovered
Two principal deficiencies emerged from the analysis:
- Low prevalence of code sharing: Code sharing was reported in only a minority of studies.
- Inconsistent repository quality: Among the shared code, some repositories were extremely well-organized and documented, while others offered almost no guidance at all.
These gaps matter because clinical prediction models directly influence patient-care decisions. Without transparent, reproducible code, peers cannot verify how patients were selected, how missing data were handled, or how model performance was evaluated—critical “researcher degrees of freedom” that shape outcomes.
Variability across journals and regions
The study revealed stark differences in code-sharing practices among journals. Some publications reported no shared code, while others reported sharing rates well above half. A few journals with formal code-sharing policies still exhibited low compliance, suggesting that policy alone does not guarantee open practices.
Geographic patterns also emerged, though detailed country-by-country statistics were not provided. The variability underscores the need for a unified standard that transcends disciplinary and regional norms.
What TRIPOD-Code aims to achieve
Building on the evidence gathered, the researchers are developing TRIPOD-Code, a reporting guideline that will specify which elements of analytical code are essential for sharing. This effort extends the existing TRIPOD and TRIPOD+AI checklists, which already guide authors on describing model development and validation. By defining concrete expectations for code documentation, licensing, software dependencies, and reuse terms, TRIPOD-Code seeks to give journals clearer criteria and give researchers a practical roadmap for transparent sharing.
Tom Pollard, senior author of the study, says the goal is to provide researchers with practical guidance on how to share code and to give journals clearer expectations to communicate to authors. The review provides evidence to inform those discussions.
Implications for the broader 4IR landscape
In the context of the Fourth Industrial Revolution, the ability to audit and extend medical AI models is a cornerstone of trustworthy AI. The gaps highlighted by the MIT-Dana-Farber analysis illustrate how the rapid proliferation of generative AI tools can outpace the development of robust governance frameworks. If clinicians and regulators cannot access well-documented code, the risk of hidden biases or methodological flaws increases, potentially eroding public confidence in AI-driven healthcare.
Moreover, the study showcases a concrete use case for LLMs beyond text generation: they can act as scalable assistants for systematic reviews, extracting structured information from heterogeneous sources. This capability could be extended to other domains—such as drug discovery or environmental modeling—where reproducibility is equally vital.
Best-practice checklist for researchers
While the final TRIPOD-Code recommendations are still in development, the review highlights several practices that already distinguish the most useful repositories:
- Include a clear README that explains the purpose of each script and how to run the analysis.
- Provide a license file that specifies reuse terms.
- List all software dependencies and version numbers, preferably in a requirements.txt or environment file.
- Offer synthetic or anonymized datasets when patient data cannot be shared, enabling others to test the code.
- Structure the repository with logical directories (e.g.,
data/,src/,results/).
Future directions
The authors plan to refine the LLM-assisted workflow, improving detection of nuanced statements about code availability and enhancing the evaluation of documentation quality. They also intend to engage with journal editors, funding agencies, and professional societies to promote the adoption of TRIPOD-Code. As the guidelines gain traction, a gradual rise in both the quantity and usability of shared code can be expected, fostering a more transparent and collaborative research ecosystem.
FAQ
How many clinical prediction studies were examined?
A large set of papers that cite the TRIPOD or TRIPOD+AI guidelines and are available through PubMed Central’s open-access collection were reviewed.
What proportion of these studies shared their code?
Only a minority of studies reported sharing code.
Did the study assess the quality of the shared code?
Yes; repositories were evaluated for documentation completeness, presence of a license, software requirements, and terms of reuse.
Are journal policies sufficient to ensure code sharing?
The analysis found that some journals with explicit code-sharing policies still had low sharing rates, indicating that policies alone may not be enough.
What is TRIPOD-Code?
TRIPOD-Code is a forthcoming reporting guideline that will define essential elements for sharing analytical code in clinical prediction research.
Can LLMs be trusted for systematic reviews?
The study shows that LLMs can efficiently process unstructured text to locate code-availability statements, but human reviewers remain essential for validating the results.
What practical steps can researchers take now?
Researchers should provide clear README files, license information, dependency lists, and synthetic datasets when possible, and organize their repositories logically.
Conclusion
The MIT and Dana-Farber investigation shines a light on the uneven landscape of code sharing in clinical prediction research. By harnessing large language models, the team quantified both the scarcity of publicly available code and the wide disparity in repository quality. Their work lays the groundwork for TRIPOD-Code, a guideline that could harmonize expectations across journals, institutions, and countries. As the Fourth Industrial Revolution drives deeper integration of AI into healthcare, establishing reliable, reproducible foundations for medical models will be essential to maintain trust, accelerate innovation, and ensure that the benefits of advanced technologies reach patients worldwide.
Source: MIT News