NeurIPS 2026QuestionsPapersAreasAboutMarkdown

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

Niki Triantafyllou, Maria Papathanasiou

NeurIPS page · OpenReview · Open on the map

Category: Optimization & Federated Learning › Neural Combinatorial Optimization · Type: new method · Keywords: energy-based models, combinatorial optimization, mixed-integer programming, contrastive learning, zero-shot constraints

Summary

EnerGNN learns optimization-compatible energy functions over binary configurations using contrastive learning, enabling exact constrained combinatorial inference via a mixed-integer programming layer.

Explained to a 5-year-old

We teach a computer a game where it must pick the best choices from many options. The computer learns a secret score that tells which choices are good. When it plays, it uses a special rule to make sure the choices follow the rules. This helps it find the right answer quickly. It works for problems like packing items or buying things together.

Explained to a 5-year-old, longer

Imagine you have a puzzle where you need to choose some items so that they fit together nicely. Usually solving such puzzles is hard and can take a long time. This paper creates a new way to help computers solve these puzzles better. It teaches the computer to give each possible set of choices a score that shows how good it is. The computer learns which scores belong to good solutions and which belong to bad ones. When the computer needs to solve a new puzzle, it uses a special rule that makes sure the choices follow all the rules. This rule works like a game referee that only allows moves that are allowed. The computer can also add new rules without having to learn everything again. It can handle bigger puzzles that were too hard before. The method works for many kinds of problems, like packing boxes, buying items, or planning medicine supplies. By using this learned scoring and rule, the computer finds answers that are almost perfect. This makes solving tough puzzles faster and more reliable for real-world uses.

For a technical reader

EnerGNN learns an energy function that scores binary configurations so that good solutions have low scores. During training, it uses contrastive learning to shape the energy landscape based on optimal solutions. At inference, a mixed-integer programming layer enforces constraints and finds the best configuration using the learned energy. The framework can be applied directly to decision problems or decomposed into a learned part and an exact solver. It also supports zero-shot addition of new constraints without retraining.

Problem

Exact constrained combinatorial inference is computationally challenging, requiring solutions that satisfy hard constraints while maintaining optimality. Learning energy functions that encode constraints and guide optimization can improve solution quality and scalability.

Method

The approach learns an energy function over binary configurations using optimality-aware contrastive learning, shaping the energy landscape so that high-quality feasible solutions occupy low-energy regions. At inference, a mixed-integer programming (MIP) layer enforces hard constraints and deployment-time restrictions. The framework can be applied either directly to decision problems or via strategic decomposition where the learned energy handles complicating variables and an exact solver solves the downstream problem.

Results

The approach 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.

Contributions

It introduces a learnable energy-based framework that is optimization-compatible, enabling exact inference via a MIP layer and supporting zero-shot constraint adaptation. The paper also provides empirical evaluation on three combinatorial optimization problems, demonstrating sub-1% primal gaps and scalability.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction