Organizations: Universitat Politècnica de Catalunya · BarcelonaTech (UPC), Barcelona, Spain · Department of Mathematics, University of Padua, Padua, Italy · Centre d’Innovació Tecnològica en Convertidors Estàtics i Accionaments (CITCEA-UPC), Universitat Politècnica de Catalunya · BarcelonaTech (UPC), Barcelona, Spain · Barcelona Neural Networking Center (BNN), Universitat Politècnica de Catalunya · BarcelonaTech (UPC), Barcelona, Spain
Fast and accurate models for AC power flow (ACPF) are increasingly important as modern electrical grids require more frequent system analyses. Graph neural networks (GNNs) naturally exploit electrical grid topology, yet the effects of architectural design choices on predictive performance remain poorly understood given differences in graph representations and evaluation settings across studies. We present a unified benchmark of representative GNN architectures for ACPF prediction under a common experimental framework. All models use identical preprocessing and training procedures and comparable parameter budgets, isolating the impact of message-passing mechanisms and inductive biases. We also analyze errors by distance from the slack bus and systematically ablate key design components. We evaluate predictive accuracy and physical consistency on the IEEE 14-bus and IEEE 118-bus systems. Results indicate that anisotropic message-passing architectures offer the most favorable trade-off between predictive accuracy and physical consistency under the studied parameter and topology constraints. Explicit edge features encoding line impedances and global context aggregation are particularly important for representing electrical interactions and system-wide dependencies, especially for voltage-angle predictions on the topologically bottlenecked IEEE-118 grid. Under a budget with approximately fixed parameters, two or three message-passing layers generally provide the best balance between depth and representation width, while additional depth offers no consistent improvement. Ablations also show that standard residual and root connections are not necessarily beneficial in shallow models, and that aggregation operators involve trade-offs between statistical accuracy and physical consistency. These results provide practical guidelines for designing graph-based power system models.
Figures & tables
Figure 1: Proposed heterogeneous GNN architecture for AC-PF prediction, highlighting the common components.
Grid
N
E
dˉ
PV:PQ
Diameter
ASPL
λ1
IEEE-14
14
20
2.86
0.44
5
2.37
0.182
IEEE-118
118
179
3.03
0.83
14
6.31
0.009
Table 3: Topological properties of the IEEE benchmark grids used in this work.
Bus Type
Known Variables
Unknown Variables
Role
PQ bus
P , Q
Vm , Va
Load bus
PV bus
P , Vm
Q , Va
Generator bus
slack bus 1 1 1 For the slack bus, P and Q are calculated after solving the AC-PF , whereas only Vm and Va are specified a priori. Some formulations do not count P and Q as unknown state variables.
Va , Vm
P , Q
Reference bus
Table 4: Classification of buses in a power network according to their known and unknown variables.
Figure 2: IEEE-118 – Voltage magnitude TRMAE (%) ( VmPQ ) vs. message-passing depth T . Dashed line indicates the global best value. Error bars denote one standard deviation over four seeds.
Figure 3: IEEE-118 – Voltage angle TRMAE (%) vs. message-passing depth T for VaPQ (left) and VaPV (right). Dashed line indicates the global best value per metric. Error bars denote one standard deviation over four seeds.
Figure 4: IEEE-118 – KCL mismatch vs. message-passing depth T for active power P (left) and reactive power Q (right). Dashed line indicates the global best value per metric. Error bars denote one standard deviation over four seeds.
Figure 5: Performance of the ResGated model relative to hop distance from the slack bus on the IEEE-118 grid ( T=2 , Independent layers). Results reflect the mean and variance across multiple seeds.
Figure 6: Performance of the ResGated model (baseline vs ablated without global pooling) relative to hop distance from the slack bus on the IEEE-118 grid ( T=2 , Independent layers). Results reflect the mean and variance across multiple seeds.
Appendix figures & tables20 assets
Supplementary material from the paper’s appendix.
Appendix
Model
Mode
T
Hidden
Params
GCN
Indep.
1
78
100,698
2
60
99,780
3
51
101,031
4
45
101,160
Shared
–
53
98,739
GAT
Indep.
1
60
98,460
Appendix
Table 7: Unified Parameter Configurations Across Evaluated Architectures. Detailed specifications for all evaluated GNNs and the MLP baseline, showing the message-passing depth ( T ), hidden representation dimensions, and total parameter counts. Hidden dimensions were specifically scaled for each configuration to maintain a tightly controlled capacity budget of approximately 100,000 parameters across both independent and shared weight modes.
Figure 7: IEEE-118 – Voltage angle TRMAE (%) for VaPQ (left) and VaPV (right) vs. independent message-passing depth T , including MLP baseline.
Figure 8: IEEE-118 – Voltage magnitude TRMAE (%) ( VmPQ ) vs. independent message-passing depth T , including MLP baseline.
Figure 9: IEEE-118 – KCL mismatch vs. independent message-passing depth T for active power P (left) and reactive power Q (right), including MLP baseline.
Figure 10: IEEE-14 – Voltage angle TRMAE (%) for VaPQ (left) and VaPV (right) vs. message-passing depth T .
Figure 11: IEEE-14 – Voltage angle TRMAE (%) for VaPQ (left) and VaPV (right) vs. independent message-passing depth T , including MLP baseline.
Figure 12: IEEE-14 – Voltage magnitude TRMAE (%) ( VmPQ ) vs. message-passing depth T .
Figure 13: IEEE-14 – Voltage magnitude TRMAE (%) ( VmPQ ) vs. independent message-passing depth T , including MLP baseline.
Figure 14: IEEE-14 – KCL mismatch vs. message-passing depth T for active power P (left) and reactive power Q (right).
Figure 15: IEEE-14 – KCL mismatch vs. independent message-passing depth T for active power P (left) and reactive power Q (right), including MLP baseline.
Figure 16: Physical consistency versus prediction accuracy on the IEEE-14 grid. The scatter plots compare active power ( ΔP ) and reactive power ( ΔQ ) mismatch against the average TRMAE across bus types. Results show the evaluated GNN architectures across transformation depths T1 through T4 under Independent and Shared parameter configurations.
Figure 17: Physical consistency versus prediction accuracy on the IEEE-118 grid. The scatter plots compare active power ( ΔP ) and reactive power ( ΔQ ) mismatch against the average TRMAE across bus types. Results show the evaluated GNN architectures across transformation depths T1 through T4 under Independent and Shared parameter configurations.
Figure 18: Performance of the GCN model relative to hop distance from the slack bus on the IEEE-118 grid ( T=2 , Independent layers). Results reflect the mean and variance across multiple seeds.
Figure 19: Performance of the GAT model relative to hop distance from the slack bus on the IEEE-118 grid ( T=2 , Independent layers). Results reflect the mean and variance across multiple seeds.
Figure 20: Performance of the GINE model relative to hop distance from the slack bus on the IEEE-118 grid ( T=2 , Independent layers). Results reflect the mean and variance across multiple seeds.
Figure 21: Performance of the GraphSAGE model relative to hop distance from the slack bus on the IEEE-118 grid ( T=2 , Independent layers). Results reflect the mean and variance across multiple seeds.
Figure 22: Performance of the Transformer model relative to hop distance from the slack bus on the IEEE-118 grid ( T=2 , Independent layers). Results reflect the mean and variance across multiple seeds.
Figure 23: Cumulative spectral energy proportion for Vm and Va averaged across buses for the models on the IEEE-118 grid ( T=2 , Independent layers).
Figure 24: Eigenvalue spectrum ( λk ) of the admittance-weighted normalized graph Laplacian for the IEEE-118 network.
Figure 25: Mean squared GFT residual energy partitioned into low-, mid-, and high-frequency spectral bands for Vm and Va . The red bar highlights performance loss when removing global pooling from the ResGated baseline.
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.
Chidozie Ezeakunne, Jose E. Tabarez, Reeju Pokharel +1
Los Alamos National Laboratory, Los Alamos, NM, USA · Department of Physics, University of Central Florida, Orlando, FL 32816 USA
Physics-informed graph neural networks (PIGNNs) have emerged as fast AC power-flow solvers that can replace the classic NewtonRaphson (NR) solvers, especially when thousands of scenarios must be evaluated. However, current PIGNNs still need accuracy improvements at parity speed; in particular, the soft constraint on the physics loss is inoperative at inference, which can deter operational adoption. We address this with PIGNN-Attn-LS, combining an edge-aware attention mechanism that explicitly encodes line physics via per-edge biases to form a fully differentiable knownoperator layer inside the computation graph, with a backtracking line-search-based globalized correction operator that restores an operative decrease criterion at inference. Training and testing use a realistic High-/Medium-Voltage scenario generator, with NR used only to construct reference states. On held-out HV cases consisting of 4-32-bus grids, PIGNN-Attn-LS achieves a test RMSE of 0.00033 p.u. in voltage and 0.08 deg in angle, outperforming the PIGNN-MLP baseline by 99.5% and 87.1%, respectively. With streaming micro-batches, it delivers 2-5x faster batched inference than NR on 4-1024-bus grids.
Changhun Kim, Timon Conrad, Redwanul Karim +6
Pattern Recognition Lab, Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany · Institute of Electrical Energy Systems, Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany
Recent neural power-flow solvers, including emerging foundation models, achieve accurate voltage predictions, yet such accuracy does not necessarily imply physically consistent solutions. Even small complex voltage errors can yield large AC power-balance residuals. We study this accuracy-consistency gap across PIGNN-GC, GridSFM, gridfm-graphkit, and LUMINA on realistic 2224-bus Great Britain network (GBnetwork) scenarios, with cross-grid evaluation of GridSFM over 31 systems. Using a singular value decomposition (SVD) basis fitted to training AC power-flow solutions, we find that neural prediction errors contain substantial components outside the dominant solution subspace. To address this mismatch, calibrated solution-subspace projection (CSP) suppresses off-subspace prediction components after train-only bias calibration, reducing Mean PB by 67.0%, 37.8%, 40.5%, and 68.9% for PIGNN-GC, GridSFM, gridfm-graphkit, and LUMINA, respectively, relative to calibrated predictions, while improving voltage-magnitude accuracy in all four models. These results identify output-error geometry as an important factor in physics-consistent neural AC power flow. Code: https://github.com/Kimchangheon/neural-acpf-error-geometry
Changhun Kim, Timon Conrad, Redwanul Karim +7
Pattern Recognition Lab, Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany · Institute of Electrical Energy Systems, Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany