[Paper Review] Word2Vec: Optimal Hyper-Parameters and Their Impact on NLP Downstream Tasks
This paper empirically identifies optimal hyper-parameter combinations for Word2Vec across intrinsic (analogy, WordSim) and extrinsic NLP tasks (NER, sentiment analysis), demonstrating that performance is task-specific and that higher vector dimensions degrade performance beyond a threshold. Surprisingly, smaller corpora outperform the original 100B-word model in downstream tasks, challenging the assumption that larger data always yields better embeddings.
Word2Vec is a prominent model for natural language processing (NLP) tasks. Similar inspiration is found in distributed embeddings for new state-of-the-art (SotA) deep neural networks. However, wrong combination of hyper-parameters can produce poor quality vectors. The objective of this work is to empirically show optimal combination of hyper-parameters exists and evaluate various combinations. We compare them with the released, pre-trained original word2vec model. Both intrinsic and extrinsic (downstream) evaluations, including named entity recognition (NER) and sentiment analysis (SA) were carried out. The downstream tasks reveal that the best model is usually task-specific, high analogy scores don't necessarily correlate positively with F1 scores and the same applies to focus on data alone. Increasing vector dimension size after a point leads to poor quality or performance. If ethical considerations to save time, energy and the environment are made, then reasonably smaller corpora may do just as well or even better in some cases. Besides, using a small corpus, we obtain better human-assigned WordSim scores, corresponding Spearman correlation and better downstream performances (with significance tests) compared to the original model, trained on 100 billion-word corpus.
Motivation & Objective
- To identify the optimal combination of Word2Vec hyper-parameters (dimension size, epochs, window size, vocabulary size) for intrinsic and extrinsic NLP evaluations.
- To challenge the assumption that larger corpora and higher embedding dimensions always yield better performance in downstream NLP tasks.
- To evaluate the impact of hyper-parameter choices on both intrinsic (analogy, WordSim) and extrinsic (NER, sentiment analysis) evaluations.
- To provide evidence that high analogy scores do not correlate strongly with downstream task performance, emphasizing task-specific optimization.
- To advocate for energy- and time-efficient training by showing that smaller corpora can yield superior or comparable results to massive pretraining datasets.
Proposed method
- Trained Word2Vec models using continuous skip-gram and CBOW architectures on three English corpora: Google News (100B words), a smaller subset (100B), and a new smaller corpus (BW).
- Systematically varied four hyper-parameters: vector dimension size (from 100 to 500), training epochs (5–10), window size (4, 8), and vocabulary size, using both hierarchical softmax and negative sampling.
- Evaluated intrinsic performance using semantic and syntactic analogy tasks (Google analogy dataset) and WordSim-353 for semantic similarity.
- Conducted extrinsic evaluations on named entity recognition (GMB dataset) and sentiment analysis (IMDb dataset), measuring F1, precision, recall, and accuracy.
- Applied bootstrap resampling with 95% confidence intervals to assess statistical significance of performance differences between models.
- Used polynomial interpolation to estimate optimal dimension size based on analogy score trends across corpora.
Experimental results
Research questions
- RQ1What is the optimal combination of Word2Vec hyper-parameters (dimension, epochs, window size, vocabulary size) for intrinsic and extrinsic NLP evaluations?
- RQ2Does increasing vector dimension size beyond a certain point degrade performance on downstream NLP tasks?
- RQ3Can smaller corpora outperform the original 100-billion-word Google News dataset in downstream NLP tasks?
- RQ4To what extent do high intrinsic analogy scores correlate with high performance on downstream tasks like NER and sentiment analysis?
- RQ5Is there a significant performance difference between models trained on large corpora and those trained on smaller, more efficient corpora, and is it statistically significant?
Key findings
- The best-performing Word2Vec model for NER was the BW w4s1h0 configuration, achieving an F1 score of 0.679 on the dev set and 0.677 on the test set, outperforming the original 100B-word model.
- For sentiment analysis, the SW w8s0h0 model achieved an F1 score of 0.798 on dev and 0.799 on test, closely matching the default PyTorch embedding and outperforming the 100B model.
- Performance on analogy tasks did not correlate with downstream performance: the 100B model had high analogy scores but performed poorly on sentiment analysis (F1 = 0.384 on dev).
- Increasing vector dimension beyond 300–400 dimensions led to a decline in both analogy and downstream task performance, indicating a performance ceiling.
- The smaller BW corpus produced better WordSim scores (Spearman correlation) and superior downstream performance than the original 100B-word model, with a 95% confidence interval of [0.274, 0.504] for the difference in F1 scores (SA), indicating statistical significance.
- Bootstrap significance tests confirmed that the performance difference between the 100B model and the BW w4s1h0 model in NER was not statistically significant (CI: [-0.008, 0.01]), but the difference in SA was significant (CI: [0.274, 0.504]), rejecting the null hypothesis.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.