Evaluating the Ability of LSTMs to Learn Context-Free Grammars [article]

Luzi Sennhauser, Robert C. Berwick
<span title="2018-11-06">2018</span> <i > arXiv </i> &nbsp; <span class="release-stage" >pre-print</span>
While long short-term memory (LSTM) neural net architectures are designed to capture sequence information, human language is generally composed of hierarchical structures. This raises the question as to whether LSTMs can learn hierarchical structures. We explore this question with a well-formed bracket prediction task using two types of brackets modeled by an LSTM. Demonstrating that such a system is learnable by an LSTM is the first step in demonstrating that the entire class of CFLs is also
more &raquo; ... arnable. We observe that the model requires exponential memory in terms of the number of characters and embedded depth, where a sub-linear memory should suffice. Still, the model does more than memorize the training input. It learns how to distinguish between relevant and irrelevant information. On the other hand, we also observe that the model does not generalize well. We conclude that LSTMs do not learn the relevant underlying context-free rules, suggesting the good overall performance is attained rather by an efficient way of evaluating nuisance variables. LSTMs are a way to quickly reach good results for many natural language tasks, but to understand and generate natural language one has to investigate other concepts that can make more direct use of natural language's structural nature.
<span class="external-identifiers"> <a target="_blank" rel="external noopener" href="https://arxiv.org/abs/1811.02611v1">arXiv:1811.02611v1</a> <a target="_blank" rel="external noopener" href="https://fatcat.wiki/release/q7dwxdl7fbdrnfm3z5h6yoey3i">fatcat:q7dwxdl7fbdrnfm3z5h6yoey3i</a> </span>
<a target="_blank" rel="noopener" href="https://web.archive.org/web/20200914101948/https://arxiv.org/pdf/1811.02611v1.pdf" title="fulltext PDF download" data-goatcounter-click="serp-fulltext" data-goatcounter-title="serp-fulltext"> <button class="ui simple right pointing dropdown compact black labeled icon button serp-button"> <i class="icon ia-icon"></i> Web Archive [PDF] <div class="menu fulltext-thumbnail"> <img src="https://blobs.fatcat.wiki/thumbnail/pdf/34/80/3480824da5606c414e6c2cd0510535f8d1c9dfdd.180px.jpg" alt="fulltext thumbnail" loading="lazy"> </div> </button> </a> <a target="_blank" rel="external noopener" href="https://arxiv.org/abs/1811.02611v1" title="arxiv.org access"> <button class="ui compact blue labeled icon button serp-button"> <i class="file alternate outline icon"></i> arxiv.org </button> </a>