SlideShare a Scribd company logo
1 of 19
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
2018-11-19, ACL2018 読み会
読み手 竹中誠
※図・表は論文より引用
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
どういう論文か?
• Noise Contrastive Estimation [Gutmann & Hyvarinen, 2012] (イカ、NCE) の改良
を提案
• GAN にもとづくノイズ分布の改良・定式化
• NCEがそうであるようにいろんな embedding task に適用可能
• 典型的なタスクで効果を確認した
1
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
準備:NCEとは?
• 例えばイカのようなモデルを考える
• 対数尤度最大化で学習すれば(・∀・)イイ!!
• 分配関数の計算重い(´・ω・`)ショボーン
• →NCE!!
• 正例と負例を識別する2値識別問題にすり替える
• Zもパラメータとして全体を推定しよう!
• そのまま最尤推定できないので2値識別にすり替える
• データ分布pからのサンプルかノイズ分布qからのサンプルかを識別する
• そのままやったらc->∞でとればよいのでできない
• 2値はスイッチ確率変数D={1,0}で表す
• ノイズ分布qからはk倍出やすいとすると右式のようになる
• で、結局NSのlossはイカ
2
4章
NCE含め、分配関数の推定・
近似手法がまとまっている
18章
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
準備:NCE の pros/cons
• pros
• 分配関数の直接評価が不要で推定可能
• 性質の良い推定量であることが知られている(漸近的にMLE)
• cf. https://qiita.com/Quasi-quant2010/items/a15b0d1b6428dc49c6c2
(こちらが詳しくまとまっており参考にさせていただきました)
• cons
• 負例数が小さい世界では、ノイズ分布が非自明
• ノイズ分布が負例の質を決め、結果的に収束性にきいてくる
• ノイズ分布は本来条件付き分布 p(y|x) が用いられるべきだが、しばしばp(y)が使わ
れる
3
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
本研究のモチベーション
• NCE において分類器を効率的に学習したい
• → できるだけ hard な負例がサンプルされたい
• → でもNCEのノイズ分布はザル
• → ノイズ分布を工夫しよう
4
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
準備:NCE の定式化とノイズ分布
• NCEの目的関数→尤度の期待値を最大化しよう
l:尤度
w:パラメタ
positive tuple (x+, y+)
negative tuple (x+, y-)
※いま、lwが pos score とneg score の和に
分離可能なケースを考える
あと、NCE ではノイズ分布に conditional(p-(y|x)) ではなく単に p(y-) が使われるのでそれを明示的に書くとイカ
=
=
ノイズ分布
5
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
提案手法:adversarial mixture noise
• NCE の noise 分布を改良
• 従来の pnce と gθ の加重平均(λはハイパラ)
• gθ(y|x):敵対的ノイズ分布(GAN でいう generator)
• ACE の目的関数はイカ
• minmax game で (ω,θ) を学習
NCE のノイズ分布 新たに加えた項
(再掲) NCE の目的関数
6
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
gθ の学習
• gθ は離散値なのでDへ勾配を伝播できない
• Gumbel-softmax の reparam-trick
• そもそも問題設定が 1 << N なので却下
• これを許容できればそもそもZを直接評価すれば良くなる
• なので、方策勾配をつかう
• REINFORCE[Williams1992] で gθ の勾配を近似する
• 目的関数はイカ
lw:reward
gθ:policy
y-:action
x:state
Dのloss
期待値は正例と負例の同時分布(イカ)に関してとる
7
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
GANの学習の安定化
• 敵対的学習は収束が不安定
• gθ の確率分布が少数の値に集中(mode collapse)
• 新しい負例単語が選ばれなくなる
• 典型的なGANの設定だと V(D,G) が振動解にトラップされるような現象
• ACE では NCE にデグレするだけ
8
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
とはいえ学習安定化へのギミックいろいろ
• g に対する entropy 正則化
• gθ(y|x) の prior に無情報事前分布を仮定するきもち
• g が false negative (y+)を ひいたとき
• 無視する(Dの重みを更新しない)
• REINFORCE による推定分散を小さく抑える
• self-critical baseline method [Rennie et al., 2016]
• 近似勾配の推定分散を小さくするようにベースラインを設定する
• ここでは gθ の確率値が最大となる負例y-のrewardをベースライン b とした
9
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
実験
• word embeddings
• 類義語タスク
• order embeddings
• 上位語の予測
• graph embeddings
• リンク予測
• 比較手法(ノイズ分布の違い)
• ADV (λ = 0)
• ACE (0 < λ < 1?←論文に記載なし)
• NCE (λ = 1)
NCEのノイズ分布 敵対的学習により得られるノイズ分布
10
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
ACEを word embeddings へ適用する
• 目的関数の書き換え
NCEベース(pがsigmoidなのがいわゆるSGNS) ACE(提案手法)
・V:語彙集合
・wt:ターゲット単語
・wc
+:正例(共起語)
・wc
-:負例
・K:負例数
positive phase
negative phase
min_w, max_θ
11
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
word embeddings の実験設定
• English Wikipedia freq. top150k
• Negative Samples 数
• 5 NCE, 1 ACE
• window size 10
• subsampling(thrは不明)
• optimizer Adam
• Networks Architecture
• D:ふつうの Skip-gram (2 conv + sigmoid)
• word embeddingsは1st layerのweights
• G:2 small hidden layer (2 conv + softmax)
• G の1st layer は D の 2nd layer と重み共有(収束が早くなるから、とのこと)
• gθ の entropy のコントロールが学習のキモ
• チューニングしないと mode collapse する
• これ具体的な設定特にナシ 工エエェェ(´д`)ェェエエ工
• λいくつにしたか書いてない!? Σ(゚Д゚)
12
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
word similarity タスクの結果
• wordsim353, rareword
• 単語ペアに対して人手で類似度評価(10段階)がつけられているやつ
• メトリック
• Spearman相関係数[-1,1]
• 結果
• NCEと比較して提案手法のACE(とADV)はめっちゃはやく収束する
• rareword(左図)で顕著
1 epoch
rareword WS-353 NCEはnoise分布にpnceのみ(ACEのλ=1)
ADVはnoiseにgθのみ(ACEのλ=0)
1 epoch 13
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
top45-50の近傍単語が良い感じ?
提案手法
14
SGNS
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
負例の hard さの定量化
• hard さは D の loss で評価する
• つまり harder → higher loss であればシメシメと
• 結果
• 常にACEからのサンプルが高いlossだった
pnce からサンプルした負例と g からサンプルした負例の D の loss
1 epoch 15
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
制限事項に書かれていること
• G の最後でsoftmaxって結局重い
• 早く収束するし基本的に embedding は pretrain だから問題ない
• それに GPU 使えばそんなでもない
• 高速化は future work
• GANなのでNCEの推定量としての良さ(漸近的にMLE)が失われている
が、GANとMLEの関係はよくわかってないのでなんとも。。
16
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
まとめ
• GANと組み合わせて、NCE のノイズ分布を改良したモデル(ACE)を提案
• ACE ではより “hard” な負例を選ぶように学習することで embeddings
タスクの収束が早くなることを確認した
• 複数の典型的な embeddings タスクで効果を確認した
17
Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University
所感
• GANとうまく組み合わせておりシンプルできれい
• DのLossで負例の良さを定量化するのは良いアイデア
• ただ、minmax を収束させるために細かいギミックをいろいろ入れてる
ので、何が本質かわからない
• 細かい設定、チューニングの詳細が不明
18

