Lune

NeurIPS2024顶会

Exploring Context Window of Large Language Models via Decomposed Positional Vectors

Zican Dong, Junyi Li, Xin Men, Xin Zhao, Bingning Wang, Zhen Tian, Weipeng Chen, Ji-Rong Wen

摘要

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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Efficient Streaming Language Models with Attention Sinks 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • Efficient Streaming Language Models with Attention Sinks 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Efficient Streaming Language Models with Attention Sinks 引用了 Language Models are Few-Shot Learners
  • Efficient Streaming Language Models with Attention Sinks 引用了 Compressive Transformers for Long-Range Sequence Modelling
  • Variance Sensitivity Induces Attention Entropy Collapse and Instability in Transformers 引用了 Efficient Streaming Language Models with Attention Sinks
  • Variance Sensitivity Induces Attention Entropy Collapse and Instability in Transformers 引用了 Language Models are Few-Shot Learners
  • PANDAS: Improving Many-shot Jailbreaking via Positive Affirmation, Negative Demonstration, and Adaptive Sampling 引用了 Language Models are Few-Shot Learners
  • Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation 引用了 Language Models are Few-Shot Learners
  • Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation 引用了 Compressive Transformers for Long-Range Sequence Modelling
  • Disentangling Latent Shifts of In-Context Learning with Weak Supervision 引用了 Language Models are Few-Shot Learners
  • REAR: A Relevance-Aware Retrieval-Augmented Framework for Open-Domain Question Answering 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper9

  1. REAR: A Relevance-Aware Retrieval-Augmented Framework for Open-Domain Question AnsweringYuhao Wang, Ruiyang Ren, Junyi Li, Xin Zhao 等EMNLP 2024 · 12 次引用
  2. CAFE: Retrieval Head-based Coarse-to-Fine Information Seeking to Enhance Multi-Document QA CapabilityHan Peng, Jinhao Jiang, Zican Dong, Wayne Xin Zhao 等EMNLP 2025 · 4 次引用
  3. Disentangling Latent Shifts of In-Context Learning with Weak SupervisionJosip Jukic, Jan SnajderNeurIPS 2025 · 3 次引用
  4. Variance Sensitivity Induces Attention Entropy Collapse and Instability in TransformersJonghyun Hong, Sungyoon LeeEMNLP 2025
  5. PANDAS: Improving Many-shot Jailbreaking via Positive Affirmation, Negative Demonstration, and Adaptive SamplingAvery Ma, Yangchen Pan, Amir-massoud FarahmandICML 2025

它引用的 Paper13

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 次引用
  3. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
  4. Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 次引用
  5. Compressive Transformers for Long-Range Sequence ModellingJack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier 等ICLR 2020 · 833 次引用

相关 Paper

  1. A Training-Free Length Extrapolation Approach for LLMs: Greedy Attention Logit InterpolationYan Li, Tianyi Zhang, Zechuan Li, Caren HanEMNLP 2025
  2. PEPE: Long-context Extension for Large Language Models via Periodic Extrapolation Positional EncodingsJikun Hu, Dongsheng Guo, Yuli Liu, Qingyao Ai 等EMNLP Findings 2025
  3. LaMPE: Length-aware Multi-grained Positional Encoding for Adaptive Long-context Scaling Without TrainingSikui Zhang, Guangze Gao, Ziyun Gan, Chunfeng Yuan 等ACL Findings 2026
  4. Length Extrapolation of Transformers: A Survey from the Perspective of Positional EncodingLiang Zhao, Xiachong Feng, Xiaocheng Feng, Weihong Zhong 等EMNLP Findings 2024 · 14 次引用
  5. ReAttention: Training-Free Infinite Context with Finite Attention ScopeXiaoran Liu, Ruixiao Li, Zhigeng Liu, Qipeng Guo 等ICLR 2025
黄昏的海面,两侧是细线勾勒的悬崖