Lune

ICLR2026Top-tier venue

Automata Learning and Identification of the Support of Language Models

Satwik Bhattamishra, Michael Hahn, Varun Kanade

Abstract

We study the learnability of languages in the Next Symbol Prediction (NSP) setting, where a learner receives only positive examples from a language together with, for every prefix, (i) whether the prefix itself is in the language and (ii) which next symbols can lead to an accepting string. This setting has been used in prior work to empirically analyze neural sequence models, and additionally, we observe that efficient algorithms for the NSP setting can be used to learn the (truncated) support of language models. We first show that the class of DFAs with at most nn states is identifiable from positive examples augmented with these NSP labels. Nevertheless, even with this richer supervision, we show that PAC-learning DFAs remains computationally hard, and exact identification using only membership queries cannot be achieved in polynomial time. We then present Lnsp⋆\mathrm{L_{nsp}^{\star}}, an extension of Angluin’s L⋆\mathrm{L}^{\star} algorithm, and show that DFAs can be PAC-learned efficiently using a language-model–based teacher that answers membership queries and generates valid strings conditioned on prefix prompts. Finally, we conduct a comprehensive experimental evaluation on 11 regular languages of varying complexity. Using Lnsp⋆\mathrm{L}^{\star}_{\text{nsp}}, we extract DFAs from Transformer-based language models trained on regular languages to evaluate the algorithm’s effectiveness and identify erroneous examples.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Why are Sensitive Functions Hard for Transformers? cites On the Ability and Limitations of Transformers to Recognize Formal Languages
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on6

  1. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
  2. Byte Latent Transformer: Patches Scale Better Than TokensArtidoro Pagnoni, Ramakanth Pasunuru, Pedro Rodríguez, John Nguyen et al.ACL 2025 · 116 citations
  3. On the Ability and Limitations of Transformers to Recognize Formal LanguagesSatwik Bhattamishra, Kabir Ahuja, Navin GoyalEMNLP 2020 · 7 citations
  4. Why are Sensitive Functions Hard for Transformers?Michael Hahn, Mark RofinACL 2024 · 3 citations
  5. RNNs can generate bounded hierarchical languages with optimal memoryJohn Hewitt, Michael Hahn, Surya Ganguli, Percy Liang et al.EMNLP 2020 · 1 citation

Related papers

  1. Active Learning of Symbolic Automata over Rational NumbersSebastián Hagedorn Gaete, Martín Muñoz, Cristian Riveros, Rodrigo Toro IcarteAAAI 2026
  2. Learning Linear Attention in Polynomial TimeMorris Yau, Ekin Akyürek, Jiayuan Mao, Joshua B. Tenenbaum et al.NeurIPS 2025 · 7 citations
  3. The Mystery of the Pathological Path-star Task for Language ModelsArvid FrydenlundEMNLP 2024
  4. Automata Learning: An Algebraic ApproachHenning Urbat, Lutz SchröderLICS 2020 · 22 citations
  5. Active Learning of Deterministic Timed Automata with Myhill-Nerode Style CharacterizationMasaki WagaCAV 2023 · 15 citations
Dusk over the sea between two cliffs drawn in fine vertical lines