Syntax-guided Neural Module Distillation to Probe Compositionality in Sentence Embeddings

42804

Authors

nan

Abstract

AbstractPast work probing compositionality in sentence embedding models faces issues determining the causal impact of implicit syntax representations. Given a sentence, we construct a neural module net based on its syntax parse and train it end-to-end to approximate the sentence’s embedding generated by a transformer model. The distillability of a transformer to a Syntactic NeurAl Module Net (SynNaMoN) then captures whether syntax is a strong causal model of its compositional ability. Furthermore, we address questions about the geometry of semantic composition by specifying individual SynNaMoN modules’ internal architecture & linearity. We find differences in the distillability of various sentence embedding models that broadly correlate with their performance, but observe that distillability doesn’t considerably vary by model size. We also present preliminary evidence that much syntax-guided composition in sentence embedding models is linear, and that non-linearities may serve primarily to handle non-compositional phrases.

Keywords

nan

Full Content

Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, pages 3143–3149 May 2-6, 2023 ©2023 Association for Computational Linguistics Syntax-guided Neural Module Distillation to Probe Compositionality in Sentence Embeddings Rohan Pandey Language Technologies Institute Carnegie Mellon University rspandey@cs.cmu.edu Abstract Past work probing compositionality in sentence embedding models faces issues determining the causal impact of implicit syntax representations. Given a sentence, we construct a neural mod- ule net based on its syntax parse and train it end-to-end to approximate the sentence’s em- bedding generated by a transformer model. The distillability of a transformer to a Syntactic NeurAl Module Net (SynNaMoN) then cap- tures whether syntax is a strong causal model of its compositional ability. Furthermore, we ad- dress questions about the geometry of semantic composition by specifying individual SynNa- MoN modules’ internal architecture & linearity. We find differences in the distillability of var- ious sentence embedding models that broadly correlate with their performance, but observe that distillability doesn’t considerably vary by model size. We also present preliminary evi- dence that much syntax-guided composition in sentence embedding models is linear, and that non-linearities may serve primarily to handle non-compositional phrases. 1 Introduction The principle of semantic compositionality sug- gests that the meaning of a sentence should derive from its subconstituents in a regular, structured fashion (Montague, 1970). In recent years, trans- formers (Vaswani et al., 2017) have become effec- tive at producing sentential meaning representa- tions useful for downstream tasks such as Natural Language Inference, Image-Text Matching, and Document Classification (Conneau et al., 2017; Radford et al., 2021). However, it has famously been conjectured that "You can’t cram the meaning of a whole %&!$# sentence into a single $&!#* vector" (Mooney, 2014). Since recent models do appear to capture sentence meaning effectively, one wonders how they compose arbitrarily many word meanings together such that their relational struc- ture is captured in a single, fixed-dimensional sen- Figure 1: Distilling a transformer to a neural module net structured by the sentence’s syntax tence embedding. Much work has sought to probe these models for syntax representations and their causal relevance to embedding output. Conneau et al. (2018) train lin- ear probes to determine if models encode syntactic features like tree distance and depth (Krasnowska- Kiera´s and Wróblewska, 2019; Hewitt and Man- ning, 2019). One line seeks out direct mappings between neural representations and tree structures (McCoy et al., 2018; Chrupała and Alishahi, 2019; Jawahar et al., 2019; Soulos et al., 2020; Murty et al., 2023). Other work raises methodological is- sues with probing (Eger et al., 2019; Zhu and Rudz- icz, 2020) such as choice of formalism (Kuznetsov and Gurevych, 2020) and semantic entanglement (Maudslay and Cotterell, 2021). Ravichander et al. (2021) raise the possibility that probing may iden- tify causally un-used features; Tucker et al. (2021) partly address this concern to show that some syn- tactic features are causally relevant. Another line of work explores the geometry of semantic represen- tations (Reif et al., 2019; Hernandez and Andreas, …

Content truncated to 500 words

Labeled Text

AbstractPast work probing compositionality in sentence embedding models faces issues determining the causal impact of implicit syntax representations. Given a sentence, we construct a neural module net based on its syntax parse and train it end-to-end to approximate the sentence’s embedding generated by a transformer model. The distillability of a transformer to a Syntactic NeurAl Module Net (SynNaMoN) then captures whether syntax is a strong causal model of its compositional ability. Furthermore, we address questions about the geometry of semantic composition by specifying individual SynNaMoN modules’ internal architecture & linearity. We find differences in the distillability of various sentence embedding models that broadly correlate with their performance, but observe that distillability doesn’t considerably vary by model size. We also present preliminary evidence that much syntax-guided composition in sentence embedding models is linear, and that non-linearities may serve primarily to handle non-compositional phrases.

Publication Details

Paper ID:
42804
Year:
2023
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan