Elamur Research⌕
☰
home / papers / 2019 / Understanding Learning Dynamics Of Language Models with SVCCA

Understanding Learning Dynamics Of Language Models with SVCCA

Paper · 2019 · Naomi Saphra and Adam Lopez

Summary

Earlier work showed that neural networks implicitly capture linguistic categories, but not how those encodings develop during training. Saphra and Lopez examine this for language models. They train a two-layer LSTM LM on lowercased English Wikipedia and save it after every epoch. At each snapshot, they compare its embedding and recurrent layers with the internal states of separately trained LSTM taggers. The taggers cover four kinds of labels: silver UDP POS, PTB POS from the Groningen Meaning Bank, SEM tags, and the topic of the source Wikipedia article. The comparison uses SVCCA, which first trims noisy dimensions with SVD and then measures how well the two representations correlate in a shared subspace found by CCA. This avoids training a new probe for every layer and epoch.

The LM acquires POS-like structure early in training, while topic information keeps developing later. Over time, recurrent layers grow more similar to the taggers, and embedding layers grow less similar. These findings could guide learning algorithms that make better use of linguistic structure.

Key points

  • LM training data: more than 227 million tokens with a 20K-type vocabulary, from English Wikipedia (70/10/20 split). Training ran for 50 epochs with SGD, and the learning rate was quartered whenever validation loss rose.
  • SVCCA settings: the SVD step keeps enough dimensions to cover 99% of the variance. The empirical ceiling, measured against an identically built LM with a different initialization, peaks around 0.64.
  • Tag sets: UDP POS (spacy) and topic labels come from the 100 longest Wikipedia articles. SEM tags have 66 fine classes grouped into 13 coarse ones. Representations are compared on a shared 191K-token test corpus.
  • Convergence order: in this shallow model, the first recurrent layer settles slightly after the second. This contrasts with Raghu et al. (2017), and the authors attribute the difference to their much larger training data.
  • Efficiency and future work: the SVCCA experiments finished in hours, whereas diagnostic-classifier probing took days. The authors suggest future work on gradient starvation and on analysing ELMo.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Cite

Cite as Naomi Saphra and Adam Lopez. 2019. Understanding Learning Dynamics Of Language Models with SVCCA. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/n19-1329

@inproceedings{saphra2019understanding,
  title = {{Understanding Learning Dynamics Of Language Models with SVCCA}},
  author = {Naomi Saphra and Adam Lopez},
  booktitle = {Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)},
  year = {2019},
  doi = {10.18653/v1/n19-1329},
  url = {https://doi.org/10.18653/v1/n19-1329}
}

References

