chris potts: sentiment analysis in context
TRANSCRIPT
6HQWLPHQW�DQDO\VLV�DV����
Ɣ 3UHGLFWLQJ�RQH�RI�D�KDQGIXO�RI�ODEHOV�IRU�WH[WV�LQ�LVRODWLRQ
Ɣ 3UHGLFWLQJ�D�PL[WXUH�RI�HPRWLRQDO�DQG�VRFLDO�LQIRUPDWLRQ�IRU�VSHHFK�DFWV�LQ�FRQWH[W
6HQWLPHQW�H[SUHVVLRQ�FRQGLWLRQHG�E\�DIIHFWLYH�WUDQVLWLRQV�DQG�VRFLDO�IRUFHV
0RULW]�6XGKRI 6WDQIRUG�&RPSXWHU�6FLHQFH$QGUpV�*yPH]�(PLOVVRQ 6WDQIRUG�3V\FKRORJ\$QGUHZ�/��0DDV 6WDQIRUG�&RPSXWHU�6FLHQFH&KULVWRSKHU�3RWWV 6WDQIRUG�/LQJXLVWLFV
alivesleepy
stressedoptimistic
boredblah
cheerfulconfusedamusedannoyedanxioushopefullonelytiredsad
exciteddepressed
calmhornyhappy
253232631626777285692864329119292352985031609332203499837504
515905209752975
6303565614
7634477209
89344
Moods Corpus 2 million posts
Emotion Transitions lo
g-sc
ale
CTP
(a,b
)
bewilderedartisticcuriousbouncychill
distressed
disappointedexcited
bewilderedcrushed
chill
chipperlazybitchybored
chipperblissfulbouncyenergeticflirty
numb
lonelydevastated
angry
melancholy
loved
amazing
goodexcitedamazed
optimistic
disappointed
peacefulblessed
determined
lonelycrusheddevastatedokay
melancholy
soreenergeticexcitedpeacefulrelaxed
busy
exhausteddistresseddrainednumb
awakesore
lazybusy
exhausted
worried
devastatednumb
okay
scared
amused anxious blah cheerful depressed happy hopeful sad satisfied stressed tired upset
0.03
0.04
0.06
0.1
Review Ratings
Rating
Reviews
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
0.3K
1.3K
2.5K
3.3K
4.8K
7.9K
negative(18% of reviews)
positive(25% of reviews)
neutral(58% of reviews)
2.9 million reviews
Review Sequence Transitions
negative
neutral
positive
positive neutral negative
0.07
0.21
0.51
0.4
0.67
0.44
0.53
0.12
0.04
(a) All product sequences
negative
neutral
positive
positive neutral negative
0.27
0.27
0.27
0.56
0.56
0.56
0.17
0.17
0.17
negative
neutral
positive
positive neutral negative
0.05
0.11
0.35
0.3
0.6
0.47
0.66
0.28
0.18
Review Sequence Transitions
negative
neutral
positive
positive neutral negative
0.07
0.21
0.51
0.4
0.67
0.44
0.53
0.12
0.04
(a) All product sequences (b) High-variance sequences (c) Randomized sequences
([SORLWLQJ�VRFLDO�QHWZRUN�VWUXFWXUH�IRU�SHUVRQ�WR�SHUVRQ�VHQWLPHQW�DQDO\VLV
5REHUW�:HVW 6WDQIRUG�&RPSXWHU�6FLHQFH+ULVWR�6��3DVNRY 6WDQIRUG�&RPSXWHU�6FLHQFH-XUH�/HVNRYHF 6WDQIRUG�&RPSXWHU�6FLHQFH&KULVWRSKHU�3RWWV 6WDQIRUG�/LQJXLVWLFV
In an hour from now…
I actually kind of liked it.
Bla bla … sentiment … bla bla bla … networks …
Dude, that was even more boring than his
gray shirt, eh?!
Yeah right. Great talk… He didn’t even
talk about deep learning.
Modeling person-to-person opinions:The NLP approach
Bla bla … sentiment … bla bla bla … networks …
Dude, that was even more boring than his
gray shirt, eh?!
I actually kind of liked it.Yeah right. Great
talk… He didn’t even talk about deep
learning.
Modeling person-to-person opinions:The social-network–analysis approach
Social balance theory
“The enemy of my enemy is my friend”
“The enemy of my friend
is my enemy”
“The friend of my friend is my friend”
Modeling person-to-person opinions:A unified view
–
++
–“The friend
of my enemy is my enemy”
– Yeah right. Great talk… He didn’t even talk
about deep learning.
Social balance theory
Modeling person-to-person opinions:A unified view
+“The friend of my friend is my friend”
++
The talk was amazing!
I couldn’t attend — I was stuck on
the Autobahn.
Social balance theory
ModelRepresent social network as a signed graph:
G = (V,E, p, x)}
fully observed
partially observed
x 2 {0, 1}|E|p 2 [0, 1]|E|
text-based sentiment predictions
edge signs 0 = – 1 = +
Task: Infer unobserved portion of x“Boring!”
v 2 Ve1 2 E
x1 = 0p1 = 0.04
x4 = ?p4 = 0.55
“Okay.”
We want to infer unobserved portion of such that we1. agree with text-based sentiment predictions, i.e., 2. get triangles in line with social theories
Trade-off:
Objective functionx
x ⇡ p
T
} }
Cost for deviating from text-based sent. prediction
Cost of triangle typext 2 {0, 1}3
EDGE COST TRIANGLECOST
x
⇤ = argminx2{0,1}|E|
X
e2E
|xe
� p
e
|+X
t2T
d(xt
)
HL-MRF (Broecheler et al., 2010)• Markov random field (MRF) with continuous variables• Potentials are sums of hinge-loss terms of linear
functions of variables.• Relaxed objective function equal to original
formulation when is binary, i.e., ,• but interpolates over continuous domain .• Objective function convex.• Efficiently solvable.
Relaxation as hinge-loss Markov random field (HL-MRF)
x 2 {0, 1}|E|
[0, 1]|E|
x
. .
x
6HQWLPHQW�DQDO\VLV�DV����
Ɣ 3UHGLFWLQJ�RQH�RI�D�KDQGIXO�RI�ODEHOV�IRU�WH[WV�LQ�LVRODWLRQ
Ɣ 3UHGLFWLQJ�D�PL[WXUH�RI�HPRWLRQDO�DQG�VRFLDO�LQIRUPDWLRQ�IRU�VSHHFK�DFWV�LQ�FRQWH[W