Towards Foundation Models for Mixed Integer Linear Programming

Sirui Li, Janardhan Kulkarni, Ishai Menache, Cathy Wu, Beibin Li

TL;DR

Machine learning models designed to accelerate Mixed Integer Linear Programming (MILP) solvers typically only work on specific, narrow problem types. This paper introduces MILP-Evolve, an LLM-powered evolutionary framework that generates a massive, diverse dataset of synthetic MILP problems. This data engine enables the training of a single "foundation model" that successfully generalizes across unseen optimization tasks.

What Problem Does This Paper Address?

Mixed Integer Linear Programming (MILP) is a mathematical framework used to model complex decision-making problems across industries—from supply chain logistics to energy grid management. Because solving MILPs is NP-hard, researchers have increasingly turned to machine learning to learn heuristics that speed up the solving process.

However, current ML approaches suffer from a severe generalization problem. A model trained to solve "Set Cover" problems will fail when handed a "Facility Location" problem. This is in stark contrast to fields like NLP or computer vision, which have moved toward general-purpose foundation models. The bottleneck for MILP is data: existing public datasets lack the massive diversity of problem structures needed to train a generalized model. The authors tackle this by synthetically generating a vast, diverse dataset of MILP classes to train a single, generalizable model.

Methods

To overcome the data bottleneck, the authors introduce MILP-Evolve, a data generation pipeline that uses Large Language Models (like GPT-4o) to write optimization code.

The MILP-Evolve data synthesis pipeline and downstream learning tasks.
  • Evolutionary Prompting: Starting with 8 standard "seed" MILP classes (written as Python code), the LLM is prompted to iteratively mutate, cross-over, add constraints to, or completely rewrite the code to generate new problem classes.
  • Rigorous Filtering: Because LLM-generated code is often buggy or mathematically trivial, the pipeline includes an automated parameter search and filtering step. It runs the generated MILPs through a solver and discards anything that is infeasible or solves too quickly.
  • Model Architecture: MILP instances are represented as bipartite graphs (variables connected to constraints). The authors use a Graph Convolutional Network (GCN) combined with an attention mechanism to capture both local graph structure and global problem dependencies.

The authors evaluate their approach on three distinct tasks:

  1. Integrality Gap Prediction: Predicting how close a problem's linear programming relaxation is to its true integer optimum (a measure of problem difficulty).
  2. Learning to Branch: Imitating computationally expensive "strong branching" heuristics to decide which variables to split on during the Branch-and-Bound solving process.
  3. Language-MILP Contrastive Learning: A novel task (similar to CLIP for images) that aligns the mathematical graph embeddings of a MILP with natural language descriptions of the problem.

Datasets

  • MILP-Evolve Dataset (New): Over 1,000 diverse MILP problem classes generated by the LLM pipeline, yielding millions of instances for training and testing.
  • Seed Dataset: 8 standard benchmark classes (e.g., Maximum Independent Set, Combinatorial Auction) used to initialize the evolution and serve as a baseline.
  • MIPLIB 2017: A standard, highly heterogeneous benchmark dataset of real-world MILPs, used strictly to evaluate zero-shot and transfer learning capabilities.

Key Insights and Ideas

  • Diversity > Quantity: The authors found that scaling up the number of distinct problem classes improves a model's ability to generalize much more than simply generating more instances of the same few classes.
  • LLMs are capable math data generators: While LLMs struggle to solve complex math directly, they are highly effective at generating complex, structurally valid mathematical optimization problems when guided by evolutionary prompts and strict execution-based filtering.
  • A unified MILP representation is possible: Contrary to the prevailing practice of training class-specific models, a single GNN with attention can learn shared structural representations across wildly different optimization problems.
  • MILP as a new multimodal modality: By successfully aligning raw mathematical matrices (variables and constraints) with natural language descriptions, the authors open the door to making highly abstract optimization problems interpretable to non-experts.

Key Results

Models trained on the diverse MILP-Evolve dataset significantly outperformed baselines trained only on seed classes or standard data augmentation techniques (like VAEs).

Performance comparison between SOTA baselines and the proposed foundation model approach across three key tasks.
  • Integrality Gap Prediction: Achieved a 5.8x improvement in correlation on unseen problem classes.
  • Language Alignment: Achieved a 1.92x improvement in accuracy (reaching 70.54% on a 4-way classification task), vastly outperforming GPT-4o's ability to interpret the raw math files directly.
  • Learning to Branch: Solved 1.42x more problems to optimality within the time limit compared to baselines.
  • Transfer Learning: When fine-tuned on the notoriously difficult MIPLIB benchmark, the pre-trained model converged faster and achieved a lower deviation error (21.56%) than models trained from scratch (28.21%).

Limitations and Future Work

  • Not yet a true "Foundation Model": While the models generalize across problem classes, the authors still trained separate models for the three different tasks. Unifying these into a single model that handles all tasks simultaneously is a key next step.
  • MIPLIB Branching Evaluation: The authors omitted the "learning to branch" task on the MIPLIB dataset because the instances were either trivially fast or impossibly slow to solve within their 200-second time limit, indicating that even more compute and pre-training are needed for the hardest real-world benchmarks.
  • Future Directions: The authors suggest extending this framework to other solver tasks, like generating cutting planes or configuring solver parameters, and eventually generating reliable MILP formulations directly from text prompts.

Summary updated

BibTeX
@inproceedings{li2025towards,
  author = {Sirui Li and Janardhan Kulkarni and Ishai Menache and Cathy Wu and Beibin Li},
  title = {{Towards Foundation Models for Mixed Integer Linear Programming}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=6yENDA7J4G},
}
Figure