Hierarchical Forecast Reconciliation on Networks: A Network Flow Optimization Formulation
Charupriya Sharma, Iñaki Estella Aguerri, Daniel Guimarans
TL;DR
FlowRec reframes hierarchical forecast reconciliation as a network-flow optimization, enabling coherent forecasts on general graphs beyond trees. It establishes NP-hardness for the $||\cdot||_0$ loss but polynomial-time solvability for all $p>0$ losses and derives a tight $\Omega(m \log n)$ lower bound, with $O(n^2 \log n)$ complexity in sparse networks compared to MinT’s $O(n^3)$. FlowRec generalizes MinT to networks by using the network structure as the reconciliation weight, avoiding covariance estimation and enabling efficient dynamic updates with monotonicity guarantees and provable error bounds for approximate reconciliation. The approach supports two computation methods (orthogonal projection and minimum reconciling flow) and offers fast, localized updates for expanding networks, new data, and disruptions. Empirical results on simulated and real benchmarks show FlowRec substantially improves accuracy and reduces runtime and memory (3–40x speedups, 5–7x memory savings, and up to 18x faster in real data) relative to BU and MinT, validating its practical impact for large-scale, time-sensitive hierarchical forecasting tasks.
Abstract
Hierarchical forecasting with reconciliation requires forecasting values of a hierarchy (e.g.~customer demand in a state and district), such that forecast values are linked (e.g.~ district forecasts should add up to the state forecast). Basic forecasting provides no guarantee for these desired structural relationships. Reconciliation addresses this problem, which is crucial for organizations requiring coherent predictions across multiple aggregation levels. Current methods like minimum trace (MinT) are mostly limited to tree structures and are computationally expensive. We introduce FlowRec, which reformulates hierarchical forecast reconciliation as a network flow optimization, enabling forecasting on generalized network structures. While reconciliation under the $\ell_0$ norm is NP-hard, we prove polynomial-time solvability for all $\ell_{p > 0}$ norms and , for any strictly convex and continuously differentiable loss function. For sparse networks, FlowRec achieves $O(n^2\log n)$ complexity, significantly improving upon MinT's $O(n^3)$. Furthermore, we prove that FlowRec extends MinT to handle general networks, replacing MinT's error-covariance estimation step with direct network structural information. A key novelty of our approach is its handling of dynamic scenarios: while traditional methods recompute both base forecasts and reconciliation, FlowRec provides efficient localised updates with optimality guarantees. Monotonicity ensures that when forecasts improve incrementally, the initial reconciliation remains optimal. We also establish efficient, error-bounded approximate reconciliation, enabling fast updates in time-critical applications. Experiments on both simulated and real benchmarks demonstrate that FlowRec improves accuracy, runtime by 3-40x and memory usage by 5-7x. These results establish FlowRec as a powerful tool for large-scale hierarchical forecasting applications.
