SCAN: Learning Hierarchical Compositional Visual Concepts

Irina Higgins, Nicolas Sonnerat, Loic Matthey, Arka Pal, Christopher P Burgess, Matko Bošnjak, Murray Shanahan, Matthew Botvinick, Demis Hassabis, Alexander LerchnerICLR 2018

How do humans learn so much from so little? While a state-of-the-art deep learning model might need thousands of labeled images to recognize a "red suitcase," a child can see a few examples and immediately understand the concept. More impressively, that child can then "imagine" a blue suitcase, even if they’ve never seen one, by recombining the concepts of "blue" and "suitcase."

In their paper "SCAN: Learning Hierarchical Compositional Visual Concepts," researchers from DeepMind introduce the Symbol-Concept Association Network (SCAN). This framework moves away from "data-hungry" supervised learning toward a more human-like approach: discovering visual building blocks on its own and then pinning labels to them using just a handful of examples.

TL;DR

SCAN is a framework that learns to ground symbolic labels in "disentangled" visual primitives discovered through unsupervised learning. By organizing these primitives into a hierarchical structure, SCAN can perform bi-directional inference (images to symbols and vice versa) and "imagine" entirely novel visual concepts using logical operators like AND, IGNORE, and IN COMMON.

What Problem Does This Paper Address?

Traditional deep learning models are often "black boxes" that require massive amounts of human-labeled data. They tend to overfit to their training sets and lack compositionality—the ability to reuse a finite set of primitives to create an infinite variety of new ideas.

Hierarchical Concept Representation

If a model learns "red suitcase" as a single, monolithic feature, it can't easily generalize to a "blue suitcase." The authors argue that for AI to reach human-level intelligence, it needs to learn concepts as abstractions over independent visual primitives (like color, shape, and size) and understand how those concepts relate to one another in a hierarchy.

Methods

The SCAN architecture works in two main stages:

SCAN Architecture and KL Divergence
  1. Unsupervised Feature Discovery: First, the model uses a $\beta$-VAE (specifically a version using a Denoising Autoencoder loss) to look at thousands of unlabeled images. It learns to "disentangle" the scene into independent latent factors—one neuron might represent object color, another wall color, and another object shape.
  2. Symbol Association: Once these visual primitives are learned, the SCAN module learns to associate symbols (words/labels) with specific distributions in that latent space.

The Secret Sauce: Forward KL Divergence. Most generative models use "reverse" KL divergence, which tends to be "mode-seeking" (picking one specific example). SCAN uses forward KL divergence, which is "mode-covering." This allows a broad concept like "red" to encompass many different red objects, while "abstracting away" irrelevant factors like the background or lighting by defaulting them to a broad "prior" distribution.

Finally, the authors introduce Logical Recombination Operators. By training a small module on operations like AND (set union), IN COMMON (intersection), and IGNORE (difference), the model can traverse the concept hierarchy to create new nodes it has never seen before.

Datasets

The researchers evaluated SCAN on three distinct datasets:

  • DeepMind Lab: A synthetic 3D environment where factors like wall, floor, and object colors are strictly controlled.
  • CelebA: A real-world dataset of 200,000 celebrity faces with 40 attribute labels (e.g., "smiling," "eyeglasses," "pale skin").
  • dSprites: A 2D shape dataset used to test the model's understanding of position, scale, and rotation.

Key Insights and Ideas

  • Abstraction as Subsets: A concept is defined as a subset of visual primitives. "Red suitcase" specifies the color and the object identity but leaves the "wall color" primitive empty (abstracted).
  • Fast Symbol Association: Because the visual primitives are already learned via unsupervised learning, SCAN only needs 5 to 10 examples to learn a new symbolic concept.
  • Imagination via Logic: By learning the logic of how concepts combine (e.g., [Blue Wall] AND [Suitcase]), the model can generate accurate images of scenes that were never present in its training data.
  • Bi-directional Flexibility: SCAN isn't just a classifier or an image generator; it's both. It can generate a diverse set of images from a prompt (sym2img) or describe a complex scene with multiple synonyms (img2sym).

Key Results

  • Superior Diversity: Compared to other multimodal models like JMVAE or TrELBO, SCAN produced significantly more diverse images for a given prompt. While other models often "collapsed" to a single type of image, SCAN correctly varied the "irrelevant" factors (like background color) while keeping the "concept" factors (like object color) stable.
  • High Accuracy: SCAN achieved higher accuracy in generating the correct attributes from symbols, even when tested on "held-out" concepts it had never seen during training.
  • Zero-Shot Generalization: On the CelebA dataset, SCAN learned to interpret continuous variability. For example, it could generate faces with varying degrees of "pale skin" or "attractive" features, even though it was only trained on binary labels.

Limitations and Future Work

  • Dependence on Disentanglement: SCAN’s performance is heavily gated by the quality of the initial $\beta$-VAE. If the unsupervised stage fails to separate "object color" from "object shape," the symbolic stage will struggle to learn those concepts independently.
  • Dataset Biases: The authors noted that SCAN picked up implicit biases in the CelebA dataset (e.g., associating the label "attractive" primarily with young, white females), reflecting the skewed nature of the training data.
  • Future Directions: The authors suggest applying SCAN to more complex symbol representations like word embeddings and exploring its use in reinforcement learning, where an agent could use these hierarchical concepts for better planning and communication.

Summary updated

BibTeX
@inproceedings{higgins2018scan,
  author = {Irina Higgins and Nicolas Sonnerat and Loic Matthey and Arka Pal and Christopher P Burgess and Matko Bošnjak and Murray Shanahan and Matthew Botvinick and Demis Hassabis and Alexander Lerchner},
  title = {{SCAN: Learning Hierarchical Compositional Visual Concepts}},
  booktitle = {International Conference on Learning Representations},
  year = {2018},
  url = {https://openreview.net/forum?id=rkN2Il-RZ},
}
Figure