Forecasting Time Series with LLMs via Patch-Based Prompting and Decomposition

Mayank Bumb, Anshul Vemulapalli, Sri Harsha Vardhan Prasad Jella, Anish Gupta, An La, Ryan A. Rossi, Hongjie Chen, Franck Dernoncourt, Nesreen K. Ahmed, Yu WangarXiv 2025 · DOI

Introduction

Large Language Models (LLMs) have demonstrated remarkable pattern recognition capabilities across various data modalities. However, their application to time-series forecasting (TSF) has traditionally faced a trade-off between computationally expensive fine-tuning and suboptimal zero-shot performance. Fine-tuning approaches, such as S²IP-LLM, require aligning time-series embeddings with the LLM’s semantic space, while direct zero-shot prompting often fails to capture local temporal dynamics. This paper introduces PatchInstruct, a modular prompting framework that enables high-accuracy TSF using off-the-shelf LLMs like GPT-4 without architectural modifications or weight updates.

Methodology: The PatchInstruct Framework

PatchInstruct leverages structured natural language prompts to guide the LLM's reasoning over numerical data. The framework consists of several key components designed to enhance the model's perception of temporal structures.

Overview of the PatchInstruct framework, illustrating the integration of system prompts, horizon instructions, and time-series data conversion for LLM-based forecasting.

Patch-Based Tokenization and Reverse Patching

Instead of treating time-series data as a sequence of individual numbers, PatchInstruct breaks the data into overlapping "patches" (e.g., windows of 3 timesteps). This allows the LLM to process local trends and shapes. Furthermore, the authors implemented Reverse Patching, where the list of patches is presented in reverse chronological order. This "recency-first" approach ensures that the most relevant data points are prioritized by the model's attention mechanism.

Neighbor Augmentation and Decomposition

To provide broader context, the system incorporates Neighbor Augmentation (Neighs), retrieving the five most similar historical segments based on Euclidean distance. This retrieval-augmented generation (RAG) approach helps the model identify recurring patterns. Additionally, some variants utilize Decomposition, separating the series into trend and residual components to help the LLM distinguish between long-term movements and short-term noise.

Experimental Setup

The framework was evaluated on two benchmark datasets:

  • Weather: A 3-year dataset containing 157,680 samples of 14 meteorological features recorded every 10 minutes.
  • Traffic: An hourly dataset of 34,172 samples from 181 sensors in Los Angeles over 4 months.

These datasets provide a rigorous test for handling different sampling frequencies and complex spatial-temporal dependencies.

Results and Discussion

PatchInstruct demonstrates significant improvements in both accuracy and efficiency compared to existing baselines.

Comparison of forecasting accuracy (MSE and MAE) across different horizons for S²IP-LLM, Zeroshot, and PatchInstruct on Weather and Traffic datasets.

Accuracy and Efficiency

As shown in the results, PatchInstruct consistently outperforms the S²IP-LLM baseline and standard zero-shot prompting on short-term horizons (up to 12 steps). Notably, on the Weather dataset at Horizon=1, PatchInstruct achieved a 97.7% reduction in Mean Squared Error (MSE) compared to the baseline.

Beyond accuracy, the method is 10x to 100x faster than S²IP-LLM during inference. By bypassing specialized embedding alignment and complex fine-tuning, PatchInstruct reduces end-to-end latency from minutes to seconds, making it a highly practical solution for real-time applications.

Key Insights

The success of PatchInstruct suggests that carefully structured prompting can serve as an effective substitute for architectural modifications. The "Reverse Patch" strategy highlights the importance of data ordering in numerical prompting, while Neighbor Augmentation proves vital for inferring trends in complex datasets like Weather.

Conclusion

PatchInstruct offers a powerful "middle way" for time-series forecasting with LLMs. By combining patch-based tokenization, recency-focused ordering, and historical context retrieval, it achieves state-of-the-art performance on short-term horizons with minimal computational overhead. Future work will focus on extending these advantages to longer forecasting horizons and exploring adaptive prompting mechanisms for diverse, noisy domains.

Summary updated

BibTeX
@misc{bumb2025forecasting,
  author = {Mayank Bumb and Anshul Vemulapalli and Sri Harsha Vardhan Prasad Jella and Anish Gupta and An La and Ryan A. Rossi and Hongjie Chen and Franck Dernoncourt and Nesreen K. Ahmed and Yu Wang},
  title = {{Forecasting Time Series with LLMs via Patch-Based Prompting and Decomposition}},
  year = {2025},
  eprint = {2506.12953},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.12953},
}
Figure