Lune

EMNLP Findings2025

Quantifying Compositionality of Classic and State-of-the-Art Embeddings

Zhijin Guo, Chenhao Xue, Zhaozhen Xu, Hongbo Bo, Yuxuan Ye, Janet B. Pierrehumbert, Martha Lewis

Abstract

For language models to generalize correctly to novel expressions, it is critical that they exploit compositional meanings when this is justified. Even if we don't know what a "pelp" is, we can use our knowledge of numbers to understand that "ten pelps" makes more pelps than "two pelps". Static word embeddings such as Word2vec made strong, indeed excessive, claims about compositionality. The SOTA generative, transformer models and graph models, however, go too far in the other direction by providing no real limits on shifts in meaning due to context. To quantify the additive compositionality, we formalize a two-step, generalized evaluation that (i) measures the linearity between known entity attributes and their embeddings via canonical correlation analysis, and (ii) evaluates additive generalization by reconstructing embeddings for unseen attribute combinations and checking reconstruction metrics such as L2 loss, cosine similarity, and retrieval accuracy. These metrics also capture failure cases where linear composition breaks down. Sentences, knowledge graphs, and word embeddings are evaluated and tracked for the compositionality across all layers and training stages.

Stronger compositional signals are observed in later training stages across data modalities, and in intermediate layers of the transformer-based model before a decline at the top layer. Code is available at: https://github.com/Zhijin-Guo1/ quantifying-compositionality.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Locating and Editing Factual Associations in GPT cites Language Models are Few-Shot Learners
  • The Linear Representation Hypothesis and the Geometry of Large Language Models cites On the Sentence Embeddings from Pre-trained Language Models
  • The Linear Representation Hypothesis and the Geometry of Large Language Models cites Locating and Editing Factual Associations in GPT
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on10

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
  3. Towards Scalable Multi-Domain Conversational Agents: The Schema-Guided Dialogue DatasetAbhinav Rastogi, Xiaoxue Zang, Srinivas Sunkara, Raghav Gupta et al.AAAI 2020 · 707 citations
  4. On the Sentence Embeddings from Pre-trained Language ModelsBohan Li, Hao Zhou, Junxian He, Mingxuan Wang et al.EMNLP 2020 · 538 citations
  5. The Linear Representation Hypothesis and the Geometry of Large Language ModelsKiho Park, Yo Joong Choe, Victor VeitchICML 2024 · 461 citations

Related papers

  1. The Paradox of the Compositionality of Natural Language: A Neural Machine Translation Case StudyVerna Dankers, Elia Bruni, Dieuwke HupkesACL 2022
  2. Compositional Generalization with Grounded Language ModelsSondre Wold, Étienne Simon, Lucas Georges Gabriel Charpentier, Egor V. Kostylev et al.ACL Findings 2024
  3. How do Transformer Embeddings Represent Compositions? A Functional AnalysisAishik Nagar, Ishaan Singh Rawal, Mansi Dhanania, Cheston TanACL Findings 2025
  4. Are representations built from the ground up? An empirical examination of local composition in language modelsEmmy Liu, Graham NeubigEMNLP 2022 · 5 citations
  5. Compositionality with Variation Reliably Emerges in Neural NetworksHenry Conklin, Kenny SmithICLR 2023
Dusk over the sea between two cliffs drawn in fine vertical lines