Learning Compositional Representations for Few-Shot Recognition

Pavel Tokmakov, Yu-Xiong Wang, Martial Hebert

Abstract

Deep learning models typically require vast amounts of labeled data to learn new concepts. This paper introduces a regularization technique that encourages models to learn compositional representations—interpretable attributes like "curvy beak" or "grey wings." By decomposing objects into shared building blocks, models can recognize novel categories from minimal examples by identifying new combinations of familiar parts.

Introduction: The Challenge of Few-Shot Learning

Modern neural networks are notoriously data-hungry, whereas humans can identify a new species after seeing just one or two instances. This human "superpower" stems from compositional thinking: we perceive a bird as a specific combination of discrete features. Standard deep learning models, however, produce "black box" features that lack this structure, hindering their ability to generalize to novel categories with limited data.

Compositional learning allows a model to recognize a novel bird (green box) as a new combination of attributes seen in other species (red boxes).

Methodology: Compositionality as a Regularizer

The authors propose a compositionality regularizer applied during the training of a "base" model. Using category-level attribute annotations, the network's feature space is guided to reflect the underlying structure of the data.

Two primary variants of this constraint are explored:

  1. Hard Constraints: The image embedding is forced to be exactly equal to the sum of its constituent attribute embeddings.
  2. Soft Constraints: This relaxed version maximizes similarity between the image embedding and its attributes while allowing a "residual" component to encode non-annotated information like background or lighting.
Diagram (b) illustrates the Hard Constraint where the total representation equals the sum of parts. Diagram (c) shows the Soft Constraint, incorporating a residual term for non-annotated features.

To ensure distinct features, an orthogonality constraint is applied, making attribute embeddings (e.g., shape vs. color) as independent as possible. Notably, while attributes are required for base training, they are not needed for the novel categories encountered during inference.

Experimental Evaluation

The approach was validated on three benchmarks: CUB-200-2011 (birds), SUN397 (scenes), and a subset of ImageNet. The researchers found that category-level labels could be gathered quickly—386 categories in just 3 days—making the approach highly practical.

Key Results

The compositional approach consistently outperformed standard few-shot baselines and meta-learning algorithms:

  • Performance Gains: On SUN397, the model achieved an 8% improvement in top-5 accuracy for 1-shot recognition compared to strong baselines.
  • Interpretable Representations: Network Dissection revealed that regularized models naturally developed neurons responding to specific parts (e.g., "roofs" or "windows"), unlike the muddled representations of standard models.
  • Data Efficiency: The method proved robust even with incomplete attribute data, showing significant gains using only 25% of available labels.

Conclusion and Future Directions

Forcing models to "think in parts" provides a powerful inductive bias for few-shot learning. While the current method relies on predefined attribute vocabularies, it demonstrates that category-level labeling is a highly efficient way to bootstrap robust, interpretable features. Future work may focus on the automatic discovery of these compositional parts without human intervention.

Summary updated

BibTeX
@misc{tokmakov2018learning,
  author = {Pavel Tokmakov and Yu-Xiong Wang and Martial Hebert},
  title = {{Learning Compositional Representations for Few-Shot Recognition}},
  year = {2018},
  eprint = {1812.09213},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1812.09213},
}
Figure