Manuscript Offprint
arXiv:2608.22619GET: Generative Embedding Translation for Medical Image Segmentation
Md Maklachur Rahman , Md Hasan Al Banna , Saraf Anjum , Mahmudul Hasan , and Tracy Hammond
Texas A&M University, College Station, TX, USA
Independent Researcher
Alfa Laval
{maklachur, mdhasanalbanna, hammond}@tamu.edu, sarafanjumeva@gmail.com, mahmudul.hasan@alfalaval.com
Abstract. Generative segmentation provides an alternative to direct pixel-wise prediction by operating on learned latent representations, but effective image-to-mask translation must preserve target structure while remaining computationally efficient. We propose Generative Embedding Translation (GET), a structured embedding-translation framework that progressively transforms image embeddings into mask embeddings within the frozen latent space of a Stable Diffusion VAE. GET uses a U-Net-style Embedding Translation Network with 1.07M trainable parameters, combining Mobile Bottleneck Convolutions, Subsampled Self-Attention, and Multi-scale Feature Enrichment for local modeling, global context, and multi-scale refinement. Across five medical segmentation datasets, GET outperforms generative, CNN, and Transformer baselines. Compared with the strongest generative baseline, GMS, GET improves average Dice and IoU by 0.93% and 1.26%, reduces HD95 by 0.81 pixels, and uses 31.41% fewer trainable parameters. Under bidirectional BUS-BUSI domain shift, GET further improves Dice and IoU by 3.51% and 3.39%, while reducing HD95 by 27.37 pixels. Our code is available at: https://github.com/maklachur/GET.
Keywords: Medical image segmentation · generative segmentation · latent embedding translation · lightweight networks
1 Introduction
Medical image segmentation is crucial for accurate diagnosis, treatment planning, and clinical decision-making. Traditional segmentation approaches predominantly use Convolutional Neural Networks (CNNs), such as U-Net [28], UNet++ [43], AULUNet [24], DeepLabV3+ [7], and nnUNet [16], which effectively capture hierarchical local features. However, CNN-based methods remain constrained in modeling long-range dependencies, which are important for segmenting complex anatomical structures and ambiguous boundaries [23].
Transformer-based models [8] address this limitation through global self-attention. Architectures such as TransUNet [6], SwinUNet [4], and UNETR [10]
M. M. Rahman et al.
improve contextual modeling by capturing long-range interactions, but their attention mechanisms can introduce substantial computational cost. Their performance can also depend on large annotated datasets, which are often difficult to obtain in medical imaging [25, 30].
Generative segmentation provides a complementary direction by operating on learned latent representations rather than relying solely on direct pixel-wise prediction. Variational Autoencoders (VAEs) [18] and Vector-Quantized VAEs (VQ-VAEs) [9] provide compact latent representations, while recent segmentation methods include diffusion-based approaches such as MedSegDiff-V2 [39] and SDSeg [19], as well as direct latent-translation approaches such as GSS [5] and GMS [12]. Although prior work demonstrates the feasibility of translating image representations into mask representations, accurate segmentation requires the translation to preserve the spatial structure of the target. The transformation must recover the target's location, extent, shape, and boundaries from image appearance while remaining robust to variations in texture, contrast, and acquisition conditions. This motivates a structured translation process that can jointly model local detail, global context, and multi-scale spatial information while keeping the trainable component compact. A detailed discussion of related work is provided in Supplementary Material Section 5.
Based on this perspective, we propose Generative Embedding Translation (GET), which formulates medical image segmentation as structured embedding translation within a frozen Stable Diffusion VAE (SD-VAE) space. The SD-VAE provides a fixed representation space for both images and masks, while a lightweight Embedding Translation Network (ETN) learns the task-specific transformation from image embeddings to mask embeddings. Rather than treating this transformation as a single mapping operation, ETN progressively translates the representation across multiple resolution stages, allowing spatial structure to be modeled and refined before the predicted mask embedding is decoded. Keeping the SD-VAE frozen further isolates the trainable segmentation component and limits the number of parameters that must be optimized.
The ETN is a five-stage U-Net-style translator that combines three complementary components. Mobile Bottleneck Convolution (MBC) provides efficient local feature extraction, Subsampled Self-Attention (SSA) captures global context at the bottleneck, and Multi-Scale Feature Enrichment (MFE) aggregates information across multiple receptive fields during decoding. Multi-stage latent reconstruction and additional L2 latent alignment constrain intermediate and final representations toward the target mask embedding, while Dice and Focal-Tversky losses directly supervise the decoded segmentation. Together, these components enable GET to preserve local structure, global organization, and multi-scale detail within a compact latent translation framework.
In summary, our main contributions are as follows:
– We develop GET, a structured embedding-translation framework that progressively maps image embeddings to mask embeddings across multiple resolutions within a frozen SD-VAE space using a compact trainable translator.

