mlsanityData to 14 Oct 2026

Causal Attention with Lookahead Keys

arXiv 2509.07301 ↗First posted 9 Sep 2025cs.CL cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

In standard causal attention, each token's query, key, and value (QKV) are static and encode only preceding context. We introduce CAuSal aTtention with Lookahead kEys (CASTLE), an attention mechanism that continually updates each token's keys as the context unfolds. We term these updated keys lookahead keys because they belong to earlier positions yet integrate information from tokens that appear later relative to those positions, while strictly preserving the autoregressive property. Although the mechanism appears sequential, we derive a mathematical equivalence that avoids explicitly materializing lookahead keys at each position and enables efficient parallel training. On language modeling benchmarks, CASTLE consistently outperforms standard causal attention across model scales, reducing validation perplexity and improving performance on a range of downstream tasks.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 25 of its 32 references that are in the map. First posted on arXiv 9 Sep 2025.

Builds on

25 of 32 references.

References · 25

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  4. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  5. 2020Scaling Laws for Neural Language Modelscited by 6,586
  6. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  7. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
  8. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  9. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
  10. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  11. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,183
  12. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
13 more
  1. 2020GLU Variants Improve Transformercited by 1,804
  2. 2019Root Mean Square Layer Normalizationcited by 1,480
  3. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
  4. 2021GLM: General Language Model Pretraining with Autoregressive Blank Infillingcited by 1,031
  5. 2024Repetition Improves Language Model Embeddingscited by 72
  6. 2019Quick and (not so) Dirty: Unsupervised Selection of Justification Sentences for Multi-hop Question Answeringcited by 59
  7. 2023Re-Reading Improves Reasoning in Large Language Modelscited by 37
  8. 2025PaTH Attention: Position Encoding via Accumulating Householder Transformationscited by 34
  9. 2023BeLLM: Backward Dependency Enhanced Large Language Model for Sentence Embeddingscited by 32
  10. 2024Selective Attention Improves Transformercited by 26
  11. 2025Diffusion vs. Autoregressive Language Models: A Text Embedding Perspectivecited by 23
  12. 2024ENTP: Encoder-only Next Token Predictioncited by 5
  13. 2025When the LM misunderstood the human chuckled: Analyzing garden path effects in humans and language modelscited by 4

Built on by

Not cited yet.