From Sentiment to Emotion Analysis in Social Networks

46
1 From Sentiment to Emotion Analysis in Social Networks Jie Tang Department of Computer Science and Technology Tsinghua University, China

description

From Sentiment to Emotion Analysis in Social Networks. Jie Tang Department of Computer Science and Technology Tsinghua University, China. Social Networks. > 1000 million users The 3 rd largest “Country” in the world More visitors than Google. > 800 million users. - PowerPoint PPT Presentation

Transcript of From Sentiment to Emotion Analysis in Social Networks

Page 1: From Sentiment to Emotion Analysis in Social Networks

1

From Sentiment to Emotion Analysis in Social Networks

Jie Tang

Department of Computer Science and TechnologyTsinghua University, China

Page 2: From Sentiment to Emotion Analysis in Social Networks

2

Social Networks• >1000 million users• The 3rd largest “Country” in the world• More visitors than Google

• More than 6 billion images

• 2009, 2 billion tweets per quarter• 2010, 4 billion tweets per quarter• 2011, tweets per quarter

• >800 million users

• Pinterest, with a traffic higher than Twitter and Google

25 billion

• 2013, users, 40% yearly increase560 million

Page 3: From Sentiment to Emotion Analysis in Social Networks

3

A Trillion Dollar Opportunity

Social networks already become a bridge to connect our daily physical life and the virtual web space

On2Off [1]

[1] Online to Offline is trillion dollar businesshttp://techcrunch.com/2010/08/07/why-online2offline-commerce-is-a-trillion-dollar-opportunity/

Page 4: From Sentiment to Emotion Analysis in Social Networks

4

Core Research in Social Network

BIG Social Data

Social Theories Algorithmic Foundations

BA m

odel

Social

influence

Action

Social Network Analysis

Theory

Prediction Search Information Diffusion AdvertiseApplication

Macro Meso Micro

ER

model

Com

munity

Group

behavior

Dunbar

Social tie

Page 5: From Sentiment to Emotion Analysis in Social Networks

5

Today, let us start with sentiment analysis…

Page 6: From Sentiment to Emotion Analysis in Social Networks

6

“Love Obama”

I love Obama

Obama is great!

Obama is fantastic

I hate Obama, the worst president ever

He cannot be the next president!

No Obama in 2012!

Positive Negative

Page 7: From Sentiment to Emotion Analysis in Social Networks

7

Homophily and Influence• 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.

Page 8: From Sentiment to Emotion Analysis in Social Networks

8

Twitter Data

• Twitter– 1,414,340 users and 480,435,500 tweets– 274,644,047 t-follow edges and 58,387,964 @ edges– Manually labeled thousands of users

[1] 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.

An example: “#lakers b**tch!” =?√ X

Page 9: From Sentiment to Emotion Analysis in Social Networks

9

Influence

Shared sentiment conditioned on type of connection.

Page 10: From Sentiment to Emotion Analysis in Social Networks

10

Selection

Connectedness conditioned on labels

Page 11: From Sentiment to Emotion Analysis in Social Networks

11

Question: what drives users’ sentiments?

Page 12: From Sentiment to Emotion Analysis in Social Networks

12

Sentiment vs. Emotion

Charles Darwin: – Emotion serves as a purpose

for humans in aiding their survival during the evolution.[1]

Emotion is the driving force of user’s sentiments…

Emotion stimulates the mind 3000 times quicker than rational thought!

[1] Charles Darwin. The Expression of Emotions in Man and Animals. John Murray, 1872.

Page 13: From Sentiment to Emotion Analysis in Social Networks

13

“Happy” System

Location SMS & Calling

EmotionActivities

Can we predict users’ emotion?

Page 14: From Sentiment to Emotion Analysis in Social Networks

14

Observations (cont.)

Location correlation(Red-happy)

Activity correlation

Karaoke

?

?

?

?

?

GYM

DormThe Old Summer Palace

Classroom

Page 15: From Sentiment to Emotion Analysis in Social Networks

15

Observations

(a) Social correlation (a) Implicit groups by emotions

(c) Calling (SMS) correlation

Page 16: From Sentiment to Emotion Analysis in Social Networks

16

Observations (cont.)

Temporal correlation

Page 17: From Sentiment to Emotion Analysis in Social Networks

17

Methodologies

Page 18: From Sentiment to Emotion Analysis in Social Networks

18

MoodCast: Dynamic Continuous Factor Graph Model

Jennifer

Happy

Happy

location

Neutral

Neutral

call

sms

Mike

Allen

MikeAllen

Jennifer today

Jennifer yesterday

?

Jennifer tomorrow

MoodCast

Predict

Attributes f(.)

Temporal correlation h(.)

Social correlation g(.)

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 Individual Emotional States in Social Networks. IEEE TAC, 2012, Volume 3, Issue 2, Pages 132-144.

