TL;DR
This paper applies density matrices—a concept borrowed from quantum mechanics to represent mixed probabilistic states—to model the linguistic nuances of metaphors. By treating words as mixtures of multiple senses rather than static vectors, the authors introduce a framework that outperforms traditional baselines and standard neural sentence encoders on a challenging new metaphor disambiguation dataset.
What Problem Does This Problem Address?
In standard natural language processing (NLP), words are typically represented as vectors in a high-dimensional space (distributional semantics). While highly effective, this approach struggles with lexical ambiguity. When a word has multiple meanings, a naive vector model tries to pack all those senses into a single point, resulting in a muddy representation somewhere in the middle.
Metaphors represent an especially tricky subset of lexical ambiguity. Consider the word bright: its literal sense describes color or light, but its conventional metaphorical sense means "intelligent" (as in a bright student). Standard vector composition methods fail to capture how context shifts a word's meaning from literal to figurative. This paper investigates whether quantum-inspired density matrices can effectively model these metaphorical shifts by representing words as probabilistic mixtures of distinct senses that clarify upon composition.
Methods
The authors operate within the framework of Categorical Compositional Distributional Semantics, which merges grammatical structure (via Lambek's pregroup grammars) with vector space models.
To handle ambiguity, they transition from standard vectors to density matrices ($\rho = \sum_i p_i |w_i\rangle \langle w_i|$), where each $|w_i\rangle$ represents a distinct word sense weighted by a probability $p_i$.
They evaluate three main approaches for generating these density matrices from text:
- Multi-sense Word2DM (ms-Word2DM): An extension of Word2Vec's skip-gram model that learns multiple distinct sense embeddings per word and combines them into a density matrix.
- Context2DM: Clusters the context vectors of a target word using hierarchical agglomerative clustering to define sense centroids.
- Bert2DM: Uses contextual embeddings from BERT passed through dimensionality reduction (PCA or SVD) to form the sense matrices.
To combine words into sentences, they test four composition operators that "lift" word representations into sentence spaces: Add, Mult (pointwise multiplication), Fuzz, and Phaser (the latter two being quantum-inspired mapping operations).
Datasets
The authors introduced a novel evaluation dataset specifically designed to test metaphor disambiguation.
- Structure: It consists of 171 target metaphorical sentences, each paired with an apt literal paraphrase and an inapt paraphrase. For example:
- Target: He showered her with presents.
- Apt Paraphrase: He gave her presents.
- Inapt Paraphrase: He sprinkled her with presents.
- Variants: The dataset was tested in two formats: a short-form dataset (subject-verb-object fragments like waste inheritance) and a long-form dataset (full, simplified sentences).
- Ground Truth: Human annotations were collected (10 annotations per triple) to rate the similarity of each paraphrase to the target, establishing a baseline with a reasonable inter-annotator agreement (Spearman’s $\rho = 0.589$).
Key Insights and Ideas
- Metaphors are Exceptionally Hard: All tested models found this dataset incredibly difficult, yielding much lower correlation scores than those typically seen in standard lexical ambiguity tasks.
- The "Noun-as-Operator" Surprise: In linguistic theory, verbs are typically viewed as functions (operators) that take nouns as arguments. However, when using Fuzz and Phaser composition, using the noun as the operator yielded a significantly better correlation with human judgments than using the verb. This suggests that the non-metaphorical context (the noun) needs to actively update and constrain the ambiguous, metaphorical word (the verb).
- Entropy Reduction via Composition: The authors measured the von Neumann entropy (a measure of quantum uncertainty/ambiguity) of the word representations. For the best-performing models (like
bert2dm-svd-clswith multiplicative composition), entropy decreased after composition, mathematically demonstrating that the model successfully used context to disambiguate meaning.
Key Results
The models were evaluated by calculating the Spearman's correlation ($\rho$) between the model's similarity scores and human judgments:
- Neural Sentence Encoders Fail: State-of-the-art sentence encoders like SBERT and InferSent performed poorly, hovering near chance levels ($\rho \approx -0.03$ to $0.01$).
- Static Baselines Struggle: Word2Vec and GloVe baselines also struggled, though GloVe with multiplicative composition on short-form data achieved a modest positive correlation ($\rho = 0.0738$).
- Density Matrices Win: The best overall performance was achieved by Multi-sense Word2DM with 10 senses (
ms-Word2DM-d10) using multiplicative composition on the long-form dataset, reaching a correlation of $\rho = 0.1061$. - For Fuzz and Phaser compositions, noun-operator models consistently outperformed verb-operator models on the short-form dataset (e.g.,
ms-Word2DM-d5with Fuzz-noun achieved $\rho = 0.0576$ vs. $\rho = -0.1783$ for Fuzz-verb).
Limitations and Future Work
While density matrices outperformed neural and vector baselines, the absolute correlation scores ($\sim0.10$) remain low, underscoring that automated metaphor understanding is far from solved.
A key limitation is that this study focuses exclusively on conventional metaphors—metaphors so deeply entrenched in language that they act like standard lexical ambiguity. It does not address novel metaphors created on-the-fly (e.g., "the classroom was a zoo"), which require dynamic meaning creation.
Future Directions: 1. Scaling up evaluation to a wider variety of modern large language models (LLMs). 2. Linking ambiguity modeling with hyponymy (entailment) to discover ad-hoc metaphorical classes (e.g., abstracting "vicious things" to understand "my lawyer is a shark"). 3. Transitioning from classical simulations to running these quantum-inspired compositional models directly on actual quantum computers.
Summary updated