Fig. 1: Overview of the proposed framework. (a) Main pipeline: a frozen SD-VAE encodes both image (I) and mask (M) into latent features and . The lightweight ETN translates image latent to segmentation latent . The , , , and out are the segmentation latents from different stages of ETN. The and denote the segmentation latent for and out, respectively, which are then decoded to generate the final masks. (b) ETN integrates MBC, MFE, and SSA modules for latent translation. (c) MBC acts as the encoder within ETN. (d) MFE aggregates multi-scale features via parallel dilated branches in the decoder. (e) SSA operates at the bottleneck, capturing long-range context through subsampled attention.
– We design a multi-stage ETN with MBC, SSA, and MFE for efficient local modeling, global context aggregation, and multi-scale refinement, together with latent- and mask-space supervision.
– Experiments on BUS, BUSI, GlaS, HAM10000, and Kvasir–Instrument demonstrate consistent improvements over recent generative, CNN, and Transformer baselines. Compared with GMS, GET improves average Dice and IoU by 0.93% and 1.26%, reduces HD95 by 0.81 pixels, and uses 31.41% fewer trainable parameters. Under bidirectional BUS–BUSI domain shift, GET further improves Dice and IoU by 3.51% and 3.39%, while reducing HD95 by 27.37 pixels.
M. M. Rahman et al.
a frozen Stable Diffusion Variational Autoencoder (SD-VAE) encoder–decoder, where the encoder embeds images and masks into a shared semantic latent space and the decoder reconstructs masks from that space; and (2) a lightweight, trainable Embedding Translation Network (ETN) that maps image latents directly to segmentation latents. During inference, ETN predicts the segmentation latent from the input image, and the frozen SD-VAE decoder produces the final segmentation mask from this latent.
2.1 Latent Embedding Formulation
In this work, we employ the SD-VAE [27] as a frozen encoder-decoder pair to define a unified latent representation for both inputs and outputs. Given an input image and a ground-truth mask , we first form a three-channel mask by replicating across channels. Both and are then normalized to match the SD-VAE input domain, and passed through the same frozen encoder to obtain their latent embeddings:
where represent the image and mask latents, respectively, with and .
As SD-VAE is pre-trained on large-scale natural images, it provides a high-fidelity, semantically structured latent manifold that transfers well to medical imagery, enabling our generative segmentation model to train without additional backbone adaptation [5, 12].
Our ETN, denoted by , learns a direct mapping from the image latent to a predicted segmentation latent , which is decoded by the frozen SD-VAE decoder :
Here, denotes the predicted latent representation, is the three-channel mask reconstruction decoded by the frozen SD-VAE, and is a fixed projection that converts into a single-channel segmentation map. Specifically, we average the decoded channels after mask-domain normalization to obtain , which is thresholded at 0.5 during evaluation to produce the final binary mask. By operating entirely in the latent space and keeping frozen, GET substantially reduces trainable parameters and computation while leveraging the generative prior of SD-VAE for stable and structurally coherent segmentation.
2.2 Embedding Translation Network (ETN)
The ETN is a five-stage U-Net-style latent translator with four encoder-decoder stages and a central bottleneck, operating entirely in the SD-VAE latent space. Starting from the image latent , the encoder gradually expands feature channels to using MBC blocks, while the bottleneck applies SSA over the coarsest latent maps to capture global context. The decoder then symmetrically upsamples and fuses encoder features using MBC and MFE, and a final fusion layer aggregates encoder and decoder output to the predicted segmentation latent . Between ETN stages, we use average pooling for downsampling and nearest-neighbor interpolation for upsampling, while auxiliary heads use GN–SiLU– convolution to predict four-channel latents.
Mobile Bottleneck Convolution (MBC) The MBC module serves as a building block in both the encoder and decoder of ETN. It enhances feature representations with minimal computational overhead by first projecting the input tensor into a higher-dimensional space via a convolution, Group Normalization (GN), and SiLU activation. This is followed by a depthwise convolution (DWC) to capture local spatial patterns, again followed by GN and SiLU. These operations can be expressed as:
Here, each GN → SiLU pair (G S) is applied sequentially after the corresponding convolution layer. Finally, we project the output back to the original channel dimension using another convolution followed by GN, and add a residual connection with drop-path (DP) ( ) regularization to stabilize training and encourage feature reuse:
Multi-Scale Feature Enrichment (MFE) Our MFE module enhances decoder features by aggregating multi-scale context in a single, lightweight block. Given an input , it branches into three parallel depthwise convolutions with dilation rates , each followed by a pointwise convolution and SiLU:
where . Inspired by DeepLabv3+ [7], varying allows each branch to capture fine details ( ) or broader semantic information ( ). The feature maps are concatenated and processed through two convolutions with GroupNorm and SiLU activation, followed by a skip connection that adds back the input:
which ensures the combined representation of local details and long-range context before the next upsampling step.
M. M. Rahman et al.
Subsampled Self-Attention (SSA) Our SSA module integrates global context at the bottleneck by computing attention between full-resolution queries and subsampled keys/values, reducing complexity by about . Given an input , we first normalize and project it to obtain full-resolution queries:
We select the number of heads as the largest divisor of from , giving a per-head dimension . Next, we downsample spatially by a factor (see Supplementary Material Section 7.1) via average pooling to form , and normalize, then project to produce keys and values:
each in . We then reshape into multi-head tensors of shape for with , and for with , and compute scaled dot-product attention:
where , , , and . We reassemble the heads to produce from and finally project and add a residual to obtain . This reduces complexity from to , enabling efficient global-context integration.
2.3 Training Objective and Loss Function
We train the ETN to translate the image latent ( ) into the segmentation latent ( ) such that, when decoded by the frozen SD-VAE, it produces a high-quality segmentation mask. The overall training objective integrates multiple losses: for latent reconstruction, for L2 latent alignment, and for supervision in the mask space.
Latent Reconstruction Loss To supervise latent reconstruction, we apply an loss [42] between the predicted latent and the mask latent at each deep supervision (DS) head :
For auxiliary predictions at different resolutions, we resize to the prediction resolution before computing the loss. We use based on experiments (see Supplementary Material Section 7.2).
L2 Latent Alignment In addition to the multi-stage L1 reconstruction objective, we apply an L2 loss to the final predicted latent to further align it with the ground-truth mask latent:
where is selected experimentally (see Supplementary Material Section 7.4). This term complements the multi-stage L1 reconstruction objective by providing an additional distance constraint between the final predicted latent and the target mask latent.
Segmentation Loss in Mask Space We use a combination of Dice [22] and Focal-Tversky (FTV) [1] losses for mask-space supervision , where Dice loss helps to maximize overall region overlap, while standard Focal-Tversky focuses learning on hard, imbalanced pixels (see Supplementary Material Section 6.2). We define it as:
where , are the decoder generated segmentation for final output latent and auxiliary latent , respectively. is the ground-truth mask. We experimentally set (see Supplementary Material Section 7.3) for the s1 head to balance fine-structure guidance and mask consistency, enhancing boundary sharpness while minimizing noise. This combined loss enables the model to generate accurate masks even under severe class imbalance [3]. Therefore, we can summarize our total loss as:
3 Experiments and Results
3.1 Datasets, Implementation, and Evaluation
We evaluate GET on five medical segmentation datasets across different imaging modalities, following the preparation protocols of prior works [12, 13]. BUS [41] contains 163 breast ultrasound images (132 train / 31 test), while BUSI [2] includes 647 ultrasound scans (517 train / 130 test) with lesion masks under low contrast and speckle noise. GlaS [31] comprises 165 histology images (85 train / 80 test) with gland annotations. HAM10000 [33] contains 10015 dermoscopic RGB images with binary lesion masks [32] (8015 train / 2000 test). Kvasir-Instrument [17] contains 590 endoscopic frames (472 train / 118 test) annotated for surgical tools under varying illumination and occlusion. All images and masks are resized to , normalized, and augmented with flips, rotations, and jitter during training.
M. M. Rahman et al.
| AT | Model | Trainable Params (M)↓ | BUS | BUSI | ||||
|---|---|---|---|---|---|---|---|---|
| DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | |||
| C | UNet [28] | 14.03 | ||||||
| C | MultiResUNet [15] | 7.26 | ||||||
| C | ACC-UNet [14] | 16.77 | ||||||
| C | nnUNet [16] | 20.6 | ||||||
| C | EGE-UNet★ [29] | 0.05 | ||||||
| C | LB-UNet★ [40] | 0.04 | ||||||
| T | SwinUNet [4] | 31.32 | ||||||
| T | SME-SwinUNet [38] | 169.83 | ||||||
| T | UCTransNet [37] | 65.64 | ||||||
| G | MedSegDiff-V2 [39] | 129.43 | ||||||
| G | SDSeg [19] | 329.17 | ||||||
| G | GSS [5] | 49.84 | ||||||
| G | GMS [12] | 1.56 | ||||||
| G | GET (Ours) | 1.07 | ||||||
Table 1: Quantitative results on BUS and BUSI datasets. AT denotes the primary architecture type: C = CNN, T = Transformer, G = Generative. ↑ indicates higher is better, ↓ lower is better, and ★ marks models with fewer parameters than ours. All SOTA baselines are reproduced using their public code and papers, and trained and tested on the same train–test splits as our model. Results are averaged over five independent runs and reported as mean±SD. Best scores are shown in bold.
We implement GET in PyTorch and train the ETN for 800 epochs on an NVIDIA RTX 3090 Ti GPU with 24 GB VRAM and batch size 8. The SD-VAE encoder-decoder [27] remains frozen, while only the ETN is optimized using AdamW [21] with learning rate 0.002, weight decay , and cosine annealing with warm restarts [20]. Training uses mixed precision, TF32 acceleration, and an exponential moving average with . Following the evaluation protocol of prior works [12,13], we use the predefined train-test splits without a separate validation set and select the EMA checkpoint with the highest Dice on the designated test split. Thus, the designated test split also serves as a development split for checkpoint selection, while all compared baselines are evaluated under the same protocol.
We report Dice Similarity Coefficient (DSC) and Intersection over Union (IoU) in percent for overlap accuracy, and 95th percentile Hausdorff Distance (HD95) in pixels for boundary accuracy. Performance is evaluated on the designated test partitions using the same data splits across methods. Metric definitions are provided in Supplementary Material Section 6.1.
3.2 Comparison with SOTA Methods
We compare GET with CNN-based (UNet, MultiResUNet, ACC-UNet, nnUNet, EGE-UNet, and LB-UNet), Transformer-based (UCTransNet, SME-SwinUNet, and SwinUNet), and recent generative methods (MedSegDiff-V2, SDSeg, GSS, and GMS) across five benchmarks (Tables 1, 2).
On the ultrasound datasets (BUS, BUSI), GET achieves DSC scores of and , outperforming GMS by 2.19 and 1.70 percentage points, respectively, while reducing HD95 from 6.59 to 4.84 pixels on BUS and from 19.66 to 16.99 pixels on BUSI. On HAM10000, GET achieves DSC, IoU, and 9.06 pixels HD95, improving over GMS in all three metrics. On the histology and endoscopy datasets (GlaS, Kvasir–Instrument), GET achieves the best DSC and IoU, with a modest HD95 improvement on GlaS and a small trade-off on Kvasir–Instrument. Overall, GET achieves these gains with only 1.07M trainable parameters, substantially fewer than most competing methods. Additionally, we present the model's Efficiency-Accuracy Trade-off comparison in the Supplementary Material, Section 6.3.
Figure 2 presents qualitative comparisons across all five datasets, showing the ground-truth masks and predictions from representative segmentation methods.
| Model | GlaS | Kvasir-Instrument | HAM10000 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | |
| UNet | |||||||||
| MultiResUNet | |||||||||
| ACC-UNet | |||||||||
| nnUNet | |||||||||
| EGE-UNet★ | |||||||||
| LB-UNet★ | |||||||||
| SwinUNet | |||||||||
| SME-SwinUNet | |||||||||
| UCTransNet | |||||||||
| MedSegDiff-V2 | |||||||||
| SDSeg | |||||||||
| GSS | |||||||||
| GMS | |||||||||
| GET (Ours) | |||||||||
Table 2: Results on GlaS, Kvasir–Instrument, and HAM10000 datasets. All SOTA baselines are reproduced using their public code and trained/tested on the same splits as ours. Results are averaged over five runs and reported as mean±SD.
3.3 Cross-Domain Generalization
To evaluate robustness across clinical settings, we perform bidirectional cross-domain experiments between BUS and BUSI. Although both are breast ultrasound datasets, they originate from different acquisition settings, creating shifts in texture, contrast, and noise. We train on the BUS training set and test on BUSI, and vice versa (Table 3). For BUS→BUSI, GET achieves 64.63% DSC and 54.69% IoU, outperforming GMS by 2.91 percentage points in DSC. For BUSI→BUS, GET reaches 84.39% DSC and 76.38% IoU, improving over GMS by 4.11 and 6.34 percentage points, respectively, while reducing HD95 by 6.75 pixels. The consistent gains in both directions suggest that the learned embedding translation remains effective despite changes in image appearance and
M. M. Rahman et al.
| Model | BUSI → BUS | BUS → BUSI | ||||
|---|---|---|---|---|---|---|
| DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | |
| UNet | 63.20 | 51.11 | 46.50 | 53.71 | 47.81 | 98.07 |
| MultiResUNet | 61.61 | 50.25 | 53.71 | 56.24 | 50.32 | 92.40 |
| ACC-UNet | 64.71 | 52.39 | 42.08 | 47.61 | 46.68 | 136.11 |
| nnUNet | 78.33 | 67.84 | 20.90 | 59.18 | 53.75 | 88.27 |
| EGE-UNet★ | 68.90 | 56.81 | 33.94 | 54.37 | 50.39 | 106.08 |
| LB-UNet★ | 73.08 | 61.54 | 27.46 | 57.98 | 53.19 | 94.06 |
| SwinUNet | 78.38 | 67.99 | 21.29 | 57.49 | 51.76 | 90.56 |
| SME-SwinUNet | 74.68 | 63.18 | 24.01 | 58.39 | 52.90 | 89.71 |
| UCTransNet | 72.82 | 61.58 | 29.40 | 56.73 | 51.22 | 93.29 |
| MedSegDiff-V2 | 69.74 | 57.51 | 31.32 | 55.03 | 49.88 | 98.83 |
| SDSeg | 73.90 | 62.55 | 26.49 | 56.89 | 51.98 | 95.92 |
| GSS | 68.85 | 57.39 | 37.11 | 58.58 | 53.63 | 91.99 |
| GMS | 80.28 | 70.04 | 17.82 | 61.72 | 54.25 | 84.28 |
| GET (Ours) | 84.39 | 76.38 | 11.07 | 64.63 | 54.69 | 36.30 |
Table 3: Cross-domain generalization results between BUS and BUSI. BUSI→BUS denotes training on BUSI and testing on BUS, while BUS→BUSI denotes training on BUS and testing on BUSI. Best results are highlighted in bold.
| Modules | BUS | BUSI | GlaS | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| MBC | MFE | SSA | DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ |
| Baseline | 88.48 | 80.05 | 6.72 | 79.23 | 70.73 | 21.06 | 87.38 | 78.56 | 18.82 | ||
| ✓ | 89.34 | 81.26 | 6.53 | 80.27 | 71.33 | 19.43 | 87.68 | 79.24 | 17.84 | ||
| ✓ | 89.15 | 80.95 | 6.76 | 81.01 | 72.07 | 21.15 | 88.22 | 79.91 | 16.75 | ||
| ✓ | 89.27 | 81.04 | 7.11 | 80.78 | 71.95 | 20.09 | 87.96 | 79.37 | 18.54 | ||
| ✓ | ✓ | 90.01 | 82.42 | 5.71 | 81.41 | 72.17 | 19.26 | 88.61 | 80.44 | 18.30 | |
| ✓ | ✓ | 89.66 | 81.80 | 6.64 | 81.63 | 73.41 | 18.88 | 88.44 | 80.47 | 17.93 | |
| ✓ | ✓ | 89.78 | 81.99 | 5.73 | 82.22 | 73.92 | 18.60 | 88.63 | 80.52 | 16.85 | |
| ✓ | ✓ | ✓ | 90.76 | 83.48 | 4.84 | 83.03 | 74.56 | 16.99 | 89.24 | 81.67 | 15.62 |
Table 4: Ablation of MBC, MFE, and SSA on BUS, BUSI, and GlaS. √ denotes module inclusion. Baseline is a U-Net-like ETN without MBC/MFE/SSA, using standard convolutional blocks. Best results are in bold.
acquisition characteristics. These results demonstrate stronger robustness under cross-center domain shift.
3.4 Ablation Study
We conduct ablations to evaluate the main architectural components, loss terms, auxiliary supervision, and VAE selection. Additional sensitivity analyses are provided in Section 7.

