Home

Awesome

<div align="center"> <img src="assets/Basic-TS-logo-for-white.png#gh-light-mode-only" height=200> <img src="assets/Basic-TS-logo-for-black.png#gh-dark-mode-only" height=200> <h3><b> A Fair and Scalable Time Series Forecasting Benchmark and Toolkit. </b></h3> </div> <div align="center">

English | 简体中文

</div>
<div align="center">

EasyTorch LICENSE PyTorch PyTorch python lint

</div> <div align="center">

🎉 Getting Started | 💡 Overall Design

📦 Dataset | 🛠️ Scaler | 🧠 Model | 📉 Metrics | 🏃‍♂️ Runner | 📜 Config | 📜 Baselines

</div>

$\text{BasicTS}^{+}$ (Basic Time Series) is a benchmark library and toolkit designed for time series forecasting. It now supports a wide range of tasks and datasets, including spatial-temporal forecasting and long-term time series forecasting. It covers various types of algorithms such as statistical models, machine learning models, and deep learning models, making it an ideal tool for developing and evaluating time series forecasting models.

If you find this project helpful, please don't forget to give it a ⭐ Star to show your support. Thank you!

On one hand, BasicTS provides a unified and standardized pipeline, offering a fair and comprehensive platform for reproducing and comparing popular models.

On the other hand, BasicTS offers a user-friendly and easily extensible interface, enabling quick design and evaluation of new models. Users can simply define their model structure and easily perform basic operations.

You can find detailed tutorials in Getting Started. Additionally, we are collecting ToDo and HowTo items. If you need more features (e.g., additional datasets or benchmark models) or tutorials, feel free to open an issue or leave a comment here.

[!IMPORTANT] If you find this repository helpful for your work, please consider citing the following benchmarking paper:

@article{shao2024exploring,
 title={Exploring progress in multivariate time series forecasting: Comprehensive benchmarking and heterogeneity analysis},
 author={Shao, Zezhi and Wang, Fei and Xu, Yongjun and Wei, Wei and Yu, Chengqing and Zhang, Zhao and Yao, Di and Sun, Tao and Jin, Guangyin and Cao, Xin and others},
 journal={IEEE Transactions on Knowledge and Data Engineering},
 year={2024},
 publisher={IEEE}
}

🔥🔥🔥 The paper has been accepted by IEEE TKDE! You can check it out here. 🔥🔥🔥

✨ Highlighted Features

Fair Performance Review

Users can compare the performance of different models on arbitrary datasets fairly and exhaustively based on a unified and comprehensive pipeline.

Developing with BasicTS

<details> <summary><b>Minimum Code</b></summary> Users only need to implement key codes such as model architecture and data pre/post-processing to build their own deep learning projects. </details> <details> <summary><b>Everything Based on Config</b></summary> Users can control all the details of the pipeline through a config file, such as the hyperparameter of dataloaders, optimization, and other tricks (*e.g.*, curriculum learning). </details> <details> <summary><b>Support All Devices</b></summary> BasicTS supports CPU, GPU and GPU distributed training (both single node multiple GPUs and multiple nodes) thanks to using EasyTorch as the backend. Users can use it by setting parameters without modifying any code. </details> <details> <summary><b>Save Training Log</b></summary> Support `logging` log system and `Tensorboard`, and encapsulate it as a unified interface, users can save customized training logs by calling simple interfaces. </details>

🚀 Installation and Quick Start

For detailed instructions, please refer to the Getting Started tutorial.

📦 Supported Baselines

BasicTS implements a wealth of models, including classic models, spatial-temporal forecasting models, and long-term time series forecasting model:

You can find the implementation of these models in the baselines directory.

The code links (💻Code) in the table below point to the official implementations from these papers. Many thanks to the authors for open-sourcing their work!

