Abstract
Constraint ordering plays a critical role in the efficiency of Mixed-Integer Linear Programming (MILP) solvers, particularly for large-scale problems where poorly ordered constraints trigger increased LP iterations and suboptimal search trajectories. This paper introduces CLCR (Contrastive Learning-based Constraint Reordering), a novel framework that systematically optimizes constraint ordering to accelerate MILP solving. CLCR first clusters constraints based on their structural patterns and then employs contrastive learning with a pointer network to optimize their sequence, preserving problem equivalence while improving solver efficiency. Experiments on benchmarks show CLCR reduces solving time by 30% and LP iterations by 25% on average, without sacrificing solution accuracy. This work demonstrates the potential of data-driven constraint ordering to enhance optimization models, offering a new paradigm for bridging mathematical programming with machine learning.
Introduction
Mixed-Integer Linear Programming (MILP) is a fundamental tool in industrial optimization, powering critical systems in airline scheduling, supply chain management, and logistics. While the mathematical solution to an MILP problem is independent of the order in which constraints are defined, the performance of modern solvers—such as SCIP or Gurobi—is highly sensitive to this sequence.
Constraint ordering impacts three primary solver stages: presolving (where redundancies are identified), heuristics (which find initial feasible solutions), and Linear Programming (LP) operations (where the Simplex method's basis selection is influenced by input order). Historically, these orders were hand-crafted by experts; CLCR seeks to automate this process using machine learning.
Methodology
The CLCR framework introduces a three-step pipeline designed to handle large-scale problems efficiently without the instability often associated with reinforcement learning.
- Clustering and Representation: To manage the computational cost of reordering thousands of constraints, CLCR uses K-means clustering to group constraints by structural patterns (coefficients and right-hand side values). A representative feature vector is then created for each cluster using average pooling.
- Pointer Network-Based Reordering: These cluster features are processed by a Pointer Network, which is specifically designed to output permutations of its input, determining the optimal sequence for the functional groups.
- Contrastive Learning: The model is trained using a contrastive approach rather than traditional reinforcement learning. By generating "positive" samples (sequences that accelerate the solver) and "negative" samples (sequences that slow it down), the model learns to maximize the likelihood of high-performance orderings.
Experimental Evaluation
CLCR was evaluated across nine diverse datasets, including six SurrogateLIB datasets (e.g., Tree Planting, City Manager) featuring complex constraints derived from ML models, and three traditional NP-hard combinatorial benchmarks: Set Covering, CORLAT, and FCMCNF.
Key Results
CLCR demonstrated significant performance improvements across all tested metrics. On average, solving time was reduced by 30%, with specific datasets like "Tree Planting" seeing reductions exceeding 70%.
Beyond raw speed, CLCR reduced LP iterations by 25% on average, indicating a direct improvement in the convergence of the Simplex method. In complex combinatorial problems like CORLAT, the number of branch-and-bound nodes processed dropped by over 60%, demonstrating that the reordered constraints allow the solver to navigate the search tree far more efficiently.
Conclusion and Future Work
CLCR proves that the "arbitrary" order of constraints in standard benchmarks often carries a significant performance penalty. By leveraging structural awareness and contrastive learning, CLCR provides a robust, data-driven method for solver optimization. Future research will focus on addressing problem symmetry, where highly interchangeable constraints may require a symmetry-aware discriminator to determine when reordering is most beneficial.
Summary updated