mlsanityData to 14 Oct 2026

Attention as a Hypernetwork

arXiv 2406.05816 ↗First posted 9 Jun 2024cs.LGcited by 13

Not on the map. Why?

Abstract (arXiv)

Transformers can under some circumstances generalize to novel problem instances whose constituent parts might have been encountered during training, but whose compositions have not. What mechanisms underlie this ability for compositional generalization? By reformulating multi-head attention as a hypernetwork, we reveal that a composable, low-dimensional latent code specifies key-query specific operations. We find empirically that this latent code is predictive of the subtasks the network performs on unseen task compositions, revealing that latent codes acquired during training are reused to solve unseen problem instances. To further examine the hypothesis that the intrinsic hypernetwork of multi-head attention supports compositional generalization, we ablate whether making the hypernetwork-generated linear value network nonlinear strengthens compositionality. We find that this modification improves compositional generalization on abstract reasoning tasks. In particular, we introduce a symbolic version of the Raven's Progressive Matrices human intelligence test, which gives us precise control over the problem compositions encountered during training and evaluation. We demonstrate on this task how scaling model size and data enables compositional generalization in transformers and gives rise to a functionally structured latent space.

Key facts. Cited by 13 papers in the map (data through 14 Oct 2026). Builds on 44 of its 68 references that are in the map. First posted on arXiv 9 Jun 2024.

Builds on

44 of 68 references.

References · 44

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  4. 2017Graph Attention Networkscited by 8,923
  5. 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 5,045
  6. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  7. 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,509
  8. 2016Pointer Sentinel Mixture Modelscited by 3,096
  9. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,918
  10. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  11. 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,989
  12. 2020GLU Variants Improve Transformercited by 1,804
32 more
  1. 2019Root Mean Square Layer Normalizationcited by 1,480
  2. 2018Relational inductive biases, deep learning, and graph networkscited by 1,360
  3. 2022Measuring and Narrowing the Compositionality Gap in Language Modelscited by 1,075
  4. 2016HyperNetworkscited by 1,027
  5. 2022In-context Learning and Induction Headscited by 964
  6. 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 856
  7. 2019Are Sixteen Heads Really Better than One?cited by 816
  8. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
  9. 2022Towards Reasoning in Large Language Models: A Surveycited by 596
  10. 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 514
  11. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 503
  12. 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 502
  13. 2023In-Context Learning Creates Task Vectorscited by 312
  14. 2023Function Vectors in Large Language Modelscited by 308
  15. 2019RAVEN: A Dataset for Relational and Analogical Visual rEasoNingcited by 226
  16. 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 204
  17. 2023Exphormer: Sparse Transformers for Graphscited by 170
  18. 2018Measuring abstract reasoning in neural networkscited by 166
  19. 2017Routing Networks: Adaptive Selection of Non-linear Functions for Multi-Task Learningcited by 126
  20. 2023Uncovering mesa-optimization algorithms in Transformerscited by 100
  21. 2020Compositional Generalization in Semantic Parsing: Pre-training vs. Specialized Architecturescited by 95
  22. 2020Stratified Rule-Aware Network for Abstract Visual Reasoningcited by 72
  23. 2018Modular Networks: Learning to Decompose Neural Computationcited by 62
  24. 2023How Do In-Context Examples Affect Compositional Generalization?cited by 51
  25. 2022Is a Modular Architecture Enough?cited by 36
  26. 2021Dynamic Inference with Neural Interpreterscited by 24
  27. 2022On the Compositional Generalization Gap of In-Context Learningcited by 24
  28. 2023Discovering modular solutions that generalize compositionallycited by 23
  29. 2023Some Might Say All You Need Is Sumcited by 21
  30. 2021Multi-head or Single-head? An Empirical Comparison for Transformer Trainingcited by 16
  31. 2023Asynchronous Algorithmic Alignment with Cocyclescited by 13
  32. 2021SimpleTRON: Simple Transformer with O(N) Complexitycited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 2; 2025: 6; 2026: 5.

13 papers.

Sort:

By area: