Skip to content

NetManAIOps/TameR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Taming the Recent-Data Bias: Towards Robust Time Series Forecasting with Global Context

This repository contains the official implementation of TameR, accepted at ICML 2026:

Taming the Recent-Data Bias: Towards Robust Time Series Forecasting with Global Context

This code repository provides the code of TameR implemented in the TFB benchmark, including the model, forecasting, and perturbation process. The current implementation is based on TFB, while the same TameR model and two-stage training protocol can also be implemented in the Time-Series-Library.

We implement the model in ./ts_benchmark/baselines/time_series_library/models/TameR.py.

Quickstart

Important

The code is fully tested under python 3.11, it is recommended that you set the Python version to 3.11.

  1. Installation:

Given a python environment (note: this project is fully tested under python 3.11), install the dependencies with the following command:

pip install -r requirements.txt
  1. Download datasets:

Follow the instruction of official TFB benchmark to download the datasets, and put in ./dataset

  1. Train and evaluate:

Important

Since TameR utilizes a two-stage training protocol, we need to first perform the first stage (cycle learning) in two-stage training by running:

bash ./scripts/multivariate_forecast/ETTh1_script/TameRStage1.sh

After we get the periodic cycle in the learnable periodicity extraction (LPE) module in TameR. We can perform the second training stage (joint space learning) by running:

bash ./scripts/multivariate_forecast/ETTh1_script/TameR.sh

We provide the experiment scripts for TameR under the folder ./scripts/multivariate_forecast. For example you can reproduce a experiment result as the following:

bash ./scripts/multivariate_forecast/ETTh1_script/TameR.sh $gpu_id $mode $exp_name $perturb_name
  • gpu_id: which gpu to use, e.g., 0
  • mode: choose whether to forecast on clean data or perturbed data, or both. Before choose 'perturb', running script with 'forecast' first bacause the 'forecast' setting will train the model first. choices: ['forecast', 'perturb', 'both'].
  • exp_name: your experiment name, e.g., 'cycle'
  • perturb_name: your perturbation experiment name, e.g., 'perturb_test'

Default configuration:

bash ./scripts/multivariate_forecast/ETTh1_script/TameR.sh

The script equals to the following one:

bash ./scripts/multivariate_forecast/ETTh1_script/TameR.sh 0 forecast cycle perturb_test
  1. If you want to run all experiments of all datasets, run the following script:
bash ./scripts/run_exp.sh $gpu_id $mode $exp_name $perturb_name

Default configuration:

bash ./scripts/run_exp.sh

The script equals to the following one:

bash ./scripts/run_exp.sh 0 forecast both perturb_test

Acknowledgement

This implementation is based on the TFB: https://github.com/decisionintelligence/TFB

License

This project is released under the MIT License. See LICENSE for the full license text.

Copyright 2026 Tsinghua University and ByteDance.

This repository includes source files modified from TFB, originally released under the MIT License with copyright held by Huawei Technologies Co., Ltd. The modified files are released under the same MIT License and include source headers identifying the original license and modification notice.

Some bundled baseline or utility files retain additional upstream license notices in their source headers. Those notices remain applicable to the corresponding files.

Citation

If you use this code, please cite:

@inproceedings{xu2026tamer,
  title={Taming the Recent-Data Bias: Towards Robust Time Series Forecasting with Global Context},
  author={Xu, Longlong and Li, Zeyan and He, Xiao and Yu, Zhaoyang and Pei, Changhua and Xie, Zhe and Dou, Zijun and Zhang, Tieying and Pei, Dan},
  booktitle={Proceedings of the 43rd International Conference on Machine Learning},
  year={2026}
}

About

The official implementation of *TameR* (ICML'26).

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors