Setting the Record Straight on Transformer Oversmoothing

Gbètondji J-S Dovonon, Michael M. Bronstein, Matt J. Kusner
1/9/2024
cs.LG

No confident code implementation found for this paper.

Abstract

Transformer-based models have recently become wildly successful across a diverse set of domains. At the same time, recent work has shown empirically and theoretically that Transformers are inherently limited. Specifically, they argue that as model depth increases, Transformers oversmooth, i.e., inputs become more and more similar. A natural question is: How can Transformers achieve these successes given this shortcoming? In this work we test these observations empirically and theoretically and uncover a number of surprising findings. We find that there are cases where feature similarity increases but, contrary to prior results, this is not inevitable, even for existing pre-trained models. Theoretically, we show that smoothing behavior depends on the eigenspectrum of the value and projection weights. We verify this empirically and observe that the sign of layer normalization weights can influence this effect. Our analysis reveals a simple way to parameterize the weights of the Transformer update equations to influence smoothing behavior. We hope that our findings give ML researchers and practitioners additional insight into how to develop future Transformer-based models.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{dovonon2024setting,
  title  = {Setting the Record Straight on Transformer Oversmoothing},
  author = {Gbètondji J-S Dovonon and Michael M. Bronstein and Matt J. Kusner},
  year   = {2024},
  eprint = {2401.04301},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.04301v3}
}

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

Discussion