Elamur Research
☰
home / papers / 2019 / What do you learn from context? Probing for sentence structure in contextualized word representations

What do you learn from context? Probing for sentence structure in contextualized word representations

Written for the Research library (claude-opus-5-5) from the paper text, in our own words: the license "arXiv — non-exclusive licence to distribute" does not allow redistributing the text itself. Original — arxiv.org/pdf/1905.06316

Summary

Contextual encoders such as ELMo and BERT raised the state of the art on many NLP benchmarks, but it was not clear what knowledge their token vectors carry beyond ordinary word embeddings. The authors propose "edge probing", a single framework that turns any span-based annotation into labeled edges between one or two spans. A small trainable classifier, made of span pooling plus an MLP, reads the frozen encoder outputs and predicts the labels. Every task is scored with binary F1. With this setup they test CoVe, ELMo, OpenAI GPT and BERT on eight sub-sentence tasks drawn from the classic NLP pipeline, from POS tags to coreference. Word-level baselines separate what context adds from what the word identity alone already gives. The result is that these encoders capture syntax well, but their advantage over non-contextual vectors is much smaller on semantic tasks. This gives a standard diagnostic tool for comparing pretrained encoders. The code is released in the jiant toolkit.

Key points

  • The eight tasks are POS, constituents, dependencies, named entities, SRL, coreference, semantic proto-roles (SPR1, SPR2) and relation classification. There is also a Winograd-style DPR coreference challenge set.
  • Data sources: OntoNotes 5.0 supplies five tasks. Dependencies come from the English Web Treebank in Universal Dependencies 2.2. Relations come from SemEval 2010 Task 8, which has 9 directional relation types.
  • Encoder weights stay frozen. Only the probe is trained, so the results show what pretraining alone provides. ELMo layers are combined with learned scalar weights. GPT and BERT are tested in two variants: concatenated (cat) and scalar-mixed (mix).
  • Models tested: BERT-base (12 layers) and BERT-large (24 layers), both trained on Toronto Books (800M words) plus Wikipedia (2.5B words); GPT trained on Toronto Books; ELMo trained on the Billion Word Benchmark.
  • Spans are mapped onto each encoder's own tokenization (Moses or subword) using a byte-level Levenshtein alignment.

The middle of the paper, including the results tables, was cut from the extracted text. So the summary gives the main finding at the level of detail in the abstract, and the key points include no per-task scores.

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

Fields: Other

Topics: Coreference resolution

Cited by

456 papers of our library cite it (of the 140673 whose bibliographies we read); 34 of them have a page here, 422 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1905.06316 · arXiv 1905.06316

@misc{tenney2019what,
  title = {{What do you learn from context? Probing for sentence structure in contextualized word representations}},
  author = {Tenney, Ian and Xia, Patrick and Chen, Berlin and Wang, Alex and Poliak, Adam and McCoy, R Thomas and Kim, Najoung and Durme, Benjamin Van and Bowman, Samuel R. and Das, Dipanjan and Pavlick, Ellie},
  year = {2019},
  doi = {10.48550/arxiv.1905.06316},
  eprint = {1905.06316},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1905.06316}
}

