Table of Contents
Fetching ...

Smart Surrogate Losses for Contextual Stochastic Linear Optimization with Robust Constraints

Hyungki Im, Wyame Benslimane, Paul Grigas

TL;DR

This work extends contextual stochastic optimization to settings where uncertainty appears not only in the objective but also in constraints that depend on context. It introduces SPO-RC, a feasibility-sensitive loss framework built on robust constraint sets derived from context via conformal prediction, and a convex surrogate SPO-RC+ for tractable learning. The authors prove Fisher consistency between the cost and cost_+ losses and develop a training pipeline that truncates data to feasibility-guaranteed regions and uses Kernel Mean Matching for importance reweighting to correct distribution shift. Empirical results on fractional knapsack and an alloy production problem show that SPO-RC+ with truncation and reweighting yields robust, feasible decisions and can outperform standard MSE approaches, especially as problem complexity grows, with practical implications for safe decision-making under constraint uncertainty.

Abstract

We study an extension of contextual stochastic linear optimization (CSLO) that, in contrast to most of the existing literature, involves inequality constraints that depend on uncertain parameters predicted by a machine learning model. To handle the constraint uncertainty, we use contextual uncertainty sets constructed via methods like conformal prediction. Given a contextual uncertainty set method, we introduce the "Smart Predict-then-Optimize with Robust Constraints" (SPO-RC) loss, a feasibility-sensitive adaptation of the SPO loss that measures decision error of predicted objective parameters. We also introduce a convex surrogate, SPO-RC+, and prove Fisher consistency with SPO-RC. To enhance performance, we train on truncated datasets where true constraint parameters lie within the uncertainty sets, and we correct the induced sample selection bias using importance reweighting techniques. Through experiments on fractional knapsack and alloy production problem instances, we demonstrate that SPO-RC+ effectively handles uncertainty in constraints and that combining truncation with importance reweighting can further improve performance.

Smart Surrogate Losses for Contextual Stochastic Linear Optimization with Robust Constraints

TL;DR

This work extends contextual stochastic optimization to settings where uncertainty appears not only in the objective but also in constraints that depend on context. It introduces SPO-RC, a feasibility-sensitive loss framework built on robust constraint sets derived from context via conformal prediction, and a convex surrogate SPO-RC+ for tractable learning. The authors prove Fisher consistency between the cost and cost_+ losses and develop a training pipeline that truncates data to feasibility-guaranteed regions and uses Kernel Mean Matching for importance reweighting to correct distribution shift. Empirical results on fractional knapsack and an alloy production problem show that SPO-RC+ with truncation and reweighting yields robust, feasible decisions and can outperform standard MSE approaches, especially as problem complexity grows, with practical implications for safe decision-making under constraint uncertainty.

Abstract

We study an extension of contextual stochastic linear optimization (CSLO) that, in contrast to most of the existing literature, involves inequality constraints that depend on uncertain parameters predicted by a machine learning model. To handle the constraint uncertainty, we use contextual uncertainty sets constructed via methods like conformal prediction. Given a contextual uncertainty set method, we introduce the "Smart Predict-then-Optimize with Robust Constraints" (SPO-RC) loss, a feasibility-sensitive adaptation of the SPO loss that measures decision error of predicted objective parameters. We also introduce a convex surrogate, SPO-RC+, and prove Fisher consistency with SPO-RC. To enhance performance, we train on truncated datasets where true constraint parameters lie within the uncertainty sets, and we correct the induced sample selection bias using importance reweighting techniques. Through experiments on fractional knapsack and alloy production problem instances, we demonstrate that SPO-RC+ effectively handles uncertainty in constraints and that combining truncation with importance reweighting can further improve performance.

Paper Structure

This paper contains 32 sections, 10 theorems, 39 equations, 4 figures, 2 tables, 1 algorithm.

Key Result

Proposition 2.2

Given $\mathbf{c}$ and $\hat{\mathcal{U}}$, the $\mathrm{cost}_+$ metric satisfies:

Figures (4)

  • Figure 1: Visualization of the importance reweighting toy example
  • Figure 2: Out-of-sample test set (size 3000) NormSPORCTest values of linear models with MSE and SPO-RC+ loss functions, as well as random forests, on $\ell_2$ norm fractional knapsack instances.
  • Figure 3: Performance comparison across different tasks and evaluation criteria: (a)–(b) report out-of-sample test set (size 3000) NormSPORCTest performance under varying cost complexities for the fractional knapsack and alloy production problems, respectively. (c)–(d) evaluate the impact of the caching strategy in the knapsack problem with $\ell_1$-norm costs, using out-of-sample NormSPORCTest and training time as metrics.
  • Figure 4: Visualization of the truncation toy example

Theorems & Definitions (14)

  • Remark 2.1
  • Proposition 2.2
  • Theorem 2.4
  • Remark 2.5
  • Proposition 3.1
  • Lemma 3.3
  • Proposition A.1: Proposition 5 of elmachtoub2022smart
  • Proposition A.2: Proposition 6 of elmachtoub2022smart
  • proof
  • proof
  • ...and 4 more