Bridging Past and Future: Distribution-Aware Alignment for Time Series Forecasting

June 10, 2026 ยท View on GitHub

PyTorch Implementation of TimeAlign.

๐Ÿ“ฐ News

๐Ÿšฉ 2026-01-26: TimeAlign has been accepted as ICLR 2026 Poster.

๐Ÿšฉ 2025-09-21: Initial upload to arXiv (PDF).

๐ŸŒŸ Overview

TimeAlign is a lightweight, plug-and-play framework that bridges the distributional gap in time series forecasting by aligning past and future representations through a reconstruction-based alignment task. The implementation of alignment is located in ./layers/Alignment.py.

๐Ÿ›  Prerequisites

Ensure you are using Python 3.10.18 and install the necessary dependencies.

๐Ÿ“Š Prepare Datastes

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

dataset
โ””โ”€โ”€ electricity.csv
โ””โ”€โ”€ ETTh1.csv
โ””โ”€โ”€ ETTh2.csv
โ””โ”€โ”€ ETTm1.csv
โ””โ”€โ”€ ETTm2.csv
โ””โ”€โ”€ traffic.csv
โ””โ”€โ”€ weather.csv
โ””โ”€โ”€ solar_AL.txt

๐Ÿ’ป Training

All scripts are located in ./scripts. For instance, to train a model using the ETTh1 dataset with an input length of 720, 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.txt.

๐Ÿ“š Citation

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

@article{hu2025bridging,
  title={Bridging Past and Future: Distribution-Aware Alignment for Time Series Forecasting},
  author={Hu, Yifan and Yang, Jie and Zhou, Tian and Liu, Peiyuan and Tang, Yujin and Jin, Rong and Sun, Liang},
  journal={arXiv preprint arXiv:2509.14181},
  year={2025}
}

๐Ÿ™ 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.