Skip to content

[AAAI 2025] Official implementation of "xPatch: Dual-Stream Time Series Forecasting with Exponential Seasonal-Trend Decomposition"

License

Notifications You must be signed in to change notification settings

stitsyuk/xPatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(AAAI25) xPatch: Dual-Stream Time Series Forecasting with Exponential Seasonal-Trend Decomposition

This is an official implementation of xPatch: Dual-Stream Time Series Forecasting with Exponential Seasonal-Trend Decomposition.

Model Overview

Exponential Patch (xPatch) is a novel dual-stream architecture that utilizes exponential decomposition.

Seasonal-Trend Decomposition

Simple Moving Average (SMA) is the unweighted mean of the previous data points.

Exponential Moving Average (EMA) is an exponential smoothing method that assigns greater weight to more recent data points while smoothing out older data.

Architecture

Dual-flow architecture consists of an MLP-based linear stream and a CNN-based non-linear stream.

Results

Long-term Forecasting with Unified Experimental Settings

In the unified experimental settings, xPatch achieves the best averaged performance on 60% of the datasets using the MSE metric and 70% of the datasets using the MAE metric.

Long-term Forecasting with Hyperparameter Search

In the hyperparameter search settings, xPatch achieves the best averaged performance on 70% of the datasets using the MSE metric and 90% of the datasets using the MAE metric.

Efficiency on Long Look-back Windows

We explore the ability of different models to learn from a longer lookback window.

Dual Flow Net

We explore the impact of the dual flow network in xPatch architecture and assess the contribution of each stream. The four possible configurations:

  • Original: Seasonality -> non-linear stream, Trend -> linear stream
  • Reversed: Seasonality -> linear stream, Trend -> non-linear stream
  • Non-linear only: Seasonality -> non-linear stream, Trend -> non-linear stream
  • Linear only: Seasonality -> linear stream, Trend -> linear stream

Getting Started

  1. Install conda environment: conda env create -f environment.yml

  2. Download data. You can download the datasets from Google Driver, Baidu Driver or Kaggle Datasets. All datasets are pre-processed and can be used easily. Create a seperate folder ./dataset and put all the files in the directory.

  3. Train the model. We provide the experiment scripts of all benchmarks under the folder ./scripts. The script for unified settings is xPatch_unified, while for hyperparameter search you can use xPatch_search. You can reproduce the experiments by:

bash scripts/xPatch_unified.sh

All experiments were conducted on a single Quadro RTX 6000 GPU. You can adjust the hyperparameters based on your needs (e.g. batch size, patch length, lookback windows and prediction lengths, alpha parameter for exponential decomposition). We also provide code for the baseline models and for ablation experiments from Appendix (EMA decomposition, arctangent loss, sigmoid learning rate adjustment scheme, inference time) in ./ablation.

Acknowledgement

We appreciate the following github repos for their valuable code and effort:

Contact

If you have any questions or concerns, please contact us at [email protected] or submit an issue.

Citation

If you find this repository useful in your research, please consider citing our paper as follows:

@inproceedings{Stitsyuk-2025-xPatch,
  title     = {xPatch: Dual-Stream Time Series Forecasting with Exponential Seasonal-Trend Decomposition},
  author    = {Stitsyuk, Artyom and Choi, Jaesik},
  booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
  year      = {2025}
}

About

[AAAI 2025] Official implementation of "xPatch: Dual-Stream Time Series Forecasting with Exponential Seasonal-Trend Decomposition"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published