Coooolll: A Deep Learning System for Twitter Sentiment...

16
Coooolll: A Deep Learning System for Twitter Sentiment Classification Duyu Tang 1 , Furu Wei 2 , Bing Qin 1 , Ting Liu 1 , Ming Zhou 2 1 Harbin Institute of Technology 2 Microsoft Research

Transcript of Coooolll: A Deep Learning System for Twitter Sentiment...

Page 1: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Coooolll: A Deep Learning System for Twitter Sentiment Classification

Duyu Tang1, Furu Wei2, Bing Qin1, Ting Liu1, Ming Zhou2

1 Harbin Institute of Technology 2 Microsoft Research

Page 2: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Twitter sentiment classification

• Input: A tweet

• Output: Sentiment polarity of the tweet

– Positive / Negative / Neutral

2

Page 3: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Feature representation is crucial

• NRC-Canada (Top system in SemEval 2013)

– Designing effective features

• Sentiment lexicons

• Linguistic rules

– Enhance the feature representation from massive data for Twitter sentiment classification?

3

Page 4: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Our System

• Coooolll : A deep learning system for Twitter sentiment classification

Training Data

Learning Algorithm

Feature Representation

Sentiment Classifier

1 2 ….

N

N+1 N+2 …

N+K

NRC-Canada Feature

SSWE Feature

all-cap

emoticon

….

dimension 1

dimension 2

dimension N

elongated

Massive Tweets

Embedding Learning

4

Page 5: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Word Representation (Embedding)

• Word Embedding

• Word embedding is important

– Compositionality

– [Yessenalina11; Socher13]

it is not so good

Compositionality

it is not so good

5

linguistic =

1.045 0.912

-0.894 -1.053 0.459

ship Beijing

Harbin

vessel

boat

x1

x2

Page 6: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Not Enough for Sentiment Analysis

• Existing embedding learning algorithms typically use the syntactic contexts of words.

he formed the good habit of …

he formed the bad habit of …

Same contexts

ship Beijing

Shenzhen

vessel

boat

x1

x2 bad good

6

The words with similar contexts but opposite sentiment polarity are mapped into close vectors.

Page 7: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

SSWE Unified

• Intuition

– Use both the syntactic contexts of words and the sentiment polarity of sentences to learn the sentiment-specific word embedding

– Solution

• A hybrid loss function by capturing both information

7

he formed the good habit of

Context Sentiment

Page 8: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Text it is so coooll :)

Input Window

𝐷 𝐿𝑇𝑤

𝑀1 ×⊙

Lookup Table

Linear

𝐻

HardTanh

𝐻

Linear

𝑀2 ×⊙ C = 2

concatenate

Loss Function Syntactic

Loss

Sentiment Loss

Sentiment Loss

8

SSWE Unified

Syntactic Loss

Page 9: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Embedding Training

• Data – Tweets contains positive/negative emoticons

– 5M positive, 5M negative tweets from April, 2013

• Back-propagation + AdaGrad [Duchi 2011] – Embedding length = 50

– Window size = 3

– Learning rate = 0.1

9

Hu et al., 2013

Page 10: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Twitter Sentiment Classification

don’t miss wanna :) it i

average max

concatenate

min

Input

Embedding Layer

Layer 𝒇

Layer 𝒇′

Training Data

Learning Algorithm

Sentiment Classifier

10

NRC-Canada Feature +

Page 11: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Experiment

• Results

– Coooolll is ranked 2nd on Twitter2014 test set.

11

Page 12: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Detailed Results on Twitter2014

• Positive / Negative / Neutral classification

12

Average: 60.41 Top: 70.96

60

63

66

69

72

NRC SSWE Coooolll

Page 13: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Detailed Results on Twitter2014

• Positive / Negative classification

13

80

82

84

86

88

NRC SSWE Coooolll

Page 14: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Results on Twitter2013

• Comparison with Different Embeddings

0.64

0.68

0.72

0.76

0.8

0.84

0.88

14 Results of POS/NEG classification on SemEval 2013. Detailed in our ACL 2014 paper.

Page 15: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Summary

• We introduce a deep learning system for Twitter sentiment classification.

• We verify the effectiveness of the sentiment-specific word embedding for Twitter sentiment classification.

• We publish the sentiment-specific word embedding at http://ir.hit.edu.cn/~dytang.

15

Page 16: Coooolll: A Deep Learning System for Twitter Sentiment …ir.hit.edu.cn/~dytang/paper/semeval2014/semeval-slides.pdf · 2014-09-07 · •Coooolll: A deep learning system for Twitter

Thanks

16