Cargando…

Synthesizing Context-free Grammars from Recurrent Neural Networks

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 pres...

Descripción completa

Detalles Bibliográficos
Autores principales: Yellin, Daniel M., Weiss, Gail
Formato: Online Artículo Texto
Lenguaje:English
Publicado: 2021
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7979173/
http://dx.doi.org/10.1007/978-3-030-72016-2_19
_version_ 1783667238810681344
author Yellin, Daniel M.
Weiss, Gail
author_facet Yellin, Daniel M.
Weiss, Gail
author_sort Yellin, Daniel M.
collection PubMed
description 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 [Formula: see text] 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.
format Online
Article
Text
id pubmed-7979173
institution National Center for Biotechnology Information
language English
publishDate 2021
record_format MEDLINE/PubMed
spelling pubmed-79791732021-03-23 Synthesizing Context-free Grammars from Recurrent Neural Networks Yellin, Daniel M. Weiss, Gail Tools and Algorithms for the Construction and Analysis of Systems Article 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 [Formula: see text] 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. 2021-03-01 /pmc/articles/PMC7979173/ http://dx.doi.org/10.1007/978-3-030-72016-2_19 Text en © The Author(s) 2021 Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
spellingShingle Article
Yellin, Daniel M.
Weiss, Gail
Synthesizing Context-free Grammars from Recurrent Neural Networks
title Synthesizing Context-free Grammars from Recurrent Neural Networks
title_full Synthesizing Context-free Grammars from Recurrent Neural Networks
title_fullStr Synthesizing Context-free Grammars from Recurrent Neural Networks
title_full_unstemmed Synthesizing Context-free Grammars from Recurrent Neural Networks
title_short Synthesizing Context-free Grammars from Recurrent Neural Networks
title_sort synthesizing context-free grammars from recurrent neural networks
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7979173/
http://dx.doi.org/10.1007/978-3-030-72016-2_19
work_keys_str_mv AT yellindanielm synthesizingcontextfreegrammarsfromrecurrentneuralnetworks
AT weissgail synthesizingcontextfreegrammarsfromrecurrentneuralnetworks