TRANSMISSION // 2612.00199v1
How well do neural networks recognize formal languages?
Source published
SoL tests transformers, simple RNNs and LSTMs on sampled formal languages. Its abstract reports mixed recognition results and difficulty with perfect context-free recognition.

Formal language theory describes sets of sequences using precise mathematical rules. A new benchmark, SoL, evaluates how transformers, simple recurrent neural networks and LSTMs perform on languages sampled from four named classes.
A broader test of language recognition
Can neural networks learn patterns that computer science describes with formal language theory? The question matters because formal languages provide a rigorous way to study what kinds of sequence-recognition problems a system can handle. Theoretical analyses often simplify neural architectures; empirical tests of models as used in practice can offer a complementary perspective.
In Benchmarking Neural Networks on Formal Language Classes, Brian DuSell and colleagues introduce SoL (Sets of Languages), a benchmark designed to examine more languages within each class than studies based on a handful of hand-picked examples.
What the benchmark tests
The authors evaluate transformers, simple recurrent neural networks (RNNs) and long short-term memory networks (LSTMs). The languages are drawn from four named classes: R-trivial, star-free, regular and context-free. A formal language is a set of sequences formed from an alphabet; membership means that a sequence follows the rules defining that set.
The abstract says the researchers sample from distributions with “full support” over each class. One reasonable interpretation is that the sampling distributions do not rule out members of the class in advance. The abstract does not explain the sampling space or probability details, so this should not be taken as a complete description of how the sampling works.
SoL contains 30 languages per class. The authors describe their approach as making expanded class coverage a matter of scale. That is a rationale for growing the benchmark, not a guarantee that any finite sample will represent every language or capture all variation within a class.
What the authors report
According to the abstract, transformers recognize some R-trivial and star-free languages, but no non-star-free regular languages. The authors also report that all three model types learn to approximate context-free languages well, while struggling to recognize them perfectly.
Approximation and perfect recognition are different standards. As an illustration—not a reported measurement—a model could classify many tested examples correctly while still making errors on some sequences. The abstract does not give scores or explain the precise recognition criterion, so it is not possible from this evidence to quantify how close models came to perfect recognition.
The transformer finding is a report about the authors’ experiments. It should not be turned into a general theorem that transformers cannot recognize non-star-free regular languages. The abstract alone does not provide enough methodological detail to establish such a universal conclusion.
What the abstract leaves open
The motivation for SoL is that a small collection of selected languages can leave much of a class unexplored. Sampling more broadly is meant to improve coverage, while keeping in mind that the benchmark remains finite.
Several details needed to assess the findings are not available in the abstract supplied for this article: the exact sampling procedure, training setup, operational definition of successful recognition, numerical performance results, and variation across runs. This does not establish that the full paper omits those details; they simply cannot be checked from the abstract-only evidence available here. Nor does that evidence support detailed comparisons among individual models or languages.
The authors say they have publicly released their code, which may help others inspect or extend the evaluation. The source is an arXiv preprint, and the supplied information does not establish whether it has undergone peer review. This account is therefore limited to the abstract and should be read as a summary of the authors’ reported findings, not an independent assessment of the full methods or results.
- formal language theory
- neural networks
- transformers
- recurrent neural networks
- LSTM
- machine learning benchmark
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
Can AI Think Deeper Without Using More Memory?
Source published
Shared keywords: recurrent neural networks
Why Bigger Learning Rates May Hurt Long-Sequence Learning
Source published
Shared keywords: recurrent neural networks
Training recurrent networks without unrolling them
Source published
Shared keywords: recurrent neural networks
How Noisy Neural Networks Might Replay Experiences Faster
Source published
Shared keywords: recurrent neural networks
Yggdrasil routes recurrent experts for state tracking
Source published
Shared keywords: recurrent neural networks