A Search Worth a Billion Pixels: Explaining Gigapixel Classifiers
Organizations: Politecnico di Bari, Italy
Abstract
Perturbation-based attribution methods explain model predictions without accessing their internal representations, but scaling them to high-resolution images requires balancing perturbation granularity and computational cost. Fine-grained perturbations require many model evaluations, whereas coarse masks may overlook small but relevant evidence. We introduce Wavelet Find-and-Refine (WaFR), a model-agnostic attribution method combining adaptive hierarchical search with sparse multiscale regression. By selectively refining regions that influence the prediction, WaFR maintains fine-grained localisation with a computational cost that depends on the spatial distribution of the evidence. As image resolution increases to 8,192 pixels per side, WaFR maintains a Pointing Game score of at least .995 in controlled localisation experiments, including at matched forward-pass budgets. On gigapixel whole-slide images, it requires a median of 176 forward passes and achieves the highest mean patch-level AUROC among the evaluated perturbation-based methods (.949).
Figures & tables
| VisA | Real-IAD | CAMELYON16 crops | CAMELYON16 slides | |||||||||
| Method | AUROC | EPG | log Del. | AUROC | EPG | log Del. | AUROC | EPG | log Del. | AUROC | Time (s) | Growth |
| Random map | .500 .001 | .019 .006 | .956 .138 | .500 .000 | .029 .005 | .927 .011 | .500 .001 | .047 .010 | .899 .014 | .509 .035 | 0 | |
| Centre map | .688 .023 | .034 .010 | .986 .121 | .671 .017 | .047 .008 | .922 .011 | .681 .015 | .083 .016 | .946 .014 | .564 .045 | 0 | |
| Occlusion | .769 .035 | .237 .043 | .851 .108 ∗ | .823 .017 | .298 .021 | .818 .014 | .568 .026 | .120 .026 | .848 .024 | .625 .057 | 0.6 | |
| RISE | .923 .018 ∗ | .021 .006 | .897 .173 | .959 .010 ∗ | .031 .005 | .793 .022 | .620 .030 | .049 .010 | .860 .016 | .608 .047 | 38,691 | none |
| LIME | .656 .042 | .056 .010 | .916 .098 | .700 .016 | .093 .009 | 1.130 .037 | .599 .019 | .064 .013 | .871 .030 | .744 .062 | 6,390 | none |
| Synthetic Dataset | CAMELYON16 crops | |||||||||
| Side (px) | 512 | 1k | 2k | 4k | 8k | 512 | 1k | 2k | 4k | 8k |
| WaFR passes | 175 | 191 | 220 | 224 | 195 | 316 | 369 | 407 | 487 | 559 |
| WaFR PG | .996 | .996 | .996 | .995 | 1.000 | .566 | .617 | .636 | .580 | .520 |
| WaFR EPG | .934 | .935 | .939 | .939 | .953 | .303 | .258 | .200 | .166 | .171 |
| Pointing Game | ||||||||||
| Occlusion | .530 | .729 | .760 | .877 | .993 | .013 | .136 | .264 | .252 | .235 |
Appendix figures & tables27 assets
Supplementary material from the paper’s appendix.
Appendix
| ResNet-50 | VGG16 | VisA | ||||||
| Ablation | ROAD | ROAD | ROAD | blur log Del. | ||||
| A3 Haar low-pass baseline | [ , ] | [ , ] | [ , ] | [ , ] | ||||
| A4 Haar wavelets | [ , ] | [ , ] | [ , ] | [ , ] | ||||
| A5 sparse regression | [ , ] | [ , ] | [ , ] | [ , ] | ||||
| A6 random masks | – | – | [ , ] | [ , ] | ||||
| A7 probability in | [ , ] | [ , ] | – | – | ||||
| VisA | Real-IAD | Crops | |||||||
| Baseline B | WaFR | Search | Value | WaFR | Search | Value | WaFR | Search | Value |
| EPG | |||||||||
| Occlusion | .665 | .910 | .297 | ||||||
| KernelSHAP | .692 | .910 | .297 | ||||||
| RISE | .617 | .000 | .873 | .000 | .236 | ||||
| HiPe | .669 | .919 | .313 | ||||||
| Image as unit | Grouped unit | |||||||
| Metric | WaFR | HiPe | Difference [95 % CI] | Difference [95 % CI] | ||||
| VisA | ||||||||
| EPG | .648 | .212 | [ , ] | .001 | [ , ] | .001 | ||
| Pointing Game | .660 | .456 | [ , ] | .001 | [ , ] | .001 | ||
| AUROC | .919 | .904 | [ , ] | .44 | [ , ] | .44 | ||
| log-scale Deletion | .766 | .747 | [ , ] | .21 | [ , ] | .21 | ||
| Dataset | Instances | (px) | Ground truth | Model explained | Source |
|---|---|---|---|---|---|
| ImageNet val [ 12 ] | 1,000 images | 224 | – | ResNet-50, VGG16, ViT-B/16, DeiT-B/16 | public |
| ImageNet-S50 [ 19 ] | 250 images | 224 | object mask | ResNet-50, VGG16, ViT-B/16, DeiT-B/16 | public |
| GridPG [ 42 ] | 500 grids per model | 448 | cell of the class | ResNet-50, VGG16 | public |
| Synthetic Dataset | 2,680 scene–side pairs | 256–8,192 | square, 16–256 | 5 CNNs (8 pairs of model and ) | ours |
| VisA [ 61 ] | 100 defective images | 512–1,168 | defect mask | ResNet-18 per category | ours |
| Real-IAD [ 56 ] | 92 defective images | 512–2,992 | defect mask | ResNet-18 per category | ours |
| Synthetic Dataset | VisA, Real-IAD | CAMELYON16 crops | |
|---|---|---|---|
| Architecture | Custom fully convolutional network (stride 16, receptive field 128 or 1,120 px) with max, log-sum-exp, or gated attention pooling [ 24 ] . | ResNet-18 (up to stage 3, stride 16) with log-sum-exp pooling. | ResNet-18 (stage 4, stride 32), gated attention head [ 24 ] (hidden size 128). |
| Parameters | 61k–165k | 2.8M | 11.2M (patch), 132k (head) |
| Initialisation | Random | ImageNet (frozen batch norm) | ImageNet (patch), random (head) |
| Training data | 32k–56k target size . | Official splits. | 29 slides (61k patches; 3k tiles for head). |
| Input & augmentation | Crops ; flips and rotations. | Two-phase: patches (256 or 384 px) then crops or full image; flips, rotations, colour. | 128 px patches (512–4,096 px tiles for head); geometric, stain, and blur. |
| Optimisation | Binary cross-entropy, AdamW [ 35 ] (learning rate to ), cosine decay [ 34 ] , batch size 48–64. | Binary cross-entropy, AdamW (learning rate to ), one-cycle [ 50 ] , batch size 32 then 4. | Binary cross-entropy, AdamW (learning rate patch, head), batch size 256 / 8. |
| Cohort | Size | Rule | Reason | Used in |
|---|---|---|---|---|
| ImageNet | 1,000 | seeded, one per class, validation set | cost | Tabs. S24 and S25 |
| slower methods ( a ) | 250 | first 250 of the 1,000 | cost | Tabs. S24 and S25 |
| mask counts | 500 | first 500 of the 1,000 | cost | Sec. B.3 |
| regime rule, parameters | 100 | seeded, validation images not in the 1,000 | cost | Secs. B.5 and B.6 |
| ImageNet-S50 | 250 | seeded, five per class | cost | Tabs. S24 and S25 |
| with a usable mask | 247 | mask neither the full image nor empty after the crop | ground truth | Tabs. S24 and B.1 |
| Method | AUROC / | PG | Del. / | Fwd. | |||
|---|---|---|---|---|---|---|---|
| WaFR | 35/30 | .948 | [.918, .970] | .714 | .538 | 182 | |
| h-Shap | 33/29 | [ , ] | .030 | [ , ] | 19,328 | ||
| RISE | 24/20 | [ , ] | .042 | [ , ] | 256 | ||
| Occlusion | 35/30 | [ , ] | .074 | [ , ] | 50 | ||
| AUROC | Pointing Game | EPG | |||||||||
| Method | mean | mean | mean | Forward passes | |||||||
| perturbation-based | |||||||||||
| Occlusion | 20 | .857 .069 | [ , ] | .055 .041 | [ , ] | .037 .036 | [ , ] | 50 | |||
| RISE | 20 | .927 .072 | [ , ] | .250 .175 | [ , ] | .005 .007 | [ , ] | 4,096 | |||
| LIME | 20 | .800 .066 | [ , ] | .467 .181 | [ , ] | .009 .007 | [ , ] | 1,000 | |||
| KernelSHAP | 20 | .938 .050 | [ , ] | .020 .024 | [ , ] | .031 .027 | [ , ] | 1,002 | |||
| VisA | Real-IAD | CAMELYON16 crops | CAMELYON16 slides | |||||||||
| Method | AUROC | EPG | log-scale Deletion | AUROC | EPG | log-scale Deletion | AUROC | EPG | log-scale Deletion | AUROC | Execution time (s) | Forward passes at predefined patch size |
| Random map | .500 .001 | .019 .006 | .956 .138 | .500 .000 | .029 .005 | .927 .011 | .500 .001 | .047 .010 | .899 .014 | .509 .035 | 0 | |
| Centre map | .688 .023 | .034 .010 | .986 .121 | .671 .017 | .047 .008 | .922 .011 | .681 .015 | .083 .016 | .946 .014 | .564 .045 | 0 | |
| Occlusion | .769 .035 | .237 .043 | .851 .108 ∗ | .823 .017 | .298 .021 | .818 .014 | .568 .026 | .120 .026 | .848 .024 | .625 .057 | 0.6 | |
| RISE | .923 .018 ∗ | .021 .006 | .897 .173 | .959 .010 ∗ | .031 .005 | .793 .022 | .620 .030 | .049 .010 | .860 .016 | .608 .047 | 38,691 | none |
| LIME | .656 .042 | .056 .010 | .916 .098 | .700 .016 | .093 .009 | 1.130 .037 | .599 .019 | .064 .013 | .871 .030 | .744 .062 | 6,390 | none |
| ResNet-50 | VGG16 | |||||||||
| Method | Deletion | Insertion | Fidelity | Pointing Game | EPG | Deletion | Insertion | Fidelity | Pointing Game | EPG |
| References | ||||||||||
| Random map | .152 .009 | .352 .016 | -.050 .008 | .385 .061 | .391 .032 | .090 .007 | .238 .012 | -.043 .008 | .385 .061 | .391 .032 |
| Centre map | .193 .011 | .577 .018 | .184 .015 | .692 .057 | .500 .037 | .169 .010 | .507 .020 | .172 .014 | .692 .057 | .500 .037 |
| Gradient- and activation-based | ||||||||||
| Saliency | .126 .009 † | .467 .017 † | .228 .015 † | .603 .061 † | .474 .033 † | .077 .007 † | .371 .015 † | .305 .018 † | .692 .057 † | .491 .031 † |
| ViT-B/16 | DeiT-B/16 | |||||||||
| Method | Deletion | Insertion | Fidelity | Pointing Game | EPG | Deletion | Insertion | Fidelity | Pointing Game | EPG |
| References | ||||||||||
| Random map | .302 .013 | .563 .017 | -.033 .008 | .385 .061 | .391 .032 | .330 .013 | .545 .017 | -.020 .007 | .385 .061 | .391 .032 |
| Centre map | .327 .013 | .625 .016 | .112 .012 | .692 .057 | .500 .037 | .335 .011 | .614 .015 | .072 .010 | .692 .057 | .500 .037 |
| Gradient- and activation-based | ||||||||||
| Saliency | .260 .012 † | .592 .015 † | .025 .011 † | .348 .069 | .395 .034 | .279 .012 † | .567 .015 † | .007 .009 † | .332 .061 | .369 .035 |
| Method | ResNet-50 | VGG16 | Pooled | Method | ResNet-50 | VGG16 | Pooled |
|---|---|---|---|---|---|---|---|
| Perturbation-based | References | ||||||
| Occlusion | .617 .009 † | .695 .007 † | .655 .005 | Random map | .250 .000 | .250 .000 | .250 .000 |
| RISE a | .277 .001 † | .284 .001 † | .280 .001 | Centre map | .250 .000 | .250 .000 | .250 .000 |
| LIME a | .662 .010 † | .592 .012 † | .627 .009 | Gradient- and activation-based | |||
| KernelSHAP | .872 .005 † | .817 .010 † | .846 .006 | Saliency | .451 .004 † | .434 .005 † | – |
| PartitionSHAP a | .694 .016 † | .802 .014 † | .748 .011 | Integrated Gradients | .429 .006 † | .395 .005 † | – |
| VisA, 512 to 1,024 px | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Method | AUROC | EPG | log-scale Deletion | AUROC | EPG | log-scale Deletion | AUROC | EPG | log-scale Deletion | AUROC | EPG | log-scale Deletion |
| Occlusion | .745 .046 † | .359 .066 † | .812 .063 | .771 .185 | .250 .217 | 1.558 .753 | .714 .059 † | .270 .126 † | .793 .050 † | .792 .055 † | .246 .069 † | .761 .112 |
| RISE a | .915 .029 † | .047 .013 † | .901 .110 | .903 .086 | .014 .010 | .680 .200 | .888 .044 † | .045 .044 † | .768 .078 | .928 .039 † | .014 .005 † | .920 .238 |
| LIME a | .650 .060 † | .162 .033 † | .942 .091 | .716 .184 | .051 .044 | 1.019 .398 | .713 .072 † | .063 .049 † | 1.016 .097 | .641 .060 † | .037 .010 † | .841 .320 |
| KernelSHAP | .673 .042 † | .154 .049 † | .858 .101 | .790 .119 | .327 .262 | 1.701 .986 | .675 .069 † | .112 .098 † | .923 .047 | .694 .056 † | .074 .048 † | .874 .107 |
| Occlusion | RISE a | LIME a | Kernel- SHAP | Partition- SHAP a | h-Shap | ShapBPT | Sobol a | HSIC | LIMA a | MoXI a | WCAM a | WaFR | |
| attention pooling, px | |||||||||||||
| 256 | .967 .005 † | .999 .000 † | .882 .046 † | .931 .011 † | .846 .037 † | .672 .018 † | .975 .004 † | .995 .003 † | .988 .002 † | .910 .019 † | .896 .043 | .990 .006 | .998 .000 † |
| 512 | .953 .005 † | .999 .000 † | .912 .032 † | .937 .009 † | .887 .029 † | .825 .019 † | .965 .004 † | .990 .003 † | .972 .004 † | .893 .038 † | .893 .074 | .994 .004 | .996 .000 † |
| 1024 | .835 .011 † | .993 .002 † | .925 .023 † | .832 .015 † | .919 .030 † | .899 .019 † | .916 .008 † | .957 .010 † | .852 .015 † | .831 .028 † | .838 .201 | .922 .031 | .991 .002 † |
| 2048 | .652 .021 † | .987 .007 † | .901 .090 † | .684 .025 † | n.r. t | .871 .027 † | .829 .020 † | .797 .070 † | .796 .035 † | .681 .055 † | .774 .169 | .961 .035 | .987 .004 † |
| 4096 | .500 .000 | .985 .008 † | .953 .037 | .568 .033 † | n.r. t | .742 .020 † | n.r. t | .795 .070 † | .796 .035 † | .622 .084 | .554 .048 | .916 .045 | .984 .006 † |
| Patch-level AUROC | Slide Deletion | |||||||||
| Method | mean | wins | ||||||||
| WaFR | 45 | .949 | – | – | – | 40 | – | – | ||
| Occlusion | 45 | .625 | [ , ] | .001 | 45/45 | 40 | [ , ] | .001 | ||
| RISE | 45 | .608 | [ , ] | .001 | 45/45 | 40 | [ , ] | .001 | ||
| LIME | 45 | .744 | [ , ] | .001 | 39/45 | 40 | [ , ] | .062 | ||
| KernelSHAP | 38 | .778 | [ , ] | .001 | 36/38 | 34 | [ , ] | .001 | ||
Explainable Image Classification
Explainable image classification develops ways to show which pixels, regions, concepts, or model features support an image classifier’s predictions.
See all 110 papers