SlideShare a Scribd company logo
1 of 35
含意関係認識コーパスの偏りによる
性能評価への影響
土屋雅稔(豊橋技術科学大学)
1
本日の概要
2
英文の含意関係認識に広く用いられている
SNLIコーパスには偏りが存在
前提文によるコンテキストなしに、
仮説文のみから含意関係ラベルが
推定できる!
SemEval/SNLIにおける含意関係認識の定義
3
 前提文と仮説文の関係
を、以下の3種類(含意
関係ラベル)に分類す
るタスク
 E: 含意
 N: 中立
 C: 矛盾
Sentence
𝑠1 Two boys are
swimming in the pool.
E
𝑠2 Two girls are playing
the basketball.
N
𝑠3 Two women are
swimming in the pool.
C
ℎ Two children are
swimming in the pool.
前提文によるコンテキストがなければ…
4
 ある同一の仮説文 ℎ で
あっても、どのような
前提文を与えるかに
よって、含意関係ラベ
ルは変化する
 前提文によるコンテキ
スト抜きに、2文の関係
が決まることは、原理
的に有り得ない
Sentence
𝑠1 Two boys are
swimming in the pool.
E
𝑠2 Two girls are playing
the basketball.
N
𝑠3 Two women are
swimming in the pool.
C
ℎ Two children are
swimming in the pool.
(含意関係認識の定義的に)異常な仮説
5
前提文によるコンテキストなしに
仮説文のみで含意関係ラベルが決定できる
(仮説文のみに基づく)含意関係ラベル推定モデル
6
 異常な仮説が成り立つか確認するモデル
 前提文によるコンテキストなしに、仮説文のみの情
報を用いて含意関係ラベルを推定
 本稿では Naive-Bayesモデルを採用
𝑦 = argmax
𝑦
𝑃(𝑦)
𝑖=1
𝑛
𝑃(𝑥𝑖|𝑦)
 𝑦 は含意関係ラベル
 𝑥𝑖 は素性(仮説文に含まれる全ての単語unigram)
(仮説文のみに基づく)含意関係ラベル推定精度
7
 実験条件
 2種のコーパス
(SNLI/SICK)を対象
 学習セットの仮説文と
含意関係ラベルのみを
用いて、含意関係ラベ
ル推定モデルを構築
 テストセットを用いて、
ラベル推定精度を評価
実験結果
SNLI SICK
精度 63.3% 56.7%
SNLI SICK
テスト
セット
テスト
セット
含意 34.3% 28.7%
中立 32.8% 56.7%
矛盾 33.0% 14.6%
ラベルの分布
チャンスレシオ
と大きく異なる
チャンスレシオ
とほとんど同じ
(仮説文のみに基づく)含意関係ラベル推定結果
8
SNLIコーパス
正解ラベル
推
定
ラ
ベ
ル
含意 中立 矛盾
含意 2275 644 706
中立 508 1976 563
矛盾 585 599 1968
SICKコーパス
正解ラベル
推
定
ラ
ベ
ル
含意 中立 矛盾
含意 3 3 2
中立 1411 2790 718
矛盾 0 0 0
 SNLIコーパスに対する含意関係ラベル推定モデルは、
個々の仮説文に対して、適切なラベルを推定・出力
 SICKコーパスに対する含意関係ラベル推定モデルは、単
純に最も高頻度のラベル(中立)を出力
(含意関係認識の定義的に)異常な仮説
9
前提文によるコンテキストなしに
仮説文のみで含意関係ラベルが決定できる
SNLIコーパスに対しては成立!
SICKコーパスに対しては不成立!
なぜ?
困った!
定義通り
ほっ
SNLIコーパスとSICKコーパスの比較
10
両コーパスの類似点と相違点を分析し、
SNLIコーパスで異常な仮説が成り立つ
理由を調べる
各コーパスの類似点
11
 ともに、情景(写真)を描写する文を対象
 Flickerコーパス由来の文を利用
 SNLIコーパス:Flickerコーパスの文を、前提文に利用
 SICKコーパス:Flickerコーパス+SemEval2012コーパスの
文を、前提文・仮説文の両方に利用
 語彙はほぼ共有されている
SNLIコーパスとSICKコーパスの基本統計
12
SNLI SICK
学習セット事例数 55K 4500
開発セット事例数 10K 500
テストセット事例数 10K 4927
学習セット語彙サイズ 36427 2178
テストセット未知語率(vs 学習セット) 0.24% 0.29%
テストセット未知語率(vs 異なるコーパ
スの学習セット)
10.3% 0.15%
• SNLI training set is enough large to cover SICK test set as well as
SNLI test set.
• SICK training set covers its own test set, but does not cover SNLI
test set.
SNLIコーパスとSICKコーパスの相違点
13
両コーパスは作成手順が大きく異なる
各コーパスの作成手順
SNLIコーパス SICKコーパス
14
① Flicker コーパスの文を、
前提文として作業者に
提示
② 作業者は、前提文に対
して含意する文、中立
の文、矛盾する文、の
3文を作文
① Flicker コーパス+別
コーパスの文を自動的
に簡略化
② 文対を作成
③ 作業者は、提示された
文対を3種類に分類
含意関係ラベルの分布
15
SNLIコーパス SICKコーパス
学習
セット
開発
セット
テスト
セット
学習
セット
開発
セット
テスト
セット
含意 33.4% 33.8% 34.3% 28.9% 28.8% 28.7%
中立 33.3% 32.9% 32.8% 56.4% 56.4% 56.7%
矛盾 33.4% 33.3% 33.0% 14.8% 14.8% 14.6%
 SNLIコーパスは、含意関係ラベルの出現頻度が(ほぼ)バラ
ンスしている
 SICKコーパスは、含意関係ラベルの出現頻度がバランスして
いない
 この分布の違いは、2つのコーパスの作成方法の違いに起因
SNLIコーパスとSICKコーパスの相違点
16
 2つは作り方が違う
 SNLIコーパスは、前提文を人間の作業者に見せて、
仮説文を作文するように依頼している。
 そのため、人間の作業者は、前提文によるバイアス
から逃れられない。
 人間の作業者の無意識のバイアスが原因なのでは?
含意関係ラベルについて特徴的な語彙
17
 含意関係ラベル推定モデル(Naive-Bayesモデル)
𝑦 = argmax
𝑦
𝑃(𝑦)
𝑖=1
𝑛
𝑃(𝑥𝑖|𝑦)
 𝑦 は含意関係ラベル
 𝑥𝑖 は素性(仮説文に含まれる全ての単語unigram)
 Bayes 則に基づいて、単語unigram条件付き含意関係
