mlsanityData to 7 Oct 2026

DAPE V2: Process Attention Score as Feature Map for Length Extrapolation

arXiv 2410.04798 ↗First posted 7 Oct 2024cs.CLcited by 10

Not on the map. Why?

Abstract (arXiv)

The attention mechanism is a fundamental component of the Transformer model, contributing to interactions among distinct tokens, in contrast to earlier feed-forward neural networks. In general, the attention scores are determined simply by the key-query products. However, this work's occasional trial (combining DAPE and NoPE) of including additional MLPs on attention scores without position encoding indicates that the classical key-query multiplication may limit the performance of Transformers. In this work, we conceptualize attention as a feature map and apply the convolution operator (for neighboring attention scores across different heads) to mimic the processing methods in computer vision. Specifically, the main contribution of this paper is identifying and interpreting the Transformer length extrapolation problem as a result of the limited expressiveness of the naive query and key dot product, and we successfully translate the length extrapolation issue into a well-understood feature map processing problem. The novel insight, which can be adapted to various attention-related models, reveals that the current Transformer architecture has the potential for further evolution. Extensive experiments demonstrate that treating attention as a feature map and applying convolution as a processing method significantly enhances Transformer performance.

Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 108 of its 128 references that are in the map. First posted on arXiv 7 Oct 2024.

Builds on

108 of 128 references.

References · 108

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  4. 2020Language Models are Few-Shot Learnerscited by 32,199
  5. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  6. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  7. 2014Very Deep Convolutional Networks for Large-Scale Image Recognitioncited by 15,267
  8. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  9. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  10. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
  11. 2022Scalable Diffusion Models with Transformerscited by 5,931
  12. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
38 more
  1. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
  2. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  3. 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
  4. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  5. 2020Longformer: The Long-Document Transformercited by 3,362
  6. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  7. 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
  8. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
  9. 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,793
  10. 2020Rethinking Attention with Performerscited by 1,584
  11. 2018Self-Attention with Relative Position Representationscited by 1,112
  12. 2019PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarizationcited by 1,100
  13. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
  14. 2023BloombergGPT: A Large Language Model for Financecited by 923
  15. 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
  16. 2022Galactica: A Large Language Model for Sciencecited by 736
  17. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
  18. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
  19. 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 495
  20. 2024Jamba: A Hybrid Transformer-Mamba Language Modelcited by 390
  21. 2024xLSTM: Extended Long Short-Term Memorycited by 320
  22. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
  23. 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 302
  24. 2023Effective Long-Context Scaling of Foundation Modelscited by 301
  25. 2020Sparse Sinkhorn Attentioncited by 250
  26. 2021LongT5: Efficient Text-To-Text Transformer for Long Sequencescited by 232
  27. 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 232
  28. 2022Neural Networks and the Chomsky Hierarchycited by 214
  29. 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
  30. 2020Rethinking Positional Encoding in Language Pre-trainingcited by 197
  31. 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 188
  32. 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
  33. 2023Birth of a Transformer: A Memory Viewpointcited by 154
  34. 2022Transformer Language Models without Positional Encodings Still Learn Positional Informationcited by 148
  35. 2024Infini-gram: Scaling Unbounded n-gram Language Models to a Trillion Tokenscited by 148
  36. 2023Progressive-Hint Prompting Improves Reasoning in Large Language Modelscited by 147
  37. 2020On Translation Invariance in CNNs: Convolutional Layers can Exploit Absolute Spatial Locationcited by 141
  38. 2023Focused Transformer: Contrastive Training for Context Scalingcited by 133

50 most cited of 108 All 108 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 9; 2026: 1.

10 papers.