TimeFilter: Patch-Specific Spatial-Temporal Graph Filtration for Time Series Forecasting

June 27, 2025 ยท View on GitHub

๐Ÿ“ฐ News

๐Ÿšฉ 2025-05-01: TimeFilter has been accepted as ICML 2025 Poster.

๐Ÿšฉ 2025-01-22: Initial upload to arXiv PDF.

๐ŸŒŸ Overview

TimeFilter is a cutting-edge solution for time series forecasting, incorporating three main components: the Spatial-Temporal Construction Module, the Patch-Specific Filtration Module, and the Adaptive Graph Learning Module.

๐Ÿ›  Prerequisites

Ensure you are using Python 3.10.16 and install the necessary dependencies by running:

pip install -r requirements.txt

๐Ÿ“Š Prepare Datastes

Begin by downloading the required datasets. All datasets are conveniently available at iTransformer. Create a separate folder named ./data and neatly organize all the csv files as shown below:

data
โ””โ”€โ”€ electricity.csv
โ””โ”€โ”€ ETTh1.csv
โ””โ”€โ”€ ETTh2.csv
โ””โ”€โ”€ ETTm1.csv
โ””โ”€โ”€ ETTm2.csv
โ””โ”€โ”€ traffic.csv
โ””โ”€โ”€ weather.csv
โ””โ”€โ”€ solar_AL.txt
โ””โ”€โ”€ PEMS03.npz
โ””โ”€โ”€ PEMS04.npz
โ””โ”€โ”€ PEMS07.npz
โ””โ”€โ”€ PEMS08.npz

๐Ÿ’ป Training

All scripts are located in ./scripts. For instance, to train a model using the ETTh1 dataset with an input length of 96, simply run:

bash ./scripts/ETTh1.sh

After training:

  • Your trained model will be safely stored in ./checkpoints.
  • Numerical results in .npy format can be found in ./results.
  • A comprehensive summary of quantitative metrics is accessible in ./result_long_term_forecast.txt.

๐Ÿ“š Citation

If you find this repo useful, please consider citing our paper as follows:

@inproceedings{
hu2025timefilter,
title={TimeFilter: Patch-Specific Spatial-Temporal Graph Filtration for Time Series Forecasting},
author={Yifan Hu and Guibin Zhang and Peiyuan Liu and Disen Lan and Naiqi Li and Dawei Cheng and Tao Dai and Shu-Tao Xia and Shirui Pan},
booktitle={Forty-second International Conference on Machine Learning},
year={2025},
url={https://openreview.net/forum?id=490VcNtjh7}
}

๐Ÿ™ Acknowledgement

Special thanks to the following repositories for their invaluable code and datasets:

๐Ÿ“ฉ Contact

If you have any questions, please contact huyf0122@gmail.com or submit an issue.