Source-linked AI summary

Efficient Estimation of Word Representations in Vector Space

Tomas Mikolov, Kai Chen, Greg Corrado, Jeffrey Dean

arXiv:1301.3781v3cs.CL

TL;DR

Many NLP techniques represent words as unrelated vocabulary indices and reach limits when high-quality data is scarce. This paper introduces simple architectures for learning high-quality word vectors from massive datasets, achieving accurate syntactic and semantic relationships with much lower computational complexity.

  • Problem

    Existing NLP techniques often represent words as unrelated vocabulary indices, while scaling simple methods has limits when high-quality task-specific data is scarce.

  • Method

    The paper develops simple architectures for learning high-quality word vectors from huge datasets and evaluates syntactic and semantic regularities with a comprehensive test set.

  • Results

    The resulting vectors capture subtle syntactic and semantic relationships, while their lower computational complexity enables accurate high-dimensional vectors from much larger datasets.

  • Takeaways & Limitations

    High-quality word vectors can serve as building blocks for future NLP applications and support relationships such as analogies between words.

  • Takeaways & Limitations

    Comparison with Latent Relational Analysis and other techniques remains future work.

Abstract

from arXiv · show

We propose two novel model architectures for computing continuous vector representations of words from very large data sets. The quality of these representations is measured in a word similarity task, and the results are compared to the previously best performing techniques based on different types of neural networks. We observe large improvements in accuracy at much lower computational cost, i.e. it takes less than a day to learn high quality word vectors from a 1.6 billion words data set. Furthermore, we show that these vectors provide state-of-the-art performance on our test set for measuring syntactic and semantic word similarities.

1 Introduction

The paper addresses the limits of atomic word representations and scaling simple models by developing efficient techniques for learning high-quality word vectors from massive corpora. It introduces architectures and evaluations aimed at preserving syntactic and semantic regularities while examining accuracy and training-time tradeoffs.

  • Motivation: Atomic word representations omit similarity, while simple methods reach limits when high-quality in-domain data is scarce.Words are represented as vocabulary indices, and scaling basic techniques may not suffice for speech recognition and machine translation.
  • Motivation: Distributed representations have enabled neural language models to outperform N-gram models.This reflects progress toward more complex models trained on larger data sets.
  • Objective: The paper targets high-quality word vectors learned from billions of words and vocabularies containing millions of words.Previously proposed architectures had, as far as the authors knew, been trained on no more than a few hundred million words, typically with 50–100-dimensional vectors.
  • Contributions: New model architectures aim to preserve linear word regularities, evaluated with a comprehensive test set covering syntactic and semantic regularities.The paper also studies how training time and accuracy depend on vector dimensionality and training-data size.
  • Related work: The approach directly extends a single-hidden-layer word-vector architecture while focusing on vector learning rather than constructing a full neural network language model.Earlier word-vector architectures were often more computationally expensive to train than the architecture proposed in.

2 Model Architectures

The section compares neural-network word-representation architectures by balancing accuracy against computational complexity. It describes feedforward and recurrent language models, hierarchical softmax, and large-scale distributed training.

  • Model comparison: Model architectures are evaluated by maximizing accuracy while minimizing computational complexity, defined as the number of parameters accessed during full training.Training complexity is proportional to the number of epochs, training words, and an architecture-specific quantity Q.
  • Training procedure: All models use stochastic gradient descent and backpropagation, while distributed training runs synchronized replicas with mini-batch asynchronous gradient descent.The implementation uses DistBelief to train models on huge data sets through centralized gradient-update synchronization.
  • Feedforward NNLM: The feedforward NNLM uses N previous words, a shared projection matrix, hidden computation, and an output distribution over the vocabulary.Its per-example complexity is Q = N × D + N × D × H + H × V, with H × V dominating before output optimization.
  • Hierarchical softmax: Hierarchical softmax reduces vocabulary-output computation by replacing evaluation over V words with tree-based evaluation, while Huffman coding assigns shorter codes to frequent words.The remaining dominant feedforward cost is N × D × H; the Huffman tree further reduces evaluated outputs relative to a balanced tree.
  • Recurrent neural network: The recurrent neural-network language model removes the projection layer, connects the hidden layer recurrently, and avoids specifying a fixed context length.With hierarchical softmax, its H × V output term becomes H × log2(V), leaving H × H as the main complexity term.

3 New Log-linear Models

