Learning Solutions of Stochastic Optimization Problems with Bayesian Neural Networks

Alan A. Lahoud, Erik Schaffernicht, Johannes A. Stork

Introduction

In automated decision-making, the "predict-then-optimize" pipeline is a standard paradigm. A machine learning model first predicts an unknown parameter—such as future energy demand or stock prices—and a mathematical solver then determines the optimal action based on that prediction. However, traditional models often provide a single point estimate, ignoring the inherent uncertainty in the prediction. In scenarios where the costs of error are asymmetric (e.g., the high cost of a stockout versus the lower cost of excess inventory), this "uncertainty-blindness" can lead to significant financial or operational losses.

This paper addresses this gap by introducing a framework that utilizes Bayesian Neural Networks (BNNs) to capture both aleatoric (data noise) and epistemic (model uncertainty) uncertainty. By propagating these probabilistic distributions into a Stochastic Programming solver, the framework aims to minimize "decision regret"—the difference between the cost of a model-driven decision and the optimal decision made with perfect hindsight.

Methods: Integrating BNNs with Stochastic Programming

The core of the proposed approach is the replacement of deterministic predictors with BNNs. Unlike standard neural networks, BNNs output a distribution over parameters, providing a richer input for optimization.

The proposed framework integrating Bayesian Neural Networks with Stochastic Programming, illustrating both Decoupled (1) and Combined (2) learning strategies.

The authors propose two distinct learning strategies as shown in the architecture above:

  1. Decoupled Learning (D-BNN): In this two-stage process, the BNN is trained independently to maximize the likelihood of the observed data (Path 1). During the decision phase, multiple samples are drawn from the BNN's posterior distribution to represent the range of possible parameter values. These samples are then fed into a Stochastic Programming block, which finds a decision that minimizes the expected cost across all scenarios.
  2. Combined Learning (C-BNN): This end-to-end approach integrates the optimization task directly into the training loop (Path 2). By utilizing differentiable optimization techniques, the model can backpropagate errors from the final decision cost (the "task loss") all the way back to the BNN weights. This allows the network to learn a "latent distribution" specifically optimized for the decision task.

Experimental Evaluation

The framework was tested on several benchmarks, ranging from synthetic simulations to real-world financial data, including Newsvendor Problems and Portfolio Optimization (POP2) using daily US stock market indicators from 2010 to 2017.

Key Results

The research demonstrates that BNN-based methods consistently outperform deterministic Artificial Neural Networks (ANNs):

  • Regret Reduction: In the NV1 task, the C-BNN achieved a regret score of 457, a substantial improvement over the 958 achieved by a standard decoupled ANN.
  • Data Efficiency: The Combined approach (C-BNN) proved particularly effective when training data was scarce, as the end-to-end training signal helps the model focus on the most relevant features for the final decision.
  • Real-World Utility: On the POP2 dataset, C-BNN outperformed all baselines, highlighting its potential for high-dimensional, noisy financial environments.

Conclusion and Future Work

By bridging the gap between probabilistic prediction and stochastic optimization, this framework offers a robust solution for decision-making under uncertainty. While the results are promising, the authors note that the computational cost of running a solver during every training step in the Combined approach remains a challenge for scaling to very high-dimensional problems. Future research will focus on more efficient approximations of the expected cost to reduce training time without sacrificing decision quality.

Summary updated

BibTeX
@inproceedings{lahoud2024learning,
  author = {Alan A. Lahoud and Erik Schaffernicht and Johannes A. Stork},
  title = {{Learning Solutions of Stochastic Optimization Problems with Bayesian Neural Networks}},
  booktitle = {ICANN},
  year = {2024},
  doi = {10.1007/978-3-031-72332-2\_11},
}
Figure