Differentiable Optimization for Deep Learning-Enhanced DC Approximation of AC Optimal Power Flow

Andrew W. Rosemberg, Michael Klamkin, Pascal Van Hentenryck

TL;DR

This paper introduces DC2AC, a novel deep learning framework that enhances the simplified DC Optimal Power Flow (DC-OPF) model to better approximate the more complex AC Optimal Power Flow (AC-OPF). By leveraging differentiable optimization, DC2AC learns to adjust DC-OPF parameters, significantly improving the accuracy of power grid optimization solutions.

What Problem Does This Paper Address?

The efficient operation of power grids relies heavily on Optimal Power Flow (OPF) calculations. However, the full AC-OPF problem is computationally expensive due to its non-linear and non-convex nature. To make these calculations tractable, a simplified DC-OPF model is often used. While faster, this simplification leads to suboptimal and inefficient decisions, which can be costly and detrimental, especially with the increasing integration of renewable energy sources and growing grid complexity. This paper aims to bridge the accuracy gap between DC-OPF and AC-OPF without sacrificing computational efficiency.

Methods

The core innovation of this work is the DC2AC framework, which combines deep learning with differentiable optimization. Instead of directly predicting AC-OPF solutions (a common "proxy model" approach), DC2AC trains a neural network to predict adjusted parameters for the DC-OPF model: specifically, nodal shunt conductances and branch susceptances. These adjusted parameters allow the DC-OPF to better capture the non-linear power flow behavior that is neglected in the standard DC-OPF formulation.

The key technical enabler is the use of a differentiable optimization layer. This allows the framework to backpropagate gradients through the DC-OPF solver itself. Instead of differentiating through the solver's iterative steps (which is computationally prohibitive), the authors leverage the implicit function theorem. This theorem enables the calculation of gradients of the DC-OPF solution with respect to its parameters, which are then used to train the neural network. This "end-to-end" training approach allows the model to learn how to modify the DC-OPF problem data to better match AC-OPF behavior.

Datasets

The authors generated a dataset using the PGLearn.jl library. This dataset was based on the 89-bus "pegase" benchmark, which models the European power grid. Loads were sampled using a combination of a global correlation factor and local noise, ensuring a wide range of operating conditions, particularly in the challenging high-load regime. The dataset consisted of 10,000 samples, with 80% used for training and 20% for validation.

Key Insights and Ideas

  • Bridging the AC-DC gap: The paper demonstrates that by intelligently adjusting the parameters of a simplified model (DC-OPF), it's possible to achieve accuracy much closer to a complex model (AC-OPF) without the computational burden of the latter.
  • Differentiable optimization as a game-changer: The use of the implicit function theorem to enable end-to-end training through a constrained optimization solver is a powerful technique for integrating optimization problems within deep learning pipelines.
  • Parameter adjustment over direct prediction: Shifting the focus from directly predicting AC-OPF outputs to learning how to adjust DC-OPF inputs (parameters) offers a more interpretable and potentially more robust approach.
  • The challenge of reactive power: The authors note that the DC-OPF formulation inherently neglects reactive power, which limits DC2AC's performance on voltage angle predictions, highlighting a key area for future improvement.

Key Results

The DC2AC framework demonstrated significant improvements in prediction accuracy compared to both the standard DC-OPF and a typical deep learning proxy model.

  • Power generation (p^g) accuracy: DC2AC achieved an L1 error of 0.22, significantly outperforming DC-OPF (0.90) and the proxy model (0.74).
  • Power flow (p^f) accuracy: DC2AC achieved an L1 error of 7.57, again outperforming DC-OPF (9.72) and the proxy model (12.83).
  • Voltage angle (θ) accuracy: While DC2AC struggled to outperform the vanilla DC-OPF for voltage angles (1.08 vs. 1.12), it was comparable to the proxy model (0.95). The authors attribute this to the DC-OPF's neglect of reactive power.
  • Convergence: The DC2AC training converged extremely quickly, typically within the first one or two epochs, suggesting efficient learning.

Limitations and Future Work

The authors acknowledge that the DC2AC framework's performance on voltage angle prediction is limited by the inherent omission of reactive power in the DC-OPF formulation. This is a significant limitation for applications where voltage stability is critical.

Future work directions include:

  • Exploring different approximations of AC-OPF that better account for the active-reactive power relationship.
  • Integrating with GPU solvers to further accelerate training times.
  • Investigating how to better handle the active-reactive power coupling to improve voltage angle prediction accuracy.

Summary updated

BibTeX
@inproceedings{rosemberg2025differentiable,
  author = {Andrew W. Rosemberg and Michael Klamkin and Pascal Van Hentenryck},
  title = {{Differentiable Optimization for Deep Learning-Enhanced DC Approximation of AC Optimal Power Flow}},
  booktitle = {MLxOR @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=Htn3s8yUOg},
}
Figure