Attention Condensation via Sparsity Induced Regularized Training

Eli Sason, Darya Frolova, Boris Nazarov, Felix Goldberd
3/3/2025
cs.CL

No confident code implementation found for this paper.

Abstract

As the context window expands, self-attention increasingly dominates the transformer's inference time. Therefore, accelerating attention computation while minimizing performance degradation is essential for the efficient deployment of Large Language Models (LLMs). In this study we extend a theoretical framework of attention sparsity in LLMs. A customized loss function is designed to enforce the sparsity by restricting the number of top elements in the attention matrix. We perform an initial set of evaluations with GPT-2 to show the effectiveness of our sparsification approach. The attention matrices of the models trained with the proposed loss are both sparse and effective in capturing relevant input dependencies. We now continue working to demonstrate the value of our approach on larger models and different architectures.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{sason2025attention,
  title  = {Attention Condensation via Sparsity Induced Regularized Training},
  author = {Eli Sason and Darya Frolova and Boris Nazarov and Felix Goldberd},
  year   = {2025},
  eprint = {2503.01564},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.01564v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.01564.svg)](https://codeofpaper.com/paper/2503.01564)

Discussion