Manuscript Offprint
arXiv:2610.05891Spatial Supervision Without Attribution Optimization: Improving Post-Hoc Class Activation Maps via Box-Guided Evidence Routing
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:
-
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.
-
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.
-
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.
1 Separate supervision and evaluation

2 Intuitive route-to-CAM examples on CUB and medical
input + GT box
CE (Grad-CAM)
BCE-BGER (Grad-CAM)
CUB (bird)

Medical (chest X-ray)
low
high
Grad-CAM read at pre-gate features H (conditioning differs by row; never in the loss).
3 Results summary (MaxBoxAccV2 ↑)

CUB (transfer)
0.584 → 0.715
(CE) (BCE-BGER)

Dogs (transfer)
0.757 → 0.832
(CE) (BCE-BGER)

Medical (lesion grounding)
Lesion grounding
improves lesion localization
(RSNA pneumonia: 0.200 → 0.427)
Figure 1: Box-Guided Evidence Routing with BCE-BGER. (1) The box or mask B supervises only the internal gate M via ; classification is routed through , and the evaluated predicted-class Grad-CAM is read at the pre-gate features H and never enters the loss. The CAM is not optimized directly, but the class-score gradient still traverses the learned route; backbone-specific detach tests quantify this contribution (Tab. 5; App. Tab. 23, 24). (2) Real route-to-CAM examples (seed-0 Grad-CAM at the pre-gate features; GT box green). CUB: predicted-class Grad-CAM—CE grounds on bark outside the bird (EIB 0.41), BCE-BGER on the creeper (0.65). Medical: RSNA positive-finding Grad-CAM lesion grounding on a positive boxed study (conditioned on the abnormality logit, not the predicted class)—CE spreads outside the radiologist box (EIB 0.23), BCE-BGER concentrates more inside (0.40); both classify correctly. The panel's colour-bar label names the shared mechanism (Grad-CAM at pre-gate H); the conditioning class differs by row as stated here. To avoid a best case, this is the median-improvement study among 491 eligible positives under a pre-stated rule (App. G). (3) Headline MaxBoxAccV2; medical is a controlled extension, not clinical validation.
map itself—CAM-loss (Wang et al. 2021), contrastive Grad-CAM consistency (Pillai et al. 2022), and, closest to our medical extension, explanation-supervised biomedical training (Faruqui and Dubey 2026). Others instead constrain an attribution-derived signal rather than the map they report: Grad-CAM-guided channel–spatial attention (Xu et al. 2021) uses Grad-CAM-derived information to guide an attention module, and input-gradient and explanation regularization (Ross, Hughes, and Doshi-Velez 2017; Schramowski et al. 2020) penalize gradients or explanations outside the annotated region. Our CAM-Align, CAM-Dice, and CAM-BCE controls are the matched direct-supervision baselines. Attention and routed representations instead expose the supervised spatial object on the prediction path: attention-branch and guided-attention methods (Fukui et al. 2019; Li et al. 2018), a spatially attentive output layer (Kim, Baek, and Kim 2020), and bounded logit attention (Baumhauer, Slijepčević, and Zeppelzauer 2021) all make the reported map part of the classifier's own computation. BGER differs from both: it supervises a class-agnostic route through which classification flows and evaluates a separately computed pre-gate predicted-class Grad-CAM that never enters the objective. No individual component is new in isolation; the contribution is this combination, together with the matched no-routing and detach interventions that measure what routing contributes and whether the gain depends on gradients through the gate. Our equal-annotation ladder compares these settings directly: the same box supplied as input masking, an attention branch, or a route produces very different Grad-CAM maps (App. Tab. 13). Calibration assesses confidence–correctness agreement (Guo et al. 2017; Naeini, Cooper, and Hauskrecht 2015) but does not measure spatial overlap.
CAM and localization evaluation. Class activation maps and Grad-CAM (Zhou et al. 2016; Selvaraju et al. 2017) visualize class-discriminative regions after training; Grad-CAM++ (Chattopadhyay et al. 2018), HiResCAM (Draelos and Carin 2020), and Score-CAM (Wang et al. 2020) use different weighting rules. WSOL evaluates localization from image-level supervision (Choe et al. 2020), whereas BGER uses training-time boxes or masks and is therefore not image-label-only WSOL. Our primary evaluation uses predicted-class post-hoc Grad-CAM; true-class dedicated WSOL maps are reported only as separately labeled localization references.
Method
Evidence-routed classification. Each sample carries an optional evidence annotation B (a box or mask) marking the spatially appropriate region. BGER routes classification features through a gate supervised to concentrate inside B, while the audited Grad-CAM stays out of the loss: the annotation supervises where features are routed, not what post-hoc heatmap should be drawn. At inference no annotation is used and BGER deploys exactly like the CE classifier.
Let , where marks a valid annotation and by convention when , and let . With backbone , class-agnostic gate , , and linear head , ,
(1)
and : a pre-softmax logit vector over classes for multiclass data, and a scalar positive-class logit ( ) for the binary chest-X-ray protocols.
Balanced-BCE route. BCE-BGER binarizes the annotation and nearest-neighbor downsamples it to the gate grid, . With and ,
(2)
When clipping is inactive the two terms assign equal aggregate weight to foreground and background pixels; clipping caps extreme weights for very small or near-global evidence regions ( , ). Here is multiclass cross-entropy for natural images and weighted binary cross-entropy for the chest-X-ray protocols, and leaves only. Dice-BGER and the separately weighted Energy-BGER objective are defined in App. B.
Matched mechanism interventions. Setting with , and ( ), each arm trains
All three share the gate parameterization, evidence target, route objective and , differing only in how the gate enters the classification path; the auxiliary arm still backpropagates the route loss into the shared backbone through M. Arms are trained independently (arm-specific parameters suppressed), so the comparison localizes where the effect enters rather than apportioning it additively.
Audited object and detach test. The audited object is the post-hoc Grad-CAM read at the pre-gate features H for the predicted class (decision-conditioned, not a GT-known map); the chest-X-ray protocols instead fix k to the positive-abnormality logit. The audit reads H upstream of the gate, but the class score still reaches H through it. Suppressing the sample index, and for the GAP-linear instantiation,
(5)
(derivation in the appendix). The detach test re-reads the same trained model with , where sg keeps the forward value and has zero derivative; hence in the forward pass—only the audit's gradient path changes—while , and under the positive-scale-invariant normalization used by the evaluator cancels, leaving the normalized head-weight CAM. This is asserted only for the GAP-linear case; Swin-T (Liu et al. 2021) and ConvNeXt-T (Liu et al. 2022) are checked empirically.
Medical spatial metrics are therefore finding-conditioned lesion grounding on positive boxed studies, not predicted-class grounding; external WSOL references, marked separately, provide true-class localization maps. The second spatial object is the learned gate M, a diagnostic routing map reported separately and never assigned classifier accuracy or calibration.
Experiments
Datasets. We use CUB-200-2011 (Wah et al. 2011), Oxford-IIIT Pet (Parkhi et al. 2012), and Stanford Dogs (Khosla et al. 2011) as main natural-image evidence. CUB and Dogs provide object boxes; Pet provides foreground trimaps, from which we use the full foreground mask as the primary evidence target and derive boxes only for box metrics. We also include two chest X-ray medical extensions with radiologist-provided boxes: VinDr-CXR (Nguyen et al. 2022) (multi-abnormality boxes) and RSNA Pneumonia 2018 (Radiological Society of North America 2018) (lung-opacity boxes). COCO-SO, a controlled single-target subset derived from COCO (Lin et al. 2014), is appendix-only because it is seed-0 and mixed.
Methods. We compare CE; BCE-BGER; the Dice-BGER and Energy-BGER route variants; and three direct-proxy controls—CAM-Align, CAM-Dice, and CAM-BCE—which apply an energy, soft-Dice, or balanced-BCE objective directly to a CAM proxy rather than to a route (App. M).
Equal-annotation controls include input masking, an ABN-style supervised-attention branch (Fukui et al. 2019), residual routing, and frozen-backbone routing. The learned gate is reported only as a diagnostic map.
Metrics. Predictive metrics are accuracy and ECE (AU-ROC/AUPRC for chest X-ray); spatial metrics are Energy-in-Box/Mask (EIB/EIM), Pointing Game (PG; Zhang et al. 2016), and MaxBoxAccV2. The primary CUB table, the BCE-BGER mechanism controls, and the high-confidence spatially-ungrounded rate (HCU) all use the full 5,794-image test set. Region-restricted corruption uses a fixed N = 1,000 subset; operator consistency uses a separately fixed N = 500 subset. Medical spatial metrics use positive boxed test images only. Code and per-sample records are provided as a code-and-data supplement accompanying this paper.
Implementation details. For CUB, Pet, and Dogs we use ImageNet-initialized ResNet-50 (He et al. 2016); the chest X-ray protocols use DenseNet-121 (Huang et al. 2017) with weighted BCE; seeds 0–2 when marked three-seed (full recipes: App. Sec. B). Hyperparameters are selected on seed-0 validation, never on test. BCE-BGER uses on CUB and Dogs; soft Dice uses the same weight. Energy-area results retain their separately selected recipe and are labeled as an objective variant. CAM-BCE applies the objective-matched balanced BCE to a sigmoid CAM proxy on the same backbone. Internal classifier rows report predicted-class Grad-CAM. BGER adds parameters (+0.009%) and one convolution at inference.
BCE-BGER Route-to-CAM Transfer on CUB and Dogs
Across three seeds, BCE-BGER improves full-test CUB Grad-CAM MaxBoxAccV2 from 0.584 to 0.715 (Tab. 1); accuracy/ECE are .748/.016 versus CE .749/.017. A paired image-level bootstrap over all 5,794 test images (10,000 resamples) puts the MaxBoxAccV2 gain over CE at +.130 (95% CI [.126, .134], excludes zero) with accuracy indistinguishable from CE ( CI [-.007, .005]); BCE-BGER also exceeds the Energy (+.057 [.053, .059]) and Dice (+.024 [.022, .027]) route variants, with seed-level complete separation (App. Tab. 8).
The result replicates on Stanford Dogs (App. Tab. 29): BCE-BGER raises MaxBoxAccV2 from CE .757 to .832 (Energy-BGER .801; Dice-BGER .829) at similar accuracy (.878 vs. .880) and calibration, and all six BCE- and Dice-BGER seeds exceed all three Energy-BGER seeds.
Route Supervision versus Direct CAM Supervision
CAM-BCE directly optimizes a CAM proxy and reaches 0.769 on CUB, higher on localization ( over BCE-BGER +.054, CI [.051, .058]) but at a real accuracy cost (BCE-BGER accuracy is higher, +.011, CI [.005, .016]). BCE-BGER instead keeps the supervised route distinct from the map it is evaluated on.
Accuracy-localization frontier. Both families are swept under the same validation-only protocol (matched accuracy constraint, evaluator, and box target; test used once per point;

Figure 2: CE-relative accuracy-localization trade-offs on CUB. Axes show accuracy change from CE in percentage points and MaxBoxAccV2 change from CE. Small markers are observed seed-0 weight-sweep outcomes connected in increasing- order; large markers with error bars are the validation-selected means and standard deviations of paired CE-relative differences across three matched seeds. Gate-route BCE-BGER yields +.130 MaxBoxAccV2 at approximately -0.1 pp accuracy, whereas direct-proxy CAM-BCE yields +.184 at approximately -1.2 pp. Lines connect discrete trained models only; neither family dominates over the tested grids.
full per-point table in App. H), and the two observed sweeps are mutually non-dominating (Fig. 2; swept points are seed-0, the validation-selected points are confirmed with three seeds). The gate's frontier rises with route weight (.654 → .717 for ) and then saturates ( gives .716) while holding accuracy; the proxy passes through a comparable point at the same accuracy and extends beyond it to .769 at accuracy .739. Direct proxy supervision maximizes localization, while the route preserves more accuracy.
Spatial Supervision Drives Most Transfer; Routing Adds a Smaller Increment
All controls here use BCE-BGER, three seeds, and the full-test evaluator of Tab. 1 (Tab. 2). Frozen backbone: retraining only the gate and head under the BCE route loss reaches MaxBoxAccV2 .597±.000—about a tenth of the full .584→.715 gain—so the transfer requires the backbone representation to reshape. Shuffled boxes: replacing each box with another image's box retains .619±.003, about a quarter of the gain, so correct object extents matter rather than a generic center prior.
Auxiliary BCE, no routing: the no-routing control supervises the identical gate with the identical balanced-BCE loss at the same , but classifies from the ungated GAP(H), so the backbone still receives the spatial gradient while the supervised map never enters the classification path. This
| Family | Method | Supervised object | Acc | ECE15 | EIB | PG | MaxBoxAccV2 |
|---|---|---|---|---|---|---|---|
| Label-only | CE | — | .749±.005 | .017±.004 | .788 | .966 | .584±.001 |
| Direct attribution | CAM-Align | CAM proxy (energy) | .747±.003 | .022±.003 | .866 | .996 | .651±.005 |
| CAM-Dice | CAM proxy (σ(S), Dice) | .748±.003 | .016±.007 | .786 | .984 | .696±.006 | |
| CAM-BCE | CAM proxy (σ(S), BCE) | .737±.005 | .030±.005 | .837 | .997 | .769±.008 | |
| Feature routing | Energy-BGER | internal route (energy-area) | .750±.001 | .015±.002 | .859 | .992 | .658±.001 |
| Dice-BGER | internal route (soft Dice) | .749±.001 | .013±.002 | .829 | .991 | .690±.005 | |
| Residual-BCE | internal route (bypass, BCE) | .755±.003 | .019±.007 | .814 | .987 | .714±.003 | |
| BCE-BGER | internal route (balanced BCE) | .748±.001 | .016±.004 | .840 | .995 | .715±.005 |
Table 1: Objective-matched CUB comparison on the full test set (N=5,794; three seeds; predicted-class Grad-CAM), grouped by supervision family. Direct-proxy methods supervise an attribution-family map; route methods supervise an internal feature route and never place an attribution map in the loss. BCE-BGER uses class-balanced binary cross-entropy for route supervision; CAM-BCE applies the same loss to a CAM proxy and reaches higher localization at lower accuracy (full frontier: Fig. 2).
reaches .683±.001 (+.099 over CE) at accuracy indistinguishable from BCE-BGER (-.003±.003). Spatial supervision applied through the gate therefore transfers primarily by reshaping the shared backbone even when classification bypasses the gate, and routing is not necessary for most of the effect. Routing adds a smaller +.032 increment, consistent across the three seeds and at no accuracy cost; the route need not be exclusive, however, since a non-exclusive residual route reaches .714±.003, essentially matching the exclusive .715±.005 (per-seed increments, intervals, and the Energy contrast in App. E). The BCE results thus support an additional routing effect but not a benefit from exclusive gating. “Ret.” is descriptive: these interventions train different systems and need not compose additively.
For the GAP-linear ResNet instantiation, the Grad-CAM weights decompose exactly as with v an image-independent gate direction (App. Eq. 8; measured projection residual ). We test the consequence directly. Detaching the gate derivative—severing while preserving the forward gate values—changes MaxBoxAccV2 by only .0029 (.715 → .712), retains 97.7% of the CE→BCE-BGER gain, and yields a mean per-image map correlation of .9999, with 99.99% of images above .98. The detached map is numerically identical to the head-weight CAM, confirming the decomposition's prediction that the remaining image-dependent scalar cancels under normalized visualization. Gradients through the gate therefore contribute little to this map for the GAP-linear ResNet instantiation: the gain is carried by the reshaped features, not by the gate imprinting a template on the map.
Two further controls bound the effect. Both are legacy Energy-BGER diagnostics run under the earlier Energy recipe and its evaluator (whose CE reference reads .588 rather than .584); they are not BCE-BGER ablations and should not be read as such. Under an equal-annotation protocol, supplying the identical box through input masking, randomization, or cropping leaves the resulting map near CE, and an ABN-style attention branch moves it only slightly: feature routing produces the largest shift among the tested equal-annotation non-proxy controls (App. Tab. 13). Removing the box loss collapses localization to CE level, and an Energy-BGER annotation-budget diagnostic on that fixed protocol recovers over half the gain with 10% of boxes (App. Tab. 31).

Figure 3: Region-restricted corruption for BCE-BGER (CUB, fixed N=1,000 subset, three seeds, matched noise+blur). BCE-BGER retains more accuracy than CE when only the background is corrupted (a) and loses more when only the annotated object is corrupted (b), consistent with greater object-region sensitivity. Corruption probes sensitivity, not causal reliance.
Regional Sensitivity under Corruption
Corrupting only the annotated object or its complement tests regional sensitivity without reading a CAM (Fig. 3). At severity 3, BCE-BGER is less affected than CE by background corruption (.720 vs. .711) and more affected by object corruption (.021 vs. .048). On the full test set, high-confidence spatially-ungrounded predictions (confidence with EIB ) fall twenty-fold, from for CE to for BCE-BGER.
Lesion Grounding on Chest X-rays
Both chest-X-ray protocols use DenseNet-121 with radiologist boxes as evidence targets; spatial metrics use positive boxed images only (Tab. 3). Lesions are often off-center, irregular, and different in scale and geometry from the object-centric natural-image targets, so this is a different evaluation
| Variant | Class. path | Acc | ECE15 | MaxBoxV2 | Δ CE | Ret. |
|---|---|---|---|---|---|---|
| CE | H | .749±.005 | .017±.004 | .584±.001 | — | 0% |
| Frozen backbone | M ⊙ H | .731±.006 | .026±.017 | .597±.000 | +.013 | 10% |
| Shuffled boxes | M ⊙ H | .734±.007 | .018±.008 | .619±.003 | +.035 | 27% |
| Aux. BCE, no routing | H | .751±.003 | .012±.003 | .683±.001 | +.099 | 76% |
| Residual-BCE | H ⊙ (1+ηM) | .755±.003 | .019±.007 | .714±.003 | +.130 | 99% |
| BCE-BGER | M ⊙ H | .748±.001 | .016±.004 | .715±.005 | +.131 | 100% |
Table 2: BCE-BGER mechanism controls (CUB full test, three seeds, same evaluator as Tab. 1). “Gain ret.” is the fraction of the CE→BCE-BGER MaxBoxAccV2 gain retained; it is descriptive, and the interventions do not compose additively. Aux. BCE, no routing applies the identical gate and box loss but classifies from the ungated GAP(H); it isolates shared-backbone reshaping from routing and recovers most of the gain. “Class. path” is the representation the classifier reads. Full protocol and equal-annotation controls: App. E, J.
regime. For these DenseNet-121 checkpoints, detaching the gate-gradient path retains 94% of the RSNA gain and 78% of the VinDr gain (App. Tab. 24), excluding the Swin-like collapse discussed below.
On VinDr-CXR, BCE-BGER improves its Grad-CAM on both spatial axes over CE (.142 → .209, EIB .147 → .263), but direct CAM supervision is clearly stronger spatially (.361/.402) and has the higher AUROC point estimate (.885 vs. .862, unresolved at three seeds): VinDr favors direct CAM supervision. On RSNA the ordering partly reverses—BCE-BGER gives the highest MaxBoxAccV2 (.427) and AUROC (.988 vs. .986, also unresolved), whereas CAM-BCE gives stronger EIB/PG (.568/.782 vs. .379/.713). Which method looks better depends on which spatial metric is read—the same accuracy-localization tension as the CUB frontier, now between metrics rather than along a sweep.
When soft energy and box overlap diverge. A per-case subgroup analysis (App. Tab. 34) shows that the route-vs-proxy ordering is a metric property rather than a geometry effect: CAM-BCE's soft-energy advantage over BCE-BGER is nearly constant across lesion size and box count, while their thresholded box overlap is indistinguishable everywhere. Direct proxy supervision buys concentration on the map it optimizes, uniformly, without a matching overlap gain, so the two families can swap ranks between soft energy-in-box and thresholded MaxBoxAccV2 while staying close on the latter. Lesion grounding thus supports transfer beyond object-centric images and shows that soft concentration and thresholded localization are not interchangeable.
CAM Readouts and Backbone Dependence
The localization shift is not specific to the Grad-CAM weighting rule. On the fixed CUB subset, BCE-BGER exceeds CE under Grad-CAM, Grad-CAM++, HiResCAM, and gradient-free Score-CAM-128 (Tab. 4), with MaxBoxAccV2 gains of about .13-.14; CAM-BCE remains higher under every readout, consistent with the trade-off in Fig. 2. Because all operators read the same box-supervised representation, this establishes consistency across readout rules, not attribution-method independence.
The detach experiment addresses a different question: whether the standard Grad-CAM gain itself depends on gradients through the gate (Tab. 5). On ResNet-50 the gain survives detachment and comes mostly from representation reshaping: the no-routing arm reaches .683, 76% of the CE-to-BCE-BGER gain, and detaching the gate gradient changes the routed map only marginally (.715 to .712, r=.9999). The two DenseNet-121 medical settings behave similarly (Tab. 5b): they retain 94% and 78% of their gains at map correlations .957 and .940, so the reported medical localization gain also survives removal of the gate-gradient derivative—though, unlike the ResNet-50 no-routing arm, this does not separate reshaping from routing.
The other two backbones behave differently. On Swin-T the standard routed Grad-CAM does not survive detachment. It reaches .896 versus .280 for CE, but detaching drops it to .256—below CE—and the standard and detached maps are anti-correlated (), with the standard map .91-correlated with the gate itself. Its apparent gain therefore came from gradients through the gate (gate-gradient imprinting), not from a reshaped representation; the no-routing figure is only +.038. Prediction is unaffected, and detachment removes only the standard map's standing as evidence of representation transfer. On ConvNeXt-T detachment leaves MaxBoxAccV2 essentially unchanged (.253 to .255, ), but BCE-BGER does not improve localization at all: both values stay below CE (.291) and calibration worsens. Here the stable detach result rules out contamination from the gate gradient, so the negative result is real rather than a measurement artifact. The detach test thus passes for the reported ResNet-50 and DenseNet-121 GAP-linear implementations and should be re-checked on a new backbone. Complete BCE-BGER mechanism arms and detach results are in App. Tab. 23, 24; App. Tab. 15 and Fig. 4 report separate Energy-BGER architecture sweeps.
Scene and target-geometry boundaries. On Pet, whose loose full-object mask favors diffuse maps, the Energy route improves EIM/PG but not box IoU (App. Tab. 17); on cluttered COCO-SO scenes, soft evidence improves without thresholded localization (App. Tab. 21). Both are cases where soft evidence concentration and thresholded box localization come apart.
Limitations
BGER requires box or mask supervision and is not image-label-only WSOL. The gate is diagnostic, and improved
| Data | Method | AUROC | AUPRC | ECE15 | EIB | MaxBoxV2 |
|---|---|---|---|---|---|---|
| VinDr | CE | .851±.021 | .768±.027 | .138±.012 | .147±.012 | .142±.015 |
| CAM-Align | .878±.027 | .805±.028 | .085±.013 | .390±.006 | .255±.044 | |
| BCE-BGER | .862±.016 | .805±.023 | .125±.020 | .263±.029 | .209±.011 | |
| CAM-BCE | .885±.011 | .820±.013 | .103±.031 | .402±.015 | .361±.002 | |
| RSNA | CE | .985±.002 | .983±.003 | .027±.007 | .189±.036 | .200±.066 |
| CAM-Align | .986±.001 | .983±.001 | .024±.011 | .565±.017 | .361±.018 | |
| BCE-BGER | .988±.001 | .986±.001 | .014±.012 | .379±.013 | .427±.029 | |
| CAM-BCE | .986±.002 | .983±.004 | .011±.005 | .568±.011 | .420±.015 |
Table 3: Controlled chest-X-ray lesion grounding (three seeds, mean±std; DenseNet-121). Both protocols use a single abnormality logit; the CAM is conditioned on that logit and spatial metrics are computed on positive boxed test images only, so—unlike the predicted-class CUB evaluation—these rows read the map for a known-present finding. Discriminative performance is reported as AUROC/AUPRC because both protocols are class-imbalanced (accuracy, PG, and AdaECE in App. Tab. 10). Italics denote direct CAM-proxy supervision; BCE-BGER and CAM-BCE use the objective-matched balanced BCE ( ).
| Readout | CE | BCE-BGER | CAM-BCE |
|---|---|---|---|
| Grad-CAM | .593 | .728 | .778 |
| Grad-CAM++ | .602 | .736 | .804 |
| HiResCAM | .593 | .728 | .778 |
| Score-CAM-128 | .590 | .734 | .798 |
Table 4: Localization (MaxBoxAccV2) across CAM readouts on the fixed N=500 CUB subset (three seeds, identical images and checkpoints). BCE-BGER improves over CE under all four readouts, including gradient-free Score-CAM-128; CAM-BCE (italic, direct supervision) remains higher, consistent with Fig. 2. This establishes consistency across readout rules, not attribution-method independence, because all operators read the same box-supervised representation. Full EIB/PG in App. Tab. 28.
post-hoc CAM concentration does not establish causal reliance: separating supervision from evaluation removes direct proxy fitting but not the influence of supervision on the representation, and a split-disjoint spurious-context counterexample (App. P) shows that CAM concentration does not imply background-shortcut robustness. The medical protocols are controlled lesion-grounding benchmarks, not clinical validation. Detachment also behaves differently across backbones: Grad-CAM is stable on ResNet-50 and the two DenseNet-121 settings, but on Swin-T the standard-map gain depends on gradients through the gate, and on ConvNeXt-T routing does not improve localization even though detachment is stable; the detach test should be repeated before interpreting results on a new backbone. Other limits—clutter, architecture, and target geometry—are reported with their experiments in the Results.
Conclusion
Balanced-BCE routing (BCE-BGER) shows that spatial supervision can improve a classifier's own separately evaluated post-hoc Grad-CAM—on CUB, Stanford Dogs, and controlled chest-X-ray lesion grounding, at similar accuracy—without optimizing the CAM itself. Matched controls indicate that most of the ResNet-50 improvement comes from re-
(a) CUB backbone mechanism arms
| Backbone | CE | Aux | BGER | det. | corr |
|---|---|---|---|---|---|
| ResNet-50 | .584 | .683 | .715 | .712 | .9999 |
| Swin-T | .280 | .317 | .896 | .256 | -.16 |
| ConvNeXt-T | .291 | .288 | .253 | .255 | .974 |
(b) DenseNet-121 medical detach stability
| Dataset | std. | det. | corr. | retained |
|---|---|---|---|---|
| RSNA | .427 | .413 | .957 | 94% |
| VinDr | .209 | .194 | .940 | 78% |
Table 5: (a) Predicted-class Grad-CAM MaxBoxAccV2 on the full CUB test set (three seeds): CE, auxiliary BCE without routing (Aux), BCE-BGER, BCE-BGER with the gate gradient detached (det.), and the mean per-image standard-vs-detached map correlation (corr). (b) Positive-finding Grad-CAM MaxBoxAccV2 on positive boxed chest-X-ray studies (three seeds): standard vs. detached MaxBoxAccV2, map correlation, and the fraction of the CE→BCE-BGER gain retained. Read values within each panel, not across them. Panel (b) tests only whether the reported localization gain survives removing the gate-gradient derivative; it does not isolate representation reshaping from routing as the matched ResNet-50 no-routing arm does. On ConvNeXt-T both localization scores stay below CE while the standard and detached maps remain highly correlated, so the negative result is not a detachment artifact.
shaping the shared representation, while routing contributes a smaller additional effect. The detach results show why this distinction matters: the gain survives on ResNet-50 and the reported DenseNet-121 settings but disappears on Swin-T, so route-to-CAM transfer cannot be assumed to have the same mechanism across architectures.
References
Baumhauer, T.; Slijepčević, D.; and Zeppelzauer, M. 2021. Bounded Logit Attention: Learning to Explain Image Classifiers. arXiv preprint arXiv:2105.14824.
Chattopadhyay, A.; Sarkar, A.; Howlader, P.; and Balasubra-manian, V. N. 2018. Grad-CAM++: Improved Visual Explanations for Deep Convolutional Networks. In Proceedings of the IEEE Winter Conference on Applications of Computer Vision, 839–847.
Chen, Z.; Ding, J.; Cao, L.; Shen, Y.; Zhang, S.; Jiang, G.; and Ji, R. 2023. Category-aware Allocation Transformer for Weakly Supervised Object Localization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 6643–6652.
Choe, J.; Oh, S. J.; Lee, S.; Chun, S.; Akata, Z.; and Shim, H. 2020. Evaluating Weakly Supervised Object Localization Methods Right. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 3133–3142.
Draelos, R. L.; and Carin, L. 2020. Use HiResCAM instead of Grad-CAM for faithful explanations of convolutional neural networks. arXiv preprint arXiv:2011.08891.
Faruqui, Z.; and Dubey, R. 2026. Explanation-Aware Learning for Enhanced Interpretability in Biomedical Imaging. arXiv preprint arXiv:2605.10054.
Fukui, H.; Hirakawa, T.; Yamashita, T.; and Fujiyoshi, H. 2019. Attention Branch Network: Learning of Attention Mechanism for Visual Explanation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 10705–10714.
Gao, W.; Wan, F.; Pan, X.; Peng, Z.; Tian, Q.; Han, Z.; Zhou, B.; and Ye, Q. 2021. TS-CAM: Token Semantic Coupled Attention Map for Weakly Supervised Object Localization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2886–2895.
Guo, C.; Pleiss, G.; Sun, Y.; and Weinberger, K. Q. 2017. On Calibration of Modern Neural Networks. In Proceedings of the International Conference on Machine Learning, 1321–1330.
He, K.; Zhang, X.; Ren, S.; and Sun, J. 2016. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 770–778.
Hendrycks, D.; and Dietterich, T. 2019. Benchmarking Neural Network Robustness to Common Corruptions and Perturbations. In International Conference on Learning Representations.
Hssayeni, M. D.; Croock, M. S.; Salman, A. D.; Al-khafaji, H. F.; Yahya, Z. A.; and Ghoraani, B. 2020. Intracranial Hemorrhage Segmentation Using a Deep Convolutional Model. Data, 5(1): 14.
Huang, G.; Liu, Z.; Van Der Maaten, L.; and Weinberger, K. Q. 2017. Densely Connected Convolutional Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 4700–4708.
Khosla, A.; Jayadevaprakash, N.; Yao, B.; and Fei-Fei, L. 2011. Novel Dataset for Fine-Grained Image Categorization: Stanford Dogs. In First Workshop on Fine-Grained Visual Categorization, IEEE Conference on Computer Vision and Pattern Recognition.
Kim, I.; Baek, W.; and Kim, S. 2020. Spatially Attentive Output Layer for Image Classification. In Proceedings of
the IEEE/CVF Conference on Computer Vision and Pattern Recognition.
Li, K.; Wu, Z.; Peng, K.-C.; Ernst, J.; and Fu, Y. 2018. Tell Me Where to Look: Guided Attention Inference Network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.
Lin, T.-Y.; Goyal, P.; Girshick, R.; He, K.; and Dollár, P. 2017. Focal Loss for Dense Object Detection. In Proceedings of the IEEE International Conference on Computer Vision, 2980–2988.
Lin, T.-Y.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; and Zitnick, C. L. 2014. Microsoft COCO: Common Objects in Context. In European Conference on Computer Vision, 740–755.
Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; and Guo, B. 2021. Swin Transformer: Hierarchical Vision Transformer using Shifted Windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 10012–10022.
Liu, Z.; Mao, H.; Wu, C.-Y.; Feichtenhofer, C.; Darrell, T.; and Xie, S. 2022. A ConvNet for the 2020s. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 11976–11986.
Naeini, M. P.; Cooper, G. F.; and Hauskrecht, M. 2015. Obtaining Well Calibrated Probabilities Using Bayesian Binning. In Proceedings of the AAAI Conference on Artificial Intelligence, 2901–2907.
Nguyen, H. Q.; Lam, K.; Le, L. T.; Pham, H. H.; Tran, D. Q.; Nguyen, D. B.; Le, D. D.; Pham, C. M.; Tong, H. T. T.; Dinh, D. H.; et al. 2022. VinDr-CXR: An Open Dataset of Chest X-rays with Radiologist's Annotations. Scientific Data, 9(1): 429.
Nguyen, H. T.; Nguyen, H. Q.; Pham, H. H.; Lam, K.; Le, L. T.; Dao, M.; and Vu, V. 2023. VinDr-Mammo: A large-scale benchmark dataset for computer-aided diagnosis in full-field digital mammography. Scientific Data, 10(1): 277.
Parkhi, O. M.; Vedaldi, A.; Zisserman, A.; and Jawahar, C. V. 2012. Cats and Dogs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 3498–3505.
Pillai, V.; Abbasi Koohpayegani, S.; Ouligian, A.; Fong, D.; and Pirsiavash, H. 2022. Consistent Explanations by Contrastive Learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.
Radiological Society of North America. 2018. RSNA Pneumonia Detection Challenge. https://www.rsna.org/artificial-intelligence/ai-image-challenge/rsna-pneumonia-detection-challenge-2018.
Radiological Society of North America. 2024. RSNA 2024 Lumbar Spine Degenerative Classification. Kaggle competition. https://www.kaggle.com/competitions/rsna-2024-lumbar-spine-degenerative-classification.
Ross, A. S.; Hughes, M. C.; and Doshi-Velez, F. 2017. Right for the Right Reasons: Training Differentiable Models by Constraining their Explanations. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence.
Schramowski, P.; Stammer, W.; Teso, S.; Brugger, A.; Herbert, F.; Shao, X.; Luigs, H.-G.; Mahlein, A.-K.; and Kersting, K. 2020. Making Deep Neural Networks Right for the Right Scientific Reasons by Interacting with Their Explanations. Nature Machine Intelligence, 2(8): 476–486.
Selvaraju, R. R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; and Batra, D. 2017. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. In Proceedings of the IEEE International Conference on Computer Vision, 618–626.
Wah, C.; Branson, S.; Welinder, P.; Perona, P.; and Belongie, S. 2011. The Caltech-UCSD Birds-200-2011 Dataset. Technical Report CNS-TR-2011-001, California Institute of Technology.
Wang, C.; Xiao, J.; Han, Y.; Yang, Q.; Song, S.; and Huang, G. 2021. Towards Learning Spatially Discriminative Feature Representations. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 1326–1335.
Wang, H.; Wang, Z.; Du, M.; Yang, F.; Zhang, Z.; Ding, S.; Mardziel, P.; and Hu, X. 2020. Score-CAM: Score-Weighted Visual Explanations for Convolutional Neural Networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, 24–25.
Wu, P.; Zhai, W.; Cao, Y.; Luo, J.; and Zha, Z.-J. 2023. Spatial-Aware Token for Weakly Supervised Object Localization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 1844–1854.
Xu, S.; Chang, D.; Xie, J.; and Ma, Z. 2021. Grad-CAM Guided Channel-Spatial Attention Module for Fine-Grained Visual Classification. In IEEE International Workshop on Machine Learning for Signal Processing (MLSP).
Zhang, J.; Lin, Z.; Brandt, J.; Shen, X.; and Sclaroff, S. 2016. Top-down Neural Attention by Excitation Backprop. In European Conference on Computer Vision, 543–559.
Zhou, B.; Khosla, A.; Lapedriza, A.; Oliva, A.; and Torralba, A. 2016. Learning Deep Features for Discriminative Localization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2921–2929.
A Novelty Matrix: Nearest Methods
Table 6 places BGER against its nearest neighbors on the axes that matter for this paper: which spatial object receives supervision, which path carries classification, which object is evaluated, whether an attribution-family quantity enters the loss, whether the spatial supervision is class-conditioned, whether supervised and evaluated objects are computationally distinct, and whether an explicit intervention tests the audit. To our knowledge, BGER differs from the closest methods by jointly combining a class-agnostic supervised route, a separately computed pre-gate predicted-class CAM, and an explicit intervention testing whether the audited gain survives removal of the gate-gradient path; no single axis is unique on its own. The direct-CAM proxies are our own objective-matched controls, showing that the same objective on a CAM-family map removes the separation while reaching higher raw localization.
B Training Recipes
For CUB, Pet, and Dogs we use ImageNet-initialized ResNet-50, inputs, 15 epochs, batch 64, and SGD (momentum 0.9, weight decay , Nesterov) with cosine decay from learning rate 0.01. BCE-BGER and the soft-Dice variant use on CUB and Dogs. The original Energy-BGER variant uses selected on seed-0 validation; Pet and the annotation/topology diagnostics retain this Energy recipe. The chest-X-ray BCE-BGER and CAM-BCE experiments use DenseNet-121, inputs, AdamW, weighted classification BCE, and . Energy-BGER medical analyses are labeled where retained. Test labels never enter hyperparameter selection.
Objective variants. Dice-BGER replaces the route term of Eq. 3 by at the same . Energy-BGER is weighted separately rather than through : with the inside-energy term it minimizes , where is the mean gate activation over the batch and the spatial grid, as implemented. All experiments run on a single NVIDIA A100 (40 GB) under Linux with PyTorch 2.4.1, torchvision 0.19.1 (CUDA 11.8), and Python 3.11; a ResNet-50 run trains in about two minutes and the DenseNet-121 medical runs are longer, so the full experimental suite (all datasets, backbones, three seeds, ablations, sweeps, and evaluation/bootstrap) is on the order of 20–40 GPU-hours. The reproducibility scripts that rebuild the reported numbers from the released per-seed CSVs need no GPU and run on CPU with only NumPy and pandas (pinned in the code supplement's requirements.txt); CPU model is therefore not load-bearing for reconstruction.
Transformer and ConvNeXt gate interface. The generic formulation (Eq. 1) identifies the gated tensor H and the pre-gate Grad-CAM readout with the same feature map, which holds exactly for the GAP-linear ResNet-50, DenseNet-121, and ConvNeXt-T backbones. For Swin-T the two are separated by the final-stage LayerNorm: Grad-CAM is hooked at the last Swin stage's pre-norm feature tensor (reshaped to ), whereas the routing gate consumes its post-norm representation. The audited tensor is thus still upstream of the gate, but is not literally the tensor the gate reads; this interface gap is one reason the exact GAP-linear detach decomposition is asserted only for the GAP-linear case, with Swin-T treated empirically.
C Proper Scoring Rules (NLL and Brier)
Table 7 reports binning-free NLL and Brier scores. The BCE-BGER and CAM-BCE rows use the same checkpoints as the main tables; Energy-BGER and CAM-Align rows use the Energy recipe.
D Calibration-Oriented CE Controls
CE variants. Calibration-oriented CE variants and an evidence-preserving augmentation control leave the audited map essentially at CE level on the full test set (three seeds): focal loss (Lin et al. 2017) reaches MaxBox-AccV2 .606±.004 (Acc .743, ECE .112), label smoothing .583±.006 (.742/.212), and EPT/BMFD .587±.003 (.767/.047). None approaches the route or direct-proxy families, so they are reported here rather than in the main comparison.
Per-seed separation of the BCE-BGER comparison. The main-table ordering is seed-level complete (Tab. 8): every BCE-BGER seed exceeds every Dice-BGER seed, which exceeds every Energy-BGER and CAM-Align seed; every CAM-BCE seed exceeds every BCE-BGER seed on MaxBoxAccV2 while every BCE-BGER seed exceeds every CAM-BCE seed on accuracy.
E BCE-BGER Mechanism Controls
All controls use the BCE-BGER recipe (ImageNet-initialized ResNet-50, 15 epochs, selected on seed-0 validation), three seeds, the full test set, and the exact evaluator of the main table (predicted-class Grad-CAM at the pre-gate features, 21 thresholds, IoU 0.3/0.5/0.7). Frozen backbone: the backbone is initialized from the matched CE checkpoint of the same seed and frozen; only the gate and the linear head are trained with the BCE route loss. Shuffled boxes: each image's box is replaced by another image's box via a within-batch permutation (roll by one), so box statistics are preserved but extents are wrong. Residual route: with , trained with the same balanced-BCE route loss and , so an ungated path always reaches the classifier. Checkpoints are selected by validation accuracy; test labels never enter selection.
F Complete Chest-X-ray Metrics
Table 10 gives the full metric set for the main-text lesion-grounding comparison (Tab. 3), including Pointing Game and AdaECE, which the main table omits for space. All rows are three seeds, DenseNet-121, positive-finding Grad-CAM on positive boxed studies. The Energy-route results for these datasets are separate and appear in Tab. 18 and Tab. 19.
| 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 |
| Guided attn. | attn. map | attn. wt. | attention | yes | yes | no | no |
| RRR | input grad. | GAP | input-grad | yes | yes | no | no |
| Expl.-aware (RRSR) | explanation feedback | GAP | saliency/expl. | yes | yes | no | no |
| BLA | learned expl. mask | masked feat. | that mask | no | no | no | no |
| Grad-CAM CSA | Grad-CAM → attn. | attn. feat. | Grad-CAM | yes | yes | no | no |
| Expl.-superv. (EAL) | expl./saliency map | GAP | that expl. map | yes | yes | no | no |
| Direct proxy (ours) | CAM proxy Q | GAP | pred. CAM | yes | yes | no | no |
| BGER (ours) | gate M | M⊙H | pre-gate CAM | no | no | yes | yes |
Table 6: Nearest methods by supervised object, classification path, and evaluated object (citations in Related Work): CAM/Grad-CAM (Zhou et al. 2016; Selvaraju et al. 2017), WSOL (Choe et al. 2020), CAM-loss (Wang et al. 2021), CGC (Pillai et al. 2022), SAOL (Kim, Baek, and Kim 2020), ABN (Fukui et al. 2019), guided attention (Li et al. 2018), RRR (Ross, Hughes, and Doshi-Velez 2017), explanation-aware training (Schramowski et al. 2020), bounded logit attention (Baumhauer, Slijepčević, and Zeppelzauer 2021), Grad-CAM-guided channel-spatial attention (Xu et al. 2021), and explanation-supervised biomedical training (Faruqui and Dubey 2026). “Attr. in loss”: an attribution-family map (CAM, saliency, or input-gradient) appears in the objective; “Class cond.”: the supervised spatial object is class-conditioned; “Audit sep.”: the evaluated map is a distinct computational object from the supervised one; “Detach audit”: an explicit intervention tests that the evaluated gain survives removing the supervised object’s gradient path. Among the compared methods, BGER uniquely combines a class-agnostic supervised route, a separately computed pre-gate predicted-class CAM, and an explicit detach intervention testing audit validity.
G RSNA Qualitative Selection Rule
The chest-X-ray example in Fig. 1 is chosen by a rule fixed before inspecting any map. Over all 1,422 positive boxed RSNA test studies we score every case with the seed-0 CE and BCE-BGER models and mark a case eligible if (i) both models classify it correctly (), (ii) it has a single radiologist box, and (iii) its box area ratio lies in [.02, .25], the typical lesion range (this excludes degenerate near-empty and near-global boxes). 491 of 1,422 cases are eligible. We rank the eligible cases by and export the median case (rank 245 of 491) rather than the largest improvement, so the figure shows a typical rather than a best-case transfer: the exported study has , , and EIB .235 .397. For reference, the largest- eligible case reaches .181 .640. The released manifest records every case's eligibility, per-case metrics, and rank, so both the rule and the ranking are auditable.
H Accuracy–Localization Frontier Protocol
Both families sweep the route/proxy weight under the same validation-only protocol: seed-0 validation accuracy must stay within 1 percentage point of the matched CE path, the selected weight maximizes each family's own supervised validation objective (never the audited Grad-CAM), and the full test set is evaluated once per sweep point. Basis of the Pareto statement: sweep points are seed-0; each family's validation-selected operating point ( for both) is additionally trained with three seeds and matches its seed-0 sweep value (gate .717 vs. .715±.005; proxy .771 vs. .769±.008). The gate's selection grid was ; were added afterwards to trace the frontier ends and were never selection candidates.
I Paired Bootstrap Procedure and Pairwise Intervals
For each method pair we resample the 5,794 shared test-image IDs with replacement (10,000 resamples). MaxBox-AccV2 is a max-over-thresholds dataset statistic, so each resample recomputes it from scratch: per method and seed, at each IoU , the maximum over the 21 thresholds of the resampled hit fraction is taken, averaged over and the three seeds, and the paired difference is formed within the resample. Accuracy differences resample per-image correctness. Intervals are percentile CIs (Tab. 12); they capture image-sampling uncertainty, not training-seed variance, which Tab. 8 addresses.
J Additional Energy-BGER Diagnostics
These experiments examine objective-specific behavior of Energy-BGER—component and topology ablations, the route-loss dose response, architecture diagnostics, temperature scaling, natural-image extensions, and medical results—and are reported separately from the BCE-BGER results in the main paper.
Equal-annotation ladder (Energy recipe). This ladder was run under the Energy recipe and its evaluator, whose CE reference reads .588 rather than the .584 of Tab. 1 (these runs predate the current evaluator build: same images and threshold grid, different map-normalization build; the
| Dataset | Method | NLL ↓ | Brier ↓ |
|---|---|---|---|
| CUB | CE | .922±.009 | .352±.005 |
| CAM-Align | 0.936 | 0.354 | |
| Energy-BGER | .920±.011 | .350±.003 | |
| BCE-BGER | .920±.008 | .353±.002 | |
| CAM-BCE | .942±.007 | .362±.004 | |
| Pet | CE | .243±.006 | .109±.000 |
| CAM-Align | .250±.010 | .113±.003 | |
| Energy-BGER | .241±.011 | .108±.003 | |
| Dogs | CE | .432±.001 | .184±.005 |
| CAM-Align | .446±.010 | .190±.002 | |
| Energy-BGER | .447±.005 | .190±.002 | |
| BCE-BGER | .435±.006 | .186±.004 | |
| Dice-BGER | .435±.003 | .185±.003 | |
| VinDr-CXR | CE | .738±.132 | .163±.003 |
| CAM-Align | .480±.020 | .134±.008 | |
| Energy-BGER | .551±.106 | .137±.015 | |
| BCE-BGER | .649±.095 | .144±.018 | |
| CAM-BCE | .579±.080 | .137±.008 | |
| RSNA | CE | .176±.026 | .041±.001 |
| CAM-Align | .163±.013 | .044±.006 | |
| Energy-BGER | .147±.014 | .040±.004 | |
| BCE-BGER | .135±.008 | .036±.002 | |
| CAM-BCE | .148±.014 | .038±.001 |
Table 7: NLL and Brier scores (lower is better; three seeds unless noted). BCE-BGER matches CE-level proper scoring on CUB and Dogs and leads on RSNA; CAM-BCE pays a small CUB cost consistent with its accuracy trade-off. CUB CAM-Align is seed-0 only.
| Method | MaxBoxAccV2 (seeds 0/1/2) | ||
|---|---|---|---|
| CE | .585 | .585 | .584 |
| CAM-Align | .653 | .654 | .646 |
| Energy-BGER | .656 | .655 | .657 |
| Dice-BGER | .686 | .689 | .696 |
| BCE-BGER | .717 | .709 | .718 |
| CAM-BCE | .771 | .775 | .760 |
Table 8: Per-seed full-test MaxBoxAccV2 for the CUB comparison. Ordering is complete across seeds: min BCE-BGER (.709) > max Dice-BGER (.696) > max Energy-BGER (.657); min CAM-BCE (.760) > max BCE-BGER (.718). On accuracy the direction reverses: min BCE-BGER (.747) > max CAM-BCE (.740). Seed variation on the secondary metrics is likewise small: standard deviations over the same runs are EIB .001/.001/.001/.004/.002/.011 and PG .002/.000/.001/.002/.001/.000 in row order, so the EIB and PG means of Tab. 1 are stable to the precision reported there.
two agree to .004 and no conclusion depends on the difference). Every supervised row receives the identical GT box. Feature routing produces the largest shift among the tested equal-annotation non-proxy controls; input-space delivery and an ABN-style attention branch move the audited map only slightly.
| Variant | Acc | ECE15 | EIB | PG | MaxBoxV2 | Gain ret. |
|---|---|---|---|---|---|---|
| CE | .749 | .017 | .788 | .966 | .584±.001 | 0% |
| Frozen backbone | .731 | .026 | .794 | .976 | .597±.000 | 10% |
| Shuffled boxes | .734 | .018 | .829 | .992 | .619±.003 | 27% |
| Residual-BCE | .755 | .019 | .814 | .987 | .714±.003 | 99% |
| BCE-BGER | .748 | .016 | .840 | .995 | .715±.005 | 100% |
Table 9: BCE-BGER mechanism controls (CUB full test, three seeds, mean values; MaxBoxAccV2 with seed std). “Gain ret.” = fraction of the CE→BCE-BGER MaxBox-AccV2 gain retained; descriptive, and the interventions do not compose additively. HCU (confidence ≥ .9, EIB < .5): CE 1.24±.02%, frozen 0.67±.17%, shuffled 0.50±.11%, BCE-BGER 0.06±.01%. Routing increment vs. no-routing: +.032 (per-seed .034/.025/.036; 95% t-interval [.018,.046]; no accuracy cost). Exclusivity is not load-bearing: residual .714±.003 vs. exclusive .715±.005 (Δ=+.0005, [-.008,.009]); the weaker Energy objective shows a small exclusive gain (+.021). Source: routing_increment_seed_analysis.csv.
| Data | Method | AdaECE ↓ | PG ↑ | MaxBoxV2 ↑ |
|---|---|---|---|---|
| VinDr | CE | .136±.014 | .226±.015 | .142±.015 |
| CAM-Align | .083±.011 | .550±.005 | .255±.044 | |
| BCE-BGER | .125±.020 | .404±.032 | .209±.011 | |
| CAM-BCE | .102±.031 | .563±.014 | .361±.002 | |
| RSNA | CE | .027±.007 | .411±.157 | .200±.066 |
| CAM-Align | .025±.006 | .777±.013 | .361±.018 | |
| BCE-BGER | .013±.010 | .713±.017 | .427±.029 | |
| CAM-BCE | .013±.005 | .782±.019 | .420±.015 |
Table 10: Complete chest-X-ray metrics for the main-text comparison (three seeds, mean±std). Italics denote direct CAM-proxy supervision. Accuracy, ECE15, and EIB appear in main Tab. 3.
Full-test bootstrap uncertainty (Energy route). For the original Energy-BGER result, a seed-0 bootstrap over all 5,794 CUB test images (10,000 resamples) gives CE 0.585 with CI [0.581, 0.593] and Energy-BGER 0.660 with [0.655, 0.666].
Temperature scaling: proper scoring and attribution invariance. Temperature scaling (TS), fit on validation NLL, changes Swin-T Energy-BGER NLL/Brier from 0.908/0.331 to 0.794/0.300 and ECE15 from .145 to .017. ConvNeXt-T CE already has ECE .142; TS reduces every method to .014-.015, while Energy-BGER retains an NLL cost over CE (0.759 vs. 0.698). Scaling logits by uniformly scales Grad-CAM gradients and cancels under map normalization; the measured maximum map difference is .
RSNA subgroup analysis. For Energy-BGER, soft-energy and thresholded-IoU changes diverge with target area and multi-box structure (Tab. 20).

Figure 4: Route-loss dose response on CUB (seed-0 sweep points; Swin are three-seed means). Gate concentration rises smoothly on ResNet-50 and sharply between and 2 on Swin-T; dashed lines mark each architecture's CE Grad-CAM baseline.
| Family | λ | Val Acc | Sel. | Test Acc | Test V2 |
|---|---|---|---|---|---|
| Gate (BCE) | 0.25 | — | ends | .756 | .654 |
| 0.5 | .722 | .741 | .670 | ||
| 1 | .737 | .753 | .699 | ||
| 2 | .727 | ✓ | .747 | .717 | |
| 4 | — | ends | .742 | .716 | |
| Proxy (Dice) | .125 | .745 | .744 | .594 | |
| .25 | .732 | .745 | .604 | ||
| .5 | .740 | .744 | .620 | ||
| 1 | .738 | .745 | .644 | ||
| 2 | .745 | ✓ | .748 | .690 | |
| Proxy (BCE) | .0156 | .737 | .748 | .599 | |
| .0312 | .738 | .749 | .610 | ||
| .0625 | .732 | .743 | .634 | ||
| .125 | .728 | infeas. | .742 | .650 | |
| .25 | .742 | .749 | .671 | ||
| .5 | .737 | .748 | .710 | ||
| 1 | .742 | .745 | .740 | ||
| 2 | .738 | ✓ | .739 | .771 |
Table 11: Frontier sweep protocol (CUB, seed 0 per point; test used once per point). “Sel.” marks each family’s validation-selected weight, confirmed with three seeds in the main table; “ends” marks post-hoc frontier endpoints outside the selection grid; “infeas.” failed the validation-accuracy constraint.
K COCO-SO Stress Test
COCO-SO is a seed-0, single-target subset derived from COCO 2017 for testing cluttered scenes. This pilot uses the Energy route.
In 352/524 samples, Energy-BGER increases EIM but decreases best box IoU. The class-agnostic route can concentrate soft energy on the target without producing an instance-complete thresholded box.
| Metric | Comparison | Δ | 95% CI ≠ 0 | |
|---|---|---|---|---|
| MaxBoxV2 | vs. CE | +.130 | [.126, .134] | yes |
| vs. Dice | +.024 | [.022, .027] | yes | |
| vs. Energy | +.057 | [.053, .059] | yes | |
| vs. CAM-Align | +.064 | [.060, .067] | yes | |
| vs. CAM-BCE | -.054 | [-.058, -.051] | yes | |
| Dice vs. Energy | +.032 | [.029, .035] | yes | |
| Accuracy | vs. CE | -.001 | [-.007, .005] | no |
| vs. Dice | -.002 | [-.006, .003] | no | |
| vs. Energy | -.002 | [-.007, .004] | no | |
| vs. CAM-Align | +.000 | [-.005, .006] | no | |
| vs. CAM-BCE | +.011 | [.005, .016] | yes | |
| Dice vs. Energy | -.000 | [-.006, .005] | no | |
Table 12: Paired image-level bootstrap for the CUB comparison (full test, 10,000 resamples, three-seed means within each resample). Unlabeled rows are BCE-BGER – (method).
L Exploratory Energy-Route Medical Probes
Three exploratory Energy-BGER probes cover brain CT (Hssayeni et al. 2020), mammography (Nguyen et al. 2023), and lumbar MRI (Radiological Society of North America 2024) (Tab. 22). Soft in-target energy rises on all three; thresholded localization does not improve on Lumbar.
M Direct CAM-Supervision Objectives
CAM-Align uses the same backbone, recipe, and evidence target as Energy-BGER and differs in the supervised object. From the final feature map and true-class head weights , its proxy is . The alignment loss applies the inside-region energy objective to :
with , selected by the same validation sweep used for Energy-BGER's .
The two objective-matched proxies use the same bounded map , which is the direct-supervision
| Method | Box use | Route type | Acc | ECE | EIB | MaxBoxV2 |
|---|---|---|---|---|---|---|
| CE | none | — | .749±.005 | .016±.004 | .790±.001 | .588±.002 |
| Bg-blackout | input mask | input-space | .723±.004 | .021±.004 | .788±.007 | .595±.008 |
| Bg-random | input noise | input-space | .680±.004 | .039±.005 | .789±.002 | .593±.009 |
| Object-crop | input crop | input-space | .618±.013 | .017±.006 | .816±.003 | .592±.003 |
| ABN-box | feature | attention branch | .738±.004 | .024±.004 | .807±.001 | .606±.006 |
| w/o box loss | none | exclusive route | .748±.003 | .018±.002 | .800±.000 | .585±.001 |
| Energy-BGER | feature | exclusive route | .750±.001 | .015±.002 | .861±.001 | .668±.001 |
Table 13: Equal-annotation controls under the original Energy recipe (CUB, three seeds; this protocol's evaluator reads CE at .588 vs. .584 in Tab. 1, see text). Feature routing produces the largest shift among the tested equal-annotation non-proxy controls.
| 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 |
| 0.749 | 0.018 | 0.863 | 0.667 | 0.801 | |
| (selected) | 0.748 | 0.015 | 0.862 | 0.667 | 0.796 |
| 0.751 | 0.017 | 0.859 | 0.669 | 0.790 |
Table 14: Component and topology controls for the original Energy objective on CUB. These results diagnose routing design and should not be read as BCE-BGER ablations.
| Method | Acc ↑ | ECE15 ↓ | EIB ↑ | MaxBoxAccV2 ↑ |
| Swin-T transformer | ||||
|---|---|---|---|---|
| CE | .786±.005 | .015±.004 | .360±.003 | .280±.002 |
| CAM-Align | .791±.002 | .013±.002 | .413±.003 | .343±.010 |
| Energy-BGER () | .783±.002 | .014±.003 | .372±.005 | .278±.003 |
| Energy-BGER () | .789±.005 | .145±.006 | .567±.008 | .585±.021 |
| + temperature scaling | .789±.005 | .018±.004 | .567±.008 | .585±.021 |
| ConvNeXt-T CNN | ||||
| CE | .812±.002 | .142±.018 | .524±.020 | .291±.010 |
| CAM-Align | .809±.005 | .132±.009 | .706±.003 | .370±.005 |
| Energy-BGER () | .810±.004 | .141±.017 | .437±.025 | .298±.020 |
| Energy-BGER () | .798±.015 | .161±.022 | .516±.018 | .333±.005 |
Table 15: Architecture diagnostics on CUB (three seeds, Energy route). Stronger Energy routing raises the standard audited map on Swin-T, but audit validity is not established for these Energy-route checkpoints (the BCE-BGER detach audit in Tab. 23 shows Swin standard-map gains can be gate-gradient imprinting); ConvNeXt-T shows a smaller gain with an accuracy cost. Operating points are selected on validation data (Fig. 4, Tab. 16).
analogue of the gate : both are sigmoid maps in , so the identical route loss can be applied to either. CAM-BCE applies the per-image balanced BCE of Eq. 2 to instead of . CAM-Dice applies the soft-Dice objective of Dice-BGER to instead of , i.e. . Both use the same evidence target , backbone, recipe, seeds, and evaluator as the routes, and both take , selected on seed-0 validation by the same firewalled rule as the gates (maximize the method's own supervised validation object subject to validation accuracy within 1 point of the matched CE path; the audited Grad-CAM never enters selection). Their weight sweeps and selected points are in Tab. 11. The proxy and route arms therefore match the evidence target, objective family, backbone, training recipe, seeds, selection rule, and evaluator. They differ in the supervised object—an attribution-family proxy close to the audited map versus an internal gate—and, by construction, in whether that object lies on the classification path (GAP() for the proxies, GAP() for the routes). The auxiliary no-routing con-
| 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 |
Table 16: ConvNeXt-T route-loss sweep on CUB (seed 0). is CE; is selected from validation gate concentration and accuracy.

Figure 5: Cross-dataset localization (three-seed means): each row is one dataset–metric, and the four methods are points on a common [0.3, 1] axis (no per-axis rescaling), so within-row method comparison is valid and no cross-metric magnitude is implied. Complete estimates are in Tabs. 1 and 17.
trol (App. E) isolates the routing contribution separately.
N Gate-Gradient Effects on Grad-CAM
The frozen-backbone control bounds the non-representational part of the transfer empirically; here we characterize it analytically for the ResNet instantiation, where the audited layer directly feeds the gate. With a GAP-linear head on , , (the gate with weight and bias ), the score for class is . Differentiating through both paths (the routed features and the gate itself; the bias terms drop out),
so the Grad-CAM channel weights (spatial GAP of the gradient) decompose exactly as
with and . The direct mechanical effect is confined to a positive rescaling along , which vanishes under map normalization, and the image-independent direction . On the full CUB test set, the projection residual onto span is , and audited Grad-CAM correlates with the pre-gate head-weight CAM. Together with the frozen-backbone control, this identifies changes in as the dominant source of route-to-CAM transfer.
Empirical detach test across architectures. We test the decomposition's consequence directly on every backbone: recompute the audited predicted-class Grad-CAM with the gate gradient detached (forward gate values preserved) and compare to the standard map (Tab. 23). This is the complete per-backbone evidence behind the main-paper architecture table. On ResNet-50 the detached map is essentially identical to the standard map (mean per-image correlation .9999, MaxBoxAccV2 .715 → .712). On Swin-T it collapses to .256—below CE—with anti-correlated maps (-.16): the standard routed map fails the detach-based gate-imprinting check, so it is not evidence of representation transfer. On ConvNeXt-T the check itself passes (.253 → .255, ) while routing lowers localization below CE: a genuine method failure under this backbone, distinct from Swin-T's audit failure.
DenseNet-121 medical detach audit. The chest-X-ray models use DenseNet-121 with a GAP-linear positive-abnormality head. We run the detach test on the reported BCE-BGER checkpoints (positive boxed test images, three seeds; Tab. 24). Both datasets remain substantially stable under detachment: standard-versus-detached map correlations are .957 (RSNA) and .940 (VinDr), while 94% and 78% of the respective localization gains are retained, and the detached MaxBoxAccV2 stays well above CE—no collapse, unlike Swin-T, which licenses treating the DenseNet-121 medical maps as valid audits.
Beyond ResNet (Energy-route frozen-backbone). As a separate diagnostic on the earlier Energy-route models, Swin-T and ConvNeXt-T frozen-backbone controls recover at most a fifth of the Energy-route standard-map gain: Swin-T reaches (21% of the Energy-route gap), and ConvNeXt-T reaches , below CE (0.291).
O Region-Restricted Corruption and HCU Protocol
The double dissociation in Fig. 3 uses the BCE-BGER checkpoints (seeds 0–2) and CE on the fixed 1000-image CUB
| Dataset | Method | Evidence target | Acc | ECE | EIB/EIM | PG | MaxBoxAccV2 |
|---|---|---|---|---|---|---|---|
| Oxford-IIIT Pet | CE | foreground mask | .930±.000 | .022±.005 | .677±.002 | .891±.004 | .739±.002 |
| Oxford-IIIT Pet | CAM-Align | foreground mask | .927±.003 | .019±.002 | .761±.003 | .910±.002 | .653±.005 |
| Oxford-IIIT Pet | Energy-BGER | foreground mask | .931±.000 | .016±.003 | .704±.006 | .904±.006 | .684±.006 |
| Oxford-IIIT Pet | Energy gate M | diagnostic gate | - | - | .340±.001 | .945±.003 | .526±.002 |
| Stanford Dogs | CE | dog box | .880±.005 | .045±.003 | .890±.000 | .984±.000 | .757±.004 |
| Stanford Dogs | CAM-Align | dog box | .875±.002 | .041±.003 | .929±.001 | .987±.000 | .773±.006 |
| Stanford Dogs | Energy-BGER | dog box | .877±.003 | .042±.001 | .921±.001 | .986±.000 | .801±.002 |
| Stanford Dogs | Energy gate M | diagnostic gate | - | - | .896±.002 | .987±.001 | .835±.001 |
Table 17: Natural-image extensions with Energy-BGER (three seeds). BCE-BGER Dogs results are reported in the main paper.
input + target box
CUB-200-2011

CE Grad-CAM
BGER Grad-CAM
Stanford Dogs
Oxford-IIIT Pet
Figure 6: Representative route-to-CAM examples for Energy-BGER on CUB, Stanford Dogs, and Oxford-IIIT Pet. Columns show the input with the target box, the CE predicted-class Grad-CAM, and the Energy-BGER predicted-class Grad-CAM (seed 0); the white contour marks the map's 0.5 level. Each row is the largest CE→BGER EIB-gain case found in a fixed-stride scan of the test split, so Energy-BGER concentrates the audited map inside the target relative to CE.
evaluation subset. Each image is corrupted either only inside the ground-truth box (object) or only outside it (background), by compositing a corrupted copy with the original through the box mask in denormalized pixel space. Two corruption types are used: additive Gaussian noise with and Gaussian blur with kernel/std pixels at resolution, giving severities 1–3; each condition uses a fixed random generator so all methods see identical corruptions, and accuracy is averaged over the two corruption types per seed. Severity-3 means: background-corrupt CE .711±.024 vs. BCE-BGER .720±.027; object-corrupt CE .048±.006 vs. BCE-BGER .021±.006 (per-condition values released with the audit records). The same protocol run under the original
| Method | AUROC ↑ | AUPRC ↑ | Acc ↑ | ECE15 ↓ |
|---|---|---|---|---|
| CE | .851±.021 | .768±.027 | .808±.008 | .138±.012 |
| CAM-Align | .878±.027 | .805±.028 | .828±.007 | .085±.013 |
| Energy-BGER | .867±.025 | .805±.025 | .835±.011 | .104±.022 |
| Map | EIB/EIM ↑ | PG ↑ | MaxBoxV2 ↑ |
|---|---|---|---|
| CE | .147±.012 | .226±.015 | .142±.015 |
| CAM-Align | .390±.006 | .550±.005 | .255±.044 |
| Energy-BGER | .272±.030 | .416±.054 | .212±.018 |
| Energy gate M | .350±.023 | .494±.024 | .217±.009 |
Table 18: VinDr-CXR results with Energy-BGER. BCE-BGER and CAM-BCE results are reported in the main paper.
| Method | AUROC ↑ | AUPRC ↑ | Acc ↑ | ECE15 ↓ |
|---|---|---|---|---|
| CE | .985±.002 | .983±.003 | .947±.003 | .027±.007 |
| CAM-Align | .986±.001 | .983±.001 | .946±.003 | .024±.011 |
| Energy-BGER | .986±.002 | .984±.002 | .953±.003 | .021±.016 |
| Map | EIB/EIM ↑ | PG ↑ | MaxBoxV2 ↑ |
|---|---|---|---|
| CE | .189±.036 | .411±.157 | .200±.066 |
| CAM-Align | .565±.017 | .777±.013 | .361±.018 |
| Energy-BGER | .520±.014 | .745±.037 | .305±.026 |
| Energy gate M | .642±.034 | .768±.035 | .264±.025 |
Table 19: RSNA results with Energy-BGER (three seeds, validation-selected ). BCE-BGER and CAM-BCE results are reported in the main paper.
| Subgroup | n | ΔEIB | ΔPG | ΔBestIoU |
|---|---|---|---|---|
| all positive boxed | 1422 | +.300 | +.462 | +.072 |
| single-box | 643 | +.226 | +.311 | +.096 |
| multi-box (≥2) | 779 | +.361 | +.587 | +.053 |
| small box (tercile 1) | 474 | +.172 | +.251 | +.082 |
| medium box (tercile 2) | 474 | +.308 | +.489 | +.116 |
| large box (tercile 3) | 474 | +.420 | +.646 | +.020 |
| EIB up, BestIoU down | 449 | +.333 | +.359 | -.138 |
| gate loc., CAM diffuse | 91 | +.069 | +.440 | +.040 |
Table 20: RSNA subgroup analysis (positive, boxed cases; per-sample Grad-CAM, seed 0). Spatial improvement (CE→BGER) varies with box count and size; on a minority of cases soft evidence (EIB) improves while thresholded box overlap (BestIoU) does not. Box-area terciles at 0.052/0.124 of image area. Controlled extension, not clinical validation.
Energy objective (CE, CAM-Align, Energy-BGER) shows the same dissociation direction and is retained below.
Full-test HCU. We compute HCU on all 5,794 CUB test images as the fraction of predictions with confidence whose Grad-CAM EIB is . Values: CE , BCE-BGER (frozen , shuffled ; Tab. 9).
P CAM Concentration vs. Shortcut Robustness
This controlled counterexample supports the limitation that improved CAM concentration does not guarantee background-shortcut robustness. We build a split-disjoint spurious-context version of Oxford-IIIT Pet in which foreground species is spuriously correlated with background at training time, with foreground and background pools drawn from disjoint image sets so the background texture cannot leak object identity (leakage controls in the released records). Under the balanced-BCE gate (Gate-BCE) and its objective-matched CAM proxy (CAM-BCE), the audited maps concentrate strongly (Gate-BCE audit EIB .348, MaxBoxAccV2 .235; CAM-BCE .615/.503). Yet on a foreground-only bal-
| Method | Acc | ECE | EIM | PG | MaxBoxAccV2 |
|---|---|---|---|---|---|
| CE | 0.983 | 0.012 | 0.483 | 0.727 | 0.658 |
| Energy-BGER | 0.971 | 0.037 | 0.579 | 0.740 | 0.627 |
| Energy-BGER M | - | - | 0.544 | 0.746 | 0.620 |
Table 21: COCO-SO seed-0 appendix stress test (Energy route). Energy-BGER improves soft target-mask energy and PG, but not MaxBoxAccV2, accuracy, or calibration.
anced test the same models are at chance (.500-.52 accuracy), and a counterfactual background swap flips roughly three quarters of predictions (Gate-BCE flip rate .74, CAM-BCE .74). Concentrated post-hoc maps therefore coexist with strong background dependence: CAM concentration is not evidence of shortcut robustness. Localization, counterfactual, foreground-only, leakage-control, and paired-bootstrap records are released under spurious_pet_disjoint/.
Standard ImageNet-C corruption suite. To confirm the dissociation is not specific to our noise/blur choices, we repeat the original Energy protocol with ten standard ImageNet-C corruption types (Hendrycks and Dietterich 2019) at their original severity constants (severities 1/3/5): Gaussian noise, shot noise, impulse noise, defocus blur, motion blur, fog, brightness, contrast, pixelate, and JPEG compression. These are asset-free re-implementations of the reference code; frost and snow (external image assets) and glass/zoom blur and elastic transform (per-pixel loops, computationally prohibitive at this scale) are excluded. Fig. 7 shows the same double-dissociation direction: under background corruption Energy-BGER degrades least (severity-5 accuracy 0.733 vs. CAM-Align 0.730 vs. CE 0.720), and
| Dataset | Method | AUROC ↑ | ECE15 ↓ | EIM ↑ | PG ↑ | MaxBoxV2 ↑ |
|---|---|---|---|---|---|---|
| ICH (brain CT) | CE | .834 | .072 | .018 | .030 | .034 |
| CAM-Align | .836 | .061 | .018 | .033 | .044 | |
| Energy-BGER | .845 | .074 | .022 | .052 | .060 | |
| VinDr-Mammo | CE | .792 | .140 | .024 | .021 | .008 |
| CAM-Align | .779 | .107 | .090 | .160 | .053 | |
| Energy-BGER | .772 | .109 | .059 | .076 | .029 | |
| Lumbar (SCS) | CE | .874 | .084 | .057 | .308 | .163 |
| CAM-Align | .874 | .044 | .109 | .152 | .048 | |
| Energy-BGER | .883 | .059 | .108 | .140 | .046 |
Table 22: Exploratory Energy-BGER medical extensions (three-seed means; DenseNet-121; boxed abnormality versus no finding). Spatial metrics use positive boxed test images.
| Backbone | CE | Aux | BGER | BGER det. | corr |
|---|---|---|---|---|---|
| ResNet-50 | .584 | .683 | .715±.005 | .712±.006 | .9999 |
| Swin-T | .280 | .317 | .896±.000 | .256±.001 | -.16±.04 |
| ConvNeXt-T | .291 | .288 | .253±.002 | .255±.002 | .974±.004 |
Table 23: Complete architecture mechanism arms with detach audit (CUB, three seeds, full test, MaxBoxAccV2): CE, auxiliary BCE without routing (Aux), routed BCE-BGER, BCE-BGER with the gate gradient detached, and the mean per-image standard-vs-detached map correlation. The detach-based gate-imprinting check passes on ResNet-50 and ConvNeXt-T but fails on Swin-T, and only ResNet-50 combines a passing check with a positive gain. DenseNet-121 medical audits appear separately in Tab. 24; source files and reproduction commands are listed in the submitted artifact manifest.
| Data | std V2 | det V2 | corr | retained |
|---|---|---|---|---|
| RSNA | .427 | .413 | .957 | 94% |
| VinDr | .208 | .194 | .940 | 78% |
Table 24: DenseNet-121 detach audit on the medical BCE-BGER checkpoints (positive boxed test images, three seeds): standard vs. detached MaxBoxAccV2, mean per-image map correlation, and the fraction of the CE→BCE-BGER gain retained after detachment. Both models remain substantially stable under detachment; VinDr's lower retention reflects its small absolute gain (.208–.142), while the map correlation (.94) shows the map itself is preserved. The “std V2” column is recomputed by this audit and agrees with Tab. 3 to within rounding (VinDr .2082 vs. .2089; RSNA .4268 vs. .4269). Source files and reproduction commands are listed in the submitted artifact manifest.
under object corruption it degrades most (0.098 vs. 0.116 vs. 0.127).
HCU threshold sensitivity (Energy-BGER). Tab. 25 is the original Energy-route threshold sweep on the fixed N = 1,000 records; the CE-vs-routed ordering persists across all tested confidence and EIB thresholds, which also supports the full-test statistic above.
| τ | θ | CE | CAM-Align | Energy-BGER |
|---|---|---|---|---|
| .7 | .3 | .07±.05 | .00±.00 | .00±.00 |
| .7 | .5 | 2.20±.36 | .07±.05 | .13±.05 |
| .7 | .7 | 15.40±.08 | 4.07±.17 | 4.37±.17 |
| .8 | .3 | .07±.05 | .00±.00 | .00±.00 |
| .8 | .5 | 1.50±.24 | .07±.05 | .10±.00 |
| .8 | .7 | 12.60±.51 | 3.20±.36 | 3.53±.12 |
| .9 | .3 | .03±.05 | .00±.00 | .00±.00 |
| .9 | .5 | 1.10±.08 | .07±.05 | .07±.05 |
| .9 | .7 | 8.67±.21 | 2.00±.08 | 2.37±.19 |
| .95 | .3 | .03±.05 | .00±.00 | .00±.00 |
| .95 | .5 | .77±.05 | .03±.05 | .00±.00 |
| .95 | .7 | 6.10±.29 | 1.10±.08 | 1.53±.19 |
Table 25: Threshold sensitivity of the original Energy-BGER HCU diagnostic on CUB (N = 1,000, three seeds).
Q Attribution-Free Region Diagnostics
Blurring the annotated region or its complement changes Energy-BGER and CAM-Align confidence in the same direction as the spatial audit (Tab. 26). These confidence diagnostics do not establish causal reliance or distributional robustness.
R Gate Transfer and Design Diagnostics
Figures 8–11 collect qualitative route-to-CAM examples (Energy recipe), Energy ablation/stability panels, and the BCE-BGER operator-consistency bars corresponding to Tab. 28.
S Attribution-Operator Consistency
Table 27 reports the full-test Energy-BGER comparison; Tab. 28 uses a fixed N = 500 subset for BCE-BGER.
Attribution-operator consistency. CE, BCE-BGER, and CAM-BCE are evaluated with Grad-CAM, Grad-CAM++, HiResCAM, and the gradient-free Score-CAM-128 approximation on identical checkpoints and images (Tab. 28). BCE-BGER improves over CE on every operator (MaxBoxAccV2 .728–.736 vs. CE .590–.602; EIB .835–.852 vs. .772–.795),
CE
CAM-Align
Energy-BGER
corrupt background only

corrupt object only
Figure 7: Original Energy-objective region-restricted diagnostic under the standard ImageNet-C suite. Each point is the mean over 10 corruption types and 3 seeds; error bars are the standard deviation across seeds. Energy-BGER is relatively less sensitive to background corruption and more sensitive to object corruption.
| Method | RemoveBoxDrop ↑ | KeepBgConf ↓ | EvidenceGap ↑ | Del-AUCn ↓ |
|---|---|---|---|---|
| CE | .746±.005 | .012±.000 | .599±.001 | .082±.001 |
| CAM-Align | .759±.006 | .005±.000 | .624±.002 | .065±.001 |
| Energy-BGER | .752±.003 | .005±.000 | .615±.002 | .067±.000 |
Table 26: Attribution-free region-restricted confidence diagnostics for the original Energy objective on CUB (three seeds). Deletion-AUC is attribution-guided and listed only as a secondary measure.
| Operator | Method | EIB ↑ | MaxBoxV2 ↑ |
|---|---|---|---|
| Grad-CAM (main) | CE | .788±.001 | .584±.001 |
| CAM-Align | .866±.001 | .651±.005 | |
| Energy-BGER | .859±.001 | .658±.001 | |
| HiResCAM | CE | .788±.001 | .584±.001 |
| CAM-Align | .866±.001 | .651±.004 | |
| Energy-BGER | .863±.001 | .656±.001 | |
| Grad-CAM++ | CE | .787±.001 | .592±.001 |
| CAM-Align | .866±.001 | .658±.005 | |
| Energy-BGER | .849±.001 | .660±.001 |
Table 27: Full-test operator check for Energy-BGER (CUB, , predicted-class maps, ResNet-50, three seeds).
and CAM-BCE sits above both on MaxBoxAccV2 (.778-.804) consistent with the main-text frontier. The operators share the same box-supervised representation, so this establishes consistency of the CE→route gain across readout rules rather than attribution-method independence.
The class-balanced subset is fixed across operators and seeds, with image IDs recorded in the manifest. Maps are predicted-class conditioned at the pre-gate representation and evaluated at ; connected components use , 21 thresholds on [0, 1], and IoU criteria 0.3/0.5/0.7.
T Same-Annotation Baselines on Stanford Dogs
The Dogs topology controls repeat the CUB comparison using the original Energy objective and the same dog box for every supervised row (Tab. 30). Energy-BGER reaches .801, above the tested input-space and attention controls; the BCE-BGER result is separately reported as .832 in the main paper.
Table 29 is the full Stanford Dogs replication (referenced from the main-paper Results; full test , three seeds). BCE-BGER gives the highest thresholded localization among the tested routing objectives at broadly comparable accuracy.
U Annotation-Fraction Curve
Energy-BGER is trained with nested class-stratified box fractions and no per-fraction tuning. At 10% (400 images), MaxBoxAccV2 reaches .631 versus CE .588 and full-budget Energy-BGER .663.
V External CUB WSOL References
Table 32 lists dedicated WSOL systems evaluated locally under our image/box protocol; they output true-class localization maps and are references, not classifier predicted-class Grad-CAM baselines. The three systems are the Spatial-Aware Token method (SAT; Wu et al. 2023), the Category-aware Allocation TRansformer (CATR; Chen et al. 2023), and the Token Semantic Coupled Attention Map method (TS-CAM; Gao et al. 2021). Each was evaluated with its
Energy-BGER: CE Grad-CAM → Energy-BGER Grad-CAM → learned gate M (seed 0 examples)
image + box
CE Grad-CAM
Energy-BGER Grad-CAM
Energy-BGER gate M

Figure 8: Energy-BGER route-to-CAM examples (seed 0). Columns show the input and GT box, CE and Energy-BGER predicted-class Grad-CAM, and diagnostic gate M; contours span 0.3–0.9.
official public code and its official released CUB checkpoint (cloned and downloaded locally; the released audit records list the exact repository and checkpoint file per method).
W External WSOL Protocol Check
Before adding SAT, CATR, and TS-CAM to the CUB comparison, we audited whether their local scoremaps were compatible with the same CUB protocol used for BGER. All three methods pass the hard checks: exact CUB test-set match (5,794/5,794 images), zero train overlap, zero missing/extra/duplicate image identifiers, zero bbox mismatches, zero scoremap shape mismatches, zero missing/non-finite scoremaps, and the same dense 0.001 threshold sweep for MaxBoxAccV2.
We also spot-checked alignment visually, overlaying each method's locally exported true-class scoremap and the GT box on twelve random CUB test images per method; all confirmed correct image/box/scoremap registration (overlays omitted for brevity). The audit also clarifies the comparison boundary. SAT, CATR, and TS-CAM use true-class dedicated WSOL maps. Their localization maps are not the same object as BGER's post-hoc classifier Grad-CAM, and they should not be presented as direct substitutes for BGER. They are included as external localization references with explicit supervision, map type, map conditioning, and protocol-decision columns in Tab. 1.
X Readout Consistency and RSNA Subgroups
These two tables are referenced from the main-paper Results; they are placed here for space.
Grad-CAM (audited) ---- selected Energy-BGER Grad-CAM Gate M (diagnostic) ..... selected operating point
(a) Loss / routing ablations

(b) Box-pressure sweep

(c) Gate-size sweep
target area ratio
Figure 9: Energy-BGER ablations. Removing the box loss weakens both predicted-class Grad-CAM and gate localization.

Figure 10: Focus stability under weak augmentations.
| Method | Operator | EIB ↑ | PG ↑ | MaxBoxV2 ↑ |
|---|---|---|---|---|
| CE | Grad-CAM | .795±.001 | .957±.005 | .593±.003 |
| Grad-CAM++ | .794±.001 | .955±.002 | .602±.001 | |
| HiResCAM | .795±.001 | .957±.005 | .593±.003 | |
| Score-CAM* | .772±.001 | .975±.009 | .590±.001 | |
| BCE-BGER | Grad-CAM | .846±.002 | .991±.002 | .728±.003 |
| Grad-CAM++ | .837±.003 | .988±.002 | .736±.003 | |
| HiResCAM | .852±.002 | .991±.002 | .728±.005 | |
| Score-CAM* | .835±.002 | .995±.003 | .734±.008 | |
| CAM-BCE | Grad-CAM | .842±.012 | .994±.002 | .778±.004 |
| Grad-CAM++ | .837±.012 | .993±.002 | .804±.008 | |
| HiResCAM | .842±.012 | .994±.002 | .778±.004 | |
| Score-CAM* | .827±.012 | .995±.005 | .798±.008 |
Table 28: Operator consistency on the fixed N = 500 CUB subset (three seeds, identical images; *Score-CAM-128 approximation). BCE-BGER improves over matched CE on every operator; CAM-BCE is highest on MaxBoxAccV2, consistent with the accuracy–localization frontier.
| Method | Acc | ECE15 | EIB | PG | MaxBoxV2 |
|---|---|---|---|---|---|
| CE | .880±.005 | .045±.003 | .890 | .984 | .757±.004 |
| CAM-Align | .875±.002 | .041±.003 | .929 | .987 | .773±.006 |
| Energy-BGER | .877±.003 | .042±.001 | .921 | .986 | .801±.002 |
| Dice-BGER | .878±.003 | .044±.001 | .908 | .993 | .829±.003 |
| BCE-BGER | .878±.003 | .046±.002 | .910 | .993 | .832±.000 |
Table 29: Stanford Dogs replication (full test N=8,580, three seeds; mean±std where variance is reported). EIB and PG are three-seed means.
| Method | Box use | Acc | MaxBoxAccV2 |
|---|---|---|---|
| CE | none | .880 | .757 |
| Bg-blackout | input mask | .872 | .771 |
| Bg-random | input noise | .865 | .765 |
| Object-crop | input crop | .847 | .715 |
| ABN-box | supervised attention | .808 | .764 |
| CAM-Align | CAM proxy | .875 | .773 |
| Energy-BGER | feature route | .877 | .801 |
Table 30: Same-annotation topology controls for the original Energy objective on Stanford Dogs (three seeds).

Figure 11: BCE-BGER MaxBoxAccV2 across four CAM operators on the fixed CUB subset (three checkpoints; error bars show seed standard deviation).
| Boxes | n | Acc | ECE15 | EIB MaxBoxV2 HCU | ||
|---|---|---|---|---|---|---|
| 10% | 400 | .749±.001 | .020±.002 | .836±.002 | .630±.003 | .19% |
| 25% | 1200 | .751±.003 | .019±.004 | .848±.001 | .646±.003 | .15% |
| 50% | 2400 | .747±.002 | .019±.003 | .854±.001 | .652±.000 | .07% |
| 100% | 4794 | .751±.001 | .017±.001 | .861±.001 | .663±.004 | .04% |
Table 31: Annotation-fraction curve (CUB, ResNet-50): the box-routing loss is applied to a class-stratified fraction of training images (nested subsets); all images keep class labels. Spatial metrics on a fixed 2,500-image test subset; = seed-0 diagnostic, others three seeds. CE reference (no boxes): MaxBoxAccV2 .588, EIB .790, HCU 1.10%. Ten percent of boxes already recovers most of the transfer; gains grow monotonically with budget at CE-level accuracy and ECE.

Figure 12: Energy-BGER route-to-CAM transfer versus CUB training-box fraction. The dashed line is CE; error bars show seed standard deviation where three seeds are available.
| 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 |
Table 32: External CUB WSOL references (single official checkpoint each), evaluated locally under our image/box protocol. These output dedicated true-class WSOL maps and are not comparable to the classifier's predicted-class Grad-CAM in Tab. 1; listed as localization references. ECE15 is NA (calibration not reliably exported).
| Readout | CE | BCE-BGER | CAM-BCE |
|---|---|---|---|
| Grad-CAM | .593 | .728 | .778 |
| Grad-CAM++ | .602 | .736 | .804 |
| HiResCAM | .593 | .728 | .778 |
| Score-CAM-128 | .590 | .734 | .798 |
Table 33: MaxBoxAccV2 across CAM readouts (CUB, fixed N=500 subset, three seeds, identical images and checkpoints). Italics denote direct CAM-proxy supervision. Full metrics: App. Tab. 28.
| Subgroup | n | ΔEIB | ΔBestIoU |
|---|---|---|---|
| all positive boxed | 1422 | +.200 | +.167 |
| single-box | 643 | +.131 | +.113 |
| multi-box (≥ 2) | 779 | +.257 | +.212 |
| small lesions | 474 | +.088 | +.098 |
| medium lesions | 474 | +.194 | +.205 |
| large lesions | 474 | +.319 | +.199 |
| EIB up, IoU down | 181 | +.133 | -.118 |
Table 34: RSNA per-case CE→BCE-BGER change by target geometry (positive boxed test cases, seed 0); the final row is not a geometry subgroup but reports the frequency and mean magnitude of metric-discordant cases. Soft-energy gain grows with lesion size and box count; box-overlap gain plateaus. Case-by-case, CAM-BCE's soft-energy advantage over BCE-BGER is nearly constant (-.199 overall, across subgroups) while their box overlap is indistinguishable (+.001, ), so the route-vs-proxy ordering is a metric property, not a geometry effect. BestIoU is the maximum per-image box IoU across thresholds; it is used for subgroup analysis and is distinct from the dataset-level MaxBoxAccV2 in Tab. 3. Area terciles at .052/.124 of the image. Controlled extension, not clinical validation.