atlas

Research map / Architectures and efficiency / Attention and transformers

Training Neural Networks as Recognizers of Formal Languages

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Attention head mechanisms · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Trains RNNs, LSTMs, and causally-masked transformers directly as binary string classifiers on 18 formal languages across the Chomsky hierarchy, introducing the FLaRe benchmark and an efficient length-controlled sampler for regular languages.

Problem

Empirical tests of neural network expressivity claims (formal language theory) typically use language modeling or string-to-string transduction, which does not match the recognizer definitions the theory is about; a recognition-based setup is needed.

Approach

Train networks as binary recognizers using positive samples from length-controlled sampling (binning semiring for regular languages) and adversarial negatives made by random edits of positives, with optional language-modeling and next-symbol prediction auxiliary losses.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use an RNN or LSTM instead of a transformerNeural recognizers · Formal-language tests, length [0, 500]accuracyHelped
Add next-symbol prediction loss (ablation)RNN recognizer · Even PairsaccuracyHelped
Add language-modeling loss (ablation)LSTM recognizer · ParityaccuracyHurt
Add auxiliary language-modeling and/or next-symbol prediction losses (ablation)Neural recognizers · Formal-language testsaccuracyMixed
Use recognition loss alone rather than an auxiliary-loss variant (ablation)Neural recognizers · Formal-language testsaccuracyHelped

Surprising findings

Limitations

Experimental setup

Datasets: FLaRe (generated from 18 formal languages)

Benchmarks: FLaRe

Metrics: accuracy cross-entropy length generalization accuracy

Baselines: MLRegTest Delétang et al. string-to-string transduction setup Weiss et al. 2018 perturbation negatives

Builds on: binning semiring weight pushing MLRegTest

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy