Applied & Industry · 2025

Demand Forecasting at Wayfair

Applied & Industry Demand Forecasting at Wayfair 2025
Topic
Applied & Industry
Venue
Foresight 2025 Q4 (award winner) · no arXiv
Read
14 min
Source

In one line

Wayfair forecasts 18 months of monthly demand for 4 million products by blending a stable statistical "top-down" forecast with a responsive ML "bottom-up" forecast, mixing them per-item and per-horizon — and it earned tens of millions of dollars a year.

The breakdown

TL;DR

Forecasting demand for a sprawling, sparse retail catalog is hard: most items barely sell, most are too new to show a trend, and seasonality is all over the map. Wayfair’s system, Demetra, runs two forecasters in parallel — a classic time-series model on aggregated product classes (stable, good for sparse/long-horizon) and a gradient-boosted-tree ML model on individual items (granular, good for high-volume/short-horizon) — then combines them with a differential ensembler that learns how much to trust each one based on the item’s sales volume, its seasonality type, and how far ahead you’re forecasting. The payoff was concrete: 13% lower RMSE, 11-point bias improvement, refresh time cut from 21 days to 5, and an estimated $6.8M/year of recovered revenue from just 20% of US volume. The deep lesson isn’t a fancy model — it’s that the right blend of two mediocre-on-their-own forecasters beats either alone, and the blend weights should be data-driven, not fixed.

Problem & Motivation

The pain is specific and brutal. Wayfair must produce one number — monthly demand, 1 to 18 months out — for ~4 million products, and that number drives inventory orders, warehouse labor, and transportation capacity. Get it wrong high, you eat overstock and storage costs; get it wrong low, you stock out and lose the sale (and often the customer).

Why standard forecasting falls over here:

  • Data sparsity. 75% of items have more zero-sales months than nonzero months. A classic time-series model fed mostly zeros learns mostly noise.
  • Short series. 50% of items have fewer than 24 months of history — less than two seasonal cycles — so you literally cannot detect “this peaks every winter” from the item’s own data.
  • Catalog explosion. Tens of thousands of brand-new products appear every month with zero history, yet still need a forecast on day one.
  • Heterogeneous seasonality. Christmas trees peak in November, patio chairs in May, a desk lamp barely moves all year, and some items have two peaks. One model with one seasonal assumption can’t serve all of them.
  • Trend breaks. Even aggregate US demand swings up, down, and flat over the training window, so naïvely fitting a single trend to the whole history is wrong.

The two textbook answers each fail in a complementary way. A top-down statistical model (forecast the aggregate, split it down) is stable and handles sparsity, but it’s blind to what makes an individual item special. A bottom-up ML model (forecast each item directly) is responsive and granular, but starves on sparse/short series and gets noisy at long horizons. Wayfair’s legacy systems used one or the other in isolation — and left accuracy on the table.

What’s New (Core Contribution)

This is an industry “view from the trenches” paper, so the novelty is in the system design and the empirical claim, not a new algorithm. The genuine contributions:

  1. Differential ensembling. Before: ensembles of forecasts usually use a fixed or globally-optimized weight. Now: the top-down/bottom-up mixing weight is chosen per (segment × forecast-horizon) via grid search on a validation set — e.g., 100% top-down for low-volume summer items, but heavily bottom-up for high-volume items, and the weight shifts as the horizon stretches from 1 to 18 months. The adaptivity is the core idea.
  2. Segment-then-specialize for the ML leg. Before: one big model for the whole catalog. Now: items are split into head/tail (volume) × seasonality buckets, and each bucket gets its own LightGBM model with its own features. Similar demand dynamics are modeled together.
  3. A clean empirical claim against reconciliation. Before: the academic hierarchical-forecasting literature leans on forecast reconciliation (MinT and friends) as the way to make multi-level forecasts coherent. Now: Wayfair shows that simple top-down/bottom-up ensembling — even unweighted averagingcompares favorably to reconciliation at the bottom level of a real, huge, messy hierarchy, and over an 18-month horizon (vs. M5’s 28 days).
  4. A complete operational wrapper. The forecasting “model” is only half the story; the post-processing algorithm (promotions via price elasticity, lost-sales add-backs, prediction intervals, policy-change uplifts) and the engineering pipeline are first-class parts of the contribution.

