Do Concept Bottleneck Models Obey Locality?

Naveen Raman, Mateo Espinosa Zarlenga, Juyeon Heo, Mateja Jamnik

TL;DR

This paper investigates whether Concept Bottleneck Models (CBMs), a popular class of interpretable AI models, truly learn concepts in a localized manner, both spatially and semantically. The authors find that CBMs often fail to adhere to these locality principles, suggesting that their concept-based explanations might be less robust than assumed and susceptible to irrelevant information.

What Problem Does This Paper Address?

Concept Bottleneck Models (CBMs) aim to make deep learning models interpretable by using human-understandable "concepts" as intermediate representations. The core idea is that a model first predicts a set of concepts from input data (e.g., identifying "stripes" and "furry texture" from an image of a tiger) and then uses these concepts to make a final prediction (e.g., classifying it as "tiger"). A key assumption for these models to be truly interpretable is that the prediction of a concept should ideally depend only on relevant parts of the input (spatial locality) and be independent of unrelated concepts (semantic locality). For instance, the concept of "bird beak color" should only depend on the beak region of an image and not be influenced by the bird's wing color or the background. However, recent work has hinted that CBMs might not always adhere to this assumption, potentially learning spurious correlations. This paper directly tackles this problem by rigorously testing whether CBMs exhibit spatial and semantic locality in well-defined scenarios.

Methods

The authors introduce two key notions of locality:

  • Spatial Locality: A concept's prediction should depend only on a specific subset of input features (e.g., pixels in a particular image region). They measure this by introducing "spatial locality leakage," which quantifies how much a concept's prediction can be altered by changing features outside its presumed local region. This is done using gradient ascent to maximize the difference in concept prediction when perturbing irrelevant features.
  • Semantic Locality: A concept's prediction should be independent of other concepts that lack a semantic relationship. They assess this using "Concept Out-of-Distribution Accuracy" (CODA), which measures a CBM's concept prediction accuracy on data with novel combinations of concepts not seen during training.

They also explore the impact of model capacity (size) and pruning on spatial locality.

Datasets

The paper uses two main types of datasets:

  • Synthetic Datasets: These are custom-generated image datasets designed to have clear spatial locality. They feature simple shapes (squares, triangles) placed in specific regions of an image, where each shape's presence is a concept. These datasets allow for precise control over concept localization.
  • Caltech-UC Davis Birds (CUB) Dataset: This real-world dataset contains images of birds annotated with various attributes (concepts) like beak color, tail length, and wing color. This dataset is used to test spatial locality in a more complex, real-world scenario where concept regions might not be perfectly defined.
  • dSprites Dataset: This dataset consists of images of simple objects with varying positions, shapes, and sizes. It's used to investigate semantic locality by creating concept combinations that are either seen or unseen during training.

Key Insights and Ideas

  • CBMs struggle with spatial locality, especially with larger models: Increasing the capacity (e.g., number of layers or width) of the concept predictor in CBMs often leads to more spatial locality leakage, meaning the model relies on irrelevant features. This suggests that larger models might be more prone to memorizing spurious correlations.
  • Pruning can help, but with a trade-off: While pruning model weights or layers can reduce spatial locality leakage, it often comes at the cost of significantly decreased accuracy. However, retraining briefly after pruning shows promise for achieving both high accuracy and low leakage.
  • Semantic locality is also compromised: CBMs tend to generate concept combinations that were already seen during training, indicating they struggle to generalize to novel combinations of semantically independent concepts. This suggests they might be learning spurious relationships between concepts.
  • Concept annotations matter for semantic locality: The diversity of concept annotations during training plays a role in how well a CBM captures semantic locality. Simply increasing the number of training concept combinations improves performance, but only slowly.

Key Results

  • Spatial Locality Leakage: For a synthetic dataset, increasing the number of layers in CNN-based concept predictors led to models that were not spatially localized (leakage increased). Similar trends were observed with model width.
  • CUB Dataset Results: Masking out irrelevant parts of a bird image (e.g., the neck) had a larger impact on the prediction of a concept like "crown color" than masking out only the most relevant pixels, indicating a failure to adhere to spatial locality.
  • Semantic Locality (dSprites): CBMs showed a tendency to predict concept combinations seen during training, with small Hamming distances to training data. This indicates a lack of semantic locality. Overall task accuracy was low (3%) when tested on unseen concept combinations, highlighting the issue.
  • Model Generalization: Concepts that were linearly separable in a dimensionality-reduced space (using PCA) tended to have better semantic locality (higher CODA), while less separable concepts performed poorly.

Limitations and Future Work

  • Limitations: The paper primarily focuses on synthetic datasets and specific real-world datasets (CUB, dSprites) to demonstrate locality issues. The findings might not generalize to all types of data or concept definitions. The authors also note that the impact of model width on spatial locality in MLP models was unclear.
  • Future Work: The authors suggest exploring novel regularization techniques for concept predictors to encourage better independence and semantic locality. They also plan to investigate whether recent methods for adversarial and spurious robustness in CBMs can improve locality. Further work is needed to understand the unclear trends observed with MLP model depth and to test pruning strategies on non-synthetic datasets.

Summary updated

BibTeX
@article{raman2025do,
  author = {Naveen Raman and Mateo Espinosa Zarlenga and Juyeon Heo and Mateja Jamnik},
  title = {{Do Concept Bottleneck Models Obey Locality?}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=4mCkRbUXOf},
}
Figure