Medical Image Segmentation via Cascaded Attention Decoding

Md Mostafijur Rahman, Radu MarculescuWACV 2023

Abstract

Transformers have shown great promise in medical image segmentation due to their ability to capture long-range dependencies through self-attention. However, they lack the ability to learn the local (contextual) relations among pixels. Previous works try to overcome this problem by embedding convolutional layers either in the encoder or decoder modules of transformers thus ending up sometimes with inconsistent features. To address this issue, we propose a novel attention-based decoder, namely CASCaded Attention DEcoder (CASCADE), which leverages the multi-scale features of hierarchical vision transformers. CASCADE consists of i) an attention gate which fuses features with skip connections and ii) a convolutional attention module that enhances the long-range and local context by suppressing background information. We use a multi-stage feature and loss aggregation framework due to their faster convergence and better performance. Our experiments demonstrate that transformers with CASCADE significantly outperform state-of-the-art CNN- and transformer-based approaches, obtaining up to 5.07% and 6.16% improvements in DICE and mIoU scores, respectively. CASCADE opens new ways of designing better attention-based decoders.

Introduction

Medical image segmentation—identifying organs or lesions in scans like CTs or MRIs—requires a difficult balance between global context and local detail. Convolutional Neural Networks (CNNs) excel at local details but have a narrow field of view. Conversely, Vision Transformers (ViTs) offer a wide field of view through long-range dependencies but often struggle to model relationships between neighboring pixels accurately. Previous hybrid attempts often lead to inconsistent features. We identify a specific need for a decoder that can intelligently aggregate multi-scale features from a hierarchical encoder without losing local precision.

Methods: The CASCADE Decoder

The core contribution is the CASCADE decoder, designed to work on top of hierarchical vision transformer backbones (like PVTv2 or TransUNet). It consists of three main pillars:

  1. Attention Gate (AG): Used during the fusion of skip connections, the AG filters out irrelevant background noise and focuses the model on salient regions before features are merged.
  2. Convolutional Attention Module (CAM): This module applies Channel Attention (deciding which feature maps are important) and Spatial Attention (deciding where in the image to look), followed by a standard convolutional block to sharpen local pixel relations.
  3. Multi-stage Loss & Feature Aggregation: Instead of calculating error only at the end of the network, CASCADE produces four predictions at different resolutions. These are weighted and summed, providing "deep supervision" that ensures features at every level of the hierarchy are meaningful.
The CASCADE architecture, featuring the Attention Gate (AG), Convolutional Attention Module (CAM), and multi-stage aggregation framework.

Experimental Results

The model was evaluated on several high-standard benchmarks: the Synapse Multi-organ Dataset (CT), the ACDC Dataset (cardiac MRI), and five Polyp Segmentation datasets.

Performance and Convergence

On the Synapse dataset, CASCADE improved upon the TransUNet baseline by 5.07% in DICE score and 6.16% in mIoU, excelling in segmenting small organs like the gallbladder. On ACDC, it achieved a new high average DICE score of 91.63%.

A key finding is the impact of the multi-stage loss. As shown in Figure 3, the 4-loss setup reaches approximately 75% accuracy in the very first epoch, significantly outperforming standard single-loss setups which typically start in the 35-50% range.

Comparison of average dice scores over epochs for different loss and output configurations, highlighting the faster convergence of the multi-stage approach.

Generalization and Boundary Accuracy

CASCADE showed remarkable generalization on unseen polyp datasets, outperforming the previous best CNN-based model (UACANet) by over 16% in some cases. It also significantly reduced the Hausdorff Distance (HD95), indicating cleaner and more anatomically correct boundaries.

Conclusion

CASCADE demonstrates that the method of feature aggregation in the decoder is as critical as the encoder design. By progressively refining features through cascaded attention, the model bridges the gap between global context and local detail. While currently reliant on hierarchical backbones, future work aims to extend this approach to 3D volumetric scans and broader computer vision tasks.

Summary updated

BibTeX
@inproceedings{rahman2023medical,
  author = {Md Mostafijur Rahman and Radu Marculescu},
  title = {{Medical Image Segmentation via Cascaded Attention Decoding}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2023},
  url = {https://openreview.net/forum?id=K9PFNoryoC8},
}
Figure