Table of Contents
Fetching ...

Fast Diffusion with Physics-Correction for ACOPF

Shashank Shekhar, Abhinav Karn, Kris Keshav, Shivam Bansal, Parikshit Pareek

TL;DR

ACOPF data generation aims to produce large-scale, physically feasible operating points in a high-dimensional state space $\mathbf{x}\in\mathbb{R}^{4n}$, but standard diffusion sampling is prohibitively slow. The authors propose a DDIM-based diffusion model augmented with physics-guided constraint guidance that initializes samples near the ACOPF feasible manifold and steers the diffusion trajectory via gradient penalties, reducing the number of steps required. Experiments on IEEE 6-, 24-, and 118-bus systems show that this approach preserves distributional fidelity and statistical similarity while delivering up to $20\times$ faster sampling than DDPM, with feasible solutions maintained through differentiable projection steps. The work enables scalable ACOPF dataset generation for data-driven power-system applications and digital twins, with code released at the provided repository.

Abstract

Generating large-scale, physically consistent AC Optimal Power Flow (ACOPF) datasets is essential for modern data-driven power system applications. The central challenge lies in balancing solution accuracy with computational efficiency. Recent diffusion-based generative models produce high-quality samples; however, their slow sampling procedures limit practical scalability. In this work, we argue that exact physical feasibility is ultimately enforced by power flow solvers or projection steps, and therefore the generative model only needs to produce good initializations rather than perfectly feasible solutions. Based on this insight, we propose a fast diffusion framework using Denoising Diffusion Implicit Models (DDIM) combined with physics-guided corrections during sampling. The proposed method replaces slow stochastic refinement with a small number of deterministic steps and explicit constraint guidance. Experiments on IEEE 6-, 24-, and 118-bus systems show that our approach achieves up to 20 times faster sampling than standard diffusion models while maintaining comparable statistical accuracy and physical consistency. This makes the method well suited for scalable OPF dataset generation and practical power system learning tasks. We release the implementation code at https://github.com/PSquare-Lab/DDIM_OPF.

Fast Diffusion with Physics-Correction for ACOPF

TL;DR

ACOPF data generation aims to produce large-scale, physically feasible operating points in a high-dimensional state space , but standard diffusion sampling is prohibitively slow. The authors propose a DDIM-based diffusion model augmented with physics-guided constraint guidance that initializes samples near the ACOPF feasible manifold and steers the diffusion trajectory via gradient penalties, reducing the number of steps required. Experiments on IEEE 6-, 24-, and 118-bus systems show that this approach preserves distributional fidelity and statistical similarity while delivering up to faster sampling than DDPM, with feasible solutions maintained through differentiable projection steps. The work enables scalable ACOPF dataset generation for data-driven power-system applications and digital twins, with code released at the provided repository.

Abstract

Generating large-scale, physically consistent AC Optimal Power Flow (ACOPF) datasets is essential for modern data-driven power system applications. The central challenge lies in balancing solution accuracy with computational efficiency. Recent diffusion-based generative models produce high-quality samples; however, their slow sampling procedures limit practical scalability. In this work, we argue that exact physical feasibility is ultimately enforced by power flow solvers or projection steps, and therefore the generative model only needs to produce good initializations rather than perfectly feasible solutions. Based on this insight, we propose a fast diffusion framework using Denoising Diffusion Implicit Models (DDIM) combined with physics-guided corrections during sampling. The proposed method replaces slow stochastic refinement with a small number of deterministic steps and explicit constraint guidance. Experiments on IEEE 6-, 24-, and 118-bus systems show that our approach achieves up to 20 times faster sampling than standard diffusion models while maintaining comparable statistical accuracy and physical consistency. This makes the method well suited for scalable OPF dataset generation and practical power system learning tasks. We release the implementation code at https://github.com/PSquare-Lab/DDIM_OPF.
Paper Structure (16 sections, 11 equations, 5 figures, 1 table, 1 algorithm)

This paper contains 16 sections, 11 equations, 5 figures, 1 table, 1 algorithm.

Figures (5)

  • Figure 1: Comparison of ground-truth and generated marginal distributions for selected variables (active power $P$, reactive power $Q$, voltage magnitude $V$ and phase angle $\theta$) in the IEEE 6-bus system.
  • Figure 2: Scatter plots comparing joint distributions of $(P,Q)$ and $(V,\theta)$ for buses 3 and 5 in the IEEE 6-bus system. The strong overlap indicates accurate recovery of inter-variable dependencies.
  • Figure 3: Effect of network capacity on generated marginal distributions for the IEEE 24-bus system. Narrow networks exhibit boundary artifacts, while wider models better capture the empirical distribution.
  • Figure 4: Sampling time versus number of generated samples for the IEEE 118-bus system. DDIM ($\eta=0.2$ and $\text{DDIM steps} = 30$ ) achieves approximately $20\times$ speedup over DDPM due to reduced reverse diffusion steps.
  • Figure 5: Validation loss versus training epochs for different network widths. Larger models converge faster, with diminishing returns beyond 4096 neurons per layer.