How LSTM Encodes Syntax: Exploring Context Vectors and Semi-Quantization on Natural Text

Chihiro Shibata, Kei Uchiumi, Daichi Mochihashi


Abstract
Long Short-Term Memory recurrent neural network (LSTM) is widely used and known to capture informative long-term syntactic dependencies. However, how such information are reflected in its internal vectors for natural text has not yet been sufficiently investigated. We analyze them by learning a language model where syntactic structures are implicitly given. We empirically show that the context update vectors, i.e. outputs of internal gates, are approximately quantized to binary or ternary values to help the language model to count the depth of nesting accurately, as Suzgun et al. (2019) recently show for synthetic Dyck languages. For some dimensions in the context vector, we show that their activations are highly correlated with the depth of phrase structures, such as VP and NP. Moreover, with an L1 regularization, we also found that it can accurately predict whether a word is inside a phrase structure or not from a small number of components of the context vector. Even for the case of learning from raw text, context vectors are shown to still correlate well with the phrase structures. Finally, we show that natural clusters of the functional words and the part of speeches that trigger phrases are represented in a small but principal subspace of the context-update vector of LSTM.
Anthology ID:
2020.coling-main.356
Volume:
Proceedings of the 28th International Conference on Computational Linguistics
Month:
December
Year:
2020
Address:
Barcelona, Spain (Online)
Editors:
Donia Scott, Nuria Bel, Chengqing Zong
Venue:
COLING
SIG:
Publisher:
International Committee on Computational Linguistics
Note:
Pages:
4033–4043
Language:
URL:
https://aclanthology.org/2020.coling-main.356
DOI:
10.18653/v1/2020.coling-main.356
Bibkey:
Cite (ACL):
Chihiro Shibata, Kei Uchiumi, and Daichi Mochihashi. 2020. How LSTM Encodes Syntax: Exploring Context Vectors and Semi-Quantization on Natural Text. In Proceedings of the 28th International Conference on Computational Linguistics, pages 4033–4043, Barcelona, Spain (Online). International Committee on Computational Linguistics.
Cite (Informal):
How LSTM Encodes Syntax: Exploring Context Vectors and Semi-Quantization on Natural Text (Shibata et al., COLING 2020)
Copy Citation:
PDF:
https://aclanthology.org/2020.coling-main.356.pdf