Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

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

About

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.

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

Related benchmarks

TaskDatasetResultRank
Long-term time-series forecastingWeather
MSE0.222
448
Long-term time-series forecastingETTh1
MAE0.412
446
Long-term time-series forecastingTraffic
MSE0.37
362
Long-term time-series forecastingETTh2
MSE0.326
353
Long-term time-series forecastingETTm1
MSE0.328
334
Long-term time-series forecastingETTm2
MSE0.239
330
Long-term time-series forecastingECL
MSE0.158
154
Showing 7 of 7 rows

Other info

Follow for update