[论文解读] TimeCMA: Towards LLM-Empowered Multivariate Time Series Forecasting via Cross-Modality Alignment
TimeCMA 提出了一种跨模态对齐框架,通过利用一个冻结的大型语言模型(LLM),将高质量、纯净的时间序列嵌入与纠缠的基于提示的嵌入分离,从而提升多变量时间序列预测的性能。通过采用双分支编码结构并仅存储最后一个标记的嵌入,TimeCMA 在降低推理成本的同时实现了最先进(SOTA)的预测精度,在效率和预测性能上均优于现有的基于 LLM 的方法。
Multivariate time series forecasting (MTSF) aims to learn temporal dynamics among variables to forecast future time series. Existing statistical and deep learning-based methods suffer from limited learnable parameters and small-scale training data. Recently, large language models (LLMs) combining time series with textual prompts have achieved promising performance in MTSF. However, we discovered that current LLM-based solutions fall short in learning disentangled embeddings. We introduce TimeCMA, an intuitive yet effective framework for MTSF via cross-modality alignment. Specifically, we present a dual-modality encoding with two branches: the time series encoding branch extracts disentangled yet weak time series embeddings, and the LLM-empowered encoding branch wraps the same time series with text as prompts to obtain entangled yet robust prompt embeddings. As a result, such a cross-modality alignment retrieves both disentangled and robust time series embeddings, "the best of two worlds", from the prompt embeddings based on time series and prompt modality similarities. As another key design, to reduce the computational costs from time series with their length textual prompts, we design an effective prompt to encourage the most essential temporal information to be encapsulated in the last token: only the last token is passed to downstream prediction. We further store the last token embeddings to accelerate inference speed. Extensive experiments on eight real datasets demonstrate that TimeCMA outperforms state-of-the-arts.
研究动机与目标
- 为解决现有基于 LLM 的多变量时间序列预测方法存在的局限性,这些方法因数据纠缠而难以捕捉变量间的依赖关系。
- 克服由于预训练数据有限和领域偏移导致的时间序列模型中时间序列嵌入质量不佳的问题。
- 通过利用精心设计的提示中最后一个标记的嵌入,降低 LLM 增强预测中的计算成本。
- 通过将纯净的时间序列表征与高质量的 LLM 增强嵌入对齐,实现多变量依赖关系的联合建模。
- 通过一种新颖的跨模态对齐机制,在预测准确率与推理效率之间实现平衡。
提出的方法
- 设计了一个双模态编码模块,包含两个分支:一个用于通过反向 Transformer 提取原始、低质量的时间序列嵌入,另一个用于利用冻结的预训练 LLM 生成高质量、纠缠的提示嵌入。
- 通过基于注意力的检索与特征精炼,跨模态对齐模块从纠缠的提示嵌入中检索出纯净、高质量的时间序列嵌入。
- 预测头利用对齐后的嵌入预测未来的时间序列值,同时通过多头注意力机制建模变量间的相互依赖关系。
- 通过提示设计策略,确保 LLM 输入的最后一个标记包含所有关键的时间信息,从而仅需存储该标记的嵌入即可实现高效推理。
- 时间序列编码器采用 Pre-LN Transformer 并结合相对位置编码,以保留局部时间动态;而 LLM 分支则作为通用的全局依赖学习器。
- 该框架采用投影头将对齐后的嵌入映射为预测的时间序列输出,通过 T-SNE 和注意力可视化进行验证。
实验结果
研究问题
- RQ1跨模态对齐能否有效从纠缠的 LLM 生成嵌入中提取出纯净的时间序列表征?
- RQ2所提出的提示设计策略(聚焦于最后一个标记)对推理效率和预测准确率有何影响?
- RQ3与标准的基于 LLM 的模型或仅时间序列模型相比,集成冻结 LLM 在多变量时间序列预测中的提升程度如何?
- RQ4与现有基于提示的方法中的一元处理相比,该对齐机制是否增强了模型捕捉变量间依赖关系的能力?
- RQ5时间序列编码器与 LLM 编码器中的注意力模式有何差异?这对局部与全局依赖建模意味着什么?
主要发现
- TimeCMA 在多个多变量时间序列预测(MTSF)基准上实现了最先进性能,其预测准确率优于基于时间序列和基于提示的 LLM 方法。
- 提示的最后一个标记在 LLM 中获得最高注意力,尤其聚焦于数值本身,证实其作为高效推理中高信息载体的角色。
- 跨模态对齐模块成功地将来自不同模态的相似数据点在嵌入空间中拉近,提升了聚类效果与表征质量。
- 时间序列编码器在变量间学习到局部注意力模式,而 LLM 编码器则捕捉更广泛的全局依赖,展现出互补优势。
- TimeCMA 通过仅存储最后一个标记的嵌入,显著降低了计算成本,在 ILI 和 FRED-MD 数据集上实现了比 OFA 更快的推理速度,尽管其使用了更深的 12 层 GPT-2 模型。
- T-SNE 可视化显示,对齐后的嵌入形成更紧密、更清晰的聚类,且不同数据集的预测嵌入也明显分离,表明其具备高质量的表征学习能力。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。