This section introduces two log-linear architectures that remove the neural network’s nonlinear hidden layer to reduce training complexity: CBOW predicts a word from averaged context vectors, while Skip-gram predicts surrounding words from a current word. The designs build on earlier two-step word-vector learning work and trade some representational precision for scalability.

  • Motivation: The proposed models remove the nonlinear hidden layer, targeting lower computational complexity and training on much larger data sets.The authors motivate simpler models because most neural-network complexity comes from the nonlinear hidden layer.
  • Relation to prior work: The architectures follow earlier work separating simple word-vector learning from subsequent neural language-model training.The authors describe this as the simplest approach among methods for learning word vectors.
  • CBOW: CBOW averages shared context-word vectors and predicts the current word, ignoring word order in the history.It also incorporates words from the future context; the architecture is illustrated in Figure 1.
  • Skip-gram: Skip-gram uses the current word as input and predicts words within a surrounding range, maximizing same-sentence word classification.Increasing the range improves resulting vector quality but increases computational cost.
  • Skip-gram: With C = 10, each training word randomly selects R context words from the history and future, requiring R × 2 classifications.C denotes the maximum distance of the words used as context.

4 Results

The proposed word vectors capture subtle semantic and syntactic relationships, while combining Skip-gram scores with RNNLMs achieves 58.9% accuracy on the Microsoft Sentence Completion Challenge. Accuracy improves when vector dimensionality and training-data size increase together, though gains eventually diminish.

  • Word relationships: Simple vector algebra answered analogy questions such as “biggest is to big as small is to” by subtracting and adding word vectors, then retrieving the nearest word by cosine distance.The input question words were discarded during nearest-neighbor search.
  • Word relationships: High-dimensional vectors trained on large data captured subtle semantic relations such as city-country analogies, supporting applications in machine translation, information retrieval, and question answering.The reported examples include France–Paris and Germany–Berlin.
  • Evaluation: The evaluation set contains 8869 semantic and 10675 syntactic questions spanning five semantic and nine syntactic categories, with exact-match accuracy computed overall and by category.Synonyms count as mistakes, making 100% accuracy unlikely because the models lack explicit morphology information.
  • Scaling experiments: Increasing training data or vector dimensionality eventually yields diminishing improvements, so both must be scaled together for better accuracy.The experiments used Google News with about 6B tokens and a vocabulary of 1 million frequent words.
  • Architecture comparison: CBOW outperformed NNLM on syntactic questions, matched it on semantic questions, and Skip-gram performed slightly worse than CBOW on syntactic questions.The comparison used 640-dimensional vectors trained on the same data and evaluated the full semantic-syntactic test set alongside a syntactic benchmark.
  • Microsoft Sentence Completion Challenge: 58.9% accuracy was achieved on the Microsoft Sentence Completion Challenge by combining Skip-gram scores with RNNLM scores, surpassing the individual methods.The combination scored 59.2% on development data and 58.7% on test data.

5 Examples of the Learned Relationships

The learned word vectors capture relational structure through vector arithmetic, exemplified by Paris - France + Italy = Rome. They also support out-of-list word selection, although exact-match accuracy remains limited and improves when multiple relationship examples are averaged.

  • 5 Examples of the Learned Relationships: Vector arithmetic captures word-pair relationships, exemplified by Paris - France + Italy = Rome, with good but imperfect accuracy.The relationship is formed by subtracting two word vectors and adding the result to another word.
  • 5 Examples of the Learned Relationships: About 60% exact-match accuracy would result under the stated metric, while averaging ten relationship examples improves accuracy over using one.The vectors used for Table 8 come from the best reported Skip-gram model trained on 783M words with 300 dimensions.
  • 5 Examples of the Learned Relationships: Vector operations also select out-of-the-list words by averaging list-word vectors and choosing the most distant word vector.This approach is described as useful for a problem type appearing in certain human intelligence tests.

6 Conclusion

The paper concludes that simple word-vector architectures can achieve high quality on syntactic and semantic tasks at much lower computational complexity, enabling accurate high-dimensional vectors from larger datasets. It also highlights applications in NLP and knowledge bases, with machine translation as a promising direction for future work.

  • 6 Conclusion: Simple architectures produced high-quality word vectors on syntactic and semantic tasks while requiring much lower computational complexity than popular feedforward and recurrent neural networks.This lower complexity makes it possible to compute accurate, high-dimensional vectors from much larger datasets.
  • 6 Conclusion: Over 50% increase in Spearman’s rank correlation over the previous best result was achieved on SemEval-2012 Task 2 using publicly available RNN vectors with other techniques.The passage presents this task as one where neural word vectors significantly outperformed the previous state of the art.
  • 6 Conclusion: Word vectors were successfully applied to extending and verifying knowledge-base facts, while machine-translation experiments appeared promising and comparison with Latent Relational Analysis [30] remained future work.The authors also expect their comprehensive test set to help improve techniques for estimating word vectors.

7 Follow-Up Work

Follow-up work released faster multi-threaded implementations of both architectures and large-scale named-entity vectors, extending the paper’s practical scope.

  • 7 Follow-Up Work: The published C++ implementation trains both architectures at roughly billions of words per hour, while released named-entity vectors were trained on more than 100 billion words.The implementation uses single-machine multi-threading and includes over 1.4 million named-entity vectors.
Loading 1301.3781v3…