Dynamic Programming for Predict+Optimise

Emir Demirovic, Peter J. Stuckey, Tias Guns, James Bailey, Christopher Leckie, Kotagiri Ramamohanarao, Jeffrey Chan

Introduction

In many real-world decision-making systems, we face a "predict+optimise" challenge: we must solve combinatorial optimization problems where the input parameters are unknown and must be predicted from historical data. For instance, a GPS routing system predicts traffic delays before calculating the shortest path, and grid operators predict energy prices to schedule power usage.

The standard approach involves training a machine learning (ML) model to minimize prediction error, such as Mean Squared Error (MSE), and then feeding these predictions into an optimizer. However, low prediction error does not always translate to optimal downstream decisions. The true objective is to minimize regret—the difference in value between the optimal decision with perfect information and the decision made using predicted parameters. Because regret is non-differentiable and discontinuous, it is notoriously difficult to optimize directly, often leading researchers to rely on continuous relaxations that fail to capture the discrete dynamics of NP-hard problems.

Methodology: Direct Combinatorial Reasoning

This paper introduces a novel method to train linear ML models by reasoning directly about the underlying combinatorial optimization problem. Instead of using relaxations, the authors generalize standard Dynamic Programming (DP) to represent the solution space as a piecewise linear function (PLF).

By replacing scalar values in DP tables with an algebra of piecewise linear functions, the algorithm can compute exact "transition points." These points represent the specific threshold values where changes in the ML model's weights cause the optimal combinatorial decision to jump from one discrete solution to another.

Piecewise linear representation of the optimization objective as a function of model parameters, showing discrete transition points.

Once these transition points are mapped, the algorithm uses a coordinate descent approach to iteratively tune the ML model's weights. This allows the model to navigate the non-differentiable regret landscape and find weights that globally minimize actual decision regret.

Experimental Evaluation

The proposed DP+PLF method was evaluated against several state-of-the-art baselines, including Smart Predict-then-Optimize (SPO), Quadratic Programming Task Loss (QPTL), and SVMRank. Testing was conducted on three primary datasets:

  1. Predict+Optimise Knapsack: Using real-world energy price data from the ICON competition to optimize energy scheduling.
  2. Shortest Path on DAGs: A synthetic dataset used to test computational scalability.
  3. Synthetic 3-Item Knapsack: A benchmark designed to show how relaxation-based methods fail to capture true combinatorial dynamics.

Key Results

The DP+PLF method consistently outperformed baselines in terms of decision accuracy. On the real-world energy knapsack dataset, it achieved the lowest regret, particularly in highly constrained scenarios. For instance, at 10% capacity, DP+PLF reduced regret to 89, significantly outperforming SPO (106) and QPTL (142).

Comparative regret results across different capacity constraints for the energy knapsack problem, highlighting the superior performance of the DP+PLF method.

Qualitatively, the method perfectly solved the synthetic 3-item knapsack benchmark where all other baseline methods incurred non-zero regret due to their reliance on relaxations. In terms of scalability, the method proved efficient for problems amenable to DP, solving 300-item knapsacks in approximately 1,287 seconds and 300-node shortest paths in 98 seconds during training.

Conclusion and Future Work

By encoding the entire parameter space's optimal solutions into a function algebra within DP, this approach demonstrates that exact combinatorial reasoning is both feasible and superior to continuous approximations for predict+optimise tasks.

Currently, the method is limited to optimization problems solvable via dynamic programming and is restricted to linear learning functions. Future research will explore extending this exact reasoning to non-linear models, such as deep neural networks, and broader classes of optimization problems beyond the scope of traditional DP.

Summary updated

BibTeX
@inproceedings{demirovic2020dynamic,
  author = {Emir Demirovic and Peter J. Stuckey and Tias Guns and James Bailey and Christopher Leckie and Kotagiri Ramamohanarao and Jeffrey Chan},
  title = {{Dynamic Programming for Predict+Optimise}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i02.5502},
}
Figure