More Related Content

What's hot

グラフィカル Lasso を用いた異常検知
グラフィカル Lasso を用いた異常検知グラフィカル Lasso を用いた異常検知
グラフィカル Lasso を用いた異常検知Yuya Takashina
 
[DL輪読会]Pay Attention to MLPs (gMLP)
[DL輪読会]Pay Attention to MLPs	(gMLP)[DL輪読会]Pay Attention to MLPs	(gMLP)
[DL輪読会]Pay Attention to MLPs (gMLP)Deep Learning JP
 
最適輸送の解き方
最適輸送の解き方最適輸送の解き方
最適輸送の解き方joisino
 
SSII2020SS: グラフデータでも深層学習 〜 Graph Neural Networks 入門 〜
SSII2020SS: グラフデータでも深層学習 〜 Graph Neural Networks 入門 〜SSII2020SS: グラフデータでも深層学習 〜 Graph Neural Networks 入門 〜
SSII2020SS: グラフデータでも深層学習 〜 Graph Neural Networks 入門 〜SSII
 
[DL輪読会]Understanding Black-box Predictions via Influence Functions
[DL輪読会]Understanding Black-box Predictions via Influence Functions [DL輪読会]Understanding Black-box Predictions via Influence Functions
[DL輪読会]Understanding Black-box Predictions via Influence Functions Deep Learning JP
 
