Synthesizing Context-free Grammars from Recurrent Neural Networks (Extended Version)
Not on the map. Why?
Abstract (arXiv)
We present an algorithm for extracting a subclass of the context free grammars (CFGs) from a trained recurrent neural network (RNN). We develop a new framework, pattern rule sets (PRSs), which describe sequences of deterministic finite automata (DFAs) that approximate a non-regular language. We present an algorithm for recovering the PRS behind a sequence of such automata, and apply it to the sequences of automata extracted from trained RNNs using the L* algorithm. We then show how the PRS may converted into a CFG, enabling a familiar and useful presentation of the learned language. Extracting the learned language of an RNN is important to facilitate understanding of the RNN and to verify its correctness. Furthermore, the extracted CFG can augment the RNN in classifying correct sentences, as the RNN's predictive accuracy decreases when the recursion depth and distance between matching delimiters of its input sequences increases.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 9 of its 33 references that are in the map. First posted on arXiv 20 Jan 2021.
Builds on
9 of 33 references.
References · 9
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
- 2017Extracting Automata from Recurrent Neural Networks Using Queries and Counterexamplescited by 66
- 2020RNNs can generate bounded hierarchical languages with optimal memorycited by 59
- 2019On the Computational Power of RNNscited by 35
- 2016Rule Extraction Algorithm for Deep Neural Networks: A Reviewcited by 22
- 2018Evaluating the Ability of LSTMs to Learn Context-Free Grammarscited by 16
- 2018Explaining Black Boxes on Sequential Data using Weighted Automatacited by 11
- 2019Connecting First and Second Order Recurrent Networks with Deterministic Finite Automatacited by 1
Built on by
Citing papers per year: 2021: 1; 2022: 1.
2 papers.
- 2022Unsupervised and Few-shot Parsing from Pretrained Language Models10 Jun 2022
- 2021Anomaly Detection with Neural Parsers That Never Reject30 Jul 2021