SlideShare a Scribd company logo
1 of 14
Download to read offline
Supervised Learning of Universal
Sentence Representations from
Natural Language Inference Data
Alexis Conneau, Douwe Kiela, Holger Schwenk,
Loïc Barrault, and Antoine Bordes
EMNLP 2017, pages 681-691.
論文 コード(エンコーダ) コード(評価)
読み手: 岡崎 直観 (東京工業大学情報理工学院) (@chokkanorg)
ACL2017読み会@すずかけ台
※但し書きがある場合を除き,スライド中の図・表はConneau+ (2017) の引用
汎用的な文エンコーダは作れる!
• 構成方法
• 双方向LSTMにmax-poolingを組み合わせたDNN
• Stanford Natural Language Inference (SNLI) で訓練
• 検証方法
• SNLIデータで様々なエンコーダの性能を比較
• SkipThoughtやFastSentなどの既存手法を含め,訓練済
みのエンコーダを12個のタスクに適用して性能を比較
• 検証結果
• 提案手法の文エンコーダは,様々なタスクへ転用する
ことが可能で,かつ既存手法よりも高性能
• 提案手法の訓練は,既存手法の訓練よりも高速
• 文の特徴抽出器として利用可能(モデルを公開)
2Conneau+ (2017) Supervised Learning of Universal Sentence Representations
本研究で用いたタスク:
Stanford Natural Language Inference (SNLI) (Bowman+ 15)
• Flickr30kのキャプションを基に,含意(entailment),
矛盾(contradiction),中立(neutral)する文をクラ
ウドソーシングで収集したもの(57万文対)
https://nlp.stanford.edu/projects/snli/
3Conneau+ (2017) Supervised Learning of Universal Sentence Representations
本研究で訓練するDNNの構成:
2文のエンコーダに基づく3値分類
A soccer game with multiple males playing. Some men are playing a sport.
文のエンコーダ 文のエンコーダ
(Premise) (Hypothesis)
𝑢𝑢 𝑣𝑣
× ー
512次元の隠れ層とsoftmax層(3値分類)
Premiseの
ベクトル
Hypothesisの
ベクトル
含意,矛盾,中立のスコア(教師信号)
2文のエンコード結果を
統合したベクトル
×は要素ごとの積
-は要素ごとの差の絶対値
4Conneau+ (2017) Supervised Learning of Universal Sentence Representations
文のエンコーダの構成
• 以下の7種類の手法を比較・検討
• Long Short-Term Memory (LSTM)
• Gated Recurrent Unit (GRU)
• 双方向GRU (両方向の最終内部ベクトルを結合)
• 双方向LSTM
• 各単語に対応する内部ベクトルの平均をとる (mean pooling)
• 各単語に対応する内部ベクトルの最大値を取る (max pooling)
• Self-attentive network
• Hierarchical Convolutional Network
• 単語埋め込みはGloVeで固定
• 公開されている単語ベクトル(300次元)を利用
5Conneau+ (2017) Supervised Learning of Universal Sentence Representations
双方向GRU
Skip-thoughtで用いられているエンコーダと
同じアーキテクチャを採用
The movie was great
𝑥𝑥𝑡𝑡
ℎ𝑡𝑡
𝑢𝑢 または 𝑣𝑣
ℎ𝑡𝑡
𝑤𝑤𝑡𝑡
ℎ𝑡𝑡 = GRU (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇)
ℎ𝑡𝑡 = GRU (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇)
𝑢𝑢 = ℎ𝑇𝑇, ℎ1
6Conneau+ (2017) Supervised Learning of Universal Sentence Representations
双方向LSTMとプーリング
The movie was great
𝑥𝑥𝑡𝑡
ℎ𝑡𝑡
ℎ𝑡𝑡
𝑤𝑤𝑡𝑡
ℎ𝑡𝑡 = LSTM (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇)
ℎ𝑡𝑡 = LSTM (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇)
ℎ𝑡𝑡, ℎ𝑡𝑡
各次元について,
全時刻における
最大値もしくは
平均値をとる
7Conneau+ (2017) Supervised Learning of Universal Sentence Representations
Self-attentive network (Liu+ 16; Lin+ 17)
The movie was great
𝑥𝑥𝑡𝑡
ℎ𝑡𝑡
ℎ𝑡𝑡
𝑤𝑤𝑡𝑡
ℎ𝑡𝑡 = LSTM (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇)
ℎ𝑡𝑡 = LSTM (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇)
ℎ𝑡𝑡 = ℎ𝑡𝑡, ℎ𝑡𝑡
𝑞𝑞𝑖𝑖
𝑎𝑎𝑖𝑖
(𝑡𝑡) =
exp( �ℎ𝑡𝑡 ⋅ 𝑞𝑞𝑖𝑖)
∑𝑡𝑡𝑡 exp(ℎ𝑡𝑡′ ⋅ 𝑞𝑞𝑖𝑖)
�ℎ𝑡𝑡 = tanh(𝑊𝑊ℎ𝑡𝑡 + 𝑏𝑏𝑖𝑖)
𝑢𝑢𝑖𝑖 = �
𝑡𝑡
𝑎𝑎𝑖𝑖(𝑡𝑡)ℎ𝑡𝑡
※実際は𝑞𝑞1
, 𝑞𝑞2
,𝑞𝑞3
,𝑞𝑞4
の4種類の
ベクトル(観点)を学習し,4種類の
𝑢𝑢1
, 𝑢𝑢2
,𝑢𝑢3
,𝑢𝑢4
を計算して,連結する
(アテンション計算用)
(学習で求める)
8Conneau+ (2017) Supervised Learning of Universal Sentence Representations
Hierarchical convolutional network (Zhao+ 15)
The movie was the best of all
𝑥𝑥𝑡𝑡
𝑐𝑐𝑡𝑡
1
𝑐𝑐𝑡𝑡
2
𝑐𝑐𝑡𝑡
3
𝑐𝑐𝑡𝑡
4
※実際には4層まで畳み込みを適用するが,この例では
単語数が足りないため4層まで到達していない
最
大
値
プ
ー
リ
ン
グ
4層分のプーリング結果の連結を文ベクトルとする
9Conneau+ (2017) Supervised Learning of Universal Sentence Representations
評価に用いたタスク
• 分類問題
• 評判分析(MR, SST)
• 質問タイプ分類(TREC)
• 商品レビュー分析(CR)
• 主観・客観分類(SUBJ)
• 意見極性分類(MPQA)
• 意味的関係
• 含意関係認識(SICK-E)
• 意味的関連度(SICK-R)
• SemEvalの意味的類似度(STS14)
• 言い換えの認識
• 言い換えの認識(Microsoft Research Paraphrase Corpus)
• キャプション/画像検索
• キャプションからの画像検索
• 画像からのキャプション検索
10Conneau+ (2017) Supervised Learning of Universal Sentence Representations
エンコーダ構成の比較
転用先12タスク
での性能の平均
11
※ NLIで高い性能のものが転用先でも高い性能を示すとは限らない
Conneau+ (2017) Supervised Learning of Universal Sentence Representations
タスク横断の比較
12Conneau+ (2017) Supervised Learning of Universal Sentence Representations
6,400万文で訓練
したSkipThoughtに
対し,57万文対で
訓練した提案手法
が上回る(SUBJと
TRECを除く)
STS14の結果より,
SkipThoughtよりも
提案手法の文ベク
トルの方がコサイ
ン類似度を正確に
計算できている
(提案手法の中に
要素積や要素差
の情報が取り込ま
れているため?)
(AllNLI = SNLI + MultiGenre NLI)
機械翻訳や辞書
定義文などで訓練
するよりも高性能
画像・キャプション検索の性能
• 上段は画像と言語の対応を直接的に学習するもの
• 下段は訓練済みの画像と言語の特徴抽出器を用い,
それらを同じ空間にマップしてランキング学習を行った
• 直接訓練する手法に迫る性能を示す
13Conneau+ (2017) Supervised Learning of Universal Sentence Representations
議論
• SNLIデータは文エンコーダの訓練に適している
• NLIは文の深い意味や関係の理解が必須だから?
• 教師なし(単なる生コーパス)の大量データよりも,
SNLIの教師ありデータの方が,性能・学習時間の
観点から優れている
• 今後の展開
• 実際にはどのようなタスクに転用可能なのか? 機械
翻訳の性能は向上の余地があるのか?
• 日本語のNLIのデータを作る?
14Conneau+ (2017) Supervised Learning of Universal Sentence Representations