ラベル生起確率 𝑃(𝑦|𝑥) を求める
含意関係ラベルの単語unigram条件付き確率
𝑷 𝒚 𝒙 の上位5語・下位5語
18
含意 中立 矛盾
上位5語
proximity 0.9570 joyously 0.9871 nobody 0.9949
least 0.9318 impress 0.9563 alll 0.9718
bvoy 0.8848 championship 0.9398 mars 0.9630
interacting 0.8760 playoff 0.9371 mashed 0.9433
mammals 0.8712 siblings 0.9160 frowning 0.9388
下位5語
funeral 0.0081 empty-handed 0.0267 mammals 0.0277
mars 0.0071 frowning 0.0242 impress 0.0241
joyously 0.0067 mute 0.0228 proximity 0.0152
championship 0.0032 alll 0.0129 least 0.0119
nobody 0.0009 nobody 0.0042 joyously 0.0062
含意関係ラベルの単語unigram条件付き確率
𝑷 𝒚 𝒙 の上位5語・下位5語
19
含意 中立 矛盾
上位5語
proximity 0.9570 joyously 0.9871 nobody 0.9949
least 0.9318 impress 0.9563 alll 0.9718
bvoy 0.8848 championship 0.9398 mars 0.9630
interacting 0.8760 playoff 0.9371 mashed 0.9433
mammals 0.8712 siblings 0.9160 frowning 0.9388
下位5語
funeral 0.0081 empty-handed 0.0267 mammals 0.0277
mars 0.0071 frowning 0.0242 impress 0.0241
joyously 0.0067 mute 0.0228 proximity 0.0152
championship 0.0032 alll 0.0129 least 0.0119
nobody 0.0009 nobody 0.0042 joyously 0.0062
「矛盾」の確率が高い nobody の用例
20
前提文 仮説文
矛盾
A woman is walking across the street eating
a banana, while a man is following with his
briefcase.
Nobody has food.
A man and a woman are standing next to
sculptures, talking while another man looks
at other sculptures.
Nobody is standing.
A group of young girls playing jump rope in
the street.
Nobody is playing
jump rope.
中立
Three young girls posing for a picture in an
outdoor amphitheater, surrounded by adults
watching a conference.
Nobody is wearing
a hat.
含意
Lacrosse players struggling for control of the
ball.
Nobody is in
control of the ball.
前提文から否定文を作成(例えば not の挿入)→「矛盾」の用例を作成する
ことは、SNLIコーパスの作業マニュアルで禁止されている。が十分ではない。
含意関係ラベルの単語unigram条件付き確率
𝑷 𝒚 𝒙 の上位5語・下位5語
21
含意 中立 矛盾
上位5語
proximity 0.9570 joyously 0.9871 nobody 0.9949
least 0.9318 impress 0.9563 alll 0.9718
bvoy 0.8848 championship 0.9398 mars 0.9630
interacting 0.8760 playoff 0.9371 mashed 0.9433
mammals 0.8712 siblings 0.9160 frowning 0.9388
下位5語
funeral 0.0081 empty-handed 0.0267 mammals 0.0277
mars 0.0071 frowning 0.0242 impress 0.0241
joyously 0.0067 mute 0.0228 proximity 0.0152
championship 0.0032 alll 0.0129 least 0.0119
nobody 0.0009 nobody 0.0042 joyously 0.0062
「含意」の確率が高い proximity の用例
22
前提文 仮説文
含意
A bride and groom dance surrounded
by people at the reception.
A married couple is in the
proximity of other humans.
Many people are dunking to support
special olympics.
Several people are in close
proximity to each other.
A bull charges at a man within a
stadium while an audience watches.
Onlookers view a person
and an animal in close
proximity to each other.
中立
Child playing in waves with sun on
the horizon.
A child is playing in the
water with her mother in
close proximity.
人間の作業者には、複数の人間が出現する情景を描写する前提文が与えられ
ると、その位置関係を使って「含意」の用例を作成する癖がある?
含意関係ラベルの単語unigram条件付き確率
𝑷 𝒚 𝒙 の上位5語・下位5語
23
含意 中立 矛盾
上位5語
proximity 0.9570 joyously 0.9871 nobody 0.9949
least 0.9318 impress 0.9563 alll 0.9718
bvoy 0.8848 championship 0.9398 mars 0.9630
interacting 0.8760 playoff 0.9371 mashed 0.9433
mammals 0.8712 siblings 0.9160 frowning 0.9388
下位5語
funeral 0.0081 empty-handed 0.0267 mammals 0.0277
mars 0.0071 frowning 0.0242 impress 0.0241
joyously 0.0067 mute 0.0228 proximity 0.0152
championship 0.0032 alll 0.0129 least 0.0119
nobody 0.0009 nobody 0.0042 joyously 0.0062
「中立」の確率が高い championship の用例
24
前提文 仮説文
中立
Two soccer teams are competing on a
soccer field.
Two skilled soccer teams
are competing against
one another for the
championship.
A soccer match between a team with
white jerseys, and a team with yellow
jerseys.
The teams are in a
championship match.
There is a baseball player standing at
home plate, the catcher behind him has
his hand up in the air with his glove, and
the umpire is standing behind him, and
many people in the stands.
The final game of the
championship is being
played while many fans
are in the stands.
人間の作業者には、スポーツの試合の情景を描写している前提文が与えられ
ると、championship を使って「中立」(無関係)な文を作ろうとする癖が
ある?
ある含意関係ラベル「ではない」と分かる語彙
25
含意 中立 矛盾
funeral 0.0081 0.3804 0.6115
stole 0.0106 0.5607 0.4287
stationary 0.2668 0.0421 0.6911
soaring 0.4340 0.0522 0.5139
human 0.6296 0.3372 0.0332
higher 0.4123 0.5477 0.0400
 含意関係ラベルの単語unigram条件付き確率 𝑃 𝑦 𝑥 につ
