This repository contains the official implementation of the paper: You only adapt once: An adaptive transformer for dynamic multivariate time series forecasting across time-varying topologies and multi-patterns.
Although deep learning has been effective in capturing spatiotemporal patterns within Multivariate Time Series (MTS) data, dynamic shifts in sensor network topologies present substantial challenges. These challenges include adapting to new topologies, managing missing data, and preserving the integrity of spatial dependencies. Existing methods, such as model retraining, are resource-intensive and time-consuming while lacking the robustness required for dynamic urban environments. Hence, a novel You Only Adapt Once (YOAO) model comprising a dynamic MTS encoder and multi-scale decoder is proposed to adapt to time-varying topologies and diverse spatiotemporal multi-patterns. A new dynamic MTS encoder with variable input dimensions on node-level is proposed to adapt seamlessly to time-varying topologies, and efficiently handle severe missing values. A new multi-scale decoder is proposed to self-adaptively abstract complex spatiotemporal multi-patterns in MTS data, and integrate fine-grained representations across scales for comprehensive multi-pattern analysis. In addition, a new node-wise curriculum learning method is proposed to enhance the training efficiency and model performance. Extensive experiments across three real-world datasets and two subtasks, both of which simulate time-varying topologies, demonstrate that YOAO outperforms seven state-of-the-art baselines by an average of 18.75%. Moreover, YOAO reduces training time by an average of 41.52% compared with the five transformer-based models.
YOAO is a novel model designed for Dynamic Multivariate Time Series Forecasting (DMTSF) that adapts to time-varying topologies and diverse spatiotemporal patterns without requiring retraining. Key features include:
- Dynamic MTS Encoder: Handles variable input dimensions on node-level to adapt to topology changes
- Multi-scale Decoder: Captures complex spatiotemporal patterns through window transformer layers and patch merging
- Node-wise Curriculum Learning (NCL): Enhances training efficiency by gradually increasing node participation
- Dual-pattern Pool: Models periodical changes and hidden patterns to handle severe missing values
YOAO is implemented based on the BasicTS+ framework, a fair and scalable time series forecasting benchmark. We sincerely thank the authors for their foundational work.
- Our work extends BasicTS+ with:
- Dynamic topology adaptation modules
- Novel dual-pattern pool design
- Node-wise curriculum learning
If you use this work, please cite:
@article{zhang2025yoao,
title={You only adapt once: An adaptive transformer for dynamic multivariate time series forecasting across time-varying topologies and multi-patterns},
author={Zhang, Shuai and Xu, Jiyuan and Zhang, Wenyu and Zhang, Yixiang and Ni, Chengjie},
journal={Information Sciences},
volume = {717},
pages = {122350},
year = {2025},
issn = {0020-0255},
doi = {https://doi.org/10.1016/j.ins.2025.122350},
url = {https://www.sciencedirect.com/science/article/pii/S0020025525004827},
keywords = {Dynamic multivariate time series forecasting, Time-varying topology, Variable input dimensions, Node-wise curriculum learning, Spatiotemporal multi-patterns},
}This project is licensed under the MIT License - see the LICENSE file for details.