Making Transformers Solve Compositional Tasks

Santiago Ontañón, Joshua Ainslie, Vaclav Cvicek, Zachary Fisher
8/9/2021
cs.AIcs.CL
transformer-attention

Official code: google-research/google-research (39,251 stars, Jupyter Notebook, Apache-2.0, last commit 2026-04-30).

Abstract

Several studies have reported the inability of Transformer models to generalize compositionally, a key type of generalization in many NLP tasks such as semantic parsing. In this paper we explore the design space of Transformer models showing that the inductive biases given to the model by several design decisions significantly impact compositional generalization.

Show full abstract

Through this exploration, we identified Transformer configurations that generalize compositionally significantly better than previously reported in the literature in a diverse set of compositional tasks, and that achieve state-of-the-art results in a semantic parsing compositional generalization benchmark (COGS), and a string edit operation composition benchmark (PCFG).

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Google Research

39,2518,516Jupyter Notebook, PythonOct 4, 20187 months agoApache-2.0
aimachine-learningresearch

Similar Papers

Cite this paper

@article{ontan2021making,
  title  = {Making Transformers Solve Compositional Tasks},
  author = {Santiago Ontañón and Joshua Ainslie and Vaclav Cvicek and Zachary Fisher},
  year   = {2021},
  eprint = {2108.04378},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.04378}
}

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/2108.04378.svg)](https://codeofpaper.com/paper/2108.04378)

Discussion