Skip to main content
QUICK REVIEW

[Paper Review] Context Mover's Distance & Barycenters: Optimal transport of contexts for building representations

Sidak Pal Singh, Andreas Hug|arXiv (Cornell University)|Aug 29, 2018
Topic ModelingComputer Science85 references8 citations
TL;DR

This paper proposes Context Mover's Distance (CMD), a novel unsupervised representation framework that models entities as probability distributions over their contextual co-occurrences in a low-dimensional space, leveraging optimal transport for semantic similarity. By computing Wasserstein distances between these distributional estimates and using Wasserstein barycenters for compositional representations, CMD achieves state-of-the-art performance on word and sentence similarity, entailment, and similarity tasks—evidencing a 4.1% relative improvement over Sent2vec and GenSen.

ABSTRACT

We present a framework for building unsupervised representations of entities and their compositions, where each entity is viewed as a probability distribution rather than a vector embedding. In particular, this distribution is supported over the contexts which co-occur with the entity and are embedded in a suitable low-dimensional space. This enables us to consider representation learning from the perspective of Optimal Transport and take advantage of its tools such as Wasserstein distance and barycenters. We elaborate how the method can be applied for obtaining unsupervised representations of text and illustrate the performance (quantitatively as well as qualitatively) on tasks such as measuring sentence similarity, word entailment and similarity, where we empirically observe significant gains (e.g., 4.1% relative improvement over Sent2vec, GenSen). The key benefits of the proposed approach include: (a) capturing uncertainty and polysemy via modeling the entities as distributions, (b) utilizing the underlying geometry of the particular task (with the ground cost), (c) simultaneously providing interpretability with the notion of optimal transport between contexts and (d) easy applicability on top of existing point embedding methods. The code, as well as prebuilt histograms, are available under https://github.com/context-mover/.

Motivation & Objective

  • To develop a new unsupervised representation learning framework that models entities as distributions over their contexts, rather than as single vectors.
  • To leverage optimal transport theory—specifically Wasserstein distances and barycenters—to capture semantic uncertainty, polysemy, and compositional structure in text.
  • To provide an interpretable, geometry-aware distance measure between entities using context transport maps.
  • To enable direct application on top of existing point embeddings without retraining, enhancing performance on downstream NLP tasks.

Proposed method

  • Represents each entity as a probability distribution (histogram) over its co-occurring contexts, where contexts are embedded in a low-dimensional space.
  • Computes the Context Mover’s Distance (CMD) as the optimal transport cost between two entities’ context distributions, using a ground cost matrix defined on context embeddings.
  • Utilizes Wasserstein barycenters to compute compositional representations for groups of entities (e.g., sentences from words), enabling transfer from word-level to sentence-level representations.
  • Employs a precomputed co-occurrence histogram of contexts per entity, enabling efficient inference without additional training.
  • Supports asymmetric costs by defining task-specific ground metrics on context movements, enabling tailored similarity measures.
  • Integrates seamlessly with existing point embeddings (e.g., GloVe, Word2vec) by using their context embeddings as the ground space for transport.

Experimental results

Research questions

  • RQ1Can modeling entities as distributions over their contexts improve unsupervised representation learning for NLP tasks?
  • RQ2How does optimal transport between context distributions compare to point-wise vector similarity in capturing semantic similarity and polysemy?
  • RQ3Can Wasserstein barycenters effectively generate compositional representations for phrases and sentences from word-level distributions?
  • RQ4Does CMD outperform state-of-the-art unsupervised methods on word and sentence similarity and entailment tasks?
  • RQ5Can the transport map between context distributions provide interpretable insights into semantic relationships between entities?

Key findings

  • CMD achieves a 4.1% relative improvement over Sent2vec and GenSen on word and sentence similarity benchmarks.
  • CMD outperforms the state-of-the-art fully unsupervised method (Poincaré GloVe) on the WBLESS hypernymy detection task, achieving 75.4% accuracy with K=200.
  • CMD improves Spearman correlation on HyperLex from 0.316 (Henderson) to 0.338, demonstrating better alignment with human-annotated entailment scores.
  • The method significantly improves performance on the HypeNet-Train dataset, achieving 75.2% accuracy on hypernymy detection using CMD with Henderson embeddings.
  • Qualitative analysis shows CMD better handles co-hyponym pairs (e.g., 'banjo' and 'flute') and directional relations (e.g., 'creature' and 'gorilla'), reducing false positives compared to baseline methods.
  • CMD’s transport maps provide interpretable insights into why two entities are considered similar or dissimilar, revealing which contexts contribute most to the distance computation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.