Lune

ICLR2022顶会

Compositional Attention: Disentangling Search and Retrieval

Sarthak Mittal, Sharath Chandra Raparthy, Irina Rish, Yoshua Bengio, Guillaume Lajoie

摘要

Multi-head, key-value attention is the backbone of the widely successful Transformer model and its variants. This attention mechanism uses multiple parallel key-value attention blocks (called heads), each performing two fundamental computations: (1) search - selection of a relevant entity from a set via query-key interactions, and (2) retrieval - extraction of relevant features from the selected entity via a value matrix. Importantly, standard attention heads learn a rigid mapping between search and retrieval. In this work, we first highlight how this static nature of the pairing can potentially: (a) lead to learning of redundant parameters in certain tasks, and (b) hinder generalization. To alleviate this problem, we propose a novel attention mechanism, called Compositional Attention, that replaces the standard head structure. The proposed mechanism disentangles search and retrieval and composes them in a dynamic, flexible and context-dependent manner through an additional soft competition stage between the query-key combination and value pairing. Through a series of numerical experiments, we show that it outperforms standard multi-head attention on a variety of tasks, including some out-of-distribution settings. Through our qualitative analysis, we demonstrate that Compositional Attention leads to dynamic specialization based on the type of retrieval needed. Our proposed mechanism generalizes multi-head attention, allows independent scaling of search and retrieval, and can easily be implemented in lieu of standard attention heads in any network architecture.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Is a Modular Architecture Enough? 引用了 Object-Centric Learning with Slot Attention
  • Is a Modular Architecture Enough? 引用了 A Meta-Transfer Objective for Learning to Disentangle Causal Mechanisms
  • Improving Transformers with Probabilistic Attention Keys 引用了 Rethinking Attention with Performers
  • Improving Transformers with Probabilistic Attention Keys 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Improving Transformers with Probabilistic Attention Keys 引用了 Reformer: The Efficient Transformer
  • Rethinking Attention with Performers 引用了 Reformer: The Efficient Transformer
  • Attention-based Iterative Decomposition for Tensor Product Representation 引用了 Object-Centric Learning with Slot Attention
  • Discrete Dictionary-based Decomposition Layer for Structured Representation Learning 引用了 Object-Centric Learning with Slot Attention
  • Discrete Dictionary-based Decomposition Layer for Structured Representation Learning 引用了 Attention-based Iterative Decomposition for Tensor Product Representation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper10

  1. Is a Modular Architecture Enough?Sarthak Mittal, Yoshua Bengio, Guillaume LajoieNeurIPS 2022 · 62 次引用
  2. Improving Transformers with Probabilistic Attention KeysTam Minh Nguyen, Tan Minh Nguyen, Dung D. Le, Duy Khuong Nguyen 等ICML 2022 · 38 次引用
  3. Layer-Wise Representation Fusion for Compositional GeneralizationYafang Zheng, Lei Lin, Shuangtao Li, Yuxuan Yuan 等AAAI 2024 · 4 次引用
  4. Attention-based Iterative Decomposition for Tensor Product RepresentationTaewon Park, Inchul Choi, Minho LeeICLR 2024 · 1 次引用
  5. Discrete Dictionary-based Decomposition Layer for Structured Representation LearningTaewon Park, Hyun-Chul Kim, Minho LeeNeurIPS 2024 · 1 次引用

它引用的 Paper10

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  2. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用
  3. Object-Centric Learning with Slot AttentionFrancesco Locatello, Dirk Weissenborn, Thomas Unterthiner, Aravindh Mahendran 等NeurIPS 2020 · 1,275 次引用
  4. A Meta-Transfer Objective for Learning to Disentangle Causal MechanismsYoshua Bengio, Tristan Deleu, Nasim Rahaman, Nan Rosemary Ke 等ICLR 2020 · 371 次引用
  5. Rethinking Attention with PerformersKrzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song 等ICLR 2021 · 122 次引用

相关 Paper

  1. Attention as a HypernetworkSimon Schug, Seijin Kobayashi, Yassir Akram, João Sacramento 等ICLR 2025
  2. Learning Hard Retrieval Decoder Attention for TransformersHongfei Xu, Qiuhui Liu, Josef van Genabith, Deyi XiongEMNLP Findings 2021
  3. Improving Transformers with Dynamically Composable Multi-Head AttentionDa Xiao, Qingye Meng, Shengping Li, Xingyuan YuanICML 2024 · 8 次引用
  4. In-Context Compositional Learning vis Sparse Coding TransformerWei Chen, Jingxi Yu, Zichen Miao, Qiang QiuNeurIPS 2025
  5. Efficient Length-Generalizable Attention via Causal Retrieval for Long-Context Language ModelingXiang Hu, Zhihao Teng, Jun Zhao, Wei Wu 等ICML 2025
黄昏的海面,两侧是细线勾勒的悬崖