Lune

EMNLP Findings2023

Long-Range Language Modeling with Selective Cache

Xinting Huang, Nora Hollenstein

Abstract

The computational cost of transformer-based language models grows quadratically with the sequence length. In this paper, we introduce the selective cache, which stores the selected key-value pairs from the previous context. By selecting important key-value pairs the model makes better use of the cache so that in limited cache size, a longer context history can be stored. We design three kinds of selection methods. The first is based on human language processing. The key-value pairs are selected if they correspond to tokens that are fixated longer, as recorded in eye-tracking-while-reading experiments. We also incorporate the cognitivelyinspired selection process into the language model as a trainable process, resulting in two additional methods with improved performance. The selection task is converted into a pruning task so they can be trained with differentiable masks. We demonstrate that the proposed selective cache improves the language modeling performance across different datasets. 1 With the same number of stored key-value pairs (cache size), our selective cache outperforms XL cache (Dai et al., 2019) and compressive cache (Rae et al., 2019) by considerable margins.

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.

3 top-tier papers have 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

  • V2PE: Improving Multimodal Long-Context Capability of Vision-Language Models with Variable Visual Position Encoding cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • V2PE: Improving Multimodal Long-Context Capability of Vision-Language Models with Variable Visual Position Encoding cites Reformer: The Efficient Transformer
  • ETC: Encoding Long and Structured Inputs in Transformers cites Reformer: The Efficient Transformer
  • ETC: Encoding Long and Structured Inputs in Transformers cites Compressive Transformers for Long-Range Sequence Modelling
  • Segment Anything cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • LongSight: Compute-Enabled Memory to Accelerate Large-Context LLMs via Sparse Attention cites Reformer: The Efficient Transformer
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. V2PE: Improving Multimodal Long-Context Capability of Vision-Language Models with Variable Visual Position EncodingJunqi Ge, Ziyi Chen, Jintao Lin, Jinguo Zhu et al.ICCV 2025 · 5 citations
  2. LongSight: Compute-Enabled Memory to Accelerate Large-Context LLMs via Sparse AttentionDerrick Quinn, E. Ezgi Yücel, Jinkwon Kim, José F. Martínez et al.MICRO 2025 · 3 citations
  3. Seeing Eye to AI: Human Alignment via Gaze-Based Response Rewards for Large Language ModelsÁngela López-Cardona, Carlos Segura, Alexandros Karatzoglou, Sergi Abadal et al.ICLR 2025

Builds on11

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  2. Segment AnythingAlexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao et al.ICCV 2023 · 13,211 citations
  3. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
  4. Compressive Transformers for Long-Range Sequence ModellingJack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier et al.ICLR 2020 · 833 citations
  5. ETC: Encoding Long and Structured Inputs in TransformersJoshua Ainslie, Santiago Ontañón, Chris Alberti, Vaclav Cvicek et al.EMNLP 2020 · 268 citations

Related papers

  1. Selective Attention Improves TransformerYaniv Leviathan, Matan Kalman, Yossi MatiasICLR 2025
  2. SCA: Selective Compression Attention for Efficiently Extending the Context Window of Large Language ModelsHuanran Zheng, Wei Zhu, Xiaoling WangEMNLP Findings 2024
  3. Training Free Exponential Context Extension via Cascading KV CacheJeffrey Willette, Heejun Lee, Youngwan Lee, Myeongjae Jeon et al.ICLR 2025
  4. TokenSelect: Efficient Long-Context Inference and Length Extrapolation for LLMs via Dynamic Token-Level KV Cache SelectionWei Wu, Zhuoshi Pan, Kun Fu, Chao Wang et al.EMNLP 2025 · 2 citations
  5. SpeCache: Speculative Key-Value Caching for Efficient Generation of LLMsShibo Jie, Yehui Tang, Kai Han, Zhi-Hong Deng et al.ICML 2025
Dusk over the sea between two cliffs drawn in fine vertical lines