paper-with-me

홈 › Papers

Attention as a Hypernetwork

2024-06-09 · Simon Schug, Seijin Kobayashi, Yassir Akram, João Sacramento, Razvan Pascanu

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 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.

📄 PDF Abstract BibTeX arXiv:2406.05816

Code (1)

smonsays/hypernetwork-attention 공식 구현 jax

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
HyperNetwork A HyperNetwork is a network that generates weights for a main network. The behavior of the main network is the same with any usual neural network: it learns to map some raw…
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Multi-Head Attention 설명 없음
Multi-Head Linear Attention Multi-Head Linear Attention is a type of linear multi-head self-attention module, proposed with the Linformer architecture. The…

Similar Papers 제목 키워드 기반

HyperPose: Camera Pose Localization using Attention Hypernetworks

2023-03-05 · Ron Ferens, Yosi Keller

In this study, we propose the use of attention hypernetworks in camera pose localization. The dynamic nature of natural scenes, including changes in environment, perspective, and lighting, creates an inherent domain gap …

regression

Language Modeling with Recurrent Highway Hypernetworks

2017-12-01 · NeurIPS 2017 12 · Joseph Suarez

We present extensive experimental and theoretical support for the efficacy of recurrent highway networks (RHNs) and recurrent hypernetworks complimentary to the original works. Where the original RHN work primarily provi…

Language ModelingLanguage Modelling

Investigating the Effectiveness of HyperTuning via Gisting

2024-02-26 · Jason Phang

Gisting (Mu et al., 2023) is a simple method for training models to compress information into fewer token representations using a modified attention mask, and can serve as an economical approach to training Transformer-b…

Hypernetwork-Driven Low-Rank Adaptation Across Attention Heads

2025-10-05 · Nghiem T. Diep, Dung Le, Tuan Truong, Tan Dinh 외 arxiv

Parameter-efficient fine-tuning (PEFT) has emerged as a powerful paradigm for adapting large-scale pre-trained models to downstream tasks with minimal additional parameters. Among PEFT methods, Low-Rank Adaptation (LoRA)…

parameter-efficient fine-tuning

Phase Retrieval using Expectation Consistent Signal Recovery Algorithm based on Hypernetwork

2021-01-12 · Chang-Jen Wang, Chao-Kai Wen, Shang-Ho, Tsai 외

Phase retrieval (PR) is an important component in modern computational imaging systems. Many algorithms have been developed over the past half-century. Recent advances in deep learning have introduced new possibilities f…

Retrieval