<details open> <summary><h3>Spatial-Temporal Forecasting</h3></summary>
📊Baseline📝Title📄Paper💻Code🏛Venue🎯Task
BigSTLinear Complexity Spatio-Temporal Graph Neural Network for Traffic Forecasting on Large-Scale Road NetworksLinkLinkVLDB'24STF
STDMAESpatio-Temporal-Decoupled Masked Pre-training for Traffic ForecastingLinkLinkIJCAI'24STF
STWaveWhen Spatio-Temporal Meet Wavelets: Disentangled Traffic Forecasting via Efficient Spectral Graph Attention NetworksLinkLinkICDE'23STF
STAEformerSpatio-Temporal Adaptive Embedding Makes Vanilla Transformer SOTA for Traffic ForecastingLinkLinkCIKM'23STF
MegaCRNSpatio-Temporal Meta-Graph Learning for Traffic ForecastingLinkLinkAAAI'23STF
DGCRNDynamic Graph Convolutional Recurrent Network for Traffic Prediction: Benchmark and SolutionLinkLinkACM TKDD'23STF
STIDSpatial-Temporal Identity: A Simple yet Effective Baseline for Multivariate Time Series ForecastingLinkLinkCIKM'22STF
STEPPretraining Enhanced Spatial-temporal Graph Neural Network for Multivariate Time Series ForecastingLinkLinkSIGKDD'22STF
D2STGNNDecoupled Dynamic Spatial-Temporal Graph Neural Network for Traffic ForecastingLinkLinkVLDB'22STF
STNormSpatial and Temporal Normalization for Multi-variate Time Series ForecastingLinkLinkSIGKDD'21STF
STGODESpatial-Temporal Graph ODE Networks for Traffic Flow ForecastingLinkLinkSIGKDD'21STF
GTSDiscrete Graph Structure Learning for Forecasting Multiple Time SeriesLinkLinkICLR'21STF
StemGNNSpectral Temporal Graph Neural Network for Multivariate Time-series ForecastingLinkLinkNeurIPS'20STF
MTGNNConnecting the Dots: Multivariate Time Series Forecasting with Graph Neural NetworksLinkLinkSIGKDD'20STF
AGCRNAdaptive Graph Convolutional Recurrent Network for Traffic ForecastingLinkLinkNeurIPS'20STF
GWNetGraph WaveNet for Deep Spatial-Temporal Graph ModelingLinkLinkIJCAI'19STF
STGCNSpatio-Temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic ForecastingLinkLinkIJCAI'18STF
DCRNNDiffusion Convolutional Recurrent Neural Network: Data-Driven Traffic ForecastingLinkLink1, Link2ICLR'18STF
</details> <details open> <summary><h3>Long-Term Time Series Forecasting</h3></summary>
📊Baseline📝Title📄Paper💻Code🏛Venue🎯Task
SOFTSSOFTS: Efficient Multivariate Time Series Forecasting with Series-Core FusionLinkLinkNeurIPS'24LTSF
CATSAre Self-Attentions Effective for Time Series Forecasting?LinkLinkNeurIPS'24LTSF
SumbaStructured Matrix Basis for Multivariate Time Series Forecasting with Interpretable DynamicsLinkLinkNeurIPS'24LTSF
GLAFFRethinking the Power of Timestamps for Robust Time Series Forecasting: A Global-Local Fusion PerspectiveLinkLinkNeurIPS'24LTSF
CycleNetCycleNet: Enhancing Time Series Forecasting through Modeling Periodic Patterns ForecastingLinkLinkNeurIPS'24LTSF
FredformerFredformer: Frequency Debiased Transformer for Time Series ForecastingLinkLinkKDD'24LTSF
UMixerAn Unet-Mixer Architecture with Stationarity Correction for Time Series ForecastingLinkLinkAAAI'24LTSF
TimeMixerDecomposable Multiscale Mixing for Time Series ForecastingLinkLinkICLR'24LTSF
Time-LLMTime-LLM: Time Series Forecasting by Reprogramming Large Language ModelsLinkLinkICLR'24LTSF
SparseTSFModeling LTSF with 1k ParametersLinkLinkICML'24LTSF
iTrainsformerInverted Transformers Are Effective for Time Series ForecastingLinkLinkICLR'24LTSF
KoopaLearning Non-stationary Time Series Dynamics with Koopman PredictorsLinkLinkNeurIPS'24LTSF
CrossGNNCrossGNN: Confronting Noisy Multivariate Time Series Via Cross Interaction RefinementLinkLinkNeurIPS'23LTSF
NLinearAre Transformers Effective for Time Series Forecasting?LinkLinkAAAI'23LTSF
CrossformerTransformer Utilizing Cross-Dimension Dependency for Multivariate Time Series ForecastingLinkLinkICLR'23LTSF
DLinearAre Transformers Effective for Time Series Forecasting?LinkLinkAAAI'23LTSF
DSformerA Double Sampling Transformer for Multivariate Time Series Long-term PredictionLinkLinkCIKM'23LTSF
SegRNNSegment Recurrent Neural Network for Long-Term Time Series ForecastingLinkLinkarXivLTSF
MTS-MixersMultivariate Time Series Forecasting via Factorized Temporal and Channel MixingLinkLinkarXivLTSF
LightTSFast Multivariate Time Series Forecasting with Light Sampling-oriented MLPLinkLinkarXivLTSF
ETSformerExponential Smoothing Transformers for Time-series ForecastingLinkLinkarXivLTSF
NHiTSNeural Hierarchical Interpolation for Time Series ForecastingLinkLinkAAAI'23LTSF
PatchTSTA Time Series is Worth 64 Words: Long-term Forecasting with TransformersLinkLinkICLR'23LTSF
TiDELong-term Forecasting with TiDE: Time-series Dense EncoderLinkLinkTMLR'23LTSF
TimesNetTemporal 2D-Variation Modeling for General Time Series AnalysisLinkLinkICLR'23LTSF
TriformerTriangular, Variable-Specific Attentions for Long Sequence Multivariate Time Series ForecastingLinkLinkIJCAI'22LTSF
NSformerExploring the Stationarity in Time Series ForecastingLinkLinkNeurIPS'22LTSF
FiLMFrequency improved Legendre Memory Model for LTSFLinkLinkNeurIPS'22LTSF
FEDformerFrequency Enhanced Decomposed Transformer for Long-term Series ForecastingLinkLinkICML'22LTSF
PyraformerLow complexity pyramidal Attention For Long-range Time Series Modeling and ForecastingLinkLinkICLR'22LTSF
HIHistorical Inertia: A Powerful Baseline for Long Sequence Time-series ForecastingLinkNoneCIKM'21LTSF
AutoformerDecomposition Transformers with Auto-Correlation for Long-Term Series ForecastingLinkLinkNeurIPS'21LTSF
InformerBeyond Efficient Transformer for Long Sequence Time-Series ForecastingLinkLinkAAAI'21LTSF
</details> <details open> <summary><h3>Others</h3></summary>
📊Baseline📝Title📄Paper💻Code🏛Venue🎯Task
LightGBMLightGBM: A Highly Efficient Gradient Boosting Decision TreeLinkLinkNeurIPS'17Machine Learning
NBeatsNeural basis expansion analysis for interpretable time series forecastingLinkLink1, Link2ICLR'19Deep Time Series Forecasting
DeepARProbabilistic Forecasting with Autoregressive Recurrent NetworksLinkLink1, Link2, Link3Int. J. Forecast'20Probabilistic Time Series Forecasting
WaveNetWaveNet: A Generative Model for Raw Audio.LinkLink 1, Link 2arXivAudio
</details>

