Verification by design for AI-generated scientific software: a controlled experiment
Abstract
AI coding agents can now implement complex scientific workflows in hours, shifting the bottleneck from writing code to verifying what it computes. While passing tests and reproducing reference results provide evidence of correctness, establishing rigorous criteria to validate AI-generated code has become an urgent scientific priority. We designed an experiment using the crystal elastic tensor, computed through two distinct formulations (stress and energy derivatives) and independently verified with an external implementation. Under acceptance criteria frozen before any code existed, a provenance-complete first-principles workflow was built across all crystal symmetries. At converged settings, both formulations and the independent code agree within 1% on average. However, agreement provides incomplete evidence of correctness: checks can share numerical errors and differ in their sensitivity to them. Reliability therefore depends on the independence of verification routes, not just on consensus. We derive ten lessons for scientific software generation and propose graded robustness protocols based on independent verification. More broadly, they contribute to establishing a systematic basis for the controlled and reliable generation of AI-assisted scientific software.
Create a lesson
Metadata
- Categories
- cs.SE, cond-mat.mtrl-sci
Related papers
A Controlled Experiment on the Effects of Formal Specifications in Software Quality
Shared title terminologycs.SEMaximiliano Cristiá, Alfredo Capozucca, Federico Stizza
Bridging UVM and Tessent: An Automated Co-Verification Framework for MBIST Designs
Shared title terminologycs.SEDo Ngoc Tiep, Cao Ngoc Thanh Do, Luu Danh Minh et al.
Scaffold, Fill, Verify: An Industrial Experience Report on Agentic Generation of Integration Pipelines
Shared title terminologycs.SELuciano Lucindo Chaves, Renan Novais, Pablo Calvache
Everything but the Software: Stable Retention, Missing Features and the Cost of Consolidation. An Exploratory Case Study and Experiment
Shared title terminologycs.SEJuan Manuel Servera Bondroit, Isabel Cabezas Martin
Quantifying the Risk of Software Attacks Using Formal Verification
Shared title terminologycs.SEFlorian Lanzinger, Frederik Reiche, Felix Dörre et al.
The State of RL4SE: A Task-Oriented Review of Research on Reinforcement Learning for Software Engineering
Shared title terminologycs.SEYujia Fan, Zhengdong Huang, Jieming Zheng et al.