What you can cram into a single \$&!\#* vector: Probing sentence embeddings for linguistic properties
Written for the Research library (claude-opus-5-5) from the paper text. Original — aclanthology.org/P18-1198.pdf
Summary
Sentence encoders score well on downstream benchmarks, but those benchmarks need complex inference and can hide biases. That makes it hard to tell what linguistic information an embedding actually stores. The authors propose 10 probing tasks to answer this. Each one is a simple classification problem that takes only a single sentence vector as input, so it works with any encoder architecture. The tasks fall into three groups. Surface tasks cover length and word content. Syntactic tasks cover word-order perturbation, parse-tree depth and top constituents. Semantic tasks cover tense, subject and object number, implausible word substitutions and swapped coordinate clauses. All data come from the Toronto Book Corpus and are annotated with the Stanford Parser. Lexical overlap and length confounds are controlled. The probes are applied to three encoder architectures trained with eight objectives, and probing scores are compared with downstream performance. Trained encoders beat strong baselines on most properties, but architecture matters a great deal: BiLSTM-max holds useful linguistic information even before training. The released data aim to give the field a standard, architecture-neutral way to analyse sentence representations.
Key points
- The benchmark has 10 tasks: SentLen, WC, BShift, TreeDepth, TopConst, Tense, SubjNum, ObjNum, SOMO and CoordInv. Each task has a balanced 100k training set and 10k validation and test sets of 5–28-word sentences from the Toronto Book Corpus, parsed with the Stanford Parser's PCFG model.
- The task designs control for confounds:
- WC asks which of 1,000 mid-frequency words (frequency ranks 2k–3k) a sentence contains.
- TreeDepth (8 classes, depths 5–12) is sampled so that depth does not track sentence length.
- Tense and the number tasks keep target words from overlapping across splits.
- Human-validated upper bounds came from manually checking 200 test sentences per task.
- A correlation analysis across more than 40 embeddings found:
- WC correlates positively with downstream tasks, and SentLen mostly correlates negatively.
- SOMO tracks SICK-E but not SICK-R.
- TREC correlates with the most probing tasks.
- Bag-of-Vectors captures sentence-level properties surprisingly well. BiLSTM-max carries linguistic signal before training, and after training it detects semantic anomalies it never saw during training. The tasks are released in Facebook's SentEval repository.
Cited by
- Physics of Language Models: Part 3.1, Knowledge Storage and Extraction
- Analysis Methods in Neural Language Processing: A Survey
- On the Opportunities and Risks of Foundation Models
- On the Role of Morphological Information for Contextual Lemmatization
- Visualizing and Measuring the Geometry of BERT
- DeCLUTR: Deep Contrastive Learning for Unsupervised Textual Representations
- A Structural Probe for Finding Syntax in Word Representations
- What Does BERT Learn about the Structure of Language?
- Probing What Different NLP Tasks Teach Machines about Function Word Comprehension
- Linguistic Knowledge and Transferability of Contextual Representations
- Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inference
- Dissecting Contextual Word Embeddings: Architecture and Representation
- Sentence Encoders on STILTs: Supplementary Training on Intermediate Labeled-data Tasks
- Information-Theoretic Probing for Linguistic Structure
- Collecting Diverse Natural Language Inference Problems for Sentence Representation Evaluation
- Intermediate-Task Transfer Learning with Pretrained Language Models: When and Why Does It Work?
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
- Masked Language Modeling and the Distributional Hypothesis: Order Word Matters Pre-training for Little
- BERT Rediscovers the Classical NLP Pipeline
- What do you learn from context? Probing for sentence structure in contextualized word representations
- Multilingual is not enough: BERT for Finnish
- Do NLP Models Know Numbers? Probing Numeracy in Embeddings
- BLiMP: The Benchmark of Linguistic Minimal Pairs for English
- PAWS: Paraphrase Adversaries from Word Scrambling
Cite
@inproceedings{conneau2018what,
title = {{What you can cram into a single \$\&!\#* vector: Probing sentence embeddings for linguistic properties}},
author = {Conneau, Alexis and Kruszewski, German and Lample, Guillaume and Barrault, Loïc and Baroni, Marco},
booktitle = {Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
year = {2018},
doi = {10.18653/v1/p18-1198},
eprint = {1805.01070},
archivePrefix = {arXiv},
url = {https://doi.org/10.18653/v1/p18-1198}
}References
- Yossi Adi, Einat Kermany, Yonatan Belinkov, Ofer Lavi, and Yoav Goldberg. 2017. Fine-grained analysis of sentence embeddings using auxiliary prediction tasks. In Proceedings of ICLR Conference Track. Toulon, France. Published online: https://openreview.net/group? id=ICLR.cc/2017/conference. ↗ our card
- Sanjeev Arora, Yingyu Liang, and Tengyu Ma. 2017. A simple but tough-to-beat baseline for sentence embeddings. In Proceedings of ICLR Conference Track. Toulon, France. Published online: https://openreview.net/group? id=ICLR.cc/2017/conference. ↗
- Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. 2016. Layer normalization. Advances in neural information processing systems (NIPS) . find our card
- Yonatan Belinkov, Nadir Durrani, Fahim Dalvi, Hassan Sajjad, and James Glass. 2017a. What do neural machine translation models learn about morphology? In Proceedings of ACL. Vancouver, Canada, pages 861–872. find our card
- Yonatan Belinkov, Lluís Màrquez, Hassan Sajjad, Nadir Durrani, Fahim Dalvi, and James Glass. 2017b. Evaluating layers of representation in neural machine translation on part-of-speech and semantic tagging tasks. In Proceedings of IJCNLP. Taipei, Taiwan, pages 1–10. find our card
- Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. find
- Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using rnn encoder-decoder for statistical machine translation. Proceedings of EMNLP . find
- Ronan Collobert and Jason Weston. 2008. A unified architecture for natural language processing: Deep neural networks with multitask learning. In Proceedings of the 25th International Conference on Machine learning. ACM, pages 160–167. find
- Alexis Conneau, Douwe Kiela, Holger Schwenk, Loïc Barrault, and Antoine Bordes. 2017. Supervised learning of universal sentence representations from natural language inference data. In Proceedings of EMNLP. Copenhagen, Denmark, pages 670–680. find our card
- Fahim Dalvi, Nadir Durrani, Hassan Sajjad, Yonatan Belinkov, and Stephan Vogel. 2017. Understanding and improving morphological learning in the neural machine translation decoder. In Proceedings of IJC-NLP. Taipei, Taiwan, pages 142–151. find
- Yann N Dauphin, Angela Fan, Michael Auli, and David Grangier. 2017. Language modeling with gated convolutional networks. Proceedings of the 34th International Conference on Machine Learning . find our card
- Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann Dauphin. 2017. Convolutional sequence to sequence learning. In Proceedings of ICML. Sydney, Australia, pages 1243–1252. find our card
- Dieuwke Hupkes, Sara Veldhoen, and Willem Zuidema. 2017. Visualisation and diagnostic classifiers reveal how recurrent and recursive neural networks process hierarchical structure. http:// arxiv.org/abs/1711.10203. — [arXiv:1711.10203](https://arxiv.org/abs/1711.10203) find
- Allan Jabri, Armand Joulin, and Laurens van der Maaten. 2016. Revisiting visual question answering baselines. In Proceedings of ECCV. Amsterdam, the Netherlands, pages 727–739. find
- Àkos Kàdàr, Grzegorz Chrupała, and Afra Alishahi. 2017. Representation of linguistic form and function in recurrent neural networks. Computational Linguistics 43(4):761–780. find
- Ryan Kiros, 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 3294–3302. find
- Dan Klein and Christopher Manning. 2003. Accurate unlexicalized parsing. In Proceedings of ACL. Sapporo, Japan, pages 423–430. find our card
- Philipp Koehn. 2005. Europarl: A parallel corpus for statistical machine translation. In MT summit. volume 5, pages 79–86. find
- Philipp Koehn, Hieu Hoang, Alexandra Birch, Chris Callison-Burch, Marcello Federico, Nicola Bertoldi, Brooke Cowan, Wade Shen, Christine Moran, Richard Zens, et al. 2007. Moses: Open source toolkit for statistical machine translation. In Proceedings of the 45th annual meeting of the ACL on interacti… find
- Alice Lai and Julia Hockenmaier. 2014. Illinois-LH: A denotational and distributional approach to semantics. In Proceedings of SemEval. Dublin, Ireland, pages 329–334. find
- Jiwei Li, Xinlei Chen, Eduard Hovy, and Dan Jurafsky. 2016. Visualizing and understanding neural models in NLP. In Proceedings of NAACL. San Diego, CA, pages 681–691. find our card
- Jiwei Li, Monroe Will, and Dan Jurafsky. 2017. Efficient estimation of word representations in vector space. https://arxiv.org/abs/1612. 08220. ↗
- Tal Linzen, 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. find our card
- Marco Marelli, Stefano Menini, Marco Baroni, Luisa Bentivogli, Raffaella Bernardi, and Roberto Zamparelli. 2014. A SICK cure for the evaluation of compositional distributional semantic models. In Proceedings of LREC. Rekjavik, Iceland, pages 216–223. find
- Tomas Mikolov, Edouard Grave, Piotr Bojanowski, Christian Puhrsch, and Armand Joulin. 2018. Advances in pre-training distributed word representations. In Proceedings of LREC. Miyazaki, Japan. find our card
- Tomas Mikolov, Wen-tau Yih, and Geoffrey Zweig. 2013. Linguistic regularities in continuous space word representations. In Proceedings of NAACL. Atlanta, Georgia, pages 746–751. find
- Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. 2015. End-to-end memory networks. In Advances in neural information processing systems. pages 2440–2448. find
- Tasha Nagamine, Michael L. Seltzer, and Nima Mesgarani. 2015. Exploring how deep neural networks form phonemic categories. In Proceedings of INTERSPEECH. Dresden, Germany, pages 1912– 1916. find
- Ilya Sutskever, Oriol Vinyals, and Quoc Le. 2014. Sequence to sequence learning with neural networks. In Proceedings of NIPS. Montreal, Canada, pages 3104–3112. find
- Shuai Tang, Hailin Jin, Chen Fang, Zhaowen Wang, and Virginia R de Sa. 2017. Trimming and improving skip-thought vectors. Proceedings of the 2nd Workshop on Representation Learning for NLP . find
- Matthew Nelson, Imen El Karoui, Kristof Giber, Xiaofang Yang, Laurent Cohen, Hilda Koopman, Sydney Cash, Lionel Naccache, John Hale, Christophe Pallier, and Stanislas Dehaene. 2017. Neurophysiological dynamics of phrase-structure building during sentence processing. Proceedings of the National Acade… find
- Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. 2017. Deep image prior. https://arxiv. org/abs/1711.10925. — [arXiv:1711.10925](https://arxiv.org/abs/1711.10925) find
- Bo Pang and Lillian Lee. 2004. A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts. In Proceedings of ACL. Barcelona, Spain, pages 271–278. find
- Oriol Vinyals, Ł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 2773–2781. find
- Denis Paperno, Germán Kruszewski, Angeliki Lazaridou, Ngoc Quan Pham, Raffaella Bernardi, Sandro Pezzelle, Marco Baroni, Gemma Boleda, and Raquel Fernandez. 2016. The LAMBADA dataset: Word prediction requiring a broad discourse context. In Proceedings of ACL. Berlin, Germany, pages 1525–1534. find our card
- Adina Williams, Nikita Nangia, and Samuel R Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of NAACL. find
- Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global vectors for word representation. In Proceedings of EMNLP. Doha, Qatar, pages 1532–1543. find
- Nghia The Pham, Germán Kruszewski, Angeliki Lazaridou, and Marco Baroni. 2015. Jointly optimizing word representations for lexical and sentential tasks with the C-PHRASE model. In Proceedings of ACL. Beijing, China, pages 971–981. find
- Jie Zhou, Ying Cao, Xuguang Wang, Peng Li, and Wei Xu. 2016. Deep recurrent models with fast-forward connections for neural machine translation. arXiv preprint arXiv:1606.04199 . find
- Yukun Zhu, Ryan Kiros, Richard Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of ICCV. Santiago, Chile, pages 19–27. find our card
- Rico Sennrich. 2017. How grammatical is character-level neural machine translation? assessing MT quality with contrastive translation pairs. In Proceedings of EACL (Short Papers). Valencia, Spain, pages 376–382. find our card
- Xing Shi, Inkit Padhi, and Kevin Knight. 2016. Does string-based neural MT learn source syntax? In Proceedings of EMNLP. Austin, Texas, pages 1526– 1534. find our card
- Richard Socher, Eric Huang, Jeffrey Pennin, Andrew Ng, and Christopher Manning. 2011. Dynamic pooling and unfolding recursive autoencoders for paraphrase detection. In Proceedings of NIPS. Granada, Spain, pages 801–809. find
- Sandeep Subramanian, Adam Trischler, Yoshua Bengio, and Christopher J Pal. 2018. Learning general purpose distributed sentence representations via large scale multi-task learning. In International Conference on Learning Representations. find