Skip to main content
QUICK REVIEW

[论文解读] Time Series Forecasting with LLMs: Understanding and Enhancing Model Capabilities

Hua Tang, Chong Zhang|arXiv (Cornell University)|Feb 16, 2024
Time Series Analysis and ForecastingComputer Science被引用 3
一句话总结

本文研究了大语言模型(LLMs)在时间序列预测中的应用,揭示了其对具有强趋势或季节性特征数据的偏好。通过设计提示以激发周期性检测能力,并结合自然语言改写与外部知识注入,作者提升了LLM在结构化时间序列上的性能,同时识别出其在多周期场景下的局限性。

ABSTRACT

Large language models (LLMs) have been applied in many fields and have developed rapidly in recent years. As a classic machine learning task, time series forecasting has recently been boosted by LLMs. Recent works treat large language models as \emph{zero-shot} time series reasoners without further fine-tuning, which achieves remarkable performance. However, there are some unexplored research problems when applying LLMs for time series forecasting under the zero-shot setting. For instance, the LLMs' preferences for the input time series are less understood. In this paper, by comparing LLMs with traditional time series forecasting models, we observe many interesting properties of LLMs in the context of time series forecasting. First, our study shows that LLMs perform well in predicting time series with clear patterns and trends, but face challenges with datasets lacking periodicity. This observation can be explained by the ability of LLMs to recognize the underlying period within datasets, which is supported by our experiments. In addition, the input strategy is investigated, and it is found that incorporating external knowledge and adopting natural language paraphrases substantially improve the predictive performance of LLMs for time series. Overall, our study contributes insight into LLMs' advantages and limitations in time series forecasting under different conditions.

研究动机与目标

  • 理解LLM在时间序列预测中的偏好,特别是对趋势和季节性强度的偏好。
  • 探究输入序列结构与提示设计对LLM预测性能的影响。
  • 评估将数值序列转化为自然语言对模型性能的影响,以及外部知识注入的作用。
  • 识别LLM在处理多周期时间序列时的局限性。
  • 提供通过提示工程与数据重格式化提升LLM预测性能的可操作技术。

提出的方法

  • 将数值时间序列转换为使用空格分隔数字、逗号分隔符的字符串序列,以匹配LLM的分词方式。
  • 设计零样本提示,明确要求LLM识别时间序列的周期,以分析其周期性检测能力。
  • 通过向输入序列添加高斯噪声生成反事实数据集,以测试模型对输入片段与预测目标接近程度的敏感性。
  • 应用自然语言改写,将数值序列重构为描述性文本(例如:'乘客数量稳步增长'),以提升模型理解能力。
  • 在提示中引入外部知识,如特定领域的季节性模式或趋势背景信息。
  • 使用固定预训练的LLM(如GPT-3.5-Turbo、GPT-4-Turbo、Llama-2)进行评估,不进行微调,以检验零样本泛化能力。

实验结果

研究问题

  • RQ1LLM在具有不同趋势强度和季节性强度的时间序列上表现如何?
  • RQ2输入序列中紧邻预测窗口的片段在LLM预测性能中起什么作用?
  • RQ3当被要求识别周期时,LLM能否准确检测时间序列的周期性?
  • RQ4将数值序列转换为自然语言对预测准确率有何影响?
  • RQ5在时间序列预测中,引入外部知识在多大程度上能提升LLM性能?

主要发现

  • LLM在具有高趋势或季节性强度的时间序列上表现出优越性能,尤其当周期性特征明显时。
  • LLM对预测窗口前最近的输入片段高度敏感,表明其对局部模式存在强依赖性。
  • 当被提示识别周期时,LLM能够准确判断数据集的周期性,这解释了其在周期性数据上的优异表现。
  • 对数值序列进行自然语言改写可显著提升预测性能,例如在AirPassengers等数据集上将MSE降低高达80%。
  • 在提示中引入外部知识可增强模型对时间结构的理解,尤其在复杂或不明显的模式中表现更优。
  • LLM在处理多周期时间序列时表现吃力,表明其在识别和建模多个重叠的周期性成分方面存在局限性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。