Verification by design for AI-generated scientific software: a controlled experiment

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.

Authors

Institutions

Publication Details

Journal
arXiv
Published
2026-12-02
Primary Topic
Scientific Computing and Data Management
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Verification by design for AI-generated scientific software: a controlled experiment

Cristiano Malica
arXiv
Scientific Computing and Data Management
preprint

Verification by design for AI-generated scientific software: a controlled experiment

Cristiano Malica
preprint en

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.

arXiv
University of Bremen (DE)
Scientific Computing and Data Management
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon