part 1: introduction to xaiiphome.hhi.de/samek/pdf/2020_ecml_1.pdf · pointing game [zhang’16]...

58
Part 1: Introduction to XAI

Upload: others

Post on 18-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Part 1: Introduction to XAI

Page 2: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

ML Models are Black Boxes

Page 3: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

ML Models are Black Boxes

Page 4: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

ML Models are Black Boxes

1957 > 20121972

Page 5: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

What do we want to explain ?

model

prediction

data

“Explain why a certain pattern x has been classified in a certain way f(x).”

“What concept does a particular neural encode?"

“Which dimensions of the dataare most relevant for the task.”

Page 6: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Explaining Predictions

Page 7: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Brief History

Page 8: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Brief History

Page 9: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Brief History

...

2019

Page 10: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Explaining Predictions

Which XAI method to choose ?

Page 11: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Explaining Predictions

What can we do with it ?

Page 12: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Explaining Predictions

Explaining more than classifiers

Page 13: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Tutorial

Part 4- Aggregating explanations- Applications- Future topics

Part 3- Empirical comparison- Implementation- Theoretical embedding- Extensions

Part 2- Formalizing explanations- Overview of XAI techniques

Part 1- Why to explain ?- Types of XAI methods- What is a "good" explanation- Example

Page 14: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Why to explain?

Page 15: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

“Superhuman” AI SystemsGame GO Image classification

Traffic sign recognitionTexas Hold’em Poker

Computer games Drone controlJeopardyLung cancer

detectionSkin cancer

detection

IQ Test

Page 16: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Can we trust these black boxes ?

diagnosis

Page 17: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

trust &verification

improvesystem

legalaspects learn from

the system

Can we trust these black boxes ?

We need interpretability in order to:

Page 18: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

trust &verification

improvesystem

legalaspects learn from

the system

Can we trust these black boxes ?

We need interpretability in order to:“AI medical diagnosis system misclassifies patient’s disease …”

Page 19: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

trust &verification

improvesystem

legalaspects learn from

the system

Can we trust these black boxes ?

We need interpretability in order to:“right to explanation”

Retain human decision in order to assign responsibility.

avoid discrimination

Page 20: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

trust &verification

improvesystem

legalaspects learn from

the system

Can we trust these black boxes ?

We need interpretability in order to:“It's not a human move. I've never seen a human play this move.” (Fan Hui)

Page 21: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

trust &verification

improvesystem

legalaspects learn from

the system

Can we trust these black boxes ?

We need interpretability in order to:Learn about the physical / biological / chemical mechanisms. (e.g. find genes linked to cancer)

Page 22: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

trust &verification

improvesystem

legalaspects learn from

the system

Can we trust these black boxes ?

We need interpretability in order to:

Generalization error + human experience

Page 23: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Why to explain?

Interpretability as a gateway between ML and society

• Make complex models acceptable for certain applications.

• Retain human decision in order to assign responsibility.

• “Right to explanation”

Page 24: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Why to explain?

Interpretability as powerful engineering tool

• Optimize models / architectures

• Detect flaws / biases in the data

• Gain new insights about the problem

• Make sure that ML models behave “correctly”

Page 25: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Types of XAI methods

Page 26: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Explanation Methods

Perturbation-Based

Occlusion-Based (Zeiler & Fergus 14)

Meaningful Perturbations (Fong & Vedaldi 17)…

Function-Based

Sensitivity Analysis (Simonyan et al. 14)(Simple) Taylor Expansions

Gradient x Input (Shrikumar et al. 16)…

Structure-Based

LRP (Bach et al. 15)

Deep Taylor Decomposition (Montavon et al. 17)Excitation Backprop (Zhang et al. 16)

Surrogate- / Sampling-Based

LIME (Ribeiro et al. 16)

SmoothGrad (Smilkov et al. 16)…

Page 27: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Explanation Methods

Perturbation-Based Function-Based

Structure-BasedSurrogate- / Sampling-Based

1. perturb2. measure reaction3. identify relevant information

