(eccv) Package eccv Warning: Package ‘hyperref’ is loaded with option
‘pagebackref’, which is *not* recommended for camera-ready version

11institutetext:  Nanyang Technological University, Singapore 22institutetext:
DSO National Laboratories, Singapore

# Improving Concept Alignment in Vision-Language Concept Bottleneck Models

Nithish Muthuchamy Selvaraj 11 Xiaobao Guo 11 Bingquan Shen 22 Adams Wai-Kin
Kong 11 Alex Kot 11

###### Abstract

Concept Bottleneck Models (CBM) map the input image to a high-level human-
understandable concept space and then make class predictions based on these
concepts. Recent approaches automate the construction of CBM by prompting
Large Language Models (LLM) to generate text concepts and then use Vision
Language Models (VLM) to obtain concept scores to train a CBM. However, it is
desired to build CBMs with concepts defined by human experts instead of LLM
generated concepts to make them more trustworthy. In this work, we take a
closer inspection on the faithfulness of VLM concept scores for such expert-
defined concepts in domains like fine-grain bird species classification and
animal classification. Our investigations reveal that frozen VLMs, like CLIP,
struggle to correctly associate a concept to the corresponding visual input
despite achieving a high classification performance. To address this, we
propose a novel Contrastive Semi-Supervised (CSS) learning method which uses a
few labeled concept examples to improve concept alignment (activate truthful
visual concepts) in CLIP model. Extensive experiments on three benchmark
datasets show that our approach substantially increases the concept accuracy
and classification accuracy, yet requires only a fraction of the human-
annotated concept labels. To further improve the classification performance,
we also introduce a new class-level intervention procedure for fine-grain
classification problems that identifies the confounding classes and intervenes
their concept space to reduce errors. Source codes are available at
https://github.com/NMS05/Improving-Concept-Alignment-in-Vision-Language-
Concept-Bottleneck-Models.

###### Keywords:

Concept Bottleneck Model Interpretability Semi-Supervised

##  1 Introduction

Concept Bottleneck Models (CBM) [14] are a popular choice for building
interpretable models with high-level concepts. These models first map the
input image to a low-dimensional (hence the term “bottleneck”) expert-defined
concept space where each concept is readily understandable by a human. For
example, the bird species ‘Vermilion Flycatcher’ can have concepts like ‘red-
body’, ‘black-wing’, and ‘red-crown’, etc. A linear classifier then makes
class predictions on top of these concepts. There are two fundamental
requirements to build a CBM - a well-defined non-ambiguous concept set and the
corresponding concept labels for every sample. Recent approaches [25, 46]
automate the above steps and scale CBM to larger datasets (like ImageNet) by
leveraging Large Language Models (LLM) and Vision Language Models (VLM). They
typically involve generating an initial concept set by prompting a LLM with
few shot examples and then extracting a sub-set of those concepts that are
conducive for discrimination (classification). When an image and this filtered
concept set 111The number of LLM generated concepts are usually an order of
magnitude larger than the expert-defined concepts. is passed as a input to the
contrastively pre-trained VLM, it’s image-text alignment scores act as
“concept scores or concept labels” for that sample. These concept labels can
be used to train another CBM classifier [25] or can be directly used to
predict the classes [46], thus turning a VLM into CBM (referred to as VL-CBM
from here on).

While LLMs possess rich world knowledge [27, 11, 34] and can generate a
potential (large) concept set across any domain, there are certain instances
where an expert-defined concept is preferred.

  * •

A small and concise set of expert-defined bottleneck concepts enables easier
error analysis and intervention, which is crucial for interpretable models.

  * •

In medical domains, such as Hematology [36, 2], it is desired to use the
expert-defined concept set rather than that generated from LLMs, as the former
comes from the more trusted pathologists.

  * •

For faithful “visual” classification, all the concepts must be visually
groundable, which is guaranteed with expert-defined concept set [38]. In
comparison, for problems like bird species classification, LLMs can generate
concepts like “migratory birds” that are not salient for visual
classification.

In such cases with limited yet preferable expert concepts, do the VLM concept
scores faithfully represent the visual input and are they efficacious to build
VL-CBMs with desired performance? To answer this question, we take a closer
inspection on the CLIP [28] concept scores for expert-defined concepts on
classification datasets like CUB [38], RIVAL [21], and AwA2 [42]. Ideally, it
is desired for the CLIP model to precisely associate a visual concept
(appearance, color, shape, etc.) to the corresponding visual input. Our
investigations expose two problems,

  * •

Low Concept Accuracy.  The CLIP (VLM) model has a low concept accuracy despite
the VL-CBM achieving a high classification performance, which makes the
resulting model less faithful.

  * •

Incorrect Concept Association.  For challenging classification problems like
CUB, the CLIP model is sensitive and biased towards the primary color of the
bird and associate this dominant color to all other body parts. It struggles
to correctly attribute the fine-grain concepts to the visual input.

