Learning Semantic Word Embeddings based on Ordinal Knowledge Constraints

Quan Liu, Hui Jiang, Si Wei, Zhen-Hua Ling, Yu Hu

Introduction

Standard word embedding models like Word2Vec and GloVe have revolutionized Natural Language Processing (NLP) by capturing semantic relationships through the distributional hypothesis—the principle that words appearing in similar contexts share similar meanings. However, these models often struggle with fine-grained semantics. For instance, they frequently fail to distinguish between synonyms and antonyms because opposites often appear in identical linguistic environments. Additionally, purely data-driven models suffer from data sparsity for rare words. This paper introduces Semantic Word Embeddings (SWE), a framework that integrates structured human knowledge into the embedding learning process using ordinal ranking inequalities.

Methodology: Bridging Distributional and Symbolic Knowledge

The core innovation of SWE is the formulation of semantic relationships as a set of ordinal constraints within a joint optimization framework. Rather than assigning arbitrary numerical similarity scores to word pairs—which can be subjective and difficult to define—the authors use inequalities to represent relative semantic closeness. This approach is more robust and aligns better with human intuition: it is easier to agree that "A is more similar to B than to C" than to assign a specific value to that similarity.

Joint optimization framework combining distributional context with ordinal knowledge constraints.

The Three Golden Rules for Constraints

The authors extract constraints from resources like WordNet and Thesauri based on three primary rules designed to capture different facets of lexical meaning:

  1. Synonym-Antonym Rule: This rule directly addresses the "antonym problem." It enforces that a word's vector must be mathematically closer to its synonyms than to its antonyms (e.g., $sim(foolish, stupid) > sim(foolish, clever)$).
  2. Semantic Category Rule: Words belonging to the same synset or category should be closer to each other than to words in different categories, helping the model cluster related concepts more effectively.
  3. Hierarchy Rule: Lexical relations are often hierarchical. Words closer together in a taxonomic tree should be closer in the vector space than more distant relatives. For example, a "mallet" should be closer to its direct hypernym "hammer" than to the more general category "tool."
Example of hierarchical lexical relations used to derive ordinal constraints.

Joint Optimization and Training

The model modifies the standard skip-gram objective function by adding a penalty term based on a hinge loss function. During training, if the model's current vectors violate an ordinal constraint—such as placing an antonym closer than a synonym—it incurs a penalty. Using Stochastic Gradient Descent (SGD), the model simultaneously learns to maximize context prediction (distributional learning) and satisfy these semantic rankings (symbolic knowledge injection). This joint optimization ensures that the resulting embeddings benefit from both large-scale text corpora and curated lexical databases.

Experimental Results

The SWE framework was evaluated across several benchmarks using training corpora of varying sizes, including Wiki-Small (~130M words) and Wiki-Large (~5B words). The model consistently outperformed the baseline skip-gram model and other state-of-the-art embeddings in several key areas:

  • Word Similarity: On the WordSim-353 task, SWE improved the Spearman correlation from 0.708 to 0.727 when using the large corpus, indicating a better alignment with human similarity judgments.
  • Synonym Selection: In the TOEFL dataset, accuracy rose significantly from 83.75% to 88.75%, demonstrating the model's improved ability to identify precise meanings.
  • Sentence Completion: On the Microsoft Sentence Completion Challenge, accuracy increased from 51.5% to 56.2% after five iterations of training, showing that better word-level semantics improve sentence-level understanding.
  • Named Entity Recognition (NER): The model achieved an absolute improvement of approximately 0.8% in F1 score on the MUC7 test set. This suggests that the enhanced semantic grounding provided by SWE translates directly into better performance for complex downstream NLP tasks.

Discussion and Limitations

The results confirm that while distributional data is powerful, it is insufficient for capturing nuanced lexical relations on its own. By "nudging" the vectors using known lexical relations, the SWE model corrects geometric distortions caused by antonyms sharing contexts. However, the approach is not without limitations. The improvements are naturally bounded by the coverage of the knowledge bases used; words not present in WordNet still rely entirely on context. Furthermore, the balance between corpus-driven learning and constraint satisfaction (controlled by the $\beta$ parameter) requires careful tuning to avoid overfitting on constraints at the expense of general contextual nuances.

Conclusion

Semantic Word Embeddings offer a practical and efficient way to enhance word vectors by leveraging structured human knowledge. By treating semantic relations as ordinal rankings rather than absolute scores, the framework successfully addresses the "antonym problem" and improves performance across a wide range of NLP applications. Future research may explore incorporating even richer knowledge sources, such as Knowledge Graphs or FrameNet, to further refine the semantic space.

Summary updated

BibTeX
@inproceedings{liu2015learning,
  author = {Quan Liu and Hui Jiang and Si Wei and Zhen-Hua Ling and Yu Hu},
  title = {{Learning Semantic Word Embeddings based on Ordinal Knowledge Constraints}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2015},
  doi = {10.3115/v1/p15-1145},
}
Figure