Sequence Length Independent Norm-Based Generalization Bounds for Transformers

Jacob Trauger, Ambuj Tewari
10/19/2023
36 citations
stat.MLcs.LG
transformer-attention

Official code: traugerjacob/Transformer-Gen-Bounds (2 stars, Python, MIT, last commit 2023-10-19).

Abstract

This paper provides norm-based generalization bounds for the Transformer architecture that do not depend on the input sequence length. We employ a covering number based approach to prove our bounds.

Show full abstract

We use three novel covering number bounds for the function class of bounded linear transformations to upper bound the Rademacher complexity of the Transformer. Furthermore, we show this generalization bound applies to the common Transformer training technique of masking and then predicting the masked word. We also run a simulated study on a sparse majority data set that empirically validates our theoretical findings.

View on arXivView PDF

Code Implementations(1)

MIT

Code for the paper Sequence Length Independent Generalization Bounds For Transformers

20PythonOct 19, 20233 years agoMIT

Similar Papers

Cite this paper

@article{trauger2023sequence,
  title  = {Sequence Length Independent Norm-Based Generalization Bounds for Transformers},
  author = {Jacob Trauger and Ambuj Tewari},
  year   = {2023},
  eprint = {2310.13088},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.13088v1}
}

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

Discussion