arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.07903cs.LGcs.AI
收藏

通过向量注入上下文学习增强大型语言模型用于时间序列预测

Enhancing Large Language Models for Time-Series Forecasting via Vector-Injected In-Context Learning

Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);University of the Chinese Academy of Sciences(中国科学院大学)

Jianqi Zhang, Jingyao Wang, Wenwen Qiang, Fanjiang Xu, Changwen Zheng

AI总结:

本文提出LVICL方法,通过向量注入上下文学习提升LLM在时间序列预测中的性能,无需微调参数以减少计算开销。

摘要:

全球互联网需要可靠的预测能力来应对用户行为和使用模式的变化。时间序列预测(TSF)是实现这一目标的关键方法。近年来,用于时间序列预测的大型语言模型(LLMs)(LLM4TSF)已取得良好性能。然而,预训练语料库和时间序列数据之间存在显著差异,直接将LLMs应用于TSF时难以保证预测质量;微调LLMs可以缓解这一问题,但通常会带来显著的计算开销。因此,LLM4TSF面临预测性能和计算开销的双重挑战。为了解决这一问题,我们旨在探索一种方法,以提高LLM4TSF的预测性能,同时冻结所有LLM参数以减少计算开销。受上下文学习(ICL)的启发,我们提出了LVICL。LVICL使用我们提出的向量注入ICL,将示例信息注入到冻结的LLM中,激发其上下文学习能力,从而增强其在相关示例任务(即TSF)上的性能。具体而言,我们首先使用LLM与可学习的上下文向量适配器从多个示例中自适应地提取一个上下文向量。该向量包含压缩的、与示例相关的信息。随后,在前向传递过程中,我们将此向量注入到LLM的每一层中,以提高预测性能。与传统ICL相比,我们的向量注入ICL不增加提示长度;此外,从示例中自适应地推导上下文向量会抑制对预测有害的成分,从而提高模型性能。广泛的实验验证了我们方法的有效性。

英文摘要:

The World Wide Web needs reliable predictive capabilities to respond to changes in user behavior and usage patterns. Time series forecasting (TSF) is a key means to achieve this goal. In recent years, the large language models (LLMs) for TSF (LLM4TSF) have achieved good performance. However, there is a significant difference between pretraining corpora and time series data, making it hard to guarantee forecasting quality when directly applying LLMs to TSF; fine-tuning LLMs can mitigate this issue, but often incurs substantial computational overhead. Thus, LLM4TSF faces a dual challenge of prediction performance and compute overhead. To address this, we aim to explore a method for improving the forecasting performance of LLM4TSF while freezing all LLM parameters to reduce computational overhead. Inspired by in-context learning (ICL), we propose LVICL. LVICL uses our vector-injected ICL to inject example information into a frozen LLM, eliciting its in-context learning ability and thereby enhancing its performance on the example-related task (i.e., TSF). Specifically, we first use the LLM together with a learnable context vector adapter to extract a context vector from multiple examples adaptively. This vector contains compressed, example-related information. Subsequently, during the forward pass, we inject this vector into every layer of the LLM to improve forecasting performance. Compared with conventional ICL that adds examples into the prompt, our vector-injected ICL does not increase prompt length; moreover, adaptively deriving a context vector from examples suppresses components harmful to forecasting, thereby improving model performance. Extensive experiments demonstrate the effectiveness of our approach.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