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.
