TL;DR
ConvFormer is a novel hierarchical hybrid architecture that effectively marries Convolutional Neural Networks (CNNs) and Transformers for medical image segmentation. By integrating depth-wise convolutions directly into the Transformer’s feed-forward network and utilizing a residual-shaped hybrid stem, it captures both fine-grained local details and long-range global context, achieving state-of-the-art performance on 2D and 3D medical datasets without requiring large-scale pre-training.
What Problem Does This Paper Address?
Medical image segmentation requires a delicate balance. You need to see the "big picture" (global context) to understand where organs or lesions are relative to each other, but you also need "pixel-perfect" local accuracy to define boundaries.
Standard CNNs are the traditional workhorses here; they have a strong "inductive bias" for local patterns but suffer from limited receptive fields—they struggle to see the whole image at once. Transformers, borrowed from natural language processing, excel at capturing these long-range dependencies. However, they lack the inherent local focus of CNNs, are computationally heavy, and often require massive pre-training to perform well.
Existing hybrid models often just "stack" these two—for example, putting a Transformer at the end of a CNN encoder. The authors argue these approaches are sub-optimal because they don't effectively fuse local and global information across multiple scales, which is critical for medical images where targets (like tumors or lymph nodes) vary wildly in size and shape.
Methods
The authors introduce ConvFormer, a U-shaped architecture built on three primary innovations:
- Enhanced DeTrans: The authors take the Deformable Transformer (DeTrans) and redesign its Feed-Forward Module (FFM). Instead of just using linear layers, they insert a depth-wise convolution (DW Conv). This allows the Transformer block to learn local spatial context while it's processing global attention.
- Residual-shaped Hybrid Stem: Instead of a pure CNN or pure Transformer encoder, ConvFormer uses a hybrid stem. It combines stacked convolutions (for local features) with Enhanced DeTrans blocks (for global features) via residual connections. This design prevents "feature collapse" (where feature diversity disappears in deep layers) and ensures better fusion of information types.
- Enhanced Positional Encoding (EPE): Standard Transformers use fixed sinusoidal functions to tell the model where pixels are. ConvFormer adds a parallel branch with a DW Conv to this encoding. This makes the positional information more adaptable and flexible to the specific geometry of the input data.
Datasets
The model was evaluated on three distinct tasks to prove its versatility:
- Lymph Node Ultrasound (2D): An in-house dataset for segmenting lymph nodes (137 training, 100 test images).
- 2017 MM-WHS CT (3D): A public dataset for segmenting seven cardiac structures (e.g., ventricles, atria, aorta) from 3D CT scans.
- 2017 ISIC Skin Lesion (2D): A public dataset for segmenting skin lesion boundaries in dermoscopic images (2000 training, 600 test images).
Key Insights and Ideas
- Interleaving is better than Stacking: The core "aha moment" is that local and global processing shouldn't be separate stages. By putting convolutions inside the Transformer's FFM, the model learns a more integrated representation.
- Multi-scale Hierarchies are Essential: By using the hybrid stem in a hierarchical manner (processing the image at different resolutions), the model can handle objects of vastly different sizes—a common challenge in medical imaging.
- Inductive Bias Matters: Even with the power of Transformers, the "local" bias of convolutions is so important for segmentation that removing the CNN components leads to a massive performance drop (nearly 10% in F1 score in their ablation study).
- Pre-training is Optional: Unlike many pure Transformer models that need to see millions of natural images (like ImageNet) first, ConvFormer achieves SOTA results when trained from scratch on relatively small medical datasets.
Key Results
ConvFormer consistently outperformed both pure CNN-based (like U-Net) and recent hybrid or pure Transformer-based models (like UNETR and CoTr).
- 3D Cardiac Segmentation (MM-WHS): ConvFormer achieved a mean Dice score of 0.925, outperforming the previous SOTA (kCBAC-Net) and significantly beating Transformer-based competitors like UNETR (0.915) and CoTr (0.911).
- Lymph Node Segmentation: It reached an F1 score of 0.916, a 1.0% improvement over the previous best method.
- Qualitative Excellence: Visual results show that ConvFormer produces much cleaner boundaries and fewer false positives compared to other models, especially in complex 3D cardiac structures.
Limitations and Future Work
While ConvFormer is highly effective, the paper notes a few areas for consideration:
- Model Complexity: With 61 million parameters, it is more efficient than some giants (like kCBAC-Net at 134M) but heavier than others (like CoTr at 42M). Balancing this complexity for real-time clinical use remains a challenge.
- Computational Cost: While the authors used depth-wise convolutions to save on computation, Transformers still inherently require more memory and time than simple CNNs.
- Future Directions: The authors suggest that the Enhanced Positional Encoding (EPE) could be further refined to improve how the model handles the specific spatial continuity found in medical volumes.
For a detailed breakdown of the 3D results, see the table below:
Summary updated