A Case for Object Compositionality in Deep Generative Models of Images

Sjoerd van Steenkiste, Karol Kurach, Sylvain Gelly · DOI

Abstract

Deep generative models seek to recover the process with which the observed data was generated. They may be used to synthesize new samples or to subsequently extract representations. Successful approaches in the domain of images are driven by several core inductive biases. However, a bias to account for the compositional way in which humans structure a visual scene in terms of objects has frequently been overlooked. In this work, we investigate object compositionality as an inductive bias for Generative Adversarial Networks (GANs). We present a minimal modification of a standard generator to incorporate this inductive bias and find that it reliably learns to generate images as compositions of objects. Using this general design as a backbone, we then propose two useful extensions to incorporate dependencies among objects and background. We extensively evaluate our approach on several multi-object image datasets and highlight the merits of incorporating structure for representation learning purposes. In particular, we find that our structured GANs are better at generating multi-object images that are more faithful to the reference distribution. More so, we demonstrate how, by leveraging the structure of the learned generative process, one can 'invert' the learned generative model to perform unsupervised instance segmentation. On the challenging CLEVR dataset, it is shown how our approach is able to improve over other recent purely unsupervised object-centric approaches to image generation.

Introduction

Most deep generative models, including standard Generative Adversarial Networks (GANs), treat an image as a monolithic block of pixels. While they can produce realistic faces or landscapes, they often lack an inherent understanding of the world's compositional structure—specifically, that scenes are composed of discrete objects. Without this "object-centric" view, standard GANs struggle with scenes containing multiple interacting items, often "entangling" representations so that changing one object inadvertently warps another.

This paper introduces a simple yet powerful architectural change to GANs that forces them to generate images as a collection of independent objects and a background. By incorporating "object compositionality" as an inductive bias, the model not only produces more realistic multi-object scenes but also learns to perform unsupervised instance segmentation—identifying individual objects without ever seeing a label.

The $k$-GAN Architecture

The authors propose a model called $k$-GAN, which introduces three key modifications to the standard GAN generator:

  1. Object Compositionality: Instead of one large generator, the model uses $K$ copies of a smaller "object generator" that share the same weights. Each copy receives its own latent vector ($z_i$) and generates one object. Weight sharing forces the model to learn a general "visual primitive" that can be reused across the scene.
  2. Relational Structure: To account for dependencies (e.g., shadows or groupings), a "relational stage" using Multi-Head Dot-Product Attention allows latent vectors to coordinate properties before image generation.
  3. Background and Alpha Compositing: A separate generator handles the background. The model uses alpha compositing (layering) to combine everything. Each object generator produces both an RGB image and an alpha mask, allowing the model to handle occlusions realistically.
The $k$-GAN generation process: individual generators create scene components (Generator 0 for background, Generators 1-4 for objects) that are then alpha-composited into a final image.

Evaluation and Results

The researchers evaluated $k$-GAN on several multi-object benchmarks, including Multi-MNIST variants, CIFAR10 + MM, and the complex CLEVR dataset.

Key Performance Metrics

  • Image Quality: $k$-GAN consistently outperformed standard GAN baselines in terms of Fréchet Inception Distance (FID), particularly on datasets requiring relational understanding.
  • Human Preference: In human studies, participants significantly preferred $k$-GAN images, noting better generation of recognizable, distinct objects.
  • Segmentation Accuracy: By "inverting" the model and using its generated alpha masks as labels, the authors achieved high-quality unsupervised instance segmentation. On Multi-MNIST, Adjusted Rand Index (ARI) scores reached 0.81–0.95, nearly matching supervised models.
  • CLEVR Success: On the 3D-rendered CLEVR dataset, $k$-GAN outperformed other recent unsupervised object-centric models like IODINE in terms of image fidelity.

Discussion and Insights

The core insight is that structure acts as a teacher. By restricting the architecture through shared weights and a layering process, the model is forced to discover the concept of an "object" as the most efficient way to satisfy the discriminator. This design naturally leads to disentanglement; because each object has its own latent vector, one can change the color or shape of a specific item without affecting others.

Limitations

Despite its success, $k$-GAN has limitations. The alpha compositing uses a fixed layering order, which can occasionally lead to perspective errors. Additionally, the number of object generators ($K$) must be specified in advance. While the model can leave generators "empty," it cannot handle scenes with more than $K$ objects. Future work may involve making the discriminator object-aware or implementing dynamic layering.

Summary updated

BibTeX
@misc{steenkiste2018case,
  author = {Sjoerd van Steenkiste and Karol Kurach and Sylvain Gelly},
  title = {{A Case for Object Compositionality in Deep Generative Models of Images}},
  year = {2018},
  eprint = {1810.10340},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1810.10340},
}
Figure