More Related Content

What's hot

STAIR Lab Seminar 202105
STAIR Lab Seminar 202105STAIR Lab Seminar 202105
STAIR Lab Seminar 202105Sho Takase
 
【論文紹介】Distributed Representations of Sentences and Documents
【論文紹介】Distributed Representations of Sentences and Documents【論文紹介】Distributed Representations of Sentences and Documents
【論文紹介】Distributed Representations of Sentences and DocumentsTomofumi Yoshida
 
数式を綺麗にプログラミングするコツ #spro2013
数式を綺麗にプログラミングするコツ #spro2013数式を綺麗にプログラミングするコツ #spro2013
数式を綺麗にプログラミングするコツ #spro2013Shuyo Nakatani
 
ネットワーク科学最前線2017 -インフルエンサーと機械学習からの接近-
ネットワーク科学最前線2017  -インフルエンサーと機械学習からの接近-ネットワーク科学最前線2017  -インフルエンサーと機械学習からの接近-
ネットワーク科学最前線2017 -インフルエンサーと機械学習からの接近-hayashiresearchlab
 
トピックモデル
トピックモデルトピックモデル
トピックモデル貴之 八木
 
強化学習その3
強化学習その3強化学習その3
強化学習その3nishio
 
単語・句の分散表現の学習
単語・句の分散表現の学習単語・句の分散表現の学習
単語・句の分散表現の学習Naoaki Okazaki
 
