Videos

Using Trained Machine Learning Predictors in Gurobi

Presenter
April 27, 2023
Abstract
In this talk, we are interested in using machine learning predictors to model relationships between variables of a MIP optimization model in Gurobi. The inputs of the trained machine learning model are MIP decision variables, and the predicted output can be used in the objective function or in other constraints. In November 2022 we released the first version of the open-source ""gurobi-machinelearning"" Python package on github.com. This package aims at making it easy to insert regression models trained by popular frameworks (e.g., scikit-learn, Keras, PyTorch) into a Gurobi model. The regression model may be a linear or logistic regression, a neural network, or based on decision trees. While the resulting optimization models have interesting potential applications, unfortunately they are often intractable with current technology. We present algorithmic improvements to Gurobi that improve performance on MIP models that include regression models--in particular optimization models with embedded ReLU neural networks. Following Fischetti and Jo (2018), we apply optimization based bound tightening on the aggregated input variable of each neuron, processing neurons in layers from the input to the output layer. But since the MIP solver is unaware of the neural network structure, we first need to identify the layers of the network from the MIP formulation. This is done by a clustering algorithm, which is also discussed in this talk.
Supplementary Materials