Table of Contents
Fetching ...

Sufficient, Necessary and Complete Causal Explanations in Image Classification

David A Kelly, Hana Chockler

TL;DR

It is shown that causal explanations, in addition to being formally and rigorously defined, enjoy the same formal properties as logic-based ones, while still lending themselves to black-box algorithms and being a natural fit for image classifiers.

Abstract

Existing algorithms for explaining the outputs of image classifiers are based on a variety of approaches and produce explanations that frequently lack formal rigour. On the other hand, logic-based explanations are formally and rigorously defined but their computability relies on strict assumptions about the model that do not hold on image classifiers. In this paper, we show that causal explanations, in addition to being formally and rigorously defined, enjoy the same formal properties as logic-based ones, while still lending themselves to black-box algorithms and being a natural fit for image classifiers. We prove formal properties of causal explanations and their equivalence to logic-based explanations. We demonstrate how to subdivide an image into its sufficient and necessary components. We introduce $δ$-complete explanations, which have a minimum confidence threshold and 1-complete causal explanations, explanations that are classified with the same confidence as the original image. We implement our definitions, and our experimental results demonstrate that different models have different patterns of sufficiency, necessity, and completeness. Our algorithms are efficiently computable, taking on average 6s per image on a ResNet model to compute all types of explanations, and are totally black-box, needing no knowledge of the model, no access to model internals, no access to gradient, nor requiring any properties, such as monotonicity, of the model.

Sufficient, Necessary and Complete Causal Explanations in Image Classification

TL;DR

It is shown that causal explanations, in addition to being formally and rigorously defined, enjoy the same formal properties as logic-based ones, while still lending themselves to black-box algorithms and being a natural fit for image classifiers.

Abstract

Existing algorithms for explaining the outputs of image classifiers are based on a variety of approaches and produce explanations that frequently lack formal rigour. On the other hand, logic-based explanations are formally and rigorously defined but their computability relies on strict assumptions about the model that do not hold on image classifiers. In this paper, we show that causal explanations, in addition to being formally and rigorously defined, enjoy the same formal properties as logic-based ones, while still lending themselves to black-box algorithms and being a natural fit for image classifiers. We prove formal properties of causal explanations and their equivalence to logic-based explanations. We demonstrate how to subdivide an image into its sufficient and necessary components. We introduce -complete explanations, which have a minimum confidence threshold and 1-complete causal explanations, explanations that are classified with the same confidence as the original image. We implement our definitions, and our experimental results demonstrate that different models have different patterns of sufficiency, necessity, and completeness. Our algorithms are efficiently computable, taking on average 6s per image on a ResNet model to compute all types of explanations, and are totally black-box, needing no knowledge of the model, no access to model internals, no access to gradient, nor requiring any properties, such as monotonicity, of the model.

Paper Structure

This paper contains 20 sections, 19 theorems, 10 equations, 15 figures, 2 algorithms.

Key Result

Lemma 4.1

MSCE is equivalent to def:EX in our setting.

Figures (15)

  • Figure 1: $4$ types of explanation for "ladybug" with $0.46$ confidence on a ResNet50. \ref{['subfig:lady_suff']} shows a subset of pixels sufficient to obtain class "ladybug".\ref{['subfig:lady_21']} shows that adding just $10$ more pixels to \ref{['subfig:lady_suff']} changes the classification. In this paper we introduce 'complete' explanations, which are subsets of pixels that are sufficient and necessary for "ladybug", and removing these pixels results in "leaf beetle" (\ref{['subfig:lady_con']}), and $1$-complete explanations (\ref{['subfig:complete']}), which are subsets of pixels which are complete and have the original confidence of $0.46$.
  • Figure 2: A 'washbasin' partitioned into sufficient, $\delta$-complete, and adjustment pixel sets. $1$-completeness required $82\%$ of the image for a ResNet50 model. The sufficient set, \ref{['fig:sink_suff']}, is very small, with low confidence. The $\delta$-complete explanation (\ref{['fig:sink_con']}) has higher confidence than the original image. Masking out \ref{['fig:sink_con']} to get \ref{['fig:sink_inverse']}, ResNet50 gives us a classification of 'toilet seat'. Interestingly, the adjustment pixels (\ref{['fig:sink_com']}) reduce model confidence from $0.75$ to $0.6$, even though the they are also classified as 'wash basin'.
  • Figure 3: A depth-$2$ binary causal model $M_{\mathcal{N},x}$ for an image $x$ and a classifier $\mathcal{N}$. $\vec{v}$ is the vector of values of $\vec{V}$. The output $O \in \{0, 1\}$ indicates whether the classification of the Hadamard product of the matrix of pixels of $x$ and $\vec{v}$ is the same as the original classification.
  • Figure 4: The summary figure of explanation types
  • Figure 5: This image has the most extreme contrast classification for MobileNet on a PascalVOC image. MobileNet incorrectly classifies this as ox with a relatively low confidence (\ref{['fig:ox_suff']}). The $\delta$-complete explanation, which has a higher confidence than \ref{['fig:ox']} has the inverse classification of moped (confidence $0.133$). Finally, the adjustment pixels are classified as 'picket fence'. The unusual behavior may be a result of the original misclassification.
  • ...and 10 more figures

Theorems & Definitions (34)

  • Definition 1: Actual cause
  • Definition 2: Explanation
  • Definition 3: Single-Context Sufficient Explanation CKKS24
  • Definition 4
  • Definition 5
  • Definition 6
  • Definition 7: Complete Explanation
  • Definition 8: $\delta$-confident Explanation
  • Lemma 4.1
  • Lemma 4.2
  • ...and 24 more