最適輸送入門
最適輸送入門最適輸送入門
最適輸送入門joisino
 
SSII2019企画: 点群深層学習の研究動向
SSII2019企画: 点群深層学習の研究動向SSII2019企画: 点群深層学習の研究動向
SSII2019企画: 点群深層学習の研究動向SSII
 
グラフニューラルネットワーク入門
グラフニューラルネットワーク入門グラフニューラルネットワーク入門
グラフニューラルネットワーク入門ryosuke-kojima
 
ようやく分かった!最尤推定とベイズ推定
ようやく分かった!最尤推定とベイズ推定ようやく分かった!最尤推定とベイズ推定
ようやく分かった!最尤推定とベイズ推定Akira Masuda
 
SSII2021 [OS2-01] 転移学習の基礎:異なるタスクの知識を利用するための機械学習の方法
SSII2021 [OS2-01] 転移学習の基礎:異なるタスクの知識を利用するための機械学習の方法SSII2021 [OS2-01] 転移学習の基礎:異なるタスクの知識を利用するための機械学習の方法
SSII2021 [OS2-01] 転移学習の基礎:異なるタスクの知識を利用するための機械学習の方法SSII
 
2014 3 13(テンソル分解の基礎)
2014 3 13(テンソル分解の基礎)2014 3 13(テンソル分解の基礎)
2014 3 13(テンソル分解の基礎)Tatsuya Yokota
 
深層学習による非滑らかな関数の推定
深層学習による非滑らかな関数の推定深層学習による非滑らかな関数の推定
深層学習による非滑らかな関数の推定Masaaki Imaizumi
 
4 データ間の距離と類似度
4 データ間の距離と類似度4 データ間の距離と類似度
4 データ間の距離と類似度Seiichi Uchida
 
【論文紹介】How Powerful are Graph Neural Networks?
【論文紹介】How Powerful are Graph Neural Networks?【論文紹介】How Powerful are Graph Neural Networks?
【論文紹介】How Powerful are Graph Neural Networks?Masanao Ochi
 
モデルアーキテクチャ観点からの高速化2019
モデルアーキテクチャ観点からの高速化2019モデルアーキテクチャ観点からの高速化2019
モデルアーキテクチャ観点からの高速化2019Yusuke Uchida
 
Optimizer入門&最新動向
Optimizer入門&最新動向Optimizer入門&最新動向
Optimizer入門&最新動向Motokawa Tetsuya
 
[DL輪読会]Graph R-CNN for Scene Graph Generation
[DL輪読会]Graph R-CNN for Scene Graph Generation[DL輪読会]Graph R-CNN for Scene Graph Generation
[DL輪読会]Graph R-CNN for Scene Graph GenerationDeep Learning JP
 
【DL輪読会】SimCSE: Simple Contrastive Learning of Sentence Embeddings (EMNLP 2021)
【DL輪読会】SimCSE: Simple Contrastive Learning of Sentence Embeddings  (EMNLP 2021)【DL輪読会】SimCSE: Simple Contrastive Learning of Sentence Embeddings  (EMNLP 2021)
【DL輪読会】SimCSE: Simple Contrastive Learning of Sentence Embeddings (EMNLP 2021)Deep Learning JP
 
全力解説!Transformer
全力解説!Transformer全力解説!Transformer
全力解説!TransformerArithmer Inc.
 
【メタサーベイ】数式ドリブン教師あり学習
【メタサーベイ】数式ドリブン教師あり学習【メタサーベイ】数式ドリブン教師あり学習
【メタサーベイ】数式ドリブン教師あり学習cvpaper. challenge
 

What's hot (20)

グラフィカル Lasso を用いた異常検知
グラフィカル Lasso を用いた異常検知グラフィカル Lasso を用いた異常検知
グラフィカル Lasso を用いた異常検知
 
