Correlation Maximized Structural Similarity Loss for Semantic Segmentation

Shuai Zhao, Boxi Wu, Wenqing Chu, Yao Hu, Deng CaiarXiv 2019

Introduction

Semantic segmentation has traditionally been treated as a dense pixel-wise classification task. While deep learning models have achieved impressive results, they often struggle with fine structural details. This paper introduces Structural Similarity Loss (SSL), a novel loss function designed to capture spatial dependencies between pixels by maximizing the linear correlation between predicted probability maps and ground truth.

The Pixel-wise Trap

Standard models typically rely on Cross Entropy (CE) loss. Because CE calculates error for each pixel in isolation, it ignores the structural relationships between neighbors. This "pixel-wise trap" often leads to misclassifications in areas with thin structures or occlusions, such as a horse's legs or a rider's limbs.

Visual comparison between ground truth and model predictions, highlighting the difficulty of capturing thin structures like horse legs.

While post-processing techniques like Conditional Random Fields (CRFs) or complex architectures like Generative Adversarial Networks (GANs) can address these structural issues, they introduce significant computational overhead or training instability. SSL offers a more efficient alternative by acting as a region-wise supervisor during training.

Methods: Maximizing Correlation

The core of SSL is inspired by the Structural Similarity Index (SSIM), specifically the "structure term," which corresponds to the Pearson correlation coefficient.

Local Normalization and Correlation

To compare a predicted map with binary ground truth, the authors perform local standard normalization. This involves calculating the local mean and standard deviation within a sliding window (typically $3 \times 3$). By maximizing the correlation within these local regions, the model is forced to match the "shape" of the ground truth rather than just individual pixel values.

Local statistics calculation for structural similarity assessment.

Optimization Strategies

  • Reweighting: The structural difference is used to reweight the standard cross-entropy loss, prioritizing regions where the structure is poorly captured.
  • Online Hard Example Mining (OHEM): The loss function ignores pixels that already show high structural correlation, focusing the gradient budget on the most challenging "broken" structures.
  • Sigmoid vs. Softmax: Interestingly, the authors found that treating segmentation as multiple binary problems (using Sigmoid) yielded better results with SSL than the standard multi-class Softmax approach.

Experimental Results

The proposed method was evaluated on the PASCAL VOC 2012 and Cityscapes benchmarks using DeepLabv3 and DeepLabv3+ as baselines.

  • PASCAL VOC 2012: Adding SSL resulted in a 2.13% mIoU improvement over the baseline, reaching a peak of 80.63% mIoU.
  • Cityscapes: The model saw a 1.39% mIoU boost.
  • Efficiency: Unlike CRFs, which can add nearly a second of processing time per image, SSL is used only during training. This results in zero inference overhead, making it ideal for real-time applications.

Conclusion

Structural Similarity Loss provides a simple, effective way to incorporate spatial context into semantic segmentation without the complexity of graphical models or adversarial training. By shifting the focus from individual pixels to local correlations, SSL enables models to better preserve the intricate structures of real-world objects.

Summary updated

BibTeX
@misc{zhao2019correlation,
  author = {Shuai Zhao and Boxi Wu and Wenqing Chu and Yao Hu and Deng Cai},
  title = {{Correlation Maximized Structural Similarity Loss for Semantic Segmentation}},
  year = {2019},
  eprint = {1910.08711},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.08711},
}
Figure