Lagrange Duality and Compound Multi-Attention Transformer for Semi-Supervised Medical Image Segmentation

Xuhang Chen, Fuchen Zheng, Quanjun Li, Weixuan Li, Xuhang Chen 0002, Yihang Dong, Guoheng Huang, Chi-Man Pun, Shoujun ZhouarXiv 2024 · DOI · arXiv

Abstract

Medical image segmentation is vital for clinical diagnosis but is often hindered by the "long-tail" problem—where rare lesions are underrepresented—and the inherent limitations of standard neural architectures. This paper presents CMAformer, a hybrid model that combines the local feature extraction of CNNs with the global context of Transformers. To enhance semi-supervised learning, the authors introduce Lagrange Duality Consistency (LDC) Loss, which treats consistency regularization as a constrained optimization problem. Experimental results on the Synapse and LiTS2017 datasets show that CMAformer achieves state-of-the-art performance, even with limited labeled data.

Introduction

Accurate identification of organs and tumors in medical scans is essential for treatment planning. However, existing models struggle with two primary issues:

  1. The Long-Tail Problem: While common anatomical structures are easily segmented, rare lesions or small tumors are often missed due to their scarcity in training sets.
  2. Architectural Trade-offs: Convolutional Neural Networks (CNNs) excel at capturing local details but lack global spatial context. Conversely, Transformers capture long-range dependencies but often overlook fine-grained local features and require large datasets.

CMAformer addresses these by integrating spatial and channel attention across multiple scales within a robust hybrid framework.

Methodology

CMAformer Architecture

CMAformer is designed as a "U-shaped" hybrid network that leverages the strengths of both residual CNNs and Transformers. The architecture consists of a ResUNet base to maintain high-resolution feature flow and a specialized Cross-Attention Layer. This layer serves as the "secret sauce," integrating spatial attention (identifying where to look) and channel attention (identifying which features are important) across different scales.

The overall architecture of CMAformer, highlighting the integration of Residual Blocks, Patch Embeddings, and the Cross-Attention mechanism within an Encoder-Decoder framework.

A key innovation in the Transformer block is the application of Layer Normalization specifically to the Query (Q) matrix rather than the entire output. This modification stabilizes gradients and improves training efficiency, specifically tailored for the noise profiles found in medical imaging.

Lagrange Duality Consistency (LDC) Loss

In semi-supervised settings, models typically rely on consistency regularization—ensuring the model produces similar outputs for perturbed versions of unlabeled images. The authors reformulate this as a convex optimization problem. By employing Lagrange multipliers, they incorporate physical and mathematical constraints (such as probability bounds and non-negativity) directly into the loss function. This mathematical rigor prevents the model from diverging when learning from unlabeled data, significantly improving the detection of small, rare lesions.

Boundary-Aware Contrastive Loss

To further refine segmentation edges, an unsupervised contrastive loss is utilized. This loss focuses on object boundaries, encouraging the model to learn clear distinctions between the edges of organs and surrounding tissues.

Experimental Results

The model was evaluated on two benchmark datasets: the Synapse Multi-organ Dataset (8 abdominal organs) and the LiTS2017 (Liver Tumor Segmentation Challenge).

Performance on Synapse Dataset

CMAformer achieved a state-of-the-art average Dice score of 87.39, surpassing established models like TransUNet and nnFormer. It showed exceptional precision in segmenting the Liver (97.78) and Aorta (93.21).

Comparative performance of CMAformer against other state-of-the-art models on the Synapse Multi-organ dataset.

Performance on LiTS2017

On the liver tumor task, which represents a classic "small object" detection challenge, CMAformer reached an average score of 95.62. Notably, when trained with only 50% of labeled data, the model maintained a score of 95.27, outperforming many fully supervised competitors. This underscores the effectiveness of the LDC loss in leveraging unlabeled data.

Conclusion

CMAformer represents a significant step forward in medical image segmentation by effectively fusing multi-scale attention mechanisms with a mathematically grounded semi-supervised training objective. By treating optimization as a form of regularization through Lagrange Duality, the model achieves superior robustness on "long-tail" data. Future work will focus on native 3D integration and clinical validation across diverse imaging modalities such as MRI and Ultrasound.

Summary updated

Abstract

Medical image segmentation, a critical application of semantic segmentation in healthcare, has seen significant advancements through specialized computer vision techniques. While deep learning-based medical image segmentation is essential for assisting in medical diagnosis, the lack of diverse training data causes the long-tail problem. Moreover, most previous hybrid CNN-ViT architectures have limited ability to combine various attentions in different layers of the Convolutional Neural Network. To address these issues, we propose a Lagrange Duality Consistency (LDC) Loss, integrated with Boundary-Aware Contrastive Loss, as the overall training objective for semi-supervised learning to mitigate the long-tail problem. Additionally, we introduce CMAformer, a novel network that synergizes the strengths of ResUNet and Transformer. The cross-attention block in CMAformer effectively integrates spatial attention and channel attention for multi-scale feature fusion. Overall, our results indicate that CMAformer, combined with the feature fusion framework and the new consistency loss, demonstrates strong complementarity in semi-supervised learning ensembles. We achieve state-of-the-art results on multiple public medical image datasets. Example code are available at: \url{https://github.com/lzeeorno/Lagrange-Duality-and-CMAformer}.
BibTeX
@misc{chen2024lagrange,
  author = {Xuhang Chen and Fuchen Zheng and Quanjun Li and Weixuan Li and Xuhang Chen and Yihang Dong and Guoheng Huang and Chi-Man Pun and Shoujun Zhou},
  title = {{Lagrange Duality and Compound Multi-Attention Transformer for Semi-Supervised Medical Image Segmentation}},
  year = {2024},
  eprint = {2409.07793},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.07793},
}
Figure