1. treat the NN as function 2. compute simple quantities on it3. construct explanation

1. locally approximate prediction using simple function2. explain simple function

1. if the decision is too complex to explain, break the function into subfunctions.2. explain each subfunction3. meaningfully aggregate

Page 28: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Explanation Methods

Perturbation-Based Function-Based

Structure-BasedSurrogate- / Sampling-Based

1. perturb2. measure reaction3. identify relevant information

1. treat the NN as function 2. compute simple quantities on it3. construct explanation

1. locally approximate prediction using simple function2. explain simple function

1. if the decision is too complex to explain, break the function into subfunctions.2. explain each subfunction3. meaningfully aggregate

Page 29: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Explanation Methods

Perturbation-Based Function-Based

Structure-BasedSurrogate- / Sampling-Based

1. perturb2. measure reaction3. identify relevant information

1. treat the NN as function 2. compute simple quantities on it3. construct explanation

1. locally approximate prediction using simple function2. explain simple function

1. if the decision is too complex to explain, break the function into subfunctions.2. explain each subfunction3. meaningfully aggregate

Page 30: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Explanation Methods

Perturbation-Based Function-Based

Structure-BasedSurrogate- / Sampling-Based

1. perturb2. measure reaction3. identify relevant information

1. treat the NN as function 2. compute simple quantities on it3. construct explanation

1. locally approximate prediction using simple function2. explain simple function

1. if the decision is too complex to explain, break the function into subfunctions.2. explain each subfunction3. meaningfully aggregate

Page 31: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Layer-wise Relevance Propagation is a general approach to explain predictions of ML models. (Bach et al.,

PLOS ONE, 2015)

Layer-wise Relevance Propagation

Page 32: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Layer-wise Relevance Propagation

Classification

cat

rooster

dog

Idea: Redistribute the evidence for class rooster back to image space.

Page 33: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Layer-wise Relevance Propagation

Theoretical Interpretation: Deep Taylor Decomposition

Page 34: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Layer-wise Relevance Propagation

Explanation

cat

rooster

dog

Page 35: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Layer-wise Relevance Propagation

Page 36: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Best Practice for LRP

Which one to choose ?

Page 37: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Evaluating Explanations

Perturbation Analysis [Bach’15, Samek’17, Arras’17, …]

Pointing Game [Zhang’16]

Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …]

Solve other Tasks [Arras’17, Arjona-Medina’18, …]

Using Ground Truth [Arras’19]

Task Specific Evaluation [Poerner’18]

Human Judgement [Ribeiro’16, Nguyen’18 …]

Page 38: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Evaluating Explanations

Using Ground Truth [Arras’19]

Page 39: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Example

Page 40: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

PASCAL VOC Challenge (2005 - 2012)

Page 41: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Unmasking Clever Hans PredictorsLeading method (Fisher-Vector / SVM Model) of PASCAL VOC challenge

Page 42: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Unmasking Clever Hans PredictorsLeading method (Fisher-Vector / SVM Model) of PASCAL VOC challenge

Page 43: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Unmasking Clever Hans Predictors

‘horse’ images in PASCAL VOC 2007

Page 44: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Unmasking Clever Hans Predictors

We need to ensure that models are right for the right reason!

Page 45: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Summary

Decisions functions of ML models are often complex, and analyzing them directly can be difficult.

Many good reasons for "explaining"

Levering the model’s structure largely simplifies the explanation problem.

Explainability can help to unmask Clever Hans predictors (and much more)

Page 46: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

References

Page 47: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

References

Page 48: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

References

Page 49: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

References

Page 50: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

References

Page 51: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

References

Page 52: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

References

Page 53: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

References

Page 54: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

References

Page 55: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

References

Page 56: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

References

Page 57: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Our new book is out

Page 58: Part 1: Introduction to XAIiphome.hhi.de/samek/pdf/2020_ECML_1.pdf · Pointing Game [Zhang’16] Using Axioms [Montavon’17, Sundararajan’17, Lundberg’17, …] Solve other Tasks

Thank you for your attention