Why are Sensitive Functions Hard for Transformers?

Michael Hahn, Mark Rofin
2/15/2024
83 citations
cs.LG
transformer-attention

Official code: lacoco-lab/sensitivity-hardness (7 stars, Python, MIT, last commit 2024-05-24).

Abstract

Empirical studies have identified a range of learnability biases and limitations of transformers, such as a persistent difficulty in learning to compute simple formal languages such as PARITY, and a bias towards low-degree functions. However, theoretical understanding remains limited, with existing expressiveness theory either overpredicting or underpredicting realistic learning abilities.

Show full abstract

We prove that, under the transformer architecture, the loss landscape is constrained by the input-space sensitivity: Transformers whose output is sensitive to many parts of the input string inhabit isolated points in parameter space, leading to a low-sensitivity bias in generalization. We show theoretically and empirically that this theory unifies a broad array of empirical observations about the learning abilities and biases of transformers, such as their generalization bias towards low sensitivity and low degree, and difficulty in length generalization for PARITY. This shows that understanding transformers' inductive biases requires studying not just their in-principle expressivity, but also their loss landscape.

View on arXivView PDF

Code Implementations(1)

MIT

Code for the paper

71PythonMay 24, 20242 years agoMIT

Similar Papers

Cite this paper

@article{hahn2024sensitive,
  title  = {Why are Sensitive Functions Hard for Transformers?},
  author = {Michael Hahn and Mark Rofin},
  year   = {2024},
  eprint = {2402.09963},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.09963v4}
}

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

Discussion