Fig. 2: Qualitative comparison on BUS, BUSI, HAM10000, GlaS, and Kvasir-Instrument. We show the input image, ground-truth mask, and predictions from representative segmentation methods across the five datasets.
Effect of Core Architectural Modules We conduct a set of experiments to evaluate the impact of our MBC, MFE, and SSA modules on segmentation performance, as shown in Table 4. When we use these modules independently, each generally improves segmentation quality over the baseline. Specifically, MBC alone increases BUS DSC from 88.48% to 89.34%, while decreasing HD95 from 6.72 to 6.53 pixels. Adding MFE raises BUSI DSC to 81.01% and lowers GlaS HD95 to 16.75 pixels. SSA alone improves IoU across datasets. Importantly, the full combination (MBC + MFE + SSA) achieves the best overall performance, with the highest DSCs of 90.76% (BUS), 83.03% (BUSI), and 89.24% (GlaS), along with the lowest HD95 values of 4.84, 16.99, and 15.62 pixels, respectively.
Effect of Dilation Rate d in MFE Module We evaluate how dilation rates affect the Multi-scale Feature Enrichment (MFE) module by comparing two- and three-branch configurations in Table 5. The three-branch designs consistently outperform their two-branch counterparts, confirming the benefit of combining a broader range of receptive fields. Among the two-branch variants, d = 6, 12 performs best, reaching 90.07% DSC on BUS and 88.82% on GlaS. Our best overall configuration, d = 1, 6, 12, combines fine, intermediate, and large receptive fields, achieving 90.76% DSC and 4.84 HD95 on BUS, and 89.24% DSC and
M. M. Rahman et al.
15.62 HD95 on GlaS. These results show that complementary dilation scales improve both segmentation accuracy and boundary localization.
| Dilation Rates (d) | BUS | GlaS | ||||
|---|---|---|---|---|---|---|
| DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | |
| Two-branch | ||||||
| d={1,2} | 89.20 | 81.26 | 6.21 | 88.21 | 78.89 | 18.83 |
| d={2,4} | 89.58 | 81.60 | 5.97 | 88.57 | 79.50 | 18.57 |
| d={1,6} | 89.82 | 81.52 | 5.38 | 88.80 | 79.83 | 18.00 |
| d={6,12} | 90.07 | 81.87 | 5.68 | 88.82 | 80.02 | 17.50 |
| Three-branch | ||||||
| d={1,3,9} | 90.66 | 83.29 | 5.31 | 89.08 | 80.34 | 15.98 |
| d={2,4,6} | 90.55 | 83.15 | 5.65 | 89.10 | 80.37 | 16.03 |
| d={1,6,12} | 90.76 | 83.48 | 4.84 | 89.24 | 81.67 | 15.62 |
| d={1,8,12} | 90.27 | 82.62 | 5.43 | 88.87 | 80.05 | 16.97 |
| d={2,8,16} | 90.01 | 81.83 | 5.86 | 88.88 | 80.03 | 17.60 |
Table 5: Effect of dilation rate configurations (d) in the MFE module across BUS and GlaS datasets. Results are averaged over five runs.
Effect of Different Losses We evaluate the contribution of each loss component by adding the baseline mask-space objective with for latent reconstruction and for L2 latent alignment (Table 6). The baseline achieves DSC and 8.62 px HD95 on BUS, showing strong region overlap but coarse boundaries. Adding improves DSC to and reduces HD95 to 6.40 px, indicating better latent reconstruction and boundary accuracy. Adding to the mask-space objective achieves DSC and 8.07 px HD95, providing a smaller but consistent gain. Using without mask-space supervision reduces DSC to , highlighting the importance of segmentation guidance. The full objective achieves the best overall performance, confirming the benefit of jointly optimizing latent- and mask-space losses.
Effect of Auxiliary Decoders at Different Stages To evaluate auxiliary decoding, we attach the frozen SD-VAE decoder at three ETN stages: coarse , medium , and fine , and assess both single- and multi-decoder configurations. Each auxiliary head predicts a segmentation latent, which is upsampled to the full latent resolution and decoded by the shared frozen SD-VAE decoder.
As shown in Table 7, the fine-stage decoder provides the best overall trade-off. Without auxiliary decoders, GET achieves DSC / 6.99 px HD95 on BUS and DSC / 17.14 px HD95 on GlaS. Adding yields the strongest boundary improvement, reducing HD95 to 4.84 px on BUS and 15.62 px on GlaS while also improving DSC. Although gives a slightly
| Loss | BUS | GlaS | |||||||
|---|---|---|---|---|---|---|---|---|---|
| DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | ||||
| ✓ | ✓ | 90.09 | 82.29 | 8.62 | 87.05 | 78.40 | 20.43 | ||
| ✓ | ✓ | ✓ | 90.48 | 83.09 | 6.40 | 88.83 | 80.92 | 17.78 | |
| ✓ | ✓ | ✓ | 90.38 | 82.81 | 8.07 | 88.05 | 79.96 | 17.81 | |
| ✓ | ✓ | 89.60 | 81.64 | 6.34 | 87.79 | 79.46 | 18.24 | ||
| ✓ | ✓ | ✓ | 90.18 | 82.58 | 5.30 | 88.70 | 80.87 | 17.11 | |
| ✓ | ✓ | ✓ | 89.97 | 82.27 | 5.27 | 88.24 | 80.22 | 18.05 | |
| ✓ | ✓ | ✓ | ✓ | 90.76 | 83.48 | 4.84 | 89.24 | 81.67 | 15.62 |
Table 6: Ablation study of losses on BUS and GlaS. √ indicates the inclusion of the loss term. Bold highlights the best results.
| Aux Decoder(s) | BUS | GlaS | ||||
|---|---|---|---|---|---|---|
| DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | |
| None | 88.51 | 79.93 | 6.99 | 89.07 | 81.35 | 17.14 |
| s1 | 90.76 | 83.48 | 4.84 | 89.24 | 81.67 | 15.62 |
| s2 | 90.28 | 82.60 | 5.26 | 89.18 | 81.45 | 17.41 |
| s3 | 89.79 | 82.01 | 5.61 | 88.93 | 80.96 | 17.14 |
| s1+s2 | 90.55 | 83.11 | 5.11 | 89.27 | 81.63 | 16.43 |
| s1+s3 | 89.79 | 81.97 | 5.77 | 88.56 | 80.42 | 18.28 |
| s2+s3 | 89.74 | 81.85 | 6.06 | 88.83 | 81.10 | 17.44 |
| s1+s2+s3 | 89.78 | 81.99 | 5.73 | 88.67 | 80.99 | 17.09 |
Table 7: Effect of auxiliary decoder heads with the main output decoder head out at different stages on BUS and GlaS datasets. Best results are in bold.
higher DSC on GlaS, the single head provides better boundary accuracy with less redundancy. In contrast, and provide smaller or inconsistent gains, while multi-head configurations often introduce additional supervision noise. We therefore adopt a single auxiliary decoder alongside the main output head.
| Dataset | Dice↑ | IoU↑ | HD95↓ | |||
|---|---|---|---|---|---|---|
| SD | VQ | SD | VQ | SD | VQ | |
| BUSI [2] | 83.03 | 81.16 | 74.56 | 72.66 | 16.99 | 21.30 |
| HAM10000 [33] | 94.23 | 93.09 | 89.95 | 88.19 | 9.06 | 12.48 |
| Kvasir-Instr. [17] | 94.55 | 92.97 | 90.63 | 89.11 | 8.45 | 10.85 |
Table 8: Performance comparison on three datasets using different pre-trained VAE models. SD = SD-VAE and VQ = VQ-VAE.
M. M. Rahman et al.
Effect of Using Different VAE Models We compare two VAEs to identify the latent space best suited for GET. VQ-VAE [36] represents inputs using discrete vector-quantized codes, whereas SD-VAE [27] produces continuous, smoother embeddings. Table 8 shows that SD-VAE consistently achieves higher Dice and IoU and lower HD95 across all datasets. This suggests that its latent space better preserves coherent and stable representations for medical image segmentation. We therefore use SD-VAE throughout our framework.
3.5 Computational Complexity and Efficiency
We compare end-to-end inference cost in Table 9. For GET, GFLOPs and throughput include the frozen SD-VAE encoder, ETN, and decoder. GET requires 341.14 GFLOPs and achieves 28.07 samples/s, compared with 343.85 GFLOPs and 27.68 samples/s for GMS. Relative to MedSegDiff-V2, GET reduces GFLOPs by and achieves approximately higher throughput. GET also uses only 1.07M trainable parameters, compared with 1.56M for GMS, 49.84M for GSS, 129.43M for MedSegDiff-V2, and 329.17M for SDSeg.
| Model | GFLOPs↓ | Throughput (samples/s)↑ | Speedup (×)↑ |
|---|---|---|---|
| MedSegDiff-V2 [39] | 972.66 | 0.62 | 1.0× |
| SDSeg [19] | 655.34 | 15.04 | 24.3× |
| GSS [5] | 476.28 | 16.24 | 26.2× |
| GMS [12] | 343.85 | 27.68 | 44.7× |
| GET (Ours) | 341.14 | 28.07 | 45.3× |
Table 9: Inference complexity of generative segmentation models at (batch=1) on an RTX 3090 Ti. GFLOPs are computed using THOP (MACs counted as FLOPs). Speedup () denotes throughput relative to MedSegDiff-V2. Lower GFLOPs and higher throughput indicate better efficiency.
4 Conclusion
We presented GET, a structured embedding-translation framework for medical image segmentation within a frozen SD-VAE space. Its multi-stage ETN combines MBC, SSA, and MFE with latent- and mask-space supervision for efficient local, global, and multi-scale modeling. Across five benchmarks, GET consistently outperforms generative, CNN, and Transformer baselines. Compared with GMS, GET improves average Dice and IoU by and , reduces HD95 by 0.81 pixels, and uses fewer trainable parameters. Under BUS-BUSI domain shift, it further improves Dice and IoU by and and reduces HD95 by 27.37 pixels. GET also reduces GFLOPs by while achieving approximately higher throughput than MedSegDiff-V2. These results demonstrate that structured embedding translation is accurate, robust, and efficient.
References
-
Abraham, N., Khan, N.M.: A novel focal tversky loss function with improved attention u-net for lesion segmentation. In: 2019 IEEE 16th international symposium on biomedical imaging (ISBI 2019). pp. 683–687. IEEE (2019)
-
Al-Dhabyani, W., Gomaa, M., Khaled, H., Fahmy, A.: Dataset of breast ultrasound images. Data in brief 28, 104863 (2020)
-
Azad, R., Heidary, M., Yilmaz, K., Hüttemann, M., Karimijafarbigloo, S., Wu, Y., Schmeink, A., Merhof, D.: Loss functions in the era of semantic segmentation: A survey and outlook. arXiv preprint arXiv:2312.05391 (2023)
-
Cao, H., Wang, Y., Chen, J., Jiang, D., Zhang, X., Tian, Q., Wang, M.: Swin-unet: Unet-like pure transformer for medical image segmentation. In: European conference on computer vision. pp. 205–218. Springer (2022)
-
Chen, J., Lu, J., Zhu, X., Zhang, L.: Generative semantic segmentation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. pp. 7111–7120 (2023)
-
Chen, J., Lu, Y., Yu, Q., Luo, X., Adeli, E., Wang, Y., Lu, L., Yuille, A.L., Zhou, Y.: Transunet: Transformers make strong encoders for medical image segmentation. arXiv preprint arXiv:2102.04306 (2021)
-
Chen, L., Zhu, Y., Papandreou, G., Schroff, F., Adam, H.: Encoder-decoder with atrous separable convolution for semantic image segmentation. In: European Conference on Computer Vision (ECCV) (2018)
-
Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., et al.: An image is worth words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929 (2020)
-
Esser, P., Rombach, R., Ommer, B.: Taming transformers for high-resolution image synthesis. In: IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2021)
-
Hatamizadeh, A., Tang, Y., Nath, V., Yang, D., Myronenko, A., Landman, B., Roth, H.R., Xu, D.: Unetr: Transformers for 3d medical image segmentation. In: Proceedings of the IEEE/CVF winter conference on applications of computer vision. pp. 574–584 (2022)
-
Huang, X., Deng, Z., Li, D., Yuan, X., Fu, Y.: Missformer: An effective transformer for 2d medical image segmentation. IEEE transactions on medical imaging 42(5), 1484–1494 (2022)
-
Huo, J., Ouyang, X., Ourselin, S., Sparks, R.: Generative medical segmentation. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 39, pp. 3851–3859 (2025)
-
Huo, J., Xiao, R., Zheng, H., Liu, Y., Ourselin, S., Sparks, R.: Matchseg: Towards better segmentation via reference image matching. In: 2024 IEEE International Conference on Bioinformatics and Biomedicine (BIBM). pp. 2068–2073. IEEE (2024)
-
Ibtehaz, N., Kihara, D.: Acc-unet: A completely convolutional unet model for the 2020s. In: International conference on medical image computing and computer-assisted intervention. pp. 692–702. Springer (2023)
-
Ibtehaz, N., Rahman, M.S.: Multiresunet: Rethinking the u-net architecture for multimodal biomedical image segmentation. Neural networks 121, 74–87 (2020)
-
Isensee, F., Jaeger, P.F., Kohl, S.A., Petersen, J., Maier-Hein, K.H.: nnu-net: a self-configuring method for deep learning-based biomedical image segmentation. Nature methods 18(2), 203–211 (2021)
M. M. Rahman et al.
-
Jha, D., Ali, S., Emanuelsen, K., Hicks, S.A., Thambawita, V., Garcia-Ceja, E., Riegler, M.A., de Lange, T., Schmidt, P.T., Johansen, H.D., et al.: Kvasir-instrument: Diagnostic and therapeutic tool segmentation dataset in gastrointestinal endoscopy. In: MultiMedia Modeling: 27th International Conference, MMM 2021, Prague, Czech Republic, June 22–24, 2021, Proceedings, Part II 27. pp. 218–229. Springer (2021)
-
Kingma, D.P., Welling, M., et al.: Auto-encoding variational bayes (2013)
-
Lin, T., Chen, Z., Yan, Z., Yu, W., Zheng, F.: Stable diffusion segmentation for biomedical images with single-step reverse process. In: International Conference on Medical Image Computing and Computer-Assisted Intervention. pp. 656–666. Springer (2024)
-
Loshchilov, I., Hutter, F.: Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983 (2016)
-
Loshchilov, I., Hutter, F.: Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101 (2017)
-
Milletari, F., Navab, N., Ahmadi, S.A.: V-net: Fully convolutional neural networks for volumetric medical image segmentation. In: 2016 fourth international conference on 3D vision (3DV). pp. 565–571. IEEE (2016)
-
Oktay, O., Schlemper, J., Folgoc, L.L., Lee, M., Heinrich, M., Misawa, K., Mori, K., McDonagh, S., Hammerla, N.Y., Kainz, B., et al.: Attention u-net: Learning where to look for the pancreas. arXiv preprint arXiv:1804.03999 (2018)
-
Rahman, M.M., Jung, S.K., Hammond, T.: Aulunet: An adaptive ultra-lightweight u-net framework for efficient skin lesion segmentation in resource-constrained environments. In: 36th British Machine Vision Conference 2025, BMVC 2025, Sheffield, UK. BMVA (2025)
-
Rahman, M.M., Jung, S.K., Hammond, T.: Mambaliteunet: Cross-gated adaptive feature fusion for robust skin lesion segmentation. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 8556–8565 (June 2026)
-
Rahman, M.M., Tutul, A.A., Nath, A., Laishram, L., Jung, S.K., Hammond, T.: Mamba in vision: A comprehensive survey of techniques and applications. arXiv preprint arXiv:2410.03105 (2024)
-
Rombach, R., Blattmann, A., Lorenz, D., Esser, P., Ommer, B.: High-resolution image synthesis with latent diffusion models. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. pp. 10684–10695 (2022)
-
Ronneberger, O., Fischer, P., Brox, T.: U-net: Convolutional networks for biomedical image segmentation. In: International Conference on Medical image computing and computer-assisted intervention. pp. 234–241. Springer (2015)
-
Ruan, J., Xie, M., Gao, J., Liu, T., Fu, Y.: Ege-unet: an efficient group enhanced unet for skin lesion segmentation. In: International Conference on Medical Image Computing and Computer-Assisted Intervention. pp. 481–490. Springer (2023)
-
Shamshad, F., Khan, S., Zamir, S.W., Khan, M.H., Hayat, M., Khan, F.S., Fu, H.: Transformers in medical imaging: A survey. arXiv:2201.09873 (2022)
-
Sirinukunwattana, K., Pluim, J.P., Chen, H., Qi, X., Heng, P.A., Guo, Y.B., Wang, L.Y., Matuszewski, B.J., Bruni, E., Sanchez, U., et al.: Gland segmentation in colon histology images: The glas challenge contest. Medical image analysis 35, 489–502 (2017)
-
Tschandl, P.: Ham10000 lesion segmentations. https://www.kaggle.com/datasets/tschandl/ham10000-lesion-segmentations (2018), binary segmentation masks for all HAM10000 images
-
Tschandl, P., Rosendahl, C., Kittler, H.: The ham10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions. Scientific data 5(1), 1–9 (2018)
-
Vahdat, A., Kautz, J.: Nvae: A deep hierarchical variational autoencoder. In: Advances in Neural Information Processing Systems (NeurIPS) (2020)
-
Valanarasu, J.M.J., Oza, P., Hacihaliloglu, I., Patel, V.M.: Medical transformer: Gated axial-attention for medical image segmentation. In: International conference on medical image computing and computer-assisted intervention. pp. 36–46. Springer (2021)
-
Van Den Oord, A., Vinyals, O., et al.: Neural discrete representation learning. Advances in neural information processing systems 30 (2017)
-
Wang, H., Cao, P., Wang, J., Zaiane, O.R.: Utransnet: rethinking the skip connections in u-net from a channel-wise perspective with transformer. In: Proceedings of the AAAI conference on artificial intelligence. vol. 36, pp. 2441–2449 (2022)
-
Wang, Z., Min, X., Shi, F., Jin, R., Nawrin, S.S., Yu, I., Nagatomi, R.: Smeswin unet: Merging cnn and transformer for medical image segmentation. In: International Conference on Medical Image Computing and Computer-Assisted Intervention. pp. 517–526. Springer (2022)
-
Wu, J., Ji, W., Fu, H., Xu, M., Jin, Y., Xu, Y.: Medsegdiff-v2: Diffusion-based medical image segmentation with transformer. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 38, pp. 6030–6038 (2024)
-
Xu, J., Tong, L.: Lb-unet: A lightweight boundary-assisted unet for skin lesion segmentation. In: International Conference on Medical Image Computing and Computer-Assisted Intervention. pp. 361–371. Springer (2024)
-
Yap, M.H., Pons, G., Marti, J., Ganau, S., Sentis, M., Zwiggelaar, R., Davison, A.K., Marti, R.: Automated breast ultrasound lesions detection using convolutional neural networks. IEEE journal of biomedical and health informatics 22(4), 1218–1226 (2017)
-
Zhao, H., Gallo, O., Frosio, I., Kautz, J.: Loss functions for image restoration with neural networks. IEEE Transactions on computational imaging 3(1), 47–57 (2016)
-
Zhou, Z., Rahman Siddiquee, M.M., Tajbakhsh, N., Liang, J.: Unet++: A nested u-net architecture for medical image segmentation. In: Deep learning in medical image analysis and multimodal learning for clinical decision support, pp. 3–11. Springer (2018)
Supplementary Material
In this Supplementary Material, we provide additional details on related work, evaluation metrics, and extensive ablation studies to support our architectural and design choices. We also present an efficiency–accuracy ranking plot that further demonstrates the superiority of our proposed Generative Embedding Translation (GET) framework over existing state-of-the-art (SOTA) methods.
5 Related Work
5.1 Convolution-Based Segmentation
Convolutional architectures remain central to medical image segmentation. U-Net [28] introduced the encoder–decoder design with skip connections, inspiring variants such as UNet++ [43] with dense skip pathways and MultiResUNet [15] with multi-resolution filters. Attention U-Net [23] added attention gates to emphasize target regions, while ACC-UNet [14] and nnU-Net [16] improved hierarchical feature aggregation and automated configuration. Lightweight designs such as AULUNet [24], EGE-UNet [29], and LB-UNet [40] reduce computation while preserving accuracy. Despite their popularity, CNNs rely on local receptive fields, which limit their ability to capture global structure that is often crucial for complex or ambiguous anatomy.
5.2 Transformer-Based Segmentation
Transformers address this limitation through global self-attention [8]. Hybrid models such as TransUNet [6] and MedT [35] combine CNN encoders with transformer bottlenecks to capture both local and global dependencies. Fully transformer-based designs, including SwinUNet [4], MISSFormer [11], and UNETR [10], stack hierarchical transformer blocks with windowed attention to maintain large receptive fields at moderate cost. These methods improve long-range reasoning but still require high computational overhead due to quadratic (or near-quadratic) attention and often require large annotated datasets, which makes deployment difficult in data- and resource-limited clinical settings [12,25,30]. These limitations motivate exploring alternatives [5,12,26] that leverage rich semantic priors without adding the computational burden of heavy transformer backbones.
5.3 Generative Models for Segmentation
Generative models provide latent semantic priors that can enhance robustness and data efficiency. VAEs [18, 34] and VQ-VAEs [9, 36] learn structured latent spaces that support downstream segmentation by providing smoother and more semantically organized representations than raw pixels. Diffusion-based methods
M. M. Rahman et al.
such as MedSegDiff-V2 [39] and SDSeg [19] further leverage strong generative priors and achieve high-quality masks through iterative denoising, but they are computationally expensive and slow at inference. Latent-space approaches such as GSS [5] and GMS [12] avoid iterative denoising by directly operating on pretrained latent representations. GMS maps image latents to mask latents using a pretrained VAE, demonstrating the feasibility of direct image-to-mask latent translation. GET operates within this broader latent-translation paradigm but focuses on a structured, multi-stage transformation. Its ETN combines efficient local modeling, global context aggregation, and multi-scale refinement, together with latent- and mask-space supervision, to preserve spatial structure while keeping the trainable component compact.
6 Experiments and Results
This section extends our “Experiments and Results Section” with evaluation details, results comparison, and additional experiments.
6.1 Evaluation Metrics
We evaluate segmentation performance using the Dice Similarity Coefficient (DSC), Intersection over Union (IoU), and the 95th-percentile Hausdorff Distance (HD95) to measure the overall segmentation performance of the models on all datasets. These metrics collectively evaluate overlap (DSC), spatial accuracy (IoU), and boundary precision (HD95). Together, they offer a comprehensive evaluation of segmentation quality. The metrics are defined as:
(16)
where and denote the sets of boundary points of the ground-truth and generated segmentation masks, measures the Euclidean distance between boundary points, and denotes the 95th percentile over a set of distances. HD95 measures boundary alignment accuracy as the 95th percentile of distances between points on the predicted and ground-truth boundaries, which makes it robust to outliers.
6.2 Training Loss
For training, we optimize the hybrid objective:
Here, the latent reconstruction term and the L2 latent alignment term are already defined in Eqs. 10 and 11, respectively, in the main paper. The mask-space supervision is given in Eq. 12. For completeness, we restate the overlap-based losses (Dice loss and Focal Tversky loss ) that form . and are used to address class imbalance and sharpen boundary predictions. We define them as:
where prevents division by zero, and standard hyperparameters , , and balance sensitivity to false positives and negatives while focusing on hard examples [1], and and denote the ground-truth and generated segmentation masks.
6.3 Model Efficiency-Accuracy Trade-off
To evaluate the trade-off between segmentation accuracy and model complexity, we present a comparative ranking plot in Figure 3, which visualizes the relationship between trainable parameters and segmentation performance. Specifically, we plot the average Dice Similarity Coefficient (DSC), Intersection over Union (IoU), and 95th percentile Hausdorff Distance (HD95) against the number of trainable parameters on a log scale, aggregated across five benchmark datasets: BUS [41], BUSI [2], GlaS [31], HAM10000 [33], and Kvasir–Instrument [17].
Models positioned closer to the top-left regions in the DSC and IoU plots and the bottom-left region in the HD95 plot are considered better performers, as they provide high segmentation accuracy with low model complexity. As shown in Figure 3, our GET model consistently outperforms recent state-of-the-art approaches, including CNN-, Transformer-, and diffusion-based generative methods. GET achieves superior DSC and IoU scores and lower HD95 while significantly reducing parameter overhead. Therefore, GET offers a strong balance between representational power and efficiency, making it well-suited for medical image segmentation scenarios where both precision and lightweight design are critical.
M. M. Rahman et al.

