Table of Contents
Fetching ...

Sharper Generalization Bounds for Transformer

Yawen Li, Tao Hu, Zhouhui Lian, Wan Tian, Yijie Peng, Huiming Zhang, Zhongyi Li

Abstract

This paper studies generalization error bounds for Transformer models. Based on the offset Rademacher complexity, we derive sharper generalization bounds for different Transformer architectures, including single-layer single-head, single-layer multi-head, and multi-layer Transformers. We first express the excess risk of Transformers in terms of the offset Rademacher complexity. By exploiting its connection with the empirical covering numbers of the corresponding hypothesis spaces, we obtain excess risk bounds that achieve optimal convergence rates up to constant factors. We then derive refined excess risk bounds by upper bounding the covering numbers of Transformer hypothesis spaces using matrix ranks and matrix norms, leading to precise, architecture-dependent generalization bounds. Finally, we relax the boundedness assumption on feature mappings and extend our theoretical results to settings with unbounded (sub-Gaussian) features and heavy-tailed distributions.

Sharper Generalization Bounds for Transformer

Abstract

This paper studies generalization error bounds for Transformer models. Based on the offset Rademacher complexity, we derive sharper generalization bounds for different Transformer architectures, including single-layer single-head, single-layer multi-head, and multi-layer Transformers. We first express the excess risk of Transformers in terms of the offset Rademacher complexity. By exploiting its connection with the empirical covering numbers of the corresponding hypothesis spaces, we obtain excess risk bounds that achieve optimal convergence rates up to constant factors. We then derive refined excess risk bounds by upper bounding the covering numbers of Transformer hypothesis spaces using matrix ranks and matrix norms, leading to precise, architecture-dependent generalization bounds. Finally, we relax the boundedness assumption on feature mappings and extend our theoretical results to settings with unbounded (sub-Gaussian) features and heavy-tailed distributions.
Paper Structure (30 sections, 23 theorems, 100 equations, 1 table)

This paper contains 30 sections, 23 theorems, 100 equations, 1 table.

Key Result

Theorem 4.4

Suppose assumptions cond:bounded-params, cond:bounded-target-inputs, and cond:lipschitz-excess hold. Let $\widehat{f}_n$ be the empirical risk minimizer. Then: where $M_{\mathrm{SH}} := 2\kappa B + 2\kappa B_{w}B_{c}B_v L_{\sigma} B_X$.

Theorems & Definitions (40)

  • Definition 3.1: Offset Rademacher Complexity
  • Theorem 4.4
  • Corollary 4.5
  • Theorem 4.7
  • Corollary 4.8
  • Theorem 4.11
  • Remark 4.12
  • Corollary 4.13
  • Lemma 5.2: Linear Covering Number
  • Theorem 5.3: Multi-Layer Norm-Based Bound
  • ...and 30 more