Source-linked AI summary

A Holistic Approach to Unifying Automatic Concept Extraction and Concept Importance Estimation

Thomas Fel, Victor Boutin, Mazda Moayeri, Rémi Cadène, Louis Bethune, Léo andéol, Mathieu Chalvidal, Thomas Serre

arXiv:2306.07304v2cs.LGcs.AI

TL;DR

Concept-based explainability lacks a well-established formalization of concepts, limiting the development of comparison metrics. This paper unifies concept extraction and importance scoring in a theoretical framework, with evaluation metrics and theoretical analyses. It also uses local concept importance to examine class-level strategies and reports limitations of particular extraction methods.

  • Problem

    Concept-based methods can provide human-interpretable explanations, but informal concept definitions have hindered appropriate metrics for comparing them.

    Source: §1 · p. 2
  • Method

    The framework formulates concept extraction as dictionary learning and importance scoring as attribution in concept space.

    Source: §1 · p. 2, §3.2 · p. 7
  • Results

    The framework supports new concept-quality metrics and theoretical optimality guarantees, and the paper’s analyses justify using the ANN’s last layer for concept-based explanations.

    Source: §1 · p. 2, §4 · p. 9
  • Takeaways & Limitations

    Local concept importance can be examined to understand global class-level importance and the model’s main visual strategies.

    Source: §1 · p. 2, §4 · p. 9

    ACE restricts each activation representation to a single concept, so it cannot capture compositions of concepts.

    Source: §3.1 · p. 4

Abstract

from arXiv · show

In recent years, concept-based approaches have emerged as some of the most promising explainability methods to help us interpret the decisions of Artificial Neural Networks (ANNs). These methods seek to discover intelligible visual 'concepts' buried within the complex patterns of ANN activations in two key steps: (1) concept extraction followed by (2) importance estimation. While these two steps are shared across methods, they all differ in their specific implementations. Here, we introduce a unifying theoretical framework that comprehensively defines and clarifies these two steps. This framework offers several advantages as it allows us: (i) to propose new evaluation metrics for comparing different concept extraction approaches; (ii) to leverage modern attribution methods and evaluation metrics to extend and systematically evaluate state-of-the-art concept-based approaches and importance estimation techniques; (iii) to derive theoretical guarantees regarding the optimality of such methods. We further leverage our framework to try to tackle a crucial question in explainability: how to efficiently identify clusters of data points that are classified based on a similar shared strategy. To illustrate these findings and to highlight the main strategies of a model, we introduce a visual representation called the strategic cluster graph. Finally, we present https://serre-lab.github.io/Lens, a dedicated website that offers a complete compilation of these visualizations for all classes of the ImageNet dataset.

1 Introduction

Attribution heatmaps indicate where input features matter, but useful explanations also need to convey semantic content. The paper formalizes concept-based methods around concept extraction and importance scoring, and introduces strategic cluster graphs to visualize model strategies.

1 Introduction

  • Attribution heatmaps locate important input features, while meaningful explanations also need to convey their semantic content.The cited user-study evidence is presented as showing limitations of attribution methods for meaningful explanations [16] [17] [18] [19] [21] [22] [23] [24] [25].Source: §1 · p. 1
  • Concept-based methods seek high-level, human-interpretable concepts, but their early-stage development and informal concept definitions have hindered appropriate comparison metrics.Prior desiderata include meaningfulness, coherence, and importance.Source: §1 · p. 2
  • The framework treats concept extraction as dictionary learning and concept importance scoring as attribution in concept space.It unifies the two steps shared by concept-based explainability methods.Source: §1 · p. 2
  • The paper proposes evaluation metrics for extracted concepts, seven concept-importance methods with optimality guarantees, and adapted faithfulness benchmarks.It reports that Integrated Gradients, Gradient Input, RISE, and Occlusion achieve the highest theoretical scores for three faithfulness metrics with penultimate-layer decomposition.Source: §1 · p. 2
  • Strategic cluster graphs represent the main visual strategies a model uses across a class, including espresso’s coffee-in-cup strategy as predominant.The figure also lists strategies for zucchini, including garden, flower, sliced, spotted-skin, and stacked examples.Source: Figure 1 · p. 2, §1 · p. 2

