Learning Mixed-Integer Linear Programs from Contextual Examples

Mohit Kumar, Samuel Kolb, Luc De Raedt, Stefano TesoarXiv 2021

Mixed-Integer Linear Programs (MILPs) are fundamental tools in operations research, powering critical systems from logistics to energy management. Despite their utility, designing these models requires deep domain expertise. While learning MILPs from historical data is a promising alternative, real-world data is often "contextual"—solutions are frequently constrained by temporary, unrecorded conditions. This paper introduces MISSLE (Mixed-Integer Search with Surrogate Loss and Examples), a hybrid algorithm designed to robustly recover MILP models from such contextual examples.

The Challenge: Learning Under Context

Traditional machine learning assumes that observed data points represent a consistent underlying distribution. However, in operational settings, a "good" solution today might be "bad" tomorrow due to transient factors—like a temporary equipment failure or a sudden staffing shortage. If an algorithm ignores this context, it may learn permanent, incorrect constraints (e.g., "never run more than two machines simultaneously") that do not reflect the true, long-term rules of the system.

Furthermore, learning MILPs is mathematically difficult. The standard "0-1 loss" (correct vs. incorrect) creates a non-differentiable landscape with zero gradients, rendering standard optimization techniques like Gradient Descent ineffective.

The MISSLE Methodology

MISSLE addresses these hurdles through a combination of contextual modeling and a novel hybrid search strategy.

Contextual Formulation

The authors define a framework where each training example is associated with a specific "context"—additional linear constraints that were active when the example was generated. By explicitly accounting for these temporary boundaries, MISSLE can distinguish between universal constraints and situational ones.

Visualizing contextual examples: The original feasible region (left) is restricted by different contexts ψ (middle and right), which define the validity of observed points.

To overcome the "flat" landscape of MILP optimization, MISSLE employs a smooth surrogate loss function. This function measures the Euclidean distance of a point from the feasible boundary and its "regret"—the cost difference between the example and the theoretical optimum.

The algorithm then uses a hybrid approach:

  1. Stochastic Local Search (SLS): Navigates the discrete combinatorial space.
  2. Gradient Descent (GD): Uses the gradient of the surrogate loss to guide the SLS, "tilting" the search landscape toward feasible and high-performing regions.

Experimental Evaluation

The researchers evaluated MISSLE against pure Stochastic Gradient Descent (SGD) and pure Stochastic Local Search (SLS) using synthetic datasets. They generated five ground-truth MILP models, each with 250 random contexts. For every context, the dataset included one positive example (optimal) and two negative examples (sub-optimal or infeasible).

Key Results

MISSLE consistently outperformed baseline methods across all performance metrics, demonstrating both higher accuracy and faster convergence.

Performance comparison of MISSLE vs. SGD and SLS baselines. MISSLE (red) achieves superior recall, precision, and regret over time.
  • Accuracy: Within a 60-minute computation window, MISSLE achieved approximately 80% recall and 83% precision in reconstructing the true feasible region.
  • Regret: The learned models produced solutions with a regret of only 2% relative to the ground truth, significantly outperforming the pure SLS baseline, which exhibited over three times as much regret.
  • Efficiency: By leveraging gradients to guide local search, MISSLE avoided the local minima that stalled pure SGD and the "blind" search patterns of pure SLS.

Conclusion and Future Directions

MISSLE represents a significant step toward automated model discovery in complex decision environments. By integrating contextual awareness with a gradient-guided hybrid search, it effectively bridges the gap between discrete optimization and continuous learning. Future work will focus on scaling the algorithm to industrial-sized problems and incorporating meta-information to better distinguish between different types of negative examples.

Summary updated

BibTeX
@misc{kumar2021learning,
  author = {Mohit Kumar and Samuel Kolb and Luc De Raedt and Stefano Teso},
  title = {{Learning Mixed-Integer Linear Programs from Contextual Examples}},
  year = {2021},
  eprint = {2107.07136},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.07136},
}
Figure