![Page 1: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/1.jpg)
“Distributed Representation of Sentences and
Documents”の解説西尾泰和
14年6月6日金曜日
![Page 2: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/2.jpg)
前回までのあらすじ
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"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/3.jpg)
文章は?
可変長↑
14年6月6日金曜日
![Page 4: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/4.jpg)
Bag-of-Words(BoW)
14年6月6日金曜日
![Page 5: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/5.jpg)
(追記)• BoWはVocab次元
• 順序の情報がなくなる• A is better than B と B is better than Aは同じ
• この種の区別ができなくなる高次脳機能障害がある。
14年6月6日金曜日
![Page 6: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/6.jpg)
文章のベクトル化
• BoWは単語の1-of-K表現の和
• じゃあ単語の分散表現の和でいい?
14年6月6日金曜日
![Page 7: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/7.jpg)
BoW
Word Vectorの和(平均)
提案手法はもっと性能がよい!
文章からそれが肯定的か否定的か判断する実験
14年6月6日金曜日
![Page 8: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/8.jpg)
提案手法
• 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"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/9.jpg)
↑Vocab次元1-of-K
PV-DM
Para次元1-of-K→
予測問題を解かせることで分散表現を作るこのコンセプトはCBOWと同じ
14年6月6日金曜日
![Page 10: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/10.jpg)
PV-DM• 予測問題を解かせることで分散表現を作る• このコンセプトはCBOWと同じ
• だけどsumやaverageではなくconcatenateなので、語順の情報が保たれている
• IntroでBoWは語順が失われると批判してる
• 図ではaverageも含めてるが、実験結果はconcatのものだけ
14年6月6日金曜日
![Page 11: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/11.jpg)
PV-DM
✕
Averageのことは無視しよう14年6月6日金曜日
![Page 12: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/12.jpg)
(追記)
14年6月6日金曜日
![Page 13: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/13.jpg)
PV-DM
• Paragraph IDから隠れ層への投影(行列D)は予測性能を上げるために、文脈だけでは表現できない情報を表現する役割を担う
• 学習データになかった新しいParagraphに関しては、Word Vectors等を固定して学習
14年6月6日金曜日
![Page 14: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/14.jpg)
PV-DBOW
「その段落での各単語の出現頻度」をVocab次元の数十万から400次元へ落としたもの
14年6月6日金曜日
![Page 15: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/15.jpg)
実験1
• 映画のレビュー文章を見て、ポジティブなのかネガティブなのか判定する
14年6月6日金曜日
![Page 16: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/16.jpg)
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"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/17.jpg)
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"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/18.jpg)
順序の重要さ• 「Who is the main character?」は人間が見ればネガティブだとすぐわかる
• でも「main character」だけではネガティブじゃないし、その他のis, the, who, ?もそれ単体ではネガティブな意味を持たない
• (あえて言えば ? は少しネガティブ)
14年6月6日金曜日
![Page 19: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/19.jpg)
Protocol
入力は1文、学習データのパラグラフは8544個「8544→800はあんまり次元削減してなくない?」
14年6月6日金曜日
![Page 20: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/20.jpg)
BoW
提案手法は性能がよいし、構文解析も要らない!
構文解析を必要とする手法
14年6月6日金曜日
![Page 21: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/21.jpg)
実験2
• 映画のレビュー文章を見て、ポジティブなのかネガティブなのか判定する
• 実験1は入力が1文、こちらは複数文
14年6月6日金曜日
![Page 22: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/22.jpg)
Protocol
間にNNが挟まっているのは線形のLogRegより非線形にしたほうが性能が良かったから
「800次元もあって線形分離で性能が出ないの?」「NNの出力の次数は?」
14年6月6日金曜日
![Page 23: "Distributed representation of sentences and documents"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/23.jpg)
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"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/24.jpg)
時間コスト• 「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"の解説](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cceebd8b42a0c368b47b2/html5/thumbnails/25.jpg)
むしろBigram NaiveBayes系の優秀さが際立つ?
(追記)
NaiveBayes+SVM, bigram→
14年6月6日金曜日