When Can Transformers Ground and Compose: Insights from Compositional Generalization Benchmarks

Ankur Sikarwar, Arkil Patel, Navin Goyal
10/23/2022
cs.CL
transformer-attention

Official code: ankursikarwar/Grounded-Compositional-Generalization (6 stars, Python, MIT, last commit 2022-10-25).

Abstract

Humans can reason compositionally whilst grounding language utterances to the real world. Recent benchmarks like ReaSCAN use navigation tasks grounded in a grid world to assess whether neural models exhibit similar capabilities.

Show full abstract

In this work, we present a simple transformer-based model that outperforms specialized architectures on ReaSCAN and a modified version of gSCAN. On analyzing the task, we find that identifying the target location in the grid world is the main challenge for the models. Furthermore, we show that a particular split in ReaSCAN, which tests depth generalization, is unfair. On an amended version of this split, we show that transformers can generalize to deeper input structures. Finally, we design a simpler grounded compositional generalization task, RefEx, to investigate how transformers reason compositionally. We show that a single self-attention layer with a single head generalizes to novel combinations of object attributes. Moreover, we derive a precise mathematical construction of the transformer's computations from the learned network. Overall, we provide valuable insights about the grounded compositional generalization task and the behaviour of transformers on it, which would be useful for researchers working in this area.

View on arXivView PDF

Code Implementations(1)

MIT

EMNLP 2022 | When Can Transformers Ground and Compose: Insights from Compositional Generalization Benchmarks

61Python, Jupyter NotebookOct 21, 20224 years agoMIT

Similar Papers

Cite this paper

@article{sikarwar2022when,
  title  = {When Can Transformers Ground and Compose: Insights from Compositional Generalization Benchmarks},
  author = {Ankur Sikarwar and Arkil Patel and Navin Goyal},
  year   = {2022},
  eprint = {2210.12786},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.12786}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.12786.svg)](https://codeofpaper.com/paper/2210.12786)

Discussion