Breaking Symmetry When Training Transformers

Chunsheng Zuo, Michael Guerzhoy
2/6/2024
cs.LGcs.CL

No confident code implementation found for this paper.

Abstract

As we show in this paper, the prediction for output token $n+1$ of Transformer architectures without one of the mechanisms of positional encodings and causal attention is invariant to permutations of input tokens $1, 2, ..., n-1$. Usually, both mechanisms are employed and the symmetry with respect to the input tokens is broken. Recently, it has been shown that one can train Transformers without positional encodings. This must be enabled by the causal attention mechanism. In this paper, we elaborate on the argument that the causal connection mechanism must be responsible for the fact that Transformers are able to model input sequences where the order is important. Vertical "slices" of Transformers are all encouraged to represent the same location $k$ in the input sequence. We hypothesize that residual connections contribute to this phenomenon, and demonstrate evidence for this.

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{zuo2024breaking,
  title  = {Breaking Symmetry When Training Transformers},
  author = {Chunsheng Zuo and Michael Guerzhoy},
  year   = {2024},
  eprint = {2402.05969},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.05969v2}
}

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

Discussion