Towards Generalization of Graph Neural Networks for AC Optimal Power Flow
Olayiwola Arowolo, Jochen L. Cremer
TL;DR
This paper tackles the computational bottleneck of ACOPF by introducing HH-MPNN, a hybrid model that unifies heterogeneous graph neural networks with a scalable transformer to handle topology changes and grid scaling. By explicitly modeling power-system components as distinct node/edge types and using effective resistance-based positional encodings, the approach achieves $<1\%$ optimality gaps on default topologies and $<3\%$ in zero-shot N-1 cases across grids from 14 to 2,000 buses, while delivering $10^3$ to $10^4\times$ speedups over interior-point solvers. Pre-training on smaller grids further improves performance on larger grids, and fine-tuning on a target grid yields substantial gains in accuracy and generalization, including size generalization and reduced data-generation costs. The results suggest a practical, generalizable ML framework for real-time power system operations, with implications for topology adaptability and scalable data efficiency.
Abstract
AC Optimal Power Flow (ACOPF) is computationally expensive for large-scale power systems, with conventional solvers requiring prohibitive solution times. Machine learning approaches offer computational speedups but struggle with scalability and topology adaptability without expensive retraining. To enable scalability across grid sizes and adaptability to topology changes, we propose a Hybrid Heterogeneous Message Passing Neural Network (HH-MPNN). HH-MPNN models buses, generators, loads, shunts, transmission lines and transformers as distinct node or edge types, combined with a scalable transformer model for handling long-range dependencies. On grids from 14 to 2,000 buses, HH-MPNN achieves less than 1% optimality gap on default topologies. Applied zero-shot to thousands of unseen topologies, HH-MPNN achieves less than 3% optimality gap despite training only on default topologies. Pre-training on smaller grids also improves results on a larger grid. Computational speedups reach 1,000x to 10,000x compared to interior point solvers. These results advance practical, generalizable machine learning for real-time power system operations.
