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

arXiv: https://arxiv.org/abs/2602.17975 · HTML: https://mlsanity.com/paper/2602.17975/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 23 of its 29 references that are in the map.
- First posted on arXiv 20 Feb 2026.

## Builds on (most cited first, 23 of 23)

- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Intriguing properties of neural networks](https://mlsanity.com/paper/1312.6199/) (2013)
- [DC3: A learning method for optimization with hard constraints](https://mlsanity.com/paper/2104.12225/) (2021)
- [Predicting AC Optimal Power Flows: Combining Deep Learning and Lagrangian Dual Methods](https://mlsanity.com/paper/1909.10461/) (2019)
- [The Power Grid Library for Benchmarking AC Optimal Power Flow Algorithms](https://mlsanity.com/paper/1908.02788/) (2019)
- [Physics-Informed Neural Networks for AC Optimal Power Flow](https://mlsanity.com/paper/2110.02672/) (2021)
- [JuMP 1.0: Recent improvements to a modeling language for mathematical optimization](https://mlsanity.com/paper/2206.03866/) (2022)
- [Adversarial Examples in Modern Machine Learning: A Review](https://mlsanity.com/paper/1911.05268/) (2019)
- [PowerModels.jl: An Open-Source Framework for Exploring Power Flow Formulations](https://mlsanity.com/paper/1711.01728/) (2017)
- [CANOS: A Fast and Scalable Neural AC-OPF Solver Robust To N-1 Perturbations](https://mlsanity.com/paper/2403.17660/) (2024)
- [OPFData: Large-scale datasets for AC optimal power flow with topological perturbations](https://mlsanity.com/paper/2406.07234/) (2024)
- [PowerFlowNet: Power Flow Approximation Using Message Passing Graph Neural Networks](https://mlsanity.com/paper/2311.03415/) (2023)
- [OPF-Learn: An Open-Source Framework for Creating Representative AC Optimal Power Flow Datasets](https://mlsanity.com/paper/2111.01228/) (2021)
- [Is Machine Learning in Power Systems Vulnerable?](https://mlsanity.com/paper/1808.08197/) (2018)
- [Accelerating Optimal Power Flow with GPUs: SIMD Abstraction of Nonlinear Programs and Condensed-Space Interior-Point Methods](https://mlsanity.com/paper/2307.16830/) (2023)
- [PFDelta: A Benchmark Dataset for Power Flow under Load, Generation, and Topology Variations](https://mlsanity.com/paper/2510.22048/) (2025)
- [A Comparison of Strategies to Embed Physics-Informed Neural Networks in Nonlinear Model Predictive Control Formulations Solved via Direct Transcription](https://mlsanity.com/paper/2501.06335/) (2025)
- [MathOptAI.jl: Embed trained machine learning predictors into JuMP models](https://mlsanity.com/paper/2507.03159/) (2025)
- [Identifying the Smallest Adversarial Load Perturbation that Renders DC-OPF Infeasible](https://mlsanity.com/paper/2507.07850/) (2025)
- [Nonlinear Optimization with GPU-Accelerated Neural Network Constraints](https://mlsanity.com/paper/2509.22462/) (2025)
- [PowerPlots.jl: An Open Source Power Grid Visualization and Data Analysis Framework for Academic Research](https://mlsanity.com/paper/2510.05063/) (2025)
- [Neural Networks for AC Optimal Power Flow: Improving Worst-Case Guarantees during Training](https://mlsanity.com/paper/2510.23196/) (2025)
- [Maximal Load Shedding Verification for Neural Network Models of AC Line Switching](https://mlsanity.com/paper/2510.23806/) (2025)

## Abstract (arXiv)

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