Data Science · ML Systems Lab

Hierarchical Forecasting: Bottom-Up, Top-Down, and Optimal Reconciliation

If your national model predicts 10,000 units and your regional models collectively predict 12,000, you have a coherence problem with real inventory consequences. Hierarchical reconciliation is how you fix it. MinT, bottom-up, top-down — and when each one actually wins.

Almost every business forecasting problem is hierarchical. Sales → by region → by store → by SKU. Traffic → by country → by device → by page. Any model that forecasts at only one level is leaving information on the table and creating planning inconsistencies.

The hierarchy structure

A hierarchy has levels connected by a summing constraint: each level aggregates exactly from the level below. Total sales = sum of regional sales. Regional sales = sum of store sales. Store sales = sum of SKU sales.

The summing matrix S encodes this. For a two-level hierarchy (total T, two regions R1, R2): S = [[1,1], [1,0], [0,1]]. The base forecasts ŷ = [ŷ_R1, ŷ_R2] (forecast at the bottom level). The hierarchy-consistent forecasts at all levels: Sŷ = [ŷ_R1 + ŷ_R2, ŷ_R1, ŷ_R2]. Coherence means forecasts satisfy Sŷ_bottom = ŷ_all_levels. This is trivially true for bottom-up, but not for independently-generated forecasts at each level.

Why naive multi-level forecasting fails operationally

At a major retailer, three teams independently forecast: the national demand planning team (top-level), the regional replenishment team (mid-level), the store operations team (bottom-level). The national team forecasts 10,000 units for a product. The regional teams collectively forecast 12,000. The store teams collectively forecast 9,500. Procurement orders 10,000. Replenishment sends 12,000 to stores. Stores have plans for 9,500. The result: stores are overstocked by 25%, discount, write down inventory. This is the coherence problem with real financial consequences.

Bottom-up: aggregate from the finest level

Forecast at the SKU × store level (the leaf nodes of the hierarchy). Sum up to get category, regional, and total forecasts.

Advantages: captures local patterns that aggregate models miss (a store near a stadium has demand spikes on game days invisible in the regional average). Changes at the bottom automatically propagate up.

Disadvantages: SKU-level series are sparse. A slow-moving SKU might sell 3 units/week on average — forecasting that series reliably requires years of data, and even then a model produces wide confidence intervals. Errors at the bottom are not averaged out — they're summed. If every SKU forecast is off by 5%, the category-level forecast is off by 5%, not by 0.5%.

Top-down: disaggregate from the aggregate

Forecast at the total level (the root). Disaggregate using proportions derived from historical data.

Disaggregation: SKU_forecast = total_forecast × (historical_SKU_share_of_total).

Advantages: aggregate series are less noisy, seasonality is cleaner, long-range trends are easier to detect. One accurate model produces consistent forecasts across all levels.

Disadvantages: proportions are fixed (or slowly-moving). A new store opening in a fast-growing region starts with the same proportion as an established store. Promotional events that affect one SKU don't change the proportion used to disaggregate it. The disaggregation discards all local signal.

Optimal reconciliation: MinT

MinT (Hyndman et al., 2011) doesn't discard any model. Base forecasts are generated at every level independently. Then they're reconciled jointly:

ỹ = S (SᵀΣ⁻¹S)⁻¹ Sᵀ Σ⁻¹ ŷ

where S is the summing matrix, ŷ is the vector of all base forecasts, and Σ is the forecast error covariance matrix.

Σ captures: which levels forecast most accurately (diagonal) and how forecast errors covary across levels (off-diagonal). A level with high forecast accuracy gets high weight; a noisy level gets low weight.

In practice, Σ is estimated from historical forecast residuals. Three approximations: (1) OLS: Σ = I (treat all forecasts equally). (2) WLS: Σ = diag(w1, w2, ...) where weights are forecast error variances. (3) MinT shrinkage: estimate the full covariance matrix with a shrinkage estimator (requires 24+ months of data).

MinT with WLS is the standard starting point: it's simple, outperforms both top-down and bottom-up in most benchmarks, and doesn't require estimating off-diagonal covariance terms.

Temporal hierarchies

The same framework applies across time scales. A daily demand series can be aggregated to weekly, monthly, quarterly. Base models are trained at each frequency: a SARIMA for daily (captures day-of-week patterns), an ETS for weekly (captures weekly seasonality), an ARIMA for monthly (captures long-range trends).

MinT reconciliation across time levels produces a daily forecast that is consistent with weekly and monthly forecasts — the sum of Monday–Sunday forecasts equals the weekly forecast. This prevents the common failure: a daily model that predicts high demand on day 7 of a 7-day window, creating a spike that looks real at the daily level but contradicts the smoother weekly forecast.

Intermittent demand

Hierarchical forecasting is particularly valuable for intermittent demand (many zero observations). A SKU that sells 0–2 units/day is nearly unforecastable at the daily level. At the weekly level (0–14 units/week), the series has better signal. At the monthly level (0–60 units/month), even better.

Croston's method or TSB (Teunter-Syntetos-Babai) forecasts intermittent demand at the item level. Temporal hierarchical forecasting reconciles these item-level forecasts with the more reliable category-level weekly/monthly forecasts, pulling the item-level forecast toward the category trend.

Implementation

Python: nixtla/hierarchicalforecast implements all reconciliation methods (OLS, WLS, MinT, ERM). The hts package for R (the original MinT implementation). The API: fit base models → generate base forecasts → apply reconciler → get reconciled forecasts at all levels.

Practical steps: (1) Choose your hierarchy depth — more levels adds reconciliation power but requires more data. (2) Choose base models per level — simpler models (ETS, ARIMA) for sparse lower levels, more complex models (LightGBM, Prophet) for data-rich upper levels. (3) Estimate Σ with WLS using cross-validation residuals. (4) Apply MinT reconciliation. (5) Evaluate RMSSE (Root Mean Squared Scaled Error) and MASE at each level separately — a reconciliation that improves aggregate RMSSE at the cost of bottom-level RMSSE is not always a win.

Try on Colab: create a 3-level hierarchy (1 total, 3 regions, 9 SKUs) with synthetic weekly sales data. Generate base forecasts for each series independently using ETS. Apply bottom-up, top-down, and MinT-OLS reconciliation. Evaluate RMSSE at each level for all three methods. Confirm that MinT outperforms both on the aggregate metric while bottom-up wins at the SKU level when data is rich.

Continue interactively
Read this post inside ML Systems Lab — with Simplify toggle, interview Q&As, inline glossary, and the MLE Path forward pointer.
Open in MSL →