Contextual Scenario Generation for Two-Stage Stochastic Programming

2026-06-03 19:00 GMT · 2 days ago aimagpro.com

arXiv:2502.05349v2 Announce Type: replace-cross
Abstract: Two-stage stochastic programs (2SPs) are widely used for decision-making under uncertainty, but their practical deployment is often limited by the large number of scenarios needed to approximate the conditional distribution of uncertain outcomes. We study contextual scenario generation: given contextual information, learn to produce a small, user-specified set of surrogate scenarios that, when used as input into the 2SP, lead to high-quality 2SP decisions. Existing scenario generation methods either ignore contextual information or are computationally burdensome in this setting. We propose contextual scenario generation (CSG), which learns a mapping from context to a set of surrogate scenarios. We develop two complementary methodologies: (i) a distributional approach that learns a mapping from context to scenarios by minimizing a kernel-based distance to the conditional distribution, and (ii) a task-based approach that selects the mapping to optimize decision quality via differentiating through a learned surrogate of the downstream 2SP objective. Both approaches are broadly applicable and require only repeated solution of the underlying subproblems and 2SPs defined on the generated scenarios. We provide finite-sample generalization guarantees and demonstrate strong empirical performance across multiple 2SP classes.