Understanding the Computational Demands Underlying Visual Reasoning

Mohit Vaishnav, Rémi Cadène, Andrea Alamia, Drew Linsley, Rufin VanRullen, Thomas Serre · DOI

TL;DR

While modern AI excels at recognizing objects, it often fails at "visual reasoning"—understanding the abstract relationships between those objects. This paper identifies a clear taxonomy of visual reasoning tasks and demonstrates that adding spatial and feature-based attention to standard CNNs significantly improves their ability to learn these abstract rules, particularly for challenging "same-different" judgments.

What Problem Does This Paper Address?

Humans can instantly tell if two shapes are identical or if one is "inside" another, regardless of the shapes' specific appearance. For deep learning models, however, these tasks are surprisingly difficult. While a standard Convolutional Neural Network (CNN) can be trained to solve these problems, it often requires orders of magnitude more data than a human does.

The authors seek to understand the specific computational "bottlenecks" in visual reasoning. They ask: Why are some relational tasks (like "is it inside?") easier for AI than others (like "are these two the same?")? And can biological-inspired mechanisms, specifically attention, help bridge this gap?

Methods

The researchers used ResNets (a standard CNN architecture) of varying depths as their baseline. To investigate the role of attention, they extended these models with two types of Transformer-based self-attention modules:

  1. Spatial Attention Module (SAM): This allows the model to "attend" to specific locations in the image, helping it focus on where objects are relative to each other.
  2. Feature-based Attention Module (FBAM): This allows the model to attend to specific visual features (channels) across the entire image, helping it focus on "what" the objects are, regardless of their location.

The team also employed hierarchical clustering to analyze how models performed across different tasks, effectively letting the AI's own learning patterns define a new "taxonomy" of visual reasoning.

Datasets

  • Synthetic Visual Reasoning Test (SVRT): The primary benchmark. It consists of 23 different binary classification tasks involving closed-contour shapes. Tasks range from simple spatial relations (SR) to complex same-different (SD) judgments.
  • ImageNet: Used for pre-training comparisons to see if "natural" image features help with abstract reasoning.
  • SVRT-Visual Statistics: A custom pre-training set where images and labels were shuffled to force the model to learn the "look" of SVRT shapes without learning the actual reasoning rules.

Key Insights and Ideas

  • The SD/SR Divide: The study confirms a fundamental dichotomy. Spatial Relation (SR) tasks (e.g., "is shape A above shape B?") are relatively easy for standard CNNs. Same-Different (SD) tasks (e.g., "are these two shapes identical?") are much harder, requiring significantly more data and deeper networks.
  • A New Taxonomy: Beyond the basic SD/SR split, the authors found that tasks cluster based on the number of rules required. For example, comparing the size of two objects to find a subgroup before judging their relationship is harder than a single-step judgment.
  • Attention Dissociation: This is the "aha" moment. The two types of attention help in different ways:
  • Feature-based attention is the "secret sauce" for the hardest same-different tasks (SD1), where shapes might be transformed or rotated.
  • Spatial attention provides the biggest boost for spatial relations and simpler same-different tasks (SD2).
  • Rules vs. Features: Pre-training on the visual style of the shapes helps, but it doesn't solve the hardest tasks. This suggests the bottleneck isn't just "seeing" the shapes correctly; it's the actual abstract logic (the "rule") that the models struggle to grasp.

Key Results

  • Sample Efficiency: A standard ResNet-50 needs 120,000 examples to solve the hardest same-different task (Task 21), but only 500 examples for a simple spatial task (Task 2).
  • Attention Boost: Adding attention modules made the models much more efficient. For the hardest tasks, attention-equipped models reached high accuracy with far fewer training samples than "vanilla" ResNets.
  • Principal Component Analysis (PCA): The authors showed that ~93% of the variance in how models solve these tasks can be explained by just two components, which correlate strongly with the need for spatial vs. feature-based attention.

Limitations and Future Work

  • Synthetic vs. Real: The SVRT uses simple 2D outlines. It remains to be seen how these findings translate to complex, cluttered, real-world 3D scenes.
  • Vision Transformers (ViT): The authors briefly tested ViTs but found they performed poorly with the limited data sizes used here (100k samples). They suggest ViTs might need even more data or specific architectural tweaks to handle these abstract rules.
  • Working Memory: While attention helps, the authors acknowledge that human-level reasoning likely requires working memory—the ability to hold and manipulate object representations over time—which was not explicitly modeled here.
  • Neuroscience Predictions: The paper concludes with testable predictions for cognitive scientists, suggesting that different human brain regions (associated with spatial vs. feature attention) should be differentially active depending on the SVRT task type.

Summary updated

BibTeX
@article{vaishnav2022understanding,
  author = {Mohit Vaishnav and Rémi Cadène and Andrea Alamia and Drew Linsley and Rufin VanRullen and Thomas Serre},
  title = {{Understanding the Computational Demands Underlying Visual Reasoning}},
  journal = {Neural Computation},
  year = {2022},
  doi = {10.1162/neco\_a\_01485},
}
Figure