Introduction
Modern decision-making pipelines often rely on machine learning (ML) to predict parameters that serve as inputs to downstream optimization problems. Examples include predicting energy demand for grid scheduling or stock prices for portfolio management. Traditionally, these systems use a "two-stage" approach: first, an ML model is trained to minimize prediction error (e.g., Mean Squared Error); then, the predictions are fed into an optimizer.
However, this decoupling is suboptimal. A small prediction error in a critical constraint can lead to a significant loss in the final decision quality, whereas a large error in a non-binding parameter might be irrelevant. To address this, "end-to-end" training aims to minimize the task loss—the actual regret of the resulting decision. The primary challenge is that optimization layers, particularly Linear Programs (LPs), are typically non-differentiable or have uninformative gradients.
Methodology: The IntOpt Framework
The authors introduce IntOpt, a method that embeds optimization solvers as differentiable layers within deep learning architectures. IntOpt addresses the differentiability of LPs through two key innovations:
- Logarithmic Barrier: By incorporating a log-barrier term ($-\lambda \sum \ln(x_i)$), the LP objective becomes twice differentiable. This technique, borrowed from interior point methods, ensures that solutions remain within the feasible region while providing smooth gradients for backpropagation.
- Homogeneous Self-Dual (HSD) Differentiation: Instead of differentiating standard KKT conditions, IntOpt differentiates the HSD formulation. This approach is more robust, as it gracefully handles potentially infeasible or unsupported problems encountered during the training process.
To ensure numerical stability, the framework employs "early stopping" for the solver and "Tikhonov damping" to prevent ill-conditioned matrices during the backward pass.
Experimental Evaluation
IntOpt was evaluated across three benchmarks:
- Real Estate Knapsack: Budget allocation for construction projects based on predicted house prices.
- Energy-Cost Scheduling: Minimizing industrial energy costs using predicted electricity prices from the Irish Single Electricity Market.
- Shortest Path on Social Networks: Finding optimal paths in a Twitter ego-network based on predicted edge weights.
Key Insights and Results
A defining characteristic of models trained with task loss is scale invariance. Because the optimizer prioritizes the relative order of coefficients rather than their absolute values, the ML model may produce predictions that differ significantly in scale from the ground truth while still yielding near-optimal decisions.
In the Energy-Cost Scheduling task, IntOpt demonstrated superior performance, achieving the lowest regret among all tested end-to-end methods. As shown in the results table below, IntOpt (0-layer) achieved a regret of 10,774, significantly outperforming the two-stage baseline and other differentiable approaches.
In the Shortest Path benchmark, IntOpt reached a regret of 92, significantly outperforming QPTL (197) and SPO (138). Ablation studies further confirmed that the combination of the HSD formulation and log-barrier provides the most stable and effective training signal, particularly when compared to standard KKT-based differentiation.
Conclusion and Future Work
IntOpt provides a principled way to integrate high-performance LP solvers into deep learning. While currently computationally intensive—with training epochs on complex tasks taking up to 15 minutes—future integration with industry-grade solvers like Gurobi or CPLEX could significantly reduce overhead. Additionally, extending the framework to handle Mixed Integer Linear Programs (MILPs) via cutting-plane methods remains a promising avenue for future research.
Summary updated