Learning of Tree Automata applied to Neural Language Acceptors
Abstract
We extract visibly pushdown grammars (VPGs) from neural language models in a fully black-box setting. Our work builds on the VPL* framework, which learns VPGs from recurrent networks by exploiting access to the target's internal state. First, we replace the white-box equivalence oracle with PAC sampling over trees. The resulting algorithm applies unchanged to transformer language models and, more generally, to any acceptor exposing only binary decisions. Second, we further observe that the original framework only ever queries the target on well-formed sequences that can be accepted by the most permissive VPG (called BParse) with the target's ranked alphabet. That is, VPL* is blind to the target's behavior outside BParse. Thus, we propose to sample trees directly instead of sequences and call the target with all the resulting sequences in order to provide an error estimate of how far the target deviates from being a VPG. Last but not least, we develop a learner that captures a tree automaton describing discovered behaviors of the target outside BParse, which results in a larger learnable space. We evaluate the approach on several cases, including transformers trained with Dyck grammars and synthetic targets designed to be outside BParse.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI
- Comments
- Presented as WIP paper at ICGI 2026, Delft, the Netherlands, October 2026
Related papers
LimeTree: Linear-Memory Graph Neural Networks over Tree-Graphs for Resource-Efficient Language Modeling and Context Extrapolation
Shared title terminologycs.CLElisabeth Fink
A local language model layered with rule-based and neural detectors for clinical text de-identification: an open-source toolkit and evaluation
Shared title terminologycs.CLValentin Burkin
All Quiet on the Neural Front: Language Models Do Not Report Injected Pain States
Shared title terminologycs.CLEmilio Ferrara
Exploring Multi-Player Social Games as Verifiable Training Grounds for Large Language Models
Shared title terminologycs.CLKeyu He, Michael Li, Jiarui Liu et al.
PazaBench: Large-Scale ASR Benchmark for Low-Resource Languages in Africa
Shared title terminologycs.CLMercy Muchai, Nick Mumero Mwangi, Kevin Chege et al.
DKnown-Jev-2: Article-Level Answer-Evidence Classification and Efficient Inference with a Pre-trained Language Model
Shared title terminologycs.CLQi Li, Jianjun Xu, Jiu Li et al.