10. 10
本日の例題 文章分類
英語疑問文の質問対象を分類する
• 分類クラスは下記6クラス
「場所」「人」「数字」「物」「略語」「記述」
• 例えば
How many people in the world speak French?
→ 数字
What does S.O.S. stand for?
→ 略語
How can I find out what year a Beanie Baby was introduced?
→ 記述
データセットはTREC6(https://cogcomp.seas.upenn.edu/Data/QA/QC/)より
12. 12
ラベリングミニチャレンジ(30秒)
皆さんはいくつの疑問文を分類できますか?
• 選択肢 A. 0~1 B. 2~4 C. 5~7 D. 8~10
• 疑問文
1. How many feet are there in a fathom?
2. How do doctors diagnose bone cancer?
3. Why did the chicken cross the road?
4. What is the normal resting heart rate of a healthy adult?
5. A corgi is a kind of what?
6. How long after intercourse does it take to find?
7. Who was the 16th President of the United States?
8. Where can I buy movies on videotape online?
9. Why do rooftops give off steam after a big rainstorm?
10. Where does chocolate come from?
クラス
場所
人
数字
物
略語
記述
データセットはTREC6(https://cogcomp.seas.upenn.edu/Data/QA/QC/)より
13. 13
答え合わせ
• 選択肢 A. 0~1 B. 2~4 C. 5~7 D. 8~10
1. How many feet are there in a fathom? (数字)
2. How do doctors diagnose bone cancer? (記述)
3. Why did the chicken cross the road? (記述)
4. What is the normal resting heart rate of a healthy adult? (数字)
5. A corgi is a kind of what? (物)
6. How long after intercourse does it take to find? (数字)
7. Who was the 16th President of the United States? (人)
8. Where can I buy movies on videotape online? (場所)
9. Why do rooftops give off steam after a big rainstorm? (記述)
10. Where does chocolate come from? (場所)
14. 14
答え合わせの深堀り
何をもとにクラスを判断しましたか
1. How many feet are there in a fathom? (数字)
2. How do doctors diagnose bone cancer? (記述)
3. Why did the chicken cross the road? (記述)
4. What is the normal resting heart rate of a healthy adult? (数字)
5. A corgi is a kind of what? (物)
6. How long after intercourse does it take to find? (数字)
7. Who was the 16th President of the United States? (人)
8. Where can I buy movies on videotape online? (場所)
9. Why do rooftops give off steam after a big rainstorm? (記述)
10. Where does chocolate come from? (場所)
15. 15
答え合わせの深堀り
何をもとにクラスを判断しましたか
1. How many feet are there in a fathom? (数字)
2. How do doctors diagnose bone cancer? (記述)
3. Why did the chicken cross the road? (記述)
4. What is the normal resting heart rate of a healthy adult? (数字)
5. A corgi is a kind of what? (物)
6. How long after intercourse does it take to find? (数字)
7. Who was the 16th President of the United States? (人)
8. Where can I buy movies on videotape online? (場所)
9. Why do rooftops give off steam after a big rainstorm? (記述)
10. Where does chocolate come from? (場所)
• Whereがあれば「場所」? Whyがあれば「記述」?
• Howは「記述」,How+数の形容詞なら「数字」?
16. 16
課題1へのアプローチ 人→機械
ラベリング関数を導入
• Whereがあれば「場所」? Whyがあれば「記述」?
3. Why did the chicken … ? (記述)
9. Why do rooftops … ? (記述)
課題1 冗長な作業を繰り返さず,
知見をそのまま機械に組み込めないか
<キーワード>
弱教師あり学習
<OSS>
Snorkel
(https://www.snorkel.ai)
<論文>
A. Ratner et al., ”Data
Programming: Creating
Large Training Sets, Quickly,”
NeurIPS2016
A. Ratner et al., “Training
Complex Models with Multi-
Task Weak Supervision,”
AAAI2019
Snorkelを用いた
Pythonコードの例
LF
why
17. 17
課題1へのアプローチ 人→機械
ラベリング関数間の矛盾や重複を自動で解決
• Howは「記述」,How+数の形容詞なら「数字」?
1. How many feet … ?
2. How do doctors … ?
6. How long after … ?
課題1 冗長な作業を繰り返さず,
知見をそのまま機械に組み込めないか
<キーワード>
弱教師あり学習
<OSS>
Snorkel
(https://www.snorkel.ai)
<論文>
A. Ratner et al., ”Data
Programming: Creating
Large Training Sets, Quickly,”
NeurIPS2016
A. Ratner et al., “Training
Complex Models with Multi-
Task Weak Supervision,”
AAAI2019
LF
how
(記述)
(記述)
(記述)
(数字)
( - )
(数字)
LF
num
LF
aggr
(数字)
(記述)
(数字)
広いが
低信頼な知見
狭いが
高信頼な知見
ラベリング関数”群”
19. 19
課題2へのアプローチ 人←機械
ラベリングすべきデータを人に提示
• ラベリングにより得られる効用は各データで異なる
課題2 人の作業を最小化するために,
機械がその作業を支援できないか
<キーワード>
(双方向)能動学習
<論文>
B. Settles, “Active learning
literature survey,” 2009
F. Tang, “Bidirectional active
learning with gold-instance-
based human training,”
IJCAI2019
20. 20
課題2へのアプローチ 人←機械
ラベリングすべきデータを人に提示
• ラベリングにより得られる効用は各データで異なる
• 実際にはこの効用の差や分布は直接観測できない
課題2 人の作業を最小化するために,
機械がその作業を支援できないか
<キーワード>
(双方向)能動学習
<論文>
B. Settles, “Active learning
literature survey,” 2009
F. Tang, “Bidirectional active
learning with gold-instance-
based human training,”
IJCAI2019
おそらく だろうし,ラベリングして
もあまり効果がなさそう
現時点ではどのクラスとも言えなさそ
うだから,ラベリングの効果が大きい
30. 30
ラベリングにおける協働型手法
本日の例題に即して具体化すると
What caused the Titanic to sink?
What state is Niagara Falls located in?
Name Pittsburgh 's baseball team.
What sea surrounds the Cayman Islands?
What state produces the best lobster to eat ?
LF
why
LF
how
LF
num
クラス
場所
人
数字
物
略語
記述
LF
stand
31. 31
ラベリングにおける協働型手法
本日の例題に即して具体化すると
What caused the Titanic to sink?
What state is Niagara Falls located in?
Name Pittsburgh 's baseball team.
What sea surrounds the Cayman Islands?
What state produces the best lobster to eat ?
LF
why
LF
how
LF
num
クラス
場所
人
数字
物
略語
記述
LF
stand
LF
place