Mitigating Biased Activation in Weakly-supervised Object Localization via Counterfactual Learning

Feifei Shao, Yawei Luo, Lei Chen, Ping Liu, Yi Yang, Jun Xiao · DOI

Introduction

Weakly-supervised object localization (WSOL) aims to identify object regions using only image-level labels. A common approach involves Class Activation Maps (CAMs), which highlight discriminative regions for classification. However, standard CAMs often suffer from biased activation, where the model incorrectly attributes background features (like water for a duck or sky for a bird) to the object class. This occurs because the background acts as a confounder, creating spurious correlations that the model exploits to minimize training loss.

Comparison of Vanilla CAM and the proposed Counterfactual-CAM across different datasets. Vanilla CAM often activates background regions (yellow arrows), while Counterfactual-CAM focuses on the foreground object.

Counterfactual Co-occurring Learning (CCL)

To address this, the authors propose Counterfactual Co-occurring Learning (CCL), a framework designed to disentangle foreground objects from their habitual contexts. The architecture, termed Counterfactual-CAM, operates through three primary stages:

1. Co-occurring Feature Disentangling

The model first extracts an original image feature ($O$) and a foreground feature ($F$) using a dedicated extractor. By subtracting the foreground from the original, the background feature ($B$) is isolated ($B = O - F$). A decoupled loss is employed to ensure that $F$ aligns with class-specific prototypes while $B$ remains orthogonal to them, effectively separating the object from its environment in the feature space.

2. Counterfactual Representation Synthesizing

Once disentangled, the model synthesizes "counterfactual" scenarios. It pairs the foreground feature of one class (e.g., a fish) with diverse background features from the same batch (e.g., sky, grass, or wood). This process creates synthetic representations of objects in unusual contexts.

3. Training and Adaptation

The model is trained to maintain consistent classification performance across these counterfactual representations. This forces the classifier to ignore varying background noise and focus strictly on foreground features. Additionally, a Test-time Counterfactual Adaptation strategy is used during inference to further suppress background activations specific to the test image.

The Counterfactual-CAM training pipeline, illustrating (a) the overall model flow, (b) the feature disentangling process, and (c) the synthesis of counterfactual representations.

Experimental Evaluation

The method was evaluated on the CUB-200-2011, ILSVRC 2016 (ImageNet), and OpenImages30k benchmarks.

  • CUB-200-2011: Using a VGG16 backbone, Counterfactual-CAM achieved a 74.1% Top-1 Localization accuracy, a significant improvement over the 68.5% baseline.
  • ILSVRC 2016: The model reached 52.1% Top-1 Loc, outperforming several complex state-of-the-art methods and demonstrating robustness on large-scale data.
  • Qualitative Results: Visualizations confirm that Counterfactual-CAM produces much tighter heatmaps that are strictly confined to the object boundaries, effectively ignoring co-occurring background elements.

Conclusion

By framing biased activation as a causal confounding problem, the CCL paradigm provides a robust mechanism for improving WSOL. Through feature disentanglement and counterfactual synthesis, the model learns to prioritize intrinsic object features over environmental shortcuts, leading to more accurate and reliable object localization.

Summary updated

BibTeX
@misc{shao2023mitigating,
  author = {Feifei Shao and Yawei Luo and Lei Chen and Ping Liu and Yi Yang and Jun Xiao},
  title = {{Mitigating Biased Activation in Weakly-supervised Object Localization via Counterfactual Learning}},
  year = {2023},
  eprint = {2305.15354},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.15354},
}
Figure