One of the most common models for handling uncertainty is two-stage stochastic programming. Choosing the right number of scenarios is a trade-off between the uncertainty that can be represented and computational cost. A recent method, Deep Generative Scenario Search, generates synthetic scenarios and improves them by learning from the decisions they induce. The original approach used a black-box gradient estimate, since decisions are piecewise constant across scenarios. This paper provides the missing analytical foundation by deriving the gradient in closed form from recourse duality and an adjoint solve of the regularized reduced problem. The decision-focused direction, with a heuristic direction as a backup when duals are unavailable, defines the sampling subspace of a guided evolution strategy rather than being used as a direct update. For any guiding subspace, the expected update is a descent direction of the smoothed objective, so an inaccurate guide adds variance while the expected step still descends. For six problem families, both guided estimators outperform the baseline. The decision-focused version reduces the mean gap by three-quarters, and on the two families with the most integer variables the reduced sets beat the exact solver's two-hour incumbent in most runs, using a fifth of the time.
Figures & tables
Figure 1: The generative scenario-search loop and the two approaches for obtaining its gradient. The black middle row depicts the DGSS loop of Pisinger and Hemmati Golsefidi (2026) , which is common to both methods. In this loop, an autoencoder (Eθe,Dθd) maps empirical scenarios S to latent centroids Zˉ and decodes them into synthetic scenarios S′ with ∣S′∣≪∣S∣ . The induced decision x^(S′) is then evaluated on the full set S to compute the cost F . The SPSA-DGSS estimator from previous work (blue) is derivative-free, rerunning the loop at Zˉ±σΔ along a random direction Δ and differencing the resulting costs. In contrast, this paper (green) analytically differentiates the same loop, assembling the decision sensitivity λˉ=∇xF from the recourse duals λs , the reduced-solution sensitivity (∂x^/∂S′)⊤ from a single sparse KKT adjoint solve, and the decoder Jacobian JD⊤ (Section 3.1 ). The composition of these components, the decision-focused gradient gZˉDF , is used not as an update direction but as the guiding subspace for the evolution strategy (Section 3.2 ).
Figure 2: Single-direction SPSA and a multi-probe evolution strategy on a cost surface, four iterations each from the same starting point. The surface represents F over two latent coordinates, blue indicates low cost and red high cost, and the red dashed arrow shows the true descent direction. SPSA (top row) evaluates two points along a single random direction, so its estimate reflects the full randomness of that direction, and its fourth step ascends. The evolution strategy (bottom row) averages P=24 probes, reducing the variance by a factor of P , and reaches the low-cost basin. Both methods use steps of the same decaying length. The surface is drawn smooth for clarity. In the setting of this paper the surface is piecewise constant, and the red dashed arrow represents the gradient of the smoothed objective.
Figure 3: Three search distributions at a single iteration on the cost surface of Figure 2 . Each panel displays P=24 probes sampled from the covariance ( 15 ), with the dashed ellipse indicating the two-sigma contour. For α=1 (left), the search distribution is isotropic. Guided Evolutionary Strategies (middle) elongates the distribution along a generic axis U , while Guided-DGSS (right) aligns U with either the decision-focused gradient from Section 3.2.3 or the heuristic directions from Section 3.2.4 , orienting the stretch toward the low-cost region. The isotropic component ensures coverage in all directions, so even if U is misaligned, descent in expectation is maintained. The surface is drawn smooth for clarity. In the setting of the paper it is piecewise constant and only the smoothed objective possesses a gradient.
Figure 4: Best full-set objective over wall-clock time at K=1 , one panel per instance. For each method, the mean over its three training seeds is plotted against the exact solver’s incumbent and lower bound on the 200 -scenario extensive form. The dotted horizontal line indicates the solver’s final incumbent. The curves of the five methods end at their budget, pretraining plus 20 minutes of search time, and the time axis ends at the solver’s 2 -hour limit. A dot indicates where the solver proved optimality. ELECTRICITY is omitted because its extensive form is a linear program solved in two seconds. The five methods are shifted right by their pretraining time. The time axis is linear up to minute 30 and logarithmic beyond it, as the grey vertical line marks. The y -axis range covers the curves after minute five of search, truncated at 20% above the solver’s final incumbent for CFLP and at 5% for EV.
Figure 5: Pooled results over 162 runs per method. Regret is defined as the gap of a method in a run minus the gap of the best method in the same run, so a value of zero indicates that the method performed best. In panels (a), (c), and (d), regret is normalized by the family’s mean gap to the exact solver’s lower bound, ensuring comparability across families. In panel (b), regret is reported in percentage points. (a) Mean regret over the budget on a logarithmic axis, with shading representing one standard error. (b) Fraction of runs with regret at or below the threshold, where higher and earlier curves indicate better performance. (c) Mean regret as a function of reduced-set size K . (d) Mean regret versus iterations completed within the budget, with one point per method and K , where the digit denotes K . The lower left corner indicates better performance.
Figure 6: Mean gap of the best solution found so far over the 20 minutes of search, per family and K , over the 9 runs of each panel. The shaded area is one standard error after centring each run on its instance mean.
Figure 7: Empirical scenarios (grey) and synthetic scenarios of each method in the original units, one row per family on instance 1 and one column per K , each drawn at a single training seed per family. Panel titles indicate the gap of each method, expressed as a percentage at 20 minutes.
Figure 8: Four clusters of the 200 EV scenarios on instance 1 (a) and the synthetic scenarios of each method at 20 minutes in the plane of the first two principal components for K=1 , 2 , and 3 at one training seed (b to d). Clusters are numbered from the highest to the lowest total daily demand, and the line below each panel gives the cluster of each synthetic scenario.
Scenario generation is a critical component in stochastic programming (SP), as it directly influences the quality of decision-making under uncertainty. Existing approaches predominantly rely on either sampling-based techniques or supervised learning using neural networks. Sampling-based techniques often struggle to capture complex dependencies and rare but plausible events, while supervised learning requires fixed input-output pairs for training and is limited in its ability to generate a wide variety of realistic scenarios that are not restricted by predefined patterns or rules. To address these limitations, we introduce Diff2SP, a diffusion-based generative framework that incorporates downstream optimization objectives directly into scenario generation. Unlike conventional methods that treat scenario generation and decision-making as separate steps, Diff2SP embeds stochastic optimization into the training process, enabling the generation of scenarios that are both statistically coherent and decision-aware. To formally justify this optimization-aware design, we establish a regret bounds that link distributional accuracy to decision quality, and establish sample complexity guarantees showing faster convergence than traditional generative models such as GANs. Empirical results on both synthetic and power-system datasets validate these theoretical insights, demonstrating that Diff2SP consistently improves both statistical fidelity and downstream optimization outcomes.
Two-Stage Robust Optimization (2RO) with discrete uncertainty is challenging, often rendering exact solutions prohibitive. Scenario reduction alleviates this issue by selecting a small, representative subset of scenarios to enable tractable computation. However, existing methods are largely problem-agnostic, operating solely on the uncertainty set without consulting the feasible region or recourse structure. In this paper, we introduce PRISE, a problem-driven sequential lookahead heuristic that constructs reduced scenario sets by evaluating the marginal impact of each scenario. While PRISE yields high-quality scenario subsets, each selection step requires solving multiple subproblems, making it computationally expensive at scale. To address this, we propose NeurPRISE, a neural surrogate model built on a GNN-Transformer backbone that encodes the per-scenario structure via graph convolution and captures cross-scenario interactions through attention. NeurPRISE is trained via imitation learning with a gain-aware ranking objective, which distills marginal gain information from PRISE into a learned scoring function for scenario ranking and selection. Extensive results on three 2RO problems show that NeurPRISE consistently achieves competitive regret relative to comprehensive methods, maintains strong calability with varying numbers of scenarios, and delivers 17-200x speedup over PRISE. NeurPRISE also exhibits strong zero-shot generalization, effectively handling instances with larger problem scales (up to 5x), more scenarios (up to 4x), and distribution shifts.
Tianjue Lin, Jianan Zhou, Jieyi Bi +4
Nanyang Technological University · Eindhoven University of Technology · Shandong University +1
Modern stochastic optimization pipelines increasingly rely on learned generative models to represent uncertainty, while downstream decisions are evaluated almost entirely through Monte Carlo scenarios. This shifts the operational object of uncertainty from an explicit probability law to the sampler induced by the learned generator. Reliability therefore depends on two errors: sampler misspecification and finite-simulation error. We propose Sampler-Robust Optimization (SRO), which optimizes decisions against the worst-case sampler induced by perturbing the learned generator. This sampler-first formulation aligns with simulation-based decision pipelines and admits a sharpness-aware interpretation: it favors decisions whose performance is stable under generator perturbations, rather than merely under the nominal sampler. Under a coverage assumption, we show that the empirical worst-case objective provides a high-probability upper certificate for the true population objective, with finite-simulation error partially absorbed by the robustification used to guard against sampler misspecification. The framework accommodates generative models with or without explicit densities and admits efficient minimax procedures. Portfolio-optimization experiments show that SRO produces more stable decisions and improves out-of-sample performance under distribution shift.