Vanishing Component Analysis
Vanishing Component AnalysisVanishing Component Analysis
Vanishing Component AnalysisKoji Matsuda
 
20170422 数学カフェ Part2
20170422 数学カフェ Part220170422 数学カフェ Part2
20170422 数学カフェ Part2Kenta Oono
 
強化学習その4
強化学習その4強化学習その4
強化学習その4nishio
 
NeurIPS2020参加報告
NeurIPS2020参加報告NeurIPS2020参加報告
NeurIPS2020参加報告Sho Takase
 
深層生成モデルと世界モデル
深層生成モデルと世界モデル深層生成モデルと世界モデル
深層生成モデルと世界モデルMasahiro Suzuki
 
教師なしオブジェクトマッチング(第2回ステアラボ人工知能セミナー)
教師なしオブジェクトマッチング(第2回ステアラボ人工知能セミナー)教師なしオブジェクトマッチング(第2回ステアラボ人工知能セミナー)
教師なしオブジェクトマッチング(第2回ステアラボ人工知能セミナー)STAIR Lab, Chiba Institute of Technology
 
強化学習その2
強化学習その2強化学習その2
強化学習その2nishio
 
幾何を使った統計のはなし
幾何を使った統計のはなし幾何を使った統計のはなし
幾何を使った統計のはなしToru Imai
 
(DL hacks輪読) Difference Target Propagation
(DL hacks輪読) Difference Target Propagation(DL hacks輪読) Difference Target Propagation
(DL hacks輪読) Difference Target PropagationMasahiro Suzuki
 
強化学習その1
強化学習その1強化学習その1
強化学習その1nishio
 
グラフニューラルネットワークとグラフ組合せ問題
グラフニューラルネットワークとグラフ組合せ問題グラフニューラルネットワークとグラフ組合せ問題
グラフニューラルネットワークとグラフ組合せ問題joisino
 

What's hot (20)

STAIR Lab Seminar 202105
STAIR Lab Seminar 202105STAIR Lab Seminar 202105
STAIR Lab Seminar 202105
 
【論文紹介】Distributed Representations of Sentences and Documents
【論文紹介】Distributed Representations of Sentences and Documents【論文紹介】Distributed Representations of Sentences and Documents
【論文紹介】Distributed Representations of Sentences and Documents
 
数式を綺麗にプログラミングするコツ #spro2013
数式を綺麗にプログラミングするコツ #spro2013数式を綺麗にプログラミングするコツ #spro2013
数式を綺麗にプログラミングするコツ #spro2013
 
ネットワーク科学最前線2017 -インフルエンサーと機械学習からの接近-
ネットワーク科学最前線2017  -インフルエンサーと機械学習からの接近-ネットワーク科学最前線2017  -インフルエンサーと機械学習からの接近-
ネットワーク科学最前線2017 -インフルエンサーと機械学習からの接近-
 
