PowerModelsGAT-AI: Physics-Informed Graph Attention for Multi-System Power Flow with Continual Learning
Organizations: Los Alamos National Laboratory, Los Alamos, NM, USA · Department of Physics, University of Central Florida, Orlando, FL 32816 USA
Abstract
Solving the alternating current power flow equations in real time is essential for secure grid operation, yet classical Newton-Raphson solvers can be slow under stressed conditions. Existing graph neural networks for power flow are typically trained on a single system and often degrade on different systems. We present PowerModelsGAT-AI, a physics-informed graph attention network that predicts bus voltages and generator injections. The model uses bus-type-aware masking to handle different bus types and balances multiple loss terms, including a power-mismatch penalty, using learned weights. We evaluate the model on 14 benchmark systems (4 to 6,470 buses) and train a unified model on 13 of these under N-2 (two-branch outage) conditions, achieving an average normalized mean absolute error of 0.89% for voltage magnitudes and R^2 > 0.99 for voltage angles. We also show continual learning: when adapting a base model to a new 1,354-bus system, standard fine-tuning causes severe forgetting with error increases exceeding 1000% on base systems, while our experience replay and elastic weight consolidation strategy keeps error increases below 2% and in some cases improves base-system performance. Interpretability analysis shows that learned attention weights correlate with physical branch parameters (susceptance: r = 0.38; thermal limits: r = 0.22), and feature importance analysis supports that the model captures established power flow relationships.
Figures & tables
| Bus Type | Known in | Unknown Targets | Mask |
| PQ (Load) | [1, 1, 0, 0] | ||
| PV (Generator) | [0, 1, 0, 1] | ||
| Slack | [0, 0, 1, 1] |
| Base (Unadapted) | Naive | EWC+Replay | ||||
| Target | NMAE% | R 2 | NMAE% | R 2 | NMAE% | R 2 |
| 12.98 | 1.44 | 1.90 | ||||
| 11.96 | 0.61 | 0.68 | ||||
| 20.79 | 0.42 | 0.45 | ||||
| 1.61 | 0.15 | 0.17 | ||||
| State Variable | Naive | EWC+Replay |
| Voltage Magnitude ( ) | 12.00 | 0.26 |
| Voltage Angle ( ) | 138.23 | 0.12 |
| Active Power ( ) | 1891.82 | 1.25 |
| Reactive Power ( ) | 103.79 | 1.54 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Feature | Symbol | Description | Unit |
| Electrical Properties | |||
| Nominal Voltage | Rated voltage level of the bus | kV | |
| Active Load | Active power demand at the bus | ||
| Reactive Load | Reactive power demand at the bus | ||
| Active Generation Setpoint | Scheduled active power generation | ||
| Voltage Setpoint | Voltage magnitude setpoint (PV and Slack buses) | ||
| Feature | Symbol | Description | Unit |
| Series Admittance (Edge Terms) | |||
| Conductance | Real part of the series-admittance edge term | ||
| Susceptance | Imaginary part of the series-admittance edge term | ||
| Branch Type (One-Hot) | |||
| Line | — | Transmission line | {0,1} |
| Transformer | — | Power transformer | {0,1} |
| System | Total | PQ (Load) | PV (Gen) | Slack |
| case4gs | 4 | 2 | 1 | 1 |
| case5 | 5 | 1 | 3 | 1 |
| case6ww | 6 | 3 | 2 | 1 |
| case9 | 9 | 6 | 2 | 1 |
| case14 | 14 | 9 | 4 | 1 |
| case30 | 30 | 24 | 5 | 1 |
| N-0 (%) | N-1 (%) | N-2 (%) | ||||
| System | Train | Test | Train | Test | Train | Test |
| case4gs | 49.5 | 50.1 | 50.5 | 49.9 | — | — |
| case5 | 36.1 | 33.7 | 35.7 | 34.4 | 28.2 | 31.9 |
| case6ww | 35.0 | 32.1 | 33.1 | 33.2 | 31.9 | 34.7 |
| case9 | 60.5 | 60.0 | 39.5 | 40.0 | — | — |
| case14 | 36.3 | 35.4 | 33.7 | 34.4 | 30.0 | 30.2 |
| N-0 (%) | N-1 (%) | N-2 (%) | ||||
| Model | Train | Test | Train | Test | Train | Test |
| Unified (13 Systems) | 40.3 | 41.8 | 36.2 | 35.1 | 23.5 | 23.1 |
| Base (12 Systems) | 39.5 | 41.5 | 37.3 | 35.6 | 23.2 | 22.8 |
| System | Target | MSE | RMSE | MAE | R 2 | NMAE% |
| case4gs | [ ] | |||||
| [ ] | ||||||
| [ ] | ||||||
| [ ] | ||||||
| case5 | [ ] | |||||
| [ ] |
| System | Target | MSE | RMSE | MAE | R 2 | NMAE% |
| case4gs | [ ] | |||||
| [ ] | ||||||
| [ ] | ||||||
| [ ] | ||||||
| case5 | [ ] | |||||
| [ ] |
| System | Target | MSE | RMSE | MAE | R 2 | NMAE% |
| case4gs | [ ] | |||||
| [ ] | ||||||
| [ ] | ||||||
| [ ] | ||||||
| case5 | [ ] | |||||
| [ ] |
| N-0 (Normal) | N-1 Contingency | N-2 Contingency | ||||||||
| System | Target | MSE | MAE | R 2 | MSE | MAE | R 2 | MSE | MAE | R 2 |
| case4gs | [ ] | – | – | – | ||||||
| [ ] | – | – | – | |||||||
| [ ] | – | – | – | |||||||
| [ ] | – | – | – | |||||||
| case5 | [ ] | |||||||||
| System | ||||||||
| Naive | EWC+Replay | Naive | EWC+Replay | Naive | EWC+Replay | Naive | EWC+Replay | |
| case4gs | ||||||||
| case5 | ||||||||
| case6ww | ||||||||
| case9 | ||||||||
| case14 | ||||||||
| System | [ ] | [ ] | [ ] | [ ] | ||||
| Naive | EWC+Replay | Naive | EWC+Replay | Naive | EWC+Replay | Naive | EWC+Replay | |
| case4gs | ||||||||
| case5 | ||||||||
| case6ww | ||||||||
| case9 | ||||||||
| case14 | ||||||||