A Compositional Calculus for Semantic Synergy in Language Model Embeddings

Abel JansmaCompLearn @ ICML 2026

TL;DR

This paper introduces semantic synergy, a training-free algebraic measure that identifies when a phrase's meaning is more than the sum of its parts (like idioms). By applying Möbius inversion to phrase embeddings, the authors isolate non-compositional information, providing a powerful new tool for mechanistic interpretability and embedding steering.

What Problem Does This Paper Address?

In traditional linguistics, we often assume "compositionality": the idea that the meaning of a sentence is simply the sum of its parts and the rules used to combine them. However, language is full of exceptions—idioms like "kick the bucket" or proper names like "Michael Jackson" have meanings that can't be derived by just looking at the individual words.

While early word embeddings supported simple "latent space arithmetic" (e.g., king - man + woman ≈ queen), this logic breaks down in modern, context-heavy Transformer models. We know these models handle non-compositional meaning, but we haven't had a precise, mathematically grounded way to measure where and how this "extra" meaning (the synergy) is stored in the high-dimensional embedding space.

Methods

The authors propose using Möbius inversion—a generalization of the discrete derivative—to calculate a "synergy residual."

Imagine a hierarchy (a "span mereology") of a phrase. For a three-word phrase ($w_1, w_2, w_3$), the synergy ($q$) is calculated by taking the full phrase embedding and subtracting the embeddings of its sub-parts, while carefully correcting for the fact that those parts overlap.

  • The Formula: $q(w_1w_2w_3) = T(w_1w_2w_3) - T(w_1w_2) - T(w_2w_3) + T(w_2)$

If a model is perfectly compositional, this synergy vector should be zero. If the phrase has a unique, non-reducible meaning, the synergy vector will be large and point in a meaningful direction. This approach is "training-free," meaning it can be applied to any existing model without further fine-tuning.

Datasets

The study evaluates several models, including Qwen3-Embedding-0.6B, all-mpnet-base-v2, and the Pythia suite. To test their method, they used:

  • A Manually Curated Benchmark: 107 pairs of English idioms and matched literal controls (e.g., "break the ice" vs. "break the glass").
  • LLM-Generated Expansion: A larger, noisier set of 836 idiom/literal pairs generated by ChatGPT 5.5 Pro for robustness testing.
  • Proper Names: A set of 96 names categorized as non-compositional (famous people like "Michael Jackson") vs. compositional (where parts identify the referent, like "Albert Einstein").

Key Insights and Ideas

  • Synergy as a Diagnostic: The Möbius residual isn't just noise; it's a signal. It strongly separates idiomatic phrases from literal ones, outperforming simpler methods like unigram or bigram subtractions.
  • The "Where" and "When": Synergy doesn't exist in the input layer (static embeddings). It emerges in the middle-to-late layers of the Transformer. Furthermore, it is a "late-training" feature—models only learn to represent these complex synergies toward the end of their training process.
  • Actionable Geometry: The synergy vector can be used as a steering vector. By adding or subtracting the average "idiomaticity" direction, the authors could move a literal phrase's embedding toward an idiomatic interpretation (and vice versa) in a predictable way.
  • Mereological Precision: By using Möbius inversion, the authors provide a rigorous way to handle overlapping spans (like how "kick the" and "the bucket" both contain "the"), which is a significant step up from naive vector subtraction.

Key Results

  • Strong Separation: The measure achieved a Cohen’s $d$ of ~1.80, indicating a massive statistical difference between idioms and literal phrases.
  • High Accuracy: In idiomaticity detection, the method reached an ROC-AUC of 0.90–0.92.
  • Interpretability: Qualitative checks showed that the nearest neighbors of synergy vectors often reflected figurative meanings. For "break the ice," the synergy vector's neighbors were "dating," "friendly," and "meet," whereas the standard embedding neighbors were just "break" and "ice."
  • Scaling Effects: The signal was much clearer in the 1B parameter Pythia model than in the 160M version, suggesting that representing non-compositional meaning is a capability that scales with model size.

Limitations and Future Work

The authors acknowledge several constraints:

  • Scope: The study is limited to English and relatively short phrases (mostly 3-word).
  • Resolution: The analysis is currently at the "representation level." It identifies that the signal exists but doesn't yet pinpoint the specific "circuits" (neurons or attention heads) responsible for creating it.
  • Future Directions: The next logical step is applying this "span calculus" directly to the token-level residual streams of large decoder-only LLMs. This could lead to better tools for idiom disambiguation, more nuanced steering of model outputs, and a deeper understanding of how LLMs "think" beyond simple word associations.

Summary updated

BibTeX
@inproceedings{jansma2026compositional,
  author = {Abel Jansma},
  title = {{A Compositional Calculus for Semantic Synergy in Language Model Embeddings}},
  booktitle = {CompLearn @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=sMUVXkAksS},
}
Figure