arXiv:2609.01933cs.LGSep 2026

Manuscript Offprint

arXiv:2609.01933

OR-Transformer: Scaling Real-Time Decision-Making to 1,000 Items

Shuze Daniel Liu, David Simchi-Levi, Claire Chen, Chutong Gao, Shangtong Zhang

Abstract

Modern supply chain operations can require coordinating replenishment across thousands of heterogeneous items under correlated stochastic demand, heterogeneous lead times, and shared fixed ordering costs, yielding observation spaces exceeding 10410^{4} dimensions. At this scale, rolling-horizon stochastic mixed-integer linear programs (MILPs) become prohibitively slow, while standard reinforcement learning (RL) methods face increasingly challenging credit assignment in high-dimensional action spaces. We introduce OR-Transformer, a deep reinforcement learning framework for joint replenishment under stochastic demand, with an item-permutation-equivariant Transformer architecture and pathwise-gradient training through the inventory dynamics. Across problem sizes up to 1,024 inventory items, OR-Transformer increasingly outperforms learning-based and rolling-horizon MILP baselines as scale grows. It also reduces online decision-making time by over 4 million times relative to MILP solvers, enabling real-time, large-scale deep RL in supply chain operations.

1 Introduction

Inventory management is a fundamental decision problem in retail and supply chain operations, concerning when to place orders and how much of each item to order over time. The economic consequences of these decisions can be substantial. For example, IHL Group estimates that out-of-stocks and overstocks together cost retailers approximately $1.7 trillion annually, corresponding to about 6.2% of global retail sales [13].

Figure

Figure 1.1: Scaling performance from 1 to 1,024 items. OR-Transformer increasingly outperforms learning-based and rolling-horizon MILP baselines as problem size grows; lower cost is better.

Preprint.

At large retailers, replenishment decisions are often coordinated across multiple products. For example, [19] reports that large supermarket chains such as Wal-Mart and Yonghui use joint replenishment strategies to reduce shipping costs. In such settings, a shared fixed ordering cost links the decisions across products: each joint order incurs this cost, and the decision maker must choose which products to include and in what quantities. This coupling gives rise to the joint replenishment problem (JRP), a classical problem in operations research (OR) [9, 14].

Scaling stochastic joint replenishment is difficult for both optimization and learning. With more than 1,000 items [36], observation and action spaces in our setting exceed 10410^4 and 10310^3 dimensions, respectively, making rolling-horizon stochastic MILPs prohibitively slow [2, 34] and RL credit assignment increasingly difficult. Heterogeneous lead times and correlated demand introduce additional dependencies across time and items [8, 27]. Moreover, the shared fixed ordering cost creates a discontinuity between zero and any positive order, challenging standard continuous-action RL methods [1, 11, 30]. Prior work has studied learning-based joint replenishment, differentiable inventory control, and Transformer-based inventory policies, but existing approaches either omit the shared fixed-cost coupling considered here or study it at substantially smaller action dimensions [1, 16, 27, 31].

We introduce OR-Transformer, a deep RL framework for stochastic joint replenishment. It uses an item-permutation-equivariant Transformer to allow arbitrary reordering of inventory items, while self-attention captures dependencies across item states. The training method uses differentiable inventory dynamics to propagate pathwise gradients directly to continuous order quantities, enabling direct credit assignment in high-dimensional action spaces.

We evaluate OR-Transformer against learning-based baselines spanning multiple model architectures and training algorithms, as well as classical rolling-horizon stochastic MILP baselines [2, 34]. Our experiments demonstrate that OR-Transformer increasingly outperforms the baselines as problem size grows; see Figure 1.1. At 1,024 inventory items, OR-Transformer achieves approximately 0.35M discounted cost, reducing cost by 74.7%–90.8% relative to the learning-based baselines and by about 96% relative to rolling-horizon MILP controllers despite allowing up to 10 minutes of optimization per decision. In runtime comparisons, OR-Transformer reduces online decision-making time by more than 4 million times relative to MILP solvers, offering a practical path toward real-time inventory control at large scale.

References (31)