TL;DR
Neural network surrogates for complex optimization problems often produce wildly different predictions for identical problems just by changing how the input is encoded (e.g., renumbering nodes). This paper introduces a "solver-admitted" metamorphic testing framework that uses traditional solvers to validate test cases, revealing that current state-of-the-art models for power grids and routing suffer from deep structural inconsistencies that standard accuracy metrics fail to detect.
What Problem Does This Paper Address?
In fields like power systems and logistics, we are increasingly replacing slow, traditional optimization solvers with fast "learned surrogates"—neural networks trained to predict optimal solutions. However, these models often lack equivariance: if you reorder the rows in a data table or rotate a map of cities, the model's prediction should change in a predictable, corresponding way. If it doesn't, the model is essentially "hallucinating" based on arbitrary encoding choices rather than the underlying physics or logic of the problem.
The challenge is that optimization problems often have multiple optima or numerical noise, making it hard to tell if a difference in prediction is a "bug" or just a valid alternative. This paper provides a rigorous way to audit these models for internal consistency while accounting for these nuances.
Methods
The authors propose a three-stage metamorphic testing pipeline:
- Transformation & Eligibility: Apply a problem-preserving transformation $T$ to an input $d$ (e.g., relabeling buses in a power grid).
- Admission by Re-Solving: To ensure the test is fair, a traditional "reference" solver (like IPOPT for power flow or Concorde for TSP) solves both the original and transformed problems. The test only proceeds if the solver confirms the problems are truly equivalent (e.g., they have the same optimal cost).
- Verdict with Numerical Floors: The model's predictions for both inputs are compared. To distinguish between harmless floating-point round-off and actual structural failures, the authors calibrate "numerical floors" by comparing results across different precisions (float32 vs. float64).
The authors categorized relations into "Tiers," ranging from simple relabeling (Tier A) to structural changes like splitting a load into two smaller ones (Tier B).
Datasets
The study audits several high-profile neural solvers across four domains:
- AC Optimal Power Flow (AC-OPF): Tested on standard IEEE grids (case14, case118) and larger benchmarks from the PGLib-OPF library (up to 4661 buses). Models included GridSFM-Open, LUMINA-2M, and GENCO.
- Traveling Salesman Problem (TSP): Euclidean instances with 20 to 100 cities.
- Capacitated Vehicle Routing (CVRP): 100-customer instances.
- Maximum Independent Set (MIS): Graphs from the SATLIB library.
Key Insights and Ideas
- Architecture is the Culprit: Surprisingly, randomly initialized models failed metamorphic tests almost as often as trained ones. This suggests that the inconsistencies are baked into the model architectures and input features (like using raw bus indices or fixed row orders) rather than being a byproduct of the training process.
- Consistency $\neq$ Quality: The authors found that "fixing" a model to be consistent—for example, by sorting input rows into a canonical order—doesn't automatically make it better. In some cases, enforcing consistency actually degraded the model's accuracy or its ability to find feasible solutions.
- The "Floor" Matters: Without calibrated numerical floors, researchers might over-report failures due to simple 32-bit arithmetic noise. The authors' precision calibration (shown in Figure 2) provides a principled way to separate "round-off" from "structural" discrepancies.
- Scale Sensitivity: In routing models (like POMO), the rate of failures on rotation/reflection tests skyrocketed as the number of cities increased, reaching nearly 90% for 100-city problems.
Key Results
- Widespread Failures: The GridSFM-Open model violated all 13 tested metamorphic relations on at least one grid. Many violations were massive—up to 30,000 times the numerical threshold.
- Failure Heatmap: Figure 3 illustrates the prevalence of failures across different grid models and sizes. Even "foundation models" like LUMINA failed 9 out of 13 relations.
- Routing Inconsistency: For TSP, the POMO model showed a rotation/reflection violation rate that rose from 12.7% at 20 cities to 89.5% at 100 cities, despite having small mean optimality gaps.
- MIS Normalization: The DIFUSCO model for MIS failed "disjoint-union" tests (where two separate graphs are solved together) in 35.6% of cases because its internal normalization logic leaked information across disconnected components.
Limitations and Future Work
- Reference Solver Dependency: The "admission" step requires a traditional solver, which can be computationally expensive and may not always find the global optimum for non-convex problems.
- Post-hoc Repairs: The interventions tested (like canonicalization and patching) were developed after the models were trained. The authors note that future work should investigate whether training from scratch with these "repaired" features can preserve both consistency and solution quality.
- Non-Unique Optima: While the authors attempted to account for multiple optima using multi-start solvers and convex relaxations, certifying the full set of global optima for non-convex problems remains an open challenge.
Summary updated