Introduction
Human intelligence is characterized by the ability to compose known concepts to solve novel problems—a process often referred to as systematic generalization. While a person can easily imagine a "purple flying elephant" despite never having seen one, current machine learning systems remain notoriously brittle when faced with distribution shifts.
Most existing visual reasoning benchmarks, such as Raven’s Progressive Matrices, are framed as discriminative tasks where a model selects an answer from a multiple-choice list. This format often encourages "shortcut learning," where models exploit statistical regularities in the options rather than learning the underlying logical rules. To address this, researchers have proposed a shift toward generative reasoning, where models must produce an answer from scratch. However, existing generative benchmarks like the Abstract Reasoning Corpus (ARC) are often too complex for current deep learning architectures. This paper introduces Arith-MNIST, a new generative benchmark, and OC-NMN, a modular architecture designed to bridge the gap between perception and symbolic reasoning.
The Arith-MNIST Benchmark
To evaluate generative visual reasoning, the authors developed Arith-MNIST. In this benchmark, images contain three colored MNIST digits. The colors represent mathematical signs (e.g., positive or negative), and the spatial arrangement implies a specific operation.
Models are provided with a few "support" examples—input images and their corresponding numerical results—and must infer the hidden rule (e.g., "Left + Right - Bottom = Result"). They must then apply this rule to a new query image. The dataset is divided into Easy, Medium, and Hard splits, which vary the number of operations and the complexity of the selection conditions. Additionally, a text-based version of the dataset was created to test the symbolic reasoning capabilities of Large Language Models (LLMs).
The OC-NMN Architecture
The Object-centric Compositional Neural Module Network (OC-NMN) employs a "divide and conquer" strategy to solve these tasks. The architecture consists of four primary components:
- Perception (Slot Attention): Rather than processing images as raw pixel grids, the model uses Slot Attention to decompose the scene into discrete object representations, or "slots." This ensures the reasoning modules operate on entities rather than global features.
- Controller: This component analyzes the support examples to infer the underlying "program" or logical rule being applied.
- Selection Bottleneck: A novel interface that translates the controller’s task embedding into a sequence of specific functional modules (e.g., "add," "subtract") and selection conditions (e.g., "identify the largest digit").
- Executor: This component executes the predicted program on the object slots extracted from the query image to produce the final numerical output.
Compositional Imagination
A core innovation of this work is the Compositional Imagination framework. To improve out-of-distribution (OOD) generalization, the model is encouraged to "dream" during training. It samples random programs, generates synthetic training data based on those programs, and then learns to predict the programs it just invented. This acts as a powerful form of data augmentation, forcing the controller to understand the abstract structure of programs rather than simply memorizing patterns found in the training set.
Experimental Results
OC-NMN was evaluated against several strong baselines, including the Neural Abstract Reasoner (NAR) and DNC-Transformers.
Performance and Generalization
On the "Hard" split of Arith-MNIST, OC-NMN achieved a validation accuracy of 82.3%, significantly outperforming non-modular baselines like the DNC-GRU, which reached only 27.4%. In OOD scenarios within the "Easy" split, the addition of the Compositional Imagination component allowed the model to maintain high accuracy even when the order of operations was altered, a scenario where models without imagination saw significant performance degradation.
The Perception Bottleneck
The study highlights that reasoning is only as effective as the underlying perception. If the Slot Attention layer fails to disentangle attributes (like color and digit shape), the downstream reasoning modules fail on unseen combinations. When Slot Attention was pretrained to ensure perfect disentanglement, OOD test accuracy reached nearly 97%. Without this pretraining, accuracy dropped to approximately 44%, proving that robust perception is a prerequisite for robust reasoning.
LLM Comparison
Interestingly, the researchers found that symbolic reasoning remains a challenge even for massive models. When tested on the text-based version of Arith-MNIST, GPT-4 achieved an accuracy of only 11-16%. This suggests that the logical structure required for Arith-MNIST is not easily solved by standard language modeling objectives alone.
Conclusion and Future Work
OC-NMN demonstrates that combining object-centric perception with modular reasoning and synthetic "imagination" provides a path toward more robust AI. While Arith-MNIST is a controlled environment, it reveals critical insights into the necessity of disentangled representations. Future research will focus on scaling these object-centric biases to more complex, real-world visual scenes and refining the imagination process to handle increasingly intricate logical structures.
Summary updated