Instance-wise or Class-wise? A Tale of Neighbor Shapley for Concept-based Explanation

Jiahui Li, Kun Kuang, Lin Li, Long Chen, Songyang Zhang, Jian Shao, Jun Xiao · DOI

Abstract

Deep neural networks (DNNs) have achieved state-of-the-art performance across diverse domains, often surpassing human accuracy. However, their "black-box" nature remains a significant barrier to adoption in high-stakes fields like medical diagnosis, financial analysis, and criminal justice. To build trust, it is essential to extract the evidence behind a model's prediction. This paper introduces CONE-SHAP (COncept-based NEighbor Shapley), a framework that bridges the gap between instance-specific and class-wide explanations by leveraging human-understandable concepts and a novel approximation of Shapley values.

Introduction

Interpretability methods in deep learning generally fall into two categories: feature-based and concept-based. Feature-based methods, such as LIME or pixel-level SHAP, highlight specific input features (e.g., pixels) that contribute to a prediction. While useful for individual instances, these pixel-level maps are often noisy and do not align with human reasoning. Conversely, concept-based methods like ACE identify high-level semantic ideas (e.g., "stripes" for a zebra) but typically operate only at the class level, failing to explain why a specific image was classified a certain way. Furthermore, existing methods often treat concepts as independent, ignoring the complex interactions between them.

CONE-SHAP addresses these limitations by providing concept-based explanations at both the instance and class levels. By introducing the "Neighbor Shapley" approach, the framework accounts for physical and semantic interactions between concepts without the exponential computational cost typically associated with game-theoretic explanations.

The CONE-SHAP Framework

The CONE-SHAP method consists of three primary phases designed to move from raw pixels to structured, interactive concept explanations.

1. Concept Discovery

Rather than requiring manual human labeling, CONE-SHAP automates concept discovery. The process begins with multi-resolution super-pixel segmentation, breaking images into distinct segments. These segments are then passed through the neural network to obtain latent representations, which are clustered to identify recurring "concepts" across the dataset. This ensures that the concepts are grounded in the model's own internal logic.

2. Neighbor Shapley: The Core Innovation

Shapley values are the gold standard for fair credit assignment in cooperative game theory, but calculating them for $n$ segments requires $2^n$ computations—a feat that is mathematically impossible for complex images.

The authors overcome this by proposing Neighbor Shapley. They hypothesize that a segment’s contribution is primarily driven by its interactions with its "neighbors." Neighbors are defined in two ways:

  • Physical Neighbors: Segments that are spatially adjacent in the image.
  • Semantic Neighbors: Segments that belong to the same concept cluster, even if they are not touching.

By sampling coalitions only from these neighbors, the computational complexity is reduced to polynomial time, making it feasible to calculate interaction-aware importance scores for every concept in an image.

3. Dual Explanation

CONE-SHAP provides a dual-lens view of model behavior:

  • Instance-wise: It generates concept-based saliency maps for individual images, showing which specific parts (e.g., the "wing" of a specific bird) drove the prediction.
  • Class-wise: By averaging CONE-SHAP values across an entire category, it identifies the global features the model relies on for that class (e.g., "beaks" and "feathers" for the class "bird").

Experimental Evaluation

Datasets and Models

The authors evaluated CONE-SHAP using the ImageNet dataset. They interpreted two prominent architectures: Densenet-121 for instance-level analysis and Inception-V3 for class-level analysis.

New Evaluation Metrics

To rigorously assess concept quality, the paper introduces three new criteria:

  1. Coherency: Measures the semantic similarity of segments within a discovered concept to the original inputs.
  2. Complexity: Evaluates how distinct and non-redundant the concept scores are.
  3. Faithfulness: Measures the correlation between the removal of a concept and the subsequent drop in model accuracy.

Key Results

CONE-SHAP significantly outperformed the baseline ACE (Automated Concept Explanations) method across multiple benchmarks:

  • Class-wise Accuracy: Using the Smallest Destroying Concepts (SDC) metric, removing the top-1 concept identified by CONE-SHAP dropped model accuracy to 34.15%, whereas removing the top-1 concept from ACE only dropped accuracy to 60.97%. This indicates that CONE-SHAP identifies much more critical features.
  • Metric Dominance: CONE-SHAP achieved a Coherency score of 0.9299 (vs. ACE's 0.4090) and a Faithfulness score of 0.9542 (vs. ACE's 0.4516).
  • Ablation Studies: Experiments confirmed that both physical and semantic neighbor definitions are essential; removing either led to a measurable decrease in explanation accuracy.

Discussion and Insights

A key insight from the research is that context dictates importance. While a concept like "wheel" is generally important for the class "jeep," its importance for a specific instance might change if the wheel is obscured. CONE-SHAP captures this dynamic shift, whereas traditional class-level methods cannot. Furthermore, the transition from noisy pixel maps to cohesive concept maps makes the model's reasoning significantly more accessible to human users.

Conclusion and Future Work

CONE-SHAP represents a significant step forward in making deep learning models interpretable and trustworthy. By combining the theoretical rigor of Shapley values with the practical efficiency of neighbor-based sampling, it provides a scalable way to understand model decisions through a human lens.

While currently focused on computer vision, the framework's logic is extensible. Future work may involve applying CONE-SHAP to natural language processing—where "segments" could represent phrases or sub-sentences—and refining the initial segmentation processes to further improve concept discovery.

Summary updated

BibTeX
@inproceedings{li2021instance,
  author = {Jiahui Li and Kun Kuang and Lin Li and Long Chen and Songyang Zhang and Jian Shao and Jun Xiao},
  title = {{Instance-wise or Class-wise? A Tale of Neighbor Shapley for Concept-based Explanation}},
  booktitle = {ACM Multimedia},
  year = {2021},
  doi = {10.1145/3474085.3475337},
}
Figure