MECATS: Mixture-of-Experts for Quantile Forecasts of Aggregated Time Series

Xing Han, Jing Hu, Joydeep Ghosh

Abstract

We introduce a framework to dynamically combine heterogeneous models called DYCHEM, which forecasts a set of time series that are related through an aggregation hierarchy. Different types of forecasting models can be employed as individual "experts" so that each model is tailored to the nature of the corresponding time series. DYCHEM learns hierarchical structures during the training stage to help generalize better across all the time series being modeled and also mitigates coherency issues that arise due to constraints imposed by the hierarchy. To improve the reliability of forecasts, we construct quantile estimations based on the point forecasts obtained from combined heterogeneous models. The resulting quantile forecasts are coherent and independent of the choice of forecasting models. We conduct a comprehensive evaluation of both point and quantile forecasts for hierarchical time series (HTS), including public data and user records from a large financial software company. In general, our method is robust, adaptive to datasets with different properties, and highly configurable and efficient for large-scale forecasting pipelines.

Introduction

Hierarchical time series (HTS)—data sets related through an aggregation structure like "Sales by Category > Store > City"—present a unique challenge in modern forecasting. Data at the top of the hierarchy is often smooth and seasonal, while data at the bottom can be extremely noisy, sparse, or intermittent. Existing methods often struggle with two primary issues:

  1. Model Mismatch: A single global model (like a deep neural network) might excel at the noisy bottom level but fail to capture the clear trends at the top, or vice-versa.
  2. Coherency: In a hierarchy, the forecasts for child nodes must sum up to the forecast of their parent. Traditional "reconciliation" methods often rely on rigid, unrealistic assumptions or are too computationally expensive for large-scale industrial use.

To address these, we propose DYCHEM (DYnamic Combination of HEterogeneous Models), which treats different forecasting models as "experts" in a Mixture-of-Experts (MoE) framework.

Methodology

1. Dynamic Point Estimation

Instead of picking one model, DYCHEM uses a Gating Network (an LSTM-based architecture) to assign weights to various base models (e.g., ARIMA, Prophet, DeepAR) for every node in the hierarchy. This allows the system to leverage the strengths of classical statistical models and modern deep learning models simultaneously.

Hierarchical context of the DYCHEM framework, illustrating how individual nodes in a hierarchy are modeled using a mixture of heterogeneous experts.

To ensure stability, DYCHEM pre-trains base models offline. This avoids "load imbalance" where one model might dominate the gating network too early in the training process. The gating network is then trained with a specialized Coherency Loss ($L_{recon}$), which penalizes both prediction error and the difference between a parent's forecast and the sum of its children's forecasts.

2. Model-Free Quantile Estimation

To provide reliable uncertainty intervals, DYCHEM incorporates a module that operates on top of the "black-box" point forecasts. This module uses Chebyshev polynomials to approximate the quantile function. This mathematical approach ensures that estimated quantiles are monotonically increasing—preventing the common issue of "quantile crossing"—and are tied directly to the coherent point estimate.

Technical architecture of the DYCHEM framework, detailing the point prediction module with its gating network and the subsequent model-free quantile estimation module.

Experimental Evaluation

Datasets and Setup

The framework was evaluated on four public HTS datasets (Australian Labour, M5 Walmart sales, Wikipedia web traffic, and AEDemand electricity data) and one large-scale industrial dataset consisting of anonymized financial records from 12,000 users of Intuit.

Key Insights

  • Diversity is Robustness: We demonstrate that as the number of diverse expert models increases, the probability of generating a coherent forecast increases exponentially. By mixing "classical" models like DLM with "modern" ones like DeepAR, the system becomes resilient to varying data dynamics across hierarchy levels.
  • Level-Specific Expertise: The gating network automatically learns which models work best where. For example, in the Australian Labour dataset, the network favored Dynamic Linear Models (DLM) for top-level aggregates but shifted weight toward more complex models for noisier bottom-level data.
  • Decoupled Uncertainty: By building the quantile estimator on top of point forecasts, we created a "plug-and-play" module. This allows users to swap underlying forecasting models without redesigning the uncertainty estimation logic.

Results

DYCHEM consistently outperformed strong baselines like SHARQ and HIER-E2E. On the M5 dataset, it achieved significantly lower Mean Absolute Scaled Error (MASE) across all levels compared to simple ensemble averaging. Furthermore, the framework achieved nearly zero coherency loss, matching the performance of "forced" reconciliation methods like MinT while maintaining superior accuracy. In industrial deployment for cash flow forecasting, DYCHEM significantly outperformed existing production baselines (PyDLM) in terms of Normalized Root Mean Squared Error (NRMSE).

Conclusion

DYCHEM provides a robust, adaptive, and highly configurable framework for large-scale hierarchical forecasting. While running multiple base models introduces some computational overhead, the benefits in accuracy and coherency are substantial. Future work will explore more constrained environments, such as very short time series or datasets with significant missing entries, where expert selection becomes even more critical.

Summary updated

Abstract

We introduce a framework to dynamically combine heterogeneous models called \texttt{DYCHEM}, which forecasts a set of time series that are related through an aggregation hierarchy. Different types of forecasting models can be employed as individual ``experts'' so that each model is tailored to the nature of the corresponding time series. \texttt{DYCHEM} learns hierarchical structures during the training stage to help generalize better across all the time series being modeled and also mitigates coherency issues that arise due to constraints imposed by the hierarchy. To improve the reliability of forecasts, we construct quantile estimations based on the point forecasts obtained from combined heterogeneous models. The resulting quantile forecasts are coherent and independent of the choice of forecasting models. We conduct a comprehensive evaluation of both point and quantile forecasts for hierarchical time series (HTS), including public data and user records from a large financial software company. In general, our method is robust, adaptive to datasets with different properties, and highly configurable and efficient for large-scale forecasting pipelines.
BibTeX
@inproceedings{han2022mecats,
  author = {Xing Han and Jing Hu and Joydeep Ghosh},
  title = {{MECATS: Mixture-of-Experts for Quantile Forecasts of Aggregated Time Series}},
  booktitle = {Workshops @ ICDM},
  year = {2022},
  url = {https://openreview.net/forum?id=i1vtszkNpa},
}
Figure