Lune

WWW2026Top-tier venue

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

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

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Implicit In-context Learning cites Language Models are Few-Shot Learners
  • Efficient Test-Time Scaling for LLM-based Time Series Forecasting cites Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting
  • Efficient Test-Time Scaling for LLM-based Time Series Forecasting cites iTransformer: Inverted Transformers Are Effective for Time Series Forecasting
  • iTransformer: Inverted Transformers Are Effective for Time Series Forecasting cites FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series Forecasting
  • iTransformer: Inverted Transformers Are Effective for Time Series Forecasting cites Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting
  • iTransformer: Inverted Transformers Are Effective for Time Series Forecasting cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Efficient Test-Time Scaling for LLM-based Time Series ForecastingXuan-May Le, Minh-Tuan Tran, Ling Luo, Uwe Aickelin et al.KDD 2026

Builds on31

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Informer: Beyond Efficient Transformer for Long Sequence Time-Series ForecastingHaoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang et al.AAAI 2021 · 7,289 citations
  3. FEDformer: Frequency Enhanced Decomposed Transformer for Long-term Series ForecastingTian Zhou, Ziqing Ma, Qingsong Wen, Xue Wang et al.ICML 2022 · 2,912 citations
  4. Implicit In-context LearningZhuowei Li, Zihao Xu, Ligong Han, Yunhe Gao et al.ICLR 2025 · 1,989 citations
  5. iTransformer: Inverted Transformers Are Effective for Time Series ForecastingYong Liu, Tengge Hu, Haoran Zhang, Haixu Wu et al.ICLR 2024 · 1,703 citations

Related papers

  1. In-context Time Series PredictorJiecheng Lu, Yan Sun, Shihao YangICLR 2025
  2. Customizing In-context Learning for Dynamic Interest Adaption in LLM-based RecommendationKeqin Bao, Ming Yan, Yang Zhang, Jizhi Zhang et al.ACL Findings 2025 · 1 citation
  3. TEST: Text Prototype Aligned Embedding to Activate LLM's Ability for Time SeriesChenxi Sun, Hongyan Li, Yaliang Li, Shenda HongICLR 2024 · 223 citations
  4. FLAIRR-TS - Forecasting LLM-Agents with Iterative Refinement and Retrieval for Time SeriesGunjan Jalori, Preetika Verma, Sercan Ö. ArikEMNLP Findings 2025 · 1 citation
  5. Task Descriptors Help Transformers Learn Linear Models In-ContextRuomin Huang, Rong GeICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines