Introduction
In many industries, data is naturally hierarchical—for example, retail sales organized by SKU, store, region, and country. Forecasting these "Hierarchical Time Series" (HTS) presents a unique challenge: coherence. The sum of the forecasts at the bottom level must mathematically equal the forecast at the top level. Traditionally, this is solved in two disconnected stages: generating independent base forecasts and then applying a post-hoc reconciliation step. However, this approach often ignores the rich structural information during learning and fails to account for real-world business costs, such as the asymmetric impact of under-forecasting versus over-forecasting.
The SLOTH Framework
The SLOTH framework (Structured Learning and Task-Based Optimization for Time Series Forecasting on Hierarchies) addresses these gaps by integrating the hierarchical structure directly into the learning process. Unlike traditional methods that treat reconciliation as a separate mathematical projection, SLOTH uses an end-to-end neural architecture that fuses features across levels and optimizes for specific business tasks.
Methodological Innovations
SLOTH introduces three key modules to improve forecasting performance and utility:
- Top-Down Convolution (TD-Conv): This module stabilizes volatile bottom-level predictions by incorporating features from "ancestor" nodes. Since aggregate top-level series are generally less noisy, their temporal patterns act as a denoiser for granular data.
- Bottom-Up Attention (BU-Attn): This allows parent nodes to "pay attention" to sudden shifts or anomalies occurring at the leaf levels, ensuring aggregate forecasts react quickly to local changes.
- Task-Based Constrained Optimization (OptNet): SLOTH utilizes a differentiable Quadratic Programming (QP) layer. This allows the model to satisfy coherence constraints while simultaneously optimizing for a "task-based" loss function that reflects real-world business constraints.
Experimental Evaluation
The authors evaluated SLOTH on three public HTS datasets: Tourism (Australian tourism flows), Labour (Australian employment data), and M5 (Walmart retail sales). To test the framework's ability to handle business-specific goals, they also developed a simulated M5 Scheduling Task with asymmetric costs for underestimation and overestimation.
Key Results
SLOTH consistently outperformed traditional statistical methods (ARIMA-BU) and modern deep learning baselines (NBEATS, DeepAR). On the Tourism dataset, SLOTH achieved a MAPE of 0.2583, a significant improvement over the next best baseline, NBEATS-BU (0.2904).
In the M5 Scheduling Task, the SLOTH "task-net" improved performance by 36.8% compared to models trained only on standard weighted loss. Furthermore, the integration of hierarchical features made the model more robust, showing lower variance across independent runs compared to non-hierarchical baselines.
Conclusion
SLOTH demonstrates that treating hierarchy as a feature rather than just a post-processing constraint leads to more accurate and stable forecasts. By making the reconciliation step differentiable and task-aware, the framework bridges the gap between statistical accuracy and operational utility. Future work will explore scaling SLOTH to massive hierarchies with millions of nodes and handling non-linear aggregation constraints.
Summary updated