Tuesday, November 10, 2026

An AI audit of my work's computational reproducibility

(This post follows my previous one about new AI policies for my lab.)

I'm trying to come to terms with the challenges and opportunities of AI for science. Coding agents in particular offer the possibility of "checking" – reproducing and critiquing – scientific data analysis. This possibility is very exciting: AI can help us identify and correct errors in our own work. It can also help us find issues in the published literature, provided that code and data are publicly available. This all felt a little unrealistic even a year ago, but now if you ask a frontier model about the scientific literature on "high effort mode" it may dig into data as a matter of course! With cheaper tokens and computation, I suspect that computational reproducibility and error checking will soon be ubiquitous. 

AI aside, open code and data for scientific papers is an ethical imperative. Transparency can help us deal with the fact that irreproducibility and error are unfortunately extremely common in the published literature. For example, around half of all psychology papers have at least one statistical test that – because of typos, rounding error, or other issues – is prima facie impossible (see statcheck). In addition, computational reproducibility – getting the same numbers from the same raw data – is not achievable for much of the published literature (one of our papers, new bigger study). That's why I have made it a lab policy to post code and data.

So did that policy work? And – did open code and data help us avoid errors?

I have been using AI agents (Claude Code, especially with Opus 5.5, which is quite good at this) to do pre-submission checks on manuscripts. I've also had some occasions to use it to reproduce published work and provide critique (outside of the peer review process where it is not always allowed by review agreements). Also, increasingly, AI-driven audits are being used adversarially – including a recent high-profile audit in economics. So, I decided, with some trepidation to turn the lens on my own work. 

This is a challenging test, in part because I collaborate broadly and many of the papers I've been involved in are collaborations with folks outside my own lab, often outside of Stanford. Some collaborations are with large consortia. 

I turned Claude loose on all the journal papers I have an authorship role on from the last five years. That covers 79 papers. 59 of these were empirical papers – the rest were commentaries, reviews, methods papers, or stage 1 registered reports without data. Here's the Claude skill I used. I have examined some of these reports in detail, but have not checked most of them. Thus, this is a preliminary report at best, since it relies on complex and stochastic AI analyses. Here is what I found out about transparency, reproducibility, error, and privacy.

Transparency

I was immediately pleased that 58/59 had at least some code and data posted. (The remaining one is a consortium paper with some data rights issues that should share data eventually, modulo complexities.) Only 31/58 could be fully rerun from posted data with posted code (53%), but in all but one of the 27 others, the auditor could rebuild the analysis or could proceed from intermediate files such as model outputs or the results of some upstream machine learning system that had been too computationally expensive to run. In one case (a computational paper), the code was too incomplete to run in full. I was also generally pleased that even though my agents couldn't deal with journal paywalls, they were able to find an open access version of all but two papers. Verdict: pretty good compliance with policy. 

Reproducibility

The next question was whether we could reproduce every number in each paper – full computational reproducibility – to within some set tolerance (10%, following our previous work). Unfortunately, we did not meet this high standard. Most papers were mostly reproducible, but 40/58 papers did have at least one number that could not be produced from the code within this tolerance. This rate reflects a small average probability of a number being wrong (2%), because of the very high average count of numbers in each paper (median of 155, total of more than 10k). The vast majority of these numerical deviations appear minor to me – none change a major claim in the paper. Ten crossed a decision boundary, but this appears to be largely by chance (many of the decision boundaries are in footnotes or appendices, and just about the same number become significant as stop being significant).

This whole pattern is still disappointing for me. The causes of the problems were heterogeneous. Many were apparently typos (60/216), but also a lack of random seeds; some others come from cases where the agents were forced to reconstruct analysis because code was not complete. Full and complete pre-publication reproducibility audits would likely have reduced this number significantly. Verdict: not as good as it should be, disappointing.

Errors