2 Related Work

Related work spans manually defined concepts with TCAV scoring, unsupervised concept extraction, factorization-based approaches, and methods that treat subspaces as concepts.

2 Related Work

  • Kim et al. [26] define concepts as Concept Activation Vectors (CAVs) learned from concept examples and random counterexamples, then use TCAV directional derivatives to score category-level contributions.The approach requires substantial human effort to build a relevant concept-image database.Source: §2 · p. 3
  • ACE [27] automates CAV extraction using centroids of activations from multi-scale image segments, but segments may bias explanations [34] [35].ACE uses TCAV to rank concepts by importance for an object category.Source: §2 · p. 3
  • ICE [28] applies NMF to feature maps for localized concepts and uses TCAV scores, whereas CRAFT [29] applies NMF after global pooling and uses Sobol indices for global importance.SVD was also proposed for concept discovery [28], and explores entire subspaces rather than one-dimensional concepts.Source: §2 · p. 3

3 A Unifying perspective

The framework treats concept-based explanation as two linked steps: extracting concepts and scoring their importance. It recasts extraction as dictionary learning and importance scoring as attribution in concept space, then uses these views to evaluate methods and derive guarantees.

3 A Unifying perspective

  • Concept-based methods extract concepts from class activations and assign global importance scores; the framework casts these steps as dictionary learning and attribution in concept space.The formulation is intended to clarify the methods and enable theoretical analysis and evaluation with metrics from other fields.Source: §3 · p. 3

3.1 Concept Extraction

  • Dictionary learning represents activations as A ≈ UVT, with V as the concept basis and U as activation coordinates; methods impose different constraints on these matrices.ACE uses K-Means, PCA constrains V to be orthogonal, and NMF constrains U and V to be nonnegative.Source: §3.1 · p. 4
  • PCA leads reconstruction, K-Means sparsity and OOD scores, while NMF balances tested metrics; K-Means and NMF are most stable, whereas PCA is highly unstable.K-Means’ centroid reconstructions stay near in-distribution instances but collapse the distribution; PCA can reconstruct negative, out-of-distribution activations.Source: §3.1 · pp. 5–6
  • Across ResNet50 blocks B2–B5, concept extraction metrics favor the last layer.The figure compares PCA, NMF, and K-Means across layers; the authors report that the trend favors the last layer for decomposition.Source: §3.1 · p. 6, Figure 3 · p. 6

3.2 Concept importance

  • Concept Attribution methods generalize attribution scores to concept space, assigning importance by how changes in concept coordinates affect the model output.The authors derive seven new CATs from existing attribution methods and adapt C-Deletion, C-Insertion, and C-µFidelity to assess their faithfulness.Source: §3.2 · p. 7
  • In the penultimate layer, Gradient Input, Integrated Gradients, Occlusion, and RISE are optimal for C-Deletion, C-Insertion, and C-µFidelity.The authors’ guarantees rely on the penultimate-layer setting.Source: §3.2 · p. 8

3.1 Concept Extraction

  • NMF, especially on the penultimate layer, offers the paper’s most appealing trade-off across tested extraction metrics compared with PCA and K-Means.The authors adopt NMF for subsequent concept extraction.Source: §3.1 · p. 6, §3.2 · p. 8

3.3 Unveiling main strategies

  • The strategic cluster graph maps samples by concept-importance vectors and colors them by their top concept, revealing shared classification strategies and examples of misclassification.For lemons, peel texture is the most prevalent concept in 90% of samples; the “pile of round, yellow objects” concept has 40% mean accuracy, and shared peel texture or wedge shape explains cited errors.Source: §3.3 · p. 9

4 Discussion

The discussion presents the framework as a way to analyze concept extraction, importance, and class-level classification strategies. Strategic cluster graphs illustrate those strategies, including patterns behind misclassifications.

  • The framework connects local concept importance to class-level strategies, which the strategic cluster graph visualizes across samples and uses to inspect failure cases.The paper describes the graph as revealing strategy prevalence and reliability.Source: §4 · pp. 9–10
  • In the lemon example, peel texture is the predominant strategy among four concepts, and the graph links misclassified images to their corresponding strategies.The other concepts are lemon wedge shape, piles of round yellow objects, and green objects hanging on a tree.Source: Figure 6 · p. 10
  • The authors argue that dictionary learning has potential benefits for automatic concept extraction and hope the work prompts further XAI advances.Source: §4 · p. 10

