Hard Constraints, Smooth Gradients: Learning Feasible Inventory Policies via Differentiable Projection
2026-08-03 • Artificial Intelligence
Artificial IntelligenceMachine Learning
AI summaryⓘ
The authors address complex decision problems where actions must meet strict, interconnected rules, which are hard to solve with traditional methods. They combine neural networks with a smart way to ensure decisions follow rules exactly, by projecting proposed actions onto a relaxed feasible set and then converting them back to valid integer actions. Their approach trains end-to-end and works well in tough, real-world planning problems like inventory management, outperforming existing methods in accuracy and cost savings. This shows that deep reinforcement learning can effectively handle hard constraints in sequential decisions.
Mixed-Integer Linear Programs (MILPs)Deep Reinforcement Learning (DRL)Sequential Decision ProcessesQuadratic ProgrammingFeasibility ConstraintsInventory PlanningProjection MethodsDifferentiable OptimizationStochastic EnvironmentsOptimality Gap
Authors
Patrick Helm, Jan-Niklas Doerr, Joren Gijsbrechts, Stefan Minner
Abstract
Many operational problems are constrained sequential decision processes with large, combinatorial action spaces and interdependent feasibility constraints. Mixed-integer linear programs (MILPs) handle such constraints flexibly but scale poorly in stochastic environments. Deep reinforcement learning (DRL) promises scalable decision rules, but existing methods either penalize constraints rather than enforce them, or rely on feasibility mechanisms that break down once constraints interact. We bridge this gap by embedding a differentiable convex optimization module inside the policy: a neural network proposes continuous action targets, a quadratic program projects them onto the relaxed feasible set, and a dual-informed integer mapping restores integrality while preserving feasibility. Given a differentiable simulator, the policy trains end to end from sampled trajectories using pathwise gradients, while handling hard constraints with similar flexibility to MILPs. We show that our feasibility enforcement has bounded error relative to an exact integer projection and ensures the entire feasible action space is reachable. We apply the method to multi-echelon production-inventory planning under shared resource and material constraints. Our policy attains an average optimality gap below 1% on small instances. It further outperforms state-of-the-art echelon base-stock policies by up to 9.75% and a rolling-horizon multi-stage stochastic program by at least 7.7% in larger networks. On an industry-scale case study from ASML, it reduces average cost by up to 3.22% relative to the best-known benchmark policy. The savings are largest where planning is hardest: in tightly capacitated systems with high demand variability. More broadly, our work shows that DRL can deliver economically significant savings in sequential decision problems with interdependent hard constraints, which are widespread in practice.