Be honest about what’s not new: LightGBM, SCUM, ETS/ARIMA/Theta/CES, recursive forecasting, grid search — all off-the-shelf. The win is the composition and the discipline of making it run monthly at scale.

How It Works (Technically)

Think of Demetra as two forecasters and a referee.

The hierarchy. Products roll up: Item → Subclass → Class → Category → Country. There are ~2.6M US items but only ~1,000 classes. The class level is the sweet spot — aggregated enough to be stable, granular enough to be meaningful. This is where the two legs meet.

Leg 1 — Top-down (statistical, class-level).

  1. Aggregate all item sales up to the class level (~1,000 series). Now each series is dense and long enough to model.
  2. Forecast each class with a modified SCUM (“Simple Combination of Univariate Models”). SCUM = run several univariate forecasters and combine them. Wayfair runs AutoETS, AutoARIMA, AutoTheta, and CES and takes the mean of their forecasts (the original SCUM used the median). Plain English: “don’t bet on one statistical model; average four robust ones, because the average is steadier than any single one.”
  3. Disaggregate the class forecast back down to items using each item’s historical share of its class. The clever bit: the lookback window for computing that share depends on the horizon. For horizon 1, they use a 50-50 blend of (the item’s share at lag-1 month) and (its share averaged over lags 1–3). Each horizon gets its own share-weights, tuned by grid search on validation. Operationally this says: “for next month, recent share matters most; for further out, use a smoother, longer average so a one-month blip doesn’t distort the split.”

Leg 2 — Bottom-up (ML, item-level).

  1. Segment the catalog: head vs. tail (high vs. low volume) crossed with seasonality class (winter / summer / low-seasonality). Each segment → its own model.
  2. Train a LightGBM (gradient-boosted decision trees) per segment. Features are lag-based inputs (sales 1, 2, 3… months ago), rolling statistics (rolling mean/std), and categorical IDs (class, etc.). They prune features using permutation importance on validation — shuffle a feature’s values, see how much accuracy drops; small drop ⇒ unimportant ⇒ cut it.
  3. Forecast recursively: predict month t+1, feed that prediction back in as a “lag” feature to predict t+2, and so on out to 18 months. (Caveat worth knowing: recursive forecasting compounds errors — a bad month 1 poisons month 2’s input. This is exactly why bottom-up degrades at long horizons and top-down takes over.)

Why LightGBM and not a deep net? Gradient-boosted trees dominate tabular retail-forecasting competitions (M5), train fast, scale to millions of series, and need little tuning. For a tabular, feature-engineered problem, this is the pragmatic right answer, not a compromise.

The referee — differential ensembling. For each (segment, horizon), the final forecast is a weighted average:

forecast = w · bottom_up + (1 − w) · top_down

That’s the whole equation — a convex combination, w between 0 and 1. The art is choosing w. Wayfair does a grid search: try w ∈ {0%, 5%, 10%, …, 100%}, and for each value compute RMSE and bias on a validation set. Pick the w that maximizes the combined RMSE+bias improvement. For highly seasonal items they evaluate w mainly on peak months (you care about getting the November Christmas-tree spike right, not the dead summer months).

Two refinements:

  • Smoothing across horizons. After picking w independently per horizon, they smooth the w-vs-horizon curve so the forecast doesn’t jerk between, say, horizon 6 and 7. No abrupt regime flips.
  • Refit cadence. Re-run the grid search every 6 months so weights track evolving demand.

The learned pattern matches intuition: high-volume items lean bottom-up (enough data for ML to shine), and w stays flat or grows with horizon; low-volume items lean top-down, sometimes 100% top-down (e.g., summer-seasonal tail items), because the item-level ML simply has nothing to learn from.

Then post-processing (the operational layer Demetra hands off to):

  • Business adjustments: add promo demand using price elasticity of demand × known price change (because promos aren’t known early enough to bake into Demetra). Add lost-sales back to historically out-of-stock items — but differentially: fast movers get 100% of estimated lost sales added back (low substitutability), slow/intermittent items get little or none (a stockout there just shifts the buyer to a similar product).
  • Prediction intervals: fit a demand-variability model on out-of-sample errors, try negative-binomial / binomial / normal distributions, keep the best fit, read off quantiles for safety-stock suggestions.
  • Policy uplifts: model demand boosts from internal actions (faster shipping → better rankings → more sales).

