FAST: Factorizable Attention for Speeding up Transformers

Armin Gerami, Monte Hoover, Pranav S. Dulepet, Ramani Duraiswami
2/12/2024
cs.LGcs.AImath.NA

No confident code implementation found for this paper.

Abstract

Motivated by the factorization inherent in the original fast multipole method and the improved fast Gauss transform we introduce a factorable form of attention that operates efficiently in high dimensions. This approach reduces the computational and memory complexity of the attention mechanism in transformers from $O(N^2)$ to $O(N)$. In comparison to previous attempts, our work presents a linearly scaled attention mechanism that maintains the full representation of the attention matrix without compromising on sparsification and incorporates the all-to-all relationship between tokens. We explore the properties of our new attention metric and conduct tests in various standard settings. Results indicate that our attention mechanism has a robust performance and holds significant promise for diverse applications where self-attention is used.

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{gerami2024fast,
  title  = {FAST: Factorizable Attention for Speeding up Transformers},
  author = {Armin Gerami and Monte Hoover and Pranav S. Dulepet and Ramani Duraiswami},
  year   = {2024},
  eprint = {2402.07901},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.07901v1}
}

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/2402.07901.svg)](https://codeofpaper.com/paper/2402.07901)

Discussion