Shallow Attention Network for Polyp Segmentation

Jun Wei, Yiwen Hu, Ruimao Zhang, Zhen Li, S. Kevin Zhou, Shuguang Cui

TL;DR

The Shallow Attention Network (SANet) is a novel deep learning framework designed to overcome the three primary hurdles in polyp segmentation: inconsistent color distributions, the loss of small polyps during downsampling, and severe class imbalance. By introducing a color exchange augmentation, a targeted shallow attention module, and an inference-time probability correction, SANet achieves state-of-the-art performance across five benchmarks while maintaining a real-time speed of 72 FPS.

What Problem Does This Paper Address?

Colorectal cancer (CRC) is a leading cause of cancer-related deaths, and early detection of polyps is critical for prevention. While deep learning has advanced automatic polyp segmentation, three major challenges remain:

  1. Color Inconsistency: Polyp images collected under different clinical conditions show vastly different color distributions. Models often overfit to these colors rather than learning the actual shape and structure of the polyps.
  2. Small Polyp Degradation: Standard "encoder-decoder" networks repeatedly downsample images to extract high-level features. In this process, small polyps—which make up the majority of many datasets—often disappear or become too blurred to recover.
  3. Class Imbalance: In a typical colonoscopy frame, the background (healthy tissue) vastly outweighs the foreground (polyp). This leads to biased models that lack confidence when predicting polyp pixels.
Fig. 1. (a) Polyp samples with different colors. (b) The histogram of polyp size. The horizontal axis shows the proportion of the polyp area to the image area. The vertical axis shows the proportion of polyp samples of a specific size to the total samples. One training set and five testing sets are shown in different colors.

Methods

The authors propose three distinct components to build the Shallow Attention Network (SANet):

  • Color Exchange (CE): To break the "fake causality" between color and segmentation, the authors swap the color statistics (mean and standard deviation in LAB space) between two random images during training. This forces the model to focus on invariant features like shape and texture.
  • Shallow Attention Module (SAM): Small polyps require high-resolution "shallow" features to be detected. However, shallow features are notoriously noisy. SAM uses "deep" features (which have a cleaner background but lower resolution) as an attention mask to filter out noise from the shallow features before they are used for segmentation.
  • Probability Correction Strategy (PCS): This is a post-processing step applied only during inference. It reweights the predicted "logits" based on the proportion of positive vs. negative samples in the frame, effectively boosting the model's confidence in polyp regions to counteract training bias.
Fig. 2. An overview of the proposed model.

Datasets

The model was evaluated on five widely recognized public benchmarks to ensure robustness:

  • Kvasir-SEG and CVC-ClinicDB (Standard datasets)
  • CVC-ColonDB, EndoScene, and ETIS (Challenging datasets with many small polyps)

The authors followed standard training/testing splits to ensure fair comparison with previous state-of-the-art (SOTA) methods like PraNet and U-Net++.

Key Insights and Ideas

  • Decoupling Content from Color: The Color Exchange operation is a simple yet powerful way to perform data augmentation that specifically targets the domain-shift problem in medical imaging without requiring complex Generative Adversarial Networks (GANs).
  • The Complementarity of Features: Instead of just concatenating features (as in U-Net), SAM recognizes that deep and shallow features have complementary strengths: deep features provide "where" (clean localization), while shallow features provide "what" (fine-grained boundaries).
  • Inference-Time Bias Correction: The PCS demonstrates that you don't always need to change the loss function or the training loop to handle class imbalance; sometimes, a smart normalization of the output probabilities is enough to significantly sharpen boundaries.
A detailed look at the Shallow Attention Module (SAM), showing how deep features are used to gate shallow features.

Key Results

SANet consistently outperformed previous SOTA methods across all five datasets.

  • Accuracy: On the challenging ETIS dataset, SANet achieved an mDice of 0.750, a significant jump over the previous best of 0.628 (PraNet).
  • Speed: The model runs at 72 FPS on an NVIDIA RTX 2080Ti, making it suitable for real-time assistance during live colonoscopy procedures.
  • Ablation: Removing any single component (SAM, CE, or PCS) led to a drop in performance, proving that each part of the pipeline addresses a necessary piece of the puzzle.

Limitations and Future Work

While SANet shows impressive results, the authors note that the model still relies on purely data-driven features. They suggest that future work should focus on incorporating more prior knowledge (such as anatomical constraints or specific medical insights) to design even more robust features that can ignore irrelevant environmental factors. Additionally, while PCS helps with imbalance, it is a heuristic that might be further refined through more sophisticated adaptive weighting schemes.

Summary updated

BibTeX
@inproceedings{wei2021shallow,
  author = {Jun Wei and Yiwen Hu and Ruimao Zhang and Zhen Li and S. Kevin Zhou and Shuguang Cui},
  title = {{Shallow Attention Network for Polyp Segmentation}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2021},
  url = {https://openreview.net/forum?id=tWaMvWTXrF},
}
Figure