Dual-Branch Sigmoid Head for CAM
- Dual-Branch Sigmoid Head is a CAM-oriented modification that splits a pretrained classifier into a frozen softmax branch for recognition and a trainable sigmoid branch for localization.
- It leverages class-balanced binary cross-entropy to optimize the per-class sigmoid head independently, preserving original softmax predictions.
- Empirical results demonstrate improved localization and explanation fidelity with minimal overhead, making it effective for fine-grained and WSOL tasks.
Searching arXiv for the cited paper and closely related CAM context. The Dual-Branch Sigmoid Head is a CAM-oriented classifier-head modification introduced in "Beyond Softmax: Dual-Branch Sigmoid Architecture for Accurate Class Activation Maps" (Oh et al., 5 Nov 2025). It is a simple, architecture-agnostic add-on that decouples localization from classification by preserving the original softmax classifier for recognition while attaching a parallel per-class sigmoid branch for explanation. In the reported formulation, a pretrained network’s classification head is cloned into a trainable sigmoid branch, the original softmax head is frozen, and only the sigmoid branch is fine-tuned with class-balanced binary supervision. At inference, classification continues through the softmax branch, whereas class evidence maps are generated from the sigmoid branch, with the stated goal of preserving both the magnitude and sign of feature contributions.
1. Architectural formulation
The architectural pattern consists of a frozen backbone producing a feature tensor , followed by two parallel heads (Oh et al., 5 Nov 2025). The original head remains unchanged and outputs logits , while a cloned head outputs logits . The original branch ends in a softmax over classes, and the cloned branch ends in independent per-class sigmoids.
Using the notation given in the source description, denotes the pre-softmax logit for class , and denotes the pre-sigmoid logit for the same class. The branch outputs are
for the softmax branch and
for the sigmoid branch.
This split is not a replacement of the recognition head but a duplication of it under different supervision and output semantics. The source description specifies that the method can be attached to any pretrained model by cloning its classifier into a per-class sigmoid head, freezing the original softmax head, and training only the sigmoid branch. This suggests that the central design objective is not to alter decision accuracy, but to create an alternate head whose logits are usable as explanation targets.
2. Optimization and parameterization
Training affects only the sigmoid branch (Oh et al., 5 Nov 2025). The softmax branch receives no further training; its standard cross-entropy pretraining is preserved by freezing its weights. The backbone also remains frozen. The sigmoid branch is optimized as 0 independent one-vs-all classifiers with class-balanced binary cross-entropy over a minibatch of size 1:
2
To counter the 3 imbalance, the reported setting uses
4
An equivalent normalized form using 5 and 6 is also noted. No extra dropout or weight decay is introduced beyond standard practice on the cloned head.
The implementation summary reports VGG-16, ResNet-50, and InceptionV3 as pretrained backbones; a cloned classifier of the original architecture, such as GAP+FC or a single FC layer, as the sigmoid head; ImageNet mean/std normalization; 7 resizing; random crop and flip during training; batch size 8; Adam for optimization; and fine-tuning for 10–12 epochs on fine-grained tasks and 10 epochs on WSOL. Reported learning-rate examples include 9, 0, and 1 for CAM+Ours on ImageNet, depending on backbone, and 2, 3, and 4 for Grad-CAM+Ours.
3. Softmax-induced distortions and sigmoid semantics
The theoretical motivation is stated in terms of two distortions induced by softmax-based heads in CAM generation (Oh et al., 5 Nov 2025). The first is additive logit shift. If a constant 5 is added to all weights or logits, softmax outputs do not change, yet the linear CAM map
6
acquires an added term 7 at every spatial location. The reported consequence is that CAM can be arbitrarily brightened or dimmed without affecting the classifier’s predicted probabilities.
The second distortion is sign collapse. Subtracting a sufficiently large 8 can flip the sign of all 9 while leaving softmax probabilities invariant. In the paper’s interpretation, this entangles inhibitory and excitatory features, because the classifier’s class probabilities remain unchanged even when the sign structure of the linear explanation changes radically.
The sigmoid branch is introduced specifically to break these invariances. Logistic outputs are not invariant to adding the same bias to every class, and the sign of each 0 directly determines whether increasing 1 raises or lowers 2. After fine-tuning, the source claims that each 3 has true magnitude semantics as strength of evidence and sign semantics as positive evidence versus inhibition. A common misunderstanding is to treat this as a critique of softmax classification per se; the reported argument is narrower, namely that softmax invariances distort CAM attribution even when classification remains correct.
4. CAM integration and inference behavior
The method is described as integrating seamlessly with most CAM variants by replacing the explanation target from the softmax logit 4 to the sigmoid logit 5 (Oh et al., 5 Nov 2025). The underlying CAM rule is otherwise unchanged. For Vanilla CAM with GAP+FC, the per-channel weight is simply the FC weight. For Grad-CAM, the weight is
6
For Score-CAM, Ablation-CAM, and related variants, the same masking or ablation procedure is applied, but the score change is measured using 7 rather than 8.
Negative weights are then clamped,
9
and the Dual-Branch CAM is formed as
0
The inference workflow is explicitly split. Classification uses a forward pass through the frozen softmax head and takes 1. Localization uses the same features, computes 2 from the sigmoid head under the chosen CAM rule, clamps negatives, and linearly combines the feature maps. For WSOL, a threshold 3 can be swept on 4 to form a mask and then a tight bounding box. For fine-grained visualization, the output is typically ReLUed, which the source notes is already nonnegative after clamping.
This division of labor is central to the method’s interpretation. Classification is not transferred to the sigmoid head; rather, recognition is anchored to the frozen softmax branch, while localization is delegated to the sigmoid branch. This suggests that the design treats explanation as a separate readout problem over shared features.
5. Empirical profile
The reported evaluations cover fine-grained explanation on CUB-200-2011 and Stanford Cars, and WSOL on ImageNet-1K and OpenImages30K, using VGG-16, ResNet-50, and InceptionV3 together with multiple CAM variants (Oh et al., 5 Nov 2025). The paper states improved explanation fidelity and consistent Top-1 Localization gains without any drop in classification accuracy.
Selected results reported in the source are summarized below.
| Setting | Metric | Baseline 5 +Ours |
|---|---|---|
| VGG-16 / CUB / CAM | AvgDrop | 45.36 6 37.20 |
| VGG-16 / CUB / CAM | 7Confidence | 7.08 8 18.86 |
| VGG-16 / CUB / Grad-CAM | AvgDrop | 38.88 9 35.66 |
| VGG-16 / CUB / Grad-CAM | 0Confidence | 11.36 1 22.06 |
| ResNet-50 / CUB / CAM | AvgDrop | 44.17 2 13.86 |
| ResNet-50 / CUB / CAM | Confidence | 14.76 3 18.42 |
| VGG-16 / ImageNet / CAM | Top1 Cls | 66.56 (no change) |
| VGG-16 / ImageNet / Grad-CAM | Top1 Loc | 37.04 4 44.68 |
| ResNet-50 / ImageNet / CAM | Top1 Loc | 47.69 5 49.44 |
| InceptionV3 / ImageNet / CAM | Top1 Loc | 42.16 6 44.11 |
| VGG-16 / OpenImages | PxAP | 58.17 7 60.11 |
The fine-grained results are presented as gains in AvgDrop and Confidence for CAM, Grad-CAM, Grad-CAM++, XGrad-CAM, and Layer-CAM. On WSOL, the selected entries also include GT Loc and MBAv2 improvements: for example, VGG-16 / Grad-CAM improves GT Loc from 49.02 to 59.43 and MBAv2 from 52.49 to 60.17; ResNet-50 / CAM improves GT Loc from 60.80 to 62.68 and MBAv2 from 63.53 to 64.73; InceptionV3 / CAM improves GT Loc from 57.69 to 60.12 and MBAv2 from 63.51 to 64.98. The source notes that Grad-CAM on some backbones shows minor trade-offs, but always MBAv2 gains.
The computational overhead is reported as moderate: +4–22% training time, +14–20% inference latency, and +4–8% extra parameters. The paper characterizes this as negligible overhead relative to the explanation gains.
6. Interpretation, scope, and terminological boundaries
Within the source material, the Dual-Branch Sigmoid Head is best understood as a localization-specific modification for CAM-style explanation rather than a generic dual-head network template (Oh et al., 5 Nov 2025). Its stated purpose is to remove softmax’s logit-shift and sign-collapse distortions while keeping the original classifier intact. This distinguishes it from architectures in which multiple heads divide prediction tasks, routing tasks, or uncertainty tasks.
A useful terminological boundary appears in the contemporaneous literature on learning-to-defer. In "MPD8-Router: Mask-aware Multi-expert Prior-regularized Dual-head Deferral Router in Glaucoma Screening and Diagnosis" (Zhan, 8 May 2026), the expression dual-head refers to a deferral head and an expert-allocation head that share a fused embedding, together with mask-aware Gumbel-sigmoid gating for feasible-expert selection. That usage concerns constrained human–AI routing under expert availability, workload imbalance, asymmetric diagnostic harm, and deployment shift, rather than CAM generation. The overlap is therefore lexical rather than methodological.
This distinction helps avoid a common source of ambiguity. A “dual-head” or “dual-branch sigmoid” construction does not denote a single canonical design across the literature. In the CAM setting, the relevant split is between a frozen softmax recognition branch and a trainable sigmoid localization branch. In the deferral-routing setting, the split is between “should I defer?” and “to which available expert?”. The former is an explanation architecture; the latter is a routing policy.
The reported contribution of the Dual-Branch Sigmoid Head is therefore specific: take any pretrained network, clone its classifier into a per-class sigmoid head, freeze the original softmax head, train only the sigmoid head with class-balanced BCE, and generate CAM-style maps from the sigmoid branch while preserving classification through the softmax branch. Under that formulation, the method is presented as a plug-in mechanism for producing signed, magnitude-meaningful importance weights with consistent localization gains and no drop in recognition accuracy.