Table of Contents
Fetching ...

Understanding the Role of Textual Prompts in LLM for Time Series Forecasting: an Adapter View

Peisong Niu, Tian Zhou, Xue Wang, Liang Sun, Rong Jin

TL;DR

This study aims to understand how and why the integration of textual prompts into LLM can effectively improve the prediction accuracy of time series, which is not obvious at the glance, given the significant domain gap between texts and time series.

Abstract

In the burgeoning domain of Large Language Models (LLMs), there is a growing interest in applying LLM to time series forecasting, with multiple studies focused on leveraging textual prompts to further enhance the predictive prowess. This study aims to understand how and why the integration of textual prompts into LLM can effectively improve the prediction accuracy of time series, which is not obvious at the glance, given the significant domain gap between texts and time series. Our extensive examination leads us to believe that (a) adding text prompts is roughly equivalent to introducing additional adapters, and (b) It is the introduction of learnable parameters rather than textual information that aligns the LLM with the time series forecasting task, ultimately enhancing prediction accuracy. Inspired by this discovery, we developed four adapters that explicitly address the gap between LLM and time series, and further improve the prediction accuracy. Overall,our work highlights how textual prompts enhance LLM accuracy in time series forecasting and suggests new avenues for continually improving LLM-based time series analysis.

Understanding the Role of Textual Prompts in LLM for Time Series Forecasting: an Adapter View

TL;DR

This study aims to understand how and why the integration of textual prompts into LLM can effectively improve the prediction accuracy of time series, which is not obvious at the glance, given the significant domain gap between texts and time series.

Abstract

In the burgeoning domain of Large Language Models (LLMs), there is a growing interest in applying LLM to time series forecasting, with multiple studies focused on leveraging textual prompts to further enhance the predictive prowess. This study aims to understand how and why the integration of textual prompts into LLM can effectively improve the prediction accuracy of time series, which is not obvious at the glance, given the significant domain gap between texts and time series. Our extensive examination leads us to believe that (a) adding text prompts is roughly equivalent to introducing additional adapters, and (b) It is the introduction of learnable parameters rather than textual information that aligns the LLM with the time series forecasting task, ultimately enhancing prediction accuracy. Inspired by this discovery, we developed four adapters that explicitly address the gap between LLM and time series, and further improve the prediction accuracy. Overall,our work highlights how textual prompts enhance LLM accuracy in time series forecasting and suggests new avenues for continually improving LLM-based time series analysis.
Paper Structure (27 sections, 4 equations, 5 figures, 21 tables)

This paper contains 27 sections, 4 equations, 5 figures, 21 tables.

Figures (5)

  • Figure 1: Illustration of random text test and random text embedding test.
  • Figure 2: Model architecture: The self-attention and feedforward layers in the transformer blocks, along with the positional embeddings, are fixed. Designed adapters are integrated into each transformer block of the pre-trained model and fine-tuned during the training process.
  • Figure 3: Structures of various adapters.
  • Figure 4: Select gate with various scaling factors.
  • Figure 5: Attention and gaussian kernel anomaly adaptor for normal and abnormal points.