PatClArC: Using Pattern Concept Activation Vectors for Noise-Robust Model Debugging

Frederik Pahde, Leander Weber, Christopher J. Anders, Wojciech Samek, Sebastian LapuschkinarXiv 2022

Introduction

In the quest for eXplainable AI (XAI), researchers use Concept Activation Vectors (CAVs) to translate a model's high-dimensional latent representations into human-understandable concepts, such as "stripes" or "textures." Traditionally, a CAV is derived by training a linear classifier (like an SVM) to separate latent representations of images with a concept from those without it. However, this approach faces a fundamental flaw: Directional Divergence.

The Problem: Directional Divergence

Linear classifiers are designed for separability, not representation. If there is noise or "distractor" signals in the data that help distinguish two groups, the classifier will latch onto them to maximize its margin. Consequently, the resulting vector points toward a mix of the concept and the noise, rather than the pure concept signal. This makes interpretability tools unreliable and model debugging efforts—such as removing biases—less effective.

Figure 1: Comparison of filter-based and pattern-based CAVs. In the presence of distractors like band-aids in skin lesion images, standard filters (pink) diverge from the true concept direction, while pattern-based CAVs (green) accurately capture the signal.

Methods: From Filters to Patterns

This paper proposes moving from filter-based CAVs (the weights of a classifier) to pattern-based CAVs.

  • The Standard Way (Filter): One finds a hyperplane that best separates "Concept A" from "Not Concept A." The vector perpendicular to this plane is the CAV. This is highly sensitive to feature scaling and the orientation of noise.
  • The New Way (Pattern): Drawing from neuroimaging techniques, the authors model latent activations as a linear function of the concept label. Instead of asking "how do I separate these groups?", they ask "what direction best explains the variance caused by this concept?"

Mathematically, for binary concepts, the pattern-based CAV simplifies to the difference of cluster means (the centroid of the "concept" group minus the centroid of the "no concept" group). This approach is theoretically and empirically shown to be invariant to feature scaling and far more robust to structured noise than traditional SVM or Logistic Regression-based CAVs.

Figure 3: Robustness of pattern-based CAVs compared to filter-based CAVs. Under different scaling and distractor rotations, the pattern vector (green) remains aligned with the concept direction, whereas the filter vector (pink) is easily misled.

Experimental Validation

The authors validated PatClArC across several diverse benchmarks:

  • FunnyBirds: A synthetic dataset with ground-truth concept directions, used to prove that pattern-CAVs align significantly better with true signals across VGG, ResNet, and ViT architectures.
  • ISIC2019: A real-world skin cancer dataset used to study artifacts like band-aids and rulers. Pattern-CAVs proved more effective at identifying these shortcuts.
  • Pediatric Bone Age: Used to test "unlocalizable" concepts like image brightness and markers in hand radiographs.
  • CelebA & ImageNet: Used for large-scale bias mitigation, such as the spurious correlation between "wearing a tie" and "blonde hair."

Key Results and Insights

  • Separability ≠ Signal: A vector that perfectly separates two groups in latent space might be nearly orthogonal to the actual signal if the noise is high. Pattern-CAVs prioritize the signal.
  • Scale Invariance: Pattern-CAVs are naturally robust to feature scaling. If one neuron has a much larger activation range, it can skew a standard SVM-CAV, but a pattern-CAV remains stable.
  • Superior Model Correction: Using ClArC (Class Artifact Compensation) to "unlearn" shortcuts, pattern-CAVs were much more effective at reducing reliance on artifacts. In VGG-16, pattern-based correction reduced artifact relevance by over 50% compared to vanilla models while maintaining high accuracy on clean data.
  • Efficiency: Because pattern-CAVs for binary labels are essentially just calculating means, they are computationally cheaper and do not require the hyperparameter tuning (like regularization strength) that SVMs demand.

Conclusion and Future Work

PatClArC demonstrates that for reliable XAI, we must focus on the pattern of the signal rather than the filter used to separate it. While filter-based CAVs may still be superior for strictly detecting the presence of a concept in a specific sample, pattern-based CAVs are essential for understanding and debugging model behavior. Future work will look to extend these insights into continuous, multi-class concepts and fully unsupervised concept discovery.

Summary updated

BibTeX
@misc{pahde2022patclarc,
  author = {Frederik Pahde and Leander Weber and Christopher J. Anders and Wojciech Samek and Sebastian Lapuschkin},
  title = {{PatClArC: Using Pattern Concept Activation Vectors for Noise-Robust Model Debugging}},
  year = {2022},
  url = {https://openreview.net/forum?id=J2IUkvkMWI},
}

Loading related content...

Figure