All Projects → zhouhaoyi → Informer2020

zhouhaoyi / Informer2020

Licence: apache-2.0
The GitHub repository for the paper "Informer" accepted by AAAI 2021.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Informer2020

TSForecasting
This repository contains the implementations related to the experiments of a set of publicly available datasets that are used in the time series forecasting research space.
Stars: ✭ 53 (-93.13%)
Mutual labels:  time-series, forecasting
Arch
ARCH models in Python
Stars: ✭ 660 (-14.4%)
Mutual labels:  time-series, forecasting
tsfeatures
Calculates various features from time series data. Python implementation of the R package tsfeatures.
Stars: ✭ 87 (-88.72%)
Mutual labels:  time-series, forecasting
gpu accelerated forecasting modeltime gluonts
GPU-Accelerated Deep Learning for Time Series using Modeltime GluonTS (Learning Lab 53). Event sponsors: Saturn Cloud, NVIDIA, & Business Science.
Stars: ✭ 20 (-97.41%)
Mutual labels:  time-series, forecasting
Timetk
A toolkit for working with time series in R
Stars: ✭ 371 (-51.88%)
Mutual labels:  time-series, forecasting
time-series-autoencoder
📈 PyTorch dual-attention LSTM-autoencoder for multivariate Time Series 📈
Stars: ✭ 198 (-74.32%)
Mutual labels:  time-series, forecasting
Darts
A python library for easy manipulation and forecasting of time series.
Stars: ✭ 760 (-1.43%)
Mutual labels:  time-series, forecasting
forecasting models
An overview of univariate time series forecasting models with sample code.
Stars: ✭ 39 (-94.94%)
Mutual labels:  time-series, forecasting
Atspy
AtsPy: Automated Time Series Models in Python (by @firmai)
Stars: ✭ 340 (-55.9%)
Mutual labels:  time-series, forecasting
Luminaire
Luminaire is a python package that provides ML driven solutions for monitoring time series data.
Stars: ✭ 316 (-59.01%)
Mutual labels:  time-series, forecasting
ts-forecasting-ensemble
CentOS based Docker container for Time Series Analysis and Modeling.
Stars: ✭ 19 (-97.54%)
Mutual labels:  time-series, forecasting
Sktime
A unified framework for machine learning with time series
Stars: ✭ 4,741 (+514.92%)
Mutual labels:  time-series, forecasting
modeltime.gluonts
GluonTS Deep Learning with Modeltime
Stars: ✭ 31 (-95.98%)
Mutual labels:  time-series, forecasting
magi
📈 high level wrapper for parallel univariate time series forecasting 📉
Stars: ✭ 17 (-97.8%)
Mutual labels:  time-series, forecasting
modeltime.resample
Resampling Tools for Time Series Forecasting with Modeltime
Stars: ✭ 12 (-98.44%)
Mutual labels:  time-series, forecasting
Merlion
Merlion: A Machine Learning Framework for Time Series Intelligence
Stars: ✭ 2,368 (+207.13%)
Mutual labels:  time-series, forecasting
modeltime.ensemble
Time Series Ensemble Forecasting
Stars: ✭ 65 (-91.57%)
Mutual labels:  time-series, forecasting
mlforecast
Scalable machine 🤖 learning for time series forecasting.
Stars: ✭ 96 (-87.55%)
Mutual labels:  time-series, forecasting
Pyaf
PyAF is an Open Source Python library for Automatic Time Series Forecasting built on top of popular pydata modules.
Stars: ✭ 289 (-62.52%)
Mutual labels:  time-series, forecasting
Flow Forecast
Deep learning PyTorch library for time series forecasting, classification, and anomaly detection (originally for flood forecasting).
Stars: ✭ 368 (-52.27%)
Mutual labels:  time-series, forecasting

Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting (AAAI'21 Best Paper)

Python 3.6 PyTorch 1.2 cuDNN 7.3.1 License CC BY-NC-SA

This is the origin Pytorch implementation of Informer in the following paper: Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting. Special thanks to Jieqi Peng@cookieminions for building this repo.

🚩News(Feb 22, 2021): We provide Colab Examples for friendly usage.

🚩News(Feb 8, 2021): Our Informer paper has been awarded AAAI'21 Best Paper! We will continue this line of research and update on this repo. Please star this repo and cite our paper if you find our work is helpful for you.



Figure 1. The architecture of Informer.

ProbSparse Attention

The self-attention scores form a long-tail distribution, where the "active" queries lie in the "head" scores and "lazy" queries lie in the "tail" area. We designed the ProbSparse Attention to select the "active" queries rather than the "lazy" queries. The ProbSparse Attention with Top-u queries forms a sparse Transformer by the probability distribution. Why not use Top-u keys? The self-attention layer's output is the re-represent of input. It is formulated as a weighted combination of values w.r.t. the score of dot-product pairs. The top queries with full keys encourage a complete re-represent of leading components in the input, and it is equivalent to selecting the "head" scores among all the dot-product pairs. If we choose Top-u keys, the full keys just preserve the trivial sum of values within the "long tail" scores but wreck the leading components' re-represent.



Figure 2. The illustration of ProbSparse Attention.

Requirements

  • Python 3.6
  • matplotlib == 3.1.1
  • numpy == 1.19.4
  • pandas == 0.25.1
  • scikit_learn == 0.21.3
  • torch == 1.4.0

Dependencies can be installed using the following command:

pip install -r requirements.txt

Data

The ETT dataset used in the paper can be download in the repo ETDataset. The required data files should be put into data/ETT/ folder. A demo slice of the ETT data is illustrated in the following figure. Note that the input of each dataset is zero-mean normalized in this implementation.



Figure 3. An example of the ETT data.

Usage

Colab Examples: We provide google colabs to help reproducing and customing our repo, which includes experiments(train and test), prediction, visualization and custom data. Open In Colab

Commands for training and testing the model with ProbSparse self-attention on Dataset ETTh1, ETTh2 and ETTm1 respectively:

# ETTh1
python -u main_informer.py --model informer --data ETTh1 --attn prob --freq h

# ETTh2
python -u main_informer.py --model informer --data ETTh2 --attn prob --freq h

# ETTm1
python -u main_informer.py --model informer --data ETTm1 --attn prob --freq t

More parameter information please refer to main_informer.py.

Results



Figure 4. Univariate forecasting results.



Figure 5. Multivariate forecasting results.

FAQ

If you run into a problem like RuntimeError: The size of tensor a (98) must match the size of tensor b (96) at non-singleton dimension 1, you can check torch version or modify code about Conv1d of TokenEmbedding in models/embed.py as the way of circular padding mode in Conv1d changed in different torch versions.

Citation

If you find this repository useful in your research, please consider citing the following paper:

@inproceedings{haoyietal-informer-2021,
  author    = {Haoyi Zhou and
               Shanghang Zhang and
               Jieqi Peng and
               Shuai Zhang and
               Jianxin Li and
               Hui Xiong and
               Wancai Zhang},
  title     = {Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting},
  booktitle = {The Thirty-Fifth {AAAI} Conference on Artificial Intelligence, {AAAI} 2021},
  pages     = {online},
  publisher = {{AAAI} Press},
  year      = {2021},
}

Contact

If you have any questions, feel free to contact Haoyi Zhou through Email ([email protected]) or Github issues. Pull requests are highly welcomed!

Acknowlegements

Thanks for the computing infrastructure provided by Beijing Advanced Innovation Center for Big Data and Brain Computing (BDBC). At the same time, thank you all for your attention to this work! Stargazers repo roster for @zhouhaoyi/Informer2020

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].