Skip to content

WinfredGe/EventTSF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

(IJCAI'26) Event-Aware Non-Stationary Time Series Forecasting


βœ… EventTSF is a first fine-grained event-aware framework for non-stationary time series forecasting.
🧭 It aligns fine-grained event descriptions with time series to improve forecasting under abrupt distribution shifts.

πŸ—žοΈ Updates / News

  • 🚩 2026: EventTSF has been accepted by IJCAI 2026.

πŸ’« Introduction

EventTSF is an event-aware autoregressive diffusion framework that forecasts non-stationary time series by jointly modeling historical observations and textual events, capturing event-induced distribution shifts that traditional time-series-only models often miss.

  • Scenarios and Highlights:
  1. Event-Aware Forecasting EventTSF forecasts future temporal dynamics by incorporating known external events, such as holidays, weather changes, public activities, promotions, or news. It helps models anticipate abrupt distribution shifts that cannot be inferred from historical time series alone.

  2. Multimodal Time Series Modeling EventTSF aligns discrete textual events with continuous time series segments, enabling fine-grained interaction between event semantics and temporal patterns. This supports real-world forecasting where numerical signals are strongly influenced by external context.

  3. Robust Probabilistic Prediction EventTSF uses an autoregressive diffusion framework with event-aware timestep sampling to generate uncertainty-aware forecasts under non-stationary conditions. It improves robustness when events change the magnitude, variance, or shape of future time series.

  • Key Components
  1. Event-Synchronized Representation: A unified multimodal representation that aligns fine-grained discrete textual events with continuous time series segments, enabling fine-grained event–series interaction.

  2. AR-Diffusion Forecaster: An autoregressive diffusion-based forecasting model that progressively generates future time series segments conditioned on different historical observations and textual events.

  3. Event-Aware Timestep Scheduler: A learnable event-conditioned timestep reparameterization mechanism that adapts diffusion denoising difficulty to event-induced non-stationary dynamics.

  4. M-U-DiT: A Multimodal U-shaped Diffusion Transformer that bridges event semantics with multi-resolution temporal patterns through down-sampling, up-sampling, and skip connections.

  5. Dataset: A collection of 7 event-aware forecasting datasets spanning synthetic signals, atmospheric physics, traffic, and weather, designed to evaluate multimodal non-stationary time series forecasting.

πŸ“‘ Datasets

Download preprocessed datasets:

wget -O datasets.zip "https://drive.google.com/uc?export=download&id=132GkrVsrEXqCO6MxBJ3Lg2QezO5JFat3"

Note

If you open the link above directly, please click the download button.

Extract to the project directory:

unzip datasets.zip -d data/download/

πŸš€ Get Started

Code Overview

The code structure is as follows:

EventTSF/
β”œβ”€β”€ algorithms/
β”‚   └── non_stationary_prediction_algorithm.py
β”‚
β”œβ”€β”€ configs/
β”‚   β”œβ”€β”€ hydra_config.yaml
β”‚   └── data/
β”‚       β”œβ”€β”€ atmospheric_physics.yaml
β”‚       β”œβ”€β”€ electricity_accomodation.yaml
β”‚       β”œβ”€β”€ new_york_taxi.yaml
β”‚       β”œβ”€β”€ simulation_sine.yaml
β”‚       β”œβ”€β”€ traffic_FromNewstoForecast.yaml
β”‚       β”œβ”€β”€ weather_TimeCAP.yaml
β”‚       β”œβ”€β”€ weather_TimeCAPnew.yaml
β”‚       └── weather_TimeCAPsan.yaml
β”‚
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ download/embedding/
β”‚   └── textandts_custom_datamodule.py
β”‚
β”œβ”€β”€ experiments/
β”‚   β”œβ”€β”€ base_experiment.py
β”‚   └── sequence_prediction_experiment.py
β”‚
β”œβ”€β”€ metrics/
β”‚   β”œβ”€β”€ CRPS.py
β”‚   β”œβ”€β”€ ProbMAE.py
β”‚   β”œβ”€β”€ ProbMSE.py
β”‚   β”œβ”€β”€ ProbRMSE.py
β”‚   β”œβ”€β”€ WQL.py
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── myCRPS.py
β”‚
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ flow_matching_transition.py
β”‚   └── timedit.py
β”‚
β”œβ”€β”€ myutils/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ log_plots.py
β”‚   β”œβ”€β”€ logger.py
β”‚   └── progress_bar.py
β”‚
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ icon.svg
β”œβ”€β”€ main.py
└── run.sh

β‘  Environment Setup

Option 1: Using Docker (Recommended)

docker build -t eventtsf .
docker run --gpus all -it eventtsf

Option 2: Manual Installation For this project, we use Python 3.11 via Miniconda and PyTorch 2.5.0 with CUDA 12.1.1 and cuDNN 8.

# Create conda environment
conda create -n eventtsf python=3.11
conda activate eventtsf

# Install dependencies
pip install hydra-core
pip install pytorch_lightning==2.5.0
pip install lightning
pip install wandb
pip install torch==2.5.0

β‘‘ Run Experiments

# Run all experiments
bash run.sh

# Individual datasets
python main.py data=atmospheric_physics
python main.py data=new_york_taxi
python main.py data=simulation_sine
python main.py data=traffic_FromNewstoForecast
python main.py data=electricity_accomodation
python main.py data=weather_TimeCAP
python main.py data=weather_TimeCAPnew
python main.py data=weather_TimeCAPsan

β‘’ Configuration

Experiment configurations are managed via Hydra. See configs/ for dataset and algorithm settings.

πŸ“ˆ Quick Reproduce

  1. Set up the environment and install dependencies.
docker build -t eventtsf .
docker run --gpus all -it eventtsf
  1. Download and unzip the datasets into data/download/.
mkdir -p data/download
wget -O datasets.zip "https://drive.google.com/uc?export=download&id=132GkrVsrEXqCO6MxBJ3Lg2QezO5JFat3"
unzip datasets.zip -d data/download/
  1. Run bash run.sh or the individual dataset commands above.
bash run.sh

πŸ“šFurther Reading

1, T2S: High-resolution Time Series Generation with Text-to-Series Diffusion Models, IJCAI 2025.

@article{ge2025t2s,
  title={T2S: High-resolution Time Series Generation with Text-to-Series Diffusion Models},
  author={Ge, Yunfeng and Li, Jiawei and Zhao, Yiji and Wen, Haomin and Li, Zhao and Qiu, Meikang and Li, Hongyan and Jin, Ming and Pan, Shirui},
  journal={arXiv preprint arXiv:2505.02417},
  year={2025}
}

πŸ™ Acknowledgements

Our implementation adapts Time-Series-Library, research-template, and Meta (Scalable Diffusion Models with Transformers) as the code base and have extensively modified it to our purposes. We thank the authors for sharing their implementations and related resources.

πŸ™‹ Citation

If you find this resource helpful, please consider starring this repo and citing:

@article{ge2025eventtsf,
  title={EventTSF: Event-Aware Non-Stationary Time Series Forecasting},
  author={Ge, Yunfeng and Jin, Ming and Zhao, Yiji and Li, Hongyan and Du, Bo and Xu, Chang and Pan, Shirui},
  journal={arXiv preprint arXiv:2508.13434},
  year={2025}
}

Releases

No releases published

Packages

 
 
 

Contributors