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.