English

Unsupervised Learning for AC Optimal Power Flow with Fast Physics-Aware Layer

Computational Engineering, Finance, and Science 2026-05-12 v2 Optimization and Control

Abstract

Learning to solve the Alternating Current Optimal Power Flow (AC-OPF) problem by neural networks (NNs) is a promising approach in real-time applications. Existing methods to ensure the physical feasibility of NN outputs embed a power flow (PF) solver within networks. However, the gradient through the PF solver, namely, implicit differentiation, needs manual Jacobian derivation and the solution of linear systems, which is computationally prohibitive and hinders integration with modern automatic differentiation (AD) frameworks. To address these challenges, we propose FPL-OPF, a novel unsupervised learning framework that incorporates a Fast Physics-aware Layer for AC-OPF problems. FPL-OPF embeds a fast PF iterative solver within the NN and takes solely the last few or even the final iterations into the AD graph. This design ensures high computational efficiency for both the forward and backward passes, circumventing complex custom backward implementations. Theoretically, we rigorously prove that the gradient from this design serves as a high-fidelity surrogate of the true implicit gradient under mild conditions. Extensive experiments demonstrate that FPL-OPF achieves significant speedups over state-of-the-art unsupervised learning approaches, while maintaining near-zero constraint violations and competitive optimality. Our code is available at https://github.com/wowotou1998/fpl-opf

Keywords

Cite

@article{arxiv.2604.23548,
  title  = {Unsupervised Learning for AC Optimal Power Flow with Fast Physics-Aware Layer},
  author = {Jiebao Zhang and Haoyu Yan and Zhichao Sheng and Hongwen Yu and Shuang Ye and Haoyu Wang and Ye Shi},
  journal= {arXiv preprint arXiv:2604.23548},
  year   = {2026}
}

Comments

Accepted at ACM e-Energy 2026

R2 v1 2026-07-01T12:35:31.773Z