TransformerFAM: Feedback attention is working memory

Dongseong Hwang, Weiran Wang, Zhuoyuan Huo, Khe Chai Sim, Pedro Moreno Mengibar
4/14/2024
cs.LGcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

While Transformers have revolutionized deep learning, their quadratic attention complexity hinders their ability to process infinitely long inputs. We propose Feedback Attention Memory (FAM), a novel Transformer architecture that leverages a feedback loop to enable the network to attend to its own latent representations. This design fosters the emergence of working memory within the Transformer, allowing it to process indefinitely long sequences. TransformerFAM requires no additional weights, enabling seamless integration with pre-trained models. Our experiments show that TransformerFAM significantly improves Transformer performance on long-context tasks across various model sizes (1B, 8B, and 24B). These results showcase the potential to empower Large Language Models (LLMs) to process sequences of unlimited length.

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{hwang2024transformerfam,
  title  = {TransformerFAM: Feedback attention is working memory},
  author = {Dongseong Hwang and Weiran Wang and Zhuoyuan Huo and Khe Chai Sim and Pedro Moreno Mengibar},
  year   = {2024},
  eprint = {2404.09173},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.09173v3}
}

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

Discussion