Architecture & data flow

flowchart TB
  RAW[Item-level monthly sales<br/>~2.6M US series] --> AGG[Aggregate to Class level<br/>~1,000 series]
  RAW --> SEG[Segment: head/tail x seasonality]

  AGG --> TD[Top-down: SCUM<br/>AutoETS+ARIMA+Theta+CES mean]
  TD --> DIS[Disaggregate by horizon-weighted<br/>historical share]

  SEG --> BU[Bottom-up: per-segment LightGBM<br/>recursive, 1..18 months]

  DIS --> ENS[Differential Ensembler<br/>w per segment x horizon]
  BU --> ENS
  ENS --> SMOOTH[Smooth w across horizons]

  SMOOTH --> POST[Post-processing:<br/>promos, lost-sales, intervals, policy]
  POST --> IPA[Inventory Planning App<br/>internal + supplier consumers]

Schematic of differential ensembling: drag the sliders to set item volume and seasonality, and watch how the optimal bottom-up weight w shifts across the 1–18 month horizon. High-volume items stay bottom-up-heavy; low-volume seasonal items collapse toward 100% top-down. (Illustrative curves matching the paper's described patterns, not Wayfair's exact numbers.)

The algorithm, simplified

# Demetra's core: build two forecasts, then learn how to blend them per segment & horizon.
# Stubs: ts_ensemble(...)->np.array, lightgbm_recursive(...)->np.array, score(...)->dict

def demetra(item, history, horizons=range(1, 19)):
    seg = segment_of(item)                 # (head/tail, winter/summer/low-seasonality)

    # Leg 1: top-down — forecast the CLASS, then split to the item by historical share
    class_fc = ts_ensemble(aggregate_to_class(history))      # mean of ETS/ARIMA/Theta/CES
    top_down = [class_fc[h] * share(item, h) for h in horizons]  # share lookback depends on h

    # Leg 2: bottom-up — per-segment LightGBM, recursive out to 18 months
    bottom_up = lightgbm_recursive(models[seg], history, horizons)  # feeds preds back as lags

    # Referee: choose w per horizon by grid search on validation, then smooth the w-curve
    w = []
    for h in horizons:
        best_w, best_obj = 0.0, +1e9
        for cand in [i/20 for i in range(21)]:            # 0%,5%,...,100%
            blend = cand * bottom_up[h] + (1-cand) * top_down[h]
            m = score(blend, validation[item][h], peak_only=is_seasonal(seg))  # RMSE+bias
            if m["rmse"] + m["bias"] < best_obj:           # minimize combined error
                best_w, best_obj = cand, m["rmse"] + m["bias"]
        w.append(best_w)
    w = smooth(w)                                          # no abrupt horizon-to-horizon jumps

    return [w[i]*bottom_up[h] + (1-w[i])*top_down[h] for i, h in enumerate(horizons)]

Built on Prior Work

Prior ideaWhat it gaveWhat this paper changes
SCUM — Petropoulos & Svetunkov (2020)Combine several univariate models for robust statistical forecastsUses the mean instead of the median; applies it at the class level as the top-down leg
LightGBM — Ke et al. (2017)Fast, scalable gradient-boosted trees; M5-competition winnerUsed per-segment with recursive forecasting and permutation-pruned features
M5 competition — Makridakis et al. (2022)Showed tree models win on hierarchical retail demandExtends the result from 28-day to 18-month horizons; argues that’s the horizon that matters for replenishment
Forecast reconciliation — Athanasopoulos et al. (2024) review“Coherent” multi-level forecasts via MinT-style reconciliationProvides evidence that simple ensembling beats reconciliation at the bottom level on real data
Empirical prediction intervals — Lee & Scholtes (2014); Diebold et al. (1998)Build intervals from out-of-sample errors; density-forecast evaluationApplies them to pick neg-binomial/binomial/normal fits for safety-stock quantiles

Results & Evidence

