Embedding Words in Non-Vector Space with Unsupervised Graph Learning

Max Ryabinin, Sergei Popov, Liudmila Prokhorenkova, Elena Voita

Traditional word embeddings rely on fixed-dimensional vector spaces, which impose rigid geometric constraints. This paper, presented at EMNLP 2020, challenges the assumption that words should be represented as vectors. Instead, the authors propose GraphGlove, a framework that represents words as nodes in a learned weighted graph. By defining semantic distance as the shortest path between nodes, GraphGlove allows the geometry of the embedding space to emerge naturally from the data, significantly outperforming Euclidean and Hyperbolic (Poincaré) models on similarity and analogy tasks.

The Problem: Rigid Geometric Constraints

For years, the NLP community has relied on vector space models like word2vec and GloVe. However, Euclidean space struggles to represent hierarchical data, and while Hyperbolic space is better for hierarchies, it may not be optimal for all parts of a language's vocabulary. Language is naturally graph-like; by forcing words into a fixed-dimensional vector space, we inherit limitations that might not exist in the underlying language data.

Methods: Learning the Graph Structure

GraphGlove adapts the classic GloVe objective to a graph setting. Every word in the vocabulary is a node in an undirected graph where each edge has a learnable weight (distance) and a probability of existence. The distance between two words is defined as the shortest path distance between their nodes.

To learn this structure in an unsupervised, end-to-end differentiable way, the authors use a method called PRODIGE. It starts with a dense set of potential edges and uses $L_0$ regularization to prune unnecessary edges during training. The GloVe loss function is modified to accommodate graph-based metrics.

Table 1: Adaptation of the GloVe loss term for different geometries. GraphGlove uses either negative graph distance or a graph-based dot product relative to a 'zero' node.

To maintain efficiency, the authors employ a graph-aware batching strategy. By selecting "anchor" words and calculating shortest paths to co-occurring neighbors using Dijkstra’s algorithm, they avoid the $O(V^2)$ complexity of calculating all-pairs distances.

Key Insights and Emergent Geometry

Geometry is Not One-Size-Fits-All

By measuring Gromov $\delta$-hyperbolicity (a measure of "tree-likeness"), the authors found that the learned graph contains both tree-like hierarchical clusters and highly interconnected, non-hierarchical subgraphs. A single vector space cannot easily accommodate both.

Figure 4: Visualization of a learned subgraph with $\delta \approx 0$, demonstrating the emergent tree-like hierarchical structure for technical terms.

Emergent Hierarchy and Centrality

Without explicit hierarchical labels, GraphGlove learned a structure that correlates much more strongly with the human-curated WordNet noun hierarchy than vector-based methods. Furthermore, while vector-based graphs often place proper nouns at the center, GraphGlove's central nodes are generic, frequent function words (e.g., "the", "and"), aligning better with linguistic intuition.

Key Results

  • Word Similarity: GraphGlove (specifically the dot product version) outperformed Euclidean and Poincaré GloVe on almost all benchmarks. On the challenging SimLex-999 task, GraphGlove achieved a Spearman correlation of 30.0, compared to 20.1 for Euclidean GloVe.
  • Word Analogy: On the BATS dataset, GraphGlove showed substantial improvements, particularly in Encyclopedic and Lexicographic categories.
  • Parameter Efficiency: GraphGlove consistently outperformed baselines when compared at the same number of parameters per token, suggesting that edges are a more efficient way to store semantic information than coordinates.

Limitations and Future Work

Graphs are inherently discrete, making it more complex to handle Out-of-Vocabulary (OOV) words compared to subword-based vector models like FastText. Additionally, while this work focuses on static embeddings, future research could explore applying graph-based representations to contextualized models like Transformers to see if these structural advantages translate to downstream tasks like NER or text classification.

Summary updated

BibTeX
@inproceedings{ryabinin2020embedding,
  author = {Max Ryabinin and Sergei Popov and Liudmila Prokhorenkova and Elena Voita},
  title = {{Embedding Words in Non-Vector Space with Unsupervised Graph Learning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.594},
}
Figure