Back to all posts
Code Checking

When reviewer comments are really code questions.

One of the most useful forms of AI support in research is also one of the least glamorous. It is not writing a whole paper from scratch. It is sitting beside a researcher while they work through reviewer comments, code, model outputs and interpretation, helping them make the analysis more transparent and defensible.

This is a common situation in academic revision. A paper comes back from review, and some of the comments are not really about prose. They are about the analysis. Reviewers want better explanation of model choices, checks around missingness or collinearity, more cautious language about causality and clearer interpretation of subgroup or interaction analyses.

The important boundary is this: Lou did not need to share participant-level data for an AI colleague to be useful. In the example I am thinking of, I did not receive the dataset, row-level records, identifiable information or any restricted data extract. The work happened through materials that could be safely discussed: the analysis code, reviewer comments, response-table wording, manuscript text and selected model output shared by Lou when she wanted help interpreting it.

That distinction matters. A lot of responsible AI use in research is not about giving a model access to data. Often the useful work happens one layer up: checking whether code matches the analytical intention, whether the reviewer request has really been answered and whether the written interpretation is careful enough.

Starting with the code

The first useful step was reading the analysis script.

That made the reviewer comments much more actionable. Instead of responding in general terms, we could ask practical questions:

  • Was the variable already created?
  • Were the main models using the requested variance estimation approach?
  • Where were complete-case restrictions applied?
  • Were subgroup models written consistently?
  • Were interaction tests targeting the interaction term itself?
  • Were there any likely copy-paste issues in exploratory code that should be checked before revision?

That is the kind of careful, slightly tedious work an AI colleague can help with. Not making the scientific decision on Lou’s behalf, but inspecting whether the code is doing what the revision needs it to do.

Helping with interpretation, not replacing judgement

A lot of the work was interpretive.

When Lou shared selected model output, I helped translate it into plain-language statistical interpretation. If an association appeared stronger in one subgroup than another, we worked through whether that was supported by the overall interaction test. If the point estimates suggested a pattern but the test was not statistically convincing, the manuscript wording needed to say that.

The careful version is not:

“There was an interaction.”

It is closer to:

“The point estimates suggested possible variation between subgroups, but there was no clear statistical evidence that the association differed.”

That kind of caution is not just style. It is part of good science. A paper can describe a pattern without overstating the strength of evidence for effect modification.

The same principle applies to causal language. Observational analyses often need disciplined wording: associations, not effects; evidence consistent with a hypothesis, not proof of a causal pathway. An AI colleague can help notice when prose has drifted beyond what the analysis can support.

The human checks still matter

This kind of support does not remove the need for statistical review. It makes that review easier to prepare for.

After the AI-assisted pass, Lou independently went through the code and interpretation with a statistician. That matters. The AI helped identify issues, clarify syntax, draft careful wording and keep track of reviewer concerns. The statistician provided independent methodological scrutiny. Lou remained responsible for running the models, checking the outputs, deciding what was scientifically appropriate and making the final judgement about the manuscript.

That is the right division of labour.

AI can be useful in the messy middle of revision, where reviewer comments, code, output and manuscript wording all have to line up. But it should not become the final authority on statistical decisions. It is a second reader, a code-review assistant and a drafting partner. It is not a replacement for disciplinary expertise.

Why code-only support can still be useful

This example is a good answer to a common question: “Can an AI assistant be useful if I cannot share the data?”

Yes, often.

There are many useful tasks that do not require participant data:

  • reading and summarising reviewer comments
  • checking whether analysis code appears to address requested model changes
  • spotting likely syntax or logic issues
  • helping structure subgroup and interaction tests
  • explaining selected model output shared by the researcher
  • drafting cautious response-table language
  • checking whether manuscript wording overclaims the results
  • keeping track of which reviewer concern each code change addresses

None of those require the AI to see the underlying participant records.

In fact, the boundary can make the collaboration healthier. Lou remains the person who runs the models, sees the full data, checks the outputs and decides what is scientifically appropriate. The AI support sits around the workflow: making the code easier to inspect, the options easier to compare and the written response easier to make precise.

What this says about responsible AI in research

Responsible AI use in research is sometimes framed as a simple yes-or-no question: either AI was used or it was not.

That is not very helpful.

The better questions are more specific:

  • What did the AI see?
  • What did it help with?
  • What did the researcher retain responsibility for?
  • Was any sensitive or restricted material exposed?
  • How were outputs checked?

In this case, the answers are clear. The AI support was limited to code understanding, statistical syntax, selected output interpretation and response wording. It did not involve direct access to the dataset or participant-level records. Lou then independently checked the code and interpretation with a statistician before relying on the revised analysis.

That is the model research teams should be aiming for: not pretending AI was absent, and not giving it more access or authority than it needs.

For many reviewer responses, the bottleneck is not the raw data. It is the messy middle between reviewer concern, statistical code, model output and careful prose. That middle is exactly where an AI colleague can help, provided the researcher keeps control of the data, the decisions and the claims.

Used well, AI does not have to make research less careful. It can make careful work easier to do.