Skip to content

AikyamLab/grid-vqax

Repository files navigation

GridVQA-X: A Framework for Evaluating Multimodal Explainability Methods



GridVQA-X Dataset GridVQA-X Models arXiv Paper

Abstract

Vision-Language Models (VLMs) have advanced rapidly, yet a critical gap persists: current evaluation protocols lack the ground truth required to distinguish between true cross-modal reasoning and shallow cross-modal shortcuts. We introduce GridVQA-X, the first diagnostic framework specifically designed to evaluate the faithfulness of post-hoc cross-modal explainability methods. By leveraging a controlled, closed-world synthesis approach with mathematically guaranteed explanations, we train two paired models—one relying on genuine spatial-relational reasoning, another forced to exploit cross-modal shortcuts—and reveal that widely used multimodal explainability (MxAI) methods fail to distinguish between them, fundamentally misrepresenting how multimodal models make decisions.

Accepted at ECCV 2026 Main Conference and CVPR 2026 TRUE-V Workshop.

Key Contributions

  1. Synthetic Diagnostic Datasets: Two paired datasets— $D_{\text{pure}}$ and $D_{\text{spur}}$ —with mathematically guaranteed unique ground-truth explanations, a spatial reasoning taxonomy, and provably absent (pure) or present (spurious) cross-modal correlations. Full generation code is released for reproducibility.

  2. Reference Model Pair: Two trained models— $M_{\text{pure}}$ and $M_{\text{spur}}$ —with verifiably identified reasoning mechanisms (genuine spatial reasoning vs. cross-modal Bag-of-Words shortcut), enabling zero-ambiguity evaluation of any explainability method.

  3. Benchmark Metrics: Adapted existing MxAI metrics (RMA, IoU) to the multimodal domain plus novel metrics assessing cross-modal interaction complexity—providing the first rigorous benchmark for evaluating post-hoc cross-modal explainers.

GridVQA-X vs Other Benchmarks

Feature GridVQA-X CLEVR-XAI OpenXAI LATEC
Multimodal (vision + language)
Unique ground-truth explanations
Process identifiability
Controlled shortcut environment

Dataset

GridVQA-X uses S × S visual grids populated with geometric objects. Each sample requires multi-hop spatial reasoning over a target and one or more anchor objects connected by directional tokens (e.g., "the red square to the left of the blue circle"). Unlike natural datasets, ground-truth attribution masks are mathematically unique—restricted to target and anchor objects, with every distractor having zero causal effect.

The dataset ships in two parallel splits:

Split Description
$D_{\text{pure}}$ Adversarial distractors matching target attributes are placed in spatially invalid regions, eliminating the Bag-of-Words shortcut and forcing genuine spatial reasoning.
$D_{\text{spur}}$ Target attributes appear exclusively in valid regions ($P = 1.0$), preserving the shortcut so a model can answer without understanding spatial structure.

Reference Models

Two architecturally identical MDETR-based models are trained on contrasting data distributions to serve as diagnostic reference points:

Model Training Split Accuracy Reasoning Strategy
$M_{\text{pure}}$ $D_{\text{pure}}$ > 99% Genuine multi-hop spatial-relational reasoning
$M_{\text{spur}}$ $D_{\text{spur}}$ 100% Cross-modal Bag-of-Words shortcut

$M_{\text{spur}}$ achieves perfect accuracy on its native $D_{\text{spur}}$ distribution but catastrophically fails on $D_{\text{pure}}$'s multi-hop spatial queries—confirming it never learned spatial structure. A faithful explainability method must produce distinctly different attributions for $M_{\text{pure}}$ and $M_{\text{spur}}$ on the same input.

Key Findings

All six methods evaluated exhibit failures under GridVQA-X's diagnostic tests. Local methods show model blindness or accidental faithfulness—MultiViz produces identical attributions for both $M_{\text{pure}}$ and $M_{\text{spur}}$ (RMA ≈ 0.44), while MultiSHAP counterintuitively scores higher for the shortcut model (RMA 0.689 vs. 0.616). Global methods fare no better: Emap attributes ~60% of predictive power to cross-modal interaction for $M_{\text{spur}}$, and InterSHAP interaction scores decrease with reasoning depth for $M_{\text{pure}}$—the opposite of expected behavior.

Evaluation uses RMA (Relevance Mass Accuracy — attribution mass on ground-truth regions), IoU (spatial overlap with ground-truth bounding boxes), and an Additive Fallacy Check (whether global synergy scalars scale with multi-hop depth for $M_{\text{pure}}$).

Installation

Prerequisites

  • Python 3.10+
  • CUDA-capable GPU (recommended for model inference)
  • Git

Setup

  1. Clone the repository:
git clone https://github.com/AikyamLab/grid-vqax.git
cd grid-vqax
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

MDETR Setup

The training and evaluation scripts build on a fork of MDETR. Because MDETR is an external repository with its own license, it is not redistributed here. Instead, mdetr/ contains a patch and instructions to reproduce our fork from a pinned upstream commit.

Note on transformers versions: Upstream MDETR pins transformers==4.5.1, but this code targets a much newer release. The patch in mdetr/ adapts the tokenizer call to the modern transformers API. See mdetr/README.md for details.

Repository Layout

grid-vqax/
├── dataset_generation/      # Component 1: pure + spurious dataset generators
│   ├── pure/
│   └── spurious/
├── training/                # Component 2: MDETR fine-tuning / scratch training
├── evaluation/              # Component 3: model forward passes → accuracy
├── explainability/          # Component 4: analysis-model API + RMA/IoU metrics
├── mdetr/                   # MDETR fork patch + upstream attribution
├── requirements.txt
├── LICENSE                  # MIT (this work) + Apache-2.0 attribution for MDETR
└── .python-version

Quick Start

  1. Generate data — see dataset_generation/README.md. Produces grounding_{train,val,test}.jsonl, qa_{train,val,test}.jsonl, and rendered grid images.
  2. Set up MDETR — clone the upstream MDETR repo and apply the patch as described in mdetr/README.md, then place the training and evaluation scripts inside it.
  3. Train — see training/README.md.
  4. Evaluate — see evaluation/README.md.
  5. Run explainability analysis — see explainability/README.md for the analysis-model API and RMA/IoU plausibility metrics.

Citation

If you use GridVQA-X in your research, please cite:

@misc{belsare2026gridvqaxframeworkevaluatingmultimodal,
      title={GridVQA-X: A Framework for Evaluating Multimodal Explainability Methods}, 
      author={Sujay Belsare and Sudarshan Nikhil and Sushant Kumar and Ponnurangam Kumaraguru and Chirag Agarwal},
      year={2026},
      eprint={2606.14740},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2606.14740}, 
}

License

This repository is released under the MIT License.
MDETR components retain their original Apache-2.0 license. See LICENSE for full attribution.

Contact

For questions or issues, please open an issue on GitHub or contact the authors:

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors