機械学習の社会実装では、予測精度が高くても、機械学習がブラックボックであるために使うことができないということがよく起きます。
このスライドでは機械学習が不得意な予測結果の根拠を示すために考案されたLIMEの論文を解説します。
Ribeiro, Marco Tulio, Sameer Singh, and Carlos Guestrin. "" Why should i trust you?" Explaining the predictions of any classifier." Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining. 2016.
本スライドは、弊社の梅本により弊社内の技術勉強会で使用されたものです。
近年注目を集めるアーキテクチャーである「Transformer」の解説スライドとなっております。
"Arithmer Seminar" is weekly held, where professionals from within and outside our company give lectures on their respective expertise.
The slides are made by the lecturer from outside our company, and shared here with his/her permission.
Arithmer株式会社は東京大学大学院数理科学研究科発の数学の会社です。私達は現代数学を応用して、様々な分野のソリューションに、新しい高度AIシステムを導入しています。AIをいかに上手に使って仕事を効率化するか、そして人々の役に立つ結果を生み出すのか、それを考えるのが私たちの仕事です。
Arithmer began at the University of Tokyo Graduate School of Mathematical Sciences. Today, our research of modern mathematics and AI systems has the capability of providing solutions when dealing with tough complex issues. At Arithmer we believe it is our job to realize the functions of AI through improving work efficiency and producing more useful results for society.
機械学習の社会実装では、予測精度が高くても、機械学習がブラックボックであるために使うことができないということがよく起きます。
このスライドでは機械学習が不得意な予測結果の根拠を示すために考案されたLIMEの論文を解説します。
Ribeiro, Marco Tulio, Sameer Singh, and Carlos Guestrin. "" Why should i trust you?" Explaining the predictions of any classifier." Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining. 2016.
本スライドは、弊社の梅本により弊社内の技術勉強会で使用されたものです。
近年注目を集めるアーキテクチャーである「Transformer」の解説スライドとなっております。
"Arithmer Seminar" is weekly held, where professionals from within and outside our company give lectures on their respective expertise.
The slides are made by the lecturer from outside our company, and shared here with his/her permission.
Arithmer株式会社は東京大学大学院数理科学研究科発の数学の会社です。私達は現代数学を応用して、様々な分野のソリューションに、新しい高度AIシステムを導入しています。AIをいかに上手に使って仕事を効率化するか、そして人々の役に立つ結果を生み出すのか、それを考えるのが私たちの仕事です。
Arithmer began at the University of Tokyo Graduate School of Mathematical Sciences. Today, our research of modern mathematics and AI systems has the capability of providing solutions when dealing with tough complex issues. At Arithmer we believe it is our job to realize the functions of AI through improving work efficiency and producing more useful results for society.
技術動向の調査として、ICML Workshop Uncertainty & Robustness in Deep Learningの中で、面白そうなタイトルを中心に読んで各論文を4スライドでまとめました。
最新版:https://speakerdeck.com/masatoto/icml-2021-workshop-shen-ceng-xue-xi-falsebu-que-shi-xing-nituite-e0debbd2-62a7-4922-a809-cb07c5da2d08(文章を修正しました。)
2. ⾃⼰紹介
n 太⽥ 真⼈
n ISIDでデータサイエンティストをしています。
n お仕事は、AI製品開発、データ分析案件、研究など
n 最近は、⼈とAIの協調など、HCIに興味があります。
n この資料は、予測の反実仮想説明のサーベイです。
n 基礎的な内容とテーブル、画像、テキストに対する反実仮想説明を紹介しています。
n サーベイ論⽂をまとめたわけではなく、⾃分で検索して調べたため、⾼い網羅性があるとは⾔えません。
n 各スライドの末尾に引⽤論⽂名と国際会議名を載せました。
はじめに
19. n対照的説明(Contrastive explanation )
Øwhy P, rather than Q? 「なぜQではなくPなのだろう。」を説明することを⽬指す。
Ø会計⼠でなく、なぜ⻭医者かと、⾔われると(2)の⻩⾊の所属機関が理由
Ø結果、ある事象が他の事象と対照的になぜ起こったのかが明らかになる。
n半事実説明(Semi-Factual Explanation)
ØEven if 「たとえ、何かをしても結果は変わらないだろう。」を出⼒することを⽬指す。
Ø半事実説明は、分類結果を変えないギリギリのサンプルを提⽰する。
関連する⽤語
反実仮想
事実
半事実
[EMNLP21] Contrastive Explanations for Model Interpretability
[AAAI21] On Generating Plausible Counterfactual and Semi-Factual Explanations for Deep Learning 19
30. n 先のように、画像上ではどうしても摂動がノイズになり、説明にならない。
n そこで摂動対象を概念活性化ベクトル [Kim 18] に変えたConceptual Counterfactual Explanations(CCE)を提案
n 説明⽅法は図c)のように、間違えた予測を正しい予測に変えるために必要な概念ベクトルが緑で⽰される。
n 図c)はシマウマなのにストライプがないために別クラスになっているとわかる。
概念レベルの反実仮想例に向けて
[ICML 22] Meaningfully Debugging Model Mistakes using Conceptual Counterfactual Explanations 30
35. n テーブルや画像のような最適化による反実仮想説明を求めない。
n ⼈間が、⼿動でテキストを書き換えたり、摂動関数を定義し、反実仮想サンプルを作成する。
n 反実仮想サンプルを推論し、結果から反実仮想説明を求める。
n 紹介するPolyjuiceは⽣成モデルGPT-2を頼り、反実仮想サンプルの作成を効率化する。
n ⼿動でテキストを書き換え
Ø[ACL 20] Beyond accuracy: Behavioral testing of NLP models with CheckList.
Ø[ICLR 20] Learning the difference that makes A difference with counterfactually-augmented data.
n 摂動関数を定義
Ø[ACL 20] Semantically equivalent adversarial rules for debugging NLP models
n 制御可能な⽣成モデルの利⽤
Ø[ACL 21] Polyjuice: Generating Counterfactuals for Explaining, Evaluating, and Improving Models
テキストの反実仮想説明の現状
35
36. n NLPの反実仮想サンプルは⼈かAIが⽣成している。
n 期待するクラスに予測を変えるにはどうすれば良いのか。
n NLPでは、yʻに対するxʼを求める逆問題が、⽣成x1,…,xn を推論し、yʼになるサンプルを探す問題に変わって
いる。
n ⽣成の条件づけが、⼈が解釈するのに直感的なものかがポイントになる。
テキストの反実仮想は説明性として機能しているのか
Why x’ ? Because
f
⼈が条件を数ある中から決める
⼈かAIにより⽣成
f
,
は対応する を反実仮想説明とする。
Why x’ ? Because
の中に があれば、
従来の⽅法 テキストの場合
36
37. n 下図は、意味的に違和感のない敵対的⽂章を変換ルールで作成する。
Ø 単語の⾔い換え
n この⽅法は複数のルールから共通する要因を⼈が調べ、予測モデルの傾向に気づかせる。
n 単語を省略形にすると間違う⽐率が⾼いから、このモデルは省略形に弱いと⼈に想起させる。
既存⼿法︓意味的に同じな敵対的⽂章による説明
[ACL20] Semantically equivalent adversarial rules for debugging NLP models
変換ルール
G(z)
z
37
39. 既存⼿法︓意図に沿って⼈が反実仮想サンプルを作成
[ACL20] Beyond accuracy: Behavioral testing of NLP models with CheckList.
n ロバスト性を確認するために要件ごとにテキストを⼈が編集し、テス
ト形式で調査しています。
A 単体テスト
Ø 正常動作を確認
B 不変性テスト((Invariance test )
Ø 現実的にラベルが変わらない範囲でワードを変えて予測が不変か確
認
C ラベル変化テスト (A Directional Expectation test)
Ø 元⽂と類似するがラベルが変化する⽂章で正しく予測ラベルが変化
するか確認
G(z)
z
39
41. n 元⽂章の[BLANK]部分に対して、否定的な⽂章を⽣成してみた。
1. # the base sentence
2. text = "It's sunny today, so we'll play outside."
3. b_text = "It's sunny today, so we [BLANK] outside.”
4. pj = Polyjuice(model_path="uw-hai/polyjuice", is_cuda=True)
5. perturbations = pj.perturb(
6. orig_sent=text, #オリジナル⽂章
7. blanked_sent=b_text, #ブランク付き⽂章
8. ctrl_code=“negation”, #制御ルール
9. perplex_thred=5, #⽣成⽂章の質の閾値
10. num_perturbations=3, #⽣成⽂の返り値の最⼤数
11. )
12.print(perturbations)
[Out]: ["It's sunny today, so we don't need to play outside.", "It's sunny today, so we don't have to go outside."]
やってみた
41
42. n 制御ルールを与えずに⽣成させることも可能。
Text =“週末に台⾵が来るから、どこにも出かけられない。”
A typhoon is coming this weekend, so I can't go out anywhere.
⽣成結果
n "今週末は台⾵が来るから、海に⾏けないよ”
n "今週末は台⾵が来るから、どこにも出かけられないよ”
n "今週末は台⾵が来るから、仕事に⾏けないよ"
n "I have a typhoon this weekend, so I can't go to the beach.”
n "The typhoon is coming this weekend, so I can't go out anywhere.”
n "I have a typhoon this weekend, so I can't go to work."
別の⽣成例
42
46. n 反実仮想説明の概要と求められることを紹介しました。
n テーブル、画像、テキストに対して、簡単な実装例と最新論⽂の紹介をしました。
n 画像は、概念レベル(背景雪、⽬の⾊、⽿の形)で反事実を得ようとしてます。
n テキストは、条件をもとに⽂章を多数⽣成し、テストケースで反事実を得ようとしています。
n 画像とテキストに共通して、⼈間のドメイン知識を解釈⼿法に組み込もうとしています。
Ø 画像の場合、概念をベクトル化する際に、概念の選別は⼈が決めます。
Ø テキストの場合、⽣成させる条件を⼈が決めます。
n 業務知識のある⼈たちが⾃分の意思決定する要因を洗い出し、それらを解釈⼿法に組み込むことで信頼のある
AIに近づくと考えます。
まとめ
46