SlideShare a Scribd company logo
1
Glove:GlobalVectorsforWordRepresentation
(2014,Penningtonetal.)
YongheeCheon
1
2
Background
3
LSA, HAL, COALS, Hellinger-PCA, etc.
NNPM, HLBL, RNN, Skip-gram, CBOW, etc.
VS
CountBased:GlobalMatrixFactorization
PredictionBased:LocalContextWindowMethods
Approaches: Count based vs Prediction based
Background
4
LSA, HAL, COALS, Hellinger-PCA, etc. NNPM, HLBL, RNN, Skip-gram, CBOW, etc.
VS
Count Based:
Global Matrix Factorization
Prediction Based:
Local Context Window Methods
Approaches: Count based vs Prediction based
Background
Pros:
- 빠른 학습
- Global statistics의 효율적 활용
Pros:
- 성능 개선
- 단순 단어 유사도를 넘어선 복잡한
의미적 구조 파악 (produce dimensions of
meaning, thereby capturing the multi-clustering
idea of distributed representations)
Cons:
- 단어 유사도 파악까지가 한계
(analogy 불가)
- 빈도수 큰 단어들에 대해 불균형
(Disproportionate)
Cons:
- 학습량 多
- Global Statistics 활용하지 못함
VS
Cons:
- 단어 유사도 파악까지가 한계
(analogy 불가)
- 빈도수 큰 단어들에 대해 불균형
(Disproportionate)
Cons:
- 학습량 多
- Global Statistics 활용하지 못함
5
Approaches: Count based vs Prediction based
Background
LSA, HAL, COALS, Hellinger-PCA, etc. NNPM, HLBL, RNN, Skip-gram, CBOW, etc.
Count Based:
Global Matrix Factorization
Prediction Based:
Local Context Window Methods
Pros:
- Global statistics의 효율적 활용
Pros:
- 성능 개선
- 단순 단어 유사도를 넘어선 복잡한
의미적 구조 파악 (produce dimensions of
meaning, thereby capturing the multi-clustering
idea of distributed representations)
Key Idea: 두 Approach의 장점만 살려서 Global + Local 모두 만족하는
Distributed Representation을 만들어보자
6
A Log-Bilinear Regression Model and Language Model
Background
LogRegression useslogarithmfunctionasacostfunction
BilinearMap
combiningelementsoftwovectorspacestoyieldanelementofa
thirdvectorspace,andislinearineachofitsarguments.
+
Giventhecontextw1:n−1, theLBLmodelfirstpredictstherepresentation
forthenextwordwn bylinearlycombiningtherepresentationsofthe
contextwords:
Log-BilinearLanguageModel
Thenthedistributionforthenextwordis
computedbasedonthesimilaritybetweenthe
predictedrepresentationandthe
representationsofallwordsinthevocabulary
2
7
KeyIdea
8
문제의식
KeyIdea
Thestatisticsofwordoccurrencesinacorpusisthe
primarysourceofinformationavailabletoall
unsupervisedmethodsforlearningwordrepresentations
9
준비물: 동시발생행렬
KeyIdea
word-wordco-occurrencematrix
10
준비물: 동시발생행렬
KeyIdea
word-wordco-occurrencematrix
Q.WindowSize가존재하나요?
11
준비물: 동시발생행렬
KeyIdea
Q.WindowSize가존재하나요?
A.Yes.
-Symmetry:SymmetricvsAsymmetric
-Size:2-10
12
Notations on Co-occurrence Matrix
KeyIdea
word-wordco-occurrencematrix
•Xij =단어i가등장했을때
단어j의등장횟수
•Xi =단어i의컨텍스트내에서
등장한전체j의등장횟수합
•Pij =P(j|i)=Xij /Xi
Xij Xi = ΣXik Pij =P(j|i)= Xij /Xi
13
KeyIdea
핵심 아이디어 1: 확률비 비교
"여러 탐침 단어들 등장확률의 비율 비교를 통해 단어 사이 관계성을 밝혀내자"
목적 The relationship of these words i = ice, j = steam
재료 The ratio of their co-occurrence probabilities with various probe words(k)
해석 1. 확률비가 상당히 작거나 큰 경우 : i, j 둘 중 하나와 k가 더 가깝다
2. 확률비가 1에 가까운 경우 : k가 i, j 모두와 가깝거나 모두와 멀다
Q. 왜 차이 비교(뺄셈 연산)가 아니라 비율 비교(나눗셈 연산)를 했을까?
Pik - Pjk (X)
Pik / Pjk (O)
15
KeyIdea
핵심 아이디어 1: 확률비 비교
Log Scale 비교
If Pij / Pjk = 10-2
Then log(Pik) - log(Pjk) = -2
16
KeyIdea
지프의 법칙
"Givensomecorpusofnaturallanguageutterances,
thefrequencyofanywordisinverselyproportionaltoitsrankinthefrequencytable."
17
KeyIdea
지프의 법칙
Log Scale
18
따라서...
19
Objective Function
KeyIdea
진도가너무빠릅니다교수님
ObjectiveFunctionofGlove:
3
20
TheObjectiveFunction
21
Equation (1): Starting Point
TheObjectiveFunction
Intuition i (target 1), j (target 2), k (탐침) 단어벡터들을 어떤 함수에 넣어서 매핑하자
F함수특)뭔지모름
스칼라값
원하는것 확률비 정보를 vector space에 임베딩
wordvectors(center) wordvectors(context)
22
TheObjectiveFunction
Idea vector space는 inherently linear하므로 F에 일단 벡터의 차를 넣자
Equation (2): Vector Difference
효과 - can restrict our consideration to those functions F that depend only on
the difference of the two target words
- distance에 확률비가 매핑되도록
F함수특)뭔지모름벡터차
확률비
23
TheObjectiveFunction
Idea 벡터 차의 Linear structure를 보존하기 위해 내적 사용
Equation (3): Inner Product
뉴럴넷사용시 F could be taken to be a complicated function parameterized by,
e.g., a neural network, doing so would obfuscate the linear structure
we are trying to capture.
벡터차(centerwords) contextword
내적의효과 F가 벡터공간의 차원을 뒤죽박죽 만드는 것을 방지 (bilinear map)
문제의식 방정식의 우변이 스칼라이므로 좌변도 스칼라 값이 나와야 함
24
TheObjectiveFunction
F be a homomorphism between the groups (R,+) and (R>0, ×)Idea
Equation (4): Homomorphism
(R,+)
(R>0,×)
W <-> W', X <-> XT 교환 가능해야 함, 서로 operation이 preserved문제의식
대체 조건과homomorphism은무슨관계인가?
26
TheObjectiveFunction
Equation (4): Homomorphism Intuition
=
27
TheObjectiveFunction
Equation (4): Homomorphism Intuition
=
waTw̃ b = w̃ aTwb
쉬운 해결책 : 아래 식 만족
28
TheObjectiveFunction
Equation (4): Homomorphism Intuition
29
TheObjectiveFunction
Equation (4): Homomorphism
giventwogroups,(G,∗)and(H,・),agrouphomomorphismfrom
(G,∗)to(H,・)isafunctionh:G→HsuchthatforalluandvinGit
holdsthat
wherethegroupoperationonthelefthandsideoftheequation
isthatofGandontherighthandsidethatofH.
GroupHomomorphism
30
TheObjectiveFunction
Equation (4): Homomorphism
F(a+b)=F(a)xF(b)
F be a homomorphism between the groups (R,+) and (R>0, ×)
F(a-b)=F(a)/F(b)
Since homomorphism preserves inverse, additive inverse -> multiplicative inverse
(R,+)
(R>0,×)
그러면정말로w와w̃ 교환가능한가?
Xij Xi = ΣXik Pij =P(j|i)= Xij /Xi
40
TheObjectiveFunction
F be a homomorphism between the groups (R,+) and (R>0, ×)Idea
Equation (4): Homomorphism
(R,+)
(R>0,×)
W <-> W', X <-> XT 교환 가능해야 함, 서로 operation이 preserved문제의식
41
TheObjectiveFunction
Equation (3) 을 이용하면 j 없이 간단한 objective function을 만들 수 있음Idea
Equation (5): Simplifying Equation
42
TheObjectiveFunction
F 결정
F(a-b)=F(a)/F(b)
ea - b = ea / eb
43
TheObjectiveFunction
Equation (6): Simplified Equation
Exp적용후양변에로그취함
44
TheObjectiveFunction
Equation (7): Restoring Symmetry
우변의 log(Xi)만 없으면 Symmetry 보존문제
Symmetric
45
TheObjectiveFunction
Equation (7): Restoring Symmetry
우변의 log(Xi)만 없으면 Symmetry 보존문제1
고정값인 log(Xi)를 bi로 대체하고 학습 파라미터화해결1
Symmetric
i, k간 대칭 성립하지 않음문제2
46
TheObjectiveFunction
Equation (7): Restoring Symmetry
우변의 log(Xi)만 없으면 Symmetry 보존
고정값인 log(Xi)를 bi로 대체하고 학습 파라미터화
Symmetric
문제2
문제1
해결1
bk 추가해결2
i, k간 대칭 성립하지 않음
47
TheObjectiveFunction
Equation (7): Restoring Symmetry
고정값학습필요한함수
48
TheObjectiveFunction
Equation (8): Cost Function
Xij가 0에 가깝거나 너무 크면 내적항이 튈 수 있다
LeastSquares
문제의식
가중치
Xij의 크기를 반영하는 가중치 함수를 만들자Idea
방정식이 하나 나왔으니 이를 least squares 사용한 regression으로 풀자개괄
49
TheObjectiveFunction
Equation (9): Weighting Function
f(0) = 0. Xij가 0일 경우 log(Xij)는 음으로 발산하는데 이를 잡으려 내적값이
지나치게 튀게 될 가능성을 잡고 싶다.
원하는것1
감소함수면 안 된다. 공기정도가 큰 값을 잡긴 해도 크면 커야한다.원하는것2
정말 큰 Xij의 실제 크기에 비해서는 상대적으로 작게 Squeeze되어야 한다.원하는것3
Appendix
50
RelationshiptoWord2Vec
51
52
두 확률분포 사이의 distance measureCrossEntrophy
Least squares
다른distance
measure적용
53
54
Regarding Negative Sampling as a Weighting Function
55
=
Fin.

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

[Word Embedding] Glove Complete Explanation - Yonghee Cheon