Elamur Research
☰
home / papers / 2018 / What you can cram into a single \$&!\#* vector: Probing sentence embeddings for linguistic properties

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.

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: Natural language processing

Cited by

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

Cite

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/p18-1198 · arXiv 1805.01070

@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

44 references, 15 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. 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
  2. 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. ↗
  3. Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. 2016. Layer normalization. Advances in neural information processing systems (NIPS) . find our card
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. À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
  16. 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
  17. Dan Klein and Christopher Manning. 2003. Accurate unlexicalized parsing. In Proceedings of ACL. Sapporo, Japan, pages 423–430. find our card
  18. Philipp Koehn. 2005. Europarl: A parallel corpus for statistical machine translation. In MT summit. volume 5, pages 79–86. find
  19. 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
  20. 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
  21. 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
  22. Jiwei Li, Monroe Will, and Dan Jurafsky. 2017. Efficient estimation of word representations in vector space. https://arxiv.org/abs/1612. 08220. ↗
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  34. 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
  35. 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
  36. Adina Williams, Nikita Nangia, and Samuel R Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of NAACL. find
  37. Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global vectors for word representation. In Proceedings of EMNLP. Doha, Qatar, pages 1532–1543. find
  38. 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
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  44. 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