トピックモデル
トピックモデルトピックモデル
トピックモデル
 
強化学習その3
強化学習その3強化学習その3
強化学習その3
 
単語・句の分散表現の学習
単語・句の分散表現の学習単語・句の分散表現の学習
単語・句の分散表現の学習
 
深層学習による自然言語処理の研究動向
深層学習による自然言語処理の研究動向深層学習による自然言語処理の研究動向
深層学習による自然言語処理の研究動向
 
Vanishing Component Analysis
Vanishing Component AnalysisVanishing Component Analysis
Vanishing Component Analysis
 
20170422 数学カフェ Part2
20170422 数学カフェ Part220170422 数学カフェ Part2
20170422 数学カフェ Part2
 
強化学習その4
強化学習その4強化学習その4
強化学習その4
 
NeurIPS2020参加報告
NeurIPS2020参加報告NeurIPS2020参加報告
NeurIPS2020参加報告
 
深層生成モデルと世界モデル
深層生成モデルと世界モデル深層生成モデルと世界モデル
深層生成モデルと世界モデル
 
教師なしオブジェクトマッチング(第2回ステアラボ人工知能セミナー)
教師なしオブジェクトマッチング(第2回ステアラボ人工知能セミナー)教師なしオブジェクトマッチング(第2回ステアラボ人工知能セミナー)
教師なしオブジェクトマッチング(第2回ステアラボ人工知能セミナー)
 
強化学習その2
強化学習その2強化学習その2
強化学習その2
 
幾何を使った統計のはなし
幾何を使った統計のはなし幾何を使った統計のはなし
幾何を使った統計のはなし
 
(DL hacks輪読) Difference Target Propagation
(DL hacks輪読) Difference Target Propagation(DL hacks輪読) Difference Target Propagation
(DL hacks輪読) Difference Target Propagation
 
強化学習その1
強化学習その1強化学習その1
強化学習その1
 
グラフニューラルネットワークとグラフ組合せ問題
グラフニューラルネットワークとグラフ組合せ問題グラフニューラルネットワークとグラフ組合せ問題
グラフニューラルネットワークとグラフ組合せ問題
 
【論文紹介】PGQ: Combining Policy Gradient And Q-learning
【論文紹介】PGQ: Combining Policy Gradient And Q-learning【論文紹介】PGQ: Combining Policy Gradient And Q-learning
【論文紹介】PGQ: Combining Policy Gradient And Q-learning
 

Viewers also liked

研究室における研究・実装ノウハウの共有
研究室における研究・実装ノウハウの共有研究室における研究・実装ノウハウの共有
研究室における研究・実装ノウハウの共有Naoaki Okazaki
 
Learning to automatically solve algebra word problems
Learning to automatically solve algebra word problemsLearning to automatically solve algebra word problems
Learning to automatically solve algebra word problemsNaoaki Okazaki
 
Visualizing and understanding neural models in NLP
Visualizing and understanding neural models in NLPVisualizing and understanding neural models in NLP
Visualizing and understanding neural models in NLPNaoaki Okazaki
 
