Metamorphic testing of learned AC-OPF evaluation reveals representation dependence
Abstract
rids with high shares of variable renewables need many fast AC optimal power flow (AC-OPF) solves for uncertainty-aware operation, and learned surrogates are a leading candidate to provide them. Yet these surrogates are usually evaluated using only one grid serialization, i.e., one particular file encoding of the physical problem. We introduce a metamorphic testing protocol based on thirteen problem-preserving transformations of labels, reference conventions, and electrically equivalent graph structure. We audit 17 model and pipeline configurations, including two trained open-weight checkpoints and 15 random-weight architecture or mechanism controls. Every configuration violates at least six of the thirteen tested relations. We trace discrepancies in the grid foundation model \texttt{GridSFM-Open v1.1} to preprocessing and identify one indexing bug and three noncanonical or numerically unstable feature choices. We also test the transformations as data augmentation for four surrogate models on 500-bus scenarios. Transformed scenarios' error (MAE) decreases for three of four models, and median discrepancy and AC constraint violations decrease for all four. No evaluated prediction meets the study's AC-feasibility threshold. These results show why evaluations of learned physical surrogates should test consistency across equivalent representations alongside accuracy, optimality, and feasibility.