Using Context-to-Vector with Graph Retrofitting to Improve Word Embeddings

Jiangbin Zheng, Yile Wang, Ge Wang, Jun Xia, Yufei Huang, Guojiang Zhao, Yue Zhang, Stan Z. Li

Introduction: The Efficiency-Performance Trade-off

In modern Natural Language Processing (NLP), a significant gap exists between high-performance contextualized embeddings (e.g., BERT, RoBERTa) and lightweight static embeddings (e.g., Skip-gram, GloVe). Contextualized models excel at disambiguating polysemous words but are computationally expensive and environmentally taxing. Conversely, static embeddings are fast and stable but fail to capture context-dependent meanings. This paper presents a two-stage framework that distills knowledge from contextualized models into static vectors and refines them using a novel graph-based retrofitting approach.

Proposed Methodology

The authors propose a comprehensive two-phase pipeline to create "smarter" static embeddings that capture deep semantic nuances while remaining computationally efficient.

The two-stage framework: Context-to-Vec training followed by graph-based post-processing.

Phase 1: Context-to-Vec Training

The first phase involves training static vectors using a pre-trained contextualized model as a teacher. The core innovation is the Tied Contextualized Attention Module. Unlike prior methods that only focus on the center word's contextualized vector, this model explicitly attends to the signals of surrounding words. A joint loss function is employed, combining semantic similarity, contextualized influence, and contrastive negative sampling to ensure the static vectors absorb maximal sentential information.

Phase 2: Graph-based Post-retrofitting

Following initial training, a refinement step is applied. The vocabulary is treated as a graph where synonyms from a lexicon are connected. The model converts Euclidean distances between words into a probability distribution (similar to the Student’s t-distribution used in t-SNE). This allows for a more principled fine-tuning of word positions based on both learned features and known semantic relationships, rather than simply pulling synonyms together uniformly.

Experimental Setup and Datasets

The model was trained on a cleaned Wikipedia corpus containing approximately 1.1 billion words. Evaluation was conducted across several benchmarks:

  • Intrinsic Evaluation: Word similarity (WordSim-353, SimLex-999, RW, MEN-3K, RG-65), word analogy (Google Analogy, SemEval-2012), and concept categorization (AP, Battig, ESSLI).
  • Extrinsic Evaluation: Downstream tasks including Chunking (CoNLL-2000), Named Entity Recognition (OntoNotes 4.0), and POS tagging (Penn Treebank).

Key Results and Discussion

The proposed model, Ours(+post-process), consistently outperformed traditional and distilled baselines across all tasks.

  • Word Similarity: On the WS353 dataset, the model achieved a score of 78.9, significantly higher than Skip-gram (61.0) and the previous state-of-the-art distillation method, BERT+Skip-gram (72.8).
  • Concept Categorization: The model reached an average score of 68.1, a significant jump over traditional static models (~60.8).
  • Qualitative Analysis: Visualizations of the embedding space demonstrate that the proposed method produces more semantically coherent clusters. For example, the word "light" yields synonyms like "lumière" and "illumination" rather than noisy neighbors like "uv" or "glare."
3D visualization of word embeddings across different models, highlighting the superior semantic structure of the proposed method.

Conclusion

This research proves that static embeddings have not reached their performance ceiling. By leveraging contextualized "teachers" and structured lexicons through a probabilistic retrofitting lens, it is possible to create lightweight vectors that rival the semantic depth of much larger models. Future work will explore integrating lexicon knowledge directly into the training phase to create a more unified, end-to-end model.

Summary updated

BibTeX
@inproceedings{zheng2022using,
  author = {Jiangbin Zheng and Yile Wang and Ge Wang and Jun Xia and Yufei Huang and Guojiang Zhao and Yue Zhang and Stan Z. Li},
  title = {{Using Context-to-Vector with Graph Retrofitting to Improve Word Embeddings}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.acl-long.561},
}
Figure