LG-CAV: Train Any Concept Activation Vector with Language Guidance

Qihan Huang, Jie Song, Mengqi Xue, Haofei Zhang, Bingde Hu, Huiqiong Wang, Hao Jiang, Xingen Wang, Mingli Song

Abstract

Concept Activation Vectors (CAVs) provide a human-interpretable lens into the internal representations of black-box neural networks. However, their utility is often limited by the requirement for large, manually labeled image datasets for every concept of interest. We present LG-CAV (Language-Guided Concept Activation Vector), a framework that enables the training of CAVs for any visual concept using only text descriptions. By utilizing vision-language models (VLMs) like CLIP as a source of concept knowledge, LG-CAV transfers semantic understanding to target models via unlabeled probe images. Our approach incorporates Gaussian Alignment to bridge disparate feature spaces and introduces techniques for post-hoc model correction. Experimental results across various architectures demonstrate that LG-CAV outperforms existing text-to-concept methods and effectively mitigates reliance on spurious correlations.

The Challenge of Scalable Interpretability

Explainable AI (XAI) aims to demystify model predictions by identifying the contribution of human-friendly concepts, such as "stripes" or "floppy ears." CAVs achieve this by defining vectors in a model's feature space that correspond to these concepts. A significant bottleneck in traditional CAV training is the "data hunger": high-quality, manually labeled positive and negative image sets are required for each concept.

As shown in Figure 1, the performance of CAVs—measured by Concept Accuracy and Concept-to-Class Accuracy—degrades sharply as the number of available training samples (shots) decreases. This dependency makes scaling interpretability to thousands of concepts prohibitively expensive.

Figure 1: Performance of traditional CAVs across different architectures (ResNet18, VGG13, DenseNet121) as a function of training shot number. Quality degrades significantly with scarce data.

Methodology: Language-Guided Knowledge Transfer

LG-CAV addresses the data bottleneck by leveraging the extensive concept knowledge embedded in pre-trained Vision-Language Models (VLMs) like CLIP. The framework treats the VLM as a "teacher" that guides the "target model" (the model being explained).

The Three-Step Process

  1. Knowledge Transfer via Probe Images: A common pool of unlabeled "probe images" serves as a bridge. CLIP calculates the activation value (semantic relevance) of a text-based concept description for each probe image.
  2. Gaussian Alignment (GA): Because different models operate in distinct feature spaces with varying activation distributions, a direct transfer is ineffective. LG-CAV employs a Gaussian Alignment module to map the teacher's activation values onto the target model's specific distribution (see Figure 2B).
  3. Target Training: The target model's CAV is trained to minimize the difference between its internal activations on probe images and the aligned values provided by the teacher.
Figure 2: (A) The LG-CAV training framework utilizing probe images and language descriptions. (B) The distribution mismatch between CLIP and target model activations, addressed by Gaussian Alignment.

Enhancing Robustness

To improve the quality of the learned vectors, LG-CAV incorporates Concept Ensemble (CE), which aggregates multiple text prompts (e.g., "a photo of [concept]"), and Deviation Sample Reweighting (DSR), which prioritizes probe images that exhibit consistent concept representation across different views.

Experimental Results and Model Correction

The authors evaluated LG-CAV across nine architectures, including ResNet, VGG, DenseNet, and Vision Transformers (ViT). LG-CAV consistently outperformed previous state-of-the-art methods like Text-to-Concept in both Concept Accuracy and Concept-to-Class Accuracy.

Beyond explanation, LG-CAV enables Activation Sample Reweighting (ASR) for model correction. By identifying which concepts a model should be using versus spurious correlations it is currently relying on, researchers can fine-tune the model to rely on semantically relevant features. On ImageNet, this post-hoc correction improved accuracy by up to 0.91 percentage points, demonstrating that better explanations can lead to better models.

Conclusion

LG-CAV represents a significant step toward scalable and actionable model interpretability. By using unlabeled images as a "Rosetta Stone" between vision-language models and black-box classifiers, it eliminates the need for expensive manual labeling. While the method is currently bounded by the knowledge of the underlying VLM, it provides a robust foundation for automated model debugging and semantic alignment.

Summary updated

BibTeX
@inproceedings{huang2024lg,
  author = {Qihan Huang and Jie Song and Mengqi Xue and Haofei Zhang and Bingde Hu and Huiqiong Wang and Hao Jiang and Xingen Wang and Mingli Song},
  title = {{LG-CAV: Train Any Concept Activation Vector with Language Guidance}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=MjD9Y05Q6i},
}
Figure