Attention over Learned Object Embeddings Enables Complex Visual Reasoning

David Ding, Felix Hill, Adam Santoro, Malcolm Reynolds, Matt M. Botvinick

TL;DR

Neural networks often struggle with complex visual reasoning tasks like causal inference or object permanence, frequently losing out to brittle, task-specific neuro-symbolic models. This paper introduces Aloe, a general-purpose architecture that combines unsupervised object segmentation, global self-attention, and a self-supervised dynamics loss to achieve state-of-the-art performance across three distinct spatio-temporal reasoning benchmarks—without requiring any task-specific modifications.

What Problem Does This Paper Address?

While deep learning excels at perceptual tasks (like identifying a car in an image), it often falls short on tasks requiring higher-level spatio-temporal or causal reasoning, such as predicting what will happen after a collision or tracking a hidden object over time. To solve these complex tasks, researchers typically build "neuro-symbolic" pipeline models that hard-code the logic of a specific task into a symbolic module.

However, these bespoke models are brittle. A neuro-symbolic model built to understand collisions cannot easily be adapted for object tracking without a complete rewrite of its logic engine. The authors aim to create a single, general-purpose neural network architecture that can perform complex visual reasoning across multiple domains without relying on task-specific hand-engineering.

Methods

The proposed model, Aloe (Attention over Learned Object Embeddings), relies on three key pillars:

The Aloe architecture combining MONet object extraction, a global Transformer, and self-supervised dynamics learning.
  1. Object-Centric Representations: Instead of feeding raw pixels or grid-based CNN features into the reasoning module, Aloe uses MONet, an unsupervised object segmentation algorithm. MONet extracts discrete "object embeddings" for each item in a video frame.
  2. Global Self-Attention: A Transformer processes the entire sequence of object embeddings across all frames simultaneously (along with text embeddings for question-answering tasks). This "global" attention allows an object in one frame to directly attend to any object in any other frame, rather than processing frames hierarchically.
  3. Self-Supervised Dynamics Learning: Inspired by BERT's masked language modeling, Aloe employs an auxiliary loss during training. It masks out certain object embeddings and forces the Transformer to predict the missing objects based on the surrounding spatio-temporal context. This effectively teaches the model the underlying physics and dynamics of the scene.
Various masking strategies used for self-supervised dynamics learning, teaching the model to predict missing objects or scenes.

Datasets

The authors evaluated Aloe on three synthetic visual reasoning benchmarks:

  • CLEVRER: A dataset of colliding objects testing descriptive, explanatory, predictive, and counterfactual reasoning (e.g., "What would happen if the cylinder were removed?").
  • CATER: An object-tracking and permanence dataset where the model must locate a target object (the "snitch") that may be hidden under moving containers.
  • ACRE: A causal induction dataset inspired by the "Blicket" psychology task, requiring the model to deduce which objects cause a machine to light up. It tests complex logical concepts like backward-blocking and screened-off reasoning.

Key Insights and Ideas

  • Discretization matters: Representing video data as discrete objects rather than spatial patches (like ResNet hyperpixels) is crucial for physical reasoning. Ablations showed a massive performance drop when switching from MONet object embeddings to ResNet features.
  • Global over hierarchical attention: Allowing objects to attend to any other object across time (global attention) outperformed hierarchical models (where objects attend within a frame, and then frames attend to frames). Global attention prevents the "muddling" of object features across time steps.
  • Self-supervision teaches dynamics: The BERT-style masking of object embeddings forces the network to learn scene dynamics. This auxiliary loss acts as a powerful regularizer, dramatically improving data efficiency.
  • Generality beats specialization: A single architecture with the right "soft biases" (objects + attention + dynamics prediction) can outperform highly specialized, hard-coded symbolic logic engines across entirely different reasoning domains.

Key Results

  • CLEVRER: Aloe achieved SOTA across all question types. Most notably, on counterfactual questions—traditionally the hardest for pure neural networks—Aloe hit 75.6% accuracy, crushing the previous best of 46.5% (DCL). It also matched previous SOTA overall performance using 40% less training data.
  • CATER: Aloe outperformed existing models, achieving 59.7% Top-1 accuracy on the moving camera variant (compared to the previous best of 38.6% by R3D+NL).
  • ACRE: Aloe achieved an overall accuracy of 94%, vastly outperforming the top neuro-symbolic model (67%). On the highly complex "backward-blocking" causal inference task, Aloe scored 94.48% compared to the previous best of 16.06%.

Limitations and Future Work

  • Synthetic Data: Aloe has only been tested on synthetic datasets. Real-world video data is much messier, and unsupervised object segmentation (like MONet) may struggle to extract clean object embeddings from complex, noisy scenes.
  • Interpretability: Unlike neuro-symbolic models which execute readable logic programs, Aloe's reasoning is buried in Transformer attention weights. While attention maps provide some insight, they are softer and harder to interpret than explicit symbolic computation.
  • Future Work: The authors suggest applying this architecture to upcoming real-world spatio-temporal datasets (like Traffic QA) and exploring different self-supervised masking strategies (e.g., contrastive losses for long-horizon prediction) to further improve representation learning.

Summary updated

BibTeX
@inproceedings{ding2021attention,
  author = {David Ding and Felix Hill and Adam Santoro and Malcolm Reynolds and Matt M. Botvinick},
  title = {{Attention over Learned Object Embeddings Enables Complex Visual Reasoning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=nL4770OXhB},
}
Figure