EnerGNN

EnerGNN logo

A graph neural network library for real-life energy networks.

Open source Python library applying graph neural networks to energy networks, hosted at LF Energy. It trains once across many operating conditions to deliver fast solutions, and models grid connections directly so trained models keep working through topology changes and relabeling.

About EnerGNN

EnerGNN is an open source Python library, built on JAX and Flax, for applying graph neural networks to full-scale energy network optimization and analysis problems. Its core innovation is the Hyper Heterogeneous Multi Graph (H2MG) data representation, purpose-built for large, complex industrial networks such as an electrical power transmission system, though applicable to other networked infrastructure such as gas or water as well.

EnerGNN provides the full modeling stack around H2MG, including model architectures, a problem interface, and a training framework, to enable “amortized optimization”: a model trained once on many cases can return a near-instant solution for any new operating condition, and stays valid as the grid’s structure changes through outages, expansion, or equipment renaming. A clear problem interface helps users apply EnerGNN to their own custom use cases, rather than requiring a from-scratch modeling effort for every new one.

EnerGNN is being used in multiple full-scale, real-life use cases at RTE, France’s transmission system operator.

The Challenge

Transmission operators increasingly need to run more contingency screenings, voltage studies, and topology evaluations than conventional numerical solvers can keep pace with, especially as networks grow more dynamic with distributed generation, electrification, and more frequent topology changes. Similar pressure shows up wherever an operator must repeatedly re-solve optimization or analysis problems across a large, structurally complex network, gas and water networks included.

Conventional solvers resolve every case from scratch. Graph neural networks offer a faster path by training once across many operating conditions and then returning a near-instant solution for any new one. The obstacle has been representation: most GNN approaches rely on a simplistic homogeneous graph representation – nodes and edges only – which does not hold for real network topologies. These are inherently hyper (connections joining more than two components at once), heterogeneous (many distinct component types), and multi (several components sharing one location).

EnerGNN’s H2MG data representation is designed specifically to close that gap, modeling transmission and other networks the way they actually exist so that trained models keep working as the network around them changes.

Key Features

Hyper Heterogeneous Multi Graph (H2MG) Data Representation

A data representation designed for large, complex industrial networks. It supports hyper-edges connecting more than two components, multiple component types (lines, transformers, generators, loads), and multiple components sharing a single location, mirroring how a real transmission network is actually wired.

Structure-Robust Graph Neural Network Library

A GNN library compatible with H2MG that remains robust to structural variation, including outages, construction of new infrastructure, and equipment renaming or reordering, so a trained model keeps working as the underlying network changes.

Amortized Optimization

Rather than resolving every operating condition from scratch, EnerGNN trains a graph neural network once across many operating conditions so it can return a near-instant solution for any new one.

Clear Interface for Custom Use Cases

A defined interface helps users apply EnerGNN to their own use cases beyond the transmission scenarios it was originally built for.

Built on JAX and Flax

EnerGNN is implemented as a Python package on top of JAX and Flax, and imports transmission network data directly from PyPowSyBl.

Key Contributors

  • RTE
  • University of Liège
  • INRIA
  • Université Paris-Saclay
  • Mines Paris-PSL
  • University College Dublin
  • InstaDeep

Use Cases

EnerGNN is used internally at RTE on full-scale French transmission data (7,000+ buses) across the following research and development use cases. These are R&D demonstrations, not production control-room deployment: EnerGNN’s outputs, such as risky-contingency lists or recommended setpoints, are designed to feed operator decisions rather than execute them directly.

Contingency Screening

Directly predicting the risk level of all contingencies in a single GNN forward pass.

Tertiary Voltage Control

Training a GNN to recommend actions to keep voltages within an admissible range.

Substation Topology Optimization

On an Optimal Substation Reconfiguration toy problem, EnerGNN reached an average of approximately 9.3 percent inter-region capacity improvement in approximately 200 milliseconds, compared to approximately 13.7 percent for a mixed-integer linear programming baseline that took approximately 10 minutes. The comparison illustrates EnerGNN’s value proposition: speed, with a trade-off in solution quality relative to a slower exact method.

Custom Use-Case Development

EnerGNN’s interface is designed to help users extend the library beyond RTE’s use cases to their own custom power system applications, and even to other domains such as gas networks, water networks, etc.

Collaboration Opportunities

EnerGNN welcomes participation from researchers and engineers working on:

  • Graph neural network methods for power system optimization and analysis
  • Data representations for large, complex, and dynamic industrial networks
  • Applications of EnerGNN’s H2MG representation and GNN library to new use cases
  • Academic and industrial research partnerships extending amortized optimization approaches to grid operations

Research groups and developers interested in applying graph neural networks to real-world energy network problems are encouraged to explore the project.

To get involved:

FAQ

What problem does EnerGNN solve? Transmission operators need to run more contingency screenings, voltage studies, and topology evaluations than conventional solvers can keep up with — a pressure that extends to other large, structurally complex energy networks too. EnerGNN trains a graph neural network once across many operating conditions so it can return a near-instant solution for any new one, and its H2MG data representation keeps that model valid as the network’s topology changes.

What is the Hyper Heterogeneous Multi Graph (H2MG) representation? H2MG is EnerGNN’s data representation for large, complex industrial networks. It supports hyper-edges connecting more than two components, multiple component types such as lines, transformers, generators, and loads, and multiple components sharing a location, so it mirrors how a transmission network is actually built and remains valid through outages, new construction, or renaming.

Is EnerGNN used in production? EnerGNN is used internally at RTE across full-scale use cases on French transmission data, including contingency screening, tertiary voltage control, and substation topology optimization. These are research and development demonstrations at a technology readiness level of TRL 3 to 5, not production control-room deployment. EnerGNN’s outputs are designed to feed operator decisions rather than execute them directly.

Who is developing EnerGNN? EnerGNN is developed at RTE, France’s transmission system operator, in collaboration with academic partners led by the University of Liège, with additional partnerships spanning INRIA, Université Paris-Saclay, Mines Paris-PSL, and University College Dublin, and InstaDeep.

How do I get started with EnerGNN? The source code is available on GitHub at https://github.com/energnn/energnn, and documentation is available at https://energnn.readthedocs.io/en/stable.