Towards Understanding Inductive Bias in Transformers: A View From Infinity
Itay Lavie, Guy Gur-Ari, Zohar Ringel
TL;DR
This work analyzes the inductive bias of transformers through the neural-network Gaussian process (NNGP) lens, showing a bias toward permutation-symmetric sequence functions when data are invariant under token permutations. By leveraging the representation theory of the symmetric group, the authors derive eigenstructure-based predictions for learnability and generalization, including a context-length scaling law, and validate these predictions using a simplified transformer block with linear activations and a mixture-of-HMM datasets. They demonstrate that the GP predictions extend to wide but finite networks and survive distributional shifts, including out-of-distribution settings, with qualitative support from experiments on linear and nonlinear activations. Additionally, analyses of WikiText-2 indicate that natural language data exhibit approximate permutation symmetry in principal components, aligning with the proposed framework and suggesting practical relevance for NLP model design and evaluation.
Abstract
We study inductive bias in Transformers in the infinitely over-parameterized Gaussian process limit and argue transformers tend to be biased towards more permutation symmetric functions in sequence space. We show that the representation theory of the symmetric group can be used to give quantitative analytical predictions when the dataset is symmetric to permutations between tokens. We present a simplified transformer block and solve the model at the limit, including accurate predictions for the learning curves and network outputs. We show that in common setups, one can derive tight bounds in the form of a scaling law for the learnability as a function of the context length. Finally, we argue WikiText dataset, does indeed possess a degree of permutation symmetry.
