{"url":"/method/all-attention-layer","slug":"all-attention-layer","name":"All-Attention Layer","full_name":"All-Attention Layer","full_name_withheld":false,"description_markdown":"An **All-Attention Layer** is an attention module and layer for transformers that merges the self-attention and feedforward sublayers into a single unified attention layer. As opposed to the two-step mechanism of the [Transformer](https://paperswithcode.com/method/transformer) layer, it directly builds its representation from the context and a persistent memory block without going through a feedforward transformation. The additional persistent memory block stores, in the form of key-value vectors, information that does not depend on the context. In terms of parameters, these persistent key-value vectors replace the feedforward sublayer.","description_state":"present","introduced_year":null,"introduced_by":{"title":"Augmenting Self-attention with Persistent Memory","paper":"/paper/augmenting-self-attention-with-persistent","first_author":"Sainbayar Sukhbaatar","n_authors":5,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/augmenting-self-attention-with-persistent"},"source":{"url":"https://arxiv.org/abs/1907.01470v1","title":"Augmenting Self-attention with Persistent Memory","url_on_a_paper_host":true},"code_snippet_url":null,"code_snippet_url_on_a_code_host":false,"categories":[{"area":"General","area_id":"general","collection":"Attention Modules","url":"/methods/category/attention-modules","pwc_aliases":[]}],"n_papers_tagged":2,"archive_num_papers":2,"papers_newest_first":[{"paper":"/paper/solving-dynamic-traveling-salesman-problems","title":"Solving Dynamic Traveling Salesman Problems With Deep Reinforcement Learning","date":"2023-04-01","arxiv_id":null,"n_code_links":1,"syntology":null},{"paper":"/paper/augmenting-self-attention-with-persistent","title":"Augmenting Self-attention with Persistent Memory","date":"2019-07-02","arxiv_id":"1907.01470","n_code_links":2,"syntology":{"ran":5,"of":5,"unverified":0,"pointer_only":4}}],"papers_shown":2,"tasks":[{"task":"/task/deep-reinforcement-learning","name":"Deep Reinforcement Learning","papers":1},{"task":"/task/language-modeling","name":"Language Modeling","papers":1},{"task":"/task/language-modelling","name":"Language Modelling","papers":1},{"task":"/task/reinforcement-learning","name":"Reinforcement Learning","papers":1},{"task":"/task/translation","name":"Translation","papers":1},{"task":"/task/traveling-salesman-problem","name":"Traveling Salesman Problem","papers":1},{"task":"/task/reinforcement-learning-2","name":"reinforcement-learning","papers":1}],"tasks_shown":7,"n_tasks":7,"usage_by_year":[{"year":"2019","papers":1},{"year":"2023","papers":1}],"row_source":"methods_table","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/all-attention-layer"},"syntology_read_at":"2026-09-24T18:15:14+00:00"}