β
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.
- π© 2026: EventTSF has been accepted by IJCAI 2026.
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:
-
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.
-
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.
-
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
-
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.
-
AR-Diffusion Forecaster: An autoregressive diffusion-based forecasting model that progressively generates future time series segments conditioned on different historical observations and textual events.
-
Event-Aware Timestep Scheduler: A learnable event-conditioned timestep reparameterization mechanism that adapts diffusion denoising difficulty to event-induced non-stationary dynamics.
-
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.
-
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.
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/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
Option 1: Using Docker (Recommended)
docker build -t eventtsf .
docker run --gpus all -it eventtsfOption 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 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_TimeCAPsanExperiment configurations are managed via Hydra. See configs/ for dataset and algorithm settings.
- Set up the environment and install dependencies.
docker build -t eventtsf .
docker run --gpus all -it eventtsf
- 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/
- Run
bash run.shor the individual dataset commands above.
bash run.sh
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}
}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.
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}
}
