요약
The word2vec model and application by Mikolov et al. have attracted a great amount of attention in recent two years. The vector representations of words learned by word2vec models have been shown to carry semantic meanings and are useful in various NLP tasks. As an increasing number of researchers would like to experiment with word2vec or similar techniques, I notice that there lacks a material that comprehensively explains the parameter learning process of word embedding models in details, thus preventing researchers that are non-experts in neural networks from understanding the working mechanism of such models. This note provides detailed derivations and explanations of the parameter update equations of the word2vec models, including the original continuous bag-of-word (CBOW) and skip-gram (SG) models, as well as advanced optimization techniques, including hierarchical softmax and negative sampling. Intuitive interpretations of the gradient equations are also provided alongside mathematical derivations. In the appendix, a review on the basics of neuron networks and backpropagation is provided. I also created an interactive demo, wevi, to facilitate the intuitive understanding of the model.
최근 2년간 Mikolov et al.에 의한 word2vec 모델과 그 활용점들은 많은 이목을 끌어왔다. word2vec 모델에 의해 학습된 단어들의 벡터 표현들은 의미론적으로 유효한 특징을 가지고 다양한 nlp(자연어처리) 작업에 유용성을 가진다. word2vec 또는 그와 비슷한 기법을 이용하여 실험을 하고자 하는 연구자들이 늘어남에 따라, 나는 이해하기 쉽게 상세히 word embedding 모델의 학습 과정을 설명해주는 자료들이 부실하며 결국 신경망에 비전문가인 연구자들의 이러한 작업의 메카니즘을 이해를 막고 있다는 것을 인자하였다.이 논문은 word2vec 매개변수 갱신 방정식과 bag-of-word (CBOW), skip-gram (SG) 그리고 진보된 최적화 기법, 계층적인 sorftmax와 negative sampling을 그 유래와 설명을 상세히 제공한다. 경사 방정식의 직관적인 이해 또한 수학적인 유도와 함께 제공한다. 부록으로, 신경망과 역전파법에 대한 기본적인 리뷰가 제공된다. 나는 또한 상호적인 데모, wevi를 개최하여 이 모델이 대한 직관적인 이해를 고양시키고자 한다.