recursive deep models for semantic compositionality over a sentiment treebank

21
Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank Richard Socher, Alex Perelygin, Jean Y. Wu, Jason Chuang, Christopher D. Manning, Andrew Y. Ng and Christopher Potts Presented by Ben King For the NLP Reading Group November 13, 2013 (some material borrowed from the NAACL 2013 Deep Learning tutorial)

Upload: tomai

Post on 22-Feb-2016

43 views

Category:

Documents


0 download

DESCRIPTION

Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank. Richard Socher , Alex Perelygin , Jean Y. Wu, Jason Chuang, Christopher D. Manning, Andrew Y. Ng and Christopher Potts. Presented by Ben King For the NLP Reading Group November 13, 2013 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Recursive Deep Models for Semantic CompositionalityOver a Sentiment Treebank

Richard Socher, Alex Perelygin, Jean Y. Wu, Jason Chuang, Christopher D. Manning, Andrew Y. Ng and

Christopher Potts

Presented by Ben KingFor the NLP Reading Group

November 13, 2013(some material borrowed from the NAACL 2013 Deep Learning tutorial)

Page 2: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Sentiment Treebank

Page 3: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Need for a Sentiment Treebank

• Almost all work on sentiment analysis has used mostly word-order independent methods

• But many papers acknowledge that sentiment interacts with syntax in complex ways

• Little work has been done on these interactions because they’re very difficult to learn

• Single-sentence sentiment classification accuracy has languished at ~80% for a long time

Page 4: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Goal of the Sentiment Treebank

• At every level of the parse tree, annotate the sentiment of the phrase it subsumes

• Use a 5-class scheme (--, -, 0, +, ++)

Page 5: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Construction of the Sentiment Treebank

• For 11,855 sentences, parse and break into phrases (215,154 total)

• The sentiment of each phrase is annotated with Mechanical Turk

Page 6: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Construction of the Sentiment Treebank

Page 7: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Deep Learning in NLP

• Deep learning’s biggest victory in NLP has been to create good word representations

• Instead of representing a word as a sparse vector, deep learning gives us dense vectors– These representations also

encode a surprising amount of semantic information

Page 8: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Parsing with Deep Learning• Goals:

– combine word vectors into meaningful vectors of phrases

– Preserve word order information

Page 9: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Parsing with Deep Learning• At an abstract level,

we have a neural network that for each pair of words gives us:

1. A vector that represents their combination

2. A plausibility score

Page 10: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Parsing with Deep Learning

• All consecutive pairs of words are examined

Page 11: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Parsing with Deep Learning• The most

plausible pair is combined

• We then start the process again

Page 12: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Parsing with Deep Learning

Page 13: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Pros and Cons of this ApproachPros Cons

Good results Not expressive enough

More robust to unseen input Not appropriate for certain types of composition

Conceptually straightforward Treats all syntactic categories the same

Page 14: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Matrix Vector RNN (MV-RNN)

• Each word has both– An associated vector (it’s meaning)– An associated matrix (it’s personal composition

function)This is a good idea, but in practice, it’s way too many parameters to learn

If the vectors are d-dimensional, then every word, has (d+1)×d parameters.

Page 15: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Recursive Neural Tensor Network (RTNN)

• At a high level:– The composition function

is global (a tensor), which means fewer parameters to learn

– In the same way that similar words have similar vectors, this lets similar words have similar composition behavior

Page 16: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

What is this model able to do?

• Learns structures like “X but Y”

Page 17: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

What is this model able to do?

• Small changes are able to propagate all the way up the tree

Page 18: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

What is this model able to do?

• Learns how negation works, including many subtleties

Page 19: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Negation Evaluation

Page 20: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Sentiment Analysis Evaluation

Page 21: Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Positive and Negative N-grams