Back to Blog
Data & Analytics

Building Intelligent Inventory Forecasting Systems

J

James Wilson

Data Scientist

December 5, 2024
10 min read
SupplyAI Dashboard Overview

Deep dive into how SupplyAI built a probabilistic forecasting engine that cut forecast error from 22% to 6%, reduced excess inventory by $43M, and enabled autonomous replenishment for 15,000 SKUs across 3 continents.

Introduction

Conventional ERP forecasting uses simple exponential smoothing that assumes stationary demand—an assumption shattered by TikTok-driven viral spikes and supply-chain shocks. SupplyAI’s new engine combines hierarchical Bayesian models with transformer-based sequence-to-sequence networks to generate full probability distributions of demand 52 weeks ahead, enabling service-level targeting at 98.5% while minimizing working capital.

Data Challenges

Historical data was messy: 30% of SKUs had <12 months of history, 11% phantom inventory from unrecorded damages, and promotions coded inconsistently across 4 legacy systems. We built a data-contract layer using Great Expectations that rejects upstream data failing 87 predefined quality rules, cutting model-training failures by 92%.

Modeling Approach

Three-tier hierarchy: daily store-SKU sales → weekly warehouse-SKU → monthly category. At each node we fit a negative-binomial state-space model with covariates for price elasticity, weather, and Google-trends indices. Transformer encoder ingests 104-week lagged values plus categorical embeddings for holidays; decoder outputs quantile forecasts at 0.05, 0.5, 0.95. Entire pipeline built with PyTorch Lightning on Databricks, training 2,100 models in parallel under 45 minutes.

Uncertainty Quantification

Instead of point forecasts, planners receive predictive intervals. For example, SKU-4721 has 90% chance demand falls between 380–510 units next week. Safety-stock formulas switch from z-service-level to CVaR (conditional-value-at-risk) allowing explicit trade-off between stock-out cost vs holding cost, yielding 18% working-capital reduction while maintaining 98.5% service.

Replenishment Automation

When lower-bound of predictive interval < reorder-point AND upper-bound > pack-size, system auto-generates PO suggestions sent to supplier portal via EDI 850. Planner dashboard shows explainability: ‘Recommend 1,200 units because upcoming heat-wave increases iced-tea demand by 2.3× with 87% confidence.’ Planner can override within SLA; otherwise PO releases at 2 p.m. daily.

Results

Forecast accuracy (WAPE) improved from 78% to 94% for short-life produce and from 82% to 96% for ambient groceries. Excess inventory dollars dropped $43M (11% of total). Stock-outs fell 37%, driving top-line uplift of $29M. Carbon footprint reduced 9,100 tCO₂e by cutting emergency air-freight.

Scalability

System handles 15K SKUs across 420 stores, 9 DCs, 3 continents. Daily inference processes 6.3M rows in 14 minutes using Spark on Kubernetes. Model retraining cadence: weekly for fast-moving, monthly for slow-moving. Feature store versioning guarantees full reproducibility for audit.

Future Work

Integrate large-language-models to parse supplier emails about allocation constraints, simulate promotion cannibalization across categories, and pilot reinforcement-learning agents that learn optimal replenishment policies under non-stationary lead-times.

ForecastingInventoryAIAnalytics