23 references, 7 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Afra Alishahi, Marie Barking, and Grzegorz Chrupała. 2017. Encoding of phonology in a recurrent neural model of grounded speech. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), pages 368–378. find
  2. Yonatan Belinkov, Nadir Durrani, Fahim Dalvi, Hassan Sajjad, and James Glass. 2017. What do Neural Machine Translation Models Learn about Morphology? In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 861–872, Vancouver, Canada.…
  3. Yonatan Belinkov, Lluís Màrquez, Hassan Sajjad, Nadir Durrani, Fahim Dalvi, and James R. Glass. 2018. Evaluating Layers of Representation in Neural Machine Translation on Part-of-Speech and Semantic Tagging Tasks. CoRR, abs/1801.07772.
  4. Johannes Bjerva, Barbara Plank, and Johan Bos. 2016. Semantic Tagging with Deep Residual Networks. In COLING. find
  5. Terra Blevins, Omer Levy, and Luke Zettlemoyer. 2018. Deep RNNs Encode Soft Hierarchical Syntax. arXiv:1805.04218 [cs]. ArXiv: 1805.04218.
  6. Johan Bos, Valerio Basile, Kilian Evang, Noortje J Venhuizen, and Johannes Bjerva. 2017. The groningen meaning bank. In Handbook of linguistic annotation, pages 463–496. Springer. find
  7. Ondřej Cífka and Ondřej Bojar. 2018. Are bleu and meaning representation in opposition? arXiv preprint arXiv:1805.06536. find
  8. Remi Tachet des Combes, Mohammad Pezeshki, Samira Shabanian, Aaron Courville, and Yoshua Bengio. 2018. On the Learning Dynamics of Deep Neural Networks. arXiv:1809.06848 [cs, stat]. ArXiv: 1809.06848. — [arXiv:1809.06848](https://arxiv.org/abs/1809.06848) find
  9. Alexis Conneau, German Kruszewski, Guillaume Lample, Loïc Barrault, and Marco Baroni. 2018. What you can cram into a single vector: Probing sentence embeddings for linguistic properties. arXiv:1805.01070 [cs]. ArXiv: 1805.01070.
  10. Jonathan Frankle and Michael Carbin. 2018. The Lottery Ticket Hypothesis: Training Pruned Neural Networks. arXiv:1803.03635 [cs]. ArXiv: 1803.03635. find
  11. Mario Giulianelli, Jack Harding, Florian Mohnert, Dieuwke Hupkes, and Willem Zuidema. 2018. Under the Hood: Using Diagnostic Classifiers to Investigate and Improve how Language Models Track Agreement Information. arXiv:1808.08079 [cs]. ArXiv: 1808.08079. find
  12. Dieuwke Hupkes, Sara Veldhoen, and Willem Zuidema. 2018. Visualisation and’diagnostic classifiers’ reveal how recurrent and recursive neural networks process hierarchical structure. Journal of Artificial Intelligence Research, 61:907–926. find
  13. Yova Kementchedjhieva and Adam Lopez. 2018. Indicatements that character language models learn English morpho-syntactic units and regularities. In Proc. of Workshop on Analyzing and interpreting neural networks for NLP. find
  14. Urvashi Khandelwal, He He, Peng Qi, and Dan Jurafsky. 2018. Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Context. arXiv:1805.04623 [cs]. ArXiv: 1805.04623. find
  15. Christo Kirov and Ryan Cotterell. 2018. Recurrent neural networks in linguistic theory: Revisiting pinker and prince (1988) and the past tense debate. arXiv preprint arXiv:1807.04783.
  16. Tal Linzen, Emmanuel Dupoux, and Yoav Goldberg. 2016. Assessing the Ability of LSTMs to Learn Syntax-Sensitive Dependencies. arXiv:1611.01368 [cs]. ArXiv: 1611.01368.
  17. Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word representations. arXiv preprint arXiv:1802.05365.
  18. Maithra Raghu, Justin Gilmer, Jason Yosinski, and Jascha Sohl-Dickstein. 2017. SVCCA: Singular Vector Canonical Correlation Analysis for Deep Learning Dynamics and Interpretability. arXiv:1706.05806 [cs, stat]. ArXiv: 1706.05806. — [arXiv:1706.05806](https://arxiv.org/abs/1706.05806) find
  19. Ravid Shwartz-Ziv and Naftali Tishby. 2017. Opening the Black Box of Deep Neural Networks via Information. arXiv:1703.00810 [cs]. ArXiv: 1703.00810. — [arXiv:1703.00810](https://arxiv.org/abs/1703.00810) find
  20. Eva Vanmassenhove, Jinhua Du, and Andy Way. 2017. Investigating ‘aspect’in nmt and smt: Translating the english simple past and present perfect. Computational Linguistics in the Netherlands Journal, 7:109–128. find
  21. John Wieting and Douwe Kiela. 2019. No training required: Exploring random encoders for sentence classification. arXiv preprint arXiv:1901.10444. — [arXiv:1901.10444](https://arxiv.org/abs/1901.10444) find
  22. Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. 2016. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530. find
  23. Kelly W. Zhang and Samuel R. Bowman. 2018. Language Modeling Teaches You More Syntax than Translation Does: Lessons Learned Through Auxiliary Task Analysis. arXiv:1809.10040 [cs]. ArXiv: 1809.10040. find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/saphra-2019-understanding-learning-dynamics-language-models/