文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

35
文献紹介 2014/10/07 長岡技術科学大学 自然言語処理研究室 岡田 正平

description

動画 http://youtu.be/cQXAALuAFoI?list=PL6SnxjlP6lpHdWaieYa0BGVuj8fgfiIw1

Transcript of 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Page 1: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

文献紹介2014/10/07

長岡技術科学大学自然言語処理研究室

岡田正平

Page 2: 文献紹介: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 PottsRecursive Deep Models for Semantic Compositionality Over a Sentiment TreebankIn Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pp 1631-1642.2013.

2014/10/7 文献紹介 2

Page 3: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

概要• 感情解析における言語の compositional effect を扱う

• Stanford Sentiment Treebank の作成– 構文木の subtreeレベルで sentiment label を付与

• Recursive Neural Tensor Network (RNTN) の提案– 感情極性推定の精度で state of the art を上回る– 否定語の影響を正しく扱えていることを確認

2014/10/7 文献紹介 3

Page 4: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Stanford Sentiment Treebank

Page 5: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Stanford Sentiment Treebank• 初の完全にタグ付けされた構文木コーパス• Pang and Lee (2005)による dataset に基づく• 映画のレビューより抽出された11,855文(単文)

– 215,154 unique phrases – Stanford parser による構文解析

• 言語現象と感情の複雑な関係を解析できるようになる

2014/10/7 文献紹介 5

Page 6: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Stanford Sentiment Treebank• Amazon Mechanical Turk を利用

– 作業者は3人– 215,154句に25段階の値をつける

2014/10/7 文献紹介 6

Page 7: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Stanford Sentiment Treebank

2014/10/7 文献紹介 7

Page 8: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Recursive Neural Models

Page 9: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Recursive Neural Models• 構文型・可変長の句を扱うためのモデル• 入力文(n-gram)は2分木の構文木にparseされる

– 各単語が葉に相当• 子ノードのベクトルから親ノードのベクトルを計算

– 葉からbottom up的に,再帰的に行う• まず既存の Recursive Neural Models 2種類を説明次に提案手法の RNTN を説明

2014/10/7 文献紹介 9

Page 10: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Recursive Neural Models• 各単語は𝑑次元ベクトル

– word embedding matrix: 𝐿 ∈ ℝ𝑑× 𝑉

• 5値分類の例– 各ラベルに対する事後確率を求める𝑦𝑎 = softmax 𝑊𝑠𝑎

𝑊𝑠 ∈ ℝ5×𝑑

2014/10/7 文献紹介 10

Page 11: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Recursive Neural Models• Recursive Neural Network

𝑝1 = 𝑓 𝑊 𝑏𝑐 ,

𝑝2 = 𝑓 𝑊𝑎𝑝1

𝑊 ∈ ℝ𝑑×2𝑑

2014/10/7 文献紹介 11

Page 12: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Recursive Neural Models• Matrix-Vector RNN• 各単語や句をベクトルと行列の両方で表現する

𝑝1 = 𝑓 𝑊 𝐶𝑏𝐵𝑐 ,

𝑃1 = 𝑓 𝑊𝑀𝐵𝐶

𝑊𝑀 ∈ ℝ𝑑×2𝑑

2014/10/7 文献紹介 12

Page 13: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Recursive Neural Models• RNN

– 入力ベクトル(語や句)は非線形関数を通じてしか相互作用しない

• MV-RNN– 語彙数に対するパラメータ数の増加が大きい(各単語に対して𝑑 × 𝑑行列)

2014/10/7 文献紹介 13

Page 14: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

Recursive Neural Models• RNTN(提案手法)

𝑝1 = 𝑓 𝑏𝑐𝑇𝑉 1:𝑑 𝑏

𝑐 + 𝑊 𝑏𝑐 ,

𝑝2 = 𝑓𝑎𝑝1

𝑇𝑉 1:𝑑 𝑎

𝑝1 + 𝑊𝑎𝑝1

𝑉 1:𝑑 ∈ ℝ2𝑑×2𝑑×𝑑

2014/10/7 文献紹介 14

Page 15: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験

