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

Human Attention Maps for Text Classification: Do Humans and Neural Networks Focus on the Same Words?

Human Attention Maps for Text Classification: Do Humans and Neural Networks Focus on the Same Words?

人手によってアノテーションしたattention mapを元に、深層学習モデルのattention mapと比較分析を行った。

■ イベント:ACL 2020 オンラインLT会
https://nlpaper-challenge.connpass.com/event/185240/

■ 登壇概要
タイトル:Human Attention Maps for Text Classification: Do Humans and Neural Networks Focus on the Same Words?

Shunsuke KITADA

August 16, 2020
Tweet

More Decks by Shunsuke KITADA

Other Decks in Research

Transcript

  1. Human Attention Maps for Text Classification: Do Humans and Neural

    Networks Focus on the Same Words? Cansu Sen1, Thomas Hartvigsen2, Biao Yin2, Xiangnan Kong1,2, and Elke Rundensteiner1,2 1Computer Science Department , Worcester Polytechnic Institute 2Data Science Program, Worcester Polytechnic Institute ACL 2020 Long paper Presented by 北田 俊輔 法政大学大学院 理工学研究科 応用情報工学専攻 ACL 2020 オンラインLT会 hosted by #nlpaperchallenge, 8/17, 2020. ※ 本発表で紹介する図や数式は対象の論文からキャプチャしました。
  2. • 深層学習を元にした基礎・応用研究 ◦ 自然言語処理: 文字形状に着目・解釈性のあるモデル ▪ YANS2019にて 奨励賞 を受賞 ▪

    ACL2020 SRWにて共著の論文採択 • 文字形状が特徴的なアラビア語に対する新たな 分類モデルと2つの大規模データセットの提案 ◦ 医用画像処理: 悪性黒色腫自動診断システムの構築 ▪ IPSJ2019にて 学生奨励賞 受賞 ◦ 計算機広告: 広告クリエイティブの評価・作成支援 ▪ KDD2019(データマイニングの最難関国際会議)にて論文採択 • Attention可視化によるクリエイティブ作成支援 自己紹介 2 北田 俊輔 法政大学大学院 理工学研究科 D1 彌冨研 所属 @shunk031 shunk031
  3. 本論文を選択した理由 3 • 人間とニューラルネットワークは予測の際に 同様の単語に焦点を当てているのかが気になった ◦ Attention機構はモデルの予測の解釈にも使われてきた ◦ しかし解釈性を疑問視する論文が複数登場してきた •

    クラウドソーシングによる人手attentionが アノテーションされたデータセットに興味を持った ◦ 学習済みattentionに対する解釈性を直接評価可能 ◦ 人手attentionを教師にして、よりhuman-friendlyな 新しいモデル・学習法を模索可能
  4. 本研究の貢献 4 • Yelpレビューデータセットを元に Attention mapを人手でアノテーション ◦ Amazon Mechanical Turkを利用

    ◦ データ収集方法を詳細に検討し、15,000件を収集・公開 • 人手のattentionと深層学習モデルのattentionを 比較するための新たな評価指標を考案 ◦ 様々な指標で評価: 単語の重複度、語彙の分布 etc. • 人手のattentionと深層学習モデルの soft/hard attentionに対して比較・分析 ◦ 深層学習モデルのattentionは人間と似た説明を与える ▪ 文の長さが長くなるほど異なった説明を与える
  5. 関連研究 5 • Attention機構の解釈性 ◦ さまざまな先行研究で言及 [Choi+ NIPS16; Sha+ ACM-BCB17;

    Yang+ NAACL16] ◦ その解釈性を疑問視する研究の出現 [Jain+ NAACL19; Serrano+ ACL19] ◦ 一方attentionは入力単語とモデルの予測の間に 意味のある関係性があることを指摘 [Wiegreffe+ EMNLP19] • Attentionの評価 ◦ VQAタスクにおけるattentionの評価 [Das+ EMNLP16] ▪ Computer Vision (CV) 分野で頻繁に使用されるように ➜ NLP分野ではこのようなデータセットが不足 ◦ ERASER [DeYong+ ACL20] ▪ 小規模だが人手による根拠がアノテーションされている
  6. Human Attention Maps for Text Classification: Do Humans and Neural

    Networks Focus on the Same Words? ACL 2020 オンラインLT会 Hosted by #nlpaperchallenge, 8/17, 2020. 6 Preliminaries on Attention Maps
  7. 本研究で登場する Attention Map について 7 • Human Attention Map (HAM)

    ◦ 人間による2値のattention map (binary AM) • Machine Attention Map (MAM) ◦ 機械 (ニューラルネット) によるattention map ▪ Soft AM: 注意の確率分布 ▪ Hard AM: 2値のattention map 同一テキスト内の複数の異なるHAM • Consensus Attention Map (CAM) ◦ bit-wise AND なHAMを計算したもの • Super Attention Map (SAM) ◦ bit-wise OR なHAMを計算したもの w 1 w 2 w 3 ... w n w 1 w 2 w 3 ... w n w 1 w 2 w 3 ... w n w 1 w 2 w 3 ... w n AND OR
  8. Human Attention Mapの収集と分析 8 • 概要: クラウドソーシングで収集 ◦ 対象データセット: Yelp

    dataset ◦ アノテーション方法: Amazon Mechanical Turk • 予備実験1: アノテーションの質の調査 ◦ 人間さまのアノテーションの質を調査 ▪ チートやズルをするアノテータがいないかどうか等 • 予備実験2: アノテーション方法の検討 ◦ read-firstデザイン ▪ 文を先に読んでもらってから感情値を予測してもらう その後どの単語が重要かのアノテーションしてもらう ◦ free-styleデザイン ▪ 文を読む・感情値の予測・単語のアノテーションを 自由にやってもらう
  9. 本当か? Human Attention Mapの収集と分析 11 • 予備実験1: アノテーションの質の調査 ◦ 2つの小規模データセット

    (A: 50単語/文、B: 100単語/文) ▪ Yelp datasetからランダムに50文取得 ▪ あらかじめground truthとしてAMを付与 ◦ アノテーション時の数値感 ▪ 1文あたりのアノテーション時間 ➜ 44秒(50単語/文)、70秒(100単語/文) ▪ 1文あたりの選択された単語数 ➜ 9単語(50単語/文)、13単語(100単語/文) ◦ 1文あたりの単語数が増えるにつれて アノテーション時間・選択された単語数それぞれ増加する ➜ アノテータがランダムにアノテーションしているわけ ではなさそうという結論
  10. Human Attention Mapの収集と分析 12 • 予備実験2: アノテーション方法の検討 ◦ 2つのアノテーション方法 ▪

    read-first と free-style ◦ アノテーション時の数値感 ▪ アノテータ間のagreement ➜ 73% (read-first)、69% (free-style) ▪ ground truthとどれくらい似ているか ➜ 3.30 (read-first)、3.10 (free-style) ▪ cross-sentimentでノイジーなデータの量 (選択した感情値と異なる場合のスコア) ➜ 0.5 (read-first)、1.0 (free-style)
  11. Human Attention Mapの収集と分析 13 最終的なhuman attention mapの収集方法と結果 Yelp Human Attention

    Dataset (YELP-HAT) • 予備実験を元に大規模アノテーションデータセットを作成 ◦ プロジェクトページ ▪ read-first デザイン ▪ 3つの異なるアノテータによるアノテーション • 3 x 5,000レビュー = 15,000件
  12. Human Attention Maps for Text Classification: Do Humans and Neural

    Networks Focus on the Same Words? ACL 2020 オンラインLT会 Hosted by #nlpaperchallenge, 8/17, 2020. 14 Attention Map Similarity Framework
  13. 人間と機械のattention mapに対する類似度評価 15 • 単語選択の重複度 ◦ 人間AMと機械AMの2つが似ている ➜ 同様の箇所にattentionが当たっているかを評価 •

    語彙の分布 ◦ 感情の語彙的指標は品詞 (e.g., 名詞・動詞・形容詞) と 一般的に関連していることが知られている [Marimuthu+’12] ➜ 人間AMと機械AMの語彙的な類似度を評価 • 感情値の文脈依存性 ◦ ネガティブなレビューの中にあるポジティブな言葉を 考慮したり、逆もしかりな場合がある ➜ 人間AMと機械AMに対して文脈を考慮して評価
  14. 人間と機械のattention mapに対する類似度評価 16 • 単語選択の重複度 (Behavioral similarity) ◦ HAMとMAMで選択された単語重複度合いを計算 •

    語彙の分布 (Lexical similarity: LS) ◦ HAMとMAMそれぞれで選択された品詞の分布間の相関 ランダムなattention R を元に0-1となるように計算
  15. 人間と機械のattention mapに対する類似度評価 17 • 感情値の文脈依存性 (Cross-sentiment selection rate: CSSR) ◦

    肯定的な文 (Y=1) のHAMが付与されている単語と 否定的な文 (Y=0) のHAMが付与されている単語に着目 ▪ get_words() は条件に合う単語を取得 ◦ 肯定的な文に現れる否定的なな単語、 否定的な文に現れる肯定的な単語の比率を比較
  16. Human Attention Maps for Text Classification: Do Humans and Neural

    Networks Focus on the Same Words? ACL 2020 オンラインLT会 Hosted by #nlpaperchallenge, 8/17, 2020. 18 Is Machine Attention Similar to Human Attention?
  17. 機械の注意は人間の注意と似ているのか? 19 • Machine attention mapの学習 ◦ Amazon Mechanical Turkを利用

    ◦ データ収集方法を詳細に検討し、15,000件を収集・公開 • 文あたりの単語数で分けたときのモデルの精度 ◦ 単語数別に3つのデータセットを構築 ▪ Yelp-50、Yelp-100、Yelp-200 • 人間の注意と機械の注意の類似性分析 ◦ 単語選択の重複度 ◦ 語彙分布 ◦ 感情値の文脈依存性
  18. 機械の注意は人間の注意と似ているのか? 20 Machine attention mapの学習 • 使用データセット ◦ Yelp dataset

    ▪ 0〜5の評価値が付与されている • データセットの前処理と分割 ▪ negative: 1〜2、positive: 4〜5 の2値分類設定 ▪ 2値が不均衡にならないように tng:val:tst = 8:1:1 • モデル ◦ RNN (soft attention) ▪ uni-, bi-directional LSTM with additive attention ◦ Rationale mechanisms (hard attention) [Lei+ EMNLP16; Bao+ EMNLP18] ▪ ハイパーパラメータとして予測根拠となりうる 箇所の個数やその特徴表現の近さを指定可能
  19. 機械の注意は人間の注意と似ているのか? 29 語彙分布の側面での分析 • Bi-RNN Attentionが人間に近い注意を学習 ◦ 文が長くなればなるほどスコアは減少 • どの語彙カテゴリが多く選ばれているか

    ◦ 人間・機械ともに◦: 形容詞、比較級形容詞、名詞 ▪ 人間 ◦: 副詞 ▪ 機械 ◦: 固有名詞(複数形) ◦ 人間・機械ともに✘: 人称代名詞
  20. 機械の注意は人間の注意と似ているのか? 30 感情値の文脈依存性の側面での分析 • 人間アノテータ ◦ レビューが肯定的であれば、ほぼ肯定的な単語を選択 ◦ 否定的なレビューについては否定的な単語よりも 肯定的な単語のほうが多く選択

    • RNN attention ◦ 否定的な文脈での肯定的な単語の選択率が2倍以上 肯定的なレビュー文において 否定的な単語が選択される割合 CCSR p 否定的なレビュー文において 肯定的な単語が選択される割合 CCSR n
  21. Human Attention Maps for Text Classification: Do Humans and Neural

    Networks Focus on the Same Words? ACL 2020 オンラインLT会 Hosted by #nlpaperchallenge, 8/17, 2020. 31 結論と今後の展望
  22. 結論と今後の展望 32 • Yelpレビューデータセットを元に Attention mapを人手でアノテーション ◦ Amazon Mechanical Turkを利用し、15,000件を収集

    • 人手のattentionと深層学習モデルのattentionを 比較するための新たな評価指標を考案し、分析 ◦ 様々な指標で評価: 単語の重複度、語彙の分布 etc. ◦ 深層学習モデルのattentionは人間と似た説明を与える • Attentionを教師ありで学習するモデルの検討 ◦ CV分野や一部のNLPタスクでは教師として注目領域を 学習するモデルが提案 [Chen+ CVPRW17, Liu+ ACL17] ➜ NLP分野でも実現可能か? 再現実験を準備中 • shunk031/human-attention-map-for-text-classification
  23. Human Attention Maps for Text Classification: Do Humans and Neural

    Networks Focus on the Same Words? ACL 2020 オンラインLT会 Hosted by #nlpaperchallenge, 8/17, 2020. 33 Appendix
  24. 参考文献 35 • [Marimuthu+ ‘12] Marimuthu et al. "How Human

    Analyse Lexical Indicators of Sentiments-A Cognitive Analysis Using Reaction-Time." Proc. of the 2nd Workshop on Sentiment Analysis where AI meets Psychology. 2012. • [Lei+ EMNLP16] Lei et al. "Rationalizing Neural Predictions." Proc. of EMNLP 2016. • [Das+ EMNLP16] Das et al. "Human Attention in Visual Question Answering: Do Humans and Deep Networks look at the same regions?." Proc. of EMNLP 2016. • [Yang+ NAACL16] Yang et al. "Hierarchical attention networks for document classification." Proc. of NAACL-HLT 2016. • [Choi+ NIPS16] Choi et al. "Retain: An interpretable predictive model for healthcare using reverse time attention mechanism." Proc. of NIPS 2016. • [Sha+ ACM-BCB17] Sha et al. "Interpretable predictions of clinical outcomes with an attention-based recurrent neural network." Proc. of ACM-BCB 2017. • [Liu+ ACL17] Liu et al. "Exploiting argument information to improve event detection via supervised attention mechanisms." Proc. of ACL 2017. • [Chen+ CVPRW17] Chen et al. "Attending to distinctive moments: Weakly-supervised attention models for action localization in video." Proc. CVPR Workshops 2017. • [Bao+ EMNLP18] Bao et al. "Deriving Machine Attention from Human Rationales." Proc. of EMNLP 2018. • [Lipton Queue18] Lipton, Zachary C. "The mythos of model interpretability." Queue ACM 2018. • [Jain+ NAACL19] Jain et al. "Attention is not Explanation." Proc. of NAACL-HLT 2019. • [Serrano+ ACL19] Serrano et al. "Is Attention Interpretable?." Proc. of ACL 2019. • [Wiegreffe+ EMNLP19] Wiegreffe et al. "Attention is not not Explanation." Proc. of EMNLP 2019. • [DeYoung+ ACL20] DeYoung et al. "ERASER: A Benchmark to Evaluate Rationalized NLP Models." Proc. of ACL 2020.