"Distributed representation of sentences and documents"の解説

25
“Distributed Representation of Sentences and Documents”の解説 西尾泰和 1466日金曜日

description

word2vecの続編、Paragraph Vectorsについての論文"Distributed representation of sentences and documents"を紹介しました

Transcript of "Distributed representation of sentences and documents"の解説

Page 1: "Distributed representation of sentences and documents"の解説

“Distributed Representation of Sentences and

Documents”の解説西尾泰和

14年6月6日金曜日

Page 2: "Distributed representation of sentences and documents"の解説

前回までのあらすじ

http://papers.nips.cc/paper/5021-distributed-representations-of-words-and-phrases-and-their-compositionality.pdf

14年6月6日金曜日

Page 3: "Distributed representation of sentences and documents"の解説

文章は?

可変長↑

14年6月6日金曜日

Page 4: "Distributed representation of sentences and documents"の解説

Bag-of-Words(BoW)

14年6月6日金曜日

Page 5: "Distributed representation of sentences and documents"の解説

(追記)• BoWはVocab次元

• 順序の情報がなくなる• A is better than B と B is better than Aは同じ

• この種の区別ができなくなる高次脳機能障害がある。

14年6月6日金曜日

Page 6: "Distributed representation of sentences and documents"の解説

文章のベクトル化

• BoWは単語の1-of-K表現の和

• じゃあ単語の分散表現の和でいい?

14年6月6日金曜日

Page 7: "Distributed representation of sentences and documents"の解説

BoW

Word Vectorの和(平均)

提案手法はもっと性能がよい!

文章からそれが肯定的か否定的か判断する実験

14年6月6日金曜日

Page 8: "Distributed representation of sentences and documents"の解説

提案手法

• PV-DM: Distributed Memory Model

• PV-DBOW: Distributed Bag of Words

の2つの組み合わせPV-DMだけでもかなり良いがPV-DBOWを組み合わせると更に良い

14年6月6日金曜日

Page 9: "Distributed representation of sentences and documents"の解説

↑Vocab次元1-of-K

PV-DM

Para次元1-of-K→

予測問題を解かせることで分散表現を作るこのコンセプトはCBOWと同じ

14年6月6日金曜日

Page 10: "Distributed representation of sentences and documents"の解説

PV-DM• 予測問題を解かせることで分散表現を作る• このコンセプトはCBOWと同じ

• だけどsumやaverageではなくconcatenateなので、語順の情報が保たれている

• IntroでBoWは語順が失われると批判してる

• 図ではaverageも含めてるが、実験結果はconcatのものだけ

14年6月6日金曜日

Page 11: "Distributed representation of sentences and documents"の解説

PV-DM

Averageのことは無視しよう14年6月6日金曜日

Page 12: "Distributed representation of sentences and documents"の解説

(追記)

14年6月6日金曜日

Page 13: "Distributed representation of sentences and documents"の解説

PV-DM

• Paragraph IDから隠れ層への投影(行列D)は予測性能を上げるために、文脈だけでは表現できない情報を表現する役割を担う

• 学習データになかった新しいParagraphに関しては、Word Vectors等を固定して学習

14年6月6日金曜日

Page 14: "Distributed representation of sentences and documents"の解説

PV-DBOW

「その段落での各単語の出現頻度」をVocab次元の数十万から400次元へ落としたもの

14年6月6日金曜日

Page 15: "Distributed representation of sentences and documents"の解説

実験1

• 映画のレビュー文章を見て、ポジティブなのかネガティブなのか判定する

14年6月6日金曜日

Page 16: "Distributed representation of sentences and documents"の解説

Positive? Negative?• It starts out like a very serious social commentary which

quickly makes one think of other Clark movies like Kids, Bully, etc. But then just as quickly, it unravels into a direction-less mess. Who is the main character? Is this a serious film or some Gregg Araki-esquire over the top goofy film? Is this a skate documentary with moments of dialog inserted? I have no clue. I found myself watching the clock and wonder when this turd was going to end. I kept thinking there would be some big shocker culmination which never came. I cut a good 20 minutes out of the movie by fast forwarding through the pointless skate scenes. Yes, it illustrates the changing landscape

14年6月6日金曜日

Page 17: "Distributed representation of sentences and documents"の解説

Positive? Negative?• It starts out like a very serious social commentary which

quickly makes one think of other Clark movies like Kids, Bully, etc. But then just as quickly, it unravels into a direction-less mess. Who is the main character? Is this a serious film or some Gregg Araki-esquire over the top goofy film? Is this a skate documentary with moments of dialog inserted? I have no clue. I found myself watching the clock and wonder when this turd was going to end. I kept thinking there would be some big shocker culmination which never came. I cut a good 20 minutes out of the movie by fast forwarding through the pointless skate scenes. Yes, it illustrates the changing landscape

14年6月6日金曜日

Page 18: "Distributed representation of sentences and documents"の解説

順序の重要さ• 「Who is the main character?」は人間が見ればネガティブだとすぐわかる

• でも「main character」だけではネガティブじゃないし、その他のis, the, who, ?もそれ単体ではネガティブな意味を持たない

• (あえて言えば ? は少しネガティブ)

14年6月6日金曜日

Page 19: "Distributed representation of sentences and documents"の解説

Protocol

入力は1文、学習データのパラグラフは8544個「8544→800はあんまり次元削減してなくない?」

14年6月6日金曜日

Page 20: "Distributed representation of sentences and documents"の解説

BoW

提案手法は性能がよいし、構文解析も要らない!

構文解析を必要とする手法

14年6月6日金曜日

Page 21: "Distributed representation of sentences and documents"の解説

実験2

• 映画のレビュー文章を見て、ポジティブなのかネガティブなのか判定する

• 実験1は入力が1文、こちらは複数文

14年6月6日金曜日

Page 22: "Distributed representation of sentences and documents"の解説

Protocol

間にNNが挟まっているのは線形のLogRegより非線形にしたほうが性能が良かったから

「800次元もあって線形分離で性能が出ないの?」「NNの出力の次数は?」

14年6月6日金曜日

Page 23: "Distributed representation of sentences and documents"の解説

RBM

Naive Bayes+ SVM

PV-DM only: 7.63PV-DM sum: 8.06

↑PV-DM + PV-DBOW

window size 5~12の範囲で0.7%変化する→cross validationで選ぶべき

14年6月6日金曜日

Page 24: "Distributed representation of sentences and documents"の解説

時間コスト• 「can be expensiveだけどテストは並列化可能、

16コアで25000段落平均230単語が30分」

• でもテストの前の学習フェーズは単純に考えてデータ量が3倍、5~12のwindowサイズ探しで8倍

• テストフェーズではWord Vector等を固定してるからその部分の学習コストは含まれてない

→全部入りにすると結構掛かるんじゃないか?

14年6月6日金曜日

Page 25: "Distributed representation of sentences and documents"の解説

むしろBigram NaiveBayes系の優秀さが際立つ?

(追記)

NaiveBayes+SVM, bigram→

14年6月6日金曜日