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

LIME & SHAP
-機械学習モデルによる予測結果の説明性-

hightensan
September 10, 2018
11k

LIME & SHAP
-機械学習モデルによる予測結果の説明性-

2018-05-19 @ PyCon mini Osaka 2018

hightensan

September 10, 2018
Tweet

Transcript

  1. ## 背景 機械学習モデルの複雑化・ブラックボックス化 – Deep Learning, アンサンブル学習 – モデル⾃⾝や出⼒の結果が⼈間にとって解釈困難 予測はできたけど,信頼できるの?

    – 何を根拠に判断を⾏っているのかよくわからん – “The problem is that a single metric, such as classification accuracy, is an incomplete description of most real-world tasks.”1 ※ https://arxiv.org/abs/1702.08608
  2. ## 背景 機械学習モデルの説明性に関する要求の⾼まり – ICML 2017 Tutorial “Interpretable Machine Learning”

    – Workshops ICML@2018, 2017, 2016 NIPS@2017, 2016 – 総務省 AI開発ガイドライン案 ・透明性の原則 ・アカウンタビリティの原則 ※ http://people.csail.mit.edu/beenkim/papers/BeenK_FinaleDV_ICML2017_tutorial.pdf 年 説明性に関する論⽂の数 ※
  3. ## 説明性(Interpretability) Interpretability is the degree to which a human

    can understand the cause of a decision.1 複雑な分類器の判断基準を, ⼈間にも解釈可能(interpretable)になるように提⽰2 1. https://christophm.github.io/interpretable-ml-book/interpretability.html 2. https://www.slideshare.net/shima__shima/kdd2016
  4. ## 説明性(Interpretability) Interpretability is the degree to which a human

    can understand the cause of a decision.1 複雑な分類器の判断基準を, ⼈間にも解釈可能(interpretable)になるように提⽰2 1. https://christophm.github.io/interpretable-ml-book/interpretability.html 2. https://www.slideshare.net/shima__shima/kdd2016 ⼊⼒ 出⼒ 根拠を⽰す表現 (グラフなど)
  5. ## 説明性に関する⽅向性 # 局所的な説明 特定の⼊⼒に対する予測の根拠を提⽰ # ⼤域的な説明 複雑なモデルを可読性の⾼い解釈可能なモデルで表現 # 説明可能なモデルの設計

    最初から可読性の⾼い解釈可能なモデルを設計 (# 深層学習モデルの説明) 深層学習モデル,特に画像認識モデルの説明 ※ https://www.ai-gakkai.or.jp/my-bookmark_vol33-no3/ 仕組みの理解 挙動の理解
  6. ## 説明性に関する⽅向性 # 局所的な説明 特定の⼊⼒に対する予測の根拠を提⽰ # ⼤域的な説明 複雑なモデルを可読性の⾼い解釈可能なモデルで表現 # 説明可能なモデルの設計

    最初から可読性の⾼い解釈可能なモデルを設計 (# 深層学習モデルの説明) 深層学習モデル,特に画像認識モデルの説明 ※ https://www.ai-gakkai.or.jp/my-bookmark_vol33-no3/ 仕組みの理解 挙動の理解 挙動の理解 どんな⼊⼒をしたらどんな出⼒がでるかを説明 LIME と SHAP
  7. ## LIME LIME(Local Interpretable Model-agnostic Explainations) – KDDʼ16 論⽂ “Why

    should I trust You?:Explaining the predictions of any classifier” – 個別のデータに対する予測結果に対し, 特徴量(テキストや画像の⼀部など)をハイライトして説明 ※ https://arxiv.org/pdf/1602.04938.pdf
  8. ## Examples テキスト分類(TF-IDF値による atheism/christian 分類) – Random Forest Classifier (with

    500 trees) – Accuracy : 92.4% ヘッダ情報を有力な特徴と判断 本当に信頼に足りうる? ※ https://www.oreilly.com/learning/introduction-to-local-interpretable-model-agnostic-explanations-lime
  9. ## 数学的背景 説明したいデータに対して最適化問題を解く – :解釈可能なモデルの集合 – :説明したい分類器 – :の中のモデルで説明⽤の分類器 –

    & :説明したいデータとサンプリングデータとの類似度 – ℒ:損失関数 = ∑ & , ( − ())0 – Ω():の複雑度 “データの周辺でのとの差分”+”の複雑さ”を最⼩にするが解 ※ https://arxiv.org/pdf/1602.04938.pdf
  10. ## SHAP SHAP(SHapley Additive exPlanations) – NIPSʼ17 論⽂ “A Unified

    Approach to Interpreting Model Predictions” – LIMEを含むいくつかの局所的な説明法を ゲーム理論の枠組みのもとで統⼀的に記述 説明モデルが満たすべき性質を定式化,指標化 → SHAP Value ※ https://github.com/slundberg/shap
  11. ## SHAPのアイデア 説明モデルを統⼀的に定義 – :説明したい複雑な分類器 – :説明⽤のシンプルな分類器 – :ある1つの⼊⼒データ –

    ′:単純化した⼊⼒データ → = ℎ&(′) 説明モデル ′ ≈ 8のときに, g(8) ≈ (ℎ& (′))となるように学習
  12. ## SHAPのアイデア 説明モデルを統⼀的に定義 – :説明したい複雑な分類器 – :説明⽤のシンプルな分類器 – :ある1つの⼊⼒データ –

    ′:単純化した⼊⼒データ → = ℎ&(′) Additive feature attribution methods 説明モデル ′ ≈ 8のときに, g(8) ≈ (ℎ& (′))となるように学習 説明⽤のシンプルなモデルは 単純化した⼊⼒数個の貢献の加法で表現可能
  13. ## SHAPのアイデア 説明モデルを統⼀的に定義 – :説明したい複雑な分類器 – :説明⽤のシンプルな分類器 – :ある1つの⼊⼒データ –

    ′:単純化した⼊⼒データ → = ℎ&(′) Additive feature attribution methods 説明モデル ′ ≈ 8のときに, (8) ≈ ( (′))となるように学習 説明⽤のシンプルなモデルは 単純化した⼊⼒数個の貢献の加法で表現可能 LIMEも含む
  14. ## References LIME : 著者実装 https://github.com/marcotcr/lime SHAP : 著者実装 https://github.com/slundberg/shap

    KDD2016勉強会 資料 https://www.slideshare.net/shima__shima/kdd2016 機械学習における解釈性(Interpretability in Machine Learning) https://www.ai-gakkai.or.jp/my-bookmark_vol33-no3/ ディープラーニングの判断根拠を理解する⼿法 https://qiita.com/icoxfog417/items/8689f943fd1225e24358 ICML 2017 Tutorial http://people.csail.mit.edu/beenkim/papers/BeenK_FinaleDV_ICML2017_tutorial.pdf Interpretable Machine Learning https://christophm.github.io/interpretable-ml-book/