1. Learning word embeddings
Word embeddings를 학습할 수 있는 몇 가지 알고리즘들을 소개한다.
먼저, language model을 구축하는 것은 embeddings를 학습하는 방법이 될 수 있다.

2. Word2Vec
: 이러한 embeddings를 학습할 수 있는 simpler & more efficient 한 방법은 바로 Word2Vec이다. Word2Vec paper에서는 Continuous Bag Of Word (CBOW)와 Skip-grams 모델 두 가지가 존재하는데, 해당 강의에서는 skip-grams에 대해서만 다룬다.
- Skip-grams: context word를 randomly pick 해서 (uniformly random은 아님), 특정 size의 window 내에서 랜덤하게 선택된 단어 (target)가 무엇인지 예측하도록 supervised learning을 setting 한다. (context 단어에 대해 random 하게 선택된 주변 단어들을 예측: orange-juice, orange-glass, orange-my, ... ) --> 여러 문맥에 걸쳐 단어를 학습함

- 단점: computational speed (softmax에서 전체 vocab size에 대해 sum을 해야 하기 때문에 많은 computation을 필요로 한다.)
이러한 vocabsize-way softmax의 단점을 해결하기 위해, Negative sampling이 제안되었다. skip-gram model과 유사한 역할을 하지만, 약간 변형된 learning problem을 정의하여 좀 더 efficient 하게 동작할 수 있다.

3. GloVe (Global vectors for word representation)
: 또 다른 word embeddings 알고리즘은 GloVe이다. Word2Vec skip gram과 같이 자주 사용되지는 않지만, 매우 단순하기 때문에 GloVe를 쓰는 마니아들이 종종 있다.

'ML || DL > 이론' 카테고리의 다른 글
| [Coursera] DLS_C5W3: Sequence to Sequence Model / Beam Search / Attention Model (0) | 2023.10.18 |
|---|---|
| [Coursera] DLS_C5W2: Sentiment Classification / Debiasing Word Embeddings (0) | 2023.10.17 |
| [Coursera] DLS_C5W2: Introduction to Word Embeddings (0) | 2023.10.16 |
| [Coursera] DLS_C5W1: GRU / LSTM / BRNN / DeepRNN (0) | 2023.10.13 |
| [Coursera] DLS_C5W1: Recurrent Neural Networks (RNN) (0) | 2023.10.11 |