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.
Cited by
- Probing Classifiers: Promises, Shortcomings, and Advances
- Climbing towards NLU: On Meaning, Form, and Understanding in the Age of Data
- Visualizing and Measuring the Geometry of BERT
- Do Pretrained Contextual Language Models Distinguish between Hebrew Homograph Analyses?
- Multi-Sentence Argument Linking
- Applying Occam's Razor to Transformer-Based Dependency Parsing: What Works, What Doesn't, and What is Really Necessary
- A Fine-Grained Analysis of BERTScore
- A Structural Probe for Finding Syntax in Word Representations
- The Interplay of Variant, Size, and Task Type in Arabic Pre-trained Language Models
- What Does BERT Learn about the Structure of Language?
- How Can We Know What Language Models Know?
- Probing What Different NLP Tasks Teach Machines about Function Word Comprehension
- Attention is Not Only a Weight: Analyzing Transformers with Vector Norms
- Open Sesame: Getting inside BERT's Linguistic Knowledge
- Linguistic Knowledge and Transferability of Contextual Representations
- SPARTQA: A Textual Question Answering Benchmark for Spatial Reasoning
- Language Models as Knowledge Bases?
- How Context Affects Language Models' Factual Predictions
- Information-Theoretic Probing for Linguistic Structure
- Intermediate-Task Transfer Learning with Pretrained Language Models: When and Why Does It Work?
- Pre-trained Models for Natural Language Processing: A Survey
- oLMpics -- On what Language Model Pre-training Captures
- BERT Rediscovers the Classical NLP Pipeline
- Information-Theoretic Probing with Minimum Description Length
- SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systems
- BLiMP: The Benchmark of Linguistic Minimal Pairs for English
- Measuring and Reducing Gendered Correlations in Pre-trained Models
- TOD-BERT: Pre-trained Natural Language Understanding for Task-Oriented Dialogue
- ZeroGen: Efficient Zero-shot Learning via Dataset Generation
- PAWS: Paraphrase Adversaries from Word Scrambling
- Revisiting Few-sample BERT Fine-tuning
- MoverScore: Text Generation Evaluating with Contextualized Embeddings and Earth Mover Distance
- Explainability for Large Language Models: A Survey
- Factual Probing Is [MASK]: Learning vs. Learning to Recall
Cite
@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
- 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
- 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
- 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
- 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
- Terra Blevins, Omer Levy, and Luke Zettlemoyer. Deep RNNs encode soft hierarchical syntax. In Proceedings of ACL, 2018. find
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Allyson Ettinger, Ahmed Elgohary, Colin Phillips, and Philip Resnik. Assessing composition in sentence vector representations. In Proceedings of COLING, 2018. find
- 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
- Daniel Gildea and Martha Palmer. The necessity of parsing for predicate argument recognition. In Proceedings of ACL, 2002. find
- 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
- 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
- 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
- Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 1997. find
- Jeremy Howard and Sebastian Ruder. Universal language model fine-tuning for text classification. In Proceedings of ACL, 2018. find
- Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of ICLR, 2015. find
- 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
- Nikita Kitaev and Dan Klein. Constituency parsing with a self-attentive encoder. In Proceedings of ACL, July 2018. find our card
- 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
- Kenton Lee, Luheng He, Mike Lewis, and Luke Zettlemoyer. End-to-end neural coreference resolution. In Proceedings of EMNLP, 2017. find our card
- Kenton Lee, Luheng He, and Luke Zettlemoyer. Higher-order coreference resolution with coarse-to-fine inference. In Proceedings of NAACL, 2018. find our card
- 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
- 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
- Rebecca Marvin and Tal Linzen. Targeted syntactic evaluation of language models. In Proceedings of EMNLP, 2018. find
- Bryan McCann, James Bradbury, Caiming Xiong, and Richard Socher. Learned in translation: Contextualized word vectors. In Proceedings of NIPS, 2017. find our card
- 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
- 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
- Jeffrey Pennington, Richard Socher, and Christopher Manning. GloVe: Global vectors for word representation. In Proceedings of EMNLP, 2014. find
- 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
- 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
- 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
- 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
- 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
- Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. https://blog.openai.com/language-unsupervised, 2018. ↗
- Altaf Rahman and Vincent Ng. Resolving complex cases of definite pronouns: The Winograd schema challenge. In Proceedings of EMNLP, 2012. find our card
- Rachel Rudinger, Adam Teichert, Ryan Culkin, Sheng Zhang, and Benjamin Van Durme. Neural Davidsonian semantic proto-role labeling. In Proceedings of EMNLP, 2018. find
- Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proceedings of ACL, 2016. find
- Xing Shi, Inkit Padhi, and Kevin Knight. Does string-based neural MT learn source syntax? In Proceedings of EMNLP, 2016. find our card
- 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
- 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
- Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. Sequence to sequence learning with neural networks. In Proceedings of NIPS, 2014. find
- Adam Teichert, Adam Poliak, Benjamin Van Durme, and Matthew Gormley. Semantic proto-role labeling. In Proceedings of AAAI, 2017. find
- 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
- 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
- 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
- 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
- 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
- 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
- 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