Slides

advertisement
From Sentiment to Emotion Analysis
in Social Networks
Jie Tang
Department of Computer Science and Technology
Tsinghua University, China
1
From Info. Space to Social Space
Revolutionary changes…
Info.
Space
1.Social Tie & Group
Interaction
2.Social Influence
3.Collective Intelligence
Social
Space
2
Revolutionary Changes
Social Networks
Search
Embedding social in
search:
• Google plus
• FB graph search
• Bing’s influence
3
Education
Human Computation:
• CAPTCHA + OCR
• MOOC
• Duolingo (Machine
Translation)
O2O
The Web knows you
than yourself:
• Contextual
computing
• Big data marketing
...
More …
Let us start with sentiment analysis…
4
“Love Obama”
I hate Obama, the
worst president ever
I love Obama
Obama is
fantastic
Obama is
great!
No Obama in
2012!
He cannot be the
next president!
Positive
5
Negative
Homophily
• Homophily—“birds of a feather flock together”
– A user in the social network tends to be similar to their
connected neighbors.
• Originated from different mechanisms
– Influence
• Indicates people tend to follow the behaviors of their friends
– Selection
• Indicates people tend to create relationships with other people who
are already similar to them
– Confounding variables
• Other unknown variables exist, which may cause friends to behave
similarly with one another.
6
Twitter Data
• Twitter
– 1,414,340 users and 480,435,500 tweets
– 274,644,047 t-follow edges and 58,387,964 @ edges
[1] Chenhao Tan, Lillian Lee, Jie Tang, Long Jiang, Ming Zhou, and Ping Li. User-level sentiment analysis incorporating
social
7 networks. In KDD’11, pages 1397–1405, 2011.
Influence
Shared sentiment conditioned on type of connection.
8
Selection
Connectedness conditioned on labels
9
One question: what drives users’
sentiments?
10
Sentiment vs. Emotion
Emotion is the driving force of user’s sentiments…
Charles Darwin:
– Emotion serves as a purpose
for humans in aiding their
survival during the evolution.[1]
Emotion stimulates the mind 3000 times quicker
than rational thought!
[1]11
Charles Darwin. The Expression of Emotions in Man and Animals. John Murray, 1872.
Happy System
Can we predict users’
emotion?
12
Observations (cont.)
The Old Summer
Palace
Dorm
?
?
?
?
Classroom
GYM
?
Location correlation
(Red-happy)
13
Karaoke
Activity correlation
Observations
(a) Social correlation
(a) Implicit groups by emotions
(c) Calling (SMS) correlation
14
Observations (cont.)
Temporal correlation
15
Methodologies
16
MoodCast: Dynamic Continuous Factor
Graph Model
MoodCast
Jennifer
Social correlation g(.)
Happy
Temporal
correlation h(.)
Allen
Mike
Allen
Neutral
Jennifer
tomorrow
Mike
Jennifer
yesterday
Predict
Neutral
?
Happy
Jennifer today
Attributes f(.)
sms
location
call
Our solution
1. We directly define continuous feature function;
2. Use Metropolis-Hasting algorithm to learn the factor graph model.
[1] Jie Tang, Yuan Zhang, Jimeng Sun, Jinghai Rao, Wenjing Yu, Yiran Chen, and ACM Fong. Quantitative Study of
17
Individual
Emotional States in Social Networks. IEEE TAC, 2012, Volume 3, Issue 2, Pages 132-144.
Problem Formulation
Time t
Gt =(V, Et, Xt, Yt)
Emotion: Sad
Time t-1, t-2…
Attributes:
- Location: Lab
- Activity: Working
Learning Task:
18
Dynamic Continuous Factor Graph Model
Time t’
Time t
: Binary function
19
Learning with Factor Graphs
y5
y4
y3
y'3
y2
Attribute
Social
Temporal
20
y1
MH-based Learning algorithm
[1] Yuan Zhang, Jie Tang, Jimeng Sun, Yiran Chen, and Jinghai Rao. MoodCast: Emotion Prediction via Dynamic
21
Continuous
Factor Graph Model. In ICDM’10. pp. 1193-1198.
Still Challenges
• Q1: Are there any other social factor that may
affect the prediction results?
• Q2: How to scale up the model to large
networks?
22
Q1: Conformity Influence
Positive
Negative
I love Obama
3. Group conformity
Obama is
fantastic
Obama is
great!
1. Peer
influence
2. Individual
[1] Jie Tang, Sen Wu, and Jimeng Sun. Confluence: Conformity Influence in Large Social Networks. In KDD’13, 2013.
23
Conformity Factors
• Individual conformity
• Peer conformity
• Group conformity
24
A specific action performed
by user v at time t
All actions by user v
Q2: Distributed Learning
Master
Global
update
Slave
Compute local gradient
via random sampling
Graph Partition by Metis
Master-Slave Computing
Inevitable loss of
correlation factors!
25
Random Factor Graphs
Slave: Distributedly
compute Gradient via
LBP
Gradients
Master: Optimize with
Gradient Descent
Parameters
Master-Slave
Computing
26
Model Inference
• Calculate marginal probability in each subgraph
• Aggregate the marginal probability and
normalize
27
Theoretical Analysis
•
•
•
•
•
28
Θ*: Optional parameter of the complete graph
Θ: Optional parameter of the subgraphs
Ps,j: True marginal distributions on the complete graph
G*s,j: True marginal distributions on subgraphs
Let Es,j = log G*s,j – log Ps,j,we have:
Experiments
29
Results for Sentiment Analysis
• Twitter
– 1,414,340 users and 480,435,500 tweets
– 274,644,047 t-follow edges and 58,387,964 @ edges
• Baseline
– SVM Vote
• Measures
– Accuracy and Macro F1
30
Performance
31
Results of Different Learning Algorithms
32
33
Results for Emotion Analysis
• Data Set
#Users
Avg. Links
#Labels
Other
MSN
30
3.2
9,869
>36,000hr
LiveJournal
469,707
49.6
2,665,166
• Baseline
–
–
–
–
SVM
SVM with network features
Naïve Bayes
Naïve Bayes with network features
• Evaluation Measure:
Precision, Recall, F1-Measure
34
Performance Result
35
Factor Contributions
Mobile
• All factors are important for predicting user emotions
36
Online Applications:
Emotion Analysis on Flickr
37
38
 Framework: Images -Aesthetic Effects -Emotions
 Model: Factor Graphs for images in Social Networks
