Unsupervised Neural Langevin Sampler for Mixed Integer Linear Programming

Yixin Huang, Shengyu Feng, Yiming YangICML 2026

TL;DR

This paper introduces a novel unsupervised neural sampler for Mixed Integer Linear Programs (MILPs) that learns to optimize integer variables while using an exact solver for continuous ones. This approach achieves 100% feasibility without costly post-processing and matches or surpasses supervised methods, offering a scalable solution for complex optimization problems.

What Problem Does This Paper Address?

Combinatorial optimization (CO) problems, especially Mixed Integer Linear Programs (MILPs), are notoriously difficult to solve efficiently. Traditional methods are computationally expensive, and existing neural network approaches often struggle with two key challenges: they heavily rely on expensive labeled data for training and require hand-crafted heuristics to ensure feasible solutions. This is particularly problematic for MILPs, which combine discrete (integer) and continuous variables, making feasibility a significant hurdle. The paper aims to bridge this gap by developing an unsupervised method that can effectively handle MILPs, producing feasible and high-quality solutions without needing labeled data or complex post-processing.

Methods

The core of the proposed method is an unsupervised neural Langevin sampler. Instead of trying to model both integer and continuous variables simultaneously with a neural network, the framework decomposes the problem. It focuses on learning to optimize the integer variables using a neural network guided by Langevin dynamics. For the continuous variables, it leverages an exact linear programming (LP) solver.

The neural network is trained to minimize an energy function that encodes both the objective value and constraint satisfaction. This energy function is derived from the MILP formulation, and its gradient is computed using the envelope theorem, allowing for end-to-end differentiable training. The framework also incorporates mechanisms to handle both feasible and infeasible LP subproblems that arise during the optimization process. The training utilizes three proposed loss functions: REINFORCE loss, Erdős loss, and Gumbel loss, with the Erdős loss showing the best overall performance.

Datasets

The paper evaluates its method on three widely studied MILP benchmarks:

  • Capacitated Facility Location Problem (CFLP): Two datasets were generated, CFLP-(100, 100) and CFLP-(200, 200), with 100 and 200 facilities/customers respectively. These datasets are generated with optimal labels.
  • Item Placement (IP): Datasets are directly adopted from existing work.
  • Load Balancing (LB): Datasets are directly adopted from existing work.

The IP and LB datasets are noted to contain suboptimal labels due to the computational complexity of obtaining exact optima, highlighting the advantage of an unsupervised approach.

Key Insights and Ideas

  • Decomposition is Key: By separating the optimization of integer variables (handled by the neural network) from continuous variables (handled by an exact LP solver), the model isolates the combinatorial hardness and simplifies the learning task.
  • Unsupervised Learning for MILPs: The framework demonstrates that high-quality, feasible solutions for MILPs can be achieved without relying on expensive labeled data, a significant advantage for real-world applications where such data is scarce.
  • Langevin Dynamics for Discrete Optimization: Adapting Langevin dynamics, a powerful continuous sampling method, to discrete domains via a learned energy function provides a principled way to explore the solution space.
  • Envelope Theorem for Differentiability: Leveraging the envelope theorem allows for the computation of gradients for the parameterized LP subproblems, enabling end-to-end training of the neural network.
  • Handling Infeasibility Gracefully: The method includes specific strategies to manage infeasible LP subproblems, pushing the sampler towards feasible regions rather than getting stuck.

Key Results

  • 100% Feasibility: The proposed method consistently achieves 100% feasibility on the CFLP datasets without any expensive post-processing.
  • Competitive Performance: The unsupervised approach matches or outperforms supervised solvers on benchmark datasets, particularly in terms of speed and feasibility.
  • Efficiency: The method is significantly more time-efficient than diffusion-based solvers, producing high-quality approximate solutions in only a few iterations.
  • Erdős Loss Superiority: The Erdős loss function demonstrated the best overall performance on the CFLP datasets.
  • Downstream Solver Performance: When used as a warm-start generator for downstream solvers, the proposed sampler consistently yields superior performance compared to random initialization or short-budget Gurobi runs.

Limitations and Future Work

  • Binary Variables Only: The current work focuses exclusively on MILPs with binary integer variables. The authors acknowledge that extensions to general integer variables are natural but leave this for future work due to complexity.
  • Suboptimal Labels: While the method performs well on datasets with suboptimal labels (IP, LB), its performance relative to supervised methods might be affected by the quality of these labels.
  • Further Exploration of Loss Functions: While Erdős loss showed promise, further investigation into other loss functions and their impact on performance could be beneficial.

Summary updated

BibTeX
@inproceedings{huang2026unsupervised,
  author = {Yixin Huang and Shengyu Feng and Yiming Yang},
  title = {{Unsupervised Neural Langevin Sampler for Mixed Integer Linear Programming}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=R3za7ajCwo},
}
Figure