15
Paper Survey Semi-Supervised Recursive Autoencoders for Predicting Sentiment Distributions R. Socher, et al, 2011 Presenter:Shun Yoshida

Semi supervised recursive autoencoders for predicting sentiment distributions

Embed Size (px)

DESCRIPTION

Paper survey of Semi-Supervised Recursive Autoencoders for Predicting Sentiment Distributions

Citation preview

Page 1: Semi supervised recursive autoencoders for predicting sentiment distributions

Paper Survey

Semi-Supervised Recursive Autoencoders for Predicting Sentiment Distributions

R. Socher, et al, 2011Presenter:Shun Yoshida

Page 2: Semi supervised recursive autoencoders for predicting sentiment distributions

概要

Semi-Supervised Recursive Autoencoders for Predicting Sentiment Distributions

半教師あり学習の枠組み ➔ Semi-Supervised 再帰的な処理で任意の長さの単語 (= 特徴次元 ) を扱う

➔ Recursive 単語を単語の意味を表した低次元の word embedding で

扱う ➔ Autoencoders 文章の感情の分布を推定できる (i.e. 喜び: 7 割,驚き:

3 割 ) ➔Predicting Sentiment Distributions

2

Page 3: Semi supervised recursive autoencoders for predicting sentiment distributions

Autoencoder とは

NN の一種

出力が入力を再現するような学習を行う

隠れ層のユニット数は入力層のユニット数より少ない

3

➔ 特徴をよく捉えた低次元の表現 (word embedding) が 学習できる

Page 4: Semi supervised recursive autoencoders for predicting sentiment distributions

ベクトル表現

番目の単語の indicator vector ( 最終的に )word embedding になる単語ベクトル

初期値はガウス分布からサンプル or ニューラル言語モデル

すべてのの値が記憶される行列

語の文章はベクトルリスト表す

4

Page 5: Semi supervised recursive autoencoders for predicting sentiment distributions

Traditional Recursive AEs

二分木とみなして ...子 2 つ (2n 次元 ) を入力層として親を隠れ層 (n 次元 ) とするAE を作る子→親:親→子:子の再構成エラー:

5

encode の重み ( 入力→隠れ )decode の重み ( 隠れ→出力 )

Page 6: Semi supervised recursive autoencoders for predicting sentiment distributions

Traditional Recursive AEs

先ほどの手順で計算した親を次は子とみなし,次の層の親を計算する.この繰り返しで任意の長さの文章を扱う

6

Page 7: Semi supervised recursive autoencoders for predicting sentiment distributions

二分木の構造推定

再構成エラーが小さい うまく低次元に射影ができている➔再構成エラーが小さくなる木の形を貪欲法で求める

7

隣合うベクトルどうしでペアを組みを求めていくStep1 ではのいずれかのが最小になったとするStep2 ではのいずれか

繰り返すと二分木の構造が推定できる

Page 8: Semi supervised recursive autoencoders for predicting sentiment distributions

の修正

木の 2 層目以降では二分木の入力ベクトルの情報量に差が生じる➔ 情報量の多い方をより正しく再現できるようにの重みを修正

8

1 単語分の情報

3 単語分の情報

Page 9: Semi supervised recursive autoencoders for predicting sentiment distributions

親ベクトルの正規化

は c1 と c2 の差で求めるため,木の上層ではベクトルの大きさを小さくしてを小さくしてしまう問題がある

で大きさを正規化することで問題回避➔ ( たぶん )

9

Page 10: Semi supervised recursive autoencoders for predicting sentiment distributions

結局なにができたの?

従来法

特徴は決まった単位の文字 (1 単語 ) のまましか扱えない

提案法

 うまく感情推定ができる任意の単位長の文字を特徴として使 える

ここまでは教師なし学習のおはなし ....

10

1 単語 1 単語 1 単語 1 単語 1 単語

1 単語 3 単語 2 単語

1 単語

1 単語 文全体

Page 11: Semi supervised recursive autoencoders for predicting sentiment distributions

教師あり学習

親ノードはフレーズの distributed representation になっている に感情分布を予測する出力層を追加➔

教師ベクトル:文章の感情分布 によって推定された感情分布

11

からを推定する重み

Page 12: Semi supervised recursive autoencoders for predicting sentiment distributions

教師あり学習

との差をユークリッド距離で定義した との差をクロスエントロピーで定義する

( がに近づくほどは小さくなる )

12

Page 13: Semi supervised recursive autoencoders for predicting sentiment distributions

クロスエントロピー(抜粋)

クロスエントロピー(英 : Cross entropy )とは、情報理論において 2 つの確率分布の間に定義される尺度である。符号化方式が、真の確率分布 p ではなく、ある所定の確率分布 q に基づいている場合に、とりうる複数の事象の中からひとつの事象を特定するために必要となるビット数の平均値を表す。

クロスエントロピー最小化は、最適化と希少事象の予測によく使われる技法である(クロスエントロピー法)。確率分布 q を参照用固定確率分布 p と比較したとき、クロスエントロピーとカルバック・ライブラー情報量は( p が固定なので)付加的な定数を除いて同一である。どちらも p = q であるとき最小値となり、カルバック・ライブラーの値は 0 、クロスエントロピーの値は H(p) となる。

13

Page 14: Semi supervised recursive autoencoders for predicting sentiment distributions

目的関数完成形

教師なし学習によって ... 一番が小さくなる木の形を学習 ( 最適木と呼ぶ )

教師あり学習によって ... 最適木の各親ノードでのを計算

(

14

Page 15: Semi supervised recursive autoencoders for predicting sentiment distributions

学習

とおいて

勾配法 (L-BFGS) によってパラメータを学習する.

15