Skip to content

Latest commit

 

History

History
109 lines (63 loc) · 2.5 KB

README.md

File metadata and controls

109 lines (63 loc) · 2.5 KB

ANT: Adaptive Noise Schedule for Time Series Diffusion Models

Seunghan Lee, Kibok Lee*, Taeyoung Park*

(*: Co-corresponding Authors)

This repository contains the official implementation for the paper ANT: Adaptive Noise Schedule for Time Series Diffusion Models

This work is accepted in NeurIPS 2024


1. Installation

Create a conda environment

conda create --name ANT --yes python=3.8 && conda activate ANT

pip install --editable "."

2. Calculation of ANT score

Refer to ANT_score.ipynb


3. Three Downstream Tasks

Example)

  • Dataset: M4
  • Scheduler: Cos(T=100, tau=1.0)

1) TS Forecasting

a) Standard horizon ($H$)

  • Train
python bin/train_model.py -c configs/train_tsdiff/train_m4_hourly.yaml --schedule cosine --tau 1.0 --timesteps 100 --time_embed 1 --is_train 1 --train_scale 1

  • Test
python bin/train_model.py -c configs/train_tsdiff/train_m4_hourly.yaml --schedule cosine --tau 1.0 --timesteps 100 --time_embed 1 --is_train 0 --test_scale 16.0 --train_scale 1

b) Variable horizons ($\alpha \cdot H$)

  • Train ( where $\alpha=2$)
python bin/train_model.py -c configs/train_tsdiff/train_m4_hourly.yaml --schedule cosine --tau 1.0 --timesteps 100 --pred_alpha 2.0 --time_embed 1 --is_train 1 --train_scale 1
  • Test
python bin/train_model.py -c configs/train_tsdiff/train_m4_hourly.yaml --schedule cosine --tau 1.0 --timesteps 100 --pred_alpha 2.0 --time_embed 1 --is_train 0 --test_scale 32.0 --train_scale 1

3-2) TS Refinement

Load pretrained weights trained from 3-1) TS Forecasting

python bin/refinement_experiment.py -c configs/refinement/m4_hourly-linear.yaml --timesteps 100 --schedule cosine --tau 1.0 --time_embed 1 --ckpt saved_weights/results_T100_cosine_1.0_w_DE/m4_hourly/lightning_logs/version_0/checkpoints/last.ckpt

3-3) TS Generation

Load pretrained weights trained from 3-1) TS Forecasting

python bin/tstr_experiment.py -c configs/tstr/m4_hourly.yaml --ckpt saved_weights/results_T50_linear_0.0_wo_DE/m4_hourly/lightning_logs/version_0/checkpoints/last.ckpt --schedule cosine --timesteps 100 --tau 1.0 --time_embed 1

Acknowledgement

We appreciate the following github repositories for their valuable code base & datasets:

https://github.com/amazon-science/unconditional-time-series-diffusion