Attention as a Hypernetwork
Schug, Simon, Kobayashi, Seijin, Akram, Yassir, Sacramento, João, Pascanu, Razvan
–arXiv.org Artificial Intelligence
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 low-dimensional latent code specifies key-query specific operations. We find empirically that this latent code is highly structured, capturing information about the subtasks performed by the network. Using the framework of attention as a hypernetwork we further propose a simple modification of multi-head linear attention that strengthens the ability for compositional generalization on a range of abstract reasoning tasks. In particular, we introduce a symbolic version of the Raven Progressive Matrices human intelligence test on which we demonstrate how scaling model size and data enables compositional generalization and gives rise to a functionally structured latent code in the transformer.
arXiv.org Artificial Intelligence
Jun-21-2024
- Country:
- South America > Argentina
- Pampas > Buenos Aires F.D. > Buenos Aires (0.04)
- North America
- Europe
- Asia
- Middle East
- Jordan (0.04)
- UAE > Abu Dhabi Emirate
- Abu Dhabi (0.04)
- China > Guangxi Province
- Nanning (0.04)
- Middle East
- South America > Argentina
- Genre:
- Research Report > Experimental Study (1.00)
- Industry:
- Technology: