(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
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
- 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%.
- 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.
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.
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
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!).
Very cool. Added to https://github.com/leipzig/awesome-reproducible-research#ad-hoc-reproductions
ReplyDeleteFirst 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)?
ReplyDeleteStill working that out. Probably at least 2-3 corrections, perhaps more. Perhaps one retraction, but uncertain yet if it's salvageable.
Deleteinteresting. if you dont mind me asking - how come you're not going to correct all of them?
Deleteagain, 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
DeleteI'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