Artificial Intelligence
Microsoft’s GridSFM predicts power grid flow in milliseconds, targeting $20B in congestion savings
Microsoft's GridSFM foundation model predicts AC optimal power flow in milliseconds, enabling real-time grid scenario analysis. The open-source version covers grids up to 4,000 buses, with a premier tier for production-scale systems.

Microsoft has released a small foundation model called GridSFM that solves AC optimal power flow (AC-OPF) problems in transmission grids in milliseconds. Trained on more than 150 base grid topologies and roughly half a million scenarios, it tackles a long-standing pain point for grid operators: the trade-off between speed and accuracy.
AC-OPF is a notoriously complex, non-convex optimization problem. It figures out the cheapest way to dispatch generators while respecting the laws of physics on power flow, voltage limits, thermal constraints, and stability requirements. The numbers at stake are enormous: up to $20 billion a year in congestion costs and multi-terawatt-hours of renewable energy curtailment. Traditional solvers can take hours for utility-scale grids, which pushes operators into using approximations like DC-OPF, which ignore critical physics.
“GridSFM is designed as a drop-in alternative to DC-approximation in that fast approximation slot,” Microsoft said in its announcement. Unlike most neural surrogates for AC-OPF, which need to be retrained for each new grid topology, GridSFM generalizes across different grids within its supported size range without requiring a fresh training run for every new layout.
Microsoft is offering two versions. GridSFM-Open covers research-scale grids up to 4,000 buses. GridSFM-Premier handles production-scale systems up to 80,000 buses. In tests across 54 scenarios, GridSFM-Open hit a median cost gap of 2.23% compared to solver ground truth. The mean was 3.41%, and on 83% of scenarios, the gap stayed below 5%.
When used as a warm-start seed for traditional numerical solvers, GridSFM-seeded solves turned out to be 1.66 times faster than cold starts and 1.59 times faster than DC-OPF warm starts, measured by geometric mean. The model also adapts to new grids with limited fine-tuning. Just 10 scenarios brought the cost error down to 1.76% on an unseen 6,470-bus grid.
GridSFM-Open is available today for research use, along with code, model weights, and the accompanying GridSFM_US_Powergrid_dataset under an open license. Microsoft expects the biggest impact to come in contingency screening, transmission expansion planning, demand-siting analysis, and resilience studies during extreme weather events.