HyperAIHyperAI

Command Palette

Search for a command to run...

ベクトル空間における単語表現の効率的な推定

Tomas Mikolov Greg Corrado Kai Chen Jeffrey Dean

概要

本論文では、非常に大規模なデータセットから単語の連続ベクトル表現を計算するための2つの新しいモデルアーキテクチャを提案する。これらの表現の品質は単語類似度タスクで測定され、その結果は、異なる種類のニューラルネットワークに基づく従来の最高性能の手法と比較される。我々は、はるかに低い計算コストで精度の大幅な向上を観察する。すなわち、16億語のデータセットから高品質な単語ベクトルを学習するのに1日もかからない。さらに、これらのベクトルが、統語的および意味的な単語類似度を測定するための我々のテストセットにおいて最先端の性能を提供することを示す。

One-sentence Summary

Two novel model architectures efficiently learn high-quality continuous word representations from massive text corpora, achieving substantial accuracy gains and state-of-the-art syntactic and semantic similarity performance while requiring less than one day of computation on a 1.6-billion-word dataset, dramatically reducing cost over prior neural network methods.

Key Contributions

  • Two model architectures, the Continuous Bag-of-Words and Skip-gram models, are introduced for learning continuous word vector representations from large-scale data with substantially lower computational cost than previous neural network methods.
  • A new comprehensive test set is designed for evaluating both syntactic and semantic word similarities, providing a detailed benchmark for word vector quality.
  • These models achieve state-of-the-art performance on the proposed test set, can be trained on a 1.6-billion-word corpus in under a day, and preserve linear regularities that enable accurate analogical reasoning via simple vector arithmetic.

Introduction

Many NLP systems represent words as atomic units, with no notion of similarity between them, a simple and robust approach that works well when massive training data is available. This scaling strategy breaks down, however, in domains with limited in-domain text, such as speech recognition or machine translation for under-resourced languages. Prior work on learning distributed word vectors (word embeddings) had shown promise by capturing semantic and syntactic regularities, but existing architectures were computationally expensive and could not scale beyond a few hundred million words or modest vector dimensionalities. The authors address these limitations by introducing two efficient model architectures, CBOW and Skip-gram, that dramatically reduce training complexity. Their contribution is a method to learn high-quality word vectors from corpora containing billions of words, enabling the training of high-dimensional embeddings that preserve linear relationships such as analogies, and they provide a comprehensive syntactic and semantic test set to evaluate these representations.

Method

The authors focus on distributed representations of words learned by neural networks, aiming to maximize accuracy while minimizing computational complexity. The training complexity for the evaluated models is generally proportional to O=E×T×QO = E \times T \times QO=E×T×Q, where EEE is the number of training epochs, TTT is the number of words in the training set, and QQQ is the complexity per training example. All models are trained using stochastic gradient descent and backpropagation.

Initially, the authors evaluate the Feedforward Neural Net Language Model (NNLM) and the Recurrent Neural Net Language Model (RNNLM). The NNLM consists of input, projection, hidden, and output layers. Its complexity is dominated by the term H×VH \times VH×V, which can be mitigated using hierarchical softmax with a Huffman binary tree. The RNNLM overcomes the fixed context length limitation of the NNLM by using a recurrent matrix that connects the hidden layer to itself, forming a short term memory. Its complexity is primarily driven by the H×HH \times HH×H term. To handle huge datasets, the authors implement these models on the DistBelief distributed framework, utilizing mini batch asynchronous gradient descent with the Adagrad adaptive learning rate procedure across multiple model replicas.

To further minimize computational complexity, the authors propose two new log linear model architectures that remove the non linear hidden layer, allowing for efficient training on much larger datasets.

The first architecture is the Continuous Bag of Words (CBOW) model. Similar to the feedforward NNLM, it removes the non linear hidden layer and shares the projection layer for all words, effectively averaging their vectors into the same position. The order of words in the history does not influence the projection. The model operates as a log linear classifier that uses both past and future context words to predict the current middle word. The training complexity is reduced to Q=N×D+D×log2(V)Q = N \times D + D \times \log_2(V)Q=N×D+D×log2(V).

The second architecture is the Continuous Skip gram model. Instead of predicting the current word from the context, it uses the current word as input to predict words within a certain range before and after it in the same sentence. The authors found that increasing this range improves the quality of the resulting word vectors but increases computational complexity. To balance this, distant words are sampled less frequently. The training complexity for this architecture is proportional to Q=C×(D+D×log2(V))Q = C \times (D + D \times \log_2(V))Q=C×(D+D×log2(V)), where CCC is the maximum distance of the words.

As shown in the figure below, the two new model architectures are illustrated side by side.

The CBOW architecture on the left predicts the current word w(t)w(t)w(t) based on the context words w(t2),w(t1),w(t+1),w(t+2)w(t-2), w(t-1), w(t+1), w(t+2)w(t2),w(t1),w(t+1),w(t+2), which are projected and summed. The Skip gram architecture on the right takes the current word w(t)w(t)w(t) as input and predicts the surrounding context words. The weight matrix between the input and projection layer is shared for all word positions in both models.

Experiment