2014/10/7 文献紹介 15

Page 16: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験1. 各句に対する5値分類 (very negative ~ very positive)2. 各文に対する2値分類 (positive or negative)3. モデルの解析:対比接続詞 ‘X but Y’4. モデルの解析:High level negation5. モデルの解析:強いpositive/negativeを表す句

Page 17: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 比較手法• bag of words を素性としたナイーブベイズ (NB)• bag of words を素性としたSVM (SVM)• bag of bigrams を素性としたナイーブベイズ (BiNB)• neural word vector の平均を用いる手法 (VecAvg)• RNN• MV-RNN• RNTN (提案手法)

2014/10/7 文献紹介 17

Page 18: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | データセット• Sentiment Treebank を分単位で次のように分割(括弧内の数字は neutral を除いたもの)– train: 8,544 (6,920)– dev: 1,101 (872)– test: 2,210 (1,821)

2014/10/7 文献紹介 18

Page 19: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験1. 各句に対する5値分類 (very negative ~ very positive)2. 各文に対する2値分類 (positive or negative)3. モデルの解析:対比接続詞 ‘X but Y’4. モデルの解析:High level negation5. モデルの解析:強いpositive/negativeを表す句

Page 20: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果• 左:5値分類,右:2値分類 の精度

2014/10/7 文献紹介 20

Page 21: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果• RNTNが最高精度を達成

• 2値分類ではstate of the art でも80%を超えていなかった sentiment treebankを用いるとbaselineでさえ80%超 粗いアノテーションでは,強力なモデルを用いていても複雑な言語現象を捉えることができていなかった

2014/10/7 文献紹介 21

Page 22: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果

2014/10/7 文献紹介 22

Page 23: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果

2014/10/7 文献紹介 23

Page 24: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果• RNTNはほとんどのn-gramの長さにおいて最高精度• bag of feature では長い句に対してのみ性能を発揮

– 短い句においては,否定や構造の影響を強く受ける

2014/10/7 文献紹介 24

Page 25: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験1. 各句に対する5値分類 (very negative ~ very positive)2. 各文に対する2値分類 (positive or negative)3. モデルの解析:対比接続詞 ‘X but Y’4. モデルの解析:High level negation5. モデルの解析:強いpositive/negativeを表す句

Page 26: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果• 対比接続詞 ‘X but Y’

– XとYは句で,異なる感情を持つ(neutralを含む)– XとYの極性分類が正しく,接続詞’but’と句Y全体を表すノードを支配する最も低いノードがYと同じ極性を持つ場合に正解とする

• 131事例に対して,RNTNは41%の精度を達成– MV-RNN: 37%, RNN: 36%, biNB: 27%

2014/10/7 文献紹介 26

Page 27: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果

2014/10/7 文献紹介 27

Page 28: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験1. 各句に対する5値分類 (very negative ~ very positive)2. 各文に対する2値分類 (positive or negative)3. モデルの解析:対比接続詞 ‘X but Y’4. モデルの解析:High level negation5. モデルの解析:強いpositive/negativeを表す句

Page 29: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果High level negation• 評価のためにデータセットを2つに分割1. positive sentence の否定2. negative sentence の否定

2014/10/7 文献紹介 29

Page 30: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果positive sentence の否定• 否定により極性は positive から negative に変わる

2014/10/7 文献紹介 30

Page 31: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果negative sentence の否定• 否定によりnegative の度合いが弱まる(positiveとは限らない)

2014/10/7 文献紹介 31

Page 32: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果

2014/10/7 文献紹介 32

Page 33: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果• RNTNが否定の振舞いを最も正しく扱えている

2014/10/7 文献紹介 33

Page 34: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験1. 各句に対する5値分類 (very negative ~ very positive)2. 各文に対する2値分類 (positive or negative)3. モデルの解析:対比接続詞 ‘X but Y’4. モデルの解析:High level negation5. モデルの解析:強いpositive/negativeを表す句

Page 35: 文献紹介:Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank

実験 | 結果• 上位10 positive n-gramの sentiment value の平均値

2014/10/7 文献紹介 35