Multi-compound Transformer for Accurate Biomedical Image Segmentation

Yuanfeng Ji, Ruimao Zhang, Huijie Wang, Zhen Li, Lingyun Wu, Shaoting Zhang, Ping Luo

Abstract

Biomedical image segmentation is a critical task requiring high precision across varying scales and semantic categories. While Convolutional Neural Networks (CNNs) like UNet are standard, they often fail to capture long-range dependencies and semantic relationships. We present the Multi-Compound Transformer (MCTrans), a framework that integrates a CNN encoder-decoder with specialized Transformer modules. By utilizing Deformable Self-Attention for cross-scale pixel dependencies and learnable proxy embeddings for semantic modeling, MCTrans achieves state-of-the-art performance across six major benchmarks while remaining significantly more parameter-efficient than existing Transformer-based models.

Introduction

Accurate segmentation of anatomical structures and lesions is fundamental to medical diagnosis and treatment planning. However, biomedical images present unique challenges, including dramatic variations in the size and appearance of targets. Traditional CNN-based architectures, such as UNet and its variants, rely on local receptive fields, which limits their ability to model the global context and long-range dependencies necessary for complex segmentation tasks.

Recent attempts to incorporate Vision Transformers (ViTs) have shown promise but often suffer from three primary limitations: a focus on single-scale features at the coarsest level, a failure to model semantic relationships between different classes, and a lack of feature consistency within categories. MCTrans is designed to bridge these gaps by introducing a multi-compound approach to attention and semantic modeling.

The MCTrans Framework

The Multi-Compound Transformer (MCTrans) is designed as a modular component that can be integrated into a standard CNN encoder-decoder architecture. The framework consists of two primary attention-based modules: Transformer-Self-Attention (TSA) and Transformer-Cross-Attention (TCA).

The overall architecture of the Multi-Compound Transformer (MCTrans) framework, showing the integration of TSA and TCA modules between the encoder and decoder.

Transformer-Self-Attention (TSA)

The TSA module focuses on capturing pixel-level contextual dependencies across multiple scales. By embedding multi-scale convolutional features as a sequence of tokens, the model can learn relationships between pixels regardless of their spatial distance. To manage the quadratic computational complexity associated with long sequences, MCTrans employs Deformable Self-Attention (DSA). This allows the model to attend to a small, learned subset of key sampling points, making multi-scale attention computationally feasible and efficient.

Transformer-Cross-Attention (TCA)

Beyond pixel-level dependencies, MCTrans introduces learnable proxy embeddings to model semantic relationships. In the TCA module, each vector in the proxy embedding represents a specific semantic category (e.g., different types of cells or tissue). The TCA uses self-attention to model the relationships between these categories and cross-attention to allow these "category prototypes" to interact with pixel-level features. This process enhances the feature representations by providing a global semantic context, improving intra-class consistency.

To ensure these proxies learn meaningful semantic information, an Auxiliary Loss is introduced. This classification loss forces the updated proxy embeddings to accurately predict the presence of specific classes within the input image.

Experimental Evaluation

The efficacy of MCTrans was evaluated on six diverse benchmarks covering three distinct medical imaging tasks:

  1. Cell Segmentation: The Pannuke dataset (pathology images with 6 classes).
  2. Polyp Segmentation: Four datasets (CVC-Clinic, CVC-ColonDB, ETIS-Larib, and Kvasir).
  3. Skin Lesion Segmentation: The ISIC2018 dataset.

These datasets represent a wide range of modalities and target sizes, providing a robust environment to test the model's generalization capabilities.

Results and Discussion

MCTrans consistently outperformed established baselines, including UNet, UNet++, and CENet, across all tested datasets. Notably, it achieved a 3.64% improvement in Dice Similarity Coefficient (DSC) on the Pannuke dataset and a 4.34% gain on the CVC-Colon dataset compared to standard UNet.

Qualitative comparison of segmentation results, highlighting MCTrans's ability to delineate clean boundaries and handle overlapping structures better than traditional CNN-based methods.

Beyond accuracy, MCTrans is highly efficient. While models like TransUNet require approximately 27M parameters for similar tasks, MCTrans achieves superior results with only ~7.6M parameters. This efficiency is largely due to the use of deformable attention and the strategic merging of multi-scale features.

Qualitative analysis (see Figure 6) demonstrates that MCTrans produces significantly cleaner boundaries and is more robust to the complex, overlapping structures often found in pathology slides. The model's ability to handle dramatic size changes in lesions further underscores the importance of its cross-scale attention mechanism.

Conclusion

MCTrans represents a significant advancement in biomedical image segmentation by effectively combining the local feature extraction of CNNs with the global modeling capabilities of Transformers. By addressing the gaps in cross-scale dependency and semantic correspondence, it provides a robust and efficient solution for high-precision medical tasks. Future work will explore extending this framework to 3D volumetric data and investigating its potential in semi-supervised learning environments.

Summary updated

BibTeX
@inproceedings{ji2021multi,
  author = {Yuanfeng Ji and Ruimao Zhang and Huijie Wang and Zhen Li and Lingyun Wu and Shaoting Zhang and Ping Luo},
  title = {{Multi-compound Transformer for Accurate Biomedical Image Segmentation}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2021},
  doi = {10.1007/978-3-030-87193-2\_31},
}
Figure