Abstract
Time series forecasting is critical for urban monitoring, yet it faces the significant challenge of distribution shift, where statistical properties change over time. Traditional domain adaptation methods often struggle with the continuous, unknown shifts inherent in real-world data. This paper introduces Hyper Time-Series Forecasting (HTSF), a hypernetwork-based framework that jointly learns time-varying distributions and forecasting models. By utilizing hyper layers to characterize distribution shifts and dynamically generate parameters for main forecasting layers, HTSF achieves state-of-the-art performance across diverse benchmarks, including RNN and Transformer-based implementations.
Introduction: The Challenge of Distribution Shift
Most deep learning models for time series forecasting operate under the assumption of stationarity—that training and testing data share the same probability distribution. However, real-world data, such as traffic flow or air quality, is non-stationary. A model trained on summer traffic patterns may fail during a winter storm because the underlying data distribution has shifted.
Existing techniques like Domain Adaptation or Generalization often seek a "common denominator" across domains or prepare for a "worst-case" scenario. These approaches frequently under-utilize the rich diversity of shifts present in historical data. The HTSF framework addresses this by treating distribution shift as a feature to be learned rather than a noise to be ignored.
Methodology: The HTSF Framework
The core of HTSF is a dual-layer hypernetwork architecture. Instead of static weights, the model "re-wires" itself in real-time based on the current data distribution.
1. Hyper Layers (The Distribution Detector)
The hyper layers take historical sequences from sliding windows and encode them into a representation of the current distribution. This is implemented using a Bidirectional GRU (BiGRU) and an attention mechanism. To manage computational complexity, 1D average pooling down-samples the historical data before it enters the hyper layers.
2. Main Layers (The Dynamic Forecaster)
The main layers perform the actual forecasting (e.g., using a GRU, LSTM, or GNN). Crucially, the weights ($W_f$) of these layers are not fixed; they are generated dynamically by the hyper layers for each time step. A "Chunk" operation is used to transform the high-dimensional tensors generated by the hyper layers into the specific weight matrices required by the main layers.
Experimental Evaluation
The authors validated HTSF across 9 diverse benchmarks covering short-term forecasting (Air Quality, Electricity), grid-based spatiotemporal data (NYC-Taxi/Bike), and graph-based traffic flow (PeMSD datasets).
Key Results
- Superior Accuracy: On the Beijing Air Quality dataset, HyperLSTM reduced RMSE by 3.94% compared to the previous state-of-the-art, ADARNN.
- Spatiotemporal Performance: In traffic forecasting, HyperAGCRN outperformed standard Graph Neural Networks, suggesting that adapting to distribution shifts is as critical as spatial modeling.
- Model Agnosticism: The framework proved extensible, successfully enhancing various base models like GRUs and LSTMs.
Discussion and Visualization
A key insight from the research involves the visualization of the hyper layers' latent space. Using t-SNE, the authors observed that while raw input distributions might appear chaotic, the hyper layers successfully map them into a structured, linear-like space. This indicates that the hypernetwork is effectively learning the underlying logic of temporal shifts.
Conclusion
HTSF represents a shift from static to generative modeling in time series analysis. By dynamically adapting model parameters to the current data distribution, it provides a robust solution to the persistent problem of non-stationarity. Future work will explore extending this framework to Transformer architectures to further improve long-sequence forecasting.
This paper summary is based on "Combating Distribution Shift for Accurate Time Series Forecasting via Hypernetworks" by Wenying Duan et al.
Summary updated