用大模型实现时间序列预测,发现特定模型表现最佳。
In-Context and Few-Shots Learning for Forecasting Time Series Data based on Large Language Models
- 通过上下文学习和少量样本训练大模型进行时间序列预测。
- 谷歌的TimesFM模型误差最低(RMSE 0.3023),推理速度仅266秒。
- 零样本下OpenAI o4-mini也表现良好,适合快速部署场景。
现有基于数据的时间序列建模方法包括ARIMA、Transformer、LSTM和TCN等。特别是深度学习模型如LSTM与TCN,在时间序列预测中已取得显著成效。随着预训练基础模型(如大型语言模型LLMs)的发展,尤其是Google推出的时序专用基础模型TimesFM,值得探究这些模型是否能超越传统方法。本文研究了基于LLM的时间序列预测性能,重点考察了针对特定应用领域的上下文学习、零样本与少样本学习策略。实验对比了OpenAI的o4-mini、Gemini 2.5 Flash Lite、Google的TimesFM,以及TCN和LSTM两种深度学习模型。结果表明,TimesFM在整体性能上最优,RMSE为0.3023,且推理时间仅为266秒;OpenAI的o4-mini在零样本条件下也展现出良好性能。研究证实,预训练时序基础模型是实时预测的有前景方向,可在极少模型适配下实现高精度与可扩展性部署。
原文摘要 · Abstract (English)
Existing data-driven approaches in modeling and predicting time series data include ARIMA (Autoregressive Integrated Moving Average), Transformer-based models, LSTM (Long Short-Term Memory) and TCN (Temporal Convolutional Network). These approaches, and in particular deep learning-based models such as LSTM and TCN, have shown great results in predicting time series data. With the advancement of leveraging pre-trained foundation models such as Large Language Models (LLMs) and more notably Google's recent foundation model for time series data, {\it TimesFM} (Time Series Foundation Model), it is of interest to investigate whether these foundation models have the capability of outperforming existing modeling approaches in analyzing and predicting time series data. This paper investigates the performance of using LLM models for time series data prediction. We investigate the in-context learning methodology in the training of LLM models that are specific to the underlying application domain. More specifically, the paper explores training LLMs through in-context, zero-shot and few-shot learning and forecasting time series data with OpenAI {\tt o4-mini} and Gemini 2.5 Flash Lite, as well as the recent Google's Transformer-based TimesFM, a time series-specific foundation model, along with two deep learning models, namely TCN and LSTM networks. The findings indicate that TimesFM has the best overall performance with the lowest RMSE value (0.3023) and the competitive inference time (266 seconds). Furthermore, OpenAI's o4-mini also exhibits a good performance based on Zero Shot learning. These findings highlight pre-trained time series foundation models as a promising direction for real-time forecasting, enabling accurate and scalable deployment with minimal model adaptation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。