Artificial Intelligence

Microsoft releases gridsfm, a lightweight foundation model for power grid optimization

Microsoft's GridSFM is a neural network that solves AC optimal power flow (AC-OPF) in milliseconds across grids of up to 80,000 buses, offering a fast, accurate approximation that can serve standalone or as a warm-start for traditional solvers. The open-source model aims to transform grid operations from reactive to proactive optimization.

Emmanuel Fabrice Omgbwa Yasse

2026-07-03 · 3 min read

Microsoft releases gridsfm, a lightweight foundation model for power grid optimization

Microsoft has released GridSFM, a lightweight foundation model designed to solve AC optimal power flow (AC-OPF) problems in transmission power grids in milliseconds. The model addresses a critical bottleneck in grid operations, where traditional solvers can take hours to compute optimal dispatch for large grids, forcing operators to rely on approximations that sacrifice accuracy.

GridSFM is a single neural network that approximates AC-OPF across grids ranging from 500 to 80,000 buses. It takes standard AC-OPF inputs, grid topology, generator and load specifications, transmission line constraints, and outputs an operating point along with a feasibility verdict. According to Microsoft, the model can evaluate orders of magnitude more scenarios in real time, shifting grid operations from reactive response to proactive optimization.

Two tiers for different scales

The release includes two tiers: GridSFM-Open, for research-scale grids up to 4,000 buses, and GridSFM-Premier, for production-scale systems up to 80,000 buses. GridSFM-Open is available for research use under an open license, along with accompanying code and weights.

Microsoft trained the model on over 150 base grid topologies and roughly half a million scenarios, forcing it to generalize rather than memorize. On a test set of 54 grids, GridSFM-Open achieves a median cost gap of 2.23% compared to ground-truth solver solutions, with 83% of scenarios within a 5% gap.

Performance and accuracy

GridSFM performs comparably to the industry-standard DC-OPF approximation in terms of cost accuracy, with a similar per-scenario cost-gap distribution. However, unlike DC-OPF, it produces a full AC operating point including voltages and reactive power, enabling operators to directly assess grid stability and congestion.

The model also serves as an effective warm-start for traditional numerical solvers. Microsoft reports that GridSFM-seeded warm starts beat cold starts by a geometric mean factor of 1.66× across test scenarios, and outperform DC-OPF warm starts by 1.59×. The largest per-grid speedups exceed 7× on meshed transmission grids.

Feasibility screening

GridSFM includes a per-scenario stress score that can quickly identify infeasible operating conditions, scenarios where load cannot be served within voltage bounds, thermal limits, or generator capacities. The stress score achieves a binary accuracy of 94.5% on genuinely feasible scenarios and 96.1% on genuinely infeasible ones across the test set.

This capability allows operators to triage scenarios: very-confident feasible cases pass through to indicative dispatch, very-confident stressed scenarios go to engineering review, and the borderline middle band is sent to a solver for verification.

Generalization and fine-tuning

Microsoft tested GridSFM on a 6,470-bus grid never seen during training. In a zero-shot setting, cost error increased to 14%. However, with just 10 fine-tuning scenarios, cost error dropped to 1.76% and feasibility detection exceeded 90%. After 1,000 scenarios, cost error fell to 1.12% and voltage variation reached 91% of the true signal.

According to Microsoft, the model already captures AC-OPF physics during pre-training. Adapting to a new grid is mostly a matter of calibration rather than relearning, making the released checkpoint a practical starting point for users to fine-tune on their own topologies.

Broader impact

Microsoft believes GridSFM can address the computational bottleneck that historically forced grid operators to choose between solving a small number of scenarios accurately or running thousands through faster but less accurate approximations. The decisions governed by AC-OPF directly impact up to $20 billion per year in congestion costs and multi-terawatt-hour renewable curtailment.

The company released the GridSFM_US_Powergrid_dataset earlier, and now adds the first open AC-OPF model supporting multiple topologies, completing a stack of open topology data, open code, and open weights for ML-driven grid simulation and planning. Applications expected to benefit include contingency screening, transmission expansion planning, demand-siting analysis, and resilience studies under extreme weather.

Microsoft noted that its next release will focus on tighter accuracy on out-of-distribution grids, continued accuracy improvements across all prediction channels, and multi-snapshot extensions including unit commitment and weather-conditioned scenario generation.