A Attribution methods for Concepts

The section recasts attribution methods as ways to score the importance of concepts rather than input features. It outlines black-box, gradient-based, and occlusion approaches for mapping concept coefficients to per-concept scores.

  • Each attribution method maps concept coefficients u to per-concept importance scores φ(u), with higher scores marking more important concepts.The model signal g can be logits or cosine similarity with a sentence.Source: A Attribution methods for Concepts · p. 15
  • Saliency [4] uses concept-space gradients, Gradient ⊙Input [6] multiplies gradients by the input, and Integrated Gradients [7] accumulates gradients from a zero baseline.Integrated Gradients uses 30 regularly spaced steps and a trapezoidal approximation.Source: A Attribution methods for Concepts · p. 15
  • SmoothGrad [5] averages gradients at noisy concept inputs to reduce visual noise, whereas VarGrad aggregates the same noisy-input gradients using variance.Both use 30 samples with σ = 0.1 in the experiments.Source: A Attribution methods for Concepts · p. 15
  • Occlusion estimates concept importance by omitting concepts one at a time and measuring the resulting prediction changes against a zero baseline.Source: A Attribution methods for Concepts · p. 15
  • Sobol Attribution [9] scores a concept by the expected output variance remaining when other variables are fixed; experiments use 32 designs and the Jansen estimator.Source: A Attribution methods for Concepts · pp. 15–16
  • HSIC [10] measures output dependence on concept presence across binary masks, while RISE [32] probes masked inputs to identify important features.For HSIC, the dependence calculation uses kernels on masks and outputs.Source: A Attribution methods for Concepts · p. 16

B Closed-form of Attributions for the last layer

For a last-layer linear decomposition, the section derives closed forms for attribution methods and identifies recurring forms across methods. VarGrad is a special case: its attribution is zero for a linear system.

B Closed-form of Attributions for the last layer

C µ Fidelity optimality

The section recalls µFidelity as a measure of concept-importance fidelity and proves optimality for several methods under a last-layer decomposition. The guarantee also applies to a broader specified class of importance functions.

C µ Fidelity optimality

  • µFidelity evaluates the fidelity of concept importance, using Pearson correlation and comparisons that set selected coordinates of u to zero.Source: C µ Fidelity optimality · p. 17
  • Gradient Input, Integrated Gradients, Occlusion, and RISE are optimal for µFidelity under a last-layer decomposition.Source: C µ Fidelity optimality · p. 17
  • Any importance method of the stated form φ_i(u) = a(u_iV_i^TW) + b, with a ≥ 0, is also optimal and has correlation 1.Source: C µ Fidelity optimality · p. 17

D Optimality for C-Insertion and C-Deletion

The section uses weighted matroids to establish last-layer optimality results for concept insertion and deletion. Its guarantees rely on a linear decomposition and apply to concepts in the penultimate layer.

D Optimality for C-Insertion and C-Deletion

E Sparse Autoencoder

The section describes training a neural network to produce activation loadings for a linear reconstruction, encompassing PCA and K-means. It also presents an architecture intended to combine positive scores, sparsity, and reconstruction-related interpretability.

E Sparse Autoencoder

  • A neural network can produce U from activations A so that A is reconstructed linearly as UV^T, encompassing PCA and K-means.Source: E Sparse Autoencoder · p. 19
  • NMF and K-means map A to U nonlinearly while reconstructing A linearly from U; the authors suggest this nonlinearity may aid effective concept extraction.Source: E Sparse Autoencoder · p. 20
  • The proposed architecture uses dense layers, batch normalization, and ReLU to obtain positive scores and sparsity similar to NMF, without constraining V.Source: E Sparse Autoencoder · p. 20
  • The dictionary V is initialized with truncated SVD and optimized with Adam at a 1e−3 learning rate; dictionary learning remains an area for exploration.Source: E Sparse Autoencoder · p. 20
Loading 2306.07304v2…