MAREO: Memory- and Attention- based visual REasOning

Mohit Vaishnav, Thomas SerreOpenReview 2022 · OpenReview

TL;DR

This paper introduces MAREO, a novel neural architecture for visual reasoning that mimics human cognitive processes by dynamically shifting attention to relevant visual information and storing it in a memory bank. MAREO demonstrates impressive zero-shot generalization and compositional learning capabilities, outperforming existing models on challenging visual reasoning benchmarks.

What Problem Does This Paper Address?

Modern AI systems still lag behind humans in flexibly parsing and understanding complex visual scenes, particularly in tasks requiring abstract reasoning. While attention and memory are known to be crucial for human visual reasoning, current AI models often struggle to integrate these mechanisms effectively. This paper addresses the challenge of building AI systems that can dynamically attend to and selectively retain visual information, mirroring how humans learn and combine elementary visual operations to solve complex reasoning problems.

Methods

MAREO is built upon an active vision theory, proposing that visual reasoning is achieved through sequences of attention shifts that route task-relevant information into a memory bank. The architecture comprises three key components:

  • Encoder Module: Extracts a low-dimensional representation of the input image.
  • Controller Module: Employs an LSTM to generate attention queries, guiding a multi-head transformer-based attention mechanism. This mechanism dynamically shifts attention to task-relevant locations and selects visual elements to be stored in the memory bank.
  • Reasoning Module: Operates on the stored information in the memory bank to identify relationships between objects and make a final decision. This module is designed to learn elementary operations that can be composed to solve complex reasoning tasks.

A key novelty is the "guided attention" mechanism, which uses internally generated queries to direct attention, contrasting with standard self-attention that processes all features simultaneously.

Datasets

The paper evaluates MAREO on two primary datasets:

  • Synthetic Visual Reasoning Test (SVRT): A dataset comprising 23 binary classification challenges, each representing a single rule or a composition of multiple rules.
  • Abstract Reasoning Task (ART): A challenge with four types of visual reasoning tasks (Same-Different, Relation Match to Sample, Distribution of 3, and Identity Rules), designed to test generalization across different character sets.

Key Insights and Ideas

  • Attention as a Dynamic Routine: MAREO's success highlights the power of dynamic, task-dependent attention shifts, rather than static self-attention, for complex visual reasoning. This aligns with cognitive theories of active vision.
  • Compositionality is Key: The architecture's ability to learn and combine elementary visual operations (visual routines) allows it to generalize to novel tasks efficiently, demonstrating a form of compositional intelligence.
  • Bridging the Human-AI Gap: By drawing inspiration from cognitive science, MAREO offers a computational model that better reflects human visual reasoning capabilities, particularly in its flexible use of attention and memory.
  • Zero-Shot Generalization: MAREO can generalize to entirely new reasoning tasks without explicit re-training, suggesting it learns abstract rules rather than memorizing specific task features.

Key Results

  • State-of-the-Art Performance: MAREO achieves state-of-the-art accuracy on both the SVRT and ART datasets, outperforming established baselines like Relational Networks (RN) and Transformer-based models.
  • Data Efficiency: The model demonstrates robust performance with significantly fewer training samples compared to some baselines.
  • Robustness: MAREO shows resilience to noise and scale variations, indicating its ability to learn invariant representations.
  • Compositionality: The model successfully learns new rules by composing previously learned elementary operations, achieving high accuracy on novel tasks with minimal fine-tuning.
  • Zero-Shot Generalization: MAREO exhibits strong zero-shot generalization capabilities, transferring learned abstract rules to unseen tasks.

Limitations and Future Work

  • Fixed Time Steps: The current MAREO architecture operates with a fixed number of time steps. Future work could explore a more flexible approach where the model dynamically allocates time steps based on task complexity.
  • Covert Attention: MAREO currently models covert attention (without saccades). Extending it to incorporate overt attention (with saccades) and different acuities (fovea vs. periphery) could further enhance its biological plausibility.
  • Computational Demand: While efficient, the model's computational demands for complex tasks could be further optimized.

The authors suggest that extending MAREO to handle overt attention and varying acuity could lead to even more biologically plausible and powerful visual reasoning systems.

Summary updated

Abstract

Humans continue to outperform modern AI systems in their ability to parse and understand complex visual scenes flexibly. Attention and memory are two systems known to play a critical role in our ability to selectively maintain and manipulate behaviorally-relevant visual information to solve some of the most challenging visual reasoning tasks. Here, we present a novel architecture for visual reasoning inspired by the cognitive-science literature on visual reasoning, the Memory- and Attention-based (visual) REasOning (MAREO) architecture. MAREO instantiates an active-vision theory, which posits that the brain solves complex visual reasoning problems compositionally by learning to combine previously-learned elementary visual operations to form more complex visual routines. MAREO learns to solve visual reasoning tasks via sequences of attention shifts to route and maintain task-relevant visual information into a memory bank via a multi-head transformer module. Visual routines are then deployed by a dedicated reasoning module trained to judge various relations between objects in the scenes. Experiments on tasks containing complex visual relations (SVRT challenge) and same-different differentiation, relation match to sample, Raven's and Identity rules from ART challenge demonstrate MAREO's ability to learn visual routines in a robust and sample-efficient manner. We also show the zero-shot generalization on unseen tasks and the compositionality nature of the architecture.
BibTeX
@misc{vaishnav2022mareo,
  author = {Mohit Vaishnav and Thomas Serre},
  title = {{MAREO: Memory- and Attention- based visual REasOning}},
  year = {2022},
  eprint = {2206.04928},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.04928},
  howpublished = {OpenReview},
}

Loading related content...

Figure