Lune

NeurIPS2024顶会

Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encoding

Zhenyu Zhang, Runjin Chen, Shiwei Liu, Zhewei Yao, Olatunji Ruwase, Beidi Chen, Xiaoxia Wu, Zhangyang Wang

摘要

This paper aims to overcome the"lost-in-the-middle"challenge of large language models (LLMs). While recent advancements have successfully enabled LLMs to perform stable language modeling with up to 4 million tokens, the persistent difficulty faced by most LLMs in identifying relevant information situated in the middle of the context has not been adequately tackled. To address this problem, this paper introduces Multi-scale Positional Encoding (Ms-PoE) which is a simple yet effective plug-and-play approach to enhance the capacity of LLMs to handle the relevant information located in the middle of the context, without fine-tuning or introducing any additional overhead. Ms-PoE leverages the position indice rescaling to relieve the long-term decay effect introduced by RoPE, while meticulously assigning distinct scaling ratios to different attention heads to preserve essential knowledge learned during the pre-training step, forming a multi-scale context fusion from short to long distance. Extensive experiments with a wide range of LLMs demonstrate the efficacy of our approach. Notably, Ms-PoE achieves an average accuracy gain of up to 3.8 on the Zero-SCROLLS benchmark over the original LLMs. Code are available at https://github.com/VITA-Group/Ms-PoE.

问 Lune

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

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

已有 27 篇顶会 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 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models 引用了 Efficient Streaming Language Models with Attention Sinks
  • Efficient Streaming Language Models with Attention Sinks 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • POSITION BIAS MITIGATES POSITION BIAS: Mitigate Position Bias Through Inter-Position Knowledge Distillation 引用了 Efficient Streaming Language Models with Attention Sinks
  • POSITION BIAS MITIGATES POSITION BIAS: Mitigate Position Bias Through Inter-Position Knowledge Distillation 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • DAPE: Data-Adaptive Positional Encoding for Length Extrapolation 引用了 Efficient Streaming Language Models with Attention Sinks
  • DAPE: Data-Adaptive Positional Encoding for Length Extrapolation 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • Graph-KV: Breaking Sequence via Injecting Structural Biases into Large Language Models 引用了 Efficient Streaming Language Models with Attention Sinks
  • Graph-KV: Breaking Sequence via Injecting Structural Biases into Large Language Models 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • Graph-KV: Breaking Sequence via Injecting Structural Biases into Large Language Models 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • DAPE V2: Process Attention Score as Feature Map for Length Extrapolation 引用了 Efficient Streaming Language Models with Attention Sinks
  • DAPE V2: Process Attention Score as Feature Map for Length Extrapolation 引用了 Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • DAPE V2: Process Attention Score as Feature Map for Length Extrapolation 引用了 DAPE: Data-Adaptive Positional Encoding for Length Extrapolation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper27

  1. DAPE: Data-Adaptive Positional Encoding for Length ExtrapolationChuanyang Zheng, Yihang Gao, Han Shi, Minbin Huang 等NeurIPS 2024 · 42 次引用
  2. POSITION BIAS MITIGATES POSITION BIAS: Mitigate Position Bias Through Inter-Position Knowledge DistillationYifei Wang, Feng Xiong, Yong Wang, Linjing Li 等EMNLP 2025 · 16 次引用
  3. DAPE V2: Process Attention Score as Feature Map for Length ExtrapolationChuanyang Zheng, Yihang Gao, Han Shi, Jing Xiong 等ACL 2025 · 12 次引用
  4. SARA: Selective and Adaptive Retrieval-augmented Generation with Context CompressionYiqiao Jin, Kartik Sharma, Vineeth Rakesh, Yingtong Dou 等ACL 2026 · 7 次引用
  5. Graph-KV: Breaking Sequence via Injecting Structural Biases into Large Language ModelsHaoyu Wang, Peihao Wang, Mufei Li, Shikun Liu 等NeurIPS 2025 · 6 次引用

它引用的 Paper16

  1. ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel 等ICLR 2020 · 7,418 次引用
  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. H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language ModelsZhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen 等NeurIPS 2023 · 1,003 次引用

相关 Paper

  1. LaMPE: Length-aware Multi-grained Positional Encoding for Adaptive Long-context Scaling Without TrainingSikui Zhang, Guangze Gao, Ziyun Gan, Chunfeng Yuan 等ACL Findings 2026
  2. Mitigating Position Bias in Transformers via Layer-Specific Positional Embedding ScalingZhenghua Wang, Yiran Ding, Changze Lv, Yixin Wu 等ACL Findings 2026
  3. Extending LLM Context Window with Adaptive Grouped Positional Encoding: A Training-Free MethodXinhao Xu, Jiaxin Li, Hui Chen, Zijia Lin 等ACL 2025 · 1 次引用
  4. Never Lost in the Middle: Mastering Long-Context Question Answering with Position-Agnostic Decompositional TrainingJunqing He, Kunhao Pan, Xiaoqun Dong, Zhuoyang Song 等ACL 2024 · 3 次引用
  5. 3D-RPE: Enhancing Long-Context Modeling Through 3D Rotary Position EncodingXindian Ma, Wenyuan Liu, Peng Zhang, Nan XuAAAI 2025 · 14 次引用
黄昏的海面,两侧是细线勾勒的悬崖