[DL輪読会]Pay Attention to MLPs (gMLP)
[DL輪読会]Pay Attention to MLPs	(gMLP)[DL輪読会]Pay Attention to MLPs	(gMLP)
[DL輪読会]Pay Attention to MLPs (gMLP)
 
最適輸送の解き方
最適輸送の解き方最適輸送の解き方
最適輸送の解き方
 
SSII2020SS: グラフデータでも深層学習 〜 Graph Neural Networks 入門 〜
SSII2020SS: グラフデータでも深層学習 〜 Graph Neural Networks 入門 〜SSII2020SS: グラフデータでも深層学習 〜 Graph Neural Networks 入門 〜
SSII2020SS: グラフデータでも深層学習 〜 Graph Neural Networks 入門 〜
 
[DL輪読会]Understanding Black-box Predictions via Influence Functions
[DL輪読会]Understanding Black-box Predictions via Influence Functions [DL輪読会]Understanding Black-box Predictions via Influence Functions
[DL輪読会]Understanding Black-box Predictions via Influence Functions
 
最適輸送入門
最適輸送入門最適輸送入門
最適輸送入門
 
SSII2019企画: 点群深層学習の研究動向
SSII2019企画: 点群深層学習の研究動向SSII2019企画: 点群深層学習の研究動向
SSII2019企画: 点群深層学習の研究動向
 
グラフニューラルネットワーク入門
グラフニューラルネットワーク入門グラフニューラルネットワーク入門
グラフニューラルネットワーク入門
 
ようやく分かった!最尤推定とベイズ推定
ようやく分かった!最尤推定とベイズ推定ようやく分かった!最尤推定とベイズ推定
ようやく分かった!最尤推定とベイズ推定
 
SSII2021 [OS2-01] 転移学習の基礎:異なるタスクの知識を利用するための機械学習の方法
SSII2021 [OS2-01] 転移学習の基礎:異なるタスクの知識を利用するための機械学習の方法SSII2021 [OS2-01] 転移学習の基礎:異なるタスクの知識を利用するための機械学習の方法
SSII2021 [OS2-01] 転移学習の基礎:異なるタスクの知識を利用するための機械学習の方法
 
2014 3 13(テンソル分解の基礎)
2014 3 13(テンソル分解の基礎)2014 3 13(テンソル分解の基礎)
2014 3 13(テンソル分解の基礎)
 
深層学習による非滑らかな関数の推定
深層学習による非滑らかな関数の推定深層学習による非滑らかな関数の推定
深層学習による非滑らかな関数の推定
 
4 データ間の距離と類似度
4 データ間の距離と類似度4 データ間の距離と類似度
4 データ間の距離と類似度
 
【論文紹介】How Powerful are Graph Neural Networks?
【論文紹介】How Powerful are Graph Neural Networks?【論文紹介】How Powerful are Graph Neural Networks?
【論文紹介】How Powerful are Graph Neural Networks?
 
モデルアーキテクチャ観点からの高速化2019
モデルアーキテクチャ観点からの高速化2019モデルアーキテクチャ観点からの高速化2019
モデルアーキテクチャ観点からの高速化2019
 
Optimizer入門&最新動向
Optimizer入門&最新動向Optimizer入門&最新動向
Optimizer入門&最新動向
 
[DL輪読会]Graph R-CNN for Scene Graph Generation
[DL輪読会]Graph R-CNN for Scene Graph Generation[DL輪読会]Graph R-CNN for Scene Graph Generation
[DL輪読会]Graph R-CNN for Scene Graph Generation
 
【DL輪読会】SimCSE: Simple Contrastive Learning of Sentence Embeddings (EMNLP 2021)
【DL輪読会】SimCSE: Simple Contrastive Learning of Sentence Embeddings  (EMNLP 2021)【DL輪読会】SimCSE: Simple Contrastive Learning of Sentence Embeddings  (EMNLP 2021)
【DL輪読会】SimCSE: Simple Contrastive Learning of Sentence Embeddings (EMNLP 2021)
 
全力解説!Transformer
全力解説!Transformer全力解説!Transformer
全力解説!Transformer
 
【メタサーベイ】数式ドリブン教師あり学習
【メタサーベイ】数式ドリブン教師あり学習【メタサーベイ】数式ドリブン教師あり学習
【メタサーベイ】数式ドリブン教師あり学習
 

More from Makoto Takenaka