Headline numbers (vs. legacy systems), measured via time-series cross-validation at the item level:

  • 13%+ RMSE improvement (accuracy).
  • 11 percentage-point bias improvement (systematic over/under-forecasting).
  • Improved month-over-month stability (forecasts don’t whipsaw between refreshes).
  • Refresh time: ~21 days → ~5 days — arguably the biggest operational unlock, since it lets planners act on fresher data.
  • $6.8M/year mean incremental revenue from just 20% of US volume (high-volume Castlegate-fulfilled items), via simulation. Authors call this conservative and estimate true total impact “several times larger.”

What the evidence establishes: that this composition beats Wayfair’s previous systems on its own catalog, durably (sustained ~2 years in production across US/UK/Canada/Germany). That’s a strong, honest production result.

What it does NOT establish — read carefully, you sell forecasting-adjacent work:

  • The baseline is “legacy Wayfair,” not a strong public benchmark. A 13% lift over an unspecified internal system tells you the project was worth doing, not that Demetra beats a well-tuned MinT reconciliation or a global deep model. The favorable-vs-reconciliation claim is asserted here and detailed only in a separate SSRN paper (Mitchell et al. 2024) — not reproduced in this article.
  • No ablations in this article. We’re told differential ensembling beats unweighted averaging, but not by how much, nor how much the segmentation vs. the ensembling each contributes.
  • The dollar figure is a simulation on a favorable slice (high-volume, single fulfillment network). Reasonable, but not a controlled experiment.
  • Generalization is argued, not proven. “Could apply to other large retail hierarchies” is plausible and well-motivated, but it’s one company’s catalog.

Net: a credible, well-engineered industrial win. Treat the specific numbers as directional, and don’t quote “13%” to a client as a law of nature.

How You’d Use It

You run an AI services company; this paper is a reusable pattern, and the pattern is more valuable than the forecasting domain.

  • The hybrid-ensemble pattern transfers anywhere you have “stable-but-coarse” and “responsive-but-fragile” predictors. Replace top-down/bottom-up with: a rules engine + an LLM, a retrieval baseline + a fine-tuned model, a cheap fast model + an expensive accurate one. The differential ensembler — learn the mix weight per segment and per “difficulty axis” — is a clean, sellable technique. Many clients are running one model where they should be running two and blending.
  • Demand/inventory forecasting as an offering. Mid-market retailers, distributors, and e-commerce shops have exactly Wayfair’s problem at smaller scale and no data-science team. A productized “Demetra-lite” (top-down statsforecast + bottom-up LightGBM + a tuned blend) is a concrete, defensible engagement. The libraries are open source; the value is the composition, the segmentation logic, and the operational wrapper.
  • The operational discipline is the moat, not the model. The refresh-time win (21→5 days), the sanity checks (“explain any big month-over-month shift before shipping”), the explainability requirement, the supplier-facing intervals — that’s what makes a forecast trusted and adopted. For agentic systems, this maps directly to: a slow-but-correct deterministic path + a fast LLM path, blended by confidence, with an audit/sanity gate before anything reaches a stakeholder.
  • Segment-then-specialize for your agents. Don’t build one mega-agent; route by request type to specialized agents (your MAS instinct), then have a “referee” merge or pick. Wayfair’s head/tail × seasonality segmentation is the same move as routing easy/hard or short/long queries to different models.

Build Your Own (Minimal Recipe)

A weekend-to-two-weeks version that captures ~80% of the value on a real catalog:

Components & build order:

  1. Data + hierarchy. Monthly sales per item; a mapping item → class. Compute each item’s historical share of its class. (Half a day.)
  2. Top-down leg. Aggregate to class; forecast each class with Nixtla StatsForecast (AutoETS + AutoARIMA + AutoTheta, take the mean); disaggregate to items by share. (Nixtla makes this ~30 lines.)
  3. Bottom-up leg. Segment items by volume tertile × a crude seasonality flag. Build features (lags 1/2/3/6/12, rolling mean/std) with Nixtla MLForecast wrapping LightGBM; train one model per segment; forecast recursively. (A day.)
  4. The ensembler (the part that matters). Hold out the last N months as validation. For each (segment, horizon), grid-search w ∈ {0,…,1} by step 0.05, minimizing RMSE+|bias|. Smooth w across horizons. (Half a day — and this is where the lift comes from, so spend the care here.)
  5. A thin post-process. At minimum: prediction intervals from out-of-sample error quantiles. Add promo/lost-sales adjustments only if the client needs them.

