Online Mixed-Integer Optimization in Milliseconds

Dimitris Bertsimas, Bartolomeo StellatoarXiv 2019

TL;DR

This paper introduces a machine learning framework to solve complex Mixed-Integer Optimization (MIO) problems in milliseconds—orders of magnitude faster than state-of-the-art solvers like Gurobi. By predicting the "optimal strategy" (the set of active constraints and integer values) using a neural network, the authors transform an NP-hard problem into a simple linear system solution with predictable, real-time performance.

What Problem Does This Paper Address?

Mixed-Integer Optimization (MIO) is the workhorse of decision-making, used in everything from robot path planning to power grid management. However, MIO is notoriously difficult (NP-hard). While solvers have improved trillions of times over the last few decades, they are often still too slow for "online" applications—settings like autonomous driving or high-frequency trading where a solution is needed in a fraction of a second.

Standard solvers use Branch-and-Bound (B&B) algorithms, which have unpredictable execution times; they might solve one instance in 10ms and the next in 10 seconds. This lack of determinism is a dealbreaker for safety-critical real-time systems. The authors address this by exploiting a key observation: in online settings, we solve the same type of problem repeatedly with only slight parameter changes.

Methods

The authors extend the "Voice of Optimization" framework to create an end-to-end pipeline that replaces iterative solvers with a two-step online process:

  1. Strategy Prediction: A feedforward neural network (NN) takes the problem parameters as input and predicts the "optimal strategy." A strategy is defined as the combination of which constraints are "tight" (equalities at the optimum) and the specific values of the integer variables.
  2. Solution Decoding: Once the strategy is known, the original complex problem collapses into a simple equality-constrained quadratic program. For Mixed-Integer Quadratic Optimization (MIQO), this is solved by a single linear system (KKT conditions).

Key Innovations: * Strategy Pruning: To keep the number of possible strategies (classes for the NN) manageable, the authors developed a pruning technique. It reassigns rare strategies to more frequent ones, ensuring that the resulting suboptimality stays within a user-defined tolerance. * KKT Matrix Caching: In many cases, the KKT matrix depends only on the strategy, not the changing parameters. The authors factorize these matrices offline and cache them. Online, the "solver" is reduced to simple forward-backward substitutions—essentially just matrix-vector multiplications. * Parallel Evaluation: The NN outputs a ranking of the $k$ most likely strategies. The system can evaluate these in parallel, checking for feasibility and picking the one with the best objective value.

Datasets

The authors benchmarked their method (MLOPT) on three distinct problem types using a mix of simulated and historical data:

  • Fuel Cell Energy Management: Simulated closed-loop trajectories (10,000 steps) based on parameters from existing literature to balance energy between a capacitor and a fuel cell.
  • Portfolio Trading: Used historical S&P100 end-of-day data from 2008 to 2013. The task was to maximize risk-adjusted returns while enforcing a "sparsity" constraint (limiting the number of active stocks).
  • Motion Planning: A simulated double-integrator dynamical system navigating a 2D plane filled with 10 rectangular obstacles, requiring big-M formulations for obstacle avoidance.

Key Insights and Ideas

  • Structure over Values: Instead of trying to regress the exact numerical values of the solution (which is hard for NNs), the model predicts the combinatorial structure of the solution. This classification task is much more robust.
  • Predictable Latency: Unlike B&B solvers, the number of floating-point operations (flops) in this method is fixed and known beforehand. This provides the "predictable execution time" required for real-time engineering.
  • The Power of Repetition: The "Aha!" moment is realizing that even though an MIO problem has a massive theoretical search space, a specific real-world application usually only visits a tiny fraction of "optimal strategies." By learning this subset, you bypass the search entirely.

Key Results

  • Speed: MLOPT achieved 2 to 3 orders of magnitude speedups (100x to 1000x) compared to Gurobi’s global optimizer and its internal heuristics.
  • Real-Time Capability: In the motion planning and fuel cell examples, Gurobi often failed to meet the required sampling time (e.g., 0.1s or 1s), whereas MLOPT consistently delivered solutions in milliseconds.
  • Accuracy: Despite being a heuristic approach, the average suboptimality was comparable to or better than Gurobi’s own fast heuristic mode, with infeasibility remaining within acceptable tolerances ($10^{-4}$).

Limitations and Future Work

  • Training Overhead: The offline phase is heavy. It requires solving 100,000+ versions of the problem with a traditional solver to generate labels. This can take hours or even a full day.
  • Scaling to "Hard" MIO: The method currently relies on Gurobi to find the "ground truth" optimal solutions for training. If a problem is so hard that Gurobi takes hours to solve a single instance, generating a training set becomes impractical.
  • Memory Constraints: Caching factorized KKT matrices for thousands of strategies requires memory. While the authors found this manageable for their examples, it could be a bottleneck for extremely large-scale problems or memory-constrained embedded hardware.
  • Future Directions: The authors suggest exploring specialized NN architectures (like Graph Neural Networks) and incorporating "warm-starting" logic to use information from the previous time step's solution.

Summary updated

BibTeX
@misc{bertsimas2019online,
  author = {Dimitris Bertsimas and Bartolomeo Stellato},
  title = {{Online Mixed-Integer Optimization in Milliseconds}},
  year = {2019},
  eprint = {1907.02206},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.02206},
}
Figure