📦 Supported Datasets

BasicTS support a variety of datasets, including spatial-temporal forecasting, long-term time series forecasting, and large-scale datasets.

<details open> <summary><h3>Spatial-Temporal Forecasting</h3></summary>
🏷️Name🌐Domain📏Length📊Time Series Count🔄Graph⏱️Freq. (m)🎯Task
METR-LATraffic Speed34272207True5STF
PEMS-BAYTraffic Speed52116325True5STF
PEMS03Traffic Flow26208358True5STF
PEMS04Traffic Flow16992307True5STF
PEMS07Traffic Flow28224883True5STF
PEMS08Traffic Flow17856170True5STF
</details> <details open> <summary><h3>Long-Term Time Series Forecasting</h3></summary>
🏷️Name🌐Domain📏Length📊Time Series Count🔄Graph⏱️Freq. (m)🎯Task
BeijingAirQualityBeijing Air Quality360007False60LTSF
ETTh1Electricity Transformer Temperature144007False60LTSF
ETTh2Electricity Transformer Temperature144007False60LTSF
ETTm1Electricity Transformer Temperature576007False15LTSF
ETTm2Electricity Transformer Temperature576007False15LTSF
ElectricityElectricity Consumption26304321False60LTSF
ExchangeRateExchange Rate75888False1440LTSF
IllnessIlness Data9667False10080LTSF
TrafficRoad Occupancy Rates17544862False60LTSF
WeatherWeather5269621False10LTSF
</details> <details open> <summary><h3>Large Scale Dataset</h3></summary>
🏷️Name🌐Domain📏Length📊Time Series Count🔄Graph⏱️Freq. (m)🎯Task
CATraffic Flow350408600True15Large Scale
GBATraffic Flow350402352True15Large Scale
GLATraffic Flow350403834True15Large Scale
SDTraffic Flow35040716True15Large Scale
</details>

📉 Main Results

See the paper Exploring Progress in Multivariate Time Series Forecasting: Comprehensive Benchmarking and Heterogeneity Analysis.

✨ Contributors

