On Difficulties of Attention Factorization through Shared Memory

Uladzislau Yorsh, Martin Holeňa, Ondřej Bojar, David Herel
3/31/2024
cs.LG

No confident code implementation found for this paper.

Abstract

Transformers have revolutionized deep learning in numerous fields, including natural language processing, computer vision, and audio processing. Their strength lies in their attention mechanism, which allows for the discovering of complex input relationships. However, this mechanism's quadratic time and memory complexity pose challenges for larger inputs. Researchers are now investigating models like Linear Unified Nested Attention (Luna) or Memory Augmented Transformer, which leverage external learnable memory to either reduce the attention computation complexity down to linear, or to propagate information between chunks in chunk-wise processing. Our findings challenge the conventional thinking on these models, revealing that interfacing with the memory directly through an attention operation is suboptimal, and that the performance may be considerably improved by filtering the input signal before communicating with memory.

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{yorsh2024difficulties,
  title  = {On Difficulties of Attention Factorization through Shared Memory},
  author = {Uladzislau Yorsh and Martin Holeňa and Ondřej Bojar and David Herel},
  year   = {2024},
  eprint = {2404.00798},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.00798v1}
}

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

Discussion