# Time-LLM: Time Series Forecasting by Reprogramming Large Language Models

**Authors:** Ming Jin, Shiyu Wang, Lintao Ma, Zhixuan Chu, James Y. Zhang, Xiaoming Shi, Pin-Yu Chen, Yuxuan Liang, Yuan-Fang Li, Shirui Pan, Qingsong Wen  
**arXiv:** [2310.01728](https://arxiv.org/abs/2310.01728)  
**Date:** 2023-10-03  
**Summary page:** https://www.summarizepaper.com/en/paper/2310.01728v2/

## Key points

- Time series forecasting models are often specialized and require distinct designs for different applications
- Large language models (LLMs) possess strong pattern recognition and reasoning abilities over complex sequences of tokens
- Time-LLM is a reprogramming framework that repurposes LLMs for general time series forecasting by aligning time series data with natural language using text prototypes
- Prompt-as-Prefix (PaP) enriches the input context to guide the transformation of reprogrammed input patches, enhancing the LLM's ability to reason with time series data
- Time-LLM surpasses state-of-the-art specialized forecasting models in both few-shot and zero-shot learning scenarios, showing versatility and effectiveness across different tasks
- In long-term forecasting evaluations on various datasets, Time-LLM outperforms baselines like GPT4TS, PatchTST, and DLinear
- In short-term forecasting assessments using the M4 benchmark dataset, Time-LLM demonstrates superior performance compared to other models

## Summary

, , , , 

Time series forecasting is a crucial aspect of many dynamic systems and has been extensively researched. Unlike natural language processing (NLP) and computer vision (CV), where a single large model can handle multiple tasks, time series forecasting models are often specialized and require distinct designs for different applications. While pre-trained foundation models have made significant progress in NLP and CV, their development in time series domains has been hindered by data scarcity. Recent studies have shown that large language models (LLMs) possess strong pattern recognition and reasoning abilities over complex sequences of tokens. However, the challenge lies in effectively aligning the modalities of time series data and natural language to leverage these capabilities. In response to this challenge, Time-LLM is introduced as a reprogramming framework that repurposes LLMs for general time series forecasting while keeping the backbone language models intact. The approach involves reprogramming the input time series with text prototypes before feeding it into the frozen LLM to align the two modalities. To enhance the LLM's ability to reason with time series data, Prompt-as-Prefix (PaP) is proposed to enrich the input context and guide the transformation of reprogrammed input patches. The transformed time series patches from the LLM are then projected to generate forecasts. Comprehensive evaluations demonstrate that Time-LLM is a powerful time series learner that surpasses state-of-the-art specialized forecasting models. It excels in both few-shot and zero-shot learning scenarios, showcasing its versatility and effectiveness across different forecasting tasks. In long-term forecasting evaluations on datasets such as ETTh1, ETTh2, ETTm1, ETTm2, Weather, Electricity (ECL), Traffic, and ILI, Time-LLM outperforms all baselines in most cases significantly. Compared to recent works like GPT4TS and PatchTST, Time-LLM shows average performance gains of 12% and 20%, respectively. Additionally, when compared with DLinear, Time-LLM achieves an average MSE reduction of 1.4%. In short-term forecasting assessments using the M4 benchmark dataset containing marketing data at various sampling frequencies, Time-LLM demonstrates superior performance compared to other models like FEDformer Autoformer Stationary ETSformer LightTS Informer Reformer. Overall, Time-LLM presents a novel approach to leveraging LLMs for time series forecasting tasks effectively where specialized pre-trained models may not be readily available or suitable for diverse datasets.
