New Linear Attention Method Improves Long-Context Retrieval

Dhruman Gupta, Aritra Das, Debayan Gupta· August 17, 2026 View original

Key takeaways

  • Linear attention models struggle with interference at long contexts.
  • QED introduces a query-derived erase direction to mitigate this.
  • This method significantly improves retrieval performance for long sequences.
  • QED can effectively double the usable context length in linear attention models.

Who benefits

AI DevelopmentNatural Language ProcessingLarge Language ModelsData ScienceSoftware Engineering

Summary

Researchers introduced the Query-derived Erase Direction (QED) for linear attention models, adding a second erase direction orthogonal to the key. This enhancement significantly improves retrieval performance at long contexts and effectively doubles the usable context length by mitigating interference in the fixed-size state.

Linear attention mechanisms are designed to maintain a fixed-size state, which is efficient but can lead to interference when processing very long contexts, as many stored items compete for this limited state. Previous delta-rule models, such as Gated DeltaNet-2 (GDN-2), derive their erase vector solely from the key of the current token. However, the interference that degrades retrieval is often measured through the query, and a key-derived erase step cannot directly address the query-orthogonal part of the read. To overcome this limitation, a new approach called the Query-derived Erase Direction (QED) has been developed. QED introduces a second erase direction that is derived from the query and is orthogonal to the key. In the context of fast-weight networks, a key-directed delta edit is unable to modify the part of a read that is orthogonal to the key. QED utilizes this editable portion to effectively cancel out content from the old state, specifically targeting interference measured along the query. This innovation leads to substantial improvements in retrieval performance, particularly at context lengths extending beyond the original training window. Experiments demonstrate that QED approximately doubles the usable context length on the S-NIAH-1 benchmark. By providing a more targeted forgetting mechanism, QED enhances the ability of linear attention models to manage long-range dependencies and reduce interference, making them more effective for tasks requiring extensive contextual understanding.

Why it matters

For professionals working with large language models and other sequence processing tasks, improving context length and reducing interference is crucial for better performance and efficiency. QED offers a practical advancement in linear attention, enabling models to handle longer inputs more effectively without a proportional increase in computational cost.

How to implement this in your domain

  1. 1Evaluate current linear attention models for long-context performance bottlenecks.
  2. 2Investigate integrating the Query-derived Erase Direction (QED) mechanism into existing architectures.
  3. 3Benchmark models with QED against baselines on tasks requiring extended context.
  4. 4Optimize QED parameters for specific applications to maximize context length and retrieval accuracy.
  5. 5Consider QED for developing more efficient and capable long-sequence processing AI systems.

Original post by Dhruman Gupta, Aritra Das, Debayan Gupta

"arXiv:2608.13668v1 Announce Type: new 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…"

View on X

Originally posted by Dhruman Gupta, Aritra Das, Debayan Gupta on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses