Transparency by Design: Closing the Gap Between Performance and Interpretability in Visual Reasoning

David Mascharka, Philip Tran, Ryan Soklaski, Arjun Majumdar

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: The Performance-Interpretability Trade-off

Visual Question Answering (VQA) requires a model to perform complex, multi-step reasoning—for example, "What color is the cube to the right of the large metal sphere?" Historically, researchers faced a trade-off between models that were interpretable but weak (early Neural Module Networks) and those that were performant but opaque (modern SOTA models). The latter often rely on high-dimensional "black box" feature tensors, making it difficult to diagnose failures or verify if the model is attending to the correct visual cues for the right reasons.

Transparency by Design (TbD-net)

The authors introduce TbD-net, a modular architecture that bridges this gap. In TbD-net, a question is first parsed into a "program"—a sequence of logical steps. Each step is executed by a specific neural module designed for a particular primitive operation.

A complete reasoning chain in TbD-net, showing how a complex question is decomposed into a program of modular steps, each producing an interpretable attention mask.

The key innovation is the use of attention as a bottleneck. Unlike previous high-performing models that passed 128-dimensional feature maps between modules, TbD-net modules primarily pass 1-dimensional attention masks (heatmaps). This forces the model to explicitly localize objects to progress to the next reasoning step, ensuring that the reasoning process is human-readable.

Specialized Primitives and Architecture

TbD-net utilizes a library of modules tailored for specific tasks:

  • Attention: Produces a mask for objects with a specific property (e.g., "red").
  • Relate: Shifts an existing attention mask spatially (e.g., "to the left of").
  • Same: Finds objects that share a property with the currently attended object.
  • Query/Compare: The final stages that extract attributes (color, shape) or compare them.

To enhance clarity, the authors applied $L_1$ regularization to penalize "noisy" background attention and increased the spatial resolution of the feature maps (from 14x14 to 28x28) to better resolve small, crowded objects.

Results and Generalization

TbD-net achieved a state-of-the-art 99.1% accuracy on the CLEVR dataset, outperforming previous modular and non-modular approaches. Beyond raw performance, the model demonstrated superior generalization on the CLEVR-CoGenT task. This task tests whether a model can handle novel combinations of attributes (e.g., training on "blue cubes" and testing on "red cubes"). TbD-net improved the state-of-the-art by more than 20 percentage points, achieving 96.3% after fine-tuning. This suggests that the modular, attention-heavy design prevents the model from over-associating specific colors with shapes, favoring true reasoning over statistical correlations.

Interpretability as a Diagnostic Tool

Because the attention masks are human-readable, they serve as a powerful diagnostic tool. The authors could visually confirm that their initial models struggled with low resolution or background noise, leading to targeted architectural improvements.

Step-by-step refinement of attention masks as the model processes specific object attributes (Large, Metal, Cylinder).

Quantitative evaluation showed that the model's attention aligns with ground-truth object locations with a 0.92 precision/recall, proving the visualizations are not just "pretty pictures" but accurate reflections of the model's focus.

Conclusion

TbD-net demonstrates that interpretability does not have to come at the cost of performance. While the model still relies on a pre-trained program generator and the final attribute query remains somewhat opaque, it represents a significant step toward transparent AI. Future work will focus on scaling these principles from synthetic datasets like CLEVR to the cluttered world of natural photography.

Summary updated

BibTeX
@inproceedings{mascharka2018transparency,
  author = {David Mascharka and Philip Tran and Ryan Soklaski and Arjun Majumdar},
  title = {{Transparency by Design: Closing the Gap Between Performance and Interpretability in Visual Reasoning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  url = {https://openreview.net/forum?id=ByNb70bdZr},
}
Figure