arXiv:2611.08837cs.AINov 2026

Manuscript Offprint

arXiv:2611.08837

Solver-Admitted Metamorphic Testing of Learned Network Optimization Surrogates

Vineet Jagadeesan Nair, Stephen Peng, Arun Ravindran

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

Vineet Jagadeesan Nair*, Stephen Peng*, Arun Ravindran

AI Science Institute, Boston Consulting Group

Abstract—Equivalent encodings of an optimization problem can produce different learned predictions. Interpreting these differences requires accounting for numerical error and multiple optima. We construct metamorphic tests for optimization solver surrogates with explicit eligibility conditions, output alignment, and numerical thresholds. Reference-solver agreement and independent constraint checks determine which sampled pairs enter the audit. We study alternating-current optimal power flow (AC-OPF), the traveling salesman problem (TSP), the capacitated vehicle routing problem (CVRP), and maximum independent set (MIS). Across five grids, GridSFM-Open violates each of 13 relations on at least one grid, and 12 by more than twice the threshold. Randomly initialized copies of the grid models fail nearly the same relations, so the failures do not require training. Source patches and input canonicalization remove selected discrepancies, but no intervention establishes preserved accuracy and feasibility within the declared margin on every grid. In routing, Policy Optimization with Multiple Optima (POMO) has a single-pass rotation/reflection violation rate that rises from 12.7% to 89.5% between 20 and 100 cities. Graph-Based Diffusion Solvers for Combinatorial Optimization (DIFUSCO) violates the MIS disjoint-union relation on 35.6% of draws. Post hoc normalization within connected components removes these violations on the tested graphs. These findings support reporting metamorphic consistency alongside optimality, feasibility, and accuracy, and validating repair quality separately from consistency.

Index Terms—metamorphic testing, test oracle, learned surrogates, optimal power flow, nonconvex optimization, combinatorial optimization, graph neural networks, fault localization

I. INTRODUCTION

Learned optimization surrogates predict approximate solutions or initialize conventional solvers. Grid foundation models predict generator dispatch for alternating-current optimal power flow (AC-OPF), which meets demand at minimum cost under electrical and thermal constraints [1]–[3]. Neural solvers also construct traveling salesman problem (TSP) tours, capacitated vehicle routing problem (CVRP) routes [4], and maximum independent sets (MIS) of nonadjacent vertices [5]. Checking every prediction against a reference solve is expensive, creating a test-oracle problem [6]–[10].

A complementary check asks whether predictions depend on how the same problem is encoded. Renumbering buses, i.e., the grid's connection points, should only renumber predicted settings, while reordering line-table rows should leave them unchanged. Ordinary accuracy and feasibility checks do not directly test this internal consistency. Yet renumbering the standard 14-bus grid (IEEE case14) changes GridSFM-Open's reactive-power prediction by 0.30 per unit (p.u.), or 30 megavolt-amperes reactive (MVar), about 30,000 times our threshold. Per-unit values express quantities relative to their declared bases. Reordering line-table rows changes the prediction by 0.60 p.u. Source patches and a canonical row order remove these discrepancies with frozen weights (Section VII). Both relations also fail within the model's stated range, on grids with at least 500 buses (Fig. 3).

Metamorphic testing specifies how outputs should correspond after an input transformation [11]–[13]. We derive this correspondence from the optimization problem. A pull-back maps transformed predictions to the original coordinates: after renumbering buses, we undo the numbering before comparing generator outputs. Two safeguards make this comparison interpretable. Admission checks transformation eligibility and reference-solver agreement. Calibration checks whether a numerical threshold, or floor, separates noise or round-off from larger discrepancies across the complete process of transforming inputs, predicting, and aligning outputs. Even above that floor, different predictions may be equally correct optima. Propositions 3–4 state when a discrepancy implies solution error. Reference solves thus validate the test pairs, while metamorphic comparisons test consistency and help locate faults. Our contributions are:

We derive problem-preserving relations, including component additions and splits, and state when violations imply solution error.

  • We audit grid, routing, and MIS models using random weights, controls that isolate specific operations, and vendor-code checks.

  • We localize failures and test how interventions affect consistency, accuracy, and feasibility.

Research questions (RQs):

RQ1: Which sampled transformations pass admission, and can calibration of the complete pipeline distinguish round-off from structural discrepancies? (Section V)

RQ2: Which relations do trained grid models violate, compared with random weights and mechanism controls? (Section VI)

RQ3: Which mechanisms explain violations, which interventions remove them, and how do those interventions affect accuracy and feasibility? (Section VII)

RQ4: Which relations detect the identified mechanisms, and what smallest sets cover them? (Section VII-D)

∗^{*}Equal contribution.

RQ5: How do construction, admission, and diagnosis transfer to TSP, CVRP, and MIS? (Section VIII)

References (53)