[論文紹介] Understanding and improving transformer from a multi particle dynamic ...
[論文紹介] Understanding and improving transformer from a multi particle dynamic ...[論文紹介] Understanding and improving transformer from a multi particle dynamic ...
[論文紹介] Understanding and improving transformer from a multi particle dynamic ...Makoto Takenaka
 
[論文紹介] Towards Understanding Linear Word Analogies
[論文紹介] Towards Understanding Linear Word Analogies[論文紹介] Towards Understanding Linear Word Analogies
[論文紹介] Towards Understanding Linear Word AnalogiesMakoto Takenaka
 
Lpixel論文読み会資料 "Interpretation of neural network is fragile"
Lpixel論文読み会資料 "Interpretation of neural network is fragile"Lpixel論文読み会資料 "Interpretation of neural network is fragile"
Lpixel論文読み会資料 "Interpretation of neural network is fragile"Makoto Takenaka
 
Understanding the origin of bias in word embeddings
Understanding the origin of bias in word embeddingsUnderstanding the origin of bias in word embeddings
Understanding the origin of bias in word embeddingsMakoto Takenaka
 
[NeurIPS2018読み会@PFN] On the Dimensionality of Word Embedding
[NeurIPS2018読み会@PFN] On the Dimensionality of Word Embedding[NeurIPS2018読み会@PFN] On the Dimensionality of Word Embedding
[NeurIPS2018読み会@PFN] On the Dimensionality of Word EmbeddingMakoto Takenaka
 
Probabilistic fasttext for multi sense word embeddings
 Probabilistic fasttext for multi sense word embeddings Probabilistic fasttext for multi sense word embeddings
Probabilistic fasttext for multi sense word embeddingsMakoto Takenaka
 
Deep neural models of semantic shift
Deep neural models of semantic shiftDeep neural models of semantic shift
Deep neural models of semantic shiftMakoto Takenaka
 
All-but-the-Top: Simple and Effective Postprocessing for Word Representations
All-but-the-Top: Simple and Effective Postprocessing for Word RepresentationsAll-but-the-Top: Simple and Effective Postprocessing for Word Representations
All-but-the-Top: Simple and Effective Postprocessing for Word RepresentationsMakoto Takenaka
 
multimodal word distributions
multimodal word distributionsmultimodal word distributions
multimodal word distributionsMakoto Takenaka
 
Adversarial Multi-task Learning for Text Classification
Adversarial Multi-task Learning for Text ClassificationAdversarial Multi-task Learning for Text Classification
Adversarial Multi-task Learning for Text ClassificationMakoto Takenaka
 

More from Makoto Takenaka (10)

[論文紹介] Understanding and improving transformer from a multi particle dynamic ...
[論文紹介] Understanding and improving transformer from a multi particle dynamic ...[論文紹介] Understanding and improving transformer from a multi particle dynamic ...
[論文紹介] Understanding and improving transformer from a multi particle dynamic ...
 
[論文紹介] Towards Understanding Linear Word Analogies
[論文紹介] Towards Understanding Linear Word Analogies[論文紹介] Towards Understanding Linear Word Analogies
[論文紹介] Towards Understanding Linear Word Analogies
 
Lpixel論文読み会資料 "Interpretation of neural network is fragile"
Lpixel論文読み会資料 "Interpretation of neural network is fragile"Lpixel論文読み会資料 "Interpretation of neural network is fragile"
Lpixel論文読み会資料 "Interpretation of neural network is fragile"
 
Understanding the origin of bias in word embeddings
Understanding the origin of bias in word embeddingsUnderstanding the origin of bias in word embeddings
Understanding the origin of bias in word embeddings
 
[NeurIPS2018読み会@PFN] On the Dimensionality of Word Embedding
[NeurIPS2018読み会@PFN] On the Dimensionality of Word Embedding[NeurIPS2018読み会@PFN] On the Dimensionality of Word Embedding
[NeurIPS2018読み会@PFN] On the Dimensionality of Word Embedding
 
Probabilistic fasttext for multi sense word embeddings
 Probabilistic fasttext for multi sense word embeddings Probabilistic fasttext for multi sense word embeddings
Probabilistic fasttext for multi sense word embeddings
 
Deep neural models of semantic shift
Deep neural models of semantic shiftDeep neural models of semantic shift
Deep neural models of semantic shift
 
