Spatial Supervision Without Attribution Optimization: Improving Post-Hoc Class Activation Maps via Box-Guided Evidence Routing
Organizations: Adelaide University, Adelaide, Australia
Abstract
Post-hoc class activation maps (CAMs) are a standard tool for inspecting the evidence behind an image classifier's predictions, yet nothing in ordinary training encourages these maps to be spatially appropriate. We study whether inexpensive spatial supervision can improve a classifier's own predicted-class Grad-CAM without ever optimizing an attribution map. Box-Guided Evidence Routing (BGER) trains a lightweight gate on the final feature map under box or mask supervision and routes classification through the gated features, while Grad-CAM is computed separately at the pre-gate representation, so the evaluated map never enters the training objective. With a BCE routing loss, BGER raises MaxBoxAccV2 from to on CUB-200-2011 and from to on Stanford Dogs at comparable accuracy. Matched controls attribute most of the ResNet-50 gain to the spatial supervision reshaping the backbone rather than to routing itself: when classification bypasses the gate, most of the improvement remains, and detaching gradients through the gate leaves the ResNet-50 result nearly unchanged. The same detachment preserves most of the gain in two DenseNet-121 chest X-ray settings but removes the apparent gain on Swin-T, and directly supervising the CAM reaches stronger localization at a larger accuracy cost. Overall, spatial supervision can improve separately evaluated post-hoc CAMs, but both the mechanism and the size of the benefit depend on the architecture and the evaluation setting.
Figures & tables
| Family | Method | Supervised object | Acc | ECE15 | EIB | PG | MaxBoxAccV2 |
|---|---|---|---|---|---|---|---|
| Label-only | CE | — | |||||
| Direct attribution | CAM-Align | CAM proxy (energy) | |||||
| CAM-Dice | CAM proxy ( , Dice) | ||||||
| CAM-BCE | CAM proxy ( , BCE) | ||||||
| Feature routing | Energy-BGER | internal route (energy–area) | |||||
| Dice-BGER | internal route (soft Dice) |
| Variant | Class. path | Acc | ECE15 | MaxBoxV2 | CE | Ret. |
|---|---|---|---|---|---|---|
| CE | — | |||||
| Frozen backbone | ||||||
| Shuffled boxes | ||||||
| Aux. BCE, no routing | ||||||
| Residual-BCE | ||||||
| BCE-BGER |
| Data | Method | AUROC | AUPRC | ECE15 | EIB | MaxBoxV2 |
|---|---|---|---|---|---|---|
| VinDr | CE | |||||
| CAM-Align | ||||||
| BCE-BGER | ||||||
| CAM-BCE | ||||||
| RSNA | CE | |||||
| CAM-Align |
| Readout | CE | BCE-BGER | CAM-BCE |
|---|---|---|---|
| Grad-CAM | .778 | ||
| Grad-CAM++ | .804 | ||
| HiResCAM | .778 | ||
| Score-CAM-128 | .798 |
| (a) CUB backbone mechanism arms | |||||
|---|---|---|---|---|---|
| Backbone | CE | Aux | BGER | det. | corr |
| ResNet-50 | |||||
| Swin-T | |||||
| ConvNeXt-T | |||||
Appendix figures & tables35 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Supervised obj. | Class. path | Evaluated obj. | Attr. in loss | Class cond. | Audit sep. | Detach audit |
|---|---|---|---|---|---|---|---|
| CAM/Grad-CAM | none | GAP | the CAM | — | — | — | — |
| WSOL | image label | GAP | true-cls map | no | yes | no | no |
| CAM-loss | feat. vs. CAM | GAP | CAM | yes | yes | no | no |
| CGC | CAM consist. | GAP | Grad-CAM | yes | yes | no | no |
| SAOL | output attn. | attn. logits | attention | no | no | no | no |
| ABN | attn. branch | attn. feat. | attention | yes | yes | no | no |
| Dataset | Method | NLL | Brier |
|---|---|---|---|
| CUB | CE | ||
| CAM-Align † | |||
| Energy-BGER | |||
| BCE-BGER | |||
| CAM-BCE | |||
| Pet | CE |
| Method | MaxBoxAccV2 (seeds 0/1/2) | ||
|---|---|---|---|
| CE | |||
| CAM-Align | |||
| Energy-BGER | |||
| Dice-BGER | |||
| BCE-BGER | |||
| CAM-BCE | |||
| Variant | Acc | ECE15 | EIB | PG | MaxBoxV2 | Gain ret. |
|---|---|---|---|---|---|---|
| CE | ||||||
| Frozen backbone | ||||||
| Shuffled boxes | ||||||
| Residual-BCE | ||||||
| BCE-BGER |
| Data | Method | AdaECE | PG | MaxBoxV2 |
|---|---|---|---|---|
| VinDr | CE | |||
| CAM-Align | ||||
| BCE-BGER | ||||
| CAM-BCE | ||||
| RSNA | CE | |||
| CAM-Align |
| Family | Val Acc | Sel. | Test Acc | Test V2 | |
|---|---|---|---|---|---|
| Gate (BCE) | — | ends | |||
| — | ends | ||||
| Proxy (Dice) |
| Metric | Comparison | CI | ||
|---|---|---|---|---|
| MaxBoxV2 | vs. CE | yes | ||
| vs. Dice | yes | |||
| vs. Energy | yes | |||
| vs. CAM-Align | yes | |||
| vs. CAM-BCE | yes | |||
| Dice vs. Energy | yes |
| Method | Box use | Route type | Acc | ECE | EIB | MaxBoxV2 |
|---|---|---|---|---|---|---|
| CE | none | — | ||||
| Bg-blackout | input mask | input-space | ||||
| Bg-random | input noise | input-space | ||||
| Object-crop | input crop | input-space | ||||
| ABN-box | feature | attention branch | ||||
| w/o box loss | none | exclusive route |
| Variant | Acc | ECE | Grad-CAM EIB | Grad-CAM MaxBoxAccV2 | Gate EIB |
|---|---|---|---|---|---|
| Energy-BGER (full) | 0.748 | 0.015 | 0.862 | 0.667 | 0.796 |
| w/o box loss | 0.748 | 0.018 | 0.800 | 0.585 | 0.487 |
| w/o area loss | 0.748 | 0.015 | 0.858 | 0.670 | 0.788 |
| residual routing | 0.751 | 0.034 | 0.815 | 0.645 | 0.822 |
| frozen backbone | 0.732 | 0.034 | 0.808 | 0.603 | 0.722 |
| shuffled-box control | 0.741 | 0.018 | 0.855 | 0.608 | 0.795 |
| Method | Acc | ECE15 | EIB | MaxBoxAccV2 |
|---|---|---|---|---|
| Swin-T transformer | ||||
| CE | ||||
| CAM-Align | ||||
| Energy-BGER ( ) | ||||
| Energy-BGER ( ) | ||||
| + temperature scaling | ||||
| val Acc | val Gate EIB | test Acc | test EIB | test MaxBoxV2 | |
|---|---|---|---|---|---|
| 0 (CE) | .778 | — | .815 | .526 | .290 |
| 1 | .777 | .826 | .806 | .438 | .295 |
| 2 | .773 | .853 | .802 | .511 | .336 |
| 4 | .765 | .883 | .799 | .516 | .338 |
| 8 | .770 | .893 | .784 | .562 | .342 |
| Dataset | Method | Evidence target | Acc | ECE | EIB/EIM | PG | MaxBoxAccV2 |
|---|---|---|---|---|---|---|---|
| Oxford-IIIT Pet | CE | foreground mask | |||||
| Oxford-IIIT Pet | CAM-Align | foreground mask | |||||
| Oxford-IIIT Pet | Energy-BGER | foreground mask | |||||
| Oxford-IIIT Pet | Energy gate | diagnostic gate | – | – | |||
| Stanford Dogs | CE | dog box | |||||
| Stanford Dogs | CAM-Align | dog box |
| Method | AUROC | AUPRC | Acc | ECE15 |
|---|---|---|---|---|
| CE | ||||
| CAM-Align | ||||
| Energy-BGER |
| Method | AUROC | AUPRC | Acc | ECE15 |
|---|---|---|---|---|
| CE | ||||
| CAM-Align | ||||
| Energy-BGER |
| Dataset | Method | AUROC | ECE15 | EIM | PG | MaxBoxV2 |
|---|---|---|---|---|---|---|
| ICH (brain CT) | CE | |||||
| CAM-Align | ||||||
| Energy-BGER | ||||||
| VinDr-Mammo | CE | |||||
| CAM-Align | ||||||
| Energy-BGER |
| Backbone | CE | Aux | BGER | BGER det. | corr |
|---|---|---|---|---|---|
| ResNet-50 | |||||
| Swin-T | |||||
| ConvNeXt-T |
| Data | std V2 | det V2 | corr | retained |
|---|---|---|---|---|
| RSNA | ||||
| VinDr |
| CE | CAM-Align | Energy-BGER | ||
|---|---|---|---|---|
| .7 | .3 | |||
| .7 | .5 | |||
| .7 | .7 | |||
| .8 | .3 | |||
| .8 | .5 | |||
| .8 | .7 |
| Method | RemoveBoxDrop | KeepBgConf | EvidenceGap | Del-AUC n |
|---|---|---|---|---|
| CE | ||||
| CAM-Align | ||||
| Energy-BGER |
| Operator | Method | EIB | MaxBoxV2 |
|---|---|---|---|
| Grad-CAM (main) | CE | ||
| CAM-Align | |||
| Energy-BGER | |||
| HiResCAM | CE | ||
| CAM-Align | |||
| Energy-BGER |
| Method | Operator | EIB | PG | MaxBoxV2 |
|---|---|---|---|---|
| CE | Grad-CAM | |||
| Grad-CAM++ | ||||
| HiResCAM | ||||
| Score-CAM ∗ | ||||
| BCE-BGER | Grad-CAM | |||
| Grad-CAM++ |
| Boxes | Acc | ECE15 | EIB | MaxBoxV2 | HCU | |
|---|---|---|---|---|---|---|
| 10% | 400 | |||||
| 25% | 1200 | |||||
| 50% | 2400 | |||||
| 100% | 4794 |
| Method | Supervision | Map | Acc | EIB | PG | MaxBoxAccV2 |
|---|---|---|---|---|---|---|
| SAT ( Wu et al. 2023 ) | image labels | WSOL map | .815 | .628 | .901 | .923 |
| CATR ( Chen et al. 2023 ) | image labels | WSOL attn. | .842 | .607 | .865 | .783 |
| TS-CAM ( Gao et al. 2021 ) | image labels | WSOL CAM | .729 | .730 | .991 | .781 |