Abstract
We study the robustness of deep reinforcement learning algorithms against distribution shifts within contextual multi-stage stochastic combinatorial optimization problems from the operations research domain. In this context, risk-sensitive algorithms promise to learn robust policies. While this field is of general interest to the reinforcement learning community, most studies up-to-date focus on theoretical results rather than real-world performance. With this work, we aim to bridge this gap by formally deriving a novel risk-sensitive deep reinforcement learning algorithm while providing numerical evidence for its efficacy. Specifically, we introduce discrete Soft Actor-Critic for the entropic risk measure by deriving a version of the Bellman equation for the respective Q-values. We establish a corresponding policy improvement result and infer a practical algorithm. We introduce an environment that represents typical contextual multi-stage stochastic combinatorial optimization problems and perform numerical experiments to empirically validate our algorithm's robustness against realistic distribution shifts, without compromising performance on the training distribution. We show that our algorithm is superior to risk-neutral Soft Actor-Critic as well as to two benchmark approaches for robust deep reinforcement learning. Thereby, we provide the first structured analysis on the robustness of reinforcement learning under distribution shifts in the realm of contextual multi-stage stochastic combinatorial optimization problems.
1. Introduction
Deep Reinforcement Learning (DRL) has demonstrated significant potential in solving multi-stage combinatorial optimization (CO) problems, such as warehouse robotics and logistics dispatching. However, these models often exhibit brittleness when faced with "distribution shifts"—scenarios where the operational environment deviates from the training simulation. While robust RL has been explored in robotics and adversarial defense, there remains a gap in Operations Research (OR), where discrete actions and shifts in underlying data distributions (e.g., changing item locations) are primary concerns. This work introduces a Risk-Sensitive Discrete Soft Actor-Critic (SAC) algorithm designed to enhance robustness in these contexts.
2. Methodology
The proposed approach extends the Soft Actor-Critic framework by incorporating an entropic risk measure.
2.1 Entropic Risk Measure and Bellman Equation
Instead of maximizing expected returns, the agent optimizes a risk-sensitive objective controlled by a hyperparameter $\beta$. This allows the agent to be tuned for risk-aversion, effectively penalizing high variance in returns. We formally derive a risk-sensitive version of the Bellman equation, providing the necessary foundation for value iteration and proving that the resulting policy update rule leads to monotonic policy improvement.
2.2 Numerical Stability
To prevent "exploding gradients" common when implementing exponential utility functions in neural networks, we employ a log-sum-exp trick. This modification to the critic loss function ensures the algorithm's stability and practical applicability in deep learning architectures.
3. Experimental Setup
We evaluate the algorithm in a contextual multi-stage stochastic CO environment consisting of a 5x5 grid world. An agent must collect stochastically appearing items and deliver them to a target. To simulate distribution shifts, we define 12 distinct spatial distributions for item appearances, ranging from various gradients to unstructured noise.
The agent is trained on a single distribution ("Gradient 1") and subsequently tested on all other distributions to assess its generalization capabilities to unseen environmental patterns.
4. Results and Analysis
Our experiments reveal that risk-aversion serves as a significant performance booster. Risk-sensitive SAC improved performance on the training distribution by up to 114% compared to standard SAC, likely due to variance reduction aiding neural network convergence.
4.1 Robustness to Distribution Shifts
Under distribution shifts, risk-sensitive SAC achieved 53% of the achievable performance gain (the gap between a baseline and an environment-specific expert), whereas standard SAC achieved only 20%. The algorithm maintains computational efficiency comparable to standard SAC, making it a viable "drop-in" replacement for OR applications.
4.2 Comparison with Benchmarks
We compared our approach against common robustness strategies: adding noise to training data and increasing entropy regularization.
As shown in the figure, risk-sensitivity (right column) offers a superior trade-off. While high entropy regularization or excessive noise can lead to performance collapse, a properly tuned risk-sensitivity coefficient $\beta$ maintains high performance on the training data while significantly improving robustness on test instances.
5. Conclusion
This work provides the first structured analysis of RL robustness under distribution shifts in the realm of contextual multi-stage stochastic CO problems. While the algorithm is currently derived for discrete action spaces and shows sensitivity to the $\beta$ hyperparameter if set too high, it demonstrates clear superiority over existing benchmarks. Future work will focus on extending this derivation to continuous action spaces and scaling to larger, multi-agent environments.
Summary updated