Hence, to improve the reliability of VL-CBM, there is a need to improve
concept alignment i.e., activate the desired/truthful concepts for a given
image, which requires supervision. But obtaining the supervisory concept
labels for all training samples is cumbersome. To solve this problem, we
propose a novel Contrastive Semi-Supervised (CSS) learning approach that can
improve the concept alignment in VL-CBM with fewer labeled concept examples.
Our approach encourages consistent concept scores for intra-class samples
whilst discriminating (contrasting) them from the other classes. It then uses
a few labelled concept examples (semi-supervision) per class to align them
with the ground truth. Extensive experiments on three benchmark datasets CUB
[38], RIVAL [21], and AwA2 [42] show that our CSS method substantially
increases the concept accuracy (+39.1% for CUB, +18.63% for RIVAL, +31.11% for
AwA2) and enhances the overall classification accuracy (+5.61% for CUB, +2.84%
for RIVAL, +3.06% for AwA2) with only a handful of human-annotated concept
labels per class. We also validate our CSS approach in a medical domain using
the blood cell attribute dataset WBCAtt [36].

Intervention is the fundamental advantage of a CBM over other interpretable
models - if a classifier makes an incorrect prediction, one can inspect the
concept scores and rectify the problem, so that the model makes the desired
prediction. Intervention in CBM is typically performed at an instance level
[14, 25], where a handful of error images are arbitrarily chosen for
debugging. But, choosing the error images are non-trivial for fine-grain
multi-class classification problems which have fewer samples per class and
even visually similar classes. In this work, we propose a class-level
intervention procedure for fine-grain classification problems, where we first
compute an error matrix to identify the “confounding classes” (visually
similar but semantically different) and then intervene the error images of
these classes such that it reduces the total error for the confounding classes
whilst increasing the overall classification accuracy. The primary
contributions of this paper are summarized below,

  * •

Validating the faithfulness of VL-CBM. We investigate the concept scores for
expert concepts and show that CLIP models have poor concept alignment and they
struggle to correctly associate the fine-grain concepts to visual input.

  * •

Improving concept alignment. To address the above issue and to improve the
reliability of VL-CBM, we propose a novel Contrastive Semi-Supervised (CSS)
approach which uses a fraction of the human-annotated concept labels to
increase the concept accuracy and classification accuracy.

  * •

Class-level Intervention. We propose an intervention procedure for fine-grain
classification problems which reduces the total error for confounding classes
and further increases the classification performance.

##  2 Related Work

Post-hoc interpretable models. Post-hoc methods [30, 29, 17, 4, 8] convert a
pre-trained black-box classifier into an interpretable model using saliency
maps. They highlight the regions of the input space [31] that influence a
classifiers’ prediction and it helps one understand the salient features of a
particular class. Though saliency maps can reveal the semantic features (or
spurious correlations) that a classifier focuses on, their interpretation can
be subjective and may require domain expertise.

Prototype-based and Concept-based interpretable models. In stark contrast to
post-hoc methods, these models can be trained and are interpretable by design.
Prototype-based methods [6, 24, 32, 37, 7] learn interpretable visual feature
prototypes for every class from the training samples. During inference, the
distance (similarity score) between the test sample feature and the learned
prototypes determine the classifiers decision. BotCL [39] is a prototype-based
method that is closely related to our work. It applies contrastive learning to
the prototype space of a vision-only model, while we focus on contrastive +
semi-supervised learning on the concept space of a vision-language
(multimodal) model. Concept-based methods [12, 14, 48] map the input to a
high-level concept space defined by human experts, where these concepts are
readily interpretable. The classifiers decision is based on the predicted
concept scores. The main advantage of concept-based methods is that they allow
test-time intervention [14, 12, 19, 1, 5] and they are easier to debug
compared to other methods.

VLM based interpretable models (VL-CBM). The problem with concept-based models
is that they require concept labels for every training sample [14] or a lot of
training images representing each of those concepts [12, 48]. To solve this
problem, recent approaches [25, 46, 49, 45, 41, 22, 23] leverage contrastively
pre-trained Vision-Language Models, like CLIP [28], to automatically generate
concept labels from their image-text alignment scores. These models have
interpretable natural language concepts [18, 44] that are typically generated
by a LLM and this automated approach scales them to larger datasets.

Enhancing faithfulness of VL-CBMs. Several recent works have focused on
addressing the shortcomings of VLM based concept bottlenecks to improve their
reliability. They constrain the class predictions to focus on a sub-set of
salient concepts [40, 33, 26], make concept scores robust to perturbations
[15], and obtain reliable concept score distributions by modeling
uncertainties [13] and by composing energy functions [43]. In our work, we
enhance the faithfulness of VL-CBM by using human (expert) preferred concepts
and improve the concept scores of VLM in a semi-supervised setup using a few
concept labels.

##  3 Methodology

We formally define VL-CBM in Sec. 3.1 and investigate the faithfulness of CLIP
concept scores in Sec. 3.2. We then propose our Contrastive Semi-Supervised
(CSS) method to improve concept alignment in Sec. 3.3.

###  3.1 Vision-Language Concept Bottleneck Models

Consider a dataset $D=\\{(x_{1},y_{1}),(x_{2},y_{2}),...,(x_{N},y_{N})\\}$,
where $x_{i}\in\mathbb{R}^{H\times W\times 3}$ denotes the images, $y_{i}$
denotes the labels for $k$ classes, and $N$ is the total number of training
samples. While a black-box classifier $f:x\rightarrow\mathbb{R}^{k}$ directly
maps an image $x$ to its label $y$, a CBM consists of a backbone
$g:x\rightarrow\mathbb{R}^{c}$ which first maps the image $x$ to a concept
space consisting of $c$ pre-defined concepts and a linear classifier
$h:\mathbb{R}^{c}\rightarrow\mathbb{R}^{k}$ that maps the predicted concepts
to its corresponding label $y$. These concepts represent the salient visual
features that are crucial for solving the classification task.

