3 个月前

TSMixer:面向多变量时间序列预测的轻量级MLP-Mixer模型

TSMixer:面向多变量时间序列预测的轻量级MLP-Mixer模型

摘要

Transformer模型因其能够捕捉长序列依赖关系而在时间序列预测中广受欢迎。然而,其高昂的内存与计算需求成为长期预测任务中的关键瓶颈。为解决这一问题,我们提出TSMixer——一种轻量级神经架构,完全由多层感知机(MLP)模块构成,专用于分块时间序列上的多变量预测与表征学习。受MLP-Mixer在计算机视觉领域成功应用的启发,我们将该架构迁移至时间序列场景,克服了相关挑战,并引入经过验证的组件以提升预测精度。其中,我们提出一种创新的设计范式:在MLP-Mixer主干网络上附加在线校正头(online reconciliation heads),以显式建模时间序列的层级结构与通道相关性等关键特性。此外,我们还提出一种新型混合通道建模机制,并引入简单的门控策略,有效处理噪声通道交互问题,并增强模型在多样化数据集间的泛化能力。通过整合这些轻量化组件,TSMixer显著提升了简单MLP结构的学习能力,在计算资源消耗极低的前提下,性能超越了复杂的Transformer模型。同时,TSMixer采用模块化设计,兼容监督学习与掩码自监督学习方法,展现出作为时间序列基础模型(Time-Series Foundation Models)核心构建单元的巨大潜力。实验结果表明,TSMixer在预测任务中相较于当前最优的MLP与Transformer模型,性能提升达8%至60%;在与最新Patch-Transformer基准模型对比时,仍能实现1%至2%的性能超越,同时在内存占用与运行时间上降低2至3倍。我们已将该模型的源代码正式发布于Hugging Face,项目名称为PatchTSMixer。模型页面:https://huggingface.co/docs/transformers/main/en/model_doc/patchtsmixer示例代码:https://github.com/ibm/tsfm/#notebooks-links

代码仓库

ibm/tsfm
官方
pytorch

基准测试

基准方法指标
multivariate-time-series-forecasting-on-etth1TSMixer
MAE: 0.398
MSE: 0.368
multivariate-time-series-forecasting-on-etth1-1TSMixer
MAE: 0.418
MSE: 0.399
multivariate-time-series-forecasting-on-etth1-2TSMixer
MSE: 0.421
multivariate-time-series-forecasting-on-etth1-3TSMixer
MSE: 0.444
time-series-forecasting-on-electricity-336TSMixer
MSE: 0.158
time-series-forecasting-on-electricity-96TSMixer
MSE: 0.129
time-series-forecasting-on-etth1-192-1TSMixer
MAE: 0.418
MSE: 0.399
time-series-forecasting-on-etth1-336-1TSMixer
MAE: 0.436
MSE: 0.421
time-series-forecasting-on-etth1-720-1TSMixer
MAE: 0.467
MSE: 0.444
time-series-forecasting-on-etth1-96-1TSMixer
MAE: 0.398
MSE: 0.368
time-series-forecasting-on-etth1-96-4TSMixer
MAE: 0.398
MSE: 0.368
time-series-forecasting-on-etth2-192-1TSMixer
MAE: 0.374
MSE: 0.33
time-series-forecasting-on-etth2-336-1TSMixer
MAE: 0.401
MSE: 0.357
time-series-forecasting-on-etth2-720-1TSMixer
MAE: 0.436
MSE: 0.395
time-series-forecasting-on-etth2-96-1TSMixer
MAE: 0.337
MSE: 0.276
time-series-forecasting-on-ettm1-192-1TSMixer
MAE: 0.369
MSE: 0.333
time-series-forecasting-on-ettm1-336-1TSMixer
MAE: 0.385
MSE: 0.365
time-series-forecasting-on-ettm1-720-1TSMixer
MAE: 0.413
MSE: 0.416
time-series-forecasting-on-ettm1-96-1TSMixer
MAE: 0.346
MSE: 0.291
time-series-forecasting-on-ettm2-192-1TSMixer
MAE: 0.293
MSE: 0.219
time-series-forecasting-on-ettm2-336-1TSMixer
MAE: 0.329
MSE: 0.273
time-series-forecasting-on-ettm2-720-1TSMixer
MAE: 0.38
MSE: 0.358
time-series-forecasting-on-ettm2-96-1TSMixer
MAE: 0.255
MSE: 0.164
time-series-forecasting-on-traffic-192TSMixer
MSE: 0.377
time-series-forecasting-on-traffic-336TSMixer
MSE: 0.385
time-series-forecasting-on-traffic-720TSMixer
MSE: 0.424
time-series-forecasting-on-traffic-96TSMixer
MSE: 0.356
time-series-forecasting-on-weather-192TSMixer
MAE: 0.240
MSE: 0.191
time-series-forecasting-on-weather-336TSMixer
MAE: 0.279
MSE: 0.243
time-series-forecasting-on-weather-720TSMixer
MAE: 0.333
MSE: 0.316
time-series-forecasting-on-weather-96TSMixer
MAE: 0.197
MSE: 0.146

用 AI 构建 AI

从想法到上线——通过免费 AI 协同编程、开箱即用的环境和市场最优价格的 GPU 加速您的 AI 开发

AI 协同编程
即用型 GPU
最优价格
立即开始

Hyper Newsletters

订阅我们的最新资讯
我们会在北京时间 每周一的上午九点 向您的邮箱投递本周内的最新更新
邮件发送服务由 MailChimp 提供
TSMixer:面向多变量时间序列预测的轻量级MLP-Mixer模型 | 论文 | HyperAI超神经