# PhyPro-FM: A Physics and Prompt-Guided Graph Foundation Model for Contingency Analysis

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

## Key facts

- No citing papers in the map yet (data through 26 Nov 2026).
- Builds on 13 of its 37 references that are in the map.
- Submitted 19 Oct 2026.

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

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Learning Mesh-Based Simulation with Graph Networks](https://mlsanity.com/paper/2010.03409/) (2020)
- [DeepOPF: A Deep Neural Network Approach for Security-Constrained DC Optimal Power Flow](https://mlsanity.com/paper/1910.14448/) (2019)
- [Graph Transformers: A Survey](https://mlsanity.com/paper/2407.09777/) (2024)
- [Topology-aware Graph Neural Networks for Learning Feasible and Adaptive ac-OPF Solutions](https://mlsanity.com/paper/2205.10129/) (2022)
- [Foundation Models for the Electric Power Grid](https://mlsanity.com/paper/2407.09434/) (2024)
- [Leveraging power grid topology in machine learning assisted optimal power flow](https://mlsanity.com/paper/2110.00306/) (2021)
- [DeepOPF-V: Solving AC-OPF Problems Efficiently](https://mlsanity.com/paper/2103.11793/) (2021)
- [Physics-informed Graphical Neural Network for Power System State Estimation](https://mlsanity.com/paper/2312.17738/) (2023)
- [RL2: Reinforce Large Language Model to Assist Safe Reinforcement Learning for Energy Management of Active Distribution Networks](https://mlsanity.com/paper/2412.01303/) (2024)
- [GENCO - A Unified Neural Solver Embedded in a Development Framework for Steady-State Grid Analysis](https://mlsanity.com/paper/2608.09921/) (2026)
- [Large Language Model Powered Automated Modeling and Optimization of Active Distribution Network Dispatch Problems](https://mlsanity.com/paper/2507.21162/) (2025)
- [Two-Stage Active Distribution Network Voltage Control via LLM-RL Collaboration: A Hybrid Knowledge-Data-Driven Approach](https://mlsanity.com/paper/2602.21715/) (2026)

## Abstract (arXiv)

The continuous evolution of next-generation power systems, characterized by the high penetration of renewable energy resources and dynamic topology variations, poses formidable challenges to traditional N-1/N-2 contingency analysis in terms of computational efficiency and scalability. While deep learning-based methods offer accelerated inference, existing studies predominantly treat contingency analysis as a pure regression problem, often overlooking the physical essence of grid operation and engineering requirements of real-world scenarios. To bridge this gap, this paper proposes a physics and prompt-guided graph foundation model (PhyPro-FM) for generalizable and engineering-viable contingency analysis. The proposed architecture integrates graph neural networks with a learnable global query mechanism and, notably, introduces a prompt-guided learning paradigm. By leveraging historical snapshots as few-shot prompts, the model dynamically captures correlations between target and historical operating conditions, significantly enhancing generalization capabilities under unseen topologies. Furthermore, we design a physics-informed training mechanism that prioritizes branch power flow errors over nodal voltage errors, aligning the optimization objective with critical grid security constraints. To ensure engineering applicability, a physics-informed inference mechanism is also developed, incorporating a residual-based correction module and a specialized post-processing strategy for singular branches to circumvent numerical instability. Comprehensive experiments demonstrate that PhyPro-FM outperforms state-of-the-art methods in accuracy and generalization, validating its superior physical consistency and robustness for practical engineering applications.
