목차
Abstract
1. Introduction
1.1 Goals of the Paper
1.2 Previous Work
2. Model Architectures
2.1 Feedforward Neural Net Language Model (NNLM)
2.2 Recurrent Neural Net Language Model (RNNLM)
2.3 Parallel Training of Neural Networks
3. New Log-linear Models
4. Results
5. Examples of the Learned Relationships
6. Conclusion
7. Follow-Up Work
이번 포스팅은 Word2Vec으로 잘 알려진 <Efficient Estimation of Word Representations inVector Space> 논문 리뷰이다. (사실은 그냥 해석하고 요약..)
포스팅 ① 편은 위와 같은 목차에서 Abstract~2절까지 작성되었다. Word2Vec에서 제안한 CBOW, Skip-gram에 대한 설명은 다음 포스팅에서 작성할 예정이다.
Abstract
- continuous vector representation을 만드는 두 가지 모델 CBOW, Skip-gram model 제안
- 본 논문의 모델이 만든 representation은 word similarity task로 평가
- 이전보다 훨씬 적은 계산량으로 정확도가 크게 향상되었음
- syntactic and semantic word similarity task에서 S-O-T-A 달성!
1. Introduction
- 현재의 NLP 시스템은 단어를 atomic units 원자 단위로 취급 → eg. 원핫인코딩
- 여기서 원자 단위는 ‘단어를 단순 인덱싱한다’는 의미로 사용되었음
- 이 방법은 1) simplicity, 2) robustness, 3) 간단한 모델이 적은 데이터로 좋은 성능 같은 세 가지 장점이 있음 → eg. N-gram
- But! 더 큰 데이터로 더 복잡한 모델을 학습하기 위해서 더 발전된 기술이 필요함! ⇒ distributed representation
- Neural Network based Language Model은 N-gram Model보다 훨씬 성능이 좋음
1.1 Goals of the Paper
- 본 논문의 목표는 수십억 개의 단어와 vocab에 있는 수백만 개의 단어가 있는 방대한 데이터 셋에서 word vector를 학습하는 것
- 이 논문 이전에 50-100차원의 word vector 학습하는 모델 없음
- vector representation은 단어들 사이의 유사성을 측정할 수 있음
- 단순히 syntactic regularity만 가지는 것이 아니라, $vector(”Queen”) = vector(”King”) - vector(”Man”) + vector(”Woman”)$ 이와 같은 벡터 연산이 가능
- 본 논문은 이런 연산의 정확도를 최대화하는 것이 목표
- syntactic, semantic regularity를 측정하는 new test 설계
- word vector의 dimension과 training data size에 따라 training time과 accuracy가 어떻게 달라지는지 실험
1.2 Previous Work
- continuous vector representation에 대한 연구가 이번이 처음은 아님
- NNLM을 사용한 word representation 연구들에 대한 간략한 소개
- 2절에서 NNLM에 대해서 설명하기 때문에 본 포스팅은 이전 연구들 소개 생략
2. Model Architectures
- 본 논문은 NN을 사용하여 word representation을 학습하는 것과 이전 모델들에 비해 계산량을 줄이고 정확도를 높이는 것이 목표
- 계산량 비교를 위해 training complexity를 아래와 같이 정의
$$ O = E\times T\times Q $$
(E: # of epoch, T: # of words in training set, Q: 모델에 대해 추가로 정의)
2.1 Feedforward Neural Net Language Model (NNLM)
- 구조: input → projection → hidden → output
- input → projection
- input layer에서 현재 예측할 타임스텝 이전 N개의 단어를 원-핫 인코딩, V는 vocab size
(→ 각 단어를 vocab size 차원으로 해당하는 인덱스만 1, 그외는 0으로 인코딩 = 원-핫 인코딩) - (N, V) X (V, D) = (N, D)로 projection
= projection layer를 통해 word vector를 dense vector로 변환 - projection layer에서 lookup table concat함 → (1, N x D)
- input layer에서 현재 예측할 타임스텝 이전 N개의 단어를 원-핫 인코딩, V는 vocab size
- projection → hidden
- (1, N x D) X (N x D, H) = (1, H)
- hidden → output
- H X V
- 복잡도가 HxV 항을 따라가기 때문에 이를 방지하기 위해 hierarchical softamx or unnormalized model 사용
- binary tree representation을 사용하면 output의 수가 $log_2 V$로 줄어듦 → NxDxH 따라감
- 본 논문의 NNLM은 vocab이 Huffman binary tree로 표현되는 hierarchical softmax 사용
- huffman tree란, (추후 수정)
2.2 Recurrent Neural Net Language Model (RNNLM)
- NNLM의 ‘N을 지정해줘야하는 한계’를 극복하기 위해 RNNLM 등장
- 구조: input → hidden → output
- 과거의 정보는 현재 입력을 기반으로 업데이트된 hidden state와 이전 time step의 hidden state로 표현 → short term memory 형성
- Q = H x H + H x V
2.3 Parallel Training of Neural Networks
- 대규모 데이터셋에서 학습하기 위해 DisBelief 프레임워크 사용하여 NNLM, CBOW, Skip-gram 모델 구현
- 프레임워크를 사용하면 동일한 모델의 복제본을 병렬로 실행할 수 있음, 각 복제본은 기울기 업데이트 동기화
- Adagrad와 mini-batch asynchronous gradient 사용
'A.I. > NLP' 카테고리의 다른 글
[Paper Review] Efficient Estimation of Word Representations inVector Space ② | Word Representation ③ Word2Vec (0) | 2023.04.08 |
---|---|
N-gram Language Model (0) | 2023.03.17 |
Word Representation ② Local Representation (0) | 2023.03.10 |
Word Representation ① Thesaurus 시소러스 (0) | 2023.03.03 |