Representation of Linguistic Form and Function in Recurrent Neural Networks
Paper · 2017 · Ákos Kádár, Grzegorz Chrupała and Afra Alishahi
Summary
The paper addresses a gap in how we understand RNNs for language. Their hidden states are hard to interpret, and most interpretability work has focused on vision models rather than recurrent language models. Kádár, Chrupała and Alishahi propose two analysis tools:
- Omission score: estimates how much each input token contributes to a network's final sentence representation by comparing the output with and without that token.
- Mutual information measure: links individual hidden dimensions to different kinds of n-gram contexts, either word-based or built from dependency relation labels.
The main case study is IMAGINET, a multi-task GRU architecture with shared word embeddings and two pathways. VISUAL predicts image vectors from captions, while TEXTUAL predicts the next word. A standalone GRU language model (LM) and a sum-of-embeddings baseline (SUM) serve as comparisons.
VISUAL focuses on semantically loaded words, especially nouns, and weighs words differently depending on their grammatical role and position in the sentence. The language models respond more to syntactic, structural cues. The study matters because it offers reusable, quantitative ways to look inside sentence encoders built on RNNs.
Key points
- Three models are compared: IMAGINET (VISUAL and TEXTUAL GRU pathways coupled through shared embeddings), a standalone GRU LM, and SUM, which shares VISUAL's objective but simply adds word embeddings.
- The omission score assigns each token an importance value. It shows that VISUAL attends selectively to nouns and other content-bearing categories, while the language models also weigh syntactic function words.
- Bootstrapping the log ratio between the models' median mutual information values shows:
- TEXTUAL is more tied to dependency relation contexts than VISUAL is.
- The difference between LM and TEXTUAL is small, with overlapping distributions.
- Individual dimensions specialize, as Table 2 shows:
- In all three networks, the top dimension for dependency trigrams tracks animate root/subject constructions modified by a participle or prepositional phrase.
- LM dimension 324 fires on "X preparing"-type bigrams.
- The authors argue the method generalizes to LSTMs, Tree-LSTM and Kim's CNN, although the position-based analyses only make sense for sequential RNNs.
Institutions
📚 Shelves 4 Computer Science · 9,086 works Artificial Intelligence · 8,889 works Arts and Humanities · 9,296 works Language and Linguistics · 9,206 works
🧭 Topics 1 Language models & pretraining · 1,343 works
Cite
Cite as Ákos Kádár, Grzegorz Chrupała and Afra Alishahi. 2017. Representation of Linguistic Form and Function in Recurrent Neural Networks. Computational Linguistics.
@article{kadar2017representation,
title = {{Representation of Linguistic Form and Function in Recurrent Neural Networks}},
author = {Ákos Kádár, Grzegorz Chrupała and Afra Alishahi},
journal = {Computational Linguistics},
year = {2017},
doi = {10.1162/coli\_a\_00300},
url = {https://doi.org/10.1162/coli_a_00300}
}References
- Adi, Yossi, Einat Kermany, Yonatan Belinkov, Ofer Lavi, and Yoav Goldberg. 2017. Fine-grained analysis of sentence embeddings using auxiliary prediction tasks. In International Conference on Learning Representations (ICLR), Toulon, France. our card
- Bahdanau, Dzmitry, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representation (ICLR), San Diego, CA, USA. Cho, Kyunghyun, Bart van Merriënboer, Dzmitry Bahdanau, and Yoshua Bengio. 2014. On th… our card
- Chung, Junyoung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. 2014. Empirical evaluation of gated recurrent neural networks on sequence modeling. In NIPS 2014 Deep Learning and Representation Learning Workshop, Montreal, Quebec, Canada. find
- Dosovitskiy, Alexey and Thomas Brox. 2015. Understanding deep image representations by inverting them. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5188–5196, Boston, MA. find
- Eigen, David, Jason Rolfe, Rob Fergus, and Yann LeCun. 2014. Understanding deep architectures using a recursive convolutional network. In International Conference on Learning Representations (ICLR). find
- Elman, Jeffrey L. 1990. Finding structure in time. Cognitive Science, 14(2):179–211. find
- Elman, Jeffrey L. 1991. Distributed representations, simple recurrent networks, and grammatical structure. Machine Learning, 7(2-3):195–225. find
- Erhan, Dumitru, Yoshua Bengio, Aaron Courville, and Pascal Vincent. 2009. Visualizing higher-layer features of a deep network. In International Conference on Machine Learning (ICML) Workshop on Learning Feature Hierarchies, volume 1341. find
- Giles, C. Lee, Clifford B. Miller, Dong Chen, Guo-Zheng Sun, Hsing-Hen Chen, and Yee-Chun Lee. 1991. Extracting and learning an unknown grammar with recurrent neural networks. In Advances in Neural Information Processing Systems, pages 317–324. find
- Gregor, Karol, Ivo Danihelka, Alex Graves, and Daan Wierstra. 2015. Draw: A recurrent neural network for image generation. In International Conference on Machine Learning (ICML). Hochreiter, Sepp and Jürgen Schmidhuber. 1997. Long short-term memory. Neural Computation, 9(8):1735–1780. find
- Jordan, Michael I. 1986. Attractor dynamics and parallelism in a connectionist sequential network. In Proceedings of the Eighth Annual Conference of the Cognitive Science Society, pages 531–546, Amherst, MA. find
- Karpathy, Andrej and Li Fei-Fei. 2015. Deep visual-semantic alignments for generating image descriptions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3128–3137, Boston, MA. our card
- Karpathy, Andrej, Justin Johnson, and Fei-Fei Li. 2016. Visualizing and understanding recurrent networks. In International Conference on Learning Representations (ICLR) Workshop, San Juan, Puerto Rico. our card
- Kim, Yoon. 2014. Convolutional neural networks for sentence classification. In Conference on Empirical Methods in Natural Language Processing (EMNLP). our card
- Kiros, Ryan, Yukun Zhu, Ruslan R. Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Skip-thought vectors. In Advances in Neural Information Processing Systems, pages 3276–3284. find
- Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. 2012. ImageNet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105. find
- Li, Jiwei, Xinlei Chen, Eduard Hovy, and Dan Jurafsky. 2016a. Visualizing and understanding neural models in NLP. In North American Chapter of the Association for Computational Linguistic (NAACL). our card
- Li, Jiwei, Will Monroe, and Dan Jurafsky. 2016. Understanding neural networks through representation erasure. arXiv preprint arXiv:1612.08220. find
- Li, Yixuan, Jason Yosinski, Jeff Clune, Hod Lipson, and John Hopcroft. 2016b. Convergent learning: Do different neural networks learn the same representations? In International Conference on Learning Representation (ICLR). Lin, Tsung Yi, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva… our card
- Linzen, Tal, Emmanuel Dupoux, and Yoav Goldberg. 2016. Assessing the ability of LSTMs to learn syntax-sensitive dependencies. Transactions of the Association for Computational Linguistics, 4:521–535. our card
- Mahendran, Aravindh and Andrea Vedaldi. 2015. Understanding deep image representations by inverting them. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5188–5196. find
- Mahendran, Aravindh and Andrea Vedaldi. 2016. Visualizing deep convolutional neural networks using natural pre-images. International Journal of Computer Vision, 120(3):233–255. find
- Nguyen, Anh, Jason Yosinski, and Jeff Clune. 2016. Multifaceted feature visualization: Uncovering the different types of features learned by each neuron in deep neural networks. In Visualization for Deep Learning Workshop at International Conference on Machine Learning (ICML). Rocktäschel, Tim, Edw… our card
- Simonyan, K. and A. Zisserman. 2015. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations (ICLR). our card
- Simonyan, Karen, Andrea Vedaldi, and Andrew Zisserman. 2014. Deep inside convolutional networks: Visualising image classification models and saliency maps. In International Conference on Learning Representation (ICLR) Workshop. our card
- Sutskever, Ilya, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. In Advances in Neural Information Processing Systems, pages 3104–3112. find
- Tai, Kai Sheng, Richard Socher, and Christopher D. Manning. 2015. Improved semantic representations from tree-structured long short-term memory networks. In Association for Computational Linguistic (ACL). find
- Vinyals, Oriol, Łukasz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, and Geoffrey Hinton. 2015. Grammar as a foreign language. In Advances in Neural Information Processing Systems, pages 2755–2763. find
- Visin, Francesco, Kyle Kastner, Aaron Courville, Yoshua Bengio, Matteo Matteucci, and Kyunghyun Cho. 2016. ReSeg: A recurrent neural network for object segmentation. In IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW). find
- Yosinski, Jason, Jeff Clune, Anh Nguyen, Thomas Fuchs, and Hod Lipson. 2015. Understanding neural networks through deep visualization. In International Conference on Machine Learning (ICML). find
- Yu, Haonan, Jiang Wang, Zhiheng Huang, Yi Yang, and Wei Xu. 2015. Video paragraph captioning using hierarchical recurrent neural networks. In Describing and Understanding Video & The Large Scale Movie Description Challenge (LSMDC) at International Conference on Computer Vision (ICCV). find
- Zhou, Bolei, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. 2015. Object detectors emerge in deep scene CNNs. In International Conference on Learning Representations (ICLR). find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/kadar-2017-representation-linguistic-form-function-recurrent/