Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Learning to Faithfully Rationalize by Construction

Shunsuke KITADA
September 06, 2020

Learning to Faithfully Rationalize by Construction

“Attention is not Explanation” と “Attention is not not Explanation” の著者らによる夢のコラボレーション。本文から根拠を抽出してその根拠を元にタスクを解く新たな枠組みの提案。

■ イベント:ACL2020オンライン読み会
https://exawizards.connpass.com/event/184582/

■ 登壇概要
タイトル:Learning to Faithfully Rationalize by Construction

Shunsuke KITADA

September 06, 2020
Tweet

More Decks by Shunsuke KITADA

Other Decks in Research

Transcript

  1. Learning to Faithfully Rationalize by Construction Sarthak Jain1, Sarah Wiegreffe2,

    Yuval Pinter2, Byron C. Wallace1 1Khoury College of Computer Sciences, Northeastern University 2School of Interactive Computing, Georgia Institute of Technology ACL 2020 Long paper Presented by 北田 俊輔 法政大学大学院 理工学研究科 応用情報工学専攻 ACL 2020 オンライン読み会 hosted by ExaWizards Inc., 9/6, 2020. ※ 本発表で紹介する図や数式は対象の論文からキャプチャしました。
  2. • 深層学習を元にした基礎・応用研究 ◦ 自然言語処理: 文字形状に着目・解釈性のあるモデル ▪ YANS2019にて 奨励賞 を受賞 ▪

    ACL2020 SRWにて共著の論文採択 • 文字形状が特徴的なアラビア語に対する新たな 分類モデルと2つの大規模データセットの提案 ◦ 医用画像処理: 悪性黒色腫自動診断システムの構築 ▪ IPSJ2019にて 学生奨励賞 受賞 ◦ 計算機広告: 広告クリエイティブの評価・作成支援 ▪ KDD2019(データマイニングの最難関国際会議)にて論文採択 • Attention可視化によるクリエイティブ作成支援 自己紹介 2 北田 俊輔 法政大学大学院 理工学研究科 D1 彌冨研 所属 @shunk031 shunk031
  3. 本論文を選択した理由 3 “Attention is not Explanation” と “Attention is not

    not Explanation” の著者らによる夢のコラボレーション ◦ Attentionに説明性があるかを解析した論文 [Jain+Wallace NAACL19; Wiegreffe+Pinter EMNLP19] の著者による 深層学習モデルの予測に対する根拠を学習する手法を提案 • 本文から根拠を抽出して その根拠を元にタスクを解く 新たな枠組みの提案 ◦ 予測の根拠をどのように抽出するかが気になった ◦ 根拠抽出により短くなったテキストで どれくらいの精度でタスクを解くことができるのか FRESH: You have seen your own reflection in a mirror. The person looking back at you looks just like you. Where does that reflected person appear to be standing ? Yes, they appear to be on the other side of the mirror. That is really strange to think about, but very cool. Have you ever waved at your reflection in a mirror? The reflected image will wave back at you. Here is something to try next time you stand in front of a mirror. Wave to your reflection with your right hand. What hand do you think the reflection will wave back with? The same hand? A different hand? You will notice something interesting. The reflection waves back with the hand on the same side as you, but it is their left hand. The image in a reflection is reversed. This is just like the image of the sign above. Light rays strike flat shiny surfaces and are reflected. The reflections are reversed.
  4. 本研究の貢献 4 • 入力文から根拠を抽出し、その根拠を元に予測可能な ニューラルテキスト分類の枠組みを提案 ◦ 先行研究のモデルは強化学習ベースのため学習が難しい ➜ 強化学習を使わない枠組みでモデルを学習 •

    これまでの学習方法固有の複雑さを回避するために 新たな学習手法を提案 ◦ 新たな学習手法 Faithful Rationale Extractionale from Saliency tHresholding (FRESH) を提案 ➜ 根拠を抽出する部分と根拠から予測する部分を 別々に訓練可能にする (後述) • 提案手法 FRESH に対して人手による評価を実施 ◦ Amazon Mechanical Turkで提案手法の示す根拠を評価
  5. 導入: 深層学習モデルの予測に対する説明性 5 予測の説明性における”Faithfulness”と”Rationle” • Faithfulness (忠実) ◦ “予測モデルによって示される根拠は、そのモデルが 最終的にその予測に至るために使った情報を

    反映していれば 忠実 である” [Lipton Queue18] ➜ 入力文から取り出した一部分を根拠とし、それだけで 正しく予測できるのなら、faithful な根拠と言える • Rationale (根拠) ◦ “アノテータがテキストを分類する際にその判断に影響を 与えた文字列を強調して表示するように求められる。 このような手がかりを 根拠 と呼ぶ” [Zaidan+ NAACL07] ➜ 入力文から一部分を抽出して予測根拠とし その根拠のみでどれくらい予測できるかを評価すべき
  6. 関連研究 | 解釈可能性と説明可能性 6 • “解釈可能性” の定義と特性に関する概要 [Lipton Queue18; Doshi-Velez+

    17; Rudin NatureMI19] • モデルの予測に対する根拠の提示は次の3つに分けられる: [Lertvittayakumjorn+ EMNLP19] ◦ 挙動を明らかにすること ◦ 予測を正当化すること ◦ 人間が不確実な予測を調査する際に支援すること • 人間に受け入れてもらえるような説明や解釈を与える手法 ◦ 非常にチャレンジングだが有益 [Rudin NatureMI19] ▪ 忠実な説明は予測モデルモデルの根底にある 意思決定プロセスを明らかにする手段を提供する
  7. 関連研究 | モデル説明手法における現状の問題点 7 • 近年ではheatmapによる可視化が頻繁に利用されている ➜ しかしこれらの手法は一般的に頑健ではなく 忠実な説明を与えているとは言えない場合がある [Feng+

    EMNLP18; Zhong+ 18; Jain+ NAACL19; Wiegreffe+ ACL19; Serrano+ EMNLP19; Brunner+ ICLR20; Pruthi+ ACL20] • 解釈可能性の文脈で分類・根拠提示モデルに求められるもの [Wiegreffe+ ACL19; Lei+ EMNLP16] ▪ 分類モデル: 忠実さ (faltuful) & 尤もらしさ (plausibility) ▪ 根拠提示モデル: 簡潔さ (short) & 一貫性 (coherent) • 加えて 包括性 (comprehensiveness) [Yu+ EMNLP19] • 忠実な根拠を示すようなモデルの提案 [Lei+ EMNLP16; Yu+ EMNLP19; Bastings+ ACL19] • 根拠を生成するgeneratorと根拠から予測するencoderを End-to-endで学習されるモデル ➜ REINFORCEやRepara. trickを使う複雑なものばかり
  8. 関連研究 | 人間による説明性の評価 8 • 人間による評価 ◦ “ユーザーがある手法の結果を正しく予測できる場合、 その手法は 解釈可能である

    と言える” [Kim+ NIPS16] ➜ 人手による評価を実施している ◦ 人間が根拠提示による合理性を好むかを検証 [Ehsan+ AIES18; Ehsan+ IUI19] 本研究ではこうした先行研究に倣って、 根拠の解釈性や合理性について人手による評価を実施
  9. Learning to Faithfully Rationalize by Construction ACL 2020 オンライン読み会 Hosted

    by ExaWizards Inc., 9/6, 2020. 9 Faithfulness through Discrete Rationale Selection
  10. • 先行研究: Rationalizing Neural Predictions [Lei+ EMNLP16] ◦ GeneratorとEncoderによる予測根拠の抽出 ▪

    Generator gen(x i ): 入力テキスト x i から根拠 z i を抽出 ▪ Encoder enc(x i , z i ): 入力テキストと根拠から予測 ◦ 目的関数 ◦ モデルの学習: REINFORCE [Williams ML92] で最適化 ▪ 考慮できる根拠の状態空間が大きいため分散が 大 ➜ 効率的に探索することは困難 cost End-to-Endで予測根拠を抽出 [Lei+ EMNLP16] 10 入力から得られた根拠を 元にした予測と正解の差 抽出される根拠は簡潔で 一貫しているようなもの
  11. • 本研究では: “簡潔さ”項 を変更 ◦ GeneratorとEncoderによる予測根拠の抽出 ▪ Generator gen(x i

    ): 入力テキスト x i から根拠 z i を抽出 ▪ Encoder enc(x i , z i ): 入力テキストと根拠から予測 ◦ 目的関数 ◦ モデルの学習: REINFORCE [Williams ML92] で最適化 ▪ 考慮できる根拠の状態空間が大きいため分散が 大 ➜ 効率的に探索することは困難 End-to-Endで予測根拠を抽出 [Lei+ EMNLP16] 入力から得られた根拠を 元にした予測と正解の差 抽出される根拠は簡潔で 一貫しているようなもの cost 11
  12. • 本研究では: “簡潔さ”項 を変更 ◦ GeneratorとEncoderによる予測根拠の抽出 ▪ Generator gen(x i

    ): 入力テキスト x i から根拠 z i を抽出 ▪ Encoder enc(x i , z i ): 入力テキストと根拠から予測 ◦ 目的関数 ◦ モデルの学習: REINFORCE [Williams ML92] で最適化 ▪ 考慮できる根拠の状態空間が大きいため分散が 大 ➜ 効率的に探索することは困難 End-to-Endで予測根拠を抽出 [Lei+ EMNLP16] 入力から得られた根拠を 元にした予測と正解の差 抽出される根拠は簡潔で 一貫しているようなもの cost 12 期待される根拠の長さ d を設定できるように変更 先行研究 [Lei+ EMNLP16]
  13. Learning to Faithfully Rationalize by Construction ACL 2020 オンライン読み会 Hosted

    by ExaWizards Inc., 9/6, 2020. 13 提案手法: Faithful Rationale Extraction from Saliency tHresholding (FRESH)
  14. • 本研究: FRESH (Faithful Rationale Extraction from Saliency tHresholding) ◦

    REINFORCEによる学習の難しさを克服 ▪ あえてEnd-to-Endな枠組みにしないことで、一般的に 困難な強化学習を元にした学習を回避する ◦ 3つの独立したモデルから構成される枠組み ▪ Supportモデル・Extractorモデル・Classifierモデル End-to-Endで予測根拠を抽出しない枠組み 14
  15. 1. Supportモデル: supp(x i , y i ) 入力 x

    i と正解 y i から学習する。得られる重要度 s i を取得 ➜ 様々な重要度算出手法が利用可能 e.g., Attention, 勾配ベースの手法, LIME [Ribeiro+ KDD16] 2. Extractorモデル: ext(x i , s i ) 3. Classifierモデル: pred(x i , z i ) FRESH: 3つの独立したモデルから構成される枠組み 15
  16. 1. Supportモデル: supp(x i , y i ) 2. Extractorモデル:

    ext(x i , s i ) ◦ suppから得られた重要度を2値化しsnippet を取得 ➜ このsnippetを予測の根拠として扱う ◦ 2値化はルールベースや学習モデルベースなどが適用可能 3. Classifierモデル: pred(x i , z i ) FRESH: 3つの独立したモデルから構成される枠組み 16
  17. 1. Supportモデル: supp(x i , y i ) 2. Extractorモデル:

    ext(x i , s i ) 3. Classifierモデル: pred( ) extから得られたsnippet を元に正解 y i を予測する ➜ 本来の入力よりも短いテキストで予測可能 FRESH: 3つの独立したモデルから構成される枠組み 17
  18. FRESHの実装 19 • Supportモデル supp ◦ ベースモデル: BERT, RoBERTa, SciBERT

    ◦ 重要度算出手法: Attention, Gradient • Extractorモデル ext ◦ 重要度を元に2つの根拠の取り出し方を考慮 (連続/非連続): ▪ Contiguous (連続な根拠) • 重要度が最大になるよう連続したスパンを抽出 ▪ Top-k (非連続な根拠) • 重要度上位 k 個の単語を連続性関係なく抽出 • Classifierモデル pred ◦ すべてのモデルに共通して、BERT表現を使って分類
  19. 実験設定 21 • 評価用データセット (5種) ◦ Stanford Sentiment Treebank (SST):

    NLPer好きなやつ ◦ AgNews: ニュース記事 (Science, Sports, Bussiness, World) ◦ Evidence Inference (人手根拠有): 生体医療の科学記事 ◦ Movies (人手根拠有): 映画のレビュー ◦ MultiRC (人手根拠有): 複数の正解があるデータセット • 学習方法の詳細 ◦ 比較手法はすべてBERTベースのモデルに変更 ◦ 異なるシード値で5回実験 ▪ 強化学習ベースのモデル (e.g., Lei+ EMNLP16) は 性能の分散が大きいため
  20. 定量的評価 | 評価方法 23 • 予測性能の評価 ◦ 比較手法 ▪ テキスト全文:

    性能上限の目安。根拠を示す機構なし。 ▪ 提案手法: [CLS] のattentionを元に根拠部分を抽出 ▪ 強化学習モデルベース: [Lei+ EMNLP16] ▪ 微分可能モデルベース: [Bastings+ ACL19] ◦ 抽出する根拠の長さ ▪ テキストから抽出する根拠部分が長くなるほど性能 大 ➜ 根拠の長さを k に固定して評価実験を実施 • 性能変化: 根拠の長さ・人手による根拠の使用 ◦ 根拠の長さを変化させたときの性能評価 ◦ 人手による根拠を学習に使用したときの性能評価 ▪ 根拠を考慮した学習法 [Zhang+ EMNLP16; Strout+ BlackboxNLP19]
  21. 予測性能の評価 24 • FRESHは入力文の10-30%程度でFull textに迫る予測精度 ◦ 抽出された根拠には予測を説明できる情報が含まれている • FRESHは先行研究 [Lei+

    EMNLP16; Bastings+ ACL19] を超える予測精度 ◦ 性能の分散が小さく安定したパフォーマンス • Attentionベースの重要度スコアを用いたほうが精度は高い • 重要度スコアのtop-kを抽出するほうが精度は高い 全文 (Full text) に対する根拠部分の割合
  22. 根拠の長さを変化させたときの性能変化 25 • FRESH と [Lei+ EMNLP16] を比較 ◦ 抽出する根拠の長さに関わらずFRESHが良い性能

    ◦ 強化学習ベースの [Lei+ EMNLP16] は性能にばらつき有 ▪ 根拠の長さを長くすると提案手法と同程度 ▪ Evidence. Inv. においては性能悪化 根拠の長さ (全文に対する割合)
  23. 人手による根拠を使用したときの性能変化 26 人手による根拠の使用 Evidence InferenceとMultiRCは人手の根拠データが存在 ➜ この根拠を0%-100%使ったときの予測精度を比較 • FRESH と

    [Lei+ EMNLP16] を比較 ◦ 人手根拠を多く使えば予測性能向上に多少寄与する可能性 ◦ 先行研究のモデルにおいても人手根拠は良い影響を与える 根拠の長さ (全文に対する割合)
  24. 人手・Lei et al.・FRESHによる根拠抽出 in MultiRC 27 Query: What is the

    only difference between a reflection in a mirror and the actual image? Answer: It is exactly the same. Label: False Human: You have seen your own reflection in a mirror. The person looking back at you looks just like you. Where does that reflected person appear to be standing ? Yes, they appear to be on the other side of the mirror. That is really strange to think about, but very cool. Have you ever waved at your reflection in a mirror? The reflected image will wave back at you. Here is something to try next time you stand in front of a mirror. Wave to your reflection with your right hand. What hand do you think the reflection will wave back with? The same hand? A different hand? You will notice something interesting. The reflection waves back with the hand on the same side as you, but it is their left hand. The image in a reflection is reversed. This is just like the image of the sign above. Light rays strike flat shiny surfaces and are reflected. The reflections are reversed. Lei et al.: You have seen your own reflection in a mirror. The person looking back at you looks just like you. Where does that reflected person appear to be standing ? Yes, they appear to be on the other side of the mirror. That is really strange to think about, but very cool. Have you ever waved at your reflection in a mirror? The reflected image will wave back at you. Here is something to try next time you stand in front of a mirror. Wave to your reflection with your right hand. What hand do you think the reflection will wave back with? The same hand? A different hand? You will notice something interesting. The reflection waves back with the hand on the same side as you, but it is their left hand. The image in a reflection is reversed. This is just like the image of the sign above. Light rays strike flat shiny surfaces and are reflected. The reflections are reversed. FRESH: You have seen your own reflection in a mirror. The person looking back at you looks just like you. Where does that reflected person appear to be standing ? Yes, they appear to be on the other side of the mirror. That is really strange to think about, but very cool. Have you ever waved at your reflection in a mirror? The reflected image will wave back at you. Here is something to try next time you stand in front of a mirror. Wave to your reflection with your right hand. What hand do you think the reflection will wave back with? The same hand? A different hand? You will notice something interesting. The reflection waves back with the hand on the same side as you, but it is their left hand. The image in a reflection is reversed. This is just like the image of the sign above. Light rays strike flat shiny surfaces and are reflected. The reflections are reversed.
  25. 人手評価 | 評価視点と評価設定 29 • 人手評価の評価視点 ◦ Sufficiency ▪ FRESHによる根拠を使って人間が予測できるか

    ◦ Readability & Understandability ▪ 仮定: 人間は単語レベルのばらばらな根拠よりも 文レベルのまとまった根拠を好むのではないか ▪ 一貫しているか・理解しやすいか • 人手評価の設定 ◦ 評価データ ▪ 人手根拠が予め付与されている Movies と MultiRC ◦ 抽出した根拠に対して以下の質問をアノテータに示す: ▪ 予測: Pos or Neg (Movie), True or False (MultiRC) ▪ 確信度: 1 (not confident) ~ 4 (very confident) ▪ 可読性: 1 (very difficult) ~ 5 (very easy) ※ Evi. Inf.は専門家の知識が必要なため除外
  26. 人手評価 | 詳細 30 • 根拠の抽出方法 ◦ テストデータから100件ランダムに取得し根拠を抽出: ▪ あらかじめ付与されている人手の根拠とする

    ▪ 長さがkになるようランダムに選択して根拠とする ▪ [Lei+ EMNLP16] で得られたものを根拠とする ▪ FRESHで得られたものを根拠とする • アノテータによる人手評価の実施方法 ◦ Amazon Mechanical Turkを使用 ▪ アノテータ間のagreement • Movies: 84%, MultiRC: 89% ▪ 1HITあたり0.24ドルでアノテータに依頼 • 平均完了時間2分 (予備実験より) と 時給7.20ドルに基づいて計算している アノテータの英語力をテスト して確認しているわけではない チート対策をしているかは不明 ➜ Agreementが高いからOK?
  27. 人手評価 | 評価結果 33 • 人手根拠とモデルによる根拠が同等の精度を達成 ◦ 非連続な根拠 (non-contiguous) より、連続した根拠

    (contiguous) を人間に見せたときに予測精度が高い ➜ 人間は連続した根拠 (文) を強く好む傾向がある ◦ FRESHのベストな結果は確信度や可読性が高い ➜ FRESHは合理的な根拠 (faithful rationales) を示している Movies MultiRC
  28. 結論と所感 35 • 予測モデルを説明可能にするFRESHを提案 ◦ さまざまな重要度算出手法が適用可能 ◦ シンプルな枠組みで先行研究の複雑なモデルを凌駕 ◦ FRESHによる根拠は人間にとっても良いものであった

    • 入力テキストのどの部分が重要かを示すことが可能 ◦ 根拠として抽出したテキストがタスクを解く上で 重要であることを示せる ➜ しかしなぜその部分が根拠として選ばれたかを 解釈することはまだできていない 所感: Attentionに説明性はない (なくはない) の作者がattention を重要度と見なして使っているのは筋が通っていない気がした タイトルでは “by Construction” だが 根拠を構築している感は なかった ➜ human in the loop 的なものを想像していた
  29. 参考文献 36 • [Williams ML92] Williams, Ronald J. "Simple statistical

    gradient-following algorithms for connectionist reinforcement learning." Machine learning 8.3-4 (1992): 229-256. • [Zaidan+ NAACL07] Zaidan et al. "Using “Annotator Rationales” to Improve Machine Learning for Text Categorization." Proc. of NAACL-HLT 2007. • [Ribeiro+ KDD16] Ribeiro et al. "" Why should I trust you?" Explaining the predictions of any classifier." Proc. of KDD 2016. • [Zhang+ EMNLP16] Zhang et al. "Rationale-Augmented Convolutional Neural Networks for Text Classification." Proc. of EMNLP 2016. • [Lei+ EMNLP16] Lei et al. "Rationalizing Neural Predictions." Proc. of EMNLP 2016. • [Kim+ NIPS16] Kim, Been, Rajiv Khanna, and Oluwasanmi O. Koyejo. "Examples are not enough, learn to criticize! criticism for interpretability." Proc. of NIPS 2016. • [Doshi-Velez+ 17] Doshi-Velez et al. "Towards a rigorous science of interpretable machine learning." CoRR preprint arXiv:1702.08608 (2017). • [Lipton+ Queue18] Lipton, Zachary C. "The mythos of model interpretability." Queue 16.3 (2018): 31-57. • [Feng+ EMNLP18] Feng et al. "Pathologies of Neural Models Make Interpretations Difficult." Proc. of EMNLP 2018. • [Ehsan+ AIES18] Ehsan, Upol, et al. "Rationalization: A neural machine translation approach to generating natural language explanations." Proc. of AIES 2018.
  30. 参考文献 37 • [Strout+ BlackboxNLP19] Strout et al "Do Human

    Rationales Improve Machine Explanations?." Proc. of ACL Workshop BlackboxNLP2019. • [Ehsan+ IUI19] Ehsan et al. "Automated rationale generation: a technique for explainable AI and its effects on human perceptions." Proc. of IUI2019. • [Zhong+ 19] Zhong et al. "Fine-grained sentiment analysis with faithful attention." CoRR preprint arXiv:1908.06870 (2019). • [Rudin NatureMI19] Rudin, Cynthia. "Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead." Nature Machine Intelligence 1.5 (2019): 206-215. • [Liu+ 19] Liu et al. "Roberta: A robustly optimized bert pretraining approach." arXiv preprint arXiv:1907.11692 (2019). • [Devlin+ NAACL19] Devlin, Jacob, et al. "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding." Proc. of NAACL-HLT2019. • [Jain+ NAACL19] Jain et al. "Attention is not Explanation." Proc. of NAACL-HLT 2019. • [Lertvittayakumjorn+ EMNLP19] Lertvittayakumjorn et al. "Human-grounded Evaluations of Explanation Methods for Text Classification." Proc. of EMNLP-IJCNLP2019. • [Yu+ EMNLP19] Yu, Mo, et al. "Rethinking Cooperative Rationalization: Introspective Extraction and Complement Control." Proc. of EMNLP-IJCNLP19.
  31. 参考文献 38 • [Serrano+ ACL19] Serrano et al. "Is Attention

    Interpretable?." Proc. of ACL 2019. • [Bastings+ ACL19] Bastings et al. "Interpretable Neural Predictions with Differentiable Binary Variables." Proc. of ACL 2019. • [Wiegreffe+ EMNLP19] Wiegreffe et al. "Attention is not not Explanation." Proc. of EMNLP 2019. • [Brunner+ ICLR20] Brunner, Gino, et al. "On identifiability in transformers." Proc. of ICLR 2020. • [Pruthi+ ACL20] Pruthi et al. "Learning to deceive with attention-based explanations." Proc. of ACL 2020.