arXiv:2610.20462cs.LGOct 2026

Manuscript Offprint

arXiv:2610.20462

Learning by Examples: Power Grid Steady State Analysis with a Tabular Foundation Model

Olayiwola Arowolo, Oluwadara Adedeji, Peter Palensky, Jochen L. Cremer

Olayiwola Arowolo*, Oluwadara Adedeji†, Peter Palensky*, Jochen L. Cremer*†

*Delft University of Technology, Delft, the Netherlands

†Austrian Institute of Technology, Vienna, Austria

†University College Dublin, Belfield Dublin, Ireland

o.a.arowolo, j.l.cremer, p.palensky{@tudelft.nl}, oluwadara.adedeji{@ucdconnect.ie}

Abstract—Foundation models have shown strong generalization across scientific domains, but their use in power systems remains largely task-specific. We investigate whether a pretrained tabular foundation model (TFM), TabPFN, can serve as a general-purpose neural solver for power grid steady-state analysis. We evaluate the TFM on three tasks: power flow (PF) prediction, N-k contingency screening (NCS), and voltage stability margin (VSM) prediction. We performed experiments on 118- and 2000-bus systems, comparing the TFM against task-specific neural baselines. Without retraining or fine-tuning, the TFM matches or outperforms the best task-specific model in several settings across the three tasks. For 118-bus PF prediction, a variant of the TFM achieves errors of 1×10−31 \times 10^{-3} pu for voltage magnitudes and 0.30∘0.30^{\circ} for voltage angles, outperforming all baselines. On unseen N-1 contingency and close-to-infeasible PF cases, the TFM is competitive with the DCPF approximation. For millions of unseen N-2 contingencies, the TFM achieves AUCs of 0.92 and 0.95 for branch and voltage violation screening, respectively. The TFM also attains accurate VSM prediction performance for the 2000-bus system with limited labelled data. The TFM attains strong results across the tested tasks despite pretraining without any power-system-specific dataset and requiring no fine-tuning step. These results offer a glimpse into the potential of pretrained TFMs as a neural solver for a range of power grid analysis tasks.

Index Terms—Tabular Foundation Model, Power Flow, N-k Contingency Screening, Voltage Stability Margin Prediction, Neural Solver

I. INTRODUCTION

Driven by massive integration of renewable energy and rapid electrification of mobility and industry, the global energy transition introduces significant variability and uncertainty into grid operations [1]. Therefore, grid operators must rapidly assess grid security and reliability while maintaining adequate safety margins in the constantly changing operational landscape [2]. Power flow (PF) is the core task in many steady-state security analyses, including contingency screening, voltage stability analysis, and topology optimization [3]. Classical AC PF solvers provide accurate solutions but become computationally expensive at large scales. The computational cost becomes especially burdensome for applications which require repeated PF solver calls. [4]. For example, exhaustive N-3 branch contingency screening on the modest IEEE-118 bus system requires over 1 million PF solver calls per operating point (OP). Operators typically rely on DC power flow approximation (DCPF) for such applications, but DCPF has large errors for high loading conditions [5]. These errors lead to conservative operation of the power system and increases the risks of blackouts. Therefore, conventional computational tools for planning and operating the grid are increasingly inadequate for real-time monitoring and analysis across multiple scenarios.

Machine learning (ML) models have been proposed as capable neural surrogates for many power system analyses. Despite the promising speed advantages offered by ML, its adoption in practical power system operation remains limited by several factors. These include human barriers such as lack of trust in black-box models [6] and technical barriers such as scarcity of large, high-quality datasets [7]. Limited generalization is also an important technical barrier that current ML approaches face in power systems. We define generalization as the ability of an ML model to give accurate predictions for OPs outside its training data [8], where the OP includes the loading, injection, and topology of the grid. Since it is practically impossible to cover all possible topology and parameter combinations in the training data of large grids, many ML models have to be retrained when an unseen topology/parameter configuration is encountered during operation [2]. Transfer learning in power systems [9] can suffer from negative transfer and catastrophic forgetting [10]. Separate ML models may also be trained and interfaced for individual components in the grids [11]. However, these approaches are not scalable.

Graph Neural Networks (GNNs) have been explored as a way to improve the generalization of ML models to topological changes in power grids because of their inherent generalization properties [12]. GNNs have demonstrated promising generalization to N-1 topology changes on tasks such as PF [13] and ACOPF [14]. However, GNNs face several architectural limitations such as limited expressivity, oversmoothing, and oversquashing [15]. These limitations can cause poor performance of GNN models in applications with little or no locality dependence compared to topology-agnostic models [16]. While different modifications have been proposed to overcome these limitations in isolation, developing a model that combines topology flexibility and sufficient accuracy across a range of power system tasks remains challenging. Existing GNN approaches also remain largely task- and grid-specific. Different models are typically trained for tasks which have strong dependence on each other, for example, PF and N-k contingency screening, which highlights the limited generalization capability of existing GNN approaches.

A foundation model is a large-scale transformer-based model which is pretrained on large, diverse datasets through self-supervision and learns transferable knowledge that generalizes to new, unseen tasks [4]. FMs have recently emerged as a path towards better generalization of ML models in power systems and have already demonstrated success in domains such as language, vision, and audio. Application-specific FMs have been proposed in power systems. [17] proposed time series FMs for electricity price data, [18], [19] investigated integrating existing LLMs into power system workflows, while [20] proposed a foundation model for power system dynamic simulations. While these approaches extend the generalization of ML to specific applications through custom-made FMs or existing large language models (LLMs), they still fall short of a general-purpose FM model which can be applied to a wide range of power system tasks. [4] discussed the idea of a multi-task grid foundation model (GridFM), while [21] proposed a GNN architecture towards a GridFM. While promising, these approaches apply to a limited set of tasks covered in the pretraining.

In this work, we investigate tabular foundation model (TFM) based on prior-fitted networks [22] as a promising general-purpose GridFM. TFMs are pretrained transformer models designed for making predictions on tabular datasets. These models have demonstrated impressive data efficiency and accuracy across a wide range of tasks [23]. Unlike classic ML, TFM works by in-context learning (ICL). That is, the labelled training data serves as examples/contexts for the model during inference. This is similar to how large language models infer responses from context provided in the problem. For a power grid, this means the same model can be used to predict for a new task, distributions of OP or grid topologies, given a relatively small number of labelled samples, all without model retraining. We previously demonstrated the use of TFM for power grid dynamic security assessment in [24].

In this paper, we propose an approach using TFM as a general-purpose neural solver for power grid steady-state analyses. The proposed approach formulates PF and voltage stability margin (VSM) prediction as tabular regression tasks and N-k contingency screening as a tabular classification task. Our main contributions are as follows:

  • We propose a TFM approach for power system steady-state analyses. We demonstrate the proposed approach on PF, VSM prediction and N-k contingency screening.

  • We present simple methods to extract topological features for the proposed TFM approach. The presented methods improve accuracy and scalability to larger grids.

  • We demonstrate the accuracy and robustness of our proposed approach through comprehensive case studies on the 118- and 2000-bus grids.

The remainder of the paper is structured as follows: Section 2 formulates the relevant problems, Section 3 presents our proposed methodology, Section 4 presents the case studies, Section 5 discusses the results, and Section 6 concludes the paper.

References (37)