arXiv:2610.34573cs.SEOct 2026

Manuscript Offprint

arXiv:2610.34573

Software Engineering for AI-Driven Science

Lukas Twist, Xinjian Wu, Jingzhi Gong, Shuyin Ouyang, Ying Xiao, Benedetta Donato, Yaoqi Guo, Zhenpeng Chen, Leonardo Mariani, Helen Yannakoudakis, Jie M. Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Lukas Twist*, Xinjian Wu*, Jingzhi Gong*, Shuyin Ouyang*, Ying Xiao*, Benedetta Donato†, Yaoqi Guo†, Zhenpeng Chen§, Leonardo Mariani†, Helen Yannakoudakis*, Jie M. Zhang*

*King's College London, UK †Nanyang Technological University, Singapore ‡University of Milano-Bicocca, Italy §Tsinghua University, China

Abstract—AI has made significant contributions to scientific discovery. Autonomous agents can now independently analyse complex problems, design experiments, write and execute code, analyse findings, and derive scientific conclusions. Nevertheless, errors in AI-generated code, experimental procedures, or evidence interpretation can lead to invalid research conclusions, undermining the reliability and reproducibility of automated scientific discovery. In this vision paper, we propose Software Engineering for AI-Driven Science (SE4AI4Sci) as an emerging research area for addressing this challenge. As an organising framework, we introduce the Scientific Assurance Chain, connecting intent, experimental design, implementation, execution, evidence, and claim. Through six documented failures in recent AI-for-science systems, we show where this chain can break, where existing assurance mechanisms fall short, and what new research challenges follow. We also outline a research agenda for adapting and extending software engineering techniques across the chain.

I. INTRODUCTION

AI has already made significant contributions to science [1], but autonomous agents are beginning to change not only the tools scientists use, but the way science itself is conducted. Recent agentic systems can generate hypotheses, search the literature, write and execute experimental code, analyse results, and produce scientific reports with limited human intervention. The AI Scientist demonstrates an end-to-end pipeline from research ideation to paper writing [2], while systems such as Robin connect automated hypothesis generation and data analysis to experimental biology [3]. In many of these systems, code is the mechanism through which scientific decisions become actions: agents use it to manipulate data, invoke tools, run experiments, and analyse results.

AI-driven science therefore changes the role of software. Rather than only implementing a scientific procedure defined by a human, autonomous agents can help choose methods, generate hypotheses, modify workflows, and interpret the evidence they produce [4]. Scientific AI agents are consequently not only AI systems but software systems in their own right: their decisions are realised in code and workflows that can be specified, tested, monitored, and traced. As they participate in more of the scientific process, assurance must also cover the scientific decisions made through that software.

Early results show why this matters. AutoMat [5] shows that coding agents can reproduce plausible numerical results despite methodological deviations from the intended scientific procedure, while other work has already begun to introduce explicit safeguards for autonomous scientific agents [6]. These are not simply failures of scientific reasoning. They expose problems of requirements engineering, software testing, runtime assurance, provenance, and traceability that are familiar to software engineering, but arise in a new setting where autonomous software can itself change the scientific process.

The vital intersection of software engineering and AI-driven science is also reflected in Terminal-Bench [7], [8] and Terminal-Bench-Science [9]. They are widely prioritised by frontier LLM labs [10], [11], [12], [13], [14] and tracked by major evaluation platforms like Artificial Analysis [15].

The underlying problem is straightforward: errors in AI-generated code, experimental procedures, or evidence interpretation can lead to invalid research conclusions. Moreover, the stakes extend beyond any one workflow. Scientific results become evidence in papers, inputs to later models and experiments, and sometimes the basis for decisions in medicine, engineering, policy, and practice. A silent error can therefore propagate well beyond the workflow in which it first occurred.

Software engineering provides established techniques for addressing this problem, including requirements and specification [16], [17], testing and verification [18], static program analysis [19], [20], fault localisation and automated program repair (APR) [21], [22]. These techniques provide strong foundations for scientific reliability, but cannot simply be applied unchanged. The central challenge lies in adapting and extending software engineering techniques to cover the adaptive, self-directed AI-driven discovery process.

In this vision paper, we propose Software Engineering for AI-Driven Science (SE4AI4Sci) as a new research area for the software engineering community. Our vision is:

AI-driven science creates a new software-engineering problem: AI agents now write and execute code to conduct scientific investigations. Software engineering techniques can be adopted to support rigorous and reliable scientific discovery through verifiable workflows.

In particular:

  1. We introduce the Scientific Assurance Chain—spanning intent, experimental design, implementation, execution, evidence, and claim—as a principled framework for identifying assurance requirements and transition obligations, and mapping them to software-engineering techniques (Fig. 1).

  2. We ground the proposed research area in six documented failures across the chain, showing where existing assurance mechanisms can fall short and deriving stage-specific research challenges.

  3. We present a research agenda for adapting and extending software-engineering techniques to preserve scientific in-

Scientific Assurance Chain

Revalidated implementation

Figure

Fig. 1. The Scientific Assurance Chain and supporting software-engineering mechanisms.

tent and method constraints, test unknown answers, assure autonomous decisions, trace evidence to claims, and evaluate progress across the chain.

Existing Foundations: The SE community has long studied scientific software, including development practices and evolving requirements [23], testing challenges such as the oracle problem [24], and metamorphic testing [18]. Recent work applies metamorphic and differential testing to bioinformatics tools [25] and uses model checking and domain expertise to refine metamorphic relations for scientific software [26]. The Software Engineering for Science (SE4Science) workshop series provides a dedicated forum for this work [27]. SE4AI4Sci builds on these foundations, and offers more opportunities for software engineering to contribute to science discovery.

References (39)