📦 数据集 (Dataset) | 🛠️ 数据缩放 (Scaler) | 🧠 模型约定 (Model) | 📉 评估指标 (Metrics)
🏃♂️ 执行器 (Runner) | 📜 配置文件 (Config) | 📜 基线模型 (Baselines)
BasicTS (Basic Time Series) 是一个面向时间序列分析的基准库和工具箱,现已支持时空预测、长序列预测、分类、插补等多种任务与数据集,涵盖统计模型、机器学习模型、深度学习模型等多类算法,为开发和评估时间序列预测模型提供了理想的工具。你可以在快速上手找到详细的教程。
🎉 更新(2025年10月):BasicTS 内置支持选择学习(NeurIPS'25),一种有效缓解过拟合,增加模型性能和泛化性的训练策略。用户可以从回调模块中导入并直接使用。使用说明
🎉 更新(2025年10月):BasicTS 1.0版本发布了!新特性:
- 🚀 三行代码,快速上手:pip install 安装,极简 API 设计,快速实现模型训练与评估。
- 📦 模块化组件,开箱即用:提供 Transformer、MLP 等即插即用的组件,像搭积木一样构建自己的模型。
- 🔄 多任务支持:支持时序预测、分类、插补等多个时序分析核心任务。
- 🔧 高可扩展架构:基于 Taskflow 与 Callback 机制,无需修改 Runner 即可轻松定制。
🎉 更新(2025年5月): BasicTS 现已支持使用 BLAST (KDD'25) 语料库训练通用预测模型(例如 TimeMoE 和 ChronosBolt)。BLAST 能够实现 更快的收敛速度、显著降低计算成本,并且即使在资源有限的情况下也能获得卓越性能。
如果你觉得这个项目对你有帮助,别忘了给个⭐Star支持一下,非常感谢!
Important
如果本项目对您有用,请考虑引用下面的论文:
@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},
volume={37},
number={1},
pages={291-305},
publisher={IEEE}
}🔥🔥🔥 该论文已被IEEE TKDE录用!你可以在这里查看论文。 🔥🔥🔥
BasicTS 一方面通过 统一且标准化的流程,为热门的深度学习模型提供了 公平且全面 的复现与对比平台。
另一方面,BasicTS 提供了用户 友好且易于扩展 的接口,帮助快速设计和评估新模型。用户只需定义模型结构,便可轻松完成基本操作。
通过统一且全面的流程,用户能够公平且充分地对比不同模型在任意数据集上的性能表现。
最简代码实现
用户只需实现关键部分如模型架构、数据预处理和后处理,即可构建自己的深度学习项目。基于配置文件控制一切
用户可以通过配置文件掌控流程中的所有细节,包括数据加载器的超参数、优化策略以及其他技巧(如课程学习)。支持所有设备
BasicTS 支持 CPU、GPU 以及分布式 GPU 训练(单节点多 GPU 和多节点),依托 EasyTorch 作为后端。用户只需通过设置参数即可使用这些功能,无需修改代码。保存训练日志
BasicTS 提供 `logging` 日志系统和 `Tensorboard` 支持,并统一封装接口,用户可以通过简便的接口调用来保存自定义的训练日志。详细的安装步骤请参考 快速上手 教程。
BasicTS 实现了丰富的基线模型,包括经典模型、时空预测模型、长序列预测模型、通用预测模型等。
这些模型的代码实现可在 baselines 目录中找到。
下表中的代码链接(💻Code) 指向了相关论文的官方实现,感谢各位作者对代码的开源贡献!
| 📊Baseline | 📝Title | 📄Paper | 💻Code | 🏛Venue | 🎯Task |
|---|---|---|---|---|---|
| TimeMoE | Time-MoE: Billion-Scale Time Series Foundation Models with Mixture of Experts | Link | Link | ICLR'25 | UFM |
| ChronosBolt | Chronos: Learning the Language of Time Series | Link | Link | TMLR'24 | UFM |
| MOIRAI (inference) | Unified Training of Universal Time Series Forecasting Transformers | Link | Link | ICML'24 | UFM |
| 📊Baseline | 📝Title | 📄Paper | 💻Code | 🏛Venue | 🎯Task |
|---|---|---|---|---|---|
| STDN | Spatiotemporal-aware Trend-Seasonality Decomposition Network for Traffic Flow Forecasting | Link | Link | AAAI'25 | STF |
| HimNet | Heterogeneity-Informed Meta-Parameter Learning for Spatiotemporal Time Series Forecasting | Link | Link | SIGKDD'24 | STF |
| DFDGCN | Dynamic Frequency Domain Graph Convolutional Network for Traffic Forecasting | Link | Link | ICASSP'24 | STF |
| STPGNN | Spatio-Temporal Pivotal Graph Neural Networks for Traffic Flow Forecasting | Link | Link | AAAI'24 | STF |
| BigST | Linear Complexity Spatio-Temporal Graph Neural Network for Traffic Forecasting on Large-Scale Road Networks | Link | Link | VLDB'24 | STF |
| STDMAE | Spatio-Temporal-Decoupled Masked Pre-training for Traffic Forecasting | Link | Link | IJCAI'24 | STF |
| STWave | When Spatio-Temporal Meet Wavelets: Disentangled Traffic Forecasting via Efficient Spectral Graph Attention Networks | Link | Link | ICDE'23 | STF |
| STAEformer | Spatio-Temporal Adaptive Embedding Makes Vanilla Transformer SOTA for Traffic Forecasting | Link | Link | CIKM'23 | STF |
| MegaCRN | Spatio-Temporal Meta-Graph Learning for Traffic Forecasting | Link | Link | AAAI'23 | STF |
| DGCRN | Dynamic Graph Convolutional Recurrent Network for Traffic Prediction: Benchmark and Solution | Link | Link | ACM TKDD'23 | STF |
| STID | Spatial-Temporal Identity: A Simple yet Effective Baseline for Multivariate Time Series Forecasting | Link | Link | CIKM'22 | STF |
| STEP | Pretraining Enhanced Spatial-temporal Graph Neural Network for Multivariate Time Series Forecasting | Link | Link | SIGKDD'22 | STF |
| D2STGNN | Decoupled Dynamic Spatial-Temporal Graph Neural Network for Traffic Forecasting | Link | Link | VLDB'22 | STF |
| STNorm | Spatial and Temporal Normalization for Multi-variate Time Series Forecasting | Link | Link | SIGKDD'21 | STF |
| STGODE | Spatial-Temporal Graph ODE Networks for Traffic Flow Forecasting | Link | Link | SIGKDD'21 | STF |
| GTS | Discrete Graph Structure Learning for Forecasting Multiple Time Series | Link | Link | ICLR'21 | STF |
| StemGNN | Spectral Temporal Graph Neural Network for Multivariate Time-series Forecasting | Link | Link | NeurIPS'20 | STF |
| MTGNN | Connecting the Dots: Multivariate Time Series Forecasting with Graph Neural Networks | Link | Link | SIGKDD'20 | STF |
| AGCRN | Adaptive Graph Convolutional Recurrent Network for Traffic Forecasting | Link | Link | NeurIPS'20 | STF |
| GWNet | Graph WaveNet for Deep Spatial-Temporal Graph Modeling | Link | Link | IJCAI'19 | STF |
| STGCN | Spatio-Temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic Forecasting | Link | Link | IJCAI'18 | STF |
| DCRNN | Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting | Link | Link1, Link2 | ICLR'18 | STF |
| 📊Baseline | 📝Title | 📄Paper | 💻Code | 🏛Venue | 🎯Task |
|---|---|---|---|---|---|
| S-D-Mamba | Is Mamba Effective for Time Series Forecasting? | Link | Link | NeuroComputing'24 | LTSF |
| Bi-Mamba | Bi-Mamba+: Bidirectional Mamba for Time Series Forecasting | Link | Link | arXiv'24 | LTSF |
| ModernTCN | ModernTCN: A Modern Pure Convolution Structure for General Time Series Analysis | Link | Link | ICLR'24 | LTSF |
| TimeXer | TimeXer: Empowering Transformers for Time Series Forecasting with Exogenous Variables | Link | Link | NeurIPS'24 | LTSF |
| CARD | CARD: Channel Aligned Robust Blend Transformer for Time Series Forecasting | Link | Link | ICLR'24 | LTSF |
| SOFTS | SOFTS: Efficient Multivariate Time Series Forecasting with Series-Core Fusion | Link | Link | NeurIPS'24 | LTSF |
| CATS | Are Self-Attentions Effective for Time Series Forecasting? | Link | Link | NeurIPS'24 | LTSF |
| Sumba | Structured Matrix Basis for Multivariate Time Series Forecasting with Interpretable Dynamics | Link | Link | NeurIPS'24 | LTSF |
| GLAFF | Rethinking the Power of Timestamps for Robust Time Series Forecasting: A Global-Local Fusion Perspective | Link | Link | NeurIPS'24 | LTSF |
| CycleNet | CycleNet: Enhancing Time Series Forecasting through Modeling Periodic Patterns Forecasting | Link | Link | NeurIPS'24 | LTSF |
| Fredformer | Fredformer: Frequency Debiased Transformer for Time Series Forecasting | Link | Link | KDD'24 | LTSF |
| UMixer | An Unet-Mixer Architecture with Stationarity Correction for Time Series Forecasting | Link | Link | AAAI'24 | LTSF |
| TimeMixer | Decomposable Multiscale Mixing for Time Series Forecasting | Link | Link | ICLR'24 | LTSF |
| Time-LLM | Time-LLM: Time Series Forecasting by Reprogramming Large Language Models | Link | Link | ICLR'24 | LTSF |
| SparseTSF | Modeling LTSF with 1k Parameters | Link | Link | ICML'24 | LTSF |
| iTrainsformer | Inverted Transformers Are Effective for Time Series Forecasting | Link | Link | ICLR'24 | LTSF |
| Koopa | Learning Non-stationary Time Series Dynamics with Koopman Predictors | Link | Link | NeurIPS'24 | LTSF |
| CrossGNN | CrossGNN: Confronting Noisy Multivariate Time Series Via Cross Interaction Refinement | Link | Link | NeurIPS'23 | LTSF |
| NLinear | Are Transformers Effective for Time Series Forecasting? | Link | Link | AAAI'23 | LTSF |
| Crossformer | Transformer Utilizing Cross-Dimension Dependency for Multivariate Time Series Forecasting | Link | Link | ICLR'23 | LTSF |
| DLinear | Are Transformers Effective for Time Series Forecasting? | Link | Link | AAAI'23 | LTSF |
| DSformer | A Double Sampling Transformer for Multivariate Time Series Long-term Prediction | Link | Link | CIKM'23 | LTSF |
| SegRNN | Segment Recurrent Neural Network for Long-Term Time Series Forecasting | Link | Link | arXiv | LTSF |
| MTS-Mixers | Multivariate Time Series Forecasting via Factorized Temporal and Channel Mixing | Link | Link | arXiv | LTSF |
| LightTS | Fast Multivariate Time Series Forecasting with Light Sampling-oriented MLP | Link | Link | arXiv | LTSF |
| ETSformer | Exponential Smoothing Transformers for Time-series Forecasting | Link | Link | arXiv | LTSF |
| NHiTS | Neural Hierarchical Interpolation for Time Series Forecasting | Link | Link | AAAI'23 | LTSF |
| PatchTST | A Time Series is Worth 64 Words: Long-term Forecasting with Transformers | Link | Link | ICLR'23 | LTSF |
| TiDE | Long-term Forecasting with TiDE: Time-series Dense Encoder | Link | Link | TMLR'23 | LTSF |
| S4 | Efficiently Modeling Long Sequences with Structured State Spaces | Link | Link | ICLR'22 | LTSF |
| TimesNet | Temporal 2D-Variation Modeling for General Time Series Analysis | Link | Link | ICLR'23 | LTSF |
| Triformer | Triangular, Variable-Specific Attentions for Long Sequence Multivariate Time Series Forecasting | Link | Link | IJCAI'22 | LTSF |
| NSformer | Exploring the Stationarity in Time Series Forecasting | Link | Link | NeurIPS'22 | LTSF |
| FiLM | Frequency improved Legendre Memory Model for LTSF | Link | Link | NeurIPS'22 | LTSF |
| FEDformer | Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting | Link | Link | ICML'22 | LTSF |
| Pyraformer | Low complexity pyramidal Attention For Long-range Time Series Modeling and Forecasting | Link | Link | ICLR'22 | LTSF |
| HI | Historical Inertia: A Powerful Baseline for Long Sequence Time-series Forecasting | Link | None | CIKM'21 | LTSF |
| Autoformer | Decomposition Transformers with Auto-Correlation for Long-Term Series Forecasting | Link | Link | NeurIPS'21 | LTSF |
| Informer | Beyond Efficient Transformer for Long Sequence Time-Series Forecasting | Link | Link | AAAI'21 | LTSF |
| 📊Baseline | 📝Title | 📄Paper | 💻Code | 🏛Venue | 🎯Task |
|---|---|---|---|---|---|
| CatBoost | Catboost: unbiased boosting with categorical features | Link | Link | NeurIPS'18 | Machine Learning |
| LightGBM | LightGBM: A Highly Efficient Gradient Boosting Decision Tree | Link | Link | NeurIPS'17 | Machine Learning |
| NBeats | Neural basis expansion analysis for interpretable time series forecasting | Link | Link1, Link2 | ICLR'19 | Deep Time Series Forecasting |
| DeepAR | Probabilistic Forecasting with Autoregressive Recurrent Networks | Link | Link1, Link2, Link3 | Int. J. Forecast'20 | Probabilistic Time Series Forecasting |
| WaveNet | WaveNet: A Generative Model for Raw Audio. | Link | Link 1, Link 2 | arXiv | Audio |
| AR | VII. On a method of investigating periodicities disturbed series, with special reference to Wolfer's sunspot numbers | Link | Link | 1927 | Local Forecasting |
| MA | On periodicity in series of related terms | Link | Link | 1931 | Local Forecasting |
| ARMA | Some recent advances in forecasting and control | Link | Link | Applied Statistics'1968 | Local Forecasting |
| ARIMA | Forecasting with exponential smoothing: the state space approach | Link | Link | 2008 | Local Forecasting |
| SARIMA | Forecasting with exponential smoothing: the state space approach | Link | Link | 2008 | Local Forecasting |
| ARCH | Conditional heteroscedasticity in time series of stock returns: Evidence and forecasts | Link | Link | Journal of business'1989 | Local Forecasting |
| GARCH | Conditional heteroscedasticity in time series of stock returns: Evidence and forecasts | Link | Link | Journal of business'1989 | Local Forecasting |
| ETS | The holt-winters forecasting procedure | Link | Link | Applied Statistics'1978 | Local Forecasting |
| SES | The holt-winters forecasting procedure | Link | Link | Applied Statistics'1978 | Local Forecasting |
| SVR | Support vector regression machines | Link | Link | NeurIPS'1996 | Machine Learning |
| PolySVR | A training algorithm for optimal margin classifiers | Link | Link | COLT'1992 | Machine Learning |
BasicTS 支持多种类型的数据集,涵盖时空预测、长序列预测及大规模数据集。
| 🏷️Name | 🌐Domain | 📏Length | 📊Time Series Count | 🔄Graph | ⏱️Freq. (m) | 🎯Task |
|---|---|---|---|---|---|---|
| METR-LA | Traffic Speed | 34272 | 207 | True | 5 | STF |
| PEMS-BAY | Traffic Speed | 52116 | 325 | True | 5 | STF |
| PEMS03 | Traffic Flow | 26208 | 358 | True | 5 | STF |
| PEMS04 | Traffic Flow | 16992 | 307 | True | 5 | STF |
| PEMS07 | Traffic Flow | 28224 | 883 | True | 5 | STF |
| PEMS08 | Traffic Flow | 17856 | 170 | True | 5 | STF |
| 🏷️Name | 🌐Domain | 📏Length | 📊Time Series Count | 🔄Graph | ⏱️Freq. (m) | 🎯Task |
|---|---|---|---|---|---|---|
| BeijingAirQuality | Beijing Air Quality | 36000 | 7 | False | 60 | LTSF |
| ETTh1 | Electricity Transformer Temperature | 14400 | 7 | False | 60 | LTSF |
| ETTh2 | Electricity Transformer Temperature | 14400 | 7 | False | 60 | LTSF |
| ETTm1 | Electricity Transformer Temperature | 57600 | 7 | False | 15 | LTSF |
| ETTm2 | Electricity Transformer Temperature | 57600 | 7 | False | 15 | LTSF |
| Electricity | Electricity Consumption | 26304 | 321 | False | 60 | LTSF |
| ExchangeRate | Exchange Rate | 7588 | 8 | False | 1440 | LTSF |
| Illness | Ilness Data | 966 | 7 | False | 10080 | LTSF |
| Traffic | Road Occupancy Rates | 17544 | 862 | False | 60 | LTSF |
| Weather | Weather | 52696 | 21 | False | 10 | LTSF |
| 🏷️Name | 🌐Domain | 📏Length | 📊Time Series Count | 🔄Graph | ⏱️Freq. (m) | 🎯Task |
|---|---|---|---|---|---|---|
| CA | Traffic Flow | 35040 | 8600 | True | 15 | Large Scale |
| GBA | Traffic Flow | 35040 | 2352 | True | 15 | Large Scale |
| GLA | Traffic Flow | 35040 | 3834 | True | 15 | Large Scale |
| SD | Traffic Flow | 35040 | 716 | True | 15 | Large Scale |
| 🏷️Name | 🌐Domain | 📏Length | 📊Time Series Count | 🔄Graph | ⏱️Freq. | 🎯Task |
|---|---|---|---|---|---|---|
| BLAST | Multiple | 4096 | 20000000 | False | Multiple | UFM |
请参阅论文 多变量时间序列预测进展探索:全面基准评测和异质性分析。
感谢这些优秀的贡献者们 (表情符号指南):
S22 🚧 💻 🐛 |
finleywang 🧑🏫 |
blisky-li 💻 |
LMissher 💻 🐛 |
CNStark 🚇 |
Azusa 🐛 |
Yannick Wölker 🐛 |
hlhang9527 🐛 |
Chengqing Yu 💻 |
Reborn14 📖 💻 |
TensorPulse 🐛 |
superarthurlx 💻 🐛 |
Yisong Fu 💻 |
Xubin 📖 |
DU YIFAN 💻 |
此项目遵循 all-contributors 规范。欢迎任何形式的贡献!
BasicTS 是基于 EasyTorch 开发的,这是一个易于使用且功能强大的开源神经网络训练框架。
欢迎加入我们的官方社区,在这里您可以获取更多技术支持,与志同道合的伙伴交流,共同探讨领域内的最新研究进展。
官方微信群:
官方Discord频道: 点击加入我们的 Discord 社区


