Abstract
In retail sectors such as grocery stores and apparel shops, inventory managers must navigate a precarious balance between short-term risk (stockouts) and long-term risk (over-ordering leading to waste). This challenge is exacerbated by the inherent uncertainty of customer demand. This paper investigates the restocking of perishable items in a grocery context from a distributional perspective. We frame inventory restocking as a reinforcement learning (RL) task characterized by stochastic behavior and partial observability. We present two primary contributions: RetaiL, a new RL environment based on real-world grocery data and expert knowledge, and GTDQN, a distributional RL algorithm that utilizes a generalized lambda distribution to model reward space. Our results demonstrate that GTDQN provides a robust baseline, outperforming traditional and distributional RL approaches in both profitability and waste reduction.
Introduction
Inventory management is a classic balancing act. Ordering too little results in "out-of-stock" scenarios and lost revenue, while ordering too much—particularly of perishable goods like produce or dairy—generates significant waste. Food waste is not merely a financial burden; it accounts for approximately 10% of global carbon emissions, making its reduction a priority for economic and environmental sustainability.
Traditional supply chain algorithms often rely on "mean" estimates of demand, which fail to capture the stochastic nature of real-world retail. Because waste typically occurs as a "tail event"—where items expire suddenly at the end of their shelf life—standard reinforcement learning approaches that focus on expected rewards often struggle. This paper addresses these gaps by introducing a realistic simulation environment and a specialized distributional RL algorithm.
The RetaiL Environment
To facilitate research in this domain, we developed RetaiL, a simulation environment modeled after a real-world grocery store. RetaiL incorporates several critical factors often overlooked in simpler models:
- Lead Times: The delay between placing an order and receiving the items.
- LIFO Customer Behavior: Shoppers often select the freshest items first (Last-In-First-Out), which accelerates the expiration of older stock and complicates waste management.
- Stochastic Demand: Demand is modeled as a partially observable process, forcing agents to make decisions under high uncertainty.
To ensure the environment is both realistic and accessible without compromising proprietary information, we collaborated with a major European grocery retailer. We used a Clayton copula to generate "pseudo-items" that preserve the statistical correlations found in real data—such as the relationships between an item's cost, retail price, popularity, and shelf life.
GTDQN: Distributional Reinforcement Learning
While standard RL (like DQN) attempts to predict the expected reward of an action, Distributional RL (DRL) models the entire probability distribution of rewards. This is particularly useful in inventory management, where the risks (waste and stockouts) are located in the tails of the distribution.
The Innovation: Parametric Modeling
Most current DRL methods, such as QR-DQN, are non-parametric, attempting to learn a set of individual quantiles. This can lead to "quantile crossing," a mathematical inconsistency where lower percentiles are predicted to be higher than upper percentiles.
Our proposed algorithm, GTDQN (Generalized Tukey Deep Q-Network), instead learns the four parameters ($\lambda_1, \lambda_2, \lambda_3, \lambda_4$) of a Generalized Lambda Distribution. This parametric approach offers several advantages:
- Flexibility: The distribution can represent a wide variety of shapes, including unimodal, U-shaped, or highly skewed distributions.
- Stability: By learning the parameters of a well-defined distribution, the model avoids quantile crossing and provides a smoother learning signal.
- Efficiency: GTDQN is computationally more efficient than quantile-based methods, as it only needs to estimate a fixed number of parameters regardless of the distribution's complexity.
Experimental Results
We evaluated GTDQN against standard DQN and other distributional baselines across three scenarios of increasing volatility ($H=0$ to $H=2$).
- Profitability: In the high-volatility scenario ($H=2$), GTDQN achieved a human-normalized profit of 194.1%, significantly higher than DQN’s 146.5%.
- Waste Reduction: While all RL agents reduced waste compared to traditional $(s, Q)$ heuristics, GTDQN maintained superior profit margins while keeping waste levels competitive with more complex models.
- Training Efficiency: GTDQN proved to be approximately 3x faster to train than QR-DQN when using a large number of quantiles, demonstrating its suitability for large-scale retail applications.
Conclusion and Future Work
GTDQN and the RetaiL environment represent a significant step forward in applying RL to sustainable supply chain management. By treating waste as a distributional challenge rather than a mean-estimation problem, we achieve better financial and environmental outcomes.
Future research will focus on expanding the model to include continuous action spaces, accounting for demand elasticity (where customers substitute one item for another), and incorporating the logistical costs of restocking. Additionally, we aim to scale this approach to multi-agent settings where different agents manage interconnected store sections.
Summary updated