Benchmark tests transformers and RNNs across sampled formal language classes
A new arXiv paper introduces SoL, a benchmark of 30 randomly sampled languages per class, testing what transformers, RNNs, and LSTMs can actually recognize.
In plain words
Researchers use formal languages, which are mathematically defined sets of strings, to measure what neural networks can compute. The authors built a benchmark that samples many languages from each difficulty class instead of a few hand-picked ones. Their tests show transformers handle some simple classes but not others, and no model recognizes context-free languages perfectly.
What was announced
The paper, posted to arXiv, argues that theoretical work on what neural networks can express often relies on simplifications such as hard attention that differ from real architectures, while earlier empirical studies tested only small, hand-picked sets of languages. To close that gap, the authors evaluated transformers, simple RNNs, and LSTMs on languages sampled randomly from four classes: R-trivial, star-free, regular, and context-free. Sampling uses distributions with full support over each class, so broader coverage becomes a matter of scale.
The experiments, run on a benchmark of 30 languages per class named SoL (Sets of Languages), found that transformers recognize some R-trivial and star-free languages but no non-star-free regular languages. All three model types learned to approximate context-free languages well, yet none recognized them perfectly. The authors also state that their code has been publicly released.
What it does not show
- The source is only the paper's abstract, so experimental details, methods, and full results are not available for verification.
- The findings come from the authors' own experiments and have not been independently confirmed.
Sources
Source-support review completed 3 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 3 Dec 2026
New to the subject? AI from the Ground Up starts from the beginning.