Here is where things get really messy and upsetting. I've been losing some sleep about this since starting the audit. While computational reproducibility was disappointing, it wasn't so bad. However, the bigger problem is that reproducible numbers in papers may not represent the correct computation. Our sharing and archiving of the data make it possible to verify these errors. And there are errors, both big and small. At least one error of some type was identified in more than half of the papers. (I stress that these haven't all been checked, and I don't agree that all of them are true errors, though in many cases it's clear that they are). 
Many of the flagged errors are somewhat minor – though still shameful! Some examples:
  • One coefficient in a secondary analysis was reported backwards so boys were higher on the main measure than girls instead of vice versa (not a claim interpreted anywhere in the paper).
  • A data coding error led to missing socio-educational status being marked as high-SES for many participants, a set of SES by item effects are thus underestimated by about 25%.
Some are medium size, and may require corrections, but don't touch the key claim of a paper. Examples:
  • One task of more than a dozen in a multi-study replication has a stimulus coding issue, so a null effect becomes positive.
  • A bug in a computational simulation for one condition leads to that condition being wrongly interpreted as a hard learning context.
Finally, one is a very substantial issue that undermines a complex, model-driven data analysis. As best we understand it (and we're still working on it), it's a single upstream bug that affects a model training pipeline, invalidating the model but somehow manufacturing a spurious result. I've been in touch with the first author and we are examining the scope of the issue and trying to understand whether a correction or retraction is warranted. Such errors are always possible but they are especially prevalent in tricky computational pipelines. 

I don't have hard numbers on these issues. First, the reports need to be hand-checked, and second, the question of what the impact is – and whether to correct – is a judgment call and I will have to talk to the authors of all of these papers. My provisional cleanup plan is to work down the list, sharing the reports with the authors for comments and discussion on what we should do; I've already contacted several folks. Eventually I expect I will post an errata page for those errors that we don't think require a published correction. 

Audits identified many other issues including questions about exactly how preregistration is used, interpretive slippage on claims, and even a lack of conceptual clarity in some cases. These are real issues and we will look into them in the future, but they are also subjective and tricky to quantify. I hope that AI review can decrease them in the future, but they are probably present throughout the sciences. 

We – at least my lab but likely others as well – need policies to catch and correct errors in complex data analysis and simulation code. In software engineering, there are always bugs in any codebase; we put into place automated tests, QA pipelines, and deployment workflows to catch them before they reach production. Yet we largely don't have this kind of "reliability engineering" in science. I upset that this is true but hopeful that AI can play a part in reducing error in the future through routine pre-submission audits. Verdict: deeply upsetting.

Privacy

One other upsetting thing that our audits turned up was that my collaborators and I had not been as diligent in privacy protection as I had hoped and expected. In several collaborative studies, a team shared identifiers with the data analysts and they made their way into the repository. In several other cases, prolific IDs (which are anonymous but persistent) were pushed. I believe that all of these have been remediated, and in the case of the identifiers, the appropriate data protection office has been notified. Openness is great, and I love the idea of "born open data" – but humans are fallible! We need automated tools checking our repositories to prevent these errors, much the way various bots police repositories to keep passwords and credentials from being committed. Verdict: Not acceptable; policy changes needed.

Conclusions

This was a disturbing exercise. I have tried to set a high standard in my scientific work in both the openness with which we operate and the rigor of the work we do. While the first has worked, the second has fallen short of what I aspire to. 

Maybe I'm searching for comfort, but I don't think my papers are exceptional. Or if they are exceptional, it's only in one way, which is that much of the literature is not open enough for this level of error checking to be applied. The reality is that science is hard – and as studies and analyses get more and more complex, it becomes ever harder to ensure that every detail is correct. Many of the papers reviewed here had hundreds of numerical results and hundreds or thousands of lines of code. 

The field of software has come to terms with the idea that there are always bugs in any system of any significant size. What amount of bugs is acceptable in science?  An easy answer is "none." Maybe that's achievable in the age of AI; it hasn't been for me in the past. 

---
AI disclosure: As I mentioned, all of the research activities I'm reporting here were carried out by Claude Opus 5.5. All the words in the blogpost were written by me, with a round of helpful feedback from the same Claude Code session (in part to check the numbers!).

6 comments:

  1. Very cool. Added to https://github.com/leipzig/awesome-reproducible-research#ad-hoc-reproductions

    ReplyDelete
  2. First off - I have a huge amount of respect for you for sharing this. Second - curious - how many of them do you plan to have corrected (or retracted)?

    ReplyDelete
    Replies
    1. Still working that out. Probably at least 2-3 corrections, perhaps more. Perhaps one retraction, but uncertain yet if it's salvageable.

      Delete
    2. interesting. if you dont mind me asking - how come you're not going to correct all of them?

      Delete
    3. again, i have a huge amount of respect for you to share this and to take the steps to make corrections. sadly i imagine that many people are going to intentionally stop open sourcing data and code going forward to avoid getting audited by llms

      Delete
  3. I'd be curious to hear what you find if you take a small sample of papers and go back over them with Fable 5.2. In my pre-publication reviews I've found that it's catching errors that several rounds of Opus 5.5 or Fable 5.1 didn't catch. Which as got me wondering if there's a bottom to this at all. Without something like provability, how can we know that any of our work is error free?

    ReplyDelete