Abstract
Modern e-commerce presents unique challenges for probabilistic forecasting, including extreme data intermittency and massive computational scale. This paper introduces a scalable, top-down hierarchical framework that forecasts at an aggregate level and disaggregates using distributional assumptions like the Negative Binomial distribution. This approach achieves results competitive with top-tier models in the M5 competition while reducing training time by up to 1,900x compared to direct bottom-up quantile regression.
Introduction
While competitions like M5 have advanced forecasting state-of-the-art, traditional "brick-and-mortar" datasets often fail to capture the complexities of modern e-commerce. Platforms like Tokopedia manage hundreds of thousands of products, leading to two primary hurdles:
- Extreme Intermittency: Most products exhibit "sparse" sales, where time series are dominated by zeros.
- Computational Scale: Training global models on millions of rows is expensive. Standard direct quantile regression requires a separate model for every quantile, which is impractical for production environments.
Methodology
The proposed "Practitioner’s Approach" relies on three core pillars to balance accuracy and efficiency.
Top-Down Hierarchical Forecasting
Instead of forecasting every individual product (Level L), sales are aggregated to a higher level (Level A, such as product categories). The model forecasts the aggregate and then disaggregates back down using historical proportions. This significantly reduces the number of series that need to be modeled directly.
Distributional Assumptions and Custom Loss
Rather than predicting multiple quantiles directly, the framework predicts the parameters of a probability distribution (Poisson or Negative Binomial). This allows for the generation of any required quantile from a single model output. To handle "over-dispersed" retail data—where variance significantly exceeds the mean—the authors implemented a custom Negative Binomial loss function for LightGBM.
Demand Classification
Series are categorized into four types—Smooth, Erratic, Lumpy, and Intermittent—using the Average Demand Interval (ADI) and Coefficient of Variation ($CV^2$). This allows for applying the most appropriate modeling strategy to each category based on its specific demand profile.
Experimental Setup
The approach was validated across three diverse datasets:
- Tokopedia E-commerce: Daily sales from a large Indonesian platform (246,361 series), featuring up to 95% zeros.
- Kaggle Favorita: A large-scale brick-and-mortar dataset (172,906 series).
- M5 Competition: The industry benchmark used for performance comparison against world-class models.
Key Results and Insights
The framework demonstrated remarkable efficiency and accuracy across all benchmarks:
- M5 Performance: The top-down framework placed in the top 50 of the original M5 uncertainty track out of nearly 900 teams, proving that simplicity does not necessarily sacrifice performance.
- Efficiency Gains: The distributional approach was approximately 1,900 times faster to train than direct bottom-up quantile modeling on the e-commerce dataset.
- The Scalability Paradox: Direct modeling at the lowest level provided only marginal accuracy gains, suggesting that the additional computational effort is often unjustified in business settings.
- Data Subsampling: For "lumpy" series, training on a random subset of just 20,000 series was sufficient to reach an accuracy plateau, further reducing resource requirements.
Discussion and Limitations
While effective, the current model uses static historical proportions for disaggregation. Future work could explore "dynamic disaggregation" to account for shifting proportions over time. Additionally, while the study focused on time-series lags, incorporating external covariates like pricing and promotions might further enhance the performance of Gradient Boosted Trees (GBTs) relative to linear models. Finally, the accuracy of probabilistic forecasts remains sensitive to the initial estimation of distributional parameters; poor estimates in historical data can lead to inaccurate future uncertainty bounds.
Summary updated