The 1–2 genuinely hard parts:

  • Validation design. Time-series cross-validation done wrong (leaking future into features, evaluating on the same months you tuned on) silently inflates every number. Use rolling-origin backtests and never let a lag feature see the future.
  • The recursive-forecast error compounding. Decide deliberately where bottom-up should hand off to top-down at long horizons — that’s literally what the per-horizon w is buying you.

Reach for: Nixtla (statsforecast, mlforecast), LightGBM, pandas/polars for the feature pipeline, and a simple Airflow/cron for the monthly refresh.

How to Improve It

Limitations as leverage — testable directions:

  1. Replace grid-search blending with a learned meta-model (stacking). Instead of a single scalar w per (segment, horizon), train a small model (even a shallow GBM or logistic gate) that predicts the blend weight per item from features (recent volatility, data length, seasonality strength). This is the natural generalization of “differential ensembling” and should beat coarse segments. Easy to A/B against the current grid search.
  2. Add a forecast-reconciliation step on top of the ensemble so item forecasts sum coherently to class/category totals (MinT or a simple proportional reconcile). The paper positions ensembling vs. reconciliation — combining them (ensemble for accuracy, reconcile for coherence) is an obvious unexplored cell.
  3. Quantile/probabilistic LightGBM instead of point + bolt-on intervals. Train the bottom-up leg with pinball loss to predict quantiles directly; cleaner, better-calibrated intervals than fitting distributions to residuals after the fact.
  4. Direct multi-horizon forecasting to kill error compounding. Train separate models for each horizon (or a global multi-output model) so month-12 isn’t built on month-1’s mistakes. Compare against the recursive approach — this is the textbook fix for the recursive weakness they’re papering over with top-down.
  5. Cold-start for new items via embeddings. New products have no history and currently ride entirely on the top-down/class share. Learn item embeddings from attributes (category, price, text/images) and warm-start the bottom-up model — the single biggest gap given “tens of thousands of new items/month.”

Glossary

  • Top-down forecasting — forecast an aggregate (here, a product class), then split it down to individual items by their historical share.
  • Bottom-up forecasting — forecast each individual item directly, then sum up if you need totals.
  • Differential ensembling — Wayfair’s term for choosing the blend weight between two forecasts separately for each item segment and forecast horizon, rather than one global weight.
  • LightGBM — a fast, scalable gradient-boosted decision tree library; the workhorse model for tabular/retail forecasting.
  • Gradient-boosted trees — an ensemble of small decision trees trained sequentially, each correcting the previous one’s errors.
  • SCUM (Simple Combination of Univariate Models) — forecast a series with several univariate models and combine them (Wayfair uses the mean of ETS/ARIMA/Theta/CES).
  • AutoETS / AutoARIMA / AutoTheta / CES — standard univariate time-series forecasters (exponential smoothing, ARIMA, Theta method, Complex Exponential Smoothing) with auto model selection.
  • Recursive forecasting — predict one step, feed that prediction back as an input lag to predict the next step, and so on; errors can compound.
  • RMSE (Root Mean Squared Error) — a standard accuracy metric; lower is better, penalizes large misses heavily.
  • Bias — systematic over- or under-forecasting (the average signed error); near zero is good.
  • Permutation importance — measure a feature’s value by shuffling it and seeing how much accuracy drops.
  • Forecast reconciliation — adjusting forecasts across hierarchy levels so they’re mutually coherent (item forecasts sum to class totals); MinT is the influential method.
  • Price elasticity of demand — how much quantity sold changes when price changes; used to model promo lift.
  • Lost sales — demand that existed but wasn’t observed because the item was out of stock; added back to estimate true demand vs. observed sales.
  • Safety stock — extra inventory held to absorb demand/supply surprises; sized from forecast prediction intervals.
  • Prediction interval — an upper/lower band around the point forecast expressing uncertainty.
  • Head / tail items — high-volume (head) vs. low-volume/long-tail (tail) products; modeled differently.
  • Castlegate — Wayfair’s owned fulfillment network (vs. dropship suppliers).