Fig. 3: Comparison of segmentation performance versus trainable parameter count across SOTA methods, averaged over five medical imaging datasets: BUS, BUSI, GlaS, HAM10000, and Kvasir–Instrument. (a) Trainable parameters vs. average DSC score. (b) Trainable parameters vs. average IoU score. (c) Trainable parameters vs. average HD95 score. Higher DSC and IoU ( ) indicate better overlap accuracy, while lower HD95 ( ) reflects better boundary precision. Blue circles denote CNN/Transformer-based models, and orange squares denote generative models. GET (Ours) achieves a favorable efficiency–accuracy trade-off, with top-tier DSC, IoU, and HD95 performance using substantially fewer trainable parameters than existing SOTA methods.
| SSA(r) | BUS | GlaS | ||||
|---|---|---|---|---|---|---|
| DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | |
| 1 | 90.40 | 82.89 | 5.19 | 89.03 | 81.27 | 16.42 |
| 2 | 90.76 | 83.48 | 4.84 | 89.24 | 81.67 | 15.62 |
| 4 | 88.72 | 80.53 | 6.45 | 87.63 | 79.44 | 18.18 |
Table 10: Effect of subsampling factor in the SSA module on BUS and GlaS datasets. A moderate setting () yields the best trade-off between segmentation accuracy (DSC and IoU) and boundary precision (HD95). Results are averaged over five runs; best values are in bold. ↑ indicates higher is better, ↓ lower is better.
7 Additional Ablation Study
To further demonstrate the robustness and sensitivity of our GET framework, we conduct extensive ablation studies on critical parameters and architectural choices using two datasets: BUS [41] (ultrasound) and GlaS [31] (histology). These experiments validate the individual contribution of each component to the model's overall performance.
7.1 Effect of Subsampling Factor in SSA Module
We evaluate the impact of subsampling factor in our Subsampled Self-Attention (SSA) module. Table 10 presents our experimental results. From the table, we can see that the moderate subsampling factor achieves the best balance, gaining peak performance on both datasets (90.76% DSC on BUS and
| DS Weights () | BUS | GlaS | ||||
|---|---|---|---|---|---|---|
| DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | |
| Uniform weights:(1.0, 1.0, 1.0, 1.0) | 86.42 | 78.72 | 11.62 | 86.37 | 77.37 | 21.82 |
| Linear weights:(1.0, 0.75, 0.5, 0.25) | 89.22 | 81.43 | 10.65 | 88.40 | 80.48 | 16.79 |
| Monotonic weights:(1.0, 0.4, 0.3, 0.2) | 90.76 | 83.48 | 4.84 | 89.24 | 81.67 | 15.62 |
Table 11: Effect of deep supervision weighting strategies () on auxiliary heads for loss across BUS and GlaS datasets. Results are averaged over five runs. indicates higher is better, lower is better. Best values are highlighted in bold.
89.24% DSC on GlaS) and lowest HD95 values. In contrast, excessive subsampling () considerably reduces accuracy due to lost spatial detail, while no subsampling () introduces additional computational complexity without improved results. Thus, provides an optimal efficiency-accuracy trade-off.
7.2 Effect of Deep Supervision (DS) Weights on Auxiliary Heads for Loss
We next examine the deep supervision weighting strategy applied to multiple auxiliary heads for loss (Eq. 10 in the manuscript). We compare uniform, linear, and monotonically decaying weighting schemes to identify the best approach.
Our results are summarized in Table 11. We found that monotonically decaying weights consistently outperform both uniform and linear approaches, achieving the highest DSC (90.76% on BUS, 89.24% on GlaS) and lowest HD95. This indicates that the monotonic scheme effectively emphasizes fine-scale features critical for boundary accuracy while still benefiting from coarse-to-fine guidance, validating our chosen weighting strategy.
7.3 Effect of Auxiliary Head Weight in the Loss
We analyze the influence of the auxiliary-head loss weight in (in manuscript: Eq. 12), which determines how strongly the intermediate supervision from decoder stage s1 guides segmentation.
Our results in Table 12 show that achieves the best balance: it yields the highest DSC (90.76% on BUS, 89.24% on GlaS) and the lowest boundary errors (HD95 of 4.84 and 15.62). Smaller weights () provide insufficient guidance, while larger ones () introduce conflicting gradients that degrade accuracy. Thus, offers the optimal trade-off between intermediate supervision strength and final segmentation quality.
M. M. Rahman et al.
| λ | BUS | GlaS | ||||
|---|---|---|---|---|---|---|
| DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | |
| 0.1 | 89.83 | 81.55 | 7.15 | 87.86 | 79.51 | 17.26 |
| 0.3 | 90.12 | 82.41 | 5.94 | 88.15 | 80.00 | 17.49 |
| 0.4 | 90.40 | 82.89 | 5.19 | 88.63 | 80.57 | 18.50 |
| 0.5 | 90.76 | 83.48 | 4.84 | 89.24 | 81.67 | 15.62 |
| 0.6 | 90.28 | 82.73 | 5.76 | 89.06 | 81.12 | 16.04 |
| 0.7 | 90.02 | 82.33 | 5.90 | 88.43 | 80.56 | 18.27 |
Table 12: Effect of auxiliary head weight ( ) in loss across BUS and GlaS datasets. The weight controls the contribution of intermediate supervision from the auxiliary decoder head. Optimal performance is achieved at , balancing guidance strength and segmentation accuracy. indicates higher is better, lower is better. Results are averaged over five runs; best values are highlighted in bold.
| BUS | GlaS | |||||
|---|---|---|---|---|---|---|
| DSC↑ | IoU↑ | HD95↓ | DSC↑ | IoU↑ | HD95↓ | |
| 0.001 | 88.52 | 80.34 | 8.94 | 88.37 | 80.19 | 17.89 |
| 0.005 | 89.25 | 81.41 | 7.78 | 88.94 | 80.97 | 16.38 |
| 0.01 | 90.76 | 83.48 | 4.84 | 89.24 | 81.67 | 15.62 |
| 0.02 | 89.02 | 81.04 | 6.94 | 88.72 | 80.89 | 17.06 |
| 0.05 | 88.13 | 79.93 | 9.05 | 88.21 | 79.97 | 17.14 |
| 0.1 | 87.44 | 78.72 | 10.40 | 87.75 | 79.44 | 18.05 |
Table 13: Effect of the L2 latent alignment weight in across BUS and GlaS. The best performance is obtained at . Results are averaged over five runs; best values are highlighted in bold. indicates higher is better and lower is better.
7.4 Effect of L2 Latent Alignment Weight in the Loss
Lastly, we study the effect of the L2 latent alignment weight in (Eq. 11). Table 13 shows that provides the best overall performance, achieving DSC on BUS and DSC on GlaS, with HD95 values of 4.84 and 15.62 pixels, respectively. Lower or higher weights result in weaker segmentation performance, indicating that a moderate L2 alignment constraint provides the best balance between latent-space supervision and segmentation accuracy.