Contrastive Concept Importance: Explaining Pairwise Class Decisions Through Automatically Extracted Concept Representations
Concept-based explanations are a prevalent way to explain the decisions of complex black-box methods through semantically meaningful, human interpretable concepts. To attribute the contribution of such concepts to a model's decisions, feature attribution methods are used to quantify how strongly each concept contributes to a model output. These attributions are typically computed for a single output class and therefore answer a non-contrastive "why P?" question. In many situations, however, such as cases of misclassification, class confusion, and low- margin predictions, the more natural question to ask is "why P rather than Q?". We introduce contrastive concept importance, which attributes the logit margin between a target class and a contrast, or foil, class to concepts in an automatically extracted visual concept basis. The resulting scores are signed, indicating whether a concept supports the target over the foil or the foil over the target, and can be decomposed into target-logit and foil-logit effects. This makes it possible to distinguish globally important concepts from concepts that specifically influence a class-pair distinction, including whether their effect is shared, one-sided, or directly contrastive. We evaluate our method both qualitatively and quantitatively on a range of ImageNet class pairs. Our results show that contrastive concept importance reveals class-pair specific model behavior that is not captured by standard concept importance alone, as well as capturing information on the semantic structure of the underlying ImageNet classes.