SSA: Semantic Structure Aware Inference for Weakly Pixel-Wise Dense Predictions without Cost

Yanpeng Sun, Zechao LiarXiv 2021

Introduction

Weakly-supervised learning aims to achieve complex tasks like object localization and semantic segmentation using only image-level labels, significantly reducing the cost of manual pixel-level annotation. The standard approach involves generating Class Attention Maps (CAMs) from a classification network. However, CAMs typically suffer from the "discriminative region" problem, where the model focuses only on the most distinct parts of an object (e.g., a bird's head) rather than its entire body.

Existing solutions often rely on complex training strategies, such as adversarial erasing or gradient-based refinement, which introduce significant computational overhead and numerous hyperparameters. This paper introduces Semantic Structure Aware (SSA) inference, a parameter-free method that improves CAM quality during the inference phase without requiring any additional training or architectural modifications.

The SSA Framework

The core insight behind SSA is that the internal feature maps of a pre-trained CNN already contain rich semantic correlations between pixels belonging to the same object. The authors propose the Semantic Structure modeling Module (SSM) to extract these correlations and use them to "polish" initial CAMs.

The SSA architecture integrates the Semantic Structure modeling Module (SSM) with existing ConvNet stages to refine Class Attention Maps during inference.

As shown in the architecture diagram above, the process follows these steps:

  1. Seed CAM Generation: A standard classification network produces an initial, sparse CAM.
  2. Semantic Structure Extraction: The SSM processes feature maps from deep backbone stages (specifically Stage 4 and Stage 5). It utilizes Self-Affinity (SA) blocks to compute a class-agnostic correlation matrix, identifying pixels that are semantically related.
  3. Refinement and Polishing: The module applies a "smooth gate" (tanh) and ReLU to filter noise from the affinity matrix. This refined affinity is then used via matrix multiplication to spread activations from the seed CAM to all semantically similar pixels.
  4. Multi-stage Fusion: Polished maps from different stages are fused to combine fine-grained details from earlier layers with the broader semantic context of deeper layers.

Experimental Results

SSA was evaluated on major benchmarks including CUB-200-2011, ILSVRC (ImageNet), and PASCAL VOC 2012. The method demonstrated a remarkable ability to expand sparse attention regions into dense, high-quality masks that more accurately cover the target objects.

Qualitative comparison on VOC 2012 and CUB-200-2011 datasets showing how SSA (c) expands the sparse baseline CAM (b) to better match the object boundaries.

Key Performance Metrics

  • Object Localization (WSOL): On the CUB-200-2011 dataset, SSA (using a VGG16 backbone) reduced the Top-1 localization error rate to 38.1%, a substantial improvement over the 55.9% error rate of the baseline CAM.
  • Semantic Segmentation (WSSS): When integrated with IRNet on the PASCAL VOC 2012 benchmark, SSA achieved a mean Intersection-over-Union (mIoU) of 67.4% on the validation set and 67.9% on the test set, outperforming established methods like SEAM and CONTA.

Conclusion and Future Work

SSA provides a highly efficient, "plug-and-play" solution for improving weakly-supervised dense predictions. By leveraging existing semantic structures within CNNs during inference, it achieves state-of-the-art results with zero additional parameters. While the method is robust, the authors note that noise in earlier backbone stages can occasionally lead to over-recognition. Future research will focus on enhancing the robustness of these semantic correlations to further minimize false positives in complex backgrounds.

Summary updated

BibTeX
@misc{sun2021ssa,
  author = {Yanpeng Sun and Zechao Li},
  title = {{SSA: Semantic Structure Aware Inference for Weakly Pixel-Wise Dense Predictions without Cost}},
  year = {2021},
  eprint = {2111.03392},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.03392},
}
Figure