The evaluation uses a semantic-syntactic analogy test set and the Microsoft Sentence Completion Challenge to assess word vector quality. Experiments demonstrate that simple vector arithmetic on high-dimensional word embeddings trained on large corpora can capture a variety of linguistic relationships, with the Skip-gram architecture excelling at semantic tasks and CBOW performing better on syntactic ones. Increasing both training data and vector dimensionality is necessary for optimal accuracy, and combining the Skip-gram model with a recurrent neural network language model achieves a new state-of-the-art on the sentence completion benchmark.

A large analogy test set was created to evaluate word vectors, consisting of five semantic relationship types (e.g., capital cities, currencies) and nine syntactic types (e.g., adjective-to-adverb, opposites), with a total of 8869 semantic and 10675 syntactic questions. Each question is formed by connecting two word pairs from manually curated lists, and a correct answer requires an exact word match, making 100% accuracy unlikely due to the absence of morphological information in the models. Semantic questions cover five types such as common capital cities, all capital cities, currencies, city-in-state, and man-woman analogies. Syntactic questions span nine categories including adjective-to-adverb conversion and opposites, totaling 10675 questions.

On a semantic-syntactic test restricted to the top 30k words, accuracy of CBOW word vectors improves as both training data size and vector dimensionality grow. However, increasing only one factor yields diminishing returns, so balanced scaling of data and dimensions is necessary. The strongest result (600 dimensions, 783 million training words) reaches 50.4% accuracy. With only 24 million training words, raising vector dimensionality from 50 to 600 gives a modest accuracy increase from 13.4% to 24.0%. For 600-dimensional vectors, doubling training data from 196M to 391M words adds 5.8 percentage points, but the next doubling to 783M adds only 3.8 points, illustrating diminishing returns.

Skip-gram achieves the highest semantic accuracy, more than doubling the nearest competitor, while CBOW performs best on syntactic accuracy and the MSR Word Relatedness test. The feedforward NNLM substantially improves over the RNNLM, and CBOW surpasses the NNLM on syntactic and relatedness tasks, matching it on semantic accuracy. Skip-gram reaches 55% semantic accuracy, far outpacing other architectures on the Semantic-Syntactic Word Relationship test set. CBOW attains the top syntactic accuracy (64%) and MSR relatedness score (61%), demonstrating strong performance on word similarity and analogy tasks.

Among publicly available word vectors on the Semantic-Syntactic test set, the Collobert-Weston NNLM trained on 660M words reaches the highest total accuracy, while a recurrent architecture (Mikolov RNNLM) gives the strongest syntactic performance. Larger training corpora and higher vector dimensionality tend to improve accuracy, but the type of model has a substantial impact beyond data size alone. The Collobert-Weston NNLM with 50-dimensional vectors and 660M training words obtains the best total accuracy (11.0%) among all publicly available models listed. The Mikolov RNNLM, using 80-dimensional vectors and 320M words, achieves the highest syntactic accuracy (18.4%) and the second-highest total accuracy (12.7%), outperforming all NNLM variants on syntactic relations. Increasing the Mnih NNLM dimensionality from 50 to 100 while keeping 37M training words doubles semantic accuracy and raises syntactic accuracy from 9.1% to 13.2%, but overall performance remains below the RNNLM. Turian's NNLM shows minimal semantic accuracy (1.4%) regardless of whether 50- or 200-dimensional vectors are used, indicating that a larger dimension alone cannot compensate for a small 37M-word training set.

The table evaluates CBOW and Skip-gram word vectors on a semantic-syntactic test set, comparing three-epoch and one-epoch training configurations. Three-epoch Skip-gram attains the highest overall accuracy, driven by a much stronger semantic performance, while CBOW models are more competitive on syntactic tasks. A single training epoch with more data or increased dimensionality can largely match or slightly exceed the accuracy of three epochs on a smaller dataset while cutting training time significantly. Three-epoch Skip-gram achieves 50.0% semantic accuracy, far surpassing the 15.5% of three-epoch CBOW, leading to a 53.3% overall score. One-epoch CBOW on 1.6B words matches the total accuracy of three-epoch CBOW on 783M words (36.1%) in only 0.6 days instead of 1 day.

A large analogy test set covering semantic and syntactic relationships is used to evaluate word vectors, with exact-word matching required. Experiments reveal that Skip-gram excels on semantic tasks while CBOW performs better on syntactic and relatedness tests, and that balanced scaling of data and dimensionality is necessary due to diminishing returns when only one factor is increased. Model architecture strongly affects accuracy beyond corpus size alone, and training for a single epoch on larger data can match multi-epoch training on less data while saving significant time.


AIでAIを構築

アイデアからローンチまで — 無料のAIコーディング支援、すぐに使える環境、最高のGPU価格でAI開発を加速。

AI コーディング補助
すぐに使える GPU
最適な料金体系

HyperAI Newsletters

最新情報を購読する
北京時間 毎週月曜日の午前9時 に、その週の最新情報をメールでお届けします
メール配信サービスは MailChimp によって提供されています
ベクトル空間における単語表現の効率的な推定 | 記事 | HyperAI超神経