TS-MTM

August 14, 2026 · View on GitHub

📝Citation

If you find this work helpful for your project,please consider citing the following paper:

@inproceedings{zhang2026ts,
  title={TS-MTM: Temporal-Spectral Masked Time-Series Modeling for Forecasting},
  author={Zhang, Pengcheng and Ouyang, Xiaocao and Li, Xin and Yang, Fan and Huang, Wei and Ren, Lingfei and Peng, Ran and Zhai, Qiang and Fu, Huimin},
  booktitle={Proceedings of the 32nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining V. 2},
  pages={6500--6511},
  year={2026}
}

📦Datasets

All benchmark datasets can be obtained from previous work, and arrange the folder as:

TS-MTM/
|-- datasets/
    |-- ETTh1.csv
    |-- ETTh2.csv
    |-- ETTm1.csv
    |-- ETTm2.csv
    |-- Weather.csv
    |-- Electricity.csv
    |-- Exchange.csv
    |-- national_illness.csv
    |-- solar_AL.txt
    |-- PEMS08/
        |-- PEMS08.npz

🚀How To Use

⚙️1.Requirements

conda env create -f env.yml
conda activate TS-MTM

🧪2.Experimental reproduction

We provide the scripts for pre-training and finetuning for each dataset with the best hyper-parameters in our experiment at ./scripts/.

🔥Pre-training

Pre-training TS-MTM for each dataset can be implemented through the provided scripts in ./scripts/pretrain/. For example, to pre-train TS-MTM for the ETTh1 dataset:

bash scripts/pretrain/ETTh1.sh

🎯Fine-tuning

After pre-training TS-MTM for the dataset, fine-tuning TS-MTM for forecasting across various lengths can be implemented through the provided scripts in ./scripts/finetune/. For example, to fine-tune TS-MTM for the ETTh1 dataset:

bash scripts/finetune/ETTh1.sh

⚡Pre-training and fine-tuning at once

To implement pre-training and fine-tuning sequentially, the scripts in ./scripts/. For example, to perform both steps at once for the weather dataset:

bash scripts/run_weather.sh

💾Checkpoints

We also provide all Checkpoints and you can tune them directly on target datasets.