Skip to main content
QUICK REVIEW

[Paper Review] Generating adversarial inputs for a graph neural network model of AC power flow

Robert Parker|arXiv (Cornell University)|Feb 20, 2026
Model Reduction and Neural NetworksPhysics and Astronomy0 citations
TL;DR

The paper formulates optimization problems to generate inputs that cause large prediction errors between a CANOS-PF graph neural network surrogate and true AC power flow solutions, demonstrating feasible adversarial points on a 14-bus grid. It analyzes maximum and constrained errors and discusses implications for robustness and verification of NN-based AC power flow surrogates.

ABSTRACT

This work formulates and solves optimization problems to generate input points that yield high errors between a neural network's predicted AC power flow solution and solutions to the AC power flow equations. We demonstrate this capability on an instance of the CANOS-PF graph neural network model, as implemented by the PF$Δ$ benchmark library, operating on a 14-bus test grid. Generated adversarial points yield errors as large as 3.4 per-unit in reactive power and 0.08 per-unit in voltage magnitude. When minimizing the perturbation from a training point necessary to satisfy adversarial constraints, we find that the constraints can be met with as little as an 0.04 per-unit perturbation in voltage magnitude on a single bus. This work motivates the development of rigorous verification and robust training methods for neural network surrogate models of AC power flow.

Motivation & Objective

  • Motivate robustness concerns for neural network surrogates of AC power flow in safety-critical grid operations.
  • Formulate optimization problems to identify inputs that maximize or constrain the NN-ACPF output discrepancy.
  • Demonstrate tractability and existence of adversarial points for a state-of-the-art GNN model on a IEEE 14-bus system.
  • Quantify perturbations needed to satisfy adversarial constraints and identify vulnerable output coordinates (voltage magnitudes, reactive powers).

Proposed method

  • Formulate two optimization problems: a maximum-error problem comparing NN and ACPF outputs, and a constrained-error problem seeking minimal input perturbations that enforce output constraints.
  • Represent inputs x as active power injections and voltage magnitudes at PV buses with bounds L and U.
  • Use CANOS-PF graph neural network with 128 hidden units, 15 message passing steps, trained on PFΔ Task-1.1 data, and solve via JuMP with IPOPT.
  • Couple neural network constraints and AC power flow constraints through a gray-box formulation interfacing PyTorch and PowerModels.jl.
  • Evaluate both maximization/minimization of errors and constrained perturbations on IEEE 14-bus test case, using a 0.04 per-unit margin for voltage constraints.
Figure 1: Maximum absolute error obtained for each bus. Left: PQ buses. Right: PV and reference buses. In each case, the opposite set of buses is shaded gray. Generated using PowerPlots [ 24 ] .
Figure 1: Maximum absolute error obtained for each bus. Left: PQ buses. Right: PV and reference buses. In each case, the opposite set of buses is shaded gray. Generated using PowerPlots [ 24 ] .

Experimental results

Research questions

  • RQ1Can we find input points where NN predictions diverge significantly from true AC power flow solutions?
  • RQ2What is the smallest perturbation required to enforce adversarial constraints between NN outputs and ACPF outputs?
  • RQ3Which outputs (voltage magnitudes, reactive powers) are most susceptible to adversarial perturbations in a CANOS-PF surrogate?
  • RQ4How tractable is solving these adversarial optimization problems for a large neural surrogate within standard optimization frameworks?

Key findings

  • Adversarial points with large NN-ACPF discrepancies exist for the 14-bus CANOS-PF model, with reactive power and voltage magnitude errors reaching notable levels.
  • Maximizing the NN vs. ACPF error yields larger voltage-magnitude errors than minimizing, indicating NN difficulty near low-voltage solutions.
  • Constrained-adversarial results show 65 of 90 feasible perturbations converge, with voltage magnitude constraints typically around 0.90–0.96 per unit.
  • Small perturbations (as little as 0.04 per unit) can satisfy adversarial constraints on a single bus, sometimes perturbing only two input variables.
  • Many adversarial perturbations involve pushing PV bus voltages toward their lower bound (0.94 p.u.), suggesting training data should include near-boundary outputs for robustness.
Figure 2: Errors achieved by Problem 1 with maximization and minimization objective senses. Maximized error is omitted for bus 3 because the optimization algorithm failed to converge for this case.
Figure 2: Errors achieved by Problem 1 with maximization and minimization objective senses. Maximized error is omitted for bus 3 because the optimization algorithm failed to converge for this case.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.