Table of Contents
Fetching ...

A Comprehensive Forecasting Framework based on Multi-Stage Hierarchical Forecasting Reconciliation and Adjustment

Zhengchao Yang, Mithun Ghosh, Anish Saha, Dong Xu, Konstantin Shmakov, Kuang-chih Lee

TL;DR

This work tackles hierarchical ads demand forecasting by balancing cross-level coherence with per-series seasonality. It introduces Multi-Stage HiFoReAd, a four-stage reconciliation pipeline that combines a Bayesian-Optimization ensemble with Top-Down reconciliation, Harmonic Alignment (HHAFA), MinTrace WLS, and Stratified Scale-Weighted Forecasts Synchronization (SSW-FS) to produce coherent, seasonality-preserving forecasts across all levels. The approach scales with distributed computing (Apache Spark) and demonstrates substantial accuracy gains on Walmart Connect Ads Demand data and three public datasets, including improvements from $APE$ of 3% to 40% across levels relative to the BO-ensemble and from 1.2% to 92.9% vs state-of-the-art models. These results are complemented by full hierarchical coherence, enabling practical deployment by Walmart’s ads, sales, and operations teams for planning and resource allocation. The work also discusses avenues for future enhancement, such as integrating advanced deep-learning techniques, handling cold-start scenarios, and extending the framework to heterogeneous graph/tree forecasting in distributed environments.

Abstract

Ads demand forecasting for Walmart's ad products plays a critical role in enabling effective resource planning, allocation, and management of ads performance. In this paper, we introduce a comprehensive demand forecasting system that tackles hierarchical time series forecasting in business settings. Though traditional hierarchical reconciliation methods ensure forecasting coherence, they often trade off accuracy for coherence especially at lower levels and fail to capture the seasonality unique to each time-series in the hierarchy. Thus, we propose a novel framework "Multi-Stage Hierarchical Forecasting Reconciliation and Adjustment (Multi-Stage HiFoReAd)" to address the challenges of preserving seasonality, ensuring coherence, and improving accuracy. Our system first utilizes diverse models, ensembled through Bayesian Optimization (BO), achieving base forecasts. The generated base forecasts are then passed into the Multi-Stage HiFoReAd framework. The initial stage refines the hierarchy using Top-Down forecasts and "harmonic alignment." The second stage aligns the higher levels' forecasts using MinTrace algorithm, following which the last two levels undergo "harmonic alignment" and "stratified scaling", to eventually achieve accurate and coherent forecasts across the whole hierarchy. Our experiments on Walmart's internal Ads-demand dataset and 3 other public datasets, each with 4 hierarchical levels, demonstrate that the average Absolute Percentage Error from the cross-validation sets improve from 3% to 40% across levels against BO-ensemble of models (LGBM, MSTL+ETS, Prophet) as well as from 1.2% to 92.9% against State-Of-The-Art models. In addition, the forecasts at all hierarchical levels are proved to be coherent. The proposed framework has been deployed and leveraged by Walmart's ads, sales and operations teams to track future demands, make informed decisions and plan resources.

A Comprehensive Forecasting Framework based on Multi-Stage Hierarchical Forecasting Reconciliation and Adjustment

TL;DR

This work tackles hierarchical ads demand forecasting by balancing cross-level coherence with per-series seasonality. It introduces Multi-Stage HiFoReAd, a four-stage reconciliation pipeline that combines a Bayesian-Optimization ensemble with Top-Down reconciliation, Harmonic Alignment (HHAFA), MinTrace WLS, and Stratified Scale-Weighted Forecasts Synchronization (SSW-FS) to produce coherent, seasonality-preserving forecasts across all levels. The approach scales with distributed computing (Apache Spark) and demonstrates substantial accuracy gains on Walmart Connect Ads Demand data and three public datasets, including improvements from of 3% to 40% across levels relative to the BO-ensemble and from 1.2% to 92.9% vs state-of-the-art models. These results are complemented by full hierarchical coherence, enabling practical deployment by Walmart’s ads, sales, and operations teams for planning and resource allocation. The work also discusses avenues for future enhancement, such as integrating advanced deep-learning techniques, handling cold-start scenarios, and extending the framework to heterogeneous graph/tree forecasting in distributed environments.

Abstract

Ads demand forecasting for Walmart's ad products plays a critical role in enabling effective resource planning, allocation, and management of ads performance. In this paper, we introduce a comprehensive demand forecasting system that tackles hierarchical time series forecasting in business settings. Though traditional hierarchical reconciliation methods ensure forecasting coherence, they often trade off accuracy for coherence especially at lower levels and fail to capture the seasonality unique to each time-series in the hierarchy. Thus, we propose a novel framework "Multi-Stage Hierarchical Forecasting Reconciliation and Adjustment (Multi-Stage HiFoReAd)" to address the challenges of preserving seasonality, ensuring coherence, and improving accuracy. Our system first utilizes diverse models, ensembled through Bayesian Optimization (BO), achieving base forecasts. The generated base forecasts are then passed into the Multi-Stage HiFoReAd framework. The initial stage refines the hierarchy using Top-Down forecasts and "harmonic alignment." The second stage aligns the higher levels' forecasts using MinTrace algorithm, following which the last two levels undergo "harmonic alignment" and "stratified scaling", to eventually achieve accurate and coherent forecasts across the whole hierarchy. Our experiments on Walmart's internal Ads-demand dataset and 3 other public datasets, each with 4 hierarchical levels, demonstrate that the average Absolute Percentage Error from the cross-validation sets improve from 3% to 40% across levels against BO-ensemble of models (LGBM, MSTL+ETS, Prophet) as well as from 1.2% to 92.9% against State-Of-The-Art models. In addition, the forecasts at all hierarchical levels are proved to be coherent. The proposed framework has been deployed and leveraged by Walmart's ads, sales and operations teams to track future demands, make informed decisions and plan resources.

Paper Structure

This paper contains 14 sections, 20 equations, 7 figures, 4 tables, 1 algorithm.

Figures (7)

  • Figure 1: The Framework Design of the Proposed Demand Forecasting System
  • Figure 2: The Hierarchical Time Series Structure with 4 Levels
  • Figure 3: Back-testing framework for Walmart Connect Ads Demand data, consisting of 4 cross-validation periods containing test and validation sets.
  • Figure 4: The Multi-Stage Hierarchical Forecasting Reconciliation and Adjustment
  • Figure 5: The Hierarchical Time Series Structure in a matrix formulation. (a) A simple hierarchy with three levels and 8 time series. (b) Matrix formulation from base forecasts to reconciled forecasts, $\hat{Y}_t = SP\Tilde{Y}_t$, where $P$ maps the base forecasts ($\Tilde{Y}_t$) to bottom-level forecasts and aggregation constrains $S$ sumps these forecasts to a set of coherent forecasts ($\hat{Y}_t$).
  • ...and 2 more figures