Exploring Context Window of Large Language Models via Decomposed Positional Vectors

Zican Dong, Junyi Li, Xin Men, Wayne Xin Zhao, Bingbing Wang +3 more
2/3/2026

No confident code implementation found for this paper.

Abstract

Transformer-based large language models (LLMs) typically have a limited context window, resulting in significant performance degradation when processing text beyond the length of the context window. Extensive studies have been proposed to extend the context window and achieve length extrapolation of LLMs, but there is still a lack of in-depth interpretation of these approaches. In this study, we explore the positional information within and beyond the context window for deciphering the underlying mechanism of LLMs. By using a mean-based decomposition method, we disentangle positional vectors from hidden states of LLMs and analyze their formation and effect on attention. Furthermore, when texts exceed the context window, we analyze the change of positional vectors in two settings, i.e., direct extrapolation and context window extension. Based on our findings, we design two training-free context window extension methods, positional vector replacement and attention window extension. Experimental results show that our methods can effectively extend the context window length.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{dong2026exploring,
  title  = {Exploring Context Window of Large Language Models via Decomposed Positional Vectors},
  author = {Zican Dong and Junyi Li and Xin Men and Wayne Xin Zhao and Bingbing Wang and Zhen Tian and Weipeng Chen and Ji-Rong Wen},
  year   = {2026},
  eprint = {2405.18009},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.18009},
  url    = {https://arxiv.org/abs/2405.18009},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.18009.svg)](https://codeofpaper.com/paper/2405.18009)

Discussion