Page 19: From Sentiment to Emotion Analysis in Social Networks

19

Problem Formulation

Gt =(V, Et, Xt, Yt)

Attributes: - Location: Lab - Activity: Working

Emotion: Sad

Learning Task:

Time t

Time t-1, t-2…

Page 20: From Sentiment to Emotion Analysis in Social Networks

20

Dynamic Continuous Factor Graph Model

Time t’

Time t

: Binary function

Page 21: From Sentiment to Emotion Analysis in Social Networks

21

Learning with Factor Graphs

Temporal

Social

Attribute

y3

y4y5

y2y1

y'3

Page 22: From Sentiment to Emotion Analysis in Social Networks

22

MH-based Learning algorithm

Random Sampling

Update

[1] 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.

Page 23: From Sentiment to Emotion Analysis in Social Networks

23

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?

Page 24: From Sentiment to Emotion Analysis in Social Networks

24

Q1: Conformity Influence

I love Obama

Obama is great!

Obama is fantastic

Positive Negative

2. Individual

3. Group conformity

1. Peer influence

[1] Jie Tang, Sen Wu, and Jimeng Sun. Confluence: Conformity Influence in Large Social Networks. In KDD’13, 2013.

Page 25: From Sentiment to Emotion Analysis in Social Networks

25

Conformity Factors• Individual conformity

• Peer conformity

• Group conformity

All actions by user v

A specific action performed by user v at time t

Page 26: From Sentiment to Emotion Analysis in Social Networks

26

Q2: Distributed Learning

SlaveCompute local gradient via random sampling

MasterGlobal update

Graph Partition by MetisMaster-Slave Computing

Inevitable loss of correlation factors!

Page 27: From Sentiment to Emotion Analysis in Social Networks

27

Random Factor GraphsMaster: Optimize with

Gradient DescentSlave: Distributedly

compute Gradient via LBP

Master-Slave Computing

Gradients

Parameters

K=1K=2Continue to increase K

Page 28: From Sentiment to Emotion Analysis in Social Networks

28

Model Inference• Calculate marginal probability in each subgraph

• Aggregate the marginal probability and normalize

Page 29: From Sentiment to Emotion Analysis in Social Networks

29

Theoretical Analysis• Θ*: 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:

Page 30: From Sentiment to Emotion Analysis in Social Networks

30

Experiments

Page 31: From Sentiment to Emotion Analysis in Social Networks

31

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

Page 32: From Sentiment to Emotion Analysis in Social Networks

32

Performance

Page 33: From Sentiment to Emotion Analysis in Social Networks

33

Results of Different Learning Algorithms

Page 34: From Sentiment to Emotion Analysis in Social Networks

34

Page 35: From Sentiment to Emotion Analysis in Social Networks

35

• Data Set

• Baseline– SVM– SVM with network features– Naïve Bayes– Naïve Bayes with network features

• Evaluation Measure:Precision, Recall, F1-Measure

#Users Avg. Links #Labels Other

MSN 30 3.2 9,869 >36,000hr

LiveJournal 469,707 49.6 2,665,166

Results for Emotion Analysis

Page 36: From Sentiment to Emotion Analysis in Social Networks

36

Performance Result

Page 37: From Sentiment to Emotion Analysis in Social Networks

37

Factor Contributions

• All factors are important for predicting user emotionsMobile

Page 38: From Sentiment to Emotion Analysis in Social Networks

38

Online Applications: Emotion Analysis on Flickr

Page 39: From Sentiment to Emotion Analysis in Social Networks

39

Page 40: From Sentiment to Emotion Analysis in Social Networks

40

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.[2 ] Grand Challenge 2nd Prize Award

Page 41: From Sentiment to Emotion Analysis in Social Networks

41

App1: Emotion Distribution on Flickr

Before Thanksgiving 2011 VS During Thanksgiving holiday

Happy, Cheerful, and Peaceful 100,000 Images from Flickr

Page 42: From Sentiment to Emotion Analysis in Social Networks

42

App2: Modify Images with Emotional Words

Happy

Natural

Clear

Original Image

Summer?

Autumn?

Winter?

More than 180 different effects

Page 43: From Sentiment to Emotion Analysis in Social Networks

43

Summary

Page 44: From Sentiment to Emotion Analysis in Social Networks

44

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

Page 45: From Sentiment to Emotion Analysis in Social Networks

45

Related Publications• Jie Tang, Jimeng Sun, Chi Wang, and Zi Yang. Social Influence Analysis in Large-scale

Networks. In KDD'09, pages 807-816, 2009.• 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, Sen Wu, and Jimeng Sun. Confluence: Conformity Influence in Large Social

Networks. In KDD’13.• 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 132-144. (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)

Page 46: From Sentiment to Emotion Analysis in Social Networks

46

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, http://keg.cs.tsinghua.edu.cn/jietangDownload data & Codes, http://arnetminer.org/download