跳到正文
研踪PaperTrail
← 研踪 PaperTrail

arXiv:2612.00199 · v1

Benchmarking Neural Networks on Formal Language Classes

首次提交 2026-12-01 03:06
版本更新 2026-12-01 03:06
雷达观测 2026-12-02 23:13
arXiv ↗PDF ↗

摘要

Understanding the computational abilities of neural networks is key to predicting their performance on real-world tasks, and formal language theory offers a mature, rigorous framework for characterizing what kinds of problems they can solve. A large body of theoretical work has sought to pin down which formal language classes they can express, but this work relies on various simplifications (e.g., hard attention) that differ from practice. Empirical studies that use unsimplified architectures therefore provide an important supplement to this work, but they typically evaluate models on small sets of hand-picked languages, leaving the rest of a class drastically underexplored. To remedy this, we evaluate transformers, simple RNNs, and LSTMs on formal languages sampled randomly from a hierarchy of pertinent classes: R\mathscr{R}-trivial, star-free, regular, and context-free languages. We sample from distributions with full support over each class, so expanding the coverage of a class is simply a matter of scale. Our experiments on a benchmark of 30 languages per class, which we call SoL (Sets of Languages), reveal that transformers recognize some R\mathscr{R}-trivial and star-free languages but no non-star-free regular languages. All models learn to approximate context-free languages well but struggle to recognize them perfectly. We have publicly released our code.

作者备注:34 pages, 1 figure

AI 论文解读

基于摘要 · 非全文审阅

此版本尚未生成 AI 解读。解读由后台任务生成并按论文版本保存,登录后共享已有结果。

版本差异

目前只收录了一个版本。收录下一版后,可以对照标题、作者、分类和摘要。

观测到的版本

相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。

v1 · 2026-12-01 03:06 · 最新观测版本

Benchmarking Neural Networks on Formal Language Classes

Understanding the computational abilities of neural networks is key to predicting their performance on real-world tasks, and formal language theory offers a mature, rigorous framework for characterizing what kinds of problems they can solve. A large body of theoretical work has sought to pin down which formal language classes they can express, but this work relies on various simplifications (e.g., hard attention) that differ from practice. Empirical studies that use unsimplified architectures therefore provide an important supplement to this work, but they typically evaluate models on small sets of hand-picked languages, leaving the rest of a class drastically underexplored. To remedy this, we evaluate transformers, simple RNNs, and LSTMs on formal languages sampled randomly from a hierarchy of pertinent classes: R\mathscr{R}-trivial, star-free, regular, and context-free languages. We sample from distributions with full support over each class, so expanding the coverage of a class is simply a matter of scale. Our experiments on a benchmark of 30 languages per class, which we call SoL (Sets of Languages), reveal that transformers recognize some R\mathscr{R}-trivial and star-free languages but no non-star-free regular languages. All models learn to approximate context-free languages well but struggle to recognize them perfectly. We have publicly released our code.

查看此版本解读 →查看此版本原文 ↗