cs.LGFeb 20, 2026

Generating adversarial inputs for a graph neural network model of AC power flow

Authors: Robert Parker

Organizations: Los Alamos National Laboratory, Los Alamos, NM, USA

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.7 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.

Explore similar work

May 4, 2026cs.LG

LUMINA: A Grid Foundation Model for Benchmarking AC Optimal Power Flow Surrogate Learning

AC optimal power flow (ACOPF) is foundational yet computationally expensive in power grid operations, driving learning-based surrogates for large-scale grid analysis. These surrogates, however, often fail to generalize across network topologies, a critical gap for deployment on grids not seen during training and for routine operational what-if studies. We introduce LUMINA-Bench, a comprehensive benchmark suite for ACOPF surrogate learning covering multi-topology pretraining, transfer, and adaptation. The benchmark evaluates homogeneous and heterogeneous architectures under single- and multi-topology learning settings using unified metrics that capture both predictive accuracy and physics-informed constraint violations. We additionally compare constraint-aware training objectives, including MSE, augmented Lagrangian, and violation-based Lagrangian losses, to characterize accuracy-robustness trade-offs across settings. Data processing, training, and evaluation frameworks are open-sourced as the LUMINA suite to support reproducibility and accelerate future research on feasibility-aware OPF surrogates.
Hongwei Jin, Keunju Song, Zeeshan Memon +5
Jul 10, 2026cs.LG

Power Flow Feasibility Assessment Using Variational Graph Autoencoders

Data-driven methods, including graph neural networks, have been studied for accelerating power flow calculations in recent years, but very little attention has been paid to the solution feasibility, which can be obtained by traditional solvers. This paper presents a Variational Graph Autoencoder (VGAE) that detects the power flow solution feasibility, using the IEEE 118-bus case, to assess the validity of the solutions provided by AI-driven solvers.
Ferran Bohigas-Daranas, Hamid Latif-Martinez, Eduardo Prieto-Araujo +2
Jul 14, 2026eess.SY

Gradient-Free Topology Adaptation for Power Flow Surrogates via In-Context Whitening

Machine-learned surrogates for the AC power flow (ACPF) problem amortize the cost of repeated solves on a fixed network, but lose one to two orders of magnitude of accuracy when a line outage changes the topology. This degradation is an operator shift. The altered admittance matrix changes the input-to-output map, so identical inputs yield a different output distribution. Existing methods correct this with target-topology data and per-topology gradient steps. We ask whether the correction can instead be made statistical and gradient-free. We propose In-Context Whitening (ICW), which trains an ACPF surrogate in an output space whitened by the base topology's first two moments, and adapts it to an unseen N-1 or N-2 topology by re-estimating that whitening from a few hundred solved cases on the new topology. This adaptation is gradient-free, weight-free, and architecture-agnostic. We prove that among affine whiteners the unique choice that preserves the coordinate-wise semantics of the physical output vector is ZCA whitening, so within efficient invertible corrections, two moments are sufficient. Across the IEEE 30-, 118-, and 300-bus systems under N-1 and N-2 contingencies, ICW reduces overall error by 6×\times to 28×\times over frozen surrogates (up to 54×\times per-quantity under N-2) and cuts worst-bus power-balance mismatch by up to 30×\times, with consistent gains across three backbones. At deployment scale it matches or beats gradient-based adaptation in accuracy while adapting 21×\times to 34×\times faster, with a cost that parallelizes on commodity CPU cores rather than requiring one GPU per contingency.
Ayushi Jolotia, Parikshit Pareek