Quantum-Inspired Complex Word Embedding

Qiuchi Li, Sagar Uprety, Benyou Wang, Dawei Song

Abstract

Traditional word embeddings represent linguistic units as real-valued vectors, often failing to capture the complex, emergent meanings that arise when words combine. This paper introduces a quantum-inspired approach, modeling words as complex-valued vectors in a Hilbert Space. By utilizing the concept of "interference," the proposed framework allows for the representation of non-linear semantic interactions. Evaluations across five sentiment and subjectivity benchmarks show that this approach, specifically the Complex Embedding Mixture (CE-Mix) model, significantly outperforms classical baselines like word2vec and fastText.

Introduction: The Compositionality Problem

Classical models such as word2vec or GloVe map words to points in a high-dimensional real-valued space. While effective for capturing co-occurrence patterns, these models struggle with the "compositionality" problem: the meaning of a phrase is not always a simple linear combination of its components. For instance, while "ivory" and "tower" have distinct literal meanings, the phrase "ivory tower" possesses an emergent metaphorical meaning. Similarly, a model might recognize a strong association between "Penguin" and "Fly" due to frequent co-occurrence, yet the statement "Penguins fly" is logically false. The authors argue that real-valued vectors lack the mathematical flexibility to represent these emergent polarities.

Methodology

To address these limitations, the authors represent words as quantum states within a complex Hilbert Space. Each word embedding consists of an amplitude (representing concept strength) and a phase (a complex number).

Architecture of the complex word embedding model, showing the transition from one-hot sequences to complex density matrices and final classification.

The model processes text through several stages as shown in the architecture above:

  1. Complex Lookup: Words are mapped to complex-valued vectors from a lookup table.
  2. State Representation: Sentences are modeled either as a "pure state" (CE-Sup), a weighted linear combination of word vectors, or as a "mixed state" (CE-Mix), which uses a density matrix to encode correlations between latent concepts.
  3. Measurement: Classification is achieved via a "projective measurement" using Born’s Rule, which collapses the complex state into a real-valued probability for labels like "positive" or "negative."

The Interference Analogy

The core innovation is the use of the complex "phase" to model semantic interaction. Drawing an analogy to the double-slit experiment, the authors hypothesize that word phases interact when combined, creating interference patterns that represent emergent meaning.

Visual representation of semantic interference: individual neutral states for 'Penguin' and 'Fly' interfere to produce a 'False' cognitive state.

As shown in the figure above, while "Penguin" and "Fly" might be perceived as neutral in isolation, their combination results in a "False" state due to destructive interference in the complex plane. This framework allows the model to encode subtle linguistic nuances that are lost in purely additive real-valued models.

Experimental Results

The models were tested on five standard datasets: CR (product reviews), MPQA (opinion polarity), SUBJ (subjectivity), MR (movie reviews), and SST (Stanford Sentiment Treebank).

The CE-Mix model emerged as the top performer, achieving the highest accuracy on four out of five datasets. Notably, on the MR dataset, CE-Mix reached 79.8% accuracy, outperforming fastText BOW (76.5%) and word2vec BOW (77.7%). On the SST dataset, it achieved 83.3%, surpassing the Real-Embed baseline of 80.0%. These results suggest that the complex-valued representation captures richer semantic features than traditional real-valued embeddings.

Conclusion

By treating words as quantum states, this research provides a novel mathematical foundation for capturing emergent meaning in NLP. The use of complex phases to represent semantic interference offers a promising path toward more nuanced text representation. Future work will focus on scaling this approach to document-level analysis and exploring the linguistic interpretability of the learned complex phases.

Summary updated

BibTeX
@inproceedings{li2018quantum,
  author = {Qiuchi Li and Sagar Uprety and Benyou Wang and Dawei Song},
  title = {{Quantum-Inspired Complex Word Embedding}},
  booktitle = {Rep4NLP @ ACL},
  year = {2018},
  doi = {10.18653/v1/w18-3006},
}
Figure