# Learning to Solve the AC-OPF using Sensitivity-Informed Deep Neural Networks

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

## Key facts

- Cited by 26 papers in the map (data through 14 Oct 2026).
- Builds on 24 of its 48 references that are in the map.
- First posted on arXiv 27 Mar 2021.

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

- [Automatic differentiation in machine learning: a survey](https://mlsanity.com/paper/1502.05767/) (2015)
- [OptNet: Differentiable Optimization as a Layer in Neural Networks](https://mlsanity.com/paper/1703.00443/) (2017)
- [Learning to Optimize: Training Deep Neural Networks for Wireless Resource Management](https://mlsanity.com/paper/1705.09412/) (2017)
- [Predicting AC Optimal Power Flows: Combining Deep Learning and Lagrangian Dual Methods](https://mlsanity.com/paper/1909.10461/) (2019)
- [Physics-Informed Neural Networks for Power Systems](https://mlsanity.com/paper/1911.03737/) (2019)
- [Learning Optimal Solutions for Extremely Fast AC Optimal Power Flow](https://mlsanity.com/paper/1910.01213/) (2019)
- [Differentiating Through a Cone Program](https://mlsanity.com/paper/1904.09043/) (2019)
- [Optimal Power Flow Using Graph Neural Networks](https://mlsanity.com/paper/1910.09658/) (2019)
- [DeepOPF: A Feasibility-Optimized Deep Neural Network Approach for AC Optimal Power Flow Problems](https://mlsanity.com/paper/2007.01002/) (2020)
- [Learning to Solve Large-Scale Security-Constrained Unit Commitment Problems](https://mlsanity.com/paper/1902.01697/) (2019)
- [Real-time Power System State Estimation and Forecasting via Deep Neural Networks](https://mlsanity.com/paper/1811.06146/) (2018)
- [DeepOPF: Deep Neural Network for DC Optimal Power Flow](https://mlsanity.com/paper/1905.04479/) (2019)
- [Learning for DC-OPF: Classifying active sets using neural nets](https://mlsanity.com/paper/1902.05607/) (2019)
- [Machine Learning for AC Optimal Power Flow](https://mlsanity.com/paper/1910.08842/) (2019)
- [A Convex Neural Network Solver for DCOPF with Generalization Guarantees](https://mlsanity.com/paper/2009.09109/) (2020)
- [DeepOPF+: A Deep Neural Network Approach for DC Optimal Power Flow for Ensuring Feasibility](https://mlsanity.com/paper/2009.03147/) (2020)
- [Convex Relaxation of Optimal Power Flow, Part II: Exactness](https://mlsanity.com/paper/1405.0814/) (2014)
- [Learning to Solve Network Flow Problems via Neural Decoding](https://mlsanity.com/paper/2002.04091/) (2020)
- [Learning to Optimize Power Distribution Grids using Sensitivity-Informed Deep Neural Networks](https://mlsanity.com/paper/2007.03728/) (2020)
- [PSSE Redux: Convex Relaxation, Decentralized, Robust, and Dynamic Approaches](https://mlsanity.com/paper/1708.03981/) (2017)
- [Learning to Solve AC Optimal Power Flow by Differentiating through Holomorphic Embeddings](https://mlsanity.com/paper/2012.09622/) (2020)
- [Generic Existence of Unique Lagrange Multipliers in AC Optimal Power Flow](https://mlsanity.com/paper/1806.06615/) (2018)
- [Gauss-Newton Unrolled Neural Networks and Data-driven Priors for Regularized PSSE with Robustness](https://mlsanity.com/paper/2003.01667/) (2020)
- [A Meta-Learning Approach to the Optimal Power Flow Problem Under Topology Reconfigurations](https://mlsanity.com/paper/2012.11524/) (2020)

## Built on by (most cited first, 26 of 26)

- [Topology-aware Graph Neural Networks for Learning Feasible and Adaptive ac-OPF Solutions](https://mlsanity.com/paper/2205.10129/) (2022)
- [Physics-Informed Neural Networks for Minimising Worst-Case Violations in DC Optimal Power Flow](https://mlsanity.com/paper/2107.00465/) (2021)
- [Power Flow Balancing with Decentralized Graph Neural Networks](https://mlsanity.com/paper/2111.02169/) (2021)
- [OPF-Learn: An Open-Source Framework for Creating Representative AC Optimal Power Flow Datasets](https://mlsanity.com/paper/2111.01228/) (2021)
- [Closing the Loop: A Framework for Trustworthy Machine Learning in Power Systems](https://mlsanity.com/paper/2203.07505/) (2022)
- [DNN-based Policies for Stochastic AC OPF](https://mlsanity.com/paper/2112.02441/) (2021)
- [PFDelta: A Benchmark Dataset for Power Flow under Load, Generation, and Topology Variations](https://mlsanity.com/paper/2510.22048/) (2025)
- [Controlling Smart Inverters using Proxies: A Chance-Constrained DNN-based Approach](https://mlsanity.com/paper/2105.00429/) (2021)
- [Learning to Solve the AC Optimal Power Flow via a Lagrangian Approach](https://mlsanity.com/paper/2110.01653/) (2021)
- [QCQP-Net: Reliably Learning Feasible Alternating Current Optimal Power Flow Solutions Under Constraints](https://mlsanity.com/paper/2401.06820/) (2024)
- [Minimizing Worst-Case Violations of Neural Networks](https://mlsanity.com/paper/2212.10930/) (2022)
- [Optimal Power Flow Based on Physical-Model-Integrated Neural Network with Worth-Learning Data Generation](https://mlsanity.com/paper/2301.03766/) (2023)
- [Data-Driven Stochastic AC-OPF using Gaussian Processes](https://mlsanity.com/paper/2207.10781/) (2022)
- [Physics-Guided Graph Neural Networks for Real-time AC/DC Power Flow Analysis](https://mlsanity.com/paper/2305.00216/) (2023)
- [Machine Learning for Scalable and Optimal Load Shedding Under Power System Contingency](https://mlsanity.com/paper/2405.05521/) (2024)
- [Optimization Proxies using Limited Labeled Data and Training Time -- A Semi-Supervised Bayesian Neural Network Approach](https://mlsanity.com/paper/2410.03085/) (2024)
- [Constrained Diffusion Models for Synthesizing Representative Power Flow Datasets](https://mlsanity.com/paper/2506.11281/) (2025)
- [DiffOPF: Diffusion Solver for Optimal Power Flow](https://mlsanity.com/paper/2510.14075/) (2025)
- [Data-Driven Chance Constrained AC-OPF using Hybrid Sparse Gaussian Processes](https://mlsanity.com/paper/2208.14814/) (2022)
- [An Efficient Learning-Based Solver for Two-Stage DC Optimal Power Flow with Feasibility Guarantees](https://mlsanity.com/paper/2304.01409/) (2023)
- [Beyond the Neural Fog: Interpretable Learning for AC Optimal Power Flow](https://mlsanity.com/paper/2408.05228/) (2024)
- [Enriching Neural Network Training Dataset to Improve Worst-Case Performance Guarantees](https://mlsanity.com/paper/2303.13228/) (2023)
- [Operational risk quantification of power grids using graph neural network surrogates of the DC OPF](https://mlsanity.com/paper/2311.03661/) (2023)
- [A Data-Driven Real-Time Optimal Power Flow Algorithm Using Local Feedback](https://mlsanity.com/paper/2502.15306/) (2025)
- [Homotopy-Guided Self-Supervised Learning of Parametric Solutions for AC Optimal Power Flow](https://mlsanity.com/paper/2511.11677/) (2025)
- [AC Power Flow Contingency Analysis Using a Single Deep Neural Network](https://mlsanity.com/paper/2609.30859/) (2026)

## Abstract (arXiv)

To shift the computational burden from real-time to offline in delay-critical power systems applications, recent works entertain the idea of using a deep neural network (DNN) to predict the solutions of the AC optimal power flow (AC-OPF) once presented load demands. As network topologies may change, training this DNN in a sample-efficient manner becomes a necessity. To improve data efficiency, this work utilizes the fact OPF data are not simple training labels, but constitute the solutions of a parametric optimization problem. We thus advocate training a sensitivity-informed DNN (SI-DNN) to match not only the OPF optimizers, but also their partial derivatives with respect to the OPF parameters (loads). It is shown that the required Jacobian matrices do exist under mild conditions, and can be readily computed from the related primal/dual solutions. The proposed SI-DNN is compatible with a broad range of OPF solvers, including a non-convex quadratically constrained quadratic program (QCQP), its semidefinite program (SDP) relaxation, and MATPOWER; while SI-DNN can be seamlessly integrated in other learning-to-OPF schemes. Numerical tests on three benchmark power systems corroborate the advanced generalization and constraint satisfaction capabilities for the OPF solutions predicted by an SI-DNN over a conventionally trained DNN, especially in low-data setups.
