EnerGNN: Learning Optimization-Compatible Energy Functions for Exact Constrained Combinatorial Inference
Abstract
This paper presents EnerGNN, an energy-based framework for exact constrained combinatorial inference. The central idea is to learn an optimization-compatible energy over binary configurations, so that hard constraints and deployment-time restrictions can be enforced by a mixed-integer programming (MIP) layer at inference time. Training shapes the energy landscape using optimality-aware contrastive learning so that high-quality feasible solutions occupy low-energy regions. We evaluate EnerGNN in two settings: direct decision problems, where the learned energy is optimized over the full binary decision vector, and strategic decomposition problems, where it is optimized over complicating binary variables and an exact solver handles the downstream problem. Across Quadratic Knapsack, Combinatorial Auctions, and a personalized medicine supply chain problem, EnerGNN achieves primal gaps below 1\% on most test instances, generalizes to larger problem instances without retraining, and supports zero-shot constraint injection by modifying only the inference MIP.