Slot Contrastive Networks: A Contrastive Approach for Representing Objects

Evan Racah, Sarath ChandararXiv 2020

Abstract

Unsupervised extraction of objects from low-level visual data is an important goal for further progress in machine learning. Existing approaches for representing objects without labels use structured generative models with static images. These methods focus a large amount of their capacity on reconstructing unimportant background pixels, missing low contrast or small objects. Conversely, we present a new method that avoids losses in pixel space and over-reliance on the limited signal a static image provides. Our approach takes advantage of objects' motion by learning a discriminative, time-contrastive loss in the space of slot representations, attempting to force each slot to not only capture entities that move, but capture distinct objects from the other slots. Moreover, we introduce a new quantitative evaluation metric to measure how "diverse" a set of slot vectors are, and use it to evaluate our model on 20 Atari games.

Introduction

In computer vision, an "object-centric representation" involves teaching a model to perceive a scene as a collection of individual entities rather than a simple grid of pixels. Traditional unsupervised methods typically rely on generative models that attempt to reconstruct the entire image. This approach faces two significant challenges: background noise and the erasure of small objects. Generative models often exhaust computational capacity on static background pixels, neglecting small or low-contrast objects that are critical for downstream tasks.

Slot Contrastive Networks (SCN) address these issues by moving away from pixel-level reconstruction. Instead, SCN utilizes contrastive learning to identify multiple, structured object representations without human labels, leveraging temporal signals to distinguish objects from their environment.

Methodology

The SCN architecture processes a single frame through a Convolutional Neural Network (CNN), splitting the resulting feature maps into $K$ separate "slot maps." Each map is then processed by a shared sub-network to produce a set of discrete slot vectors.

The SCN architecture extracts object-centric slot vectors from raw input frames using a CNN and intermediate slot maps.

To train these slots without supervision, the model employs two primary loss functions:

  1. Slot Saliency (Time-Contrastive Loss): This loss assumes that objects are entities that move or change over time. The model is trained to recognize the same slot across consecutive frames (positive pairs) while distinguishing them from slots at random, non-consecutive times (negative pairs).
  2. Slot Diversity: To prevent all slots from collapsing onto the most prominent object, this loss forces slots to remain distinct. It encourages the model to differentiate between representations from the same slot at different times versus representations from two different slots.

Experimental Setup

The model was evaluated on 20 Atari games using the AtariARI dataset. Training involved 100,000 frames per game collected via a random agent. To evaluate the quality of the learned representations, the authors used ground-truth object coordinates (x, y positions) to test how accurately the slot vectors could predict object locations through linear probing.

Results and Analysis

SCN achieved an average $R^2$ score of 0.45, matching the performance of the state-of-the-art Contrastive Structured World Models (CSWM) and significantly outperforming a random CNN baseline (0.39). Notably, SCN demonstrated superior performance in games characterized by complex or unpredictable motion, such as Boxing (0.68 vs. 0.35) and Space Invaders (0.42 vs. 0.21).

Performance comparison ($R^2$ scores) of SCN against baselines across 20 Atari games.

The core innovation lies in using motion as a supervisor. By optimizing for temporal consistency in slot space, the model naturally ignores static backgrounds. Furthermore, SCN's discriminative nature makes it more robust than predictive models in environments where future states are difficult to forecast.

Discussion and Future Work

While SCN is highly accurate, its representations currently lack the modularity seen in models like CSWM; information about a single object is often distributed across multiple slots. Additionally, the model requires a pre-set number of slots ($K$), which does not account for the dynamic number of objects found in real-world scenes. Future research may explore incorporating "hard" spatial attention or routing modules to more explicitly force object separation through architectural inductive biases rather than relying solely on loss functions.

Summary updated

BibTeX
@misc{racah2020slot,
  author = {Evan Racah and Sarath Chandar},
  title = {{Slot Contrastive Networks: A Contrastive Approach for Representing Objects}},
  year = {2020},
  eprint = {2007.09294},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.09294},
}
Figure