HG2Vec: Improved Word Embeddings from Dictionary and Thesaurus Based Heterogeneous Graph

Qitong Wang, Mohammed J. ZakiCOLING 2022

Abstract

Traditional word embedding models rely on massive text corpora, which are computationally expensive and often struggle to distinguish between semantic similarity and contextual relatedness. We present HG2Vec, a model that learns high-quality word embeddings by representing dictionaries and thesauri as a heterogeneous graph. By leveraging structured linguistic relationships and innovative training techniques like antonym path splitting and transitive loss, HG2Vec achieves state-of-the-art results on standard benchmarks while being significantly more resource-efficient than corpus-based approaches.

Introduction

In Natural Language Processing (NLP), the prevailing paradigm for learning word embeddings involves training on massive datasets like Wikipedia or Common Crawl. While effective, this "big data" approach has significant drawbacks. First, it requires immense computational resources for pre-processing and training. Second, corpus-based models often fail to distinguish between similarity (words that are interchangeable, e.g., "coffee" and "tea") and relatedness (words that appear in similar contexts, e.g., "cup" and "coffee"). Most notably, these models often map antonyms to similar vector spaces because they appear in identical linguistic contexts.

HG2Vec addresses these challenges by utilizing expert-curated linguistic resources—dictionaries and thesauri—as the primary data source. This structured approach allows for cleaner semantic modeling without the need for massive unlabelled text.

Methodology

The core of HG2Vec is the representation of linguistic data as a Heterogeneous Graph. In this graph, nodes represent words, and edges represent specific semantic relationships:

  • Dictionary-based Edges: "Weak" edges are formed if word A appears in the definition of word B. "Strong" edges are formed if they appear in each other's definitions.
  • Thesaurus-based Edges: Explicit synonym and antonym relationships are extracted directly from thesauri.
Heterogeneous graph representation of word relationships including synonyms, antonyms, and definition-based links.

To learn embeddings from this graph, the authors introduced three key techniques:

  1. Biased Random Walks: The model generates synthetic training documents by traversing the graph using a combination of Depth-First Search (DFS) and Breadth-First Search (BFS).
  2. Antonym Path Splitting: To prevent antonyms from being clustered together, HG2Vec splits paths when an antonym edge is encountered. This creates semantically consistent sequences that separate opposites.
  3. Context-Focused Transitive Loss: A novel loss function accounts for transitive relationships (e.g., if A is a synonym of B, and B is a synonym of C, then A and C should be close). This "bridges" words that may not have direct links in the graph.

Evaluation and Results

HG2Vec was trained using major dictionaries (Cambridge, Oxford, Collins) and Roget’s Super Thesaurus. It was evaluated across 13 standard benchmarks covering relatedness (e.g., MEN-TR-3K), similarity (e.g., SimLex999), and rare words.

The results demonstrate that HG2Vec consistently outperforms both traditional corpus-based models like Word2Vec and previous dictionary-based models like Dict2Vec and DRG2Vec.

Comparative performance of HG2Vec against baseline models across various semantic benchmarks.

Key findings include:

  • Superior Accuracy: HG2Vec improved correlation scores by an average of 73.3% over Word2Vec and 29.2% over DRG2Vec.
  • Similarity Excellence: The model showed exceptional performance on similarity tasks. On SimLex999, HG2Vec achieved a score of 0.752, significantly higher than Word2Vec (0.338).
  • Data Efficiency: These results were achieved without any large-scale text corpora, proving that structured "small data" can outperform noisy "big data."

Conclusion

HG2Vec demonstrates that structured linguistic resources are a powerful alternative to massive text corpora for learning word embeddings. By explicitly modeling antonyms and transitive relationships within a heterogeneous graph, the model achieves superior semantic accuracy and resource efficiency. Future work includes incorporating full definition text and extending the graph to include more complex morphological relationships.

Summary updated

BibTeX
@inproceedings{wang2022hg,
  author = {Qitong Wang and Mohammed J. Zaki},
  title = {{HG2Vec: Improved Word Embeddings from Dictionary and Thesaurus Based Heterogeneous Graph}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2022},
}
Figure