Thanks goes to these wonderful people (emoji key):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/zezhishao"><img src="https://avatars.githubusercontent.com/u/33691477?v=4?s=100" width="100px;" alt="S22"/><br /><sub><b>S22</b></sub></a><br /><a href="#maintenance-zezhishao" title="Maintenance">🚧</a> <a href="https://github.com/GestaltCogTeam/BasicTS/commits?author=zezhishao" title="Code">💻</a> <a href="https://github.com/GestaltCogTeam/BasicTS/issues?q=author%3Azezhishao" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/finleywang"><img src="https://avatars.githubusercontent.com/u/5022944?v=4?s=100" width="100px;" alt="finleywang"/><br /><sub><b>finleywang</b></sub></a><br /><a href="#mentoring-finleywang" title="Mentoring">🧑‍🏫</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/blisky-li"><img src="https://avatars.githubusercontent.com/u/66107694?v=4?s=100" width="100px;" alt="blisky-li"/><br /><sub><b>blisky-li</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/commits?author=blisky-li" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/LMissher"><img src="https://avatars.githubusercontent.com/u/37818979?v=4?s=100" width="100px;" alt="LMissher"/><br /><sub><b>LMissher</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/commits?author=LMissher" title="Code">💻</a> <a href="https://github.com/GestaltCogTeam/BasicTS/issues?q=author%3ALMissher" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/cnstark"><img src="https://avatars.githubusercontent.com/u/45590791?v=4?s=100" width="100px;" alt="CNStark"/><br /><sub><b>CNStark</b></sub></a><br /><a href="#infra-cnstark" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Azusa-Yuan"><img src="https://avatars.githubusercontent.com/u/61765965?v=4?s=100" width="100px;" alt="Azusa"/><br /><sub><b>Azusa</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/issues?q=author%3AAzusa-Yuan" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ywoelker"><img src="https://avatars.githubusercontent.com/u/94364022?v=4?s=100" width="100px;" alt="Yannick Wölker"/><br /><sub><b>Yannick Wölker</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/issues?q=author%3Aywoelker" title="Bug reports">🐛</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/hlhang9527"><img src="https://avatars.githubusercontent.com/u/77621248?v=4?s=100" width="100px;" alt="hlhang9527"/><br /><sub><b>hlhang9527</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/issues?q=author%3Ahlhang9527" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/ChengqingYu"><img src="https://avatars.githubusercontent.com/u/114470704?v=4?s=100" width="100px;" alt="Chengqing Yu"/><br /><sub><b>Chengqing Yu</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/commits?author=ChengqingYu" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/Reborn14"><img src="https://avatars.githubusercontent.com/u/74488779?v=4?s=100" width="100px;" alt="Reborn14"/><br /><sub><b>Reborn14</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/commits?author=Reborn14" title="Documentation">📖</a> <a href="https://github.com/GestaltCogTeam/BasicTS/commits?author=Reborn14" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/TensorPulse"><img src="https://avatars.githubusercontent.com/u/94754159?v=4?s=100" width="100px;" alt="TensorPulse"/><br /><sub><b>TensorPulse</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/issues?q=author%3ATensorPulse" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/superarthurlx"><img src="https://avatars.githubusercontent.com/u/40826115?v=4?s=100" width="100px;" alt="superarthurlx"/><br /><sub><b>superarthurlx</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/commits?author=superarthurlx" title="Code">💻</a> <a href="https://github.com/GestaltCogTeam/BasicTS/issues?q=author%3Asuperarthurlx" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/yisongfu"><img src="https://avatars.githubusercontent.com/u/139831104?v=4?s=100" width="100px;" alt="Yisong Fu"/><br /><sub><b>Yisong Fu</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/commits?author=yisongfu" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/DiamonJoy"><img src="https://avatars.githubusercontent.com/u/11327242?v=4?s=100" width="100px;" alt="Xubin"/><br /><sub><b>Xubin</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/commits?author=DiamonJoy" title="Documentation">📖</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/duyifanict"><img src="https://avatars.githubusercontent.com/u/171222220?v=4?s=100" width="100px;" alt="DU YIFAN"/><br /><sub><b>DU YIFAN</b></sub></a><br /><a href="https://github.com/GestaltCogTeam/BasicTS/commits?author=duyifanict" title="Code">💻</a></td> </tr> </tbody> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the all-contributors specification. Contributions of any kind welcome!

⭐ Star History

Star History Chart

🔗 Acknowledgement

BasicTS is developed based on EasyTorch, an easy-to-use and powerful open-source neural network training framework.

📧 Contact

We invite you to join our official community to access comprehensive technical support.

Official Discord Server: Click here to join our Discord community

Official WeChat Group:

wechat