Deep Feature Factorization for Concept Discovery

Edo Collins, Radhakrishna Achanta, Sabine Süsstrunk

Deep Feature Factorization (DFF) is a simple yet elegant method that applies Non-negative Matrix Factorization (NMF) to the activations of a pre-trained CNN to discover semantic "concepts" (objects and parts) without any supervision. By treating deep features as a "bag of features," DFF can localize similar structures across different images, providing both a tool for neural network interpretability and a state-of-the-art approach for co-localization and co-segmentation.

The Challenge of Unsupervised Discovery

While Convolutional Neural Networks (CNNs) are incredibly powerful, they are often criticized as "black boxes." Existing visualization methods like Grad-CAM typically require a specific class label to generate a heat map. DFF addresses the challenge of unsupervised concept discovery, answering the question: "What in this picture is the same as in these other pictures?" without being told what the objects are. This is crucial for understanding the hierarchical features a network has learned and for automatically finding common objects across image sets without manual annotations.

Methodology: NMF on Deep Features

The core of DFF is the application of Non-negative Matrix Factorization (NMF) to the internal activations of a CNN.

  1. Feature Extraction: Images are passed through a pre-trained CNN (e.g., VGG-19 or ResNet-101).
  2. Matrix Construction: Activations from a deep convolutional layer ($h \times w \times c$) are flattened and concatenated across multiple images to create a large matrix $A$.
  3. Factorization: $A$ is decomposed into two non-negative matrices: $A \approx HW$.
  4. $W$ (The Dictionary): Each row represents a "concept" or cluster centroid in the high-dimensional feature space.
  5. $H$ (The Coefficients): These indicate the presence of each concept at each spatial location.
  6. Visualization: Reshaping and upsampling the columns of $H$ produces heat maps highlighting specific semantic concepts (like "wheels" or "heads") across the image set.

Unlike PCA, NMF's non-negativity ensures that concepts are combined additively, aligning with the intuition that an object is the sum of its parts.

Key Insights and Emergent Properties

DFF reveals several powerful properties of deep features:

  • Emergent Hierarchy: By increasing the number of factors ($k$), DFF reveals a hierarchy. At low $k$, it might highlight a whole object; at higher $k$, it separates it into constituent parts.
  • Zero-Shot Discovery: DFF can find concepts in image classes the network was never trained on. For example, a network trained on ImageNet (which lacks a "Pyramid" class) can still factorize images of pyramids because the learned features are general enough.
  • Invariance: Discovered concepts are remarkably invariant to pose and viewpoint.
DFF applied to a set of pyramid images with k=4, demonstrating the discovery of semantic concepts like the pyramid structure (red), foreground subjects (orange/green), and the ground (blue).

Evaluation and Results

The authors evaluated DFF on standard benchmarks:

  • Co-localization: On PASCAL VOC 2007, DFF achieved a mean CorLoc score of 43.51, outperforming more complex methods. It was particularly effective for the "dog" class, improving scores by 16%.
  • Co-segmentation: On the iCoseg dataset, DFF produced results comparable to supervised methods.
  • Part Discovery: In PASCAL-Parts, DFF successfully localized fine-grained parts. For the "cow" class, it achieved an IoU of 45.20% for heads, competitive with fully supervised models.

Limitations

Despite its efficiency (processing over 6,000 images in less than a millisecond per image), DFF has limitations. The spatial resolution of deep layers is low, leading to coarse initial heat maps. Additionally, the number of factors $k$ must be predefined; an incorrect $k$ can lead to non-interpretable fragments or background interference. Future work may focus on automatically determining $k$ or integrating DFF into the training process to encourage disentangled representations.

Summary updated

BibTeX
@inproceedings{collins2018deep,
  author = {Edo Collins and Radhakrishna Achanta and Sabine Süsstrunk},
  title = {{Deep Feature Factorization for Concept Discovery}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  doi = {10.1007/978-3-030-01264-9\_21},
}
Figure