Using Pre-trained LLMs for Multivariate Time Series Forecasting

Malcolm Wolff, Shenghao Yang, Kari Torkkola, Michael W. MahoneyarXiv 2025

Abstract

Pre-trained Large Language Models (LLMs) encapsulate large amounts of knowledge and take enormous amounts of compute to train. We make use of this resource, together with the observation that LLMs are able to transfer knowledge and performance from one domain or even modality to another seemingly-unrelated area, to help with multivariate demand time series forecasting. Attention in transformer-based methods requires something worth attending to -- more than just samples of a time-series. We explore different methods to map multivariate input time series into the LLM token embedding space. In particular, our novel multivariate patching strategy to embed time series features into decoder-only pre-trained Transformers produces results competitive with state-of-the-art time series forecasting models. We also use recently-developed weight-based diagnostics to validate our findings.

Introduction

Can a model trained to predict the next word in a sentence also predict the next dip or spike in a retail supply chain? Recent research from Amazon and the University of Waterloo suggests a resounding "yes." While Large Language Models (LLMs) have demonstrated emergent behaviors across various domains, their application to multivariate time series forecasting remains a significant challenge. Most existing work focuses on univariate forecasting, but real-world operations—such as managing inventory for millions of products—require accounting for complex relationships between past sales, pricing, promotions, and static metadata.

Methodology

The proposed framework treats the pre-trained LLM as a "frozen" reasoning engine, mapping diverse numerical and categorical inputs into a space the model can interpret. The architecture consists of three primary components:

  1. Multivariate Patching (The Encoder): Rather than feeding raw data points, the system groups time segments into "patches." Historical data and static covariates are concatenated prior to patching, allowing the model to capture inter-variable relationships within each temporal window.
  2. The LLM Backbone (The Decoder): The researchers evaluated several open-source models, including GPT-2, Flan-T5, and the 7-billion parameter MPT-7B. To maintain efficiency, the majority of the LLM weights remain frozen.
  3. Targeted Fine-Tuning and Adapters: Instead of full retraining, only the layer norms are fine-tuned. Additionally, a small Multi-Layer Perceptron (MLP) adapter is used to map the LLM's output back to a forecast, which helps smooth the weight distribution and improve accuracy.
High-level architecture of the proposed forecasting framework.

Experimental Setup

The study utilized a massive proprietary dataset from a large internet retailer, comprising three years of historical demand data for hundreds of millions of products. The features included historic time series ($X_t$), static covariates ($X_s$), and future-known features ($X_f$) like upcoming holiday promotions. Models were evaluated over a 52-week test period following the training window.

Key Results

The experimental results demonstrate that LLMs, despite being trained on text, possess internal structures highly effective at capturing temporal correlations. The MPT-7B model, utilizing multivariate patching and an MLP adapter, significantly outperformed the production-grade MQCNN baseline.

Performance comparison across different architectures and training permutations.

As shown in the results table, the MPT-7B MLP configuration achieved a P50 weighted error of 0.994, outperforming the MQCNN baseline (0.996). Notably, this performance was achieved by training only a small fraction of the total parameters—approximately 196 million out of 6.8 billion for the MPT-7B model. The researchers also found that newer, instruction-tuned models like Flan-T5 and MPT-7B were more effective at transferring knowledge to the forecasting domain than older models like GPT-2.

Conclusion

This research proves that pre-trained LLMs can be repurposed for complex multivariate forecasting with high efficiency and accuracy. By using multivariate patching and targeted fine-tuning of layer norms, these models can outperform specialized, state-of-the-art forecasting systems. Future work will explore the potential for "zero-shot" forecasting, where LLMs might predict demand for entirely new product categories without prior training data.

Summary updated

BibTeX
@misc{wolff2025using,
  author = {Malcolm Wolff and Shenghao Yang and Kari Torkkola and Michael W. Mahoney},
  title = {{Using Pre-trained LLMs for Multivariate Time Series Forecasting}},
  year = {2025},
  eprint = {2501.06386},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.06386},
}
Figure