1/1
CS7015 (Deep Learning) : Lecture 10
Learning Vectorial Representations Of Words Mitesh M. Khapra
Department of Computer Science and Engineering Indian Institute of Technology Madras
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
CS7015 (Deep Learning) : Lecture 10 Learning Vectorial - - PowerPoint PPT Presentation
CS7015 (Deep Learning) : Lecture 10 Learning Vectorial Representations Of Words Mitesh M. Khapra Department of Computer Science and Engineering Indian Institute of Technology Madras 1/1 Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
1/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
2/1
aBlog1, Blog2, Blog3 Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
3/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
4/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
5/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
6/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
7/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
8/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
9/1
human machine system for ... user human 1 1 ... machine 1 1 ... system 1 ... 2 for 1 1 1 ... . . . . . . . . . . . . . . . . . . . . . user 2 ...
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
10/1 human machine system for ... user human 1 1 ... machine 1 1 ... system 1 ... 2 for 1 1 1 ... . . . . . . . . . . . . . . . . . . . . . user 2 ...
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
11/1 human machine system ... user human 1 ... machine 1 ... system ... 2 . . . . . . . . . . . . . . . . . . user 2 ...
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
12/1 human machine system for ... user human 1 x ... machine 1 x ... system x ... 2 for x x x x ... x . . . . . . . . . . . . . . . . . . . . . user 2 x ...
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
13/1 human machine system for ... user human 2.944 2.25 ... machine 2.944 2.25 ... system 1.15 ... 1.84 for 2.25 2.25 1.15 ... . . . . . . . . . . . . . . . . . . . . . user 1.84 ...
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
14/1 human machine system for ... user human 2.944 2.25 ... machine 2.944 2.25 ... system 1.15 ... 1.84 for 2.25 2.25 1.15 ... . . . . . . . . . . . . . . . . . . . . . user 1.84 ...
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
15/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
16/1
m×n
m×k
k×k
1
k
k×n
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
17/1
m×n
m×k
k×k
1
k
k×n
1 + σ2u2vT 2 + · · · + σkukvT k
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
18/1
m×n
m×k
k×k
1
k
k×n
1 + σ2u2vT 2 + · · · + σkukvT k
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
19/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
20/1 human machine system for ... user human 2.944 2.25 ... machine 2.944 2.25 ... system 1.15 ... 1.84 for 2.25 2.25 1.15 ... . . . . . . . . . . . . . . . . . . . . . user 1.84 ...
human machine system for ... user human 2.01 2.01 0.23 2.14 ... 0.43 machine 2.01 2.01 0.23 2.14 ... 0.43 system 0.23 0.23 1.17 0.96 ... 1.29 for 2.14 2.14 0.96 1.87 ...
. . . . . . . . . . . . . . . . . . . . . user 0.43 0.43 1.29
... 1.71
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
21/1
human machine system for ... user human 2.944 2.25 ... machine 2.944 2.25 ... system 1.15 ... 1.84 for 2.25 2.25 1.15 ... . . . . . . . . . . . . . . . . . . . . . user 1.84 ...
human machine system for ... user human 32.5 23.9 7.78 20.25 ... 7.01 machine 23.9 32.5 7.78 20.25 ... 7.01 system 7.78 7.78 17.65 ... 21.84 for 20.25 20.25 17.65 36.3 ... 11.8 . . . . . . . . . . . . . . . . . . . . . user 7.01 7.01 21.84 11.8 ... 28.3
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
22/1
human machine system for ... user human 2.01 2.01 0.23 2.14 ... 0.43 machine 2.01 2.01 0.23 2.14 ... 0.43 system 0.23 0.23 1.17 0.96 ... 1.29 for 2.14 2.14 0.96 1.87 ...
. . . . . . . . . . . . . . . . . . . . . user 0.43 0.43 1.29
... 1.71
human machine system for ... user human 25.4 25.4 7.6 21.9 ... 6.84 machine 25.4 25.4 7.6 21.9 ... 6.84 system 7.6 7.6 24.8 18.03 ... 20.6 for 21.9 21.9 0.96 24.6 ... 15.32 . . . . . . . . . . . . . . . . . . . . . user 6.84 6.84 20.6 15.32 ... 17.11
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
23/1
human machine system for ... user human 2.01 2.01 0.23 2.14 ... 0.43 machine 2.01 2.01 0.23 2.14 ... 0.43 system 0.23 0.23 1.17 0.96 ... 1.29 for 2.14 2.14 0.96 1.87 ...
. . . . . . . . . . . . . . . . . . . . . user 0.43 0.43 1.29
... 1.71
human machine system for ... user human 25.4 25.4 7.6 21.9 ... 6.84 machine 25.4 25.4 7.6 21.9 ... 6.84 system 7.6 7.6 24.8 18.03 ... 20.6 for 21.9 21.9 0.96 24.6 ... 15.32 . . . . . . . . . . . . . . . . . . . . . user 6.84 6.84 20.6 15.32 ... 17.11
word
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
24/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
25/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
26/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
27/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
28/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
29/1
P (he|sat) P (chair|sat) P (man|sat) P (on|sat)
h ∈ Rk Wword ∈ Rk×|V | x ∈ R|V | Wcontext ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
30/1
P (he|sat) P (chair|sat) P (man|sat) P (on|sat)
h ∈ Rk Wword ∈ Rk×|V | x ∈ R|V | Wcontext ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
31/1
P (he|sat) P (chair|sat) P (man|sat) P (on|sat)
h ∈ Rk Wword ∈ Rk×|V | x ∈ R|V | Wcontext ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
32/1
P (he|sat) P (chair|sat) P (man|sat) ˆ y = P (on|sat)
h ∈ Rk Wword ∈ Rk×|V | x ∈ R|V | Wcontext ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
33/1
P (he|sat) P (chair|sat) P (man|sat) P (on|sat)
h ∈ Rk Wword ∈ Rk×|V | x ∈ R|V | Wcontext ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
34/1
P (he|sat) P (chair|sat) P (man|sat) P (on|sat)
h ∈ Rk Wword ∈ Rk×|V | x ∈ R|V | Wcontext ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
35/1
P (he|sat) P (chair|sat) P (man|sat) P (on|sat)
h ∈ Rk Wword ∈ Rk×|V | x ∈ R|V | Wcontext ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
36/1
P (he|sat) P (chair|sat) P (man|sat) P (on|sat)
h ∈ Rk Wword ∈ Rk×|V | x ∈ R|V | Wcontext ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
37/1
P (he|sat, he) P (chair|sat, he) P (man|sat, he) P (on|sat, he)
h ∈ Rk Wword ∈ Rk×2|V | x ∈ R2|V | [Wcontext, Wcontext] ∈ Rk×2|V |
d−1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
38/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
39/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
40/1
P (he|sat, he) P (chair|sat, he) P (man|sat, he) P (on|sat, he)
h ∈ Rk Wword ∈ Rk×2|V | x ∈ R2|V | [Wcontext, Wcontext] ∈ Rk×2|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
41/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
42/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
43/1
h ∈ R|k| Wcontext ∈ Rk×|V | x ∈ R|V | Wword ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
44/1
h ∈ R|k| Wcontext ∈ Rk×|V | x ∈ R|V | Wword ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
45/1
′
′ be the set of all incorrect (w, r) pairs in
′ can be constructed by randomly sampling a
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
46/1
c vw
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
47/1
′ we are interested in maximizing
r vw
r vw = σ(−uT
′, we are interested in
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
48/1
θ
θ
θ
θ
c vw +
r vw
θ
c vw) +
r vw)
1 1+e−x Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
49/1
′ is thus k times the size of D
3 4
3 4
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
50/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
51/1
h ∈ R|k| Wcontext ∈ Rk×|V | x ∈ R|V | Wword ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
52/1
vc vw
Wh ∈ R2d×h Wout ∈ Rh×|1|
vc vw
Wh ∈ R2d×h Wout ∈ Rh×|1|
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
53/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
54/1
h ∈ R|k| Wcontext ∈ Rk×|V | x ∈ R|V | Wword ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
55/1
max
evT c uw
evT c uw
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
56/1
π(on)1 = 1 π(on)2 = 0 π(on)3 = 0 u1 u2 uV
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
57/1
π(on)1 = 1 π(on)2 = 0 π(on)3 = 0 u1 u2 uV
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
58/1
π(on)1 = 1 π(on)2 = 0 π(on)3 = 0 u1 u2 uV
c ui
c ui
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
59/1
π(on)1 = 1 π(on)2 = 0 π(on)3 = 0 u1 u2 uV
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
60/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
61/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
62/1
Human machine interface for computer applications User opinion of computer system response time User interface management system System engineering for improved response time
human machine system for ... user human 2.01 2.01 0.23 2.14 ... 0.43 machine 2.01 2.01 0.23 2.14 ... 0.43 system 0.23 0.23 1.17 0.96 ... 1.29 for 2.14 2.14 0.96 1.87 ...
. . . . . . . . . . . . . . . . . . . . . user 0.43 0.43 1.29
... 1.71
i vj = log P(j|i)
j vi = log Xij − log Xj
i vj is faithful
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
63/1
Human machine interface for computer applications User opinion of computer system response time User interface management system System engineering for improved response time
human machine system for ... user human 2.01 2.01 0.23 2.14 ... 0.43 machine 2.01 2.01 0.23 2.14 ... 0.43 system 0.23 0.23 1.17 0.96 ... 1.29 for 2.14 2.14 0.96 1.87 ...
. . . . . . . . . . . . . . . . . . . . . user 0.43 0.43 1.29
... 1.71
i vj = 2 log Xij − log Xi − log Xj
i vj = log Xij − 1
i vj = log Xij − bi − bj
i vj + bi + bj = log Xij
vi,vj,bi,bj
i vj + bi + bj
using model parameters
actual value computed from the given corpus
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
64/1
Human machine interface for computer applications User opinion of computer system response time User interface management system System engineering for improved response time
human machine system for ... user human 2.01 2.01 0.23 2.14 ... 0.43 machine 2.01 2.01 0.23 2.14 ... 0.43 system 0.23 0.23 1.17 0.96 ... 1.29 for 2.14 2.14 0.96 1.87 ...
. . . . . . . . . . . . . . . . . . . . . user 0.43 0.43 1.29
... 1.71
vi,vj,bi,bj
i vj + bi + bj − log Xij)2
vi,vj,bi,bj
i vj + bi + bj − log Xij)2
x xmax )α,
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
65/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
66/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
67/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
68/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
69/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
70/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
71/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
72/1
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10
73/1
h ∈ R|k| Wcontext ∈ Rk×|V | x ∈ R|V | Wword ∈ Rk×|V |
Mitesh M. Khapra CS7015 (Deep Learning) : Lecture 10