いて、ある含意関係ラベルとの確率は極端に低いが、残
る2つの含意関係ラベルとの確率は大差がない語彙を
ピックアップしてみました
「矛盾」の確率が低い higher の用例
26
前提文 仮説文
含意
A speed boat pulling a waterskier
along a jump.
The skier is going higher in
the water.
Top of the stands looking down at the
baseball stadium.
The baseball stadium seats
are higher than the field.
中立
Two men, one in a circuit city t-shirt,
the other in an M&Ms t-shirt, operate
video game guns.
One man has a higher
score than the other .
A young smiling woman is having fun
on a rustic looking swing.
A woman is trying to swing
higher than her friend.
矛盾
Red objects fall on men standing
behind a red wall.
The men are higher than
the wall.
人間の作業者は、複数の人物(や対象)を含む前提文が与えられると、その
比較を行って含意や中立の用例を作ることができる。ただし、矛盾の用例で
は、higher は極端に使われない。
SNLIコーパスの偏りによる性能評価への影響
27
SNLIコーパスの偏りによって、
NNを用いた含意関係認識の性能評価に
どのような影響があるか調べる
含意関係ラベル推定モデルによる経験的分割
28
 𝐸𝑒:推定可能サブセット
 含意関係ラベルが、帰結文
によるコンテキストなしに、
仮説文のみに基づいて正し
く推定可能な事例のみから
なる集合
𝐸𝑒 𝐻𝑒
含意 2,275 (36.6%) 1,093 (30.3%)
中立 1,976 (31.8%) 1,243 (34.5%)
矛盾 1,968 (31.6%) 1,269 (35.2%)
6,219 3,605
 𝐻𝑒:推定困難サブセット
 推定可能サブセット 𝐸𝑒 の
補集合
NNを用いた含意関係認識手法
29
 Encoder-decoder model (Tim Rocktaschel et al,
ICLR2016)
 Encoder using LSTM converts a premise sentence into a
vector representation.
 Decoder using LSTM inferences based on the above
vector representation and a hypothesis sentence.
 Attention Based Convolutional NN (Wenpeng Yin et
al, TACL2016)
 Tree-based convolution model (LiLi et al, ACL2016)
並列LSTMモデル(Bowman et al, 2015)
30
LSTM
𝑝1
𝑊𝑒
label
LSTM
𝑝2
𝑊𝑒
LSTM
𝑝3
𝑊𝑒
LSTM
𝑝4
𝑊𝑒
LSTM
ℎ1
𝑊𝑒
LSTM
ℎ2
𝑊𝑒
LSTM
ℎ3
𝑊𝑒
LSTM
ℎ4
𝑊𝑒
前提文
仮説文
直列LSTMモデル(Rocktashchel et al, 2015)
31
LSTM
𝑝1
LSTM
𝑝2
LSTM
𝑝3
LSTM
𝑝4
LSTM
ℎ1
LSTM
ℎ2
LSTM
ℎ3
label
前提文 仮説文
推定可能サブセット 𝑬 𝒆 による性能への寄与
32
 並列LSTMモデル・直列LSTMモデルともに、推定可能サ
ブセット 𝐸𝑒 に対しては高精度
 しかし、推定困難サブセット 𝐻𝑒 に対しては、比較的精
度が低い
 全体性能 𝐸𝑒 ∪ 𝐻𝑒 のかなりの部分は、推定可能サブセッ
ト 𝐸𝑒 による寄与ではないのか?
𝐸𝑒 ∪ 𝐻𝑒 𝐸𝑒 𝐻𝑒
並列LSTMモデル 76.8% 87.8% 57.8%
直列LSTMモデル 81.4% 90.1% 65.6%
前提文のコンテキストを削除してみる
=前提文の単語を全て未知語シンボルに置換
33
LSTM
UNK
𝑊𝑒
label
LSTM
𝑊𝑒
LSTM
𝑊𝑒
LSTM
𝑊𝑒
LSTM
ℎ1
𝑊𝑒
LSTM
ℎ2
𝑊𝑒
LSTM
ℎ3
𝑊𝑒
LSTM
ℎ4
𝑊𝑒
前提文
仮説文
UNK UNK UNK
前提文によるコンテキストを削除した場合
34
実験結果
𝐸𝑒 ∪ 𝐻𝑒 𝐸𝑒 𝐻𝑒
並列LSTMモデル 54.1% 66.0% 33.7%
直列LSTMモデル 48.6% 56.7% 34.7%
𝐸𝑒 𝐻𝑒
含意 2,275 (36.6%) 1,093 (30.3%)
中立 1,976 (31.8%) 1,243 (34.5%)
矛盾 1,968 (31.6%) 1,269 (35.2%)
6,219 3,605
経験的分割したテストセットの統計
チャンスレシオ
とほとんど同じ
チャンスレシオ
と大きく異なる
含意関係認識モデルではなく、
含意関係ラベル推定モデルとしての
学習しかしていないのではないか?
まとめ
35
 SNLIコーパスには、前提文によるコンテキストなし
