cs.LGAug 13, 2026

The Query Knows What to Forget: A Second Erase Direction for Linear Attention

Authors: Dhruman Gupta, Aritra Das, Debayan Gupta

Organizations: Truth Audit Labs

Abstract

Linear attention keeps a state of fixed size. At long context, many stored items share this state, and interference between them degrades retrieval. Gated DeltaNet-2 (GDN-2), like every delta-rule model before it, derives its erase vector from the key of the current token. However, the interference in its reads is measured through the query, and the erase step cannot reach it. We introduce the Query-derived Erase Direction (QED). QED adds a second erase direction derived from the query and orthogonal to the key. In the fast-weight view, a key-directed delta edit cannot change the key-orthogonal part of a read. It uses the editable part to cancel old-state content measured along the query. It also improves retrieval at every length past the training window, and it about doubles the usable context length on S-NIAH-1.

Figures & tables

Appendix figures & tables1 asset

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Don't Read Everything: A Curvature-Conditioned Query for Linear Attention

    May 31, 2026Dong Le, Thong Nguyen, Cong-Duy Nguyen +1In-Context RetrievalLong-Context Language Modeling

  2. Erase-then-Delta Attention: Decoupling Erase and Write Addresses in Delta-Rule Linear Attention

    Jun 25, 2026Xiao Li, Chengruidong Zhang, Hao Luo +15Memory-Augmented Language ModelsLong-Context Language Modeling