However, training the backbone $g$ requires $N\times c$ concept labels which
is tedious to obtain. VL-CBM overcome this issue by leveraging the image-text
alignment scores of contrastively pre-trained Vision-Language Models (like
CLIP) as concept labels. Concretely, let $T=\\{t_{1},t_{2},...,t_{c}\\}$ be
the set of LLM generated or expert-defined text concepts. Now the $c$ concept
labels for an image $x_{i}$, which is denoted as $C_{i}$, is obtained by
$C_{i}=E_{I}(x_{i})\cdot E_{T}(T)^{\intercal}$, where $\cdot$ denotes the dot
product, $E_{I}$ and $E_{T}$ denotes the image and text encoder of the CLIP
model that maps the images and text concepts into a shared feature space. Now,
with the availability of image $x_{i}$, concept label $C_{i}$, and class label
$y_{i}$ for $N$ samples, the backbone $g$ and the classifier $h$ can be
independently or jointly trained.

Table 1: Evaluation of CLIP concept scores and VL-CBM classification
performance.

CUB RIVAL AwA2 Classification Accuracy (%) 75.84 95.63 90.14 Concept Accuracy
(%) 24.43 58.85 49.02 No.of Concepts 312 18 85 Difficulty of Concepts Hard
Easy Medium

###  3.2 Faithfulness of Vision-Language Concept Bottleneck Models

We validate the faithfulness of VL-CBM for expert concepts across three image
classification datasets namely Caltech-UCSD Birds (CUB) [38], Rich Visual
Attributes with Localization (RIVAL) [21], and Animal with Attributes (AwA2)
[42]. These datasets provide expert concepts and the corresponding ground-
truth concept labels required for our evaluation. We input the images and the
expert (text) concepts to a frozen CLIP model to obtain the concept scores as
described in Sec. 3.1. Our objective here is to evaluate the quality and
faithfulness of the VLM concept scores by comparing them against the ground-
truth concept labels and evaluate their classification performance with a
linear classifier. The concept evaluation results are presented in Table 1.
Our investigations expose two problems with CLIP concept scores.

Low Concept Accuracy. From the table, the CLIP model has a low concept
accuracy despite the VL-CBM achieving a high classification accuracy. This
implies that a higher classification performance does not guarantee a faithful
concept understanding, which makes the VL-CBM less reliable. Moreover, it
becomes difficult to intervene such a model during test-time, in order to
rectify prediction errors.

Incorrect Concept Association. A closer inspection of these concepts in Fig. 2
(CLIP Concept Scores) reveal that, for fine-grained concepts like in CUB, the
CLIP model is sensitive and biased towards the primary color of the bird and
associate this dominant color to all other body parts. The untrained model
struggles to correctly associate the color/texture concepts to the
corresponding bird part, which is crucial for bird species classification.

The lower concept accuracy and the errors in concept association is a result
of the poor relational and compositional understanding of CLIP models i.e.,
they make errors in associating objects to their attributes [47], especially
in a multi-object and multi-attribute setting [16]. Hence, to improve the
reliability and faithfulness of VL-CBM, there is a need to improve concept
alignment i.e. activate the truthful concepts for the given image.

Figure 1: (a) Architecture of VL-CBM with concept projection (bootstrap). (b)
Overview of the Contrastive Semi-Supervised (CSS) learning method.

###  3.3 Improving concept alignment in VL-CBM

We propose a novel Contrastive Semi-Supervised (CSS) learning method that can
improve the concept alignment in VL-CBM with a few labelled concept examples
per class. The overall framework is illustrated in Fig. 1.

From Table 1, we can see that the frozen CLIP model achieves a low yet non-
trivial concept accuracy. We bootstrap this by adding a learnable linear
concept projection layer (see Fig. 1a) that enhances the CLIP concept scores
by directly predicting the $c$ concepts from the average pooled visual patch
tokens as,

$C_{i}=E_{I}(x_{i})\cdot E_{T}(T)^{\intercal}+LN(E_{I}^{*}(x_{i}))\cdot
W_{CP},$ (1)

where $E_{I}(x_{i})\in\mathbb{R}^{1\times 512}$ is the image feature,
$E_{T}(T)\in\mathbb{R}^{c\times 512}$ is the text feature for $c$ concepts,
$E_{I}^{*}(x_{i})\in\mathbb{R}^{1\times 768}$ denotes the average pooled patch
tokens from the visual encoder, $W_{CP}\in\mathbb{R}^{768\times c}$ is the
learnable concept projection layer and $LN$ denotes layer normalization. From
the concept scores $C_{i}\in\mathbb{R}^{1\times c}$, a linear classifier
$W_{K}\in\mathbb{R}^{c\times k}$ makes class predictions $K_{i}=C_{i}\cdot
W_{K}$ for the image $x_{i}$, where $K_{i}\in\mathbb{R}^{1\times k}$ denotes
the class logits for the $k$ classes.

