Improving Word Representations: A Sub-sampled Unigram Distribution for Negative Sampling

Wenxiang Jiao, Irwin King, Michael R. LyuarXiv 2019

TL;DR

This paper proposes a novel sub-sampled unigram distribution for negative sampling in Word2Vec, aiming to improve the quality of learned word embeddings. By deriving an adaptive sub-sampling rate based on semantic and syntactic information, they demonstrate significant improvements in word analogy tasks and achieve state-of-the-art results on sentence completion.

What Problem Does This Paper Address?

Word2Vec, a cornerstone of modern NLP, relies on negative sampling to efficiently learn word embeddings. However, the choice of the noise distribution for this sampling process has historically been based on empirical trials rather than theoretical optimality. The authors argue that the standard smoothed unigram distribution, while effective, is suboptimal and can negatively impact the quality of learned word vectors, particularly for infrequent words. This paper seeks to address this by proposing a theoretically grounded and adaptive noise distribution that better preserves the semantic and syntactic structure of words.

Methods

The core of the paper's contribution lies in its novel approach to negative sampling. Instead of using a fixed smoothed unigram distribution, they introduce a sub-sampled unigram distribution. The key innovation is the derivation of an adaptive sub-sampling rate. This rate is determined by first quantifying the semantic and syntactic information of words, based on the observation that frequent words tend to be more syntactic and infrequent words more semantic. They then define a "critical word" whose probability of being kept during sub-sampling is 1. By relating this critical word to Zipf's law and semantic/syntactic information, they derive a sub-sampling rate that is adaptive to different corpora. This method aims to reduce the over-representation of frequent words in negative sampling while preserving the structure of less frequent ones. They also propose a semantics weighted model for sentence completion, which leverages the quantified semantic information.

Datasets

The paper uses several large corpora for training word embeddings:

  • BWLM: "One Billion Word Language Modeling Benchmark" (approx. 1 billion tokens)
  • Wiki10: Wikipedia corpus (approx. 1 billion tokens)
  • UMBC: UMBC WebBase corpus (over 3 billion tokens)
  • MSR: MSR corpus (50 million tokens, specifically Doyle Sherlock Holmes novels)

For evaluation, they utilize standard benchmarks for:

  • Word Similarity: RG, MC, WS, MEN, RW datasets.
  • Synonym Selection: TOEFL dataset and a self-collected LEX dataset.
  • Word Analogy: Google analogy dataset.
  • Sentence Completion: MSR sentence completion task.

Key Insights and Ideas

  • The "optimality" of negative sampling matters: The paper challenges the assumption that empirical choices for negative sampling distributions are sufficient, highlighting that theoretical grounding can lead to better word representations.
  • Semantic vs. Syntactic Information: Quantifying these two aspects of words is crucial for deriving an effective sub-sampling strategy. The paper's insight that word frequency correlates with this information is key.
  • Adaptive Sub-sampling Rate: The ability to derive a sub-sampling rate that adapts to different corpora is a significant advantage over fixed distributions.
  • Preserving Infrequent Words: The proposed method aims to give infrequent words a better chance to be sampled, thus preserving their semantic richness.
  • Semantics Weighted Model: Applying semantic quantification not just to negative sampling but also to downstream tasks like sentence completion can yield substantial improvements.

Key Results

  • Word Analogy Task: The proposed sub-sampled unigram distributions (SubL1 and SubL2) consistently outperform the baseline smoothed unigram distribution (Uni³/⁴) across various corpora and models (SG and CBOW), especially on semantic questions, showing improvements of 2-6 points.
  • Word Similarity Task: SubL1 and SubL2 show slight improvements over Uni³/⁴, particularly on smaller datasets like RG and MC.
  • Synonym Selection Task: SubL1 and SubL2 demonstrate comparable or better performance than Uni³/⁴, with notable improvements on the LEX dataset.
  • MSR Sentence Completion Task: The proposed semantics weighted model (SWM) significantly outperforms previous methods, achieving state-of-the-art results with a vector size of 300.

Limitations and Future Work

  • Zipf's Law Assumption: The paper acknowledges that while Zipf's law is a convenient model for word distribution, other distributions exist, and their approach might require modification if different laws are used.
  • Critical Word Selection: The method for selecting the critical word could be further refined, and alternative approaches to finding it are suggested.
  • Scalability to NCE: While the paper mentions scalability to Noise Contrastive Estimation (NCE), further exploration of its impact on NCE is suggested.
  • Future Work: The authors suggest exploring other choices for semantic and syntactic quantification and further investigating the adaptive sub-sampling rate. They also highlight the potential of their semantics weighted model for other NLP tasks.

Summary updated

BibTeX
@misc{jiao2019improving,
  author = {Wenxiang Jiao and Irwin King and Michael R. Lyu},
  title = {{Improving Word Representations: A Sub-sampled Unigram Distribution for Negative Sampling}},
  year = {2019},
  eprint = {1910.09362},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.09362},
}
Figure