On the Optimization and Generalization of Multi-head Attention

Puneesh Deora, Rouzbeh Ghaderi, Hossein Taheri, Christos Thrampoulidis
10/19/2023
cs.LGmath.OCstat.ML

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

The training and generalization dynamics of the Transformer's core mechanism, namely the Attention mechanism, remain under-explored. Besides, existing analyses primarily focus on single-head attention. Inspired by the demonstrated benefits of overparameterization when training fully-connected networks, we investigate the potential optimization and generalization advantages of using multiple attention heads. Towards this goal, we derive convergence and generalization guarantees for gradient-descent training of a single-layer multi-head self-attention model, under a suitable realizability condition on the data. We then establish primitive conditions on the initialization that ensure realizability holds. Finally, we demonstrate that these conditions are satisfied for a simple tokenized-mixture model. We expect the analysis can be extended to various data-model and architecture variations.

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. 2 weaker matches are hidden by default — 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{deora2023optimization,
  title  = {On the Optimization and Generalization of Multi-head Attention},
  author = {Puneesh Deora and Rouzbeh Ghaderi and Hossein Taheri and Christos Thrampoulidis},
  year   = {2023},
  eprint = {2310.12680},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.12680v2}
}

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

Discussion