Now the model must be optimized to improve concept alignment and achieve high
classification accuracy. To improve concept alignment, the predicted concepts
can be compared with the ground truth concept labels. However, the
availability of fewer concept labels (semi-supervision) makes it less
effective in improving concept alignment across other unlabelled samples. To
mitigate this, we augment a contrastive learning objective to the concept
space with the following intuition. The contrastive objective encourages
“consistent” concept scores for intra-class samples and the concept labels for
a few of these samples (semi-supervision) guide or align the predicted
concepts with the ground truth. Furthermore, contrastive learning
discriminates the concept scores of inter-class samples thus aiding in
classification. Such a learning objective of enforcing consistency between
sample pairs guided by a few labeled examples [3, 20] has not been studied in
VL-CBMs before.

To achieve this (see Fig. 1b), we perform pairwise sampling such that each
training sample consists of a pair of images $(x_{i},x_{j})$ from the same
class and every other sample in the mini-batch belongs to different classes.
There are $n$ samples ($2n$ images) in each mini-batch. For these image pairs,
we compute the concept scores $(C_{i},C_{j})$ and class predictions
$K=[K_{i},K_{j}]~{}$222The square brackets denote the tensors are stacked
across batch dimension and no longer need to be in pairs.. Let
$g=[g_{i},g_{j}]$ and $y=[y_{i},y_{j}]$ be the corresponding ground-truth
concept labels and class labels. We jointly train the concept projection layer
and the linear classifier to minimize the following loss objective.

$\displaystyle L=L_{contrastive}+L_{CE}+L_{concept},$ (2) $\displaystyle
L_{contrastive}=\frac{1}{n}\sum_{i,j\in
n}-\log\frac{e^{sim(C_{i},C_{j})/\tau}}{\sum_{m\neq
i}e^{sim(C_{i},C_{m})/\tau}},$ $\displaystyle L_{CE}=\frac{1}{2n}\sum_{l\in
2n}L_{ce}(K_{l},y_{l}),$ $\displaystyle L_{concept}=\frac{1}{2n}\sum_{l\in
2n}L1(\gamma\cdot(s(C_{l})-s(G_{l}))),\ \ \textrm{if}\ \ |G_{l}|\neq 0,$
$\displaystyle L_{concept}=0,\ \ \textrm{if}\ \ |G_{l}|=0,$

where $sim$ is the cosine similarity metric, $\tau$ is the temperature
parameter, $L_{ce}$ and $L1$ are the standard cross entropy loss and mean
absolute error, $s$ is the softmax normalization and $\gamma$ is a constant
that increases the magnitude of the $L1$ loss function. $l$ denotes the index
of the concept score, class logit, and label tensor within the mini-batch,
after stacking along the batch dimension.

  * •

The contrastive loss ($L_{contrastive}$) optimizes $W_{CP}$ and encourages the
concept scores of the same classes (positive pairs) to be consistent and
discriminates it from the other classes (negative pairs).

  * •

The cross entropy loss ($L_{CE}$) trains the linear classifier $W_{K}$ to make
class predictions from the concept scores.

  * •

The concept loss ($L_{concept}$) optimizes $W_{CP}$ to align the concept
predictions with the ground truth concept labels and it primarily improves the
concept accuracy. The concept loss is enabled if the concept labels are
available ($|G_{l}|\neq 0$) or else it becomes zero.

##  4 Experiments

###  4.1 Experimental Setup

Dataset. We validate the effectiveness of our Contrastive Semi-Supervised
(CSS) method in improving concept alignment on the CUB [38], RIVAL [21], AwA2
[42] datasets, and in a medical setting on the White Blood Cell Attribute
(WBCAtt) dataset [36]. All the above datasets provide an expert-defined
concept set and the corresponding ground-truth concept labels, which is
crucial for our evaluation.

Model and Training. We use the PLIP ViT-B-16 [9] model available in Hugging
Face for experiments on WBCAtt dataset and use the OpenCLIP ViT-B-16 model
[10] for experiments on all other datasets. We use Adam optimizer to train all
our models and evaluate them with classification accuracy and/or concept
accuracy metrics.

Table 2: Improving Concept Alignment in VL-CBM using Contrastive Semi-
Supervised (CSS) learning. We report the classification, concept, and WBC
attribute accuracies (in %) as Class, Concept, and Attribute. The best
performance is bolded, and the second-best is underlined. Note that WBCAtt
uses the PLIP model.

Model CUB RIVAL AwA2 WBCAtt Class Concept Class Concept Class Concept
Attribute ViT-B/16 (Black Box) 79.21 NA 99.47 NA 94 NA 66.11 CLIP VL-CBM [25,
46] 75.84 24.43 95.63 58.85 90.14 49.02 42.56 CSS VL-CBM (Ours) 81.45 63.53
98.47 77.48 93.2 81.13 64.19

###  4.2 Improving Concept Alignment

We empirically demonstrate the effectiveness of our Contrastive Semi-
Supervised (CSS) approach in improving concept alignment for the CUB, RIVAL,
AwA2, and WBCAtt datasets in Table 2.

Bird and Animal classification. We validate our CSS method with concept
accuracy and classification accuracy metrics for CUB, RIVAL, and AwA2
datasets. We first train a black-box image classifier with frozen CLIP vision
encoder (ViT-B/16) as the backbone to establish the baseline classification
performance. The black-box classifier directly predicts the classes from the
image features without any concept bottlenecks. We then train a CLIP VL-CBM
classifier with expert-defined text concepts as described in Sec. 3.1. From
the table, we can see that the classification performance of CLIP VL-CBM is
on-par with the black-box classifier, however, it has a lower concept
accuracy.

Figure 2: Visualization of $top-8$ concept scores for the CUB (birds) and AwA2
(animals) datasets. Incorrectly activated concepts are highlighted in red.

