Abstract: Many Natural Language Processing applications nowadays rely on pre-trained word representations estimated from large text corpora such as news collections, Wikipedia and Web Crawl. In this paper, we show how to train high-quality word vector representations by using a combination of known tricks that are however rarely used together. The main result of our work is the new set of publicly available pre-trained models that outperform the current state of the art by a large margin on a number of tasks.
Introduction
Distributed word representations, or word vectors, serve as the foundational building blocks for modern Natural Language Processing (NLP). While models like word2vec and GloVe have become industry standards, they face persistent challenges in three key areas: word order sensitivity, morphological richness, and the representation of multi-word idioms or phrases. Standard "bag-of-words" models often treat different forms of the same word (e.g., "eat" vs. "eating") as unrelated and fail to capture the unique semantics of expressions like "New York City."
This research bridges these gaps by unifying several known—but rarely combined—techniques to create a more robust and transferable set of pre-trained vectors.
Methodology
The core of this approach utilizes the Continuous Bag-of-Words (CBOW) model as a baseline, enhanced by three primary architectural layers:
- Position-dependent Weighting: Unlike standard models that average all words in a context window, this model learns a unique weight for every position. This captures subtle syntactic structures without the computational cost of recurrent neural networks.
- Phrase Representations: A pre-processing step identifies n-grams with high mutual information. Tokens like "New" and "York" are merged into "New_York," preventing the model from being cluttered with uninformative unigrams.
- Subword Information: Following the
fastTextapproach, words are represented as a sum of their character n-grams (3-to-6 character snippets). This allows the model to generate meaningful vectors for out-of-vocabulary or rare words by analyzing their internal structure.
Beyond algorithmic changes, the authors emphasize Sentence-level De-duplication. Removing duplicate sentences from massive datasets like Common Crawl was found to be a critical factor in improving vector quality.
Data and Evaluation
The models were trained on a massive scale, totaling nearly 650 billion words. The primary source was Common Crawl (630 billion words after cleaning), supplemented by English Wikipedia (9.2B) and various news datasets including Statmt.org News, UMBC News, and English Gigaword.
Evaluation was conducted across several standard benchmarks:
- Word Analogies: Testing syntactic and semantic relationships.
- Rare Words (RW): Assessing performance on infrequent vocabulary.
- SQuAD: The Stanford Question Answering Dataset.
- Text Classification: A suite of tasks including sentiment analysis (SST) and question type classification (TREC).
Key Results and Discussion
The results demonstrate that the proposed modifications are highly synergistic. While each technique provides a marginal boost, their combination pushes the model significantly past previous state-of-the-art limits.
- Analogy Tasks: The model achieved 87% accuracy, outperforming GloVe (~75%) by a wide margin.
- Rare Words: Subword features allowed the model to significantly outperform GloVe on the Rare Words dataset (0.58 vs 0.52).
- Downstream Performance: In the SQuAD question-answering pipeline, the new fastText vectors improved accuracy to 79.8%, compared to 78.9% for GloVe.
- Efficiency: Despite the massive data scale, training was highly efficient, completing in just three days on a single multi-core machine.
Conclusion
This work highlights that state-of-the-art performance in word embeddings can be achieved through the strategic combination of existing techniques and rigorous data cleaning. The resulting models demonstrate superior performance across both intrinsic benchmarks and downstream classification tasks, providing a new standard for publicly available word representations.
Summary updated