Moirai-MoE: Empowering Time Series Foundation Models with Sparse Mixture of Experts
作者: Xu Liu, Juncheng Liu, Gerald Woo, Taha Aksu, Yuxuan Liang, Roger Zimmermann, Chenghao Liu, Silvio Savarese, Caiming Xiong, Doyen Sahoo
分类: cs.LG, stat.ML
发布日期: 2024-10-14
💡 一句话要点
提出Moirai-MoE,利用稀疏专家混合模型增强时间序列基础模型,实现token级别自动特化。
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 时间序列预测 基础模型 稀疏专家混合 Transformer 零样本学习
📋 核心要点
- 现有时间序列基础模型依赖人为定义的频率进行模型特化,无法有效捕捉时间序列的复杂模式和非平稳性。
- Moirai-MoE利用Transformer中的稀疏专家混合(MoE)机制,实现token级别的自动特化,无需人为设定规则。
- 在39个数据集上的实验表明,Moirai-MoE在同分布和零样本预测任务中均优于现有模型,性能显著提升。
📝 摘要(中文)
时间序列基础模型已展示出令人印象深刻的零样本预测能力。然而,在时间序列上实现有效的统一训练仍然是一个开放的挑战。现有方法引入一定程度的模型特化,以适应时间序列数据的高度异构性。例如,Moirai通过采用多个输入/输出投影层进行统一训练,每个投影层都针对处理特定频率的时间序列。类似地,TimesFM维护一个频率嵌入字典。我们发现这种人为施加的频率级别模型特化存在两个主要缺点:(1)频率不是时间序列中潜在模式的可靠指标。(2)非平稳性是真实世界时间序列的固有属性,即使在单个时间序列的短上下文窗口内也会导致不同的分布。为了解决这些限制,本文提出了Moirai-MoE,它使用单个输入/输出投影层,同时将不同时间序列模式的建模委托给Transformer中的稀疏专家混合(MoE)。通过这些设计,Moirai-MoE减少了对人为定义的启发式的依赖,并实现了自动token级别特化。在39个数据集上的大量实验表明,Moirai-MoE在同分布和零样本场景中均优于现有的基础模型。此外,本研究进行了全面的模型分析,以探索时间序列MoE基础模型的内部工作原理,并为未来的研究提供了宝贵的见解。
🔬 方法详解
问题定义:现有时间序列基础模型为了处理不同频率的时间序列,通常采用人为设定的频率级别特化,例如使用多个输入/输出投影层或频率嵌入字典。这种方法的痛点在于,频率并非时间序列模式的可靠指标,且无法有效捕捉时间序列的非平稳性,导致模型泛化能力受限。
核心思路:Moirai-MoE的核心思路是利用Transformer中的稀疏专家混合(MoE)机制,将不同时间序列模式的建模委托给MoE,从而实现token级别的自动特化。通过这种方式,模型可以自动学习并适应不同时间序列的特征,而无需人为设定规则。
技术框架:Moirai-MoE的整体架构基于Transformer,主要包含以下模块:单个输入/输出投影层、Transformer编码器和稀疏专家混合(MoE)层。输入时间序列首先通过单个投影层进行嵌入,然后输入到Transformer编码器中。在Transformer编码器的某些层中,使用MoE层代替传统的全连接层,以实现token级别的特化。
关键创新:Moirai-MoE最重要的技术创新点在于使用稀疏专家混合(MoE)机制来实现时间序列的自动特化。与现有方法相比,Moirai-MoE无需人为设定频率级别的特化规则,而是通过MoE自动学习并适应不同时间序列的特征。这种方法更加灵活和有效,能够更好地捕捉时间序列的复杂模式和非平稳性。
关键设计:Moirai-MoE的关键设计包括:使用单个输入/输出投影层以减少人为干预;在Transformer编码器的某些层中使用MoE层,MoE层的具体配置(例如专家数量、路由算法等)需要根据具体任务进行调整;损失函数通常采用标准的预测损失,例如均方误差(MSE)或平均绝对误差(MAE)。
🖼️ 关键图片
📊 实验亮点
在39个数据集上的实验结果表明,Moirai-MoE在同分布和零样本场景中均优于现有的时间序列基础模型。例如,在某些数据集上,Moirai-MoE的预测精度比现有模型提高了10%以上。此外,模型分析表明,Moirai-MoE能够有效学习并适应不同时间序列的特征,从而实现更好的预测性能。
🎯 应用场景
Moirai-MoE可应用于各种时间序列预测任务,例如金融市场预测、能源消耗预测、交通流量预测、医疗健康监测等。该研究的实际价值在于提供了一种更有效、更灵活的时间序列基础模型训练方法,能够提高预测精度和泛化能力。未来,Moirai-MoE有望成为时间序列分析领域的重要工具。
📄 摘要(原文)
Time series foundation models have demonstrated impressive performance as zero-shot forecasters. However, achieving effectively unified training on time series remains an open challenge. Existing approaches introduce some level of model specialization to account for the highly heterogeneous nature of time series data. For instance, Moirai pursues unified training by employing multiple input/output projection layers, each tailored to handle time series at a specific frequency. Similarly, TimesFM maintains a frequency embedding dictionary for this purpose. We identify two major drawbacks to this human-imposed frequency-level model specialization: (1) Frequency is not a reliable indicator of the underlying patterns in time series. For example, time series with different frequencies can display similar patterns, while those with the same frequency may exhibit varied patterns. (2) Non-stationarity is an inherent property of real-world time series, leading to varied distributions even within a short context window of a single time series. Frequency-level specialization is too coarse-grained to capture this level of diversity. To address these limitations, this paper introduces Moirai-MoE, using a single input/output projection layer while delegating the modeling of diverse time series patterns to the sparse mixture of experts (MoE) within Transformers. With these designs, Moirai-MoE reduces reliance on human-defined heuristics and enables automatic token-level specialization. Extensive experiments on 39 datasets demonstrate the superiority of Moirai-MoE over existing foundation models in both in-distribution and zero-shot scenarios. Furthermore, this study conducts comprehensive model analyses to explore the inner workings of time series MoE foundation models and provides valuable insights for future research.