{"version":1,"type":"story","url":"https://digestai.news/story/benchmarking-transformers-on-formal-language-classes","json":"https://digestai.news/story/benchmarking-transformers-on-formal-language-classes.json","markdown":"https://digestai.news/story/benchmarking-transformers-on-formal-language-classes.md","slug":"benchmarking-transformers-on-formal-language-classes","headline":"Benchmarking transformers on formal language classes","summary":"A new study evaluates transformers, simple RNNs, and LSTMs on formal languages drawn randomly from a hierarchy of classes. The authors sampled 30 languages per class—$mathscr{R}$-trivial, star‑free, regular, and context‑free—and tested the models on the resulting benchmark, called SoL (Sets of Languages). The results show that transformers can recognize some $mathscr{R}$-trivial and star‑free languages but fail to recognize any non‑star‑free regular languages. All three model families learn to approximate context‑free languages well, yet none can recognize them perfectly. The authors have released the code publicly.\n\nThe paper highlights a gap between theoretical work that uses simplified architectures and empirical studies that use realistic models. By sampling languages from full‑support distributions, the authors aim to provide a more comprehensive assessment of neural network capabilities.\n\nThe study is a contribution to the research literature on formal language theory and neural network expressiveness, offering a benchmark that can be used by future work to compare models on a broader set of languages.","keyPoints":["Study tests transformers, RNNs, LSTMs on 30 languages per class","Transformers recognize some $mathscr{R}$-trivial and star‑free languages but none non‑star‑free regular","All models approximate context‑free languages but cannot recognize them perfectly"],"whyItMatters":"The benchmark offers a more realistic assessment of neural network expressiveness, informing future research on model capabilities and limitations.","category":{"slug":"research","name":"Research","url":"https://digestai.news/category/research"},"entities":{"companies":[],"models":[],"people":[]},"firstPublishedAt":"2026-12-02T05:00:00Z","updatedAt":"2026-12-02T05:00:00Z","sourceCount":1,"hasPrimarySource":true,"sources":[{"outlet":"arXiv cs.CL","title":"Benchmarking Neural Networks on Formal Language Classes","url":"https://arxiv.org/abs/2612.00199","publishedAt":"2026-12-02T05:00:00Z","type":"primary","primary":true,"lead":true}],"sourceNotes":null,"discussions":[],"thread":null,"cite":{"text":"Digest AI, \"Benchmarking transformers on formal language classes\", 2 December 2026, https://digestai.news/story/benchmarking-transformers-on-formal-language-classes","publisher":"Digest AI","title":"Benchmarking transformers on formal language classes","datePublished":"2026-12-02T05:00:00Z","url":"https://digestai.news/story/benchmarking-transformers-on-formal-language-classes"},"generatedBy":"Written by Digest AI's editorial model from the linked sources; the sources are the record.","license":"Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse"}