arXiv:2608.14527cs.DCAug 2026

Manuscript Offprint

arXiv:2608.14527

Validating LLM-Modernized Scientific Software Through Differential Fault Injection

Evan Coleman, Yuzhong Shen, Masha Sosonkina, Peng Xu

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

Abstract

Large language model (LLM) coding agents are increasingly being used to modernize the legacy Fortran that underlies production scientific software. Validation of these transformations generally emphasizes nominal executions, however, and therefore may not determine whether a modernized implementation preserves the response of the original code to faults, numerical perturbations, and reduced precision. We present differential fault injection as a validation method for LLM-modernized scientific software. The proposed harness instruments the shared self-consistent-field (SCF) driver of gamess at twelve sites and applies identical, deterministic faults to the original and modernized implementations. This placement isolates the converted integral kernels while avoiding differences in injection location or timing.

Across more than 2,200 runs, the campaigns characterize transient, persistent, parallel, and precision-related perturbations. For transient faults, the measured absorption costs are consistent with a contraction-based model evaluated at two contraction rates: predicted slopes of 0.74 and 1.49 additional iterations per bit correspond to measured slopes of 0.82 and 1.50. Persistent Fock perturbations produce an approximately factor-of-two reduction in final-energy error per additional bit and place the tested silent-data-corruption transition near 2−222^{-22}. Additional campaigns identify phase-dependent parallel deadlocks, convergence to alternate SCF solutions following large orbital perturbations, and false convergence under reduced Fock precision. The parallel experiments also evaluate a one-line synchronization change suggested by an existing developer comment; within the tested campaign, the change eliminates the observed deadlock channel while preserving outcomes outside its intended scope.

For the primary differential experiment, the original and modernized kernels produce identical outcome classifications, iteration counts, injection counts, and final energies for 200 paired injections. After composing the synchronization change with the modernization and matching the harness and compilation configurations, the resulting implementation also matches the hardened original in all 40 paired runs. These results support differential fault injection as a practical method for evaluating off-nominal fidelity and targeted resilience improvements in AI-assisted scientific-software modernization.

Index Terms:

fault injection, silent data corruption, LLM code generation, trustworthiness, scientific software, SCF, GAMESS, resilience