All models

GNN-OPF

A graph neural network that learns optimal power flow setpoints for grid generators by imitation.

Graphs and geometry · 46 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (31 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
46.5K
Operations
46
Framework
PyTorch
Recurrent
No
Published
ICASSP 2020
Cited by
163 (as of 5 October 2026)
Authors
Damian Owerko, Fernando Gama, Alejandro Ribeiro
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m14384
Graph hash
4201f9f633fc70f03fd2fe94133fb563801f3b2612cce80969be1f10985c5e53
Skeleton hash
7aaec5f677728ef8dbcc57bac1ab6f60694a778bbfcdd2f80928218622c962cb
Architecture hash
379c0d4055fe003f62690e88781e2e76975c900913fb4129c303613284a0dc88
Diagram SHA-256
d00d2a4f7a41a882a7e592298778546b8ac6127ccff5eb6df6830e1797f435b4
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

GNN-OPF is a graph neural network that approximates optimal power flow, the problem of deciding how much power each generator in a grid should produce to meet a given demand at the lowest cost. The problem is non-convex because of the sinusoidal nature of electrical generation, which makes it hard to solve exactly. The paper's answer is to train a GNN, a localized and scalable parametrization of network data, under the imitation learning framework to copy a given optimal solution. The expensive optimal solution then only has to be computed for the network states in the training set.

The input is a graph signal over the buses: each node carries 4 measurements or features, and the grid's adjacency is the graph support. The captured member follows the paper's global GNN: two graph convolutional layers with 4 filter taps each, outputting 128 and then 64 features per node. A final fully connected readout maps the 64 features at every node to one value per generator, which the paper notes makes this variant nonlocal because it mixes features across all nodes. The traced instance is built on the IEEE-30 case, where the output is the setpoint for each of its six generators.

Training targets come from solving AC optimal power flow with IPOPT in Pandapower, with the sub-optimal starting state obtained by a DC optimal power flow. The datasets hold 8,016 samples for IEEE-30 and 13,129 for IEEE-118, split 80 percent for training and 20 percent for testing. On IEEE-30 the global GNN improves on a global MLP by 47 percent in relative error, and on IEEE-118 by 213 percent. Where IPOPT takes 2.16 s on IEEE-30 and 18 s on IEEE-118, the global GNN takes 48 µs and 50 µs.

The same repository later grew an unsupervised follow-up that minimizes the generation cost directly and adds a differentiable barrier method for the grid's electrical constraints. The code for the imitation-learning paper is archived in the repository's icassp branch, which its author calls outdated and does not recommend.

Key idea. A local, scalable graph neural network trained by imitation learning to approximate interior-point optimal power flow solutions, so the costly solver runs only on the training set.

  • GNN-OPF
  • optimal power flow
  • OPF
  • graph neural network
  • power grid
  • IEEE-30
  • IEEE-118
  • imitation learning
  • Owerko

AI-written summary, checked automatically against its sources; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{owerko2019optimalpowerflowusing,
      title={Optimal Power Flow Using Graph Neural Networks}, 
      author={Damian Owerko and Fernando Gama and Alejandro Ribeiro},
      year={2019},
      eprint={1910.09658},
      archivePrefix={arXiv},
      primaryClass={eess.SY},
      url={https://arxiv.org/abs/1910.09658}, 
}