Decoupled Spatial Neural Attention for Weakly Supervised Semantic Segmentation

Tianyi Zhang, Guosheng Lin, Jianfei Cai, Tong Shen, Chunhua Shen, Alex C. Kot

TL;DR

This paper introduces a Decoupled Spatial Neural Attention network that significantly improves weakly supervised semantic segmentation by generating high-quality pseudo-annotations in a single forward pass. By simultaneously producing an "expansive" attention map to capture whole object regions and a "discriminative" attention map to pinpoint key features, it eliminates the need for complex, iterative training pipelines while achieving state-of-the-art results.

What Problem Does This Paper Address?

Training semantic segmentation models typically requires dense, pixel-wise ground-truth annotations, which are incredibly labor-intensive to produce. Weakly supervised semantic segmentation (WSSS) attempts to solve this by training models using much cheaper image-level labels (e.g., "this image contains a cat").

The standard pipeline for WSSS involves using localization cues to generate "pseudo-annotations" (rough pixel-level masks) to train a segmentation network. However, standard localization methods like Class Activation Mapping (CAM) suffer from a major flaw: they only look for the most discriminative parts of an object (like a cat's head) rather than its entire body. Previous attempts to expand these regions rely on complex, multi-step iterative erasing techniques or external data (like pre-trained saliency models). This paper tackles the challenge of capturing the full extent of objects efficiently within a simple, single-forward-pass architecture.

Methods

The authors propose a Decoupled Attention Structure that extends conventional spatial attention mechanisms to multi-class scenarios by generating two distinct types of attention maps in parallel:

  1. Expansive Attention Detector (E-A detector): This branch identifies the entire object region. It employs a specific non-linear activation function ($F(x) = \log(1 + \exp(x)) + \epsilon$) and introduces dropout layers both before and after its $1 \times 1$ convolutional layer. This random zeroing-out of features acts as a spatial regularizer, forcing the network to look beyond the most obvious features and highlight the surrounding parts of the object.
  2. Discriminative Attention Detector (D-A detector): This branch focuses strictly on mining highly discriminative parts by predicting class scores for dense pixel positions, thereby preserving crucial spatial information.

The two maps are combined dynamically using a weighted combination based on the confidence of the image classification score. These merged maps are then thresholded to generate background and foreground regions, which are finally refined using a DenseCRF to create the final pseudo-annotations.

The proposed decoupled attention structure.

Datasets

  • PASCAL VOC 2012: The standard benchmark for image segmentation, featuring 21 semantic classes (including background). Following common practice, the training set was augmented to 10,582 images. Crucially, only image-level labels were used during the training of the attention model. Evaluation was conducted on the validation (val) and test (test) sets.

Key Insights and Ideas

  • Complementary Parallelism: Instead of treating object expansion and discriminative localization as an adversarial or multi-step iterative process, the authors realize they can be modeled as two complementary attention maps generated simultaneously.
  • Expansion via Dropout: Using dropout inside an attention detector is highly intuitive. By randomly blocking the most discriminative features during training, the network is forced to discover alternative features across the rest of the object's body to satisfy the classification loss, naturally expanding the attention map.
  • Classification-Guided Merging: Merging the maps using the classification confidence score ensures that for difficult or small objects (which yield lower classification scores), the model relies more heavily on the precise discriminative map rather than over-expanding.

Key Results

  • Ablation Success: Quantitative evaluation showed that merging the two attention maps achieved a higher mean Intersection-over-Union (mIoU) of 44.0% compared to using the expansive map (42.1%) or discriminative map (39.4%) alone.
  • Outperforming Iterative Pipelines: At the pseudo-annotation generation stage, the proposed single-pass method achieved 55.4% mIoU, significantly outperforming more complex multi-step region-mining methods like SEC (50.7%) and Adversarial-Erasing (50.9%).
  • State-of-the-Art Segmentation: When the generated pseudo-annotations were used to train a final ResNet-101 segmentation network, the method achieved 58.2% mIoU on the PASCAL VOC 2012 val set and 60.1% mIoU on the test set, outperforming all existing methods using the same level of weak supervision.

Limitations and Future Work

Not discussed in the paper.

Summary updated

BibTeX
@article{zhang2019decoupled,
  author = {Tianyi Zhang and Guosheng Lin and Jianfei Cai and Tong Shen and Chunhua Shen and Alex C. Kot},
  title = {{Decoupled Spatial Neural Attention for Weakly Supervised Semantic Segmentation}},
  journal = {IEEE Trans. Multimedia},
  year = {2019},
  doi = {10.1109/tmm.2019.2914870},
}
Figure