References

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

  1. Yossi Adi, Einat Kermany, Yonatan Belinkov, Ofer Lavi, and Yoav Goldberg. Fine-grained analysis of sentence embeddings using auxiliary prediction tasks. In Proceedings of ICLR, 2017. find our card
  2. Yonatan Belinkov. On internal language representations in deep learning: An analysis of machine translation and speech recognition. PhD thesis, Massachusetts Institute of Technology, 2018. find
  3. Yonatan Belinkov, Nadir Durrani, Fahim Dalvi, Hassan Sajjad, and James Glass. What do neural machine translation models learn about morphology? In Proceedings of EMNLP, 2017a. find our card
  4. Yonatan Belinkov, Lluı́s Màrquez, Hassan Sajjad, Nadir Durrani, Fahim Dalvi, and James Glass. Evaluating layers of representation in neural machine translation on part-of-speech and semantic tagging tasks. In Proceedings of IJCNLP, 2017b. find our card
  5. Terra Blevins, Omer Levy, and Luke Zettlemoyer. Deep RNNs encode soft hierarchical syntax. In Proceedings of ACL, 2018. find
  6. Ondřej Bojar, Christian Buck, Rajen Chatterjee, Christian Federmann, Yvette Graham, Barry Haddow, Matthias Huck, Antonio Jimeno Yepes, Philipp Koehn, and Julia Kreutzer (eds.). Proceedings of the Second Conference on Machine Translation. 2017. find
  7. Ciprian Chelba, Tomas Mikolov, Mike Schuster, Qi Ge, Thorsten Brants, Phillipp Koehn, and Tony Robinson. One billion word benchmark for measuring progress in statistical language modeling. In Proceedings of Interspeech, 2014. find our card
  8. Alexis Conneau and Douwe Kiela. SentEval: An evaluation toolkit for universal sentence representations. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation, 2018. find our card
  9. Alexis Conneau, Douwe Kiela, Holger Schwenk, Loı̈c Barrault, and Antoine Bordes. Supervised learning of universal sentence representations from natural language inference data. In Proceedings of EMNLP, 2017. find our card
  10. Alexis Conneau, Germán Kruszewski, Guillaume Lample, Loı̈c Barrault, and Marco Baroni. What you can cram into a single $&\#* vector: Probing sentence embeddings for linguistic properties. In Proceedings of ACL, 2018. find our card
  11. Ishita Dasgupta, Demi Guo, Andreas Stuhlmüller, Samuel J Gershman, and Noah D Goodman. Evaluating compositionality in sentence embeddings. arXiv preprint 1802.04302, 2018. — [arXiv:1802.04302](https://arxiv.org/abs/1802.04302) find
  12. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint 1810.04805, 2018. find
  13. Allyson Ettinger, Ahmed Elgohary, Colin Phillips, and Philip Resnik. Assessing composition in sentence vector representations. In Proceedings of COLING, 2018. find
  14. Matt Gardner, Joel Grus, Mark Neumann, Oyvind Tafjord, Pradeep Dasigi, Nelson F Liu, Matthew Peters, Michael Schmitz, and Luke Zettlemoyer. AllenNLP: A deep semantic natural language processing platform. In Proceedings of Workshop for NLP Open Source Software (NLP-OSS), 2018. find our card
  15. Daniel Gildea and Martha Palmer. The necessity of parsing for predicate argument recognition. In Proceedings of ACL, 2002. find
  16. Kristina Gulordava, Piotr Bojanowski, Edouard Grave, Tal Linzen, and Marco Baroni. Colorless green recurrent networks dream hierarchically. In Proceedings of NAACL, 2018. find our card
  17. Luheng He, Kenton Lee, Omer Levy, and Luke Zettlemoyer. Jointly predicting predicates and arguments in neural semantic role labeling. In Proceedings of ACL, 2018. find our card
  18. Iris Hendrickx, Su Nam Kim, Zornitsa Kozareva, Preslav Nakov, Diarmuid Ó Séaghdha, Sebastian Padó, Marco Pennacchiotti, Lorenza Romano, and Stan Szpakowicz. SemEval-2010 task 8: Multi-way classification of semantic relations between pairs of nominals. In Proceedings of the Workshop on Semantic Ev… find our card
  19. Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 1997. find
  20. Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text classification. In Proceedings of ACL, 2018. find
  21. Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of ICLR, 2015. find
  22. Ryan Kiros, Yukun Zhu, Ruslan R. Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In Proceedings of NIPS, 2015. find
  23. Nikita Kitaev and Dan Klein. Constituency parsing with a self-attentive encoder. In Proceedings of ACL, July 2018. find our card
  24. Adhiguna Kuncoro, Chris Dyer, John Hale, Dani Yogatama, Stephen Clark, and Phil Blunsom. LSTMs can learn syntax-sensitive dependencies well, but modeling structure makes them better. In Proceedings of ACL, 2018. find
  25. Kenton Lee, Luheng He, Mike Lewis, and Luke Zettlemoyer. End-to-end neural coreference resolution. In Proceedings of EMNLP, 2017. find our card
  26. Kenton Lee, Luheng He, and Luke Zettlemoyer. Higher-order coreference resolution with coarse-to-fine inference. In Proceedings of NAACL, 2018. find our card
  27. Hector J. Levesque, Ernest Davis, and Leora Morgenstern. The winograd schema challenge. In Proceedings of the Thirteenth International Conference on Principles of Knowledge Representation and Reasoning, 2012. find
  28. Tal Linzen, Emmanuel Dupoux, and Yoav Goldberg. Assessing the ability of LSTMs to learn syntax-sensitive dependencies. Transactions of the ACL, 2016. find our card
  29. Rebecca Marvin and Tal Linzen. Targeted syntactic evaluation of language models. In Proceedings of EMNLP, 2018. find
  30. Bryan McCann, James Bradbury, Caiming Xiong, and Richard Socher. Learned in translation: Contextualized word vectors. In Proceedings of NIPS, 2017. find our card
  31. Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S. Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In Proceedings of NIPS, 2013. find
  32. Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. In Proceedings of NIPS, 2017. find
  33. Jeffrey Pennington, Richard Socher, and Christopher Manning. GloVe: Global vectors for word representation. In Proceedings of EMNLP, 2014. find
  34. Matthew Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. In Proceedings of NAACL, 2018a. find
  35. Matthew Peters, Mark Neumann, Luke Zettlemoyer, and Wen-tau Yih. Dissecting contextual word embeddings: Architecture and representation. In Proceedings of EMNLP, 2018b. find our card
  36. Adam Poliak, Yonatan Belinkov, James Glass, and Benjamin Van Durme. On the evaluation of semantic phenomena in neural machine translation using natural language inference. In Proceedings of NAACL, 2018a. find
  37. Adam Poliak, Aparajita Haldar, Rachel Rudinger, J. Edward Hu, Ellie Pavlick, Aaron Steven White, and Benjamin Van Durme. Collecting diverse natural language inference problems for sentence representation evaluation. In Proceedings of EMNLP, 2018b. find our card
  38. Vasin Punyakanok, Dan Roth, and Wen-tau Yih. The importance of syntactic parsing and inference in semantic role labeling. Computational Linguistics, 34(2):257–287, 2008. find our card
  39. Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. https://blog.openai.com/language-unsupervised, 2018. ↗
  40. Altaf Rahman and Vincent Ng. Resolving complex cases of definite pronouns: The Winograd schema challenge. In Proceedings of EMNLP, 2012. find our card
  41. Rachel Rudinger, Adam Teichert, Ryan Culkin, Sheng Zhang, and Benjamin Van Durme. Neural Davidsonian semantic proto-role labeling. In Proceedings of EMNLP, 2018. find
  42. Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proceedings of ACL, 2016. find
  43. Xing Shi, Inkit Padhi, and Kevin Knight. Does string-based neural MT learn source syntax? In Proceedings of EMNLP, 2016. find our card
  44. Natalia Silveira, Timothy Dozat, Marie-Catherine de Marneffe, Samuel Bowman, Miriam Connor, John Bauer, and Christopher D. Manning. A gold standard dependency corpus for English. In Proceedings of the Ninth International Conference on Language Resources and Evaluation, 2014. find
  45. Emma Strubell, Patrick Verga, Daniel Andor, David Weiss, and Andrew McCallum. Linguistically-informed self-attention for semantic role labeling. In Proceedings of EMNLP, 2018. find our card
  46. Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Proceedings of NIPS, 2014. find
  47. Adam Teichert, Adam Poliak, Benjamin Van Durme, and Matthew Gormley. Semantic proto-role labeling. In Proceedings of AAAI, 2017. find
  48. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proceedings of NIPS, 2017. find
  49. Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, 2018. find our card
  50. Ralph Weischedel, Martha Palmer, Mitchell Marcus, Eduard Hovy, Sameer Pradhan, Lance Ramshaw, Nianwen Xue, Ann Taylor, Jeff Kaufman, Michelle Franchini, et al. OntoNotes release 5.0 LDC2013T19. Linguistic Data Consortium, Philadelphia, PA, 2013. find
  51. Aaron Steven White, Pushpendre Rastogi, Kevin Duh, and Benjamin Van Durme. Inference is everything: Recasting semantic resources into a unified evaluation framework. In Proceedings of IJCNLP, 2017. find our card
  52. Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint 1609.08144, 2016. find
  53. Kelly Zhang and Samuel Bowman. Language modeling teaches you more than translation does: Lessons learned through auxiliary syntactic task analysis. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, 2018. find
  54. Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of ICCV, 2015. find our card