COAT: Measuring Object Compositionality in Emergent Representations

Sirui Xie, Ari S. Morcos, Song-Chun Zhu, Ramakrishna VedantamICML 2022

Introduction

A major goal in computer vision is achieving "objectness"—learning representations that can decompose a complex, multi-object scene into individual constituent objects and flexibly recombine them. However, evaluating whether an AI model has truly learned an object-centric representation remains a significant challenge.

To address this, researchers have introduced the Compositional Object Algebra Test (COAT), a new, decoder-free metric designed to evaluate object-centric representations. By applying the parallelogram rule (analogous to word2vec analogies) to scene representations, COAT reveals a surprising "negative" result: current state-of-the-art object-centric models often fail to significantly outperform a simple pixel-space baseline when scenes involve heavy occlusion.

The Problem with Current Metrics

Existing metrics for object-centric learning, such as the Adjusted Rand Index (ARI), typically require a generative decoder to map latent "slots" back to pixel masks. This reliance on decoders creates two primary problems:

  1. Architectural Constraints: It only works for specific "slot-based" architectures (like Slot Attention) and cannot be easily applied to discriminative models.
  2. Misaligned Objectives: It measures how well a model reconstructs pixels, rather than how it structures its internal knowledge.

The authors argue that a truly object-centric representation should be compositional. Adding an object to Scene A to get Scene B should involve the exact same "vector shift" in latent space as adding that same object to Scene C to get Scene D.

The COAT Methodology: A Geometric Lens

COAT measures compositionality through a purely geometric lens in the model's latent space, removing the need for a decoder.

The Parallelogram Test

If a representation is compositional, the transformation vector between two scenes should be consistent. Given four images $A, B, C, D$ where $B$ is $A$ plus a specific object, and $D$ is $C$ plus that same object, we expect the latent representations ($z$) to satisfy:

$$z_B - z_A \approx z_D - z_C$$

This relationship forms a parallelogram in the representation space.

The parallelogram rule in latent space: compositional representations form a closed parallelogram.

Hard Negatives and Shortcuts

To ensure models aren't "cheating" (e.g., by simply detecting that any change occurred rather than the specific object addition), COAT employs hard negatives ($D'$). A model only passes the test if the loss for the true scene $D$ is significantly lower than for $D'$ cases where:

  • An object is dropped or a completely different object is added.
  • An attribute (such as color, shape, or size) is slightly altered.
  • The "pixel-level" linear combination ($B - A + C$) is used as a baseline.

Because different models have different feature scales and concentrations, COAT also includes a normalization step that corrects for chance, ensuring the score is calibrated across diverse architectures.

Dataset Design: The Necessity of Strong Occlusion

The study utilizes the CLEVR domain, a standard benchmark for multi-object reasoning. However, to make the COAT metric robust, the authors introduce two critical modifications:

  1. Strong Occlusion: They specifically sample scenes where objects overlap significantly. In "weakly occluded" scenes, even raw pixels are trivially compositional (adding pixel values works perfectly). Strong occlusion forces the model to form abstract, structural representations to pass the test.
  2. Colorful Backgrounds: They vary background colors to ensure models represent the entire scene context, not just the foreground objects.
Comparison of pixel-level addition in weakly vs. strongly occluded scenes.

Key Insights and Results

The authors evaluated several models using COAT, including Slot Attention, IODINE, and MoCo v2 (a discriminative model). The results yielded several critical insights:

  • Compositionality $\neq$ Disentanglement: A representation can be perfectly compositional (the parallelogram holds) even if it isn't strictly "disentangled" (where each dimension corresponds to one physical attribute). This makes COAT a broader and more flexible metric than traditional disentanglement scores.
  • The Pixel Baseline is Tough: In many cases, raw pixel-space addition is surprisingly effective. If a learned representation doesn't beat the pixel baseline in occluded scenes, it hasn't truly "abstracted" the concept of an object.
  • Slot Attention's "Precision" Problem: While Slot Attention scores high on reconstruction metrics (ARI), COAT reveals it often assigns multiple slots to the same object. This "over-segmentation" breaks the clean algebraic structure needed for compositionality. Initially, Slot Attention performed poorly ($L_2$-COAT of 48.55%) compared to the pixel baseline (75.47%). However, after post-processing to remove duplicate and "invisible" slots, it improved to 77.02%, finally surpassing the pixel baseline.
  • Other Architectures: IODINE passed hard-negative tests but struggled to disentangle foreground from background, resulting in a lower score (47.52%). Vanilla VAEs/Autoencoders generally failed the hard-negative tests entirely. MoCo v2 showed some promise but remained significantly worse than the pixel baseline in overall compositionality.

Limitations and Future Directions

Currently, COAT requires explicit supervision of transformations—knowing exactly what object was added to create the test tuples ($A, B, C, D$)—and is evaluated on synthetic data (CLEVR).

However, the authors suggest a promising future direction: video data. Temporally close frames in video naturally represent simple object transformations (movement, appearance changes). Leveraging video could allow researchers to evaluate compositionality in much more complex, real-world representations without requiring manual annotation.

Summary updated

BibTeX
@inproceedings{xie2022coat,
  author = {Sirui Xie and Ari S. Morcos and Song-Chun Zhu and Ramakrishna Vedantam},
  title = {{COAT: Measuring Object Compositionality in Emergent Representations}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=ULoRcABdIEm},
}
Figure