Convolutional networks trained on a random hierarchical grammar improve twice as fast with data as transformers, because weight sharing reuses the statistical signal across all positions.
Can Transformers Learn $n$-gram Language Models?
1 Pith paper cite this work. Polarity classification is still indexing.
abstract
Much theoretical work has described the ability of transformers to represent formal languages. However, linking theoretical results to empirical performance is not straightforward due to the complex interplay between the architecture, the learning algorithm, and training data. To test whether theoretical lower bounds imply \emph{learnability} of formal languages, we turn to recent work relating transformers to $n$-gram language models (LMs). We study transformers' ability to learn random $n$-gram LMs of two kinds: ones with arbitrary next-symbol probabilities and ones where those are defined with shared parameters. We find that classic estimation techniques for $n$-gram LMs such as add-$\lambda$ smoothing outperform transformers on the former, while transformers perform better on the latter, outperforming methods specifically designed to learn $n$-gram LMs.
fields
cs.LG 1years
2025 1verdicts
CONDITIONAL 1representative citing papers
citing papers explorer
-
Scaling Laws and Representation Learning in Simple Hierarchical Languages: Transformers vs. Convolutional Architectures
Convolutional networks trained on a random hierarchical grammar improve twice as fast with data as transformers, because weight sharing reuses the statistical signal across all positions.