に、仮説文のみから含意関係ラベルを推定できる偏
りがある
 SNLIコーパスを用いて学習した含意関係認識用NNモ
デルは、(少なくとも)推定可能サブセット 𝐸𝑒 に
対しては、仮説文のみに基づく含意関係ラベル推定
モデルとして動作している

More Related Content

Viewers also liked

多項式あてはめで眺めるベイズ推定 ~今日からきみもベイジアン~
多項式あてはめで眺めるベイズ推定~今日からきみもベイジアン~多項式あてはめで眺めるベイズ推定~今日からきみもベイジアン~
多項式あてはめで眺めるベイズ推定 ~今日からきみもベイジアン~ tanutarou
 
新規事業・起業を妨げる「ビジネスモデル症候群」とは
新規事業・起業を妨げる「ビジネスモデル症候群」とは新規事業・起業を妨げる「ビジネスモデル症候群」とは
新規事業・起業を妨げる「ビジネスモデル症候群」とはLean Startup Japan LLC
 
確率的プログラミングライブラリEdward
確率的プログラミングライブラリEdward確率的プログラミングライブラリEdward
確率的プログラミングライブラリEdwardYuta Kashino
 
すべてを自動化せよ! 〜生産性向上チームの挑戦〜
すべてを自動化せよ! 〜生産性向上チームの挑戦〜すべてを自動化せよ! 〜生産性向上チームの挑戦〜
すべてを自動化せよ! 〜生産性向上チームの挑戦〜Jumpei Miyata
 
Tokyo webmining 2017-10-28
Tokyo webmining 2017-10-28Tokyo webmining 2017-10-28
Tokyo webmining 2017-10-28Kimikazu Kato
 
(DL hacks輪読)Bayesian Neural Network
(DL hacks輪読)Bayesian Neural Network(DL hacks輪読)Bayesian Neural Network
(DL hacks輪読)Bayesian Neural NetworkMasahiro Suzuki
 
本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話Kumazaki Hiroki
 

Viewers also liked (8)

多項式あてはめで眺めるベイズ推定 ~今日からきみもベイジアン~
多項式あてはめで眺めるベイズ推定~今日からきみもベイジアン~多項式あてはめで眺めるベイズ推定~今日からきみもベイジアン~
多項式あてはめで眺めるベイズ推定 ~今日からきみもベイジアン~
 
新規事業・起業を妨げる「ビジネスモデル症候群」とは
新規事業・起業を妨げる「ビジネスモデル症候群」とは新規事業・起業を妨げる「ビジネスモデル症候群」とは
新規事業・起業を妨げる「ビジネスモデル症候群」とは
 
確率的プログラミングライブラリEdward
確率的プログラミングライブラリEdward確率的プログラミングライブラリEdward
確率的プログラミングライブラリEdward
 
AWS Black Belt - AWS Glue
AWS Black Belt - AWS GlueAWS Black Belt - AWS Glue
AWS Black Belt - AWS Glue
 
すべてを自動化せよ! 〜生産性向上チームの挑戦〜
すべてを自動化せよ! 〜生産性向上チームの挑戦〜すべてを自動化せよ! 〜生産性向上チームの挑戦〜
すべてを自動化せよ! 〜生産性向上チームの挑戦〜
 
Tokyo webmining 2017-10-28
Tokyo webmining 2017-10-28Tokyo webmining 2017-10-28
Tokyo webmining 2017-10-28
 
(DL hacks輪読)Bayesian Neural Network
(DL hacks輪読)Bayesian Neural Network(DL hacks輪読)Bayesian Neural Network
(DL hacks輪読)Bayesian Neural Network
 
本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話本当は恐ろしい分散システムの話
本当は恐ろしい分散システムの話
 

20171024NL研報告スライド