[1] Jia Jia, Sen Wu, Xiaohui Wang, Peiyun Hu, Lianhong Cai, and Jie Tang. Can We Understand van Gogh’s Mood?
Learning to Infer Affects from Images in Social Networks. In ACM Multimedia. pp. 857-860.
[239
] Grand Challenge 2nd Prize Award
App1: Emotion Distribution on Flickr
Before Thanksgiving 2011
100,000 Images from Flickr
40
VS
During Thanksgiving holiday
Happy, Cheerful, and Peaceful
App2: Modify Images with Emotional Words
Happy
Summer
?
More than 180
different effects
Natural
Autumn
?
Original Image
Clear
41
Winter?
Summary
42
Summary
• Social networks bring revolutionary changes to
the Web and unprecedented opportunities for us
• Emotion stimulates minds 3000 times faster
than rational thoughts!
• Embedding social theories into
sentiment/emotion analysis can benefit many
applications
43
Related Publications
•
•
•
•
•
44
Chenhao Tan, Lillian Lee, Jie Tang, Long Jiang, Ming Zhou, and Ping Li. User-level
sentiment analysis incorporating social networks. In KDD’11, pages 1397–1405,
2011.
Jie Tang, Yuan Zhang, Jimeng Sun, Jinghai Rao, Wenjing Yu, Yiran Chen, and ACM
Fong. Quantitative Study of Individual Emotional States in Social Networks. IEEE
Transactions on Affective Computing (TAC), 2012, Volume 3, Issue 2, Pages 132144. (Selected as the Spotlight Paper)
Yuan Zhang, Jie Tang, Jimeng Sun, Yiran Chen, and Jinghai Rao. MoodCast:
Emotion Prediction via Dynamic Continuous Factor Graph Model. In ICDM’10. pp.
1193-1198.
Jia Jia, Sen Wu, Xiaohui Wang, Peiyun Hu, Lianhong Cai, and Jie Tang. Can We
Understand van Gogh’s Mood? Learning to Infer Affects from Images in Social
Networks. In ACM MM, pages 857-860, 2012.
Xiaohui Wang, Jia Jia, Peiyun Hu, Sen Wu, Lianhong Cai, and Jie Tang.
Understanding the Emotional Impact of Images. (Grand Challenge) In ACM MM. pp.
1369-1370. (Grand Challenge 2nd Prize Award)
Thanks you!
Collaborators: Lillian Lee, Chenhao Tan (Cornell)
Ming Zhou, Long Jiang (Microsoft), Yuan Zhang (MIT)
Jimeng Sun (IBM), Jinghai Rao (Nokia)
Sen Wu, Jia Jia, Xiaohui Wang, Yiran Chen, Wenjing Yu (THU)
Jie Tang, KEG, Tsinghua U,
Download data & Codes,
45
http://keg.cs.tsinghua.edu.cn/jietang
http://arnetminer.org/download
Download