TL;DR
This paper tackles the challenge of forecasting massive spatial-temporal time series, like global payment networks, where entities constantly appear and disappear. They introduce EiFormer, a novel architecture that drastically reduces the computational cost of existing Transformer-based methods from quadratic to linear with respect to the number of entities, enabling practical large-scale deployment.
What Problem Does This Paper Address?
Forecasting time series data is crucial for many applications, but scaling these models to handle millions of synchronized series, such as those found in global payment networks, presents significant hurdles. The core challenges are:
- Emergence and Disappearance of Entities: In dynamic systems, new entities (e.g., new merchants or users) can appear, and existing ones can cease activity. Models need to adapt to these changes without performance degradation.
- Scalability: The sheer volume of entities (millions) in such networks makes models with quadratic complexity (like standard Transformers) computationally infeasible due to excessive time and memory requirements.
Existing methods like iTransformer can handle dynamic entities but suffer from quadratic complexity. Mixer-based models offer linear complexity but struggle with changing entity relationships. This paper aims to bridge this gap by providing a scalable and adaptive solution.
Methods
The authors propose EiFormer, an improved Inverted Transformer (iTransformer) architecture designed for efficient large-scale spatial-temporal forecasting. EiFormer builds upon iTransformer's ability to handle variable entities by introducing two key innovations:
- Efficient iTransformer Module (EiM): This module restructures the attention mechanism to reduce computational complexity from $O(N^2)$ to $O(N)$, where $N$ is the number of entities. It achieves this by using a fixed-size set of latent factors to capture inter-entity relationships, effectively decoupling the complexity from the number of entities.
- Random Projection Module (RP): Inspired by previous work, this module is integrated to further enhance efficiency and prediction accuracy. It uses a frozen random projection matrix in the initial attention layer. This acts as a form of regularization, preventing overfitting and encouraging different EiFormer blocks to learn diverse representations, leading to better capture of complex spatial-temporal patterns.
Datasets
The paper evaluates EiFormer on two types of datasets:
- LargeST Dataset: A publicly available benchmark dataset for large-scale traffic forecasting. The authors created four sub-datasets (SD, GBA, GLA, CA) and experimented with four scenarios:
- Scenario 0: Standard case with no node changes.
- Scenario 1: 10% new entities in the test set.
- Scenario 2: 10% of training set entities absent in the test set.
- Scenario 3: A combination of Scenarios 1 and 2.
- Proprietary Transaction Dataset: A real-world, large-scale spatial-temporal time series dataset derived from a payment network, comprising hourly transaction volumes from 23,849 entities over two years.
Key Insights and Ideas
- Attention Can Be Linear: The core insight is that the quadratic complexity of attention in iTransformer, while effective for capturing entity relationships, can be significantly reduced by using a fixed set of latent factors. This makes attention-based models scalable to millions of entities.
- Randomness for Robustness: Incorporating a random projection mechanism not only speeds up computation but also acts as a powerful regularizer, improving the model's ability to generalize and adapt to unseen patterns.
- Dynamic Entities are Key: The paper strongly emphasizes the importance of handling emerging and vanishing entities, a common characteristic of real-world dynamic systems like payment networks, which many previous scalable methods overlooked.
- Trade-off Between Simplicity and Expressiveness: EiFormer demonstrates that it's possible to achieve both high efficiency (comparable to linear models) and strong expressiveness (comparable to attention-based models) by carefully designing the architecture.
Key Results
- Scalability: EiFormer exhibits near-linear runtime scaling with the number of entities, outperforming other methods and avoiding out-of-memory issues that plague iTransformer at larger scales.
- Accuracy: EiFormer consistently outperforms baseline methods (TSMixer, RPMixer, iTransformer) on both the LargeST dataset (especially in dynamic scenarios) and the proprietary transaction dataset across various forecasting horizons.
- On the transaction dataset, EiFormer improves upon the best baseline by an average of 24.6% in MAE, 33.0% in RMSE, and 11.2% in MAPE.
- Efficiency: EiFormer achieves a favorable balance between computational efficiency and model expressiveness, making it suitable for industrial applications.
Limitations and Future Work
- Memory for Attention: While EiFormer mitigates the OOM issue of iTransformer, its memory profile is still higher than mixer-based models. The authors attribute this to the extensive attention-based interactions required for its superior predictive performance.
- Further Optimization: The paper focuses on improving iTransformer's efficiency. Future work could explore further optimizations or entirely new architectures for even greater efficiency and accuracy.
- Real-world Deployment: The paper demonstrates practical applicability, but further research might explore deployment strategies and real-time performance tuning in live industrial settings.
Summary updated