On the Choice of Loss Function in Learning-based Optimal Power Flow
Ge Chen, Junjie Qin
TL;DR
The paper addresses real-time AC OPF surrogates by comparing two learning-loss strategies: traditional MSE and a cost-aligned decision loss. It introduces a physics-informed surrogate with a structured output and a Lagrangian duality-based training regime to enforce feasibility, mitigating issues from discontinuities in the load-to-solution mapping. Empirical results on the IEEE 39-bus system show that decision loss yields lower OPF regret and substantially faster solutions than IPM, with improved constraint compliance when combined with the proposed network design and training. The work provides a practical path toward reliable, fast OPF surrogates for dynamic power systems with high renewable penetration.
Abstract
We analyze and contrast two ways to train machine learning models for solving AC optimal power flow (OPF) problems, distinguished with the loss functions used. The first trains a mapping from the loads to the optimal dispatch decisions, utilizing mean square error (MSE) between predicted and optimal dispatch decisions as the loss function. The other intends to learn the same mapping, but directly uses the OPF cost of the predicted decisions, referred to as decision loss, as the loss function. In addition to better aligning with the OPF cost which results in reduced suboptimality, the use of decision loss can circumvent feasibility issues that arise with MSE when the underlying mapping from loads to optimal dispatch is discontinuous. Since decision loss does not capture the OPF constraints, we further develop a neural network with a specific structure and introduce a modified training algorithm incorporating Lagrangian duality to improve feasibility.} This result in an improved performance measured by feasibility and suboptimality as demonstrated with an IEEE 39-bus case study.
