30
1

On Rank-Dependent Generalisation Error Bounds for Transformers

Lan V. Truong
Abstract

In this paper, we introduce various covering number bounds for linear function classes, each subject to different constraints on input and matrix norms. These bounds are contingent on the rank of each class of matrices. We then apply these bounds to derive generalization errors for single layer transformers. Our results improve upon several existing generalization bounds in the literature and are independent of input sequence length, highlighting the advantages of employing low-rank matrices in transformer design. More specifically, our achieved generalisation error bound decays as O(1/n)O(1/\sqrt{n}) where nn is the sample length, which improves existing results in research literature of the order O((logn)/(n))O((\log n)/(\sqrt{n})). It also decays as O(logrw)O(\log r_w) where rwr_w is the rank of the combination of query and and key matrices.

View on arXiv
Comments on this paper