Learn to Rank: Visual Attribution by Learning Importance Ranking
Organizations: Institute of Visual Computing (IVC), Graz University of Technology, Graz, Austria · Nomadic AI, USA · Amazon, USA
Abstract
Interpreting the decisions of complex computer vision models is crucial to establish trust and accountability, especially in safety-critical domains. An established approach to interpretability is generating visual attribution maps that highlight regions of the input most relevant to the model's prediction. However, existing methods face a three-way trade-off. Propagation-based approaches are efficient, but they can be biased and architecture-specific. Meanwhile, perturbation-based methods are causally grounded, yet they are expensive and for vision transformers often yield coarse, patch-level explanations. Learning-based explainers are fast but usually optimize surrogate objectives or distill from heuristic teachers. We propose a learning scheme that instead optimizes deletion and insertion metrics directly. Since these metrics depend on non-differentiable sorting and ranking, we frame them as permutation learning and replace the hard sorting with a differentiable relaxation using Gumbel-Sinkhorn. This enables end-to-end training through attribution-guided perturbations of the target model. During inference, our method produces dense, pixel-level attributions in a single forward pass with optional, few-step gradient refinement. Our experiments demonstrate consistent quantitative improvements and sharper, boundary-aligned explanations, particularly for transformer-based vision models. Code and pretrained models are available at https://github.com/dschinagl/AHA.
Figures & tables
| Method | Deletion | Insertion | Ins. - Del. | Positive | Negative | Neg. - Pos. | ADP | PIC | Runtime | |
|---|---|---|---|---|---|---|---|---|---|---|
| Predicted Class | Grad-CAM [ 55 ] | 0.2858 | 0.4982 | 0.2124 | 0.3346 | 0.5788 | 0.2442 | 84.3339 | 4.3577 | 0.014s |
| IG [ 64 ] | 0.1857 | 0.5544 | 0.3686 | 0.2248 | 0.6347 | 0.4099 | 22.9340 | 33.4353 | 0.251s | |
| Trans-Att. [ 71 ] | 0.1654 | 0.5833 | 0.4178 | 0.2022 | 0.6654 | 0.4633 | 25.6994 | 30.8467 | 0.254s | |
| Bi-Att. [ 17 ] | 0.1600 | 0.5958 | 0.4358 | 0.1961 | 0.6789 | 0.4828 | 28.4572 | 28.2614 | 0.254s | |
| TIS [ 27 ] | 0.1420 | 0.6381 | 0.4961 | 0.1731 | 0.7222 | 0.5492 | 11.2479 | 45.5658 | 1.167s | |
| ViT-CX [ 69 ] | 0.1750 | 0.5714 | 0.3964 | 0.2149 | 0.6478 | 0.4328 | 12.5472 | 43.4971 | 0.860s |
| Method | Deletion | Insertion | Ins. - Del. | Positive | Negative | Neg. - Pos. | ADP | PIC | Runtime | |
|---|---|---|---|---|---|---|---|---|---|---|
| Predicted Class | Grad-CAM [ 55 ] | 0.2337 | 0.5294 | 0.2956 | 0.2930 | 0.6328 | 0.3398 | 66.9314 | 8.5072 | 0.010s |
| IG [ 64 ] | 0.1897 | 0.5542 | 0.3645 | 0.2426 | 0.6567 | 0.4141 | 14.2831 | 39.0279 | 0.157s | |
| Trans-Att. [ 71 ] | 0.2024 | 0.5507 | 0.3483 | 0.2567 | 0.6534 | 0.3967 | 17.1553 | 34.9780 | 0.157s | |
| Bi-Att. [ 17 ] | 0.1887 | 0.5726 | 0.3839 | 0.2416 | 0.6782 | 0.4366 | 17.6613 | 34.3086 | 0.158s | |
| TIS [ 27 ] | 0.1702 | 0.6094 | 0.4392 | 0.2144 | 0.7181 | 0.5037 | 9.7104 | 48.3937 | 0.416s | |
| ViT-CX [ 69 ] | 0.1982 | 0.5604 | 0.3622 | 0.2525 | 0.6622 | 0.4098 | 9.3272 | 48.9950 | 0.763s |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| (train h) | (train h) | |||
|---|---|---|---|---|
| Baseline | ||||
| ViT-CX | 19.19k | 51.76k | 8.53k | 23.00k |
| TIS | 14.07k | 26.13k | 6.25k | 11.61k |
| MDA | 0 1.19k | 0 1.24k | 0.53k | 0 0.55k |
| Method | Deletion | Insertion | Ins. - Del. | Positive | Negative | Neg. - Pos. | ADP | PIC | Runtime | |
|---|---|---|---|---|---|---|---|---|---|---|
| Pred. Class | ScoreCAM [ 68 ] | 0.3779 | 0.5425 | 0.1646 | 0.5348 | 0.7367 | 0.2019 | 56.0312 | 5.8985 | 0.821s |
| AblationCAM [ 23 ] | 0.3340 | 0.5890 | 0.2550 | 0.4753 | 0.7877 | 0.3124 | 48.9473 | 4.0993 | 0.742s | |
| GradCAM++ [ 13 ] | 0.3159 | 0.6008 | 0.2848 | 0.4635 | 0.8231 | 0.3597 | 50.9349 | 4.3820 | 0.019s | |
| HiResCAM [ 26 ] | 0.2748 | 0.6267 | 0.3520 | 0.3908 | 0.8314 | 0.4406 | 41.5140 | 5.4472 | 0.019s | |
| GradCAM [ 55 ] | 0.2748 | 0.6267 | 0.3520 | 0.3908 | 0.8314 | 0.4406 | 41.5133 | 5.4453 | 0.004s | |
| AHA (Ours) | 0.1741 | 0.5911 | 0.4170 | 0.2408 | 0.7616 | 0.5208 | 23.6857 | 6.0192 | 0.005s |
| Method | Deletion | Insertion | Insertion - Deletion | Runtime |
|---|---|---|---|---|
| Grad-CAM [ 55 ] | 0.241 | 0.737 | 0.496 | 0.014s |
| IG [ 64 ] | 0.222 | 0.741 | 0.518 | 0.251s |
| ViT-CX [ 69 ] | 0.236 | 0.722 | 0.486 | 0.860s |
| Trans-Att. [ 71 ] | 0.228 | 0.748 | 0.520 | 0.254s |
| Bi-Att. [ 17 ] | 0.218 | 0.760 | 0.542 | 0.254s |
| TIS [ 27 ] | 0.196 | 0.761 | 0.565 | 1.167s |
| MAS | ROAD | |||||
|---|---|---|---|---|---|---|
| Method | Ins. | Del. | Diff. | LeRF | MoRF | Diff. |
| ViT-CX [ 69 ] | 0.582 | 0.408 | 0.174 | 0.664 | 0.201 | 0.463 |
| TIS [ 27 ] | 0.615 | 0.385 | 0.230 | 0.712 | 0.169 | 0.543 |
| MDA [ 66 ] | 0.775 | 0.279 | 0.497 | 0.687 | 0.189 | 0.498 |
| AHA ( ) | 0.761 | 0.290 | 0.471 | 0.715 | 0.160 | 0.555 |
| Method | Mean Avg. Precision | Intersection-over-Union | F1 Score |
|---|---|---|---|
| ViT-CX [ 69 ] | 0.678 | 0.535 | 0.428 |
| TIS [ 27 ] | 0.705 | 0.586 | 0.460 |
| MDA [ 66 ] | 0.796 | 0.702 | 0.487 |
| AHA ( ) | 0.790 | 0.667 | 0.483 |
| Method | Optimized for | Evaluated on | RISE | MAS | ||||
| Diff. | Diff. | |||||||
| ViT-B/16 | MDA | B/16 | B/16 | 0.624 | – | 0.497 | – | |
| MDA | B/32 | B/16 | 0.473 | -24.2% | 0.336 | -32.4% | ||
| B/16 | B/16 | 0.715 | – | 0.471 | – | |||
| B/32 | B/16 | 0.650 | -9.1% | 0.417 | -11.5% | |||
| B/32 | B/16 | 0.739 | +3.3% | 0.427 | -9.3% | |||
| Grid size | RISE Diff. | MAS Diff. | Temp. | RISE Diff. | MAS Diff. |
|---|---|---|---|---|---|
| (used) | 0.715 | 0.471 | (used) | 0.715 | 0.471 |
| Fixed | 0.671 | 0.427 | 0.703 | 0.462 | |
| Fixed | 0.698 | 0.453 | 0.710 | 0.469 | |
| Fixed | 0.710 | 0.470 | 0.708 | 0.467 |
| Method | Deletion | Insertion | Ins. - Del. | Positive | Negative | Neg. - Pos. | ADP | PIC | Runtime | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Black Image | Predicted Class | Grad-CAM [ 55 ] | 0.2542 | 0.4562 | 0.2020 | 0.3024 | 0.5336 | 0.2312 | 90.2340 | 2.6849 | 0.014s |
| IG [ 64 ] | 0.1555 | 0.5063 | 0.3508 | 0.1899 | 0.5857 | 0.3958 | 26.4955 | 30.3434 | 0.251s | ||
| Trans-Att. [ 71 ] | 0.1402 | 0.5380 | 0.3978 | 0.1726 | 0.6189 | 0.4463 | 29.7100 | 27.5834 | 0.254s | ||
| Bi-Att. [ 17 ] | 0.1355 | 0.5533 | 0.4178 | 0.1669 | 0.6348 | 0.4678 | 32.5737 | 25.3995 | 0.254s | ||
| TIS [ 27 ] | 0.1205 | 0.5976 | 0.4771 | 0.1474 | 0.6807 | 0.5332 | 14.1945 | 42.2192 | 1.167s | ||
| ViT-CX [ 69 ] | 0.1488 | 0.5269 | 0.3781 | 0.1845 | 0.6019 | 0.4174 | 17.1795 | 37.5492 | 0.860s |
| Method | Deletion | Insertion | Ins. - Del. | Positive | Negative | Neg. - Pos. | ADP | PIC | Runtime | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Black Image | Predicted Class | Grad-CAM [ 55 ] | 0.1865 | 0.4705 | 0.2840 | 0.2365 | 0.5688 | 0.3323 | 70.1550 | 7.6858 | 0.010s |
| IG [ 64 ] | 0.1483 | 0.4963 | 0.3480 | 0.1905 | 0.5940 | 0.4035 | 16.2898 | 37.6572 | 0.157s | ||
| Trans-Att. [ 71 ] | 0.1623 | 0.4923 | 0.3300 | 0.2064 | 0.5902 | 0.3838 | 19.2848 | 33.7333 | 0.157s | ||
| Bi-Att. [ 17 ] | 0.1497 | 0.5206 | 0.3709 | 0.1914 | 0.6214 | 0.4300 | 19.6633 | 33.5833 | 0.158s | ||
| TIS [ 27 ] | 0.1368 | 0.5555 | 0.4186 | 0.1727 | 0.6607 | 0.4880 | 11.6713 | 46.1231 | 0.416s | ||
| ViT-CX [ 69 ] | 0.1601 | 0.5023 | 0.3422 | 0.2049 | 0.5993 | 0.3944 | 12.4364 | 44.0451 | 0.763s |
| Method | Deletion | Insertion | Ins. - Del. | Positive | Negative | Neg. - Pos. | ADP | PIC | Runtime | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Black Image | Pred. Class | ScoreCAM [ 68 ] | 0.3405 | 0.5154 | 0.1750 | 0.5082 | 0.7185 | 0.2103 | 56.3717 | 6.7919 | 0.821s |
| AblationCAM [ 23 ] | 0.2930 | 0.5587 | 0.2657 | 0.4337 | 0.7617 | 0.3279 | 51.8343 | 3.8980 | 0.742s | ||
| GradCAM++ [ 13 ] | 0.2832 | 0.5677 | 0.2845 | 0.4419 | 0.8028 | 0.3608 | 55.9903 | 3.7580 | 0.019s | ||
| HiResCAM [ 26 ] | 0.2374 | 0.5948 | 0.3574 | 0.3498 | 0.8067 | 0.4570 | 45.7085 | 4.7639 | 0.019s | ||
| GradCAM [ 55 ] | 0.2374 | 0.5948 | 0.3574 | 0.3498 | 0.8068 | 0.4570 | 45.7078 | 4.7600 | 0.004s | ||
| AHA (Ours) | 0.1316 | 0.5567 | 0.4251 | 0.1669 | 0.6937 | 0.5268 | 24.2854 | 6.6999 | 0.005s |