Abstract
Visual question answering requires high-order reasoning about an image, which is a fundamental capability needed by machine systems to follow complex directives. Recently, modular networks have been shown to be an effective framework for performing visual reasoning tasks. While modular networks were initially designed with a degree of model transparency, their performance on complex visual reasoning benchmarks was lacking. Current state-of-the-art approaches do not provide an effective mechanism for understanding the reasoning process. In this paper, we close the performance gap between interpretable models and state-of-the-art visual reasoning methods. We propose a set of visual-reasoning primitives which, when composed, manifest as a model capable of performing complex reasoning tasks in an explicitly-interpretable manner. The fidelity and interpretability of the primitives' outputs enable an unparalleled ability to diagnose the strengths and weaknesses of the resulting model. Critically, we show that these primitives are highly performant, achieving state-of-the-art accuracy of 99.1% on the CLEVR dataset. We also show that our model is able to effectively learn generalized representations when provided a small amount of data containing novel object attributes. Using the CoGenT generalization task, we show more than a 20 percentage point improvement over the current state of the art.
Introduction
In Visual Question Answering (VQA), models must perform complex reasoning to answer queries like "What color is the cube to the right of the large metal sphere?" Historically, this field has faced a trade-off between interpretability and performance. Early Neural Module Networks (NMNs) were intuitive, breaking questions into functional pieces, but they struggled with accuracy. Subsequent iterations improved performance by passing high-dimensional feature tensors between modules, but this turned the models into "black boxes" where the reasoning process was opaque.
The authors of TbD-net (Transparency by Design) address this gap, arguing that real-world AI requires models that are both highly accurate and diagnosable. By forcing neural modules to communicate via explicit 2D attention masks rather than opaque features, they achieve state-of-the-art results while providing a clear visual trace of the model's logic.
Methods: Visual-Reasoning Primitives
The core innovation of TbD-net is its architectural bottleneck. Most modules are constrained to output a single-channel attention mask (a 2D heatmap). This physical constraint prevents the model from hiding its reasoning in high-dimensional space.
Key modules include:
- Attention: Locates objects with specific properties (e.g., "metal").
- Relate: Shifts attention spatially (e.g., "to the left of") using dilated convolutions for a global field of view.
- Same: Matches features across the image to identify objects sharing a property.
- Query: Extracts attributes (color, shape) from the final attended region.
To ensure these masks are clean, the authors applied $L_1$ regularization to penalize unnecessary background attention and increased spatial resolution from 14x14 to 28x28 to better resolve small objects.
Experimental Results
The model was evaluated on two primary benchmarks:
- CLEVR: A diagnostic dataset of 3D-rendered objects. TbD-net achieved 99.1% accuracy, outperforming previous state-of-the-art models.
- CLEVR-CoGenT: A test of compositional generalization. TbD-net improved the state-of-the-art by over 20 percentage points, reaching 96.3% accuracy after fine-tuning. This demonstrates that the model learns disentangled concepts (like "blue" and "cube") rather than memorizing specific combinations.
Key Insights and Interpretability
TbD-net's transparency allows for quantitative evaluation of its reasoning. The authors found that "noisy" attention was a primary error source, which was mitigated by $L_1$ regularization. Furthermore, the model's explicit masks allowed the authors to diagnose why it struggled with generalization tasks, revealing where attribute detectors (like shape and color) were accidentally "entangled."
Limitations and Future Work
While highly effective on synthetic datasets, TbD-net currently relies on a separate natural language parser to generate functional programs. If the parser fails, the reasoning fails. Additionally, applying this level of transparency to "in-the-wild" natural images remains a challenge due to the lack of ground-truth programs and the inherent complexity of real-world scenes. Future work aims to adapt these transparent primitives to more diverse and unstructured visual environments.
Summary updated