Self-Supervised Learning of Parametric Approximation for Security-Constrained DC-OPF

Anderson Anrrango, André H. Quisaguano, Gonzalo E. Constante‐Flores, Can LiarXiv 2026 · DOI

Abstract

This paper introduces a self-supervised learning framework for approximating the Security-Constrained DC Optimal Power Flow (SC-DCOPF) problem using a parametric linear model. The approach preserves the physical structure of the DC-OPF while incorporating demand-dependent tunable parameters that scale transmission line limits. These parameters are predicted via a Graph Neural Network and optimized through differentiable layers, enabling direct training from contingency costs without requiring labeled data. The framework integrates pre- and post-contingency optimization layers into an implicit loss function. Numerical experiments on benchmark systems demonstrate that the proposed method achieves high dispatch accuracy, low cost approximation error, and strong data efficiency, outperforming semi-supervised and end-to-end baselines. This scalable and interpretable approach offers a promising solution for real-time secure power system operations.

Introduction

In modern power systems, the Security-Constrained DC Optimal Power Flow (SC-DCOPF) is the standard tool for determining the most economical generation dispatch while ensuring the grid remains resilient to single-component failures (the N-1 criterion). However, as grid complexity and the number of potential contingencies grow, the SC-DCOPF becomes computationally prohibitive for real-time applications.

While Machine Learning (ML) offers a potential speedup, traditional "black-box" models often struggle to satisfy physical constraints or require massive amounts of labeled data—optimal solutions that are themselves expensive to compute. This paper addresses these challenges by proposing a self-supervised framework that combines the representational power of Graph Neural Networks (GNNs) with the physical rigor of classical optimization.

Methodology

The core of the proposed approach is a "Parametric Proxy" for the SC-DCOPF. Instead of explicitly solving for every contingency, the model solves a simplified DC-OPF where transmission line limits are scaled by a tunable parameter vector, $\alpha$.

The proposed self-supervised framework integrating a GNN with differentiable optimization layers for SC-DCOPF approximation.

As illustrated in the framework above, the system consists of three primary components:

  1. Graph Attention Network (GATv2): This GNN processes the grid's topology and current demand to predict the optimal scaling parameters $\alpha$.
  2. Differentiable Optimization Layer: The predicted $\alpha$ values are fed into a parametric DC-OPF solver. By utilizing differentiable optimization (via the DiffOpt package), the GNN can receive gradients based on how its choice of $\alpha$ affects the final dispatch.
  3. Self-Supervised Implicit Loss: The model is trained to minimize a total system cost function: the sum of generation costs and penalties for any load shedding required during simulated contingencies. This allows the model to learn directly from the physics of the problem without needing pre-solved "ground truth" labels.

By constraining $\alpha$ between 0 and 1, the model effectively creates an "inner approximation" of the feasible space, ensuring a risk-averse dispatch that prioritizes grid security.

Experimental Results

The framework was evaluated on three standard benchmarks from the PowerGrid Library (PGLib-OPF): the IEEE 57-bus, IEEE 118-bus, and a synthetic 200-bus system. Training data was generated by varying active power demand by $\pm 30\%$, focusing on the top 20% most critical contingencies.

Key Findings

  • High Accuracy: The self-supervised model achieved mean cost approximation errors below 1.1% across all test systems, significantly outperforming standard end-to-end GNN baselines.
  • Data Efficiency: The model demonstrated remarkable efficiency; on the 118-bus system, it reached high accuracy with as few as 10 training samples. This is a major advantage over semi-supervised methods that require large datasets.
  • Interpretability: Unlike black-box models, this approach is interpretable. The output $\alpha$ values represent scaled line limits, allowing operators to understand which physical constraints the model is tightening to protect against specific contingencies.

Conclusion and Future Work

This research demonstrates that embedding physical optimization layers within a self-supervised GNN framework provides a scalable, accurate, and data-efficient alternative to traditional SC-DCOPF solvers. While inference is near-instant, training time remains a factor due to the iterative optimization required in the loop. Future work will focus on extending this methodology to the non-linear AC-OPF model and incorporating discrete decision-making processes such as Unit Commitment.

Summary updated

BibTeX
@misc{anrrango2026self,
  author = {Anderson Anrrango and André H. Quisaguano and Gonzalo E. Constante‐Flores and Can Li},
  title = {{Self-Supervised Learning of Parametric Approximation for Security-Constrained DC-OPF}},
  year = {2026},
  eprint = {2601.13486},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.13486},
}
Figure