NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

LegoNet: Alternating Model Blocks for Medical Image Segmentation

Ikboljon Sobirov, Cheng Xie, Muhammad Siddique, Parijat Patel, Kenneth Chan, Thomas Halborg, Christos Kotanidis, Zarqiash Fatima, Henry West, Keith Channon, Stefan Neubauer, Charalambos Antoniades, Mohammad Yaqub · OpenReview

Abstract

Since the emergence of convolutional neural networks (CNNs), and later vision transformers (ViTs), the common paradigm for model development has always been using a set of identical block types with varying parameters/hyper-parameters. To leverage the benefits of different architectural designs (e.g. CNNs and ViTs), we propose to alternate structurally different types of blocks to generate a new architecture, mimicking how Lego blocks can be assembled together. Using two CNN-based and one SwinViT-based blocks, we investigate three variations to the so-called LegoNet that applies the new concept of block alternation for the segmentation task in medical imaging. We also study a new clinical problem which has not been investigated before, namely the right internal mammary artery (RIMA) and perivascular space segmentation from computed tomography angiography (CTA) which has demonstrated a prognostic value to major cardiovascular outcomes. We compare the model performance against popular CNN and ViT architectures using two large datasets (e.g. achieving 0.749 dice similarity coefficient (DSC) on the larger dataset). We evaluate the performance of the model on three external testing cohorts as well, where an expert clinician made corrections to the model segmented results (DSC>0.90 for the three cohorts). To assess our proposed model for suitability in clinical use, we perform intra- and inter-observer variability analysis. Finally, we investigate a joint self-supervised learning approach to assess its impact on model performance. The code and the pretrained model weights will be available upon acceptance.

Introduction

In deep learning, most segmentation architectures, such as U-Net or Swin-UNETR, are "homogeneous," utilizing the same type of building block throughout the entire encoder. However, different architectures possess distinct strengths: Convolutional Neural Networks (CNNs) excel at capturing local textures and patterns, while Vision Transformers (ViTs) are superior at modeling long-range global dependencies.

This paper introduces LegoNet, which addresses the challenging clinical task of segmenting the internal mammary artery (IMA), the aorta, and their surrounding Perivascular Adipose Tissue (PVAT) from CT scans. PVAT is a critical biomarker for predicting cardiovascular risk, but its small, elongated structure makes it difficult for traditional homogeneous models to capture accurately.

Methods

The core innovation of LegoNet is a U-shaped framework that alternates between structurally distinct blocks in its encoder. Three specific block types are utilized:

  1. SE Block (CNN-based): Employs 3D convolutions with a "Squeeze-and-Excitation" module for adaptive feature channel weighting.
  2. Swin Block (ViT-based): Uses shifted windows for self-attention to capture global relationships.
  3. UX Block (Large-kernel CNN): A modern convolutional block with 7x7x7 depth-wise convolutions that mimics Transformer structures.
Internal structure of the SE, Swin, and UX blocks used as building components in LegoNet.

By alternating these blocks, LegoNet leverages the complementary inductive biases of both CNNs and ViTs. The authors investigated three specific configurations:

  • LegoNet-1: Alternates SE and UX blocks.
  • LegoNet-2: Alternates Swin and SE blocks.
  • LegoNet-3: Alternates Swin and UX blocks.

The overall architecture follows a hierarchical U-Net style, as shown below.

The LegoNet U-shaped architecture, illustrating the alternating block strategy in the encoder and the corresponding feature map dimensions.

The study utilizes a multi-center dataset including the ORFAN study (155 patients), a U.S. external cohort (712 scans), and the public ASOCA dataset. Additionally, an Iterative Learning strategy was employed, where clinician-corrected predictions were used to mature the model training pool.

Results

LegoNet-2 (Swin + SE alternation) achieved a Dice Similarity Coefficient (DSC) of 0.749 on the IMA+PVAT task, outperforming SwinUNETR (0.713) and SegResNet (0.732). Notably, LegoNet-2 achieved this while using ~45% fewer parameters than UNETR (50.7M vs 92.8M). On the aorta segmentation task, LegoNet-1 reached a DSC of 0.939. The model also demonstrated high generalizability on the public ASOCA dataset with a DSC of 0.961. Statistical analysis confirmed these improvements were significant ($p < 0.001$).

Discussion and Conclusion

The "Lego" approach of alternating heterogeneous blocks prevents over-specialization in either local or global features, leading to more robust anatomical representations. While more computationally intensive than basic CNNs, LegoNet offers a significant efficiency advantage over pure Transformer models. Future work will explore the integration of newer architectures, such as Mamba-based blocks, and validation across a broader range of medical imaging tasks.

Summary updated

BibTeX
@inproceedings{sobirov2023legonet,
  author = {Ikboljon Sobirov and Cheng Xie and Muhammad Siddique and Parijat Patel and Kenneth Chan and Thomas Halborg and Christos Kotanidis and Zarqiash Fatima and Henry West and Keith Channon and Stefan Neubauer and Charalambos Antoniades and Mohammad Yaqub},
  title = {{LegoNet: Alternating Model Blocks for Medical Image Segmentation}},
  booktitle = {Miua},
  year = {2023},
}
Figure