Skip to content

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

Cristiano Malica

cs.SE

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