Unsupervised Learning for AC Optimal Power Flow with Fast Physics-Aware Layer
Jiebao Zhang † , Haoyu Yan † , Haoyu Wang, Ye Shi ∗, Zhichao Sheng, Hongwen Yu, Shuang Ye, Zhifang Yang · 2026
Read Unsupervised Learning for AC Optimal Power Flow with Fast Physics-Aware Layer by Jiebao Zhang † , Haoyu Yan † , Haoyu Wang, Ye Shi ∗, Zhichao Sheng, Hongwen Yu, Shuang Ye, Zhifang Yang (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-23548.txt.
Introduction
Zhang and six colleagues speed up neural-network solutions to AC optimal power flow, the grid problem of choosing generation at lowest cost under physical laws. Their framework embeds a fast power-flow solver inside the network but feeds only its last iterations into automatic differentiation, dodging costly custom gradients. They prove the resulting gradient closely tracks the true implicit gradient, and tests show large speedups with near-zero constraint violations.
Catalog record
| CREATOR | Jiebao Zhang † , Haoyu Yan † , Haoyu Wang, Ye Shi ∗, Zhichao Sheng, Hongwen Yu, Shuang Ye, Zhifang Yang |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 82233 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2604.23548
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Unsupervised Learning for AC Optimal Power Flow with Fast Physics-Aware Layer Thanks: † \dagger The two authors contribute equally to this work Thanks: *Corresponding author CCS: Computing methodologies Neural networks Jiebao Zhang † , Haoyu Yan † , Haoyu Wang, Ye Shi ∗, Zhichao Sheng, Hongwen Yu, Shuang Ye, Zhifang Yang 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 1. Introduction Table 1 . Comparison of learning-based AC-OPF methods with feasibility enforcement . Method Constraint Satisfaction Backward Complexity Implementation Effort Training Efficiency Inference Speed Supervised NN ( Fioretto et al. 2020a ; Huang et al. 2022 ; Pan et al. 2023 ) Limited (data-dependent) No Backward Low High High Penalty-based losses ( Huang and Chen 2021 ; Huang et al. 2024 ; Chen et al. 2022 ; Owerko et al. 2024 ; Yang et al. 2024 ) Soft (violation possible) No Backward Low High High Post-processing methods ( Pan et al. 2019 ; Pan et al. 2021 ; Zamzam and Baker 2020 ; Huang et al. 2022 ) Moderate (post-projection) No Backward Moderate Moderate Moderate DC3 ( Donti et al. 2021 ) , DeepLDE ( Kim and Kim 2025 ) , ( Chen et al. 2025 ) Strong (exact PF embedding) High (large Jacobian system) High (custom backward) Low Moderate FRMNet ( Han et al. 2024 ) Strong (feasibility restoration) High (large Jacobian system) High (custom backward) Moderate Moderate OptNet Embedded ( Jia et al. 2024 ) Strong (lifted constraints) High (large Jacobian system) High (custom backward) Low Moderate QCQP-Net ( Zeng et al. 2024 ) Strong (relaxed PF equations) High (large Jacobian system) High (custom backward) Low Moderate FPL-OPF (ours) Strong (fixed-point layer) Low (ID approximation) Low (no custom backward) High High The Alternating Current Optimal Power Flow (AC-OPF) problem is a cornerstone of modern power system operations, tasked with determining the most economic and secure generator dispatch. The AC-OPF problem is inherently non-convex and NP-hard, making global optimization extremely challenging ( Shi et al. 2017 ; Shi et al. 2018 ) . With the increasing penetration of variable renewable energy sources and the growing complexity of the grid, it becomes critically important to solve the non-convex, non-linear AC-OPF problem in real-time. Traditional numerical solvers, while accurate, often struggle to meet the severe time requirements of real-time market operations, which can be as frequent as every five minutes ( Diehl 2019 ) . This computational bottleneck motivates the development of faster and more efficient methods. To this end, the learning-based paradigm has emerged as a promising alternative, leveraging deep learning to approximate AC-OPF solutions ( Huang et al. 2022 ; Pan et al. 2023 ; Zhou et al. 2023 ) . Supervised learning approaches, which train neural networks (NNs) on large datasets of pre-solved AC-OPF instances, have demonstrated the ability to produce solutions rapidly ( Fioretto et al. 2020a ; Huang et al. 2022 ; Pan et al. 2023 ; Singh et al. 2021 ) . However, their performance is fundamentally limited by the quality and diversity of the training data, which is computationally expensive to generate and may contain sub-optimal solutions due to the problem’s non-convexity. Unsupervised learning methods circumvent this data-dependency by directly incorporating the physics of the optimization problem, i.e., the objective and constraints, into the loss function. A fundamental challenge remains in guaranteeing that the NN outputs strictly satisfy the physical and operational constraints of the power grid. Existing approaches address this feasibility issue with some limitations. Penalty-based approaches ( Huang and Chen 2021 ; Huang et al. 2024 ; Chen et al. 2022 ; Owerko et al. 2024 ; Yang et al. 2024 ) integrate constraint violations as soft penalties within the loss function. While straightforward, they inherently fail to guarantee strict feasibility and are highly sensitive to hyperparameter tuning ( Huang et al. 2024 ) . Post-processing methods ( Pan et al. 2019 ; Pan et al. 2021 ; Zamzam and Baker 2020 ; Huang et al. 2022 ) attempt to project infeasible predictions onto the feasible regions. However, for the non-convex AC-OPF, this projection may introduce significant computational overhead and is detached from the end-to-end training pipeline, limiting the model’s ability to learn physics-aware outputs. More recently, implicit differentiation layers ( Donti et al. 2021 ; Chen et al. 2025 ; Kim and Kim 2025 ; Jia et al. 2024 ; Han et al. 2024 ; Zeng et al. 2024 ) have been proposed to enforce strict physical constraints by embedding power flow (PF) solvers directly into the network. However, these implicit layer-based approaches, while powerful, face some significant practical limitations. Even though specialized PF solvers are efficient in the forward process, e.g., fast decoupled power flow (FDPF) ( Stott and Alsac 1974 ; Chen et al. 2022 ; Chen et al. 2025 ) , the exact implicit gradient is computationally burdensome, as it necessitates solving a large-scale linear system involving the constraint Jacobian at every backward pass ( Chen et al. 2025 ) . Second, the implementation is often complex and error-prone, requiring hand-crafted derivations of the Jacobian matrix. This manual process runs contrary to the streamlined workflow of modern automatic differentiation (AD) frameworks, hindering development and broader adoption. Fortunately, recent advances in implicit differentiation have shown that approximations can effectively guide network training. Methods such as truncated backpropagation ( Shaban et al. 2019 ) , Jacobian-Free ( Fung et al. 2022 ) , phantom gradients ( Geng et al. 2022 ) , and one-step differentiation ( Bolte et al. 2023 ) offer high-fidelity gradients at a fraction of the computational cost and integrate seamlessly into standard AD pipelines, presenting a compelling path forward. Contributions. These challenges motivate our proposal of FPL-OPF, a novel unsupervised learning framework that incorporates a Fast Physics-aware Layer for fast solving AC-OPF problems. Our framework is architected around two core design components. For the forward pass, we model the PF balance as a fixed-point problem and embed an efficient FDPF solver as an implicit layer. Unlike standard Newton-Raphson (NR) methods with \mathcal{O}(n^{3}) complexity per iteration, the FDPF solver achieves a more favorable \mathcal{O}(n^{2}) complexity, where n denotes the number of buses in the power grid.