Manuscript Offprint

arXiv:2610.21414

Learning to Forecast on Multiple Spatiotemporal Hierarchies

Valentina Moretti, Cesare Alippi, Andrea Cini

ABSTRACT

Hierarchical forecasting exploits aggregation structures that expose multiple views of the same underlying spatiotemporal forecasting problem, while ensuring coherence among forecasts. Individual series provide fine-grained information, while progressively coarser aggregates reveal temporal and spatial patterns at different scales. In the associated deep learning architectures, the hierarchy determines which aggregate series are available and how they are processed together with individual series (e.g., through reconciliation or message-passing operators). Different hierarchies thus provide distinct learning signals and inductive biases for forecasting the same collection of time series. Nonetheless, existing architectures are typically trained on a single, often fixed, structure. In this work, we propose a graph deep learning framework that leverages variations across hierarchies as multi-task regularization. We show that jointly learning across these structures can reduce over-specialization to any single hierarchy and improve forecasting performance. Indeed, training across hierarchies provides an inductive bias toward representations that are useful across different structures, and as such, generalize better. Making forecasts coherent with the aggregation constraints for each sampled hierarchy is computationally expensive: to complement the framework, we propose a novel operator—based on a top-down approach—that produces coherent forecasts with linear time and space complexity w.r.t. the hierarchy size. Experiments show that our approach improves forecasting accuracy over training on a single structure and is competitive with current state-of-the-art methods.

1 Introduction

Many forecasting problems involve collections of time series recorded by sensors at different locations. Spatiotemporal forecasting addresses these settings by jointly modeling the temporal dynamics of individual series and spatial dependencies among them. Recent deep learning architectures represent the irregular structure of the problem by using graphs, where sensors are nodes and edges encode pairwise relationships among them (e.g., spatial proximity) (Jin et al., 2024; Cini et al., 2025). Recently, hierarchical representations have been increasingly used in this context (Yu et al., 2021; Hermes et al., 2022; Chen et al., 2023). A hierarchy specifies how input series are progressively grouped into hierarchical clusters, producing aggregates at different resolutions that can highlight relevant dynamics in the underlying process. Hierarchical representations also model relationships beyond pairwise interactions (graph edges), allowing information to propagate across levels—e.g., with appropriate message-passing (MP) operators (Cini et al., 2024). The hierarchical structure additionally creates shorter paths between distant nodes, allowing information to travel across larger portions of the graph within a limited number of MP layers (Cini et al., 2024; Carotti et al., 2026). As such, hierarchical models have found several practical applications in spatiotemporal forecasting, including pandemic (Ma et al., 2022), air-quality (Chen et al., 2023), traffic (Guo et al., 2021; Hermes et al., 2022), and financial forecasting (Arya et al., 2023). Forecasting aggregate series offers two further advantages. First, aggregation structures encode coherence constraints that can be used to regularize predictions through reconciliation (forecasts at different levels should add up) (Wickramasuriya et al., 2019; Panagiotelis et al., 2021, 2023). By leveraging predictions from

∗^{*}Correspondence to: valentina.moretti@usi.ch

Figure

Figure 1: Inference step for a model trained with our framework on LargeST. Each input is processed and reconciled under multiple hierarchies, and the resulting bottom-level forecasts are averaged.

the entire hierarchy to enforce these constraints, reconciliation acts as a forecast combination that can reduce variance and improve accuracy (Bates & Granger, 1969; Hollyman et al., 2021; Di Fonzo & Girolimetto, 2024). Second, aggregate series provide additional training targets, allowing the model to learn from errors at both individual and aggregate levels (Rangapuram et al., 2021; Cini et al., 2024).

Taken together, these aspects make the hierarchy an integral part of the forecasting model and a source of inductive bias: it determines the aggregate series available to the model, the paths through which information propagates across scales, the higher-level targets used for supervision, and the constraints imposed on the forecasts. Consequently, different hierarchies group the series into different aggregates and connect them through different paths, thereby inducing distinct but related learning tasks that share the same bottom-level forecasting objective. Related tasks can encourage the model to learn representations that are useful across different structures and generalize better to the common forecasting task, as established in the multi-task learning literature (Caruana, 1993). This effect arises when parameters are shared across tasks, favoring solutions useful across them over those specialized to a single one. However, existing deep hierarchical forecasting methods generally train on a single, often fixed, hierarchy (Rangapuram et al., 2021; Yang et al., 2017; Cini et al., 2024).

In this paper, we introduce a framework that leverages multiple, structurally diverse hierarchies as a source of regularization for spatiotemporal forecasting. In particular, we train a single hierarchical forecasting model over a distribution of hierarchies, sampling a different structure at each training step. Sharing parameters across different hierarchies encourages the same model's forecasting and hierarchical MP functions to perform well across different groupings, thereby reducing overfitting to any single hierarchy. This may be particularly useful in inductive settings, where a trained model is applied to previously unseen time series. Training over different hierarchies, however, introduces a computational challenge, as widely used reconciliation methods require dense matrix inversions for each sampled structure and scale poorly with hierarchy size (Hyndman et al., 2016; Sprangers et al., 2024; Petropoulos et al., 2025; Sharma et al., 2025). To tackle the problem, we introduce a recursive operator that combines forecasts across adjacent hierarchy levels, ensuring coherence by construction with linear time and space complexity w.r.t. the hierarchy size. The main contributions of this paper are:

• We introduce a training framework that optimizes a shared spatiotemporal forecasting model across multiple structurally diverse hierarchies, using their variation as a source of multi-task regularization. Learning across tasks leads to more effective and general representations.

• We develop an efficient recursive procedure that incorporates forecasts from every aggregation level while enforcing the corresponding coherence constraints, making training across a distribution of hierarchies computationally practical.

• We instantiate the proposed framework in a spatiotemporal graph architecture that combines graph neural networks (GNNs), graph pooling, and hierarchical information propagation. This implementation allows the same model parameters to be trained across different hierarchies while preserving coherence w.r.t. each sampled structure.

We evaluate the framework across spatiotemporal forecasting benchmarks, aggregation structures, and inductive settings. Experiments show that jointly training across hierarchies improves accuracy compared with training on individual hierarchies, supporting the hypothesis that variation in the aggregation structures can act as a source of regularization for the forecasting task.

References (70)