Table of Contents
Fetching ...

Towards Compositionality in Concept Learning

Adam Stein, Aaditya Naik, Yinjun Wu, Mayur Naik, Eric Wong

TL;DR

This work identifies two salient properties of compositional concept representations, and proposes Compositional Concept Extraction (CCE) for finding concepts which obey these properties.

Abstract

Concept-based interpretability methods offer a lens into the internals of foundation models by decomposing their embeddings into high-level concepts. These concept representations are most useful when they are compositional, meaning that the individual concepts compose to explain the full sample. We show that existing unsupervised concept extraction methods find concepts which are not compositional. To automatically discover compositional concept representations, we identify two salient properties of such representations, and propose Compositional Concept Extraction (CCE) for finding concepts which obey these properties. We evaluate CCE on five different datasets over image and text data. Our evaluation shows that CCE finds more compositional concept representations than baselines and yields better accuracy on four downstream classification tasks. Code and data are available at https://github.com/adaminsky/compositional_concepts .

Towards Compositionality in Concept Learning

TL;DR

This work identifies two salient properties of compositional concept representations, and proposes Compositional Concept Extraction (CCE) for finding concepts which obey these properties.

Abstract

Concept-based interpretability methods offer a lens into the internals of foundation models by decomposing their embeddings into high-level concepts. These concept representations are most useful when they are compositional, meaning that the individual concepts compose to explain the full sample. We show that existing unsupervised concept extraction methods find concepts which are not compositional. To automatically discover compositional concept representations, we identify two salient properties of such representations, and propose Compositional Concept Extraction (CCE) for finding concepts which obey these properties. We evaluate CCE on five different datasets over image and text data. Our evaluation shows that CCE finds more compositional concept representations than baselines and yields better accuracy on four downstream classification tasks. Code and data are available at https://github.com/adaminsky/compositional_concepts .

Paper Structure

This paper contains 31 sections, 7 theorems, 41 equations, 10 figures, 16 tables, 1 algorithm.

Key Result

Lemma 2.3

For compositional concepts $c_i, c_j \in {\mathbb{C}}$, the concept score of their composition $c_k = c_i \cup c_j$ over a sample embedding $z \in {\mathbb{R}}^d$ is the composition of the concept scores of $c_i$ and $c_j$, weighted by $w_{c_i},w_{c_j}\in{\mathbb{R}}^+$:

Figures (10)

  • Figure 1: We illustrate the issue of concept compositionality with respect to concepts extracted from the embeddings of the CLIP model over the CUB dataset. Specifically, we visualize the concepts $\small{\text{white birds}}$ and $\small{\text{small birds}}$ learned by PCA repe and CCE along with their compositions. We show the top two images that best represent each concept. Ideally, composing the $\small{\text{white birds}}$ and $\small{\text{small birds}}$ concepts should result in a concept representing small white birds. This is not the case with the concepts learned by PCA. On the other hand, the concepts extracted by CCE are composable, as shown by the images of small white birds that best represent the resulting concept.
  • Figure 2: Compositionality of ground-truth concepts compared with concepts extracted by existing approaches and CCE. Figure \ref{['tab:comp-ap']} shows that the ground-truth concepts (GT) are quite compositional, but existing methods are not. Figure \ref{['fig:clevr-gt']} shows the cosine similarities between pairs of ground-truth concepts for the CLEVR dataset. The darker blue cells represent concepts that are orthogonal, while the lighter yellow ones represent non-orthogonal ones. We observe that concepts tend to be more orthogonal if they belong to different attributes.
  • Figure 3: Illustration of concepts on a dataset of cubes and spheres that are either red or blue. The concepts on the top are compositional while those on the bottom are not. Even though the concepts on the bottom can perfectly represent the four samples, they still fail to compose properly. For instance, the composition of the $\small{\text{red}}$ and $\small{\text{blue}}$ concepts can form the $\small{\text{\{red, sphere\}}}$ concept even though the $\small{\text{blue}}$ concept is not present in a red sphere.
  • Figure 4: Finding color concepts in one iteration of CCE, which can be proceeded by finding other concepts, such as shapes.
  • Figure 5: Examples of compositional concepts identified by CCE. Figures \ref{['fig:qual_cub_1']} and \ref{['fig:qual_cub_2']} are from the CUB dataset while Figures \ref{['fig:qual_news_1']} and \ref{['fig:qual_news_2']} are from the News dataset. These figures suggest that CCE can not only discover new meaningful concepts outside the ground-truth concepts, such as the $\small{\text{Birds in Hands}}$ concept in Figure \ref{['fig:qual_cub_2']}, but also compose these concepts correctly, e.g. $\small{\text{White Birds}}$ + $\small{\text{Birds in Hands}}$ = $\small{\text{White Birds in Hands}}$.
  • ...and 5 more figures

Theorems & Definitions (16)

  • Definition 2.1
  • Definition 2.2
  • Lemma 2.3
  • Definition 2.4
  • Theorem 3.1
  • Definition 5.1
  • proof
  • Lemma 2.1: curse of dimensionality
  • Lemma 2.2: Gaussian Annulus Theorem
  • Lemma 2.3
  • ...and 6 more