본문 바로가기

Google Machine Learning Bootcamp 2022/Sequence Models7

4. Transformer Network Transformers Transformer Network Intuition Attention + CNN: Self-Attention, Multi-Head Attention Self-Attention \( A(q, K, V) \) = attention-based vector representation of a word = \( \sum_i \frac{ \text{exp} (q*k^{}) }{ \sum_j \text{exp} (q*k^{}) } v^{} \) = \( \text{softmax} (\frac{QK^T}{\sqrt{d_k}}) V \) Multi-Head Attention \( \text{head}_i = \text{Attention} (W_i^Q Q, W_i^K K, W_i^V V) \) f.. 2022. 8. 16.
3. Sequence Models & Attention Mechanism #2 Speech Recognition - Audio Data Speech Recognition 음성 신호를 문자열으로 바꾸는 task이다. 아무래도 10초간의 음성신호를 1ms마다 sampling을 한다고 했을 때 sequential input 1000개가 생기게 된다. CTC (Connectionist Temporal Classification) 로 이러한 data를 ttt_h_eee___ [space] ___ qqq ___와 같은 형태로 labeling 해서 사용한다. Basic rule: collapse repeated characters not separated by blank Trigger Word Detection Alexa, hey Siri, Bixby, okay Google 같이 음성으로 so.. 2022. 8. 15.
3. Sequence Models & Attention Mechanism #1 Various Sequence To Sequence Architectures Basic Models Sequence to sequence model: input을 다 넣고 output을 받는다. encoder + decoder Picking the Most Likely Sentence Language model 같은 경우 input이 들어가고 output이 나오는 것이 동시에 일어난다. 하지만 seq2seq를 이용한 machine translation 같은 경우 input을 넣는 부분과 output이 나오는 부분이 분리되어 있다. Conditional language model이라고도 부른다. \( P( y^{} ... y^{} | x^{} ... x^{} ) \) greedy 하게 가장 확률이 높은 단.. 2022. 8. 15.
2. Natural Language Processing & Word Embeddings #3 Applications Using Word Embeddings Sentiment Classification 리뷰를 input으로, 별점을 output으로 두는 task를 생각해보자. word embedding으로 averaging 하는 접근은 부정적인 문맥임에도 불구하고 긍정적인 단어가 있는 경우를 판별하지 못할 것이라는 예측을 할 수 있다. RNN도 마찬가지다. 과거의 가장 중요한 단어가 재대로 propagation 되지 않을 수 있다. Debiasing Word Embeddings word embedding은 다양한 문장의 training set으로 훈련된다. 하지만 이러한 문장들을 보통은 인터넷에서 가져오게 되고, 과거에 존재했던 옳지 않은 bias가 문장에 섞일 수 있다. (Man : Comput.. 2022. 8. 12.