All-but-the-Top: Simple and Effective Postprocessing for Word Representations
All-but-the-Top: Simple and Effective Postprocessing for Word RepresentationsAll-but-the-Top: Simple and Effective Postprocessing for Word Representations
All-but-the-Top: Simple and Effective Postprocessing for Word Representations
 
multimodal word distributions
multimodal word distributionsmultimodal word distributions
multimodal word distributions
 
Adversarial Multi-task Learning for Text Classification
Adversarial Multi-task Learning for Text ClassificationAdversarial Multi-task Learning for Text Classification
Adversarial Multi-task Learning for Text Classification
 

[研究室論文紹介用スライド] Adversarial Contrastive Estimation

  • 1. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University 2018-11-19, ACL2018 読み会 読み手 竹中誠 ※図・表は論文より引用
  • 2. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University どういう論文か? • Noise Contrastive Estimation [Gutmann & Hyvarinen, 2012] (イカ、NCE) の改良 を提案 • GAN にもとづくノイズ分布の改良・定式化 • NCEがそうであるようにいろんな embedding task に適用可能 • 典型的なタスクで効果を確認した 1
  • 3. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University 準備:NCEとは? • 例えばイカのようなモデルを考える • 対数尤度最大化で学習すれば(・∀・)イイ!! • 分配関数の計算重い(´・ω・`)ショボーン • →NCE!! • 正例と負例を識別する2値識別問題にすり替える • Zもパラメータとして全体を推定しよう! • そのまま最尤推定できないので2値識別にすり替える • データ分布pからのサンプルかノイズ分布qからのサンプルかを識別する • そのままやったらc->∞でとればよいのでできない • 2値はスイッチ確率変数D={1,0}で表す • ノイズ分布qからはk倍出やすいとすると右式のようになる • で、結局NSのlossはイカ 2 4章 NCE含め、分配関数の推定・ 近似手法がまとまっている 18章
  • 4. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University 準備:NCE の pros/cons • pros • 分配関数の直接評価が不要で推定可能 • 性質の良い推定量であることが知られている(漸近的にMLE) • cf. https://qiita.com/Quasi-quant2010/items/a15b0d1b6428dc49c6c2 (こちらが詳しくまとまっており参考にさせていただきました) • cons • 負例数が小さい世界では、ノイズ分布が非自明 • ノイズ分布が負例の質を決め、結果的に収束性にきいてくる • ノイズ分布は本来条件付き分布 p(y|x) が用いられるべきだが、しばしばp(y)が使わ れる 3
  • 5. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University 本研究のモチベーション • NCE において分類器を効率的に学習したい • → できるだけ hard な負例がサンプルされたい • → でもNCEのノイズ分布はザル • → ノイズ分布を工夫しよう 4
  • 6. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University 準備:NCE の定式化とノイズ分布 • NCEの目的関数→尤度の期待値を最大化しよう l:尤度 w:パラメタ positive tuple (x+, y+) negative tuple (x+, y-) ※いま、lwが pos score とneg score の和に 分離可能なケースを考える あと、NCE ではノイズ分布に conditional(p-(y|x)) ではなく単に p(y-) が使われるのでそれを明示的に書くとイカ = = ノイズ分布 5
  • 7. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University 提案手法:adversarial mixture noise • NCE の noise 分布を改良 • 従来の pnce と gθ の加重平均(λはハイパラ) • gθ(y|x):敵対的ノイズ分布(GAN でいう generator) • ACE の目的関数はイカ • minmax game で (ω,θ) を学習 NCE のノイズ分布 新たに加えた項 (再掲) NCE の目的関数 6
  • 8. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University gθ の学習 • gθ は離散値なのでDへ勾配を伝播できない • Gumbel-softmax の reparam-trick • そもそも問題設定が 1 << N なので却下 • これを許容できればそもそもZを直接評価すれば良くなる • なので、方策勾配をつかう • REINFORCE[Williams1992] で gθ の勾配を近似する • 目的関数はイカ lw:reward gθ:policy y-:action x:state Dのloss 期待値は正例と負例の同時分布(イカ)に関してとる 7
  • 9. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University GANの学習の安定化 • 敵対的学習は収束が不安定 • gθ の確率分布が少数の値に集中(mode collapse) • 新しい負例単語が選ばれなくなる • 典型的なGANの設定だと V(D,G) が振動解にトラップされるような現象 • ACE では NCE にデグレするだけ 8
  • 10. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University とはいえ学習安定化へのギミックいろいろ • g に対する entropy 正則化 • gθ(y|x) の prior に無情報事前分布を仮定するきもち • g が false negative (y+)を ひいたとき • 無視する(Dの重みを更新しない) • REINFORCE による推定分散を小さく抑える • self-critical baseline method [Rennie et al., 2016] • 近似勾配の推定分散を小さくするようにベースラインを設定する • ここでは gθ の確率値が最大となる負例y-のrewardをベースライン b とした 9
  • 11. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University 実験 • word embeddings • 類義語タスク • order embeddings • 上位語の予測 • graph embeddings • リンク予測 • 比較手法(ノイズ分布の違い) • ADV (λ = 0) • ACE (0 < λ < 1?←論文に記載なし) • NCE (λ = 1) NCEのノイズ分布 敵対的学習により得られるノイズ分布 10
  • 12. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University ACEを word embeddings へ適用する • 目的関数の書き換え NCEベース(pがsigmoidなのがいわゆるSGNS) ACE(提案手法) ・V:語彙集合 ・wt:ターゲット単語 ・wc +:正例(共起語) ・wc -:負例 ・K:負例数 positive phase negative phase min_w, max_θ 11
  • 13. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University word embeddings の実験設定 • English Wikipedia freq. top150k • Negative Samples 数 • 5 NCE, 1 ACE • window size 10 • subsampling(thrは不明) • optimizer Adam • Networks Architecture • D:ふつうの Skip-gram (2 conv + sigmoid) • word embeddingsは1st layerのweights • G:2 small hidden layer (2 conv + softmax) • G の1st layer は D の 2nd layer と重み共有(収束が早くなるから、とのこと) • gθ の entropy のコントロールが学習のキモ • チューニングしないと mode collapse する • これ具体的な設定特にナシ 工エエェェ(´д`)ェェエエ工 • λいくつにしたか書いてない!? Σ(゚Д゚) 12
  • 14. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University word similarity タスクの結果 • wordsim353, rareword • 単語ペアに対して人手で類似度評価(10段階)がつけられているやつ • メトリック • Spearman相関係数[-1,1] • 結果 • NCEと比較して提案手法のACE(とADV)はめっちゃはやく収束する • rareword(左図)で顕著 1 epoch rareword WS-353 NCEはnoise分布にpnceのみ(ACEのλ=1) ADVはnoiseにgθのみ(ACEのλ=0) 1 epoch 13
  • 15. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University top45-50の近傍単語が良い感じ? 提案手法 14 SGNS
  • 16. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University 負例の hard さの定量化 • hard さは D の loss で評価する • つまり harder → higher loss であればシメシメと • 結果 • 常にACEからのサンプルが高いlossだった pnce からサンプルした負例と g からサンプルした負例の D の loss 1 epoch 15
  • 17. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University 制限事項に書かれていること • G の最後でsoftmaxって結局重い • 早く収束するし基本的に embedding は pretrain だから問題ない • それに GPU 使えばそんなでもない • 高速化は future work • GANなのでNCEの推定量としての良さ(漸近的にMLE)が失われている が、GANとMLEの関係はよくわかってないのでなんとも。。 16
  • 18. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University まとめ • GANと組み合わせて、NCE のノイズ分布を改良したモデル(ACE)を提案 • ACE ではより “hard” な負例を選ぶように学習することで embeddings タスクの収束が早くなることを確認した • 複数の典型的な embeddings タスクで効果を確認した 17
  • 19. Natural Language Processing and Computational Linguistics Research Group at The Tokyo Metropolitan University 所感 • GANとうまく組み合わせておりシンプルできれい • DのLossで負例の良さを定量化するのは良いアイデア • ただ、minmax を収束させるために細かいギミックをいろいろ入れてる ので、何が本質かわからない • 細かい設定、チューニングの詳細が不明 18

Editor's Notes

  1. c=-logZを直接推定する p~modelはCの推定が向上することで、間接的に良い推定が得られる もはや普通の最尤法ではないが、最尤推定量のような性質をもつことがしられている