자연어 처리 과정
Word2vec vs GloVe
chanuu
2022. 12. 27. 15:38
Word2Vec takes texts as training data for a neural network. The resulting embedding captures whether words appear in similar contexts. GloVe focuses on words co-occurrences over the whole corpus. Its embeddings relate to the probabilities that two words appear together.
Word2vec은 local 하게 한 문장에서 sliding window 해서 맥락을 파악하여 pair들을 추출한 후, 그걸 ground truth로 삼아서 layer를 통과하고 softmax를 통과했을 때 output이 잘 예측되도록 하는 거다.
GloVe는 전체 corpus에서 한 단어를 global 하게 봐서, 이게 co-occurrence가 어떻게 등장하는지 정리해놓은 후
그 co-occurrence 통계 matrix에 맞게 값이 나오도록 가중치를 설정한다.
결과적으로는 비슷한 output이 나온다고 한다.
word2vec을 더 선호하는 사람들도 있다고 한다.
결국, 유사하지만 방법이 좀 다른 거다.
둘 다, output은 word 한 개 -> vector 한 개로 나타내준다.