arXiv:2610.05891cs.CVOct 2026

Manuscript Offprint

arXiv:2610.05891

Spatial Supervision Without Attribution Optimization: Improving Post-Hoc Class Activation Maps via Box-Guided Evidence Routing

Wenhao Liang, Liangwei Nathan Zheng, Lin Yue, Wei Emma Zhang, Mingyu Guo, Weitong Chen

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 0.584 to 0.715 on CUB-200-2011 and from 0.757 to 0.832 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.

Introduction

Post-hoc class activation maps such as Grad-CAM (Selvaraju et al. 2017) are widely used to inspect where a classifier appears to draw its evidence, yet conventional classifiers are never trained to make these maps spatially appropriate. One can supervise a saliency map directly to improve its localization, but that optimizes an attribution proxy from the same family later used to evaluate it. We ask a different question: can spatial supervision applied to an internal feature route transfer to the classifier's own predicted-class CAM, so that the post-hoc map concentrates on the target or lesion region without any attribution map ever entering the training objective?

BGER supervises a minimal gate on the backbone feature map and routes classification through the gated features. The training target is the route; the evaluated map is predicted-class Grad-CAM. Any route-to-CAM improvement must therefore pass through the learned classifier, not through direct optimization of that map. We use route-to-CAM transfer to describe transfer under route-supervised training; the matched no-routing control separately measures how much of it routing contributes.

BCE-BGER raises full-test predicted-class Grad-CAM MaxBoxAccV2 from .584 to .715 on CUB and from .757 to .832 on Stanford Dogs at similar accuracy. CAM-BCE reaches .769 on CUB at a modest accuracy cost. Equal-annotation controls distinguish feature routing from alternative uses of the same boxes. An objective-matched auxiliary control that supervises the identical gate with the identical balanced-BCE loss but classifies from the ungated features reaches .683 (+.099 over CE), so shared-backbone reshaping explains most of the transfer, while routing adds a smaller +.032 increment under the matched ResNet-50 intervention. Lesion-grounding and architecture experiments test where this transfer holds and where it breaks down.

Our contributions are:

  1. BGER supervises a box/mask-guided feature route and leaves the post-hoc CAM it is evaluated on outside the loss; BCE-BGER uses class-balanced binary cross-entropy for route supervision.

  2. Route-to-CAM transfer: BCE-BGER improves predicted-class CAM localization on CUB and Stanford Dogs, and improves positive-finding lesion maps on two controlled chest-X-ray benchmarks; CAM-BCE provides the direct-supervision comparison.

  3. Mechanism analysis. Matched no-routing and detach interventions show that most of the ResNet-50 transfer arises from changes in the shared representation, with routing adding a smaller increment. The detach experiment reveals strong architecture dependence: the gain survives on ResNet-50 and the reported DenseNet-121 settings but not on Swin-T.

References (78)