Learning and generalization of compositional representations of visual scenes

Edward Paxon Frady, Spencer J. Kent, Quinn Tran, Pentti Kanerva, Bruno A. Olshausen, Friedrich T. SommerarXiv 2023

Abstract

Complex visual scenes that are composed of multiple objects, each with attributes such as object name, location, pose, and color, are challenging to describe for training neural networks. Usually, deep learning networks are trained supervised by categorical scene descriptions. The common categorical description of a scene contains the names of individual objects but lacks information about other attributes. Here, we use distributed representations of object attributes and vector operations in a vector symbolic architecture (VSA) to create a full compositional description of a scene in a high-dimensional vector. To control the scene composition, we use artificial images composed of multiple, translated and colored MNIST digits. In contrast to learning category labels, here we train deep neural networks to output the full compositional vector description of an input image. The output of the deep network can then be interpreted by a VSA resonator network to extract object identity or other properties of individual objects. We evaluate the performance and generalization properties of the system on randomly generated scenes. Specifically, we show that the network is able to learn the task and generalize to unseen digit shapes and scene configurations. Further, the generalization ability of the trained model is limited. For example, with a gap in the training data, like an object not shown in a particular image location during training, the learning does not automatically fill this gap.

Introduction

Standard deep learning models excel at categorization but often treat scene descriptions as flat labels. This approach lacks explicit information about the relationships between objects and their attributes—such as spatial location, color, or pose. The fundamental challenge lies in creating a "compositional" representation: a single mathematical entity describing a complex scene as a sum of its parts. While humans intuitively understand that a "red 7" in a corner is a combination of "red," "7," and "corner," neural networks often treat every unique combination as a distinct category, leading to a combinatorial explosion of required training data.

Methods

The proposed architecture bridges deep learning with Vector Symbolic Architectures (VSA), which use high-dimensional vectors (e.g., 1,000+ dimensions) to represent information.

Compositional Encoding

A scene vector ($s$) is defined using two primary VSA operations:

  • Binding ($\otimes$): An element-wise multiplication that "glues" attributes together (e.g., $C^{Cyan} \otimes D^7 \otimes V^{Top} \otimes H^{Left}$).
  • Superposition ($+$): Vector addition that allows multiple bound objects to coexist in the same vector space.
The system architecture maps an input image to a compositional VSA representation via a neural network.

Architecture and Inference

The system consists of a multi-layer perceptron (MLP) trained to map an input image directly to the high-dimensional VSA scene vector. To interpret this vector, a Resonator Network—a specialized recurrent neural network—iteratively factors the scene vector to extract individual object properties.

The Resonator Circuit iteratively factors the input vector to identify object components like color, digit, and position.

To handle multiple objects, the system employs an "explaining away" mechanism: once the resonator identifies one object, its vector is subtracted from the scene vector, and the process repeats for remaining objects.

Datasets

The model was trained on a synthetic dataset of 550,000 scenes containing 1 to 3 random MNIST digits. Each digit was assigned one of 7 colors and placed in one of 9 grid locations (3x3). Evaluation focused on generalization to unseen digit shapes, novel attribute combinations, and scenes with 4 digits.

Results

The system achieved over 90% accuracy for single-object scenes and correctly identified both objects in two-object scenes nearly 80% of the time. Notably, the model demonstrated zero-shot capabilities, successfully decomposing scenes with 4 objects despite being trained only on 1–3 objects. The resonator network provided significant noise tolerance, "cleaning up" imperfect outputs from the deep network to find correct attributes.

However, a significant "conjunction gap" was observed: the network failed to generalize across missing feature conjunctions. If a specific digit (e.g., "7") was never shown in a specific location (e.g., "bottom-right") during training, the network could not recognize it there during testing, even if it had seen "7s" elsewhere and other digits in that location.

Discussion

The results demonstrate that neural networks can be trained to produce structured, symbolic VSA outputs that are robust and somewhat generalizable. However, the lack of compositional transfer suggests that "naive" supervised learning does not automatically acquire independent rules of composition, such as translation invariance. Future work should explore incorporating VSA algebra directly into the network structure to impose stronger inductive biases, potentially enabling models to learn from less data and bridge conjunction gaps.

Summary updated

BibTeX
@misc{frady2023learning,
  author = {Edward Paxon Frady and Spencer J. Kent and Quinn Tran and Pentti Kanerva and Bruno A. Olshausen and Friedrich T. Sommer},
  title = {{Learning and generalization of compositional representations of visual scenes}},
  year = {2023},
  eprint = {2303.13691},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.13691},
}
Figure