cs.LGOct 24, 2026

EnerGNN: Learning Optimization-Compatible Energy Functions for Exact Constrained Combinatorial Inference

Authors: Niki Triantafyllou, Maria M. Papathanasiou

Organizations: Sargent Centre for Process Systems Engineering, Department of Chemical Engineering Imperial College London

Abstract

Learning-based approaches to combinatorial optimization often predict solutions directly or use predictions to restrict search, while expressive energy-based models typically rely on approximate inference. We introduce EnerGNN, a framework that learns energy functions over complete binary configurations and minimizes them under explicit hard constraints through mixed integer programming (MIP). EnerGNN combines a graph neural network encoder with an optimization-compatible readout and a nonlinear energy head, enabling exact constrained inference over the learned energy. An optimality-aware contrastive loss trains the energy to reflect solution quality and constraint violations. Across Quadratic Knapsack, Combinatorial Auctions, and a personalized cell therapy supply chain problem, EnerGNN achieves near-optimal solutions with 100% feasibility. On the supply chain problem, it achieves a 0.05% mean primal gap and a 17.4×\times speedup over the monolithic MIP. The learned energy also generalizes to larger instances and supports zero-shot constraint injection, adapting to changing constraints without retraining while preserving feasibility.

Figures & tables

Appendix figures & tables12 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Graph neural networks and the energetic cavity method for combinatorial optimization

    Sep 7, 2026Joe Bacchus George, George T. CantwellGraph Neural NetworksCombinatorial Optimization

  2. A General Neural Backbone for Mixed-Integer Linear Optimization via Dual Attention

    Jan 8, 2026Peixin Huang, Yaoxin Wu, Yining Ma +3Graph Neural NetworksMixed-Integer Linear Programming