# PGLearn -- An Open-Source Learning Toolkit for Optimal Power Flow

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

## Key facts

- Cited by 11 papers in the map (data through 14 Oct 2026).
- Builds on 22 of its 48 references that are in the map.
- First posted on arXiv 28 May 2025.

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

- [Differentiable Convex Optimization Layers](https://mlsanity.com/paper/1910.12430/) (2019)
- [DC3: A learning method for optimization with hard constraints](https://mlsanity.com/paper/2104.12225/) (2021)
- [Parallelizing the dual revised simplex method](https://mlsanity.com/paper/1503.01889/) (2015)
- [Lagrangian Duality for Constrained Deep Learning](https://mlsanity.com/paper/2001.09394/) (2020)
- [The Power Grid Library for Benchmarking AC Optimal Power Flow Algorithms](https://mlsanity.com/paper/1908.02788/) (2019)
- [Clarabel: An interior-point solver for conic programs with quadratic objectives](https://mlsanity.com/paper/2405.12762/) (2024)
- [JuMP 1.0: Recent improvements to a modeling language for mathematical optimization](https://mlsanity.com/paper/2206.03866/) (2022)
- [End-to-End Feasible Optimization Proxies for Large-Scale Economic Dispatch](https://mlsanity.com/paper/2304.11726/) (2023)
- [PowerModels.jl: An Open-Source Framework for Exploring Power Flow Formulations](https://mlsanity.com/paper/1711.01728/) (2017)
- [Learning Optimization Proxies for Large-Scale Security-Constrained Economic Dispatch](https://mlsanity.com/paper/2112.13469/) (2021)
- [OPFData: Large-scale datasets for AC optimal power flow with topological perturbations](https://mlsanity.com/paper/2406.07234/) (2024)
- [OPF-Learn: An Open-Source Framework for Creating Representative AC Optimal Power Flow Datasets](https://mlsanity.com/paper/2111.01228/) (2021)
- [AC Power Flow Data in MATPOWER and QCQP Format: iTesla, RTE Snapshots, and PEGASE](https://mlsanity.com/paper/1603.01533/) (2016)
- [Learning Constrained Optimization with Deep Augmented Lagrangian Methods](https://mlsanity.com/paper/2403.03454/) (2024)
- [Dual Conic Proxies for AC Optimal Power Flow](https://mlsanity.com/paper/2310.02969/) (2023)
- [Dual Lagrangian Learning for Conic Optimization](https://mlsanity.com/paper/2402.03086/) (2024)
- [Learning an Optimally Reduced Formulation of OPF through Meta-optimization](https://mlsanity.com/paper/1911.06784/) (2019)
- [Data-Driven Time Series Reconstruction for Modern Power Systems Research](https://mlsanity.com/paper/2110.13772/) (2021)
- [Real-Time Risk Analysis with Optimization Proxies](https://mlsanity.com/paper/2310.00709/) (2023)
- [Proving Global Optimality of ACOPF Solutions](https://mlsanity.com/paper/1910.03716/) (2019)
- [Bucketized Active Sampling for Learning ACOPF](https://mlsanity.com/paper/2208.07497/) (2022)
- [Learning Lagrangian Multipliers for the Travelling Salesman Problem](https://mlsanity.com/paper/2312.14836/) (2023)

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

- [FSNet: Feasibility-Seeking Neural Network for Constrained Optimization with Guarantees](https://mlsanity.com/paper/2506.00362/) (2025)
- [Towards Generalization of Graph Neural Networks for AC Optimal Power Flow](https://mlsanity.com/paper/2510.06860/) (2025)
- [GENCO - A Unified Neural Solver Embedded in a Development Framework for Steady-State Grid Analysis](https://mlsanity.com/paper/2608.09921/) (2026)
- [gridfm-datakit-v1: A Python Library for Scalable and Realistic Power Flow and Optimal Power Flow Data Generation](https://mlsanity.com/paper/2512.14658/) (2025)
- [Constrained Diffusion Models for Synthesizing Representative Power Flow Datasets](https://mlsanity.com/paper/2506.11281/) (2025)
- [Constraint-Informed Active Learning for End-to-End ACOPF Optimization Proxies](https://mlsanity.com/paper/2511.06248/) (2025)
- [Cheap Thrills: Effective Amortized Optimization Using Inexpensive Labels](https://mlsanity.com/paper/2603.05495/) (2026)
- [Self-Certifying Primal-Dual Optimization Proxies for Large-Scale Batch Economic Dispatch](https://mlsanity.com/paper/2510.15850/) (2025)
- [Multi-ResNets for Subspace Preconditioning in Constrained Optimization](https://mlsanity.com/paper/2606.06300/) (2026)
- [Scalable Self-Supervised Learning for Multiphase AC-OPF in Distribution Systems with Topology Reconfiguration](https://mlsanity.com/paper/2608.25095/) (2026)
- [Scaling Laws for Physics-Aware ACOPF Surrogate Learning](https://mlsanity.com/paper/2609.16282/) (2026)

## Abstract (arXiv)

Machine Learning (ML) techniques for Optimal Power Flow (OPF) problems have recently garnered significant attention, reflecting a broader trend of leveraging ML to approximate and/or accelerate the resolution of complex optimization problems. These developments are necessitated by the increased volatility and scale in energy production for modern and future grids. However, progress in ML for OPF is hindered by the lack of standardized datasets and evaluation metrics, from generating and solving OPF instances, to training and benchmarking machine learning models. To address this challenge, this paper introduces PGLearn, a comprehensive suite of standardized datasets and evaluation tools for ML and OPF. PGLearn provides datasets that are representative of real-life operating conditions, by explicitly capturing both global and local variability in the data generation, and by, for the first time, including time series data for several large-scale systems. In addition, it supports multiple OPF formulations, including AC, DC, and second-order cone formulations. Standardized datasets are made publicly available to democratize access to this field, reduce the burden of data generation, and enable the fair comparison of various methodologies. PGLearn also includes a robust toolkit for training, evaluating, and benchmarking machine learning models for OPF, with the goal of standardizing performance evaluation across the field. By promoting open, standardized datasets and evaluation metrics, PGLearn aims at democratizing and accelerating research and innovation in machine learning applications for optimal power flow problems. Datasets are available for download at https://www.huggingface.co/PGLearn.
