GRAPE: Graph-Augmented Prototype Explanations for Interactive Medical Image Diagnosis

Rasul Khanbayov, Erchin Serpedin, Hasan KurbanNeurIPS 2026

TL;DR

Prototype-based AI models make medical diagnoses transparent by comparing patient scans to learned "textbook" visual examples, yet they treat related symptoms as isolated islands, blindly absorb bad physician feedback, and require full retraining to learn new diseases. GRAPE tackles all three bottlenecks in one unified framework—introducing a fast, deterministic safety check that catches mismatched doctor annotations before they corrupt the model, alongside a text-anchoring trick to add new findings on the fly. Just as intriguing as the architecture is the authors' refreshingly candid dissection of why components like their graph head actually work (spoiler: it’s mostly the added nonlinearity, not the graph).

What Problem Does This Paper Address?

Even when deep learning hits radiologist-level accuracy on X-rays, hospitals hesitate to adopt black-box models because clinicians cannot verify why a prediction was made. Prototype-based models bridge this gap through "this looks like that" reasoning: they match patches of an X-ray against an atlas of learned visual concepts (like fluid buildup or tissue cavities).

Recent interactive setups let doctors draw bounding boxes to steer the model's attention. However, three clinical hurdles remain:

  1. Independent concepts: Standard linear classifiers treat clinical findings independently, ignoring real-world anatomical correlations (e.g., active tuberculosis and lung cavities frequently co-occur).
  2. Unsafe spatial interaction: If a doctor draws a box to reinforce Concept A, but the model strongly believes that region shows Concept B, forcing the update silently amplifies spatial errors in the prototype atlas.
  3. Closed vocabulary: Discovering a rare variant or adding a new clinical finding requires retraining the entire system from scratch.

Methods

GRAPE (Graph-Augmented Prototype Explanations) builds on a standard ResNet-50 backbone and multi-prototype similarity matching, trained via a four-stage curriculum, and swaps out the final linear layer for three targeted modules:

Overview of the GRAPE architecture showing its three core modules.
  • Module A (Graph Attention Task Head): Constructs a conditional co-occurrence graph from training labels and passes prototype similarity scores through a two-layer Graph Attention Network (GAT) before classification. (Note: Due to an implementation detail where nodes aggregate their own features, the graph structure only influences training via attention dropout and does not affect inference outputs).
  • Module B (Concept-Mismatch Safety Check): A novel, zero-overhead deterministic guardrail. When a clinician draws a bounding box to reinforce a finding, GRAPE checks the mean similarity of all concepts inside that box. If a different concept dominates beyond a set margin, it raises a warning flag. An optional second-stage filter uses spatial variance across prototypes to suppress false alarms.
  • Module C (Open-Vocabulary Prototype Anchoring): Aligns visual prototypes with clinical text embeddings from a frozen biomedical language model (BioViL-T). To add a new concept at test time without retraining, GRAPE initializes new prototypes around the projected text anchor with slight Gaussian noise so they remain distinct during few-shot fine-tuning.

Datasets

The authors evaluate GRAPE on two public chest X-ray benchmarks (introducing no new datasets):

  • TBX11K: 8,400 X-rays across three classes (healthy, sick-non-TB, active TB), featuring 1,211 bounding boxes for lesion localization.
  • NIH ChestX-ray14: Over 100,000 frontal X-rays spanning 14 finding labels. Evaluated using a 10,000-patient stratified split (5 seeds) and a 20,000-image shard, utilizing 880 bounding-box-annotated images for spatial grounding tests.

Key Insights and Ideas

  • Nonlinearity, not graph magic, drives the accuracy boost: When the authors tested why their GAT head beat the linear baseline, they compared it against parameter-matched MLPs and self-attention heads without predefined graphs. Those generic nonlinear heads closed ~69% to 100% of the performance gap—proving that simple readout capacity, rather than relational graph structure, was doing the heavy lifting.
  • End-to-end accuracy trades off against spatial grounding: Letting task gradients flow freely through the visual backbone pushes classification F1 to 0.990 on TBX11K, but degrades lesion localization. Staged, frozen-backbone training preserves human-interpretable spatial alignment.
  • Text alignment collapses prototype diversity: Pulling 100 prototypes per concept toward a single text vector packs them into an ultra-tight cluster (pairwise cosine similarity ~0.99), over-regularizing small concept vocabularies.
  • Deterministic checks beat Bayesian sampling: Comparing dominant concept activations catches simulated annotation errors far better than expensive MC-Dropout uncertainty estimates, using just a single forward pass.

Key Results

  • Classification & Speed: On TBX11K (5 seeds), GRAPE boosts Macro F1 by +13.8 percentage points over the prototype baseline (0.866 vs. 0.728, $p=0.0013$), concentrated primarily on majority classes, while adding just +1 ms of latency at batch size 1. On NIH ChestX-ray14, multi-seed F1 matches the baseline (~0.603 vs. 0.605).
  • Lesion Localization: Using the Pointing Game metric (checking if max heatmap activation lands inside a ground-truth lesion box), GRAPE achieves 2.1× better localization on TBX11K (0.117) than end-to-end baselines like CBM (0.055) and PIPNet (0.053), while performing comparably to the staged prototype baseline across seeds.
  • Safety Check: On simulated mislabeled boxes in TBX11K, the variance-gated safety check catches 85.1% of errors at a 16.4% false-positive rate.
  • Few-Shot Concept Addition: Adding a held-out TB concept with just 1 labeled image recovers 41% of fully supervised localization performance (though text anchors did not conclusively beat random unit-vector initialization in control runs).

Limitations and Future Work

The authors are remarkably transparent about the system's boundaries:

  • Coarse spatial resolution: Because similarity maps operate on a $7 \times 7$ grid compared against $224 \times 224$ images, absolute Pointing Game hit rates remain low (7–14%). Finer-resolution backbones remain untested.
  • Stricter clinical budgets hurt sensitivity: Tightening the safety check's false-positive rate to clinically realistic levels (e.g., 3.4% on TBX11K or ~5% on NIH) causes true-positive detection to drop sharply (to 44.5% and ~18–20%, respectively). Larger vocabularies will likely need per-concept thresholds rather than a single global cutoff.
  • Downstream interference: Adding a new concept via Module C isn't "free" at the decision level—it shifts NIH classification F1 by up to 6.7 pp and flips dominant-concept assignments in 19–46% of other findings' boxes.
  • Simulated vs. real doctors: Safety checks were tested via simulated label flips, and NIH bounding boxes were mapped approximately. Validating real-world interaction requires clinician user studies and full 14-class leave-one-out evaluations in future work.

Summary updated

BibTeX
@inproceedings{khanbayov2026grape,
  author = {Rasul Khanbayov and Erchin Serpedin and HASAN KURBAN},
  title = {{GRAPE: Graph-Augmented Prototype Explanations for Interactive Medical Image Diagnosis}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=lMhOWbjimZ},
}
Figure