Table of Contents
Fetching ...

Code Retrieval for MILP Instance Generation

Tianxing Yang, Huigen Ye, Hua Xu

TL;DR

MILP solvers, especially learning-based ones, require large, high-quality MILP instance data, which is scarce and often class-specific. The authors reformulate MILP Instance Generation as MILP Code Generation, building a large MILP library via MILP-Evolve, and train a contrastive MILP embedding model to derive MILP-EmbedSim, a cross-scale similarity metric. They then deploy MILP-Retrieval, a training-free code-retrieval pipeline that locates and executes generation code to produce new MILP instances similar to a target, enabling unified multi-class generation. Empirically, MILP-Retrieval outperforms baselines on both MILP Code Generation and MILP Instance Generation tasks, offering a scalable, interpretable and efficient path to generating data for learning-based MILP solvers.

Abstract

Mixed-Integer Linear Programming (MILP) is widely used in fields such as scheduling, logistics, and planning. Enhancing the performance of MILP solvers, particularly learning-based solvers, requires substantial amounts of high-quality data. However, existing methods for MILP instance generation typically necessitate training a separate model for each problem class and are computationally intensive when generating new instances. To address these limitations, we reformulate the MILP Instance Generation task as MILP Code Generation task, enabling efficient, flexible, and interpretable instance generation through code. Since MILP instances generated from code can vary significantly in scale, we introduce MILP-EmbedSim, a new similarity metric that accurately measures the similarity between instances of varying sizes within the same problem class. Leveraging this metric, we propose MILP-Retrieval, a pipeline that retrieves generation code from library to produce MILP instances highly similar to target instance. MILP-Retrieval outperforms baselines in both MILP Code Generation and Instance Generation tasks, provides a novel perspective on MILP instance generation and opens new possibilities for learning-based solvers.

Code Retrieval for MILP Instance Generation

TL;DR

MILP solvers, especially learning-based ones, require large, high-quality MILP instance data, which is scarce and often class-specific. The authors reformulate MILP Instance Generation as MILP Code Generation, building a large MILP library via MILP-Evolve, and train a contrastive MILP embedding model to derive MILP-EmbedSim, a cross-scale similarity metric. They then deploy MILP-Retrieval, a training-free code-retrieval pipeline that locates and executes generation code to produce new MILP instances similar to a target, enabling unified multi-class generation. Empirically, MILP-Retrieval outperforms baselines on both MILP Code Generation and MILP Instance Generation tasks, offering a scalable, interpretable and efficient path to generating data for learning-based MILP solvers.

Abstract

Mixed-Integer Linear Programming (MILP) is widely used in fields such as scheduling, logistics, and planning. Enhancing the performance of MILP solvers, particularly learning-based solvers, requires substantial amounts of high-quality data. However, existing methods for MILP instance generation typically necessitate training a separate model for each problem class and are computationally intensive when generating new instances. To address these limitations, we reformulate the MILP Instance Generation task as MILP Code Generation task, enabling efficient, flexible, and interpretable instance generation through code. Since MILP instances generated from code can vary significantly in scale, we introduce MILP-EmbedSim, a new similarity metric that accurately measures the similarity between instances of varying sizes within the same problem class. Leveraging this metric, we propose MILP-Retrieval, a pipeline that retrieves generation code from library to produce MILP instances highly similar to target instance. MILP-Retrieval outperforms baselines in both MILP Code Generation and Instance Generation tasks, provides a novel perspective on MILP instance generation and opens new possibilities for learning-based solvers.
Paper Structure (33 sections, 8 equations, 9 figures, 7 tables)

This paper contains 33 sections, 8 equations, 9 figures, 7 tables.

Figures (9)

  • Figure 1: In MILP instance generation, (a) heuristic algorithms are used to create problem instances; (b) recent approaches train a separate model for each problem class to reconstruct problem structures; (c) our method retrieves&tunes MILP formulation code, and uses it directly generates problem instances.
  • Figure 2: Relationships among the different forms of MILP data.
  • Figure 3: We begin by constructing the MILP libraries Evolve/Train and Evolve/Test. Using Evolve/Train, we train an MILP embedding model following the paradigm of contrastive learning. Based on this model, we propose a novel similarity metric called MILP-EmbedSim. Furthermore, we reformulate MILP Instance Generation as MILP Code Generation, where MILP-Retrieval retrieves code from Evolve/Train that can generate problems similar to the target problem. The retrieved code is then directly executed to generate the desired problem instances.
  • Figure 4: The Text-to-MILP and MILP-to-Text Accuracy Rate curves with respect to epoch number.
  • Figure 5: Visualization results of Evolve/Train dataset and TSP instances.
  • ...and 4 more figures