Neur2SP : Neural Two-Stage Stochastic Programming
Abstract
Stochastic Programming is a powerful modeling framework for decision-making under uncertainty.
In this work, we tackle two-stage stochastic programs (2SPs), the most widely used class of stochastic programming models.
Solving 2SPs exactly requires optimizing over an expected value function that is computationally intractable.
Having a mixed-integer linear program (MIP) or a nonlinear program (NLP) in the second stage further aggravates the intractability, even when specialized algorithms that exploit problem structure are employed.
Finding high-quality (first-stage) solutions – without leveraging problem structure – can be crucial in such settings.
We develop Neur2SP , a new method that approximates the expected value function via a neural network to obtain a surrogate model that can be solved more efficiently than the traditional extensive formulation approach.
Neur2SP makes no assumptions about the problem structure, in particular about the secondstage problem, and can be implemented using an off-the-shelf MIP solver.
Our extensive computational experiments on four benchmark 2SP problem classes with different structures (containing MIP and NLP second-stage problems) demonstrate the efficiency (time) and efficacy (solution quality) of Neur2SP .
In under 1.66 seconds, Neur2SP finds high-quality solutions across all problems even as the number of scenarios increases, an ideal property that is difficult to have for traditional 2SP solution techniques.
Namely, the most generic baseline method typically requires minutes to hours to find solutions of comparable quality.
Introduction
Mathematical programming consists of a gamut of tools to solve optimization problems.
Under perfect information, i e., when all the data is deterministic and known, many of these problems can be solved as a linear program (LP) or mixed-integer linear program (MIP).
However, in many cases, there is a need to deal with problems with partial information.
Stochastic programming is one such framework that allows us to incorporate uncertainty into decision-making.
In this work we focus our attention on Two-stage Stochastic Programs (2SPs).
A 2SP involves two sets of decisions, namely the first-stage and second-stage (recourse) decisions, to be made before and after the uncertainty is realized, respectively.
Given the (joint) probability distribution of the random parameters of the problem, the most common objective of 2SP is to optimize the expected value of the decisions.
For example, in a two-stage stochastic facility location problem, first-stage decisions consist of which facilities should be built whereas second-stage decisions involve assigning customers to open facilities to meet their stochastic demand, and the overall objective is to minimize the sum of the cost of the first-stage decisions and the expected cost of the second-stage decisions. 2SPs are usually solved via Sample Average Approximation (SAA), which limits the future uncertainty to a finite set of possible realizations (scenarios).
The SAA approximation of a 2SP is a NeurIPS reduction to an equivalent deterministic problem and can be solved by the so-called extensive form : a monolithic formulation where scenario copies of the second-stage decision variables are created and linked to the first-stage decisions.
However, even for small 2SPs, solving the extensive form may be intractable as it requires introducing a large number of (possibly integer) variables and (possibly nonlinear) constraints.
As such, specialized algorithms are required.
If the second-stage problem assumes the form of an LP, then algorithms such as Benders’ decomposition (also known as the L-shaped method) can be leveraged to efficiently solve the problem to optimality.
Unfortunately, in many practical applications of 2SP, the second-stage problem assumes the form of a MIP, for which specialized decomposition algorithms might not be efficient.
The existence of continuous first-stage variables linked to the second-stage problem significantly increases the difficulty of solving such problems.
This is exacerbated when the second-stage problem is nonlinear, for which no general and structure-agnostic solution strategy exists.
In this work, we propose Neur2SP , a framework for constructing an easier-to-solve surrogate optimization problem for 2SP with the use of supervised deep learning. In a nutshell, a Rectified
Linear Unit (ReLU) neural network is trained to approximate the second-stage objective value for a set of scenarios.
Using MIP-representable activation functions such as the ReLU, the forward computation of the trained network can be embedded into a MIP.
The surrogate problem is then confined to optimizing only first-stage decisions with respect to the first-stage objective function and the neural network approximation of the second-stage objective 3 . Assuming a small and accurate neural network can be used, the surrogate problem is much smaller than the extensive form, and thus faster to solve. The entire procedure is summarized in Figure 1.
Our main contributions are as follows: Novelty:
Neur2SP is the first generic machine learning approach for deriving a heuristic solution for 2SP.
We introduce a highly parallelizable data collection procedure and show two separate neural models which can be used to formulate a deterministic mixed-integer surrogate problem for 2SP; 2.
Generality: Neur2SP can be used out-of-the-box for 2SPs with linear and nonlinear objectives and constraints as well as mixed-integer variables in both the first and second stages, all without using any problem structure, i e., in a purely data-driven way; 3.
Performance: Neur2SP is shown to produce high-quality solutions significantly faster than the solely applicable general baseline method, the extensive form approach, for a variety of benchmark problems, namely, stochastic facility location problem, an investment problem, a server location problem, and a pooling problem from chemical engineering
Preliminaries
We introduce the 2SP setting and describe the MIP formulation for a ReLU activation function which is central to the surrogate model we propose in this work. Appendix A summarizes the notation used.
2.1 Two-stage Stochastic Programming
A 2SP can be generally expressed as min x { c ⊺ x + E ξ [ Q ( x , ξ )] : x ∈ X} , where c ∈ R n is the first-stage cost vector, x ∈ R n represents the first-stage decisions, X is the first-stage feasible set, and ξ is the vector of random parameters that follow a probability distribution P with support Ξ .
The value function Q : X × Ξ → R returns the cost of optimal second-stage (recourse) decisions under realization ξ given the first-stage decisions of x .
In many cases, as the Q ( x , ξ ) is obtained by solving a mathematical program, evaluating the expected value function E ξ [ Q ( x , ξ )] is intractable.
To provide a more tractable formulation, the extensive form (EF) is used.
Using a set of K scenarios, ξ 1 , . . . , ξ K , sampled from the probability distribution P , EF ( ξ 1 , . . . , ξ K ) ≡ min x { c ⊺ x + (cid:80)
Kk =1 p k Q ( x , ξ k ) : x ∈ X} , where p k is the probability of scenario ξ k being realized.
If Q ( x , ξ ) =
min y { F ( y , ξ ) : y ∈ Y ( x , ξ ) } , then EF ( ξ 1 , . . . , ξ K ) can be expressed as min x , y (cid:40) c [Equation] k
[Equation]
p
[Equation]
[Equation]
: x [Equation] [Equation] K (cid:41) , which can be solved through standard deterministic optimization techniques.
However, the number of variables and constraints of the EF grows linearly with the number of scenarios.
Furthermore, if Q ( · , · ) is the optimal value of a MIP or an nonlinear program (NLP), the EF model becomes significantly more challenging to solve as compared to the LP case, limiting its applicability even at small scale.
2.2 Embedding Neural Networks into MIPs
Mathematically, an ℓ -layer fully-connected neural network can be expressed as: h 1 = σ ( W 0 α + b 0 ) ; h m +
=
σ ( W m h m + b m ) , m = 1 , . . .
, ℓ − 1 ; β = W ℓ h ℓ + b ℓ .
Here, α ∈ R m is the input, β ∈ R is the prediction, h i ∈ R
d i is the i -th hidden layer, W i ∈
R d i ×
d
i +1 is the matrix of weights from layer i to i + 1 , b i ∈ R
d i is the bias at the i -th layer, and σ is a non-linear activation function, here the activation function is given by ReLU ( a ) = max { 0 , a } for a ∈ R .
Central to Neur2SP is the embedding of a trained neural network into a MIP.
Here, we present the formulation proposed by [Fischetti and Jo, 2018].
For a given hidden layer m , the j -th hidden unit, h mj , can be written as
[Equation]
where w mij is the element at the j -th row and i -th column of W m − 1 and b m − 1 j is the j -th index of b m − 1 .
To model ReLU in a MIP for the j -th unit in the m -th layer, we use the variables ˆ h mj , ˇ h mj and ˆ h m − 1 i for i = 1 , . . .
, d m − 1 .
The ReLU activation is then modeled with the following constraints:
[Equation]
where the logical constraints in Equation (2b) and Equation (2c) are translated into big-M constraints by MIP solvers.
To verify the correctness of this formulation, observe that constraints (2b) and (2c) in conjunction with the fact the binary z mj ensures that at most one of ˆ h mj and ˇ h mj are non-zero.
Furthermore, since both ˆ h mj and ˇ h mj are non-negative, if (cid:80) d m − 1 i =1 w m − 1 ij ˆ h m − 1 i + b m − 1 j > 0 , then it follows that ˆ h mj > 0 and ˇ h mj = 0 .
If negative, then ˆ h mj
= 0 and ˇ h mj > 0 .
Thus, we have that if the left-hand side of (2a) is positive, ˆ h mj will be positive; if it is negative, then ˆ h mj = 0 ; this is an exact representation of the ReLU function.
Related Work 3.1 Machine Learning for Nested Optimization
Machine learning has recently been employed to solve nested optimization problems; by “nested", we mean optimization problems whose objective or constraints involve another optimization. For example, Nair et al. [2018], Shen et al.
[2021], Jiang et al. [2021], Xiong and Hsieh [2020], Shao et al. [2022] directly predict a binary or continuous solution vector. The major limitation with predicting solutions directly is the inability to handle variable integrality and hard constraints.
In addition, only Nair et al.
[2018] consider 2SP, whereas the others focus on bi-level problems with a single inner optimization, rather than the expectation as in stochastic programming. For stochastic programming, there has been a significant interest in the integration of learning to enhance prevalent solution techniques. We specifically discuss three areas of related work: learning-enabled optimization, learning-based algorithms for stochastic programming, and scenario reduction for stochastic programming. The line of work on learning-enabled optimization [Deng and Sen, 2022, Liu et al., 2022, Diao and
Sen, 2020] introduced “predictive stochastic programming" to leverage contextual information when formulating SP models. This is in contrast to our approach, which leverages predictions to reduce computing times in a non-contextual 2SP setting. That being said, Neur2SP admits extensions to the contextual setting by including the context information during training. In recent years, several studies have explored the use of integrating predictions within stochastic programming algorithms for computational improvements.
Donti et al.
[2017] proposed an end-toend approach to directly optimize a task-loss for contextual stochastic programming problems by differentiating through the argmin operator, specifically for strongly convex problems. Dai et al. [2022] developed a model to solve multi-stage linear optimization problems by learning the piecewise value function of the nested problems.
Larsen et al. [2022] leveraged predictions to improve an exact decomposition-based algorithm for 2SP. Neur2SP differs from these approaches as it can be applied to problems with both hard constraints and integer/non-linear second-stage problems. Lastly, another related research direction for learning-based stochastic programming is scenario reduction, which reduces the complexity of the stochastic programming problem by finding a smaller set of “representative scenarios".
Many of these approaches [Dupa ˇ cová et al., 2003, Römisch, 2009,
Beraldi and Bruni, 2014, Prochazka and Wallace, 2020, Keutchayan et al., 2021] perform some form of clustering to reduce the number of scenarios and then solve a smaller surrogate problem with these scenarios.
Recently, Wu et al.
[2022] used a conditional variational autoencoder to learn scenario embeddings and perform clustering on them for scenario reduction.
To find representative scenarios, they use semi-supervised learning with respect to the second-stage cost.
However, these predictions are not leveraged explicitly in the optimization as is done with Neur2SP .
Bengio et al.
[2020] predicts a representative scenario for an input scenario set and use it to form a smaller surrogate problem.
They show that using the predicted representative scenario, a near-optimal first-stage decision can be obtained by solving the surrogate.
However, their method requires some domain expertise as it relies on the problem structure to build the representative scenario for training.
3.2 Neural Network Embeddings
Neur2SP can be broadly classified as both a learning-based scenario reduction approach and a learning-accelerated heuristic for stochastic programming.
The reason for this is that Neur2SP reduces the computational complexity introduced by the scenarios by computing a compact representation that is then leveraged to formulate an approximation to the EF. We specifically leverage the recent line of work by Cheng et al. [2017], Tjeng et al. [2017], Fischetti and Jo [2018], Serra et al.
[2018], which studies the problem of embedding a trained neural network with ReLU activation into a MIP.
The works of Anderson et al. [2020] and Grimstad and Andersson [2019] present MIP encoding formulations with tighter LP relaxations by appropriately setting the big- M constraints, leading to reduced solving time. The growing interest in embedding predictive models in MIPs has led to the development of libraries such as JANOS [Bergman et al., 2022] and OMLT [Ceccon et al., 2022].
Say et al.
[2017], Grimstad and Andersson [2019], Murzakhanov et al. [2020], Katz et al. [2020], Kody et al.
[2022] propose the use of embedded neural networks to formulate surrogate MIPs for intractable and non-linear constraints in optimization problems. To the best of our knowledge, Neur2SP is the first approach that employs this technique in stochastic programming or more generally for the simplification of nested optimization problems.  The Neur2SP Framework
In this section, we present two neural architectures, the corresponding surrogate problems that approximate a given 2SP, and a data collection strategy.
Figure 1 summarizes the Neur2SP framework.
4.1 Neural Network Architectures
We propose two distinct neural architectures for predicting the second-stage costs: NN-E approximates the expected value of the second-stage cost of a set of scenarios , whereas NN-P approximates the per-scenario value of the second-stage cost for a single scenario .
NN-E (Figure 2) learns a mapping from (cid:0) x , { ξ k } Kk =1 (cid:1) →
(cid:80) Kk =1 p k Q ( x , ξ k ) .
In words, the model takes in a first-stage solution x and any finite set of scenarios sampled from Ξ , and outputs a prediction of the expected second-stage objective value.
We embed the scenario set { ξ k } Kk =1 into a latent space by passing each scenario, independently, through the same neural network Ψ 1 , then performing meanaggregation over the resulting K embeddings.
The aggregated embedding is passed through another network, Ψ 2 , to obtain the final embedding of the scenario set, ξ λ .
This embedding, representing the scenario set à-la-DeepSets [Zaheer et al., 2017], is appended to the input first-stage decision and passed through a ReLU feed-forward network Φ E to predict the expected second-stage value.
Hence, the final output is such that Φ E ( x , Ψ 2 ( ⊕ Kk =1 Ψ 1 ( p k , ξ k )))
≈ (cid:80)
Kk =1 p k Q ( x , ξ k ) .
Note that the embedding networks, Ψ 1 and Ψ 2 , can be arbitrarily complex as only the latent representation is embedded into the approximate MIP.
Also, although Ψ 1 is trained using K scenarios, once the networks are trained, they can be used with any (potentially much larger) finite number of scenarios.
NN-P learns a mapping Φ P from ( x , ξ ) → Q ( x , ξ ) for ξ sampled from Ξ .
Once the mapping Φ P is learned, we can approximate the expected second-stage objective value for any finite set of scenarios as (cid:80)
Kk =1 p k Q ( x , ξ k )
≈ (cid:80)
Kk =1 p k Φ P ( x , ξ k ) .
Φ P is a feed-forward neural network with input given by the concatenation of x and ξ .
4.2 Neural Network Embedding for 2SP
We now describe the surrogate MIP for both the NN-E and NN-P learning models from the preceding section.
Let Λ represent the number of predictions made by the neural network.
For the NN-E case, Λ = 1 as we only predict the expected second-stage value for a set of scenarios.
In the NN-P case, Λ = K as we predict the second-stage value for each scenario.
In this section, we use [ M ] to denote { 1 , . . .
, M } for M ∈ Z + . Let ˆ h m,λj represent the ReLU output for the j -th hidden unit in the m -th hidden layer for output λ , for all m ∈
[ ℓ − 1] , j ∈ [ d m ] , and λ ∈ [Λ] .
Suppose ˇ h m,λj is a slack variable used to model the ReLU output for the j -th hidden unit in the m -th hidden layer for scenario k , for all m ∈
[ ℓ − 1] , j ∈ [ d m ] , and λ ∈ [Λ] .
Let z m,λj be a binary variable used to ensure that at most one of ˆ h m,kj and ˇ h m,kj are non-zero.
This variable is defined for all m ∈ [ ℓ − 1] , j ∈
[ d m ] , and λ ∈ [Λ] .
Suppose β λ is the λ -th prediction by the neural network, for all λ ∈ [Λ] .
With the above variables we can define an approximation to EF as given in Equation (3).
The objective function (3a) minimizes the sum of the cost of the first-stage decisions and the approximate cost of the second-stage value.
Constraints (3b)-(3d) propagate a first-stage solution x to the output of the neural network for each scenario.
Constraints (3e)-(3h) ensure the prediction of the neural network is respected.
Constraint (3i) ensures the feasibility of the first-stage solution.
In this approximation, we introduce a number of additional variables and big-M constraints.
Specifically, for a neural network with H hidden units, we introduce Λ · H additional binary variables for z m,λ j .
In addition, we introduce 2 · Λ · H continuous variables for ˆ h m,λ j and ˇ h m,λ j .
Lastly, we require an additional Λ variables for the output of the network.
Although the number of variables we introduce in this approximation is quite large, we hypothesize that the resulting MIP will be easier to solve than the extensive form, in particular, when the second-stage problem is nonlinear.
In the remainder of the paper, we refer to the surrogate MIP given in (3) as MIP-NN. [Equation] 3i [Equation]
4.3 Data Generation
A diverse dataset of input-output pairs is needed to train Neur2SP ’s supervised second-stage value approximation.
To generate such a dataset for a given 2SP problem, we adopt an iterative procedure.
We begin by generating a random feasible first-stage decision.
For the NN-E case, we sample a set of scenarios with random cardinality K ′ from the uncertainty distribution.
Here, K ′ should be chosen to balance the trade-off between the time spent to generate a sample of second-stage values for a given first-stage solution and the time to estimate the expected second-stage value for a set of first-stage decisions in a given time budget.
Specifically, if K ′ is large, then on average more time will be spent in determining the expected value using a large number of scenarios, while for a small K ′ , the first-stage decision space will be explored more since expected value estimates would be [Table] obtained faster.
For a given input, i.e., a first-stage decision and set of scenarios, we then compute a label by calculating the expected second-stage value (cid:80) K ′ k ′
=1 p k ′ Q k ′ ( · , ξ k ′ ) .
For the NN-P case, at each iteration of the data generation procedure, we sample a single scenario from the uncertainty distribution.
For a given input of a first-stage decision and scenario we generate a label by calculating its second-stage value Q ( · , · ) .
Last, the input-output pair is added to the dataset.
This data generation procedure is fully parallelizable over the second-stage problems to be solved.
4.4 NN-E vs. NN-P Trade-offs
The NN-E and NN-P architectures exhibit trade-offs in terms of the learning task and the resulting surrogate optimization problem.
Training.
In data collection, both models require solving second-stage problems with a fixed firststage solution to obtain the label.
A sample in for NN-P requires solving only a single optimization problem, whereas a sample for NN-E requires solving at most K ′ second-stage problems.
As this process is offline and highly parallelizable, this trade-off is easy to mitigate.
As for training, NN-E operates on a subset of scenarios which makes for an exponentially larger input space.
Despite the large input space, our experiments show that the NN-E model in the training converges quite well and in many cases the embedded model outperforms the NN-P model.
Surrogate Optimization Problem.
As the ultimate goal is embedding the trained model into a MIP, the trade-off in this regard becomes quite important.
Specifically, for K scenarios, the NN-P model will have K times more binary and continuous variables than the NN-E model.
For problems with a large number of scenarios, this makes the NN-E model much more appealing, smaller and likely faster to solve.
Furthermore, it allows for much larger networks given that only a single copy of the network is embedded.
Experimental Setup
All experiments were run on a computing cluster with an Intel Xeon CPU E5-2683 and Nvidia Tesla
P100 GPU with 64GB of RAM (for training).
Gurobi 9.1.2 [Gurobi Optimization, LLC, 2021] was used as the MIP solver.
Scikit-learn 1.0.
[Pedregosa et al., 2011] and Pytorch 1.10.0 [Paszke et al., 2019] were used for supervised learning.
The code to reproduce all of the experiments is available at https://github.com/khalil-research/Neur2SP .
2SP Problems : We evaluate our approach on four 2SP problems that are commonly considered in the literature: a two-stage stochastic variant of the Capacitated Facility Location Problem (CFLP)
[Cornuéjols et al., 1991], an Investment Problem (INVP)
[Schultz et al., 1998], the Stochastic Server Location Problem (SSLP)
[Ntaimo and Sen, 2005], and the Pooling Problem (PP) [Audet et al., 2004, Gupte et al., 2017, Gounaris et al., 2009, Haverly, 1978].
Table 1 summarizes the types of first and second-stage variables for these problems and Appendix B includes their detailed descriptions.
Baselines : We consider two baselines.
The first is EF, which is perhaps the only generic approach that can be applied for both integer and nonlinear second-stage problems.
We limit the solving time of EF to 3 hours.
Additionally, we compare against an embedded trained linear regressor rather than a neural network, but defer these results to Appendix D as the solution quality is quite poor in comparison to the neural network models.
Model & Dataset Selection : As is common in supervised learning, model selection and the size of the training set can have a significant impact on model performance.
We present detailed experiments [Table] for model selection and dataset sizing in Appendix F.
As a brief summary, we use random search over 100 hyperparameter configurations for model selection, and observe that accuracy on a validation set is rather insensitive to hyperparameter choices.
For the size of the dataset, we observe diminishing returns when increasing the size beyond 5000 samples.
Data Generation & Supervised training times : As the data generation and training can be done offline and are both parallelizable, we report the total times in Table 2 and defer more specific timing details to Appendix C. We note that for data generation, a single sample can be obtained in less than two seconds for all instances, and in many cases much faster.
The training times are within the range of 120 to 2100 seconds.
For the NN-E data generation, we choose K ′
= 100 , a number of scenarios which was quick to label while exposing the model to a reasonably large number of scenarios in some cases.
The combined time for data generation and model training is typically less than 3 hours (i.e., the time given to EF) and depending on the problem, may be much less.
Results & Discussion
In this section, we report the results of Neur2SP across the four problem settings.
As is standard in 2SP, we evaluate a single “base” instance across varying scenario sets and sizes.
For example, in CFLP, and for a “base” instance with 10 facilities and 10 customers, one can generate an instance by sampling any number of scenarios.
An important advantage of our approach is that we can apply a single trained model to an instance with an arbitrary number of scenarios.
For example, the same trained model is used for CFLP_10_10_{100,500,1000}.
Tables 3 through 6 report the gaps between approaches, solving times, and the time which EF takes to achieve the same solution quality as NN-E and
NN-P. In addition, we include supplementary results with the objective values in Appendix D and non-aggregated results for the SSLP SIPLib instances in
Appendix E. For SSLP and CFLP, each row represents mean statistics across 11 and 10 instances generated by sampling different scenario sets of a given size, respectively.
However, for INVP and
PP, each row represents the statistics across 1 instance.
Originally, both these problems have infinite support as the uncertainty distributions are assumed to be continuous.
To manage the complexity, these distributions are typically transformed to have finite support by uniformly sampling equidistant points over the continuous domain.
We adopt this same procedure from the literature, leading to a static set of scenarios for a given scenario set size.
6.1 Discussion
Tables 3–6 show that NN-E is significantly faster than other approaches, with a minimum and maximum solving time of 0.11s and 1.66s respectively, across all problems.
This highlights the scalability of the NN-E in terms of problem size and type, which is expected as the size of the resulting MIP is independent of the number of scenarios.
Also, the objective difference is less than 5% in most cases, with a minimum of -102% and a maximum of 13.78%.
These differences are inversely proportional to the scenario set size, which indicates that the NN-E is able to generalize on larger scenario sets, even though it was trained with a maximum of 100 scenarios per data point.
EF [Table] [Table] takes significantly longer to reach a solution quality similar to NN-E, often on the order of minutes to 3 hours.
For many larger CFLP and SSLP instances, EF finds worse solutions than NN-E even afterhours.
Not only is NN-E as good or better in solution quality, but also orders of magnitude faster.
For the NN-P, we can observe that the solving time is directly proportional to the size of the problem.
However, for the largest INVP instances, it times out without even generating a feasible solution (Table 5).
This is expected as we need to embed the trained neural network once per scenario, limiting scalability.
In terms of objective differences, we can observe that the difference improves with the increase in instance size for CFLP and SSLP, whereas no clear trend is visible for For INVP.
However, the objective differences do not exceed 5% in most cases.
For PP, the objective difference is around 40%, indicating that the NN-P is not able to generalize, whereas NN-E performs very well.
One important advantage for NN-P over NN-E is the fact that the time required for data generation and training is notably less.
In settings with limited parallel computing resources or time NN-P may be a more appropriate choice.
Conclusion
Two-stage stochastic programming is a powerful modeling framework for decision-making under uncertainty.
These problems are hard to solve in practice, especially when the second-stage problem is a MIP or NLP.
Finding good feasible solutions quickly thus becomes extremely important.
To that end, we proposed Neur2SP , a learning-based, general, and structure-agnostic approach which approximates the second-stage value function to form an easy-to-solve surrogate problem.
The four problem classes we have tackled are (1) widely used in the literature, (2) vary in the types of first and second-stage problems, and (3) span a wide range in terms of number of variables, constraints, and scenarios.
Through our experiments, we show that Neur2SP achieves high-quality solutions quickly, especially for larger instances.
In 1–2 seconds, a model trained in the Neur2SP framework can find [Table] [Table] solutions of the same or better quality than the most generic method in the literature, EF, with the latter taking minutes to hours.
In terms of future work [Table] this methodology can be extended in many directions.
Further innovations in the NN-E model architecture may improve our already positive results.
Another direction is the extension of the general idea of embedding trained models into other complex optimization problems, such as bilevel optimization or multi-stage stochastic programming.
Another direction for future work is a more comprehensive comparison of Neur2SP with algorithms that are specialized to a given problem class. However, we note that on SSLP instances, the computing times of progressive hedging [Rockafellar and Wets, 1991], a widely used heuristic for 2SP, is on the order of hours [Torres et al., 2022]. These experiments are not directly comparable as they were run on different hardware. However, this would not meaningfully impact the several order of magnitude reduction in solving time achieved by our approach.
Lastly, in this work, we propose NN-E and NN-P, however, a natural middle ground between these models is a clustering approach which embeds a trained model for a subset of scenarios, rather than a single or the entire scenario set at evaluation time.
Acknowledgments: Bodur would like to acknowledge support from an NSERC Discovery Grant.
Dumouchelle, Patel, and Khalil acknowledge support from the Scale AI Research Chair Program and an NSERC Discovery Grant.
Checklist
The checklist follows the references.
Please read the checklist guidelines carefully for information on how to answer these questions.
For each question, change the default [TODO] to [Yes] , [No] , or [N/A] .
You are strongly encouraged to include a justification to your answer , either by referencing the appropriate section of your paper or providing a brief inline description.
For example:
• Did you include the license to the code and datasets?
[Yes] See Section ?? .
• Did you include the license to the code and datasets?
[No] The code and the data are proprietary.
• Did you include the license to the code and datasets?
[N/A]
Please do not modify the questions and only use the provided macros for your answers.
Note that the
Checklist section does not count towards the page limit.
In your paper, please delete this instructions block and only keep the Checklist section heading above along with the questions/answers below.
For all authors... (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] (b) Did you describe the limitations of your work?
[Yes] (c) Did you discuss any potential negative societal impacts of your work?
[N/A] (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[N/A] (b) Did you include complete proofs of all theoretical results?
[N/A] 3.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] All code to reproduce the experiments is available at https://anonymous.4open.science/r/ neural_stochastic_programming-437E .
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[Yes] The both training and evaluation are done over varying configurations and realizations of randomness.
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[Yes] These are detailed in Section 5 and the Appendix. 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[Yes] All software used in the development has been cited (b) Did you mention the license of the assets?
[N/A] (c) Did you include any new assets either in the supplemental material or as a URL?
[N/A] (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
[N/A] (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[N/A] 5.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]