Modeling missing data in distant supervision for information extraction (Ritt...
Modeling missing data in distant supervision for information extraction (Ritt...Modeling missing data in distant supervision for information extraction (Ritt...
Modeling missing data in distant supervision for information extraction (Ritt...Naoaki Okazaki
 
Word2vecの並列実行時の学習速度の改善
Word2vecの並列実行時の学習速度の改善Word2vecの並列実行時の学習速度の改善
Word2vecの並列実行時の学習速度の改善Naoaki Okazaki
 
言語と画像の表現学習
言語と画像の表現学習言語と画像の表現学習
言語と画像の表現学習Yuki Noguchi
 
深層学習時代の自然言語処理
深層学習時代の自然言語処理深層学習時代の自然言語処理
深層学習時代の自然言語処理Yuya Unno
 

Viewers also liked (7)

研究室における研究・実装ノウハウの共有
研究室における研究・実装ノウハウの共有研究室における研究・実装ノウハウの共有
研究室における研究・実装ノウハウの共有
 
Learning to automatically solve algebra word problems
Learning to automatically solve algebra word problemsLearning to automatically solve algebra word problems
Learning to automatically solve algebra word problems
 
Visualizing and understanding neural models in NLP
Visualizing and understanding neural models in NLPVisualizing and understanding neural models in NLP
Visualizing and understanding neural models in NLP
 
Modeling missing data in distant supervision for information extraction (Ritt...
Modeling missing data in distant supervision for information extraction (Ritt...Modeling missing data in distant supervision for information extraction (Ritt...
Modeling missing data in distant supervision for information extraction (Ritt...
 
Word2vecの並列実行時の学習速度の改善
Word2vecの並列実行時の学習速度の改善Word2vecの並列実行時の学習速度の改善
Word2vecの並列実行時の学習速度の改善
 
言語と画像の表現学習
言語と画像の表現学習言語と画像の表現学習
言語と画像の表現学習
 
深層学習時代の自然言語処理
深層学習時代の自然言語処理深層学習時代の自然言語処理
深層学習時代の自然言語処理
 

Similar to Supervised Learning of Universal Sentence Representations from Natural Language Inference Data

視覚と対話の融合研究
視覚と対話の融合研究視覚と対話の融合研究
視覚と対話の融合研究Yoshitaka Ushiku
 
【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models
【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models
【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion ModelsDeep Learning JP
 
言語処理系入門3
言語処理系入門3言語処理系入門3
言語処理系入門3Kenta Hattori
 
Rainbow: Combining Improvements in Deep Reinforcement Learning (AAAI2018 unde...
Rainbow: Combining Improvements in Deep Reinforcement Learning (AAAI2018 unde...Rainbow: Combining Improvements in Deep Reinforcement Learning (AAAI2018 unde...
Rainbow: Combining Improvements in Deep Reinforcement Learning (AAAI2018 unde...Toru Fujino
 
Pythonが動く仕組み(の概要)
Pythonが動く仕組み(の概要)Pythonが動く仕組み(の概要)
Pythonが動く仕組み(の概要)Yoshiaki Shibutani
 
大規模言語モデルとChatGPT
大規模言語モデルとChatGPT大規模言語モデルとChatGPT
大規模言語モデルとChatGPTnlab_utokyo
 
Nl237 presentation
Nl237 presentationNl237 presentation
Nl237 presentationRoy Ray
 
Interop2017
Interop2017Interop2017
Interop2017tak9029
 
コンピュータビジョンで作る未来の栽培技術POL共催セミナー_20220527
コンピュータビジョンで作る未来の栽培技術POL共催セミナー_20220527コンピュータビジョンで作る未来の栽培技術POL共催セミナー_20220527
コンピュータビジョンで作る未来の栽培技術POL共催セミナー_20220527ssuser5ec200
 
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
 
Vision-and-Language Navigation: Interpreting visually-grounded navigation ins...
Vision-and-Language Navigation: Interpreting visually-grounded navigation ins...Vision-and-Language Navigation: Interpreting visually-grounded navigation ins...
Vision-and-Language Navigation: Interpreting visually-grounded navigation ins...Yoshitaka Ushiku
 
Jubatusのリアルタイム分散レコメンデーション@TokyoNLP#9
Jubatusのリアルタイム分散レコメンデーション@TokyoNLP#9Jubatusのリアルタイム分散レコメンデーション@TokyoNLP#9
Jubatusのリアルタイム分散レコメンデーション@TokyoNLP#9Yuya Unno
 
論文紹介:PaperRobot: Incremental Draft Generation of Scientific Idea
論文紹介:PaperRobot: Incremental Draft Generation of Scientific Idea論文紹介:PaperRobot: Incremental Draft Generation of Scientific Idea
論文紹介:PaperRobot: Incremental Draft Generation of Scientific IdeaHirokiKurashige
 
Generating Better Search Engine Text Advertisements with Deep Reinforcement L...
Generating Better Search Engine Text Advertisements with Deep Reinforcement L...Generating Better Search Engine Text Advertisements with Deep Reinforcement L...
Generating Better Search Engine Text Advertisements with Deep Reinforcement L...harmonylab
 
第3回nips読み会・関西『variational inference foundations and modern methods』
第3回nips読み会・関西『variational inference  foundations and modern methods』第3回nips読み会・関西『variational inference  foundations and modern methods』
第3回nips読み会・関西『variational inference foundations and modern methods』koji ochiai
 
Convolutional Neural Netwoks で自然言語処理をする
Convolutional Neural Netwoks で自然言語処理をするConvolutional Neural Netwoks で自然言語処理をする
Convolutional Neural Netwoks で自然言語処理をするDaiki Shimada
 
ブースティング入門
ブースティング入門ブースティング入門
ブースティング入門Retrieva inc.
 
Jinan Xu - 2015 - Integrating Case Frame into Japanese to Chinese Hierarchica...
Jinan Xu - 2015 - Integrating Case Frame into Japanese to Chinese Hierarchica...Jinan Xu - 2015 - Integrating Case Frame into Japanese to Chinese Hierarchica...
Jinan Xu - 2015 - Integrating Case Frame into Japanese to Chinese Hierarchica...Association for Computational Linguistics
 

Similar to Supervised Learning of Universal Sentence Representations from Natural Language Inference Data (20)

視覚と対話の融合研究
視覚と対話の融合研究視覚と対話の融合研究
視覚と対話の融合研究
 
Extract and edit
Extract and editExtract and edit
Extract and edit
 
【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models
【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models
【DL輪読会】High-Resolution Image Synthesis with Latent Diffusion Models
 
言語処理系入門3
言語処理系入門3言語処理系入門3
言語処理系入門3
 
Rainbow: Combining Improvements in Deep Reinforcement Learning (AAAI2018 unde...
Rainbow: Combining Improvements in Deep Reinforcement Learning (AAAI2018 unde...Rainbow: Combining Improvements in Deep Reinforcement Learning (AAAI2018 unde...
Rainbow: Combining Improvements in Deep Reinforcement Learning (AAAI2018 unde...
 
Pythonが動く仕組み(の概要)
Pythonが動く仕組み(の概要)Pythonが動く仕組み(の概要)
Pythonが動く仕組み(の概要)
 
大規模言語モデルとChatGPT
大規模言語モデルとChatGPT大規模言語モデルとChatGPT
大規模言語モデルとChatGPT
 
Nl237 presentation
Nl237 presentationNl237 presentation
Nl237 presentation
 
Interop2017
Interop2017Interop2017
Interop2017
 
コンピュータビジョンで作る未来の栽培技術POL共催セミナー_20220527
コンピュータビジョンで作る未来の栽培技術POL共催セミナー_20220527コンピュータビジョンで作る未来の栽培技術POL共催セミナー_20220527
コンピュータビジョンで作る未来の栽培技術POL共催セミナー_20220527
 
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
 
Vision-and-Language Navigation: Interpreting visually-grounded navigation ins...
Vision-and-Language Navigation: Interpreting visually-grounded navigation ins...Vision-and-Language Navigation: Interpreting visually-grounded navigation ins...
Vision-and-Language Navigation: Interpreting visually-grounded navigation ins...
 
Jubatusのリアルタイム分散レコメンデーション@TokyoNLP#9
Jubatusのリアルタイム分散レコメンデーション@TokyoNLP#9Jubatusのリアルタイム分散レコメンデーション@TokyoNLP#9
Jubatusのリアルタイム分散レコメンデーション@TokyoNLP#9
 
論文紹介:PaperRobot: Incremental Draft Generation of Scientific Idea
論文紹介:PaperRobot: Incremental Draft Generation of Scientific Idea論文紹介:PaperRobot: Incremental Draft Generation of Scientific Idea
論文紹介:PaperRobot: Incremental Draft Generation of Scientific Idea
 
Generating Better Search Engine Text Advertisements with Deep Reinforcement L...
Generating Better Search Engine Text Advertisements with Deep Reinforcement L...Generating Better Search Engine Text Advertisements with Deep Reinforcement L...
Generating Better Search Engine Text Advertisements with Deep Reinforcement L...
 
第3回nips読み会・関西『variational inference foundations and modern methods』
第3回nips読み会・関西『variational inference  foundations and modern methods』第3回nips読み会・関西『variational inference  foundations and modern methods』
第3回nips読み会・関西『variational inference foundations and modern methods』
 
Convolutional Neural Netwoks で自然言語処理をする
Convolutional Neural Netwoks で自然言語処理をするConvolutional Neural Netwoks で自然言語処理をする
Convolutional Neural Netwoks で自然言語処理をする
 
NLP2017 NMT Tutorial
NLP2017 NMT TutorialNLP2017 NMT Tutorial
NLP2017 NMT Tutorial
 
ブースティング入門
ブースティング入門ブースティング入門
ブースティング入門
 
Jinan Xu - 2015 - Integrating Case Frame into Japanese to Chinese Hierarchica...
Jinan Xu - 2015 - Integrating Case Frame into Japanese to Chinese Hierarchica...Jinan Xu - 2015 - Integrating Case Frame into Japanese to Chinese Hierarchica...
Jinan Xu - 2015 - Integrating Case Frame into Japanese to Chinese Hierarchica...
 

Supervised Learning of Universal Sentence Representations from Natural Language Inference Data

  • 1. Supervised Learning of Universal Sentence Representations from Natural Language Inference Data Alexis Conneau, Douwe Kiela, Holger Schwenk, Loïc Barrault, and Antoine Bordes EMNLP 2017, pages 681-691. 論文 コード(エンコーダ) コード(評価) 読み手: 岡崎 直観 (東京工業大学情報理工学院) (@chokkanorg) ACL2017読み会@すずかけ台 ※但し書きがある場合を除き,スライド中の図・表はConneau+ (2017) の引用
  • 2. 汎用的な文エンコーダは作れる! • 構成方法 • 双方向LSTMにmax-poolingを組み合わせたDNN • Stanford Natural Language Inference (SNLI) で訓練 • 検証方法 • SNLIデータで様々なエンコーダの性能を比較 • SkipThoughtやFastSentなどの既存手法を含め,訓練済 みのエンコーダを12個のタスクに適用して性能を比較 • 検証結果 • 提案手法の文エンコーダは,様々なタスクへ転用する ことが可能で,かつ既存手法よりも高性能 • 提案手法の訓練は,既存手法の訓練よりも高速 • 文の特徴抽出器として利用可能(モデルを公開) 2Conneau+ (2017) Supervised Learning of Universal Sentence Representations
  • 3. 本研究で用いたタスク: Stanford Natural Language Inference (SNLI) (Bowman+ 15) • Flickr30kのキャプションを基に,含意(entailment), 矛盾(contradiction),中立(neutral)する文をクラ ウドソーシングで収集したもの(57万文対) https://nlp.stanford.edu/projects/snli/ 3Conneau+ (2017) Supervised Learning of Universal Sentence Representations
  • 4. 本研究で訓練するDNNの構成: 2文のエンコーダに基づく3値分類 A soccer game with multiple males playing. Some men are playing a sport. 文のエンコーダ 文のエンコーダ (Premise) (Hypothesis) 𝑢𝑢 𝑣𝑣 × ー 512次元の隠れ層とsoftmax層(3値分類) Premiseの ベクトル Hypothesisの ベクトル 含意,矛盾,中立のスコア(教師信号) 2文のエンコード結果を 統合したベクトル ×は要素ごとの積 -は要素ごとの差の絶対値 4Conneau+ (2017) Supervised Learning of Universal Sentence Representations
  • 5. 文のエンコーダの構成 • 以下の7種類の手法を比較・検討 • Long Short-Term Memory (LSTM) • Gated Recurrent Unit (GRU) • 双方向GRU (両方向の最終内部ベクトルを結合) • 双方向LSTM • 各単語に対応する内部ベクトルの平均をとる (mean pooling) • 各単語に対応する内部ベクトルの最大値を取る (max pooling) • Self-attentive network • Hierarchical Convolutional Network • 単語埋め込みはGloVeで固定 • 公開されている単語ベクトル(300次元)を利用 5Conneau+ (2017) Supervised Learning of Universal Sentence Representations
  • 6. 双方向GRU Skip-thoughtで用いられているエンコーダと 同じアーキテクチャを採用 The movie was great 𝑥𝑥𝑡𝑡 ℎ𝑡𝑡 𝑢𝑢 または 𝑣𝑣 ℎ𝑡𝑡 𝑤𝑤𝑡𝑡 ℎ𝑡𝑡 = GRU (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇) ℎ𝑡𝑡 = GRU (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇) 𝑢𝑢 = ℎ𝑇𝑇, ℎ1 6Conneau+ (2017) Supervised Learning of Universal Sentence Representations
  • 7. 双方向LSTMとプーリング The movie was great 𝑥𝑥𝑡𝑡 ℎ𝑡𝑡 ℎ𝑡𝑡 𝑤𝑤𝑡𝑡 ℎ𝑡𝑡 = LSTM (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇) ℎ𝑡𝑡 = LSTM (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇) ℎ𝑡𝑡, ℎ𝑡𝑡 各次元について, 全時刻における 最大値もしくは 平均値をとる 7Conneau+ (2017) Supervised Learning of Universal Sentence Representations
  • 8. Self-attentive network (Liu+ 16; Lin+ 17) The movie was great 𝑥𝑥𝑡𝑡 ℎ𝑡𝑡 ℎ𝑡𝑡 𝑤𝑤𝑡𝑡 ℎ𝑡𝑡 = LSTM (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇) ℎ𝑡𝑡 = LSTM (𝑤𝑤1, … , 𝑤𝑤𝑇𝑇) ℎ𝑡𝑡 = ℎ𝑡𝑡, ℎ𝑡𝑡 𝑞𝑞𝑖𝑖 𝑎𝑎𝑖𝑖 (𝑡𝑡) = exp( �ℎ𝑡𝑡 ⋅ 𝑞𝑞𝑖𝑖) ∑𝑡𝑡𝑡 exp(ℎ𝑡𝑡′ ⋅ 𝑞𝑞𝑖𝑖) �ℎ𝑡𝑡 = tanh(𝑊𝑊ℎ𝑡𝑡 + 𝑏𝑏𝑖𝑖) 𝑢𝑢𝑖𝑖 = � 𝑡𝑡 𝑎𝑎𝑖𝑖(𝑡𝑡)ℎ𝑡𝑡 ※実際は𝑞𝑞1 , 𝑞𝑞2 ,𝑞𝑞3 ,𝑞𝑞4 の4種類の ベクトル(観点)を学習し,4種類の 𝑢𝑢1 , 𝑢𝑢2 ,𝑢𝑢3 ,𝑢𝑢4 を計算して,連結する (アテンション計算用) (学習で求める) 8Conneau+ (2017) Supervised Learning of Universal Sentence Representations
  • 9. Hierarchical convolutional network (Zhao+ 15) The movie was the best of all 𝑥𝑥𝑡𝑡 𝑐𝑐𝑡𝑡 1 𝑐𝑐𝑡𝑡 2 𝑐𝑐𝑡𝑡 3 𝑐𝑐𝑡𝑡 4 ※実際には4層まで畳み込みを適用するが,この例では 単語数が足りないため4層まで到達していない 最 大 値 プ ー リ ン グ 4層分のプーリング結果の連結を文ベクトルとする 9Conneau+ (2017) Supervised Learning of Universal Sentence Representations
  • 10. 評価に用いたタスク • 分類問題 • 評判分析(MR, SST) • 質問タイプ分類(TREC) • 商品レビュー分析(CR) • 主観・客観分類(SUBJ) • 意見極性分類(MPQA) • 意味的関係 • 含意関係認識(SICK-E) • 意味的関連度(SICK-R) • SemEvalの意味的類似度(STS14) • 言い換えの認識 • 言い換えの認識(Microsoft Research Paraphrase Corpus) • キャプション/画像検索 • キャプションからの画像検索 • 画像からのキャプション検索 10Conneau+ (2017) Supervised Learning of Universal Sentence Representations
  • 12. タスク横断の比較 12Conneau+ (2017) Supervised Learning of Universal Sentence Representations 6,400万文で訓練 したSkipThoughtに 対し,57万文対で 訓練した提案手法 が上回る(SUBJと TRECを除く) STS14の結果より, SkipThoughtよりも 提案手法の文ベク トルの方がコサイ ン類似度を正確に 計算できている (提案手法の中に 要素積や要素差 の情報が取り込ま れているため?) (AllNLI = SNLI + MultiGenre NLI) 機械翻訳や辞書 定義文などで訓練 するよりも高性能
  • 14. 議論 • SNLIデータは文エンコーダの訓練に適している • NLIは文の深い意味や関係の理解が必須だから? • 教師なし(単なる生コーパス)の大量データよりも, SNLIの教師ありデータの方が,性能・学習時間の 観点から優れている • 今後の展開 • 実際にはどのようなタスクに転用可能なのか? 機械 翻訳の性能は向上の余地があるのか? • 日本語のNLIのデータを作る? 14Conneau+ (2017) Supervised Learning of Universal Sentence Representations