Hence, to improve the faithfulness and reliability of VL-CBM, we apply the
concept projection later (bootstrap) and optimize the model with our CSS
objective (CSS VL-CBM). Our CSS method not only substantially increases the
concept accuracy, it also closes the gap with black-box methods on image
classification performance. Especially for the CUB dataset, our CSS method
surpasses the black-box classifier. The “number of concept labels per class”
used to train the CSS VL-CBM model for the above datasets are as CUB - 9
labels (30%), RIVAL - 8 labels (0.1%), and AwA2 - 10 labels (1.4%). The values
within brackets denote the “concept labels used for training as a percentage
of the total concept labels provided by the dataset”. The results show that
even with such small percentages of concept labels, our CSS method can
substantially increase the concept accuracy. The enhanced and faithful concept
scores after improving concept alignment with CSS is presented in Fig. 2 (CSS
Concept Scores).

WBC Attribute prediction. WBCAtt contains White Blood Cell (WBC) images
annotated with 31 “cell morphology” attributes that aids in diagnosis in
Hematology. We directly evaluate the models on their attribute prediction
accuracy and do not perform any image classification. While contemporary
approaches [48, 46] use the HAM10000 [35] dataset to study VL-CBM in the
medical domain, the availability of attribute labels in WBCAtt makes the
latter suitable for our work. For our evaluation, we train the PLIP model [9]
(a VLM model for Pathology AI), with 50% of the attribute labels. From the
table, we can see that our CSS method substantially increases the attribute
prediction accuracy and closes the gap with black-box attribute predictor.

Figure 3: Number of concept labels vs CSS VL-CBM performance.

Impact of the number of concept labels. Since our approach is semi-supervised,
we further investigate the impact of the number of human-annotated concept
labels on the CSS VL-CBM performance in Fig. 3.

For CUB and RIVAL datasets we progressively increase the concept labels used
for training, for which we observe a proportional increase in the
classification and concept accuracies.

For WBCAtt, we investigate how the black-box (PLIP vision encoder) attribute
predictor compares against the CSS (PLIP) VL-CBM attribute predictor, for an
increase in the attribute labels used for training. Note that there is no
image classification task for WBCAtt. We can see that our CSS method
outperforms black-box attribute predictor in a low data-resource setting.

###  4.3 Comparison with other methods

CUB. The CUB dataset is extensively used by the Explainable AI community to
build and study concept-based interpretable models. Hence, we comprehensively
compare our Contrastive Semi-Supervised VL-CBM method with contemporary VLM-
based interpretable models on the CUB dataset. The results are presented in
Table 3. For a fair comparison with LF-CBM [25] and PCBM [48], we perform two-
stage training. In stage 1, a ResNet18 backbone with a linear concept
predictor is trained with the concept labels generated by our CSS VL-CBM
model. It minimizes the $L_{concept}$ loss function. In stage 2, a sparse-
linear SGD classifier from scikit-learn is trained with 5000 steps as
described in [48]. The backbone, concept predictor, and sparse-linear
classifier together constitute a CBM.

Table 3: Comparison of CSS VL-CBM with contemporary methods on CUB.

Method Base CBM Training Classifier Class (%) Concept (%) LF-CBM [25]
ResNet-18 2-stage Sparse-Linear 74.31 - PCBM [48] ResNet-18 2-stage Sparse-
Linear 59.6 - CLIP VL-CBM ResNet-18 2-stage Sparse-Linear 68.77 16.53 CSS VL-
CBM (Ours) ResNet-18 2-stage Sparse-Linear 72.85 62.8 CLIP VL-CBM ResNet-18
joint Linear 74.91 18.84 CSS VL-CBM (Ours) ResNet-18 joint Linear 80.36 63.17
CompDL [49] CLIP ViT-B/32 - Linear 52.6 - LaBo (full shot) [46] CLIP ViT-B/32
- Linear 81.0 - CSS VL-CBM (Ours) CLIP ViT-B/16 joint Linear 81.45 63.53

From the table, we can see that the classification accuracy of ResNet-18 CBM
supervised by our CSS VL-CBM approach is on par with LF-CBM and achieves much
higher performance than PCBM. However, we observe the best performance with
joint training of the backbone, concept predictor, and linear classifier
layers with $L_{concept}$ and $L_{ce}$ losses. Grad-CAM [31] visualization of
the concepts learned by the (jointly trained) ResNet18 CBM supervised by our
CSS VL-CBM is presented in Fig. 4. From the figure, we can see that the
improved concept knowledge (activating the truthful concepts for a given
image) of our CSS VL-CBM model was effectively transferred to the ResNet
model. It is able to correctly associate a color or texture concept to the
corresponding bird part. Also, our method performs better than LaBo [46] with
just $312$ (CUB) expert concepts, while LaBo utilizes $10,000$ LLM-generated
bottleneck concepts.

Figure 4: Grad-CAM visualization of the learned concepts. Table 4: Comparison
of CSS VL-CBM with other methods on RIVAL and AwA2.

Dataset RIVAL AwA2 CBM Method Text2Concept CSS PCBM ECBM CSS Classification
Accuracy (%) 95.38 98.86 88 91.2 93.2 Concept Accuracy (%) - 72.84 71.9 85.84
81.3

RIVAL and AwA2. We further compare CSS VL-CBM with contemporary methods on the
animal classification datasets in Table 4. For RIVAL dataset, CSS achieves a
higher classification performance compared to Text2Concept [22]. For AwA2
dataset, CSS achieves a higher classification accuracy compared to other
methods, but achieves a slightly lower concept accuracy compared to ECBM. It
is important to note that PCBM [13] and ECBM [43] do not use “text” concepts
and they optimize the feature extractor (vision backbone) during training.

##  5 Intervention

When a CBM makes an error, one can inspect the incorrect predictions and
manually tune the classifier weights or modify the concepts to fix those
errors. This approach is called “intervention” or “model editing”.
Conventional approaches to intervention are typically done at the instance-
level [25, 48, 14], where a handful of error images are arbitrarily chosen for
intervention. However, for fine-grain multi-class classification problems like
CUB which have more classes (some bird species are visually similar) and
relatively fewer samples per class, choosing the error images is non-trivial.
Moreover, it is desired to perform intervention such that it increases the
performance globally [48] instead of rectifying the errors for a few images.
Hence, we propose a class-level intervention procedure where we first identify
the confounding classes and then choose the error images of these classes for
intervention. Confounding classes are bird species, that are visually similar
yet semantically different and the model makes the most errors for these
challenging classes. This class-level intervention is done in the following
steps.

Figure 5: Confounding classes - birds that are visually similar yet belong to
different sub-species. Table 5: Class-level intervention of CSS VL-CBM. The
confounding classes are as California Gull (CG), Western Gull (WG), Common
Tern (CT), and Artic Tern (AT). The value within brackets denote the total
number of test samples for that class.

Before Interv. After Interv. Total error for CG (30) 27 14 Total error for WG
(30) 15 9 CG misclassified as WG 13 4 WG misclassified as CG 3 1 Total error
for CT (30) 21 11 Total error for AT (29) 3 2 CT misclassified as AT 12 6 AT
misclassified as CT 0 0 Overall Classification Accuracy (%) 81.45 82.57

Step 1: Identify the confounding classes. First, we compute a $K\times K$
error matrix by evaluating the trained CSS VL-CBM model on the test set, where
$K$ is the number of classes. The error matrix gives the error distribution
for every class and the index of the matrix element with the highest value
(error) gives the confounding class pairs. In our experiments, we identified
two pairs of confounding classes “California Gull - Western Gull” and “Common
Tern - Artic Tern” as shown in Fig. 5. The total number of classification
errors for these confounding classes before intervention are presented in
Table 5.

Step 2: Inspecting the concept space. Next, we inspect the concept scores of
the error images in these confounding class pairs. We find that the concept
score distribution of the confounding classes are nearly identical, which
makes it difficult to discriminate them. Our model suffers from Type-2 error
[25] i.e., the number of bottleneck concepts and their score distributions are
insufficient to effectively discriminate the samples.

Step 3: Expanding the concept set. To mitigate the Type-2 error and to improve
the overall performance, we expand the concept set by leveraging the concepts
provided by LaBo [46]. Note that the new concepts to be added should be
visually groundable by the CLIP model and hence we use the “filtered” concept
set of LaBo. We choose $top-32$ concepts per confounding class and expand the
concept set from the original 312 concepts to 440 concepts. Formally, let
$T^{\prime}$ be the new set of 128 text concepts and
$C^{\prime}_{i}=E_{I}(x_{i})\cdot E_{T}(T^{\prime})^{\intercal}$ be the CLIP
concept scores for it. Now the concept scores for all the 440 concepts for an
image $x_{i}$ is given by $C^{\prime}=$ Concat($C_{i},C^{\prime}_{i}$). During
this intervention procedure we do not train a new concept projection layer for
the expanded concept set.

Step 4: Training the classifier. We add a new linear classifier
$W^{\prime}_{K}\in\mathbb{R}^{128\times 4}$ that directly predicts the
confounding classes as $K^{\prime}=C^{\prime}\cdot W^{\prime}_{K}$. Then we
append zeros for the non-confounding classes and add them to the original
class predictions as $K^{\prime}_{i}=K_{i}+K^{\prime}$. We finally train the
linear classifiers $W_{K}$ and $W^{\prime}_{K}$ simultaneously on the CUB
train set in a standard supervised setting with cross-entropy loss $L_{ce}$.
The total number of classification errors after this class-level intervention
procedure is presented in Table 5. We observe a substantial decrease in errors
for the confounding classes with an overall increase in the classification
performance.

##  6 Limitations

Despite the numerous advantages, VL-CBMs have two potential limitations.

Ineffable concepts. Though natural language offers a convenient way to build
interpretable models with high-level abstract concepts, their expressive power
can be limited i.e., the subtle visual cues needed required for solving
certain classification tasks, like face recognition, might be difficult to
express in words.

Unknown concepts. All CBMs (including VL-CBMs) assume that the complete set of
salient concepts required for solving the classification task is known prior
to training. However, this requirement cannot be satisfied for all use cases.
In such scenarios, prototype-based methods with learnable visual feature
prototypes are suitable where they can “discover” unbeknownst concepts during
training.

##  7 Conclusion

In this paper, we investigated the faithfulness of VL-CBM for expert-defined
concepts and found that VLMs like CLIP have poor concept alignment. Hence, we
proposed a novel Contrastive Semi-Supervised approach that improved the
concept alignment in VL-CBM with fewer human-annotated concept labels. We also
introduced a class-level intervention procedure for fine-grain classification
problems that reduced the error for the confounding classes to increase the
overall performance of the model.

##  8 Acknowledgement

This work was carried out at the Rapid-Rich Object Search (ROSE) Lab, School
of EEE, Nanyang Technological University (NTU), Singapore. This research is
supported by DSO National Laboratories, under the project agreement No.
DSOCL21238.

## References

  * [1] Abid, A., Yuksekgonul, M., Zou, J.: Meaningfully explaining model mistakes using conceptual counterfactuals (2021)
  * [2] Acevedo, A., Merino, A., Alférez, S., Molina, Á., Boldú, L., Rodellar, J.: A dataset of microscopic peripheral blood cell images for development of automatic recognition systems. Data in brief 30 (2020)
  * [3] Assran, M., Caron, M., Misra, I., Bojanowski, P., Joulin, A., Ballas, N., Rabbat, M.: Semi-supervised learning of visual features by non-parametrically predicting view assignments with support samples. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 8443–8452 (2021)
  * [4] Bau, D., Zhou, B., Khosla, A., Oliva, A., Torralba, A.: Network dissection: Quantifying interpretability of deep visual representations. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 6541–6549 (2017)
  * [5] Bontempelli, A., Teso, S., Tentori, K., Giunchiglia, F., Passerini, A.: Concept-level debugging of part-prototype networks. In: The Eleventh International Conference on Learning Representations (2023), https://openreview.net/forum?id=oiwXWPDTyNk
  * [6] Chen, C., Li, O., Tao, D., Barnett, A., Rudin, C., Su, J.K.: This looks like that: deep learning for interpretable image recognition. Advances in neural information processing systems 32 (2019)
  * [7] Donnelly, J., Barnett, A.J., Chen, C.: Deformable protopnet: An interpretable image classifier using deformable prototypes. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 10265–10275 (June 2022)
  * [8] Hernandez, E., Schwettmann, S., Bau, D., Bagashvili, T., Torralba, A., Andreas, J.: Natural language descriptions of deep visual features. arxiv 2022. arXiv preprint arXiv:2201.11114
  * [9] Huang, Z., Bianchi, F., Yuksekgonul, M., Montine, T.J., Zou, J.: A visual–language foundation model for pathology image analysis using medical twitter. Nature Medicine pp. 1–10 (2023)
  * [10] Ilharco, G., Wortsman, M., Wightman, R., Gordon, C., Carlini, N., Taori, R., Dave, A., Shankar, V., Namkoong, H., Miller, J., Hajishirzi, H., Farhadi, A., Schmidt, L.: Openclip (Jul 2021). https://doi.org/10.5281/zenodo.5143773, https://doi.org/10.5281/zenodo.5143773, if you use this software, please cite it as below.
  * [11] Jiang, Z., Xu, F.F., Araki, J., Neubig, G.: How can we know what language models know? Transactions of the Association for Computational Linguistics 8, 423–438 (2020)
  * [12] Kim, B., Wattenberg, M., Gilmer, J., Cai, C., Wexler, J., Viegas, F., et al.: Interpretability beyond feature attribution: Quantitative testing with concept activation vectors (tcav). In: International conference on machine learning. pp. 2668–2677. PMLR (2018)
  * [13] Kim, E., Jung, D., Park, S., Kim, S., Yoon, S.: Probabilistic concept bottleneck models. arXiv preprint arXiv:2306.01574 (2023)
  * [14] Koh, P.W., Nguyen, T., Tang, Y.S., Mussmann, S., Pierson, E., Kim, B., Liang, P.: Concept bottleneck models. In: International conference on machine learning. pp. 5338–5348. PMLR (2020)
  * [15] Lai, S., Hu, L., Wang, J., Berti-Equille, L., Wang, D.: Faithful vision-language interpretation via concept bottleneck models. In: The Twelfth International Conference on Learning Representations (2023)
  * [16] Lewis, M., Yu, Q., Merullo, J., Pavlick, E.: Does clip bind concepts? probing compositionality in large image models. arXiv preprint arXiv:2212.10537 (2022)
  * [17] Lundberg, S.M., Lee, S.I.: A unified approach to interpreting model predictions. Advances in neural information processing systems 30 (2017)
  * [18] Menon, S., Vondrick, C.: Visual classification via description from large language models. ICLR (2023)
  * [19] Mitchell, E., Lin, C., Bosselut, A., Finn, C., Manning, C.D.: Fast model editing at scale. arXiv preprint arXiv:2110.11309 (2021)
  * [20] Mo, S., Su, J.C., Ma, C.Y., Assran, M., Misra, I., Yu, L., Bell, S.: RoPAWS: Robust semi-supervised representation learning from uncurated data. In: The Eleventh International Conference on Learning Representations (2023), https://openreview.net/forum?id=G1H4NSATlr
  * [21] Moayeri, M., Pope, P., Balaji, Y., Feizi, S.: A comprehensive study of image classification model sensitivity to foregrounds, backgrounds, and visual attributes. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (June 2022)
  * [22] Moayeri, M., Rezaei, K., Sanjabi, M., Feizi, S.: Text-to-concept (and back) via cross-model alignment. In: International Conference on Machine Learning. pp. 25037–25060. PMLR (2023)
  * [23] Moayeri, M., Rezaei, K., Sanjabi, M., Feizi, S.: Text2concept: Concept activation vectors directly from text. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 3743–3748 (2023)
  * [24] Nauta, M., Van Bree, R., Seifert, C.: Neural prototype trees for interpretable fine-grained image recognition. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 14933–14943 (2021)
  * [25] Oikarinen, T., Das, S., Nguyen, L.M., Weng, T.W.: Label-free concept bottleneck models. In: International Conference on Learning Representations (2023)
  * [26] Panousis, K.P., Ienco, D., Marcos, D.: Sparse linear concept discovery models. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 2767–2771 (2023)
  * [27] Petroni, F., Rocktäschel, T., Lewis, P., Bakhtin, A., Wu, Y., Miller, A.H., Riedel, S.: Language models as knowledge bases? arXiv preprint arXiv:1909.01066 (2019)
  * [28] Radford, A., Kim, J.W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al.: Learning transferable visual models from natural language supervision. In: International conference on machine learning. pp. 8748–8763. PMLR (2021)
  * [29] Ribeiro, M.T., Singh, S., Guestrin, C.: " why should i trust you?" explaining the predictions of any classifier. In: Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining. pp. 1135–1144 (2016)
  * [30] Samek, W., Montavon, G., Lapuschkin, S., Anders, C.J., Müller, K.R.: Explaining deep neural networks and beyond: A review of methods and applications. Proceedings of the IEEE 109(3), 247–278 (2021)
  * [31] Selvaraju, R.R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., Batra, D.: Grad-cam: Visual explanations from deep networks via gradient-based localization. In: Proceedings of the IEEE international conference on computer vision. pp. 618–626 (2017)
  * [32] Snell, J., Swersky, K., Zemel, R.: Prototypical networks for few-shot learning. Advances in neural information processing systems 30 (2017)
  * [33] Sun, A., Yuan, Y., Ma, P., Wang, S.: Eliminating information leakage in hard concept bottleneck models with supervised, hierarchical concept learning. arXiv preprint arXiv:2402.05945 (2024)
  * [34] Sung, M., Lee, J., Yi, S., Jeon, M., Kim, S., Kang, J.: Can language models be biomedical knowledge bases? arXiv preprint arXiv:2109.07154 (2021)
  * [35] Tschandl, P., Rosendahl, C., Kittler, H.: The ham10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Scientific data 5(1), 1–9 (2018)
  * [36] Tsutsui, S., Pang, W., Wen, B.: Wbcatt: A white blood cell dataset annotated with detailed morphological attributes. arXiv preprint arXiv:2306.13531 (2023)
  * [37] Vinyals, O., Blundell, C., Lillicrap, T., Wierstra, D., et al.: Matching networks for one shot learning. Advances in neural information processing systems 29 (2016)
  * [38] Wah, C., Branson, S., Welinder, P., Perona, P., Belongie, S.: The caltech-ucsd birds-200-2011 dataset (2011)
  * [39] Wang, B., Li, L., Nakashima, Y., Nagahara, H.: Learning bottleneck concepts in image classification. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 10962–10971 (2023)
  * [40] Wang, Y., Rudner, T.G., Wilson, A.G.: Visual explanations of image-text representations via multi-modal information bottleneck attribution. Advances in Neural Information Processing Systems 36 (2024)
  * [41] Wang, Y., Rudner, T.G., Wilson, A.G.: Visual explanations of image-text representations via multi-modal information bottleneck attribution. In: Thirty-seventh Conference on Neural Information Processing Systems (2023)
  * [42] Xian, Y., Lampert, C.H., Schiele, B., Akata, Z.: Zero-shot learning—a comprehensive evaluation of the good, the bad and the ugly. IEEE transactions on pattern analysis and machine intelligence 41(9), 2251–2265 (2018)
  * [43] Xu, X., Qin, Y., Mi, L., Wang, H., Li, X.: Energy-based concept bottleneck models. In: The Twelfth International Conference on Learning Representations (2023)
  * [44] Yan, A., Wang, Y., Zhong, Y., Dong, C., He, Z., Lu, Y., Wang, W.Y., Shang, J., McAuley, J.: Learning concise and descriptive attributes for visual recognition. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. pp. 3090–3100 (2023)
  * [45] Yan, A., Wang, Y., Zhong, Y., He, Z., Karypis, P., Wang, Z., Dong, C., Gentili, A., Hsu, C.N., Shang, J., et al.: Robust and interpretable medical image classifiers via concept bottleneck models. arXiv preprint arXiv:2310.03182 (2023)
  * [46] Yang, Y., Panagopoulou, A., Zhou, S., Jin, D., Callison-Burch, C., Yatskar, M.: Language in a bottle: Language model guided concept bottlenecks for interpretable image classification. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 19187–19197 (2023)
  * [47] Yuksekgonul, M., Bianchi, F., Kalluri, P., Jurafsky, D., Zou, J.: When and why vision-language models behave like bags-of-words, and what to do about it? In: The Eleventh International Conference on Learning Representations (2022)
  * [48] Yuksekgonul, M., Wang, M., Zou, J.: Post-hoc concept bottleneck models. In: The Eleventh International Conference on Learning Representations (2023), https://openreview.net/forum?id=nA5AZ8CEyow
  * [49] Yun, T., Bhalla, U., Pavlick, E., Sun, C.: Do vision-language pretrained models learn composable primitive concepts? arXiv preprint arXiv:2203.17271 (2022)