Manuscript Offprint
arXiv:2610.25074MoWE: Spatially Adaptive Mixture-of-Wavelet-Experts Pooling for Ultrasound Lesion Segmentation
Abstract
We present Mixture-of-Wavelet-Experts (MoWE), a spatially adaptive routing mechanism that replaces max-pooling and strided convolutions in U-Net architectures for ultrasound lesion segmentation. Standard pooling operations suppress high-frequency spatial details, including potential boundary cues in speckled regions. Recent frequency-domain methods preserve some of these details, but a single wavelet family applies the same spectral bias across the image. MoWE instead uses a context-aware router to assign local regions to fixed wavelet families according to local texture and global feature context. The decoder reuses the encoder's spatial routing maps during the inverse transform. Learnable channel-wise gates rescale the high-frequency subbands before reconstruction. We evaluate MoWE with U-Net on four ultrasound lesion benchmarks (BUSI, TN3K, UDIAT, BUS-UCLM) and one cardiac dataset (CAMUS), and with nnU-Net on BUSI. On BUSI, MoWE improves U-Net Dice from 72.59% to 74.55% and reduces HD95 from 47.01 to 43.49 px. With nnU-Net, MoWE improves Dice from 80.18% to 81.97% and reduces ASSD from 20.07 to 17.25 px. On U-Net, MoWE reduces trainable parameters by 6.4%.
1. Introduction
Ultrasound (US) lesion segmentation supports non-invasive diagnosis by delineating pathological tissue from its surroundings. This task remains difficult because low tissue contrast, acoustic shadowing, imaging artifacts, and speckle can obscure lesion margins and create lesion-like patterns in adjacent tissue [5, 29]. A useful segmentation representation must therefore retain weak boundary evidence while avoiding indiscriminate amplification of high-frequency noise.
Resolution transitions are a consequential part of this problem. U-Net [23] and its self-configuring extension nnU-Net [14] are strong reference architectures for medical image segmentation [15], but their encoders repeatedly reduce feature resolution through pooling or strided convolutions. Such operations expand the effective receptive field and reduce computation, yet can remove spatial detail needed for dense prediction [10]. The transition is more than an implementation detail because it determines which information reaches later encoder stages. Discrete wavelet transforms provide an alternative by decomposing features into low-frequency and directional detail subbands [4]. Recent segmentation networks exploit this decomposition for multi-scale representation, frequency-aware downsampling, or selective subband retention [1, 3, 10, 12, 22, 31]. However, these designs choose the wavelet transform or retained subbands at the model or image level rather than selecting a wavelet family independently for each spatial region.
Our premise is that the appropriate frequency decomposition can vary within one US image. Lesion interiors, boundary segments, surrounding tissue, and shadowed regions exhibit different local structures, while wavelet families encode different trade-offs between spatial support and regularity [9]. We therefore propose Mixture-of-Wavelet-Experts (MoWE), which routes each pooled spatial location among a small bank of fixed wavelet families. A convolutional router combines local texture with global feature context and produces discrete assignments through straight-through Gumbel-Softmax [16]. The decoder reuses these assignments for inverse transformation and applies learned channel-wise gates to the cached detail subbands. This construction retains the known analysis–synthesis structure of each expert while making the basis choice spatially dependent.
We evaluate MoWE within U-Net and nnU-Net to test this routing-aware decomposition across established backbones. With U-Net, it improves Dice and HD95 on BUSI, BUS-UCLM, and TN3K; with nnU-Net on BUSI, it improves Dice from 80.18% to 81.97% and reduces ASSD from 20.07 to 17.25 px.
Downsampling and aliasing: Max-pooling and strided convolutions subsample features without an explicit anti-aliasing filter, which breaks shift invariance [6] and discards high-frequency content. Blur-pooling inserts a fixed low-pass filter before subsampling and improves stability under small transformations [32], while wavelet pooling replaces learned pooling with a fixed subband decomposition [28]. These methods apply one predetermined frequency response at every spatial location. MoWE instead selects among several fixed analysis–synthesis operators per location, so the effective frequency response adapts to local content while every candidate operator retains perfect reconstruction.
Wavelet-based segmentation: Wavelet transforms address this by decomposing features into frequency subbands, preserving high-frequency details that pooling discards. Recent methods integrate wavelets into encoder-decoder architectures for multi-scale feature extraction [12, 22], parameter-efficient downsampling [1, 3], and low-frequency feature mining [19, 31]. Matched Wavelet Pooling [10] selects task-optimal subbands but applies a single wavelet family globally. In all cases, the wavelet basis is fixed across the entire image, imposing a uniform spectral bias on heterogeneous US tissue, where homogeneous regions may favor smooth wavelets (e.g., db4) and sharp lesion boundaries may favor compactly supported ones (e.g., Haar).
Mixture-of-Experts in medical imaging: Mixture-of-Experts (MoE) architectures route inputs to specialized sub-networks via learned gating functions [24]. In medical imaging, MoE has been applied to route encoder features through expert refinement layers [18], handle domain shift across 3D segmentation tasks [26], and dynamically select scanning strategies in state-space models [33]. However, these methods route tokens or feature channels to learned neural sub-networks. No prior work routes spatial regions to signal-processing operators, specifically fixed wavelet families with known frequency characteristics, making the gating decision interpretable as a locally appropriate frequency decomposition.
1.2. Our Contributions
-
We propose MoWE, a spatially adaptive routing mechanism that replaces standard pooling by dynamically assigning each local region to an appropriate fixed wavelet family, conditioned on both local texture and global anatomical context via Gumbel-Softmax gating.
-
We introduce a detail-gated decoder that reuses encoder routing maps to guarantee analysis–synthesis consistency and employs learnable channel-wise gains to rescale detail subbands prior to reconstruction.
-
We evaluate MoWE with U-Net across four US lesion benchmarks and one cardiac dataset, and with nnU-Net on BUSI.
2. Methods
MoWE (Fig. 1) consists of a context-aware encoder router, a decoder that reuses the routing maps with learned detail gating, and a load-balancing term for the expert assignments.
2.1. Backbone Integration and Tensor Shapes
MoWE replaces the resolution transitions of the encoder-decoder. The U-Net configuration has four wavelet transitions with channel widths . For nnU-Net, the stage depths and channel widths follow its automatically selected 2D configuration. At level , the feature tensor entering a transition has shape . Every fixed expert applies a depthwise, stride-two DWT and returns four tensors of shape . Thus, the routed LL tensor preserves the channel count while reducing each spatial dimension by two. A convolutional block then maps the routed LL tensor to channels before the next transition. The low-frequency tensor and the three detail tensors are kept in the transition cache together with the pooled routing map.
The U-Net backbone uses double-convolution blocks. For nnU-Net, MoWE retains the configured convolutional blocks, deep supervision, training procedure, inference, and postprocessing while replacing the encoder and decoder resolution transitions. In both backbones, the decoder first projects the deeper representation back to channels before synthesis. Each expert-specific IDWT then receives this decoder LL tensor and the cached detail triplet. The resulting reconstructions are mixed in image space using the nearest-neighbor upsampled routing map and concatenated with the matching encoder skip tensor. Fixed DWT/IDWT filters are registered as non-trainable buffers; only the router, normalization, adapter, and backbone parameters are optimized.
MoWE evaluates all fixed experts at each transition. The router selects one expert at each pooled spatial location, but the transform bank is computed densely so that the hard assignment remains differentiable during training through

Figure 1. MoWE: Context-aware spatial wavelet routing and detail-gated reconstruction.
the straight-through estimator; Sec. 2.5 discusses this design choice and its computational consequences.
2.2. Context-Aware Spatial Wavelet Routing (Encoder)
Given an encoder feature map at resolution level , we project it through a bank of fixed wavelet families (e.g., Haar, db2, db4). Each expert computes the Discrete Wavelet Transform (DWT) [4], yielding one low-frequency and three high-frequency subbands:
Standard mixture-of-experts layers route tokens independently, whereas US textures call for global structural awareness. A convolutional router produces per-pixel logits for experts, which are average-pooled to the subband resolution and biased by a global context vector :
where u indexes the spatial location, Pool denotes average pooling, GAP is global average pooling, is a lightweight MLP with hidden dimension , and regulates the global context influence. Pooling the logits by the DWT's downsampling factor aligns each assignment with exactly one transform output cell, so routing decisions live at the same granularity as the subbands they select, while the global term lets coarse anatomy bias assignments that local texture alone would leave ambiguous.
To maintain gradient flow while forcing discrete spatial assignments, we use a straight-through Gumbel-Softmax
[16] estimator:
where is a one-hot spatial assignment map. The routed low-frequency representation is batch-normalized and forwarded to the next encoder block. Each expert's detail subbands are independently batch-normalized prior to caching. The detail subbands and the spatial assignment map are cached for decoder-side synthesis.
2.3. Detail-Gated Synthesis and Routing Reuse (Decoder)
During reconstruction, the upsampled decoder features are projected to the low-frequency dimension, yielding . Analysis–synthesis consistency requires that each location be reconstructed with the same wavelet used for decomposition. We therefore reuse the encoder’s routing map via nearest-neighbor upsampling, , preserving the hard one-hot structure.
High-frequency subbands carry lesion boundary detail but also encode US speckle noise. We introduce a Detail Adapter Bank with learned channel-wise gains that rescale these subbands prior to the Inverse DWT (IDWT). For each subband , the adapter computes:
where are learnable logits initialized to 2.2, and is the sigmoid function. The rescaled details are transformed via IDWT:
and combined using the reused spatial routing: . is then fused with skip connections and refined.
2.4. Optimization and Load Balancing
To prevent representational collapse, where the network degenerates to routing all regions to a single wavelet family, we incorporate a Switch-Transformer load balancing regularizer [11]. Let be the fraction of spatial tokens routed to expert at level , and be the mean routing probability. The total objective is:
where scales the balance penalty. To encourage exploration during early training and sharp expert specialization later, we use a -epoch warmup and linearly anneal the Gumbel temperature from to over the remaining epochs: .
2.5. Design Rationale
MoWE keeps the expert bank fixed so that each expert remains an orthonormal DWT/IDWT pair with known frequency responses and a perfect-reconstruction guarantee . A routing decision can therefore be interpreted as selecting a locally appropriate frequency decomposition, while the bank adds no trainable parameters. A learned transform would obscure this interpretation and would also need to satisfy reconstruction constraints throughout optimization.
This interpretation depends on hard assignments. Softly mixing subbands from different orthonormal bases produces a representation that lies in no single basis and makes a reconstruction difficult to attribute to one expert. We therefore use hard assignments with a straight-through estimator, which keeps the routing discrete while preserving gradient-based training.
The decoder must use the same basis that was selected during analysis. Reconstructing a region with a different basis breaks the analysis/synthesis pairing and introduces a systematic approximation error at every transition. MoWE reuses the encoder's assignment map during decoding. Nearest-neighbor upsampling preserves its one-hot structure, so synthesis uses the exact basis selected during analysis without adding decoder-side routing cost.
These choices require dense expert evaluation. Every transition computes all K transforms and caches all detail triplets, so transform compute and activation memory grow linearly in K relative to a single-family wavelet U-Net. The fixed transforms replace the baseline downsampling and upsampling operators: max-pooling or strided convolution in the encoder and transposed convolution in the decoder. Trainable parameters therefore decrease by 6.4% in the U-Net configuration (Sec. 4.7); the measured latency and memory overhead are reported there.
3. Experimental Setup
Datasets and Preprocessing. We evaluate on BUSI (breast) [2], UDIAT (breast) [30], BUS-UCLM (breast) [25], TN3K (thyroid) [13], and CAMUS (cardiac) [17]. Table 1 summarizes the resulting corpus. All images are resized to pixels. For BUSI, UDIAT, and BUS-UCLM, images are read as single-channel intensity maps and divided by 255; masks are resized with nearest-neighbor interpolation. BUSI excludes the normal class and filters samples with missing or empty lesion masks. TN3K uses the official trainval folds and held-out test set, with masks binarized at intensity threshold
Table 1. Dataset statistics after preprocessing. Splits list train/val/test. CAMUS counts patients; each contributes four annotated frames. TN3K lists total trainval/test sizes; per-fold splits follow the official five folds. UDIAT splits vary by up to one image across folds.
| Dataset | Anatomy | Size | Split protocol |
|---|---|---|---|
| BUSI | breast | 647 | 388/129/130 holdout |
| UDIAT | breast | 163 | 5-fold CV (111/20/32) |
| BUS-UCLM | breast | 683 | 417/126/140 patient |
| TN3K | thyroid | 3493 | 2879/614, official folds |
| CAMUS | cardiac | 500 pat. | 300/100/100 patient |
- CAMUS retains complete patients with 2CH/4CH end-diastolic and end-systolic frames, min–max normalizes each image independently, and represents background, left ventricle, myocardium, and left atrium as four mutually exclusive classes.
BUSI uses a 60/20/20 image-level holdout; UDIAT uses five folds with a validation fraction of 0.15 within each training fold; BUS-UCLM uses patient-level grouping; TN3K uses its five predefined folds; and CAMUS uses a 60/20/20 patient-level split. BUSI, BUS-UCLM, and CAMUS are evaluated over five random seeds, while UDIAT and TN3K are evaluated over five folds.
Training uses batch size 28 with random 90-degree rotations and flips. Validation and test samples are evaluated without augmentation.
Implementation Details. Models are implemented in PyTorch, and computational profiling is performed on an NVIDIA RTX 3090 GPU (24 GB). The fixed expert bank is with Haar, db2, and db4 filters. The optimizer is Adam with learning rate and weight decay ; the cosine schedule decays to over 200 epochs. Training uses automatic mixed precision and lasts 200 epochs. The binary objective is ; CAMUS uses multiclass cross-entropy plus foreground Dice. The router uses a five-epoch uniform warmup, context reduction factor 8, context scale 0.5, balance weight 0.005, and linear temperature annealing from 1.0 to 0.5. Low-frequency and detail batch normalization are enabled, and detail-adapter logits are initialized to 2.2.
Model selection and inference. Baseline and MoWE runs with matching seeds reused the same data split. We fixed the seed for weight initialization, data shuffling, and augmentation. During validation and testing, we assigned each location to the expert with the largest router logit and did not sample Gumbel noise. The fixed DWTs use circular boundary extension; the matching inverse transforms fold the periodic samples back into the reconstruction.
nnU-Net comparison. We additionally evaluate nnU-Net [14], a strong and widely used medical image segmentation benchmark, on BUSI. The baseline and nnU-Net + MoWE use the same nnU-Net configuration, data split, training procedure, inference, and postprocessing; MoWE changes the resolution transitions.
Table 2. Quantitative U-Net results on ultrasound lesion datasets. Values are mean±std over five seeds for BUSI and BUS-UCLM and five folds for UDIAT and TN3K. DSC in %, HD95 in px; the better result is bolded.
| Dataset | DSC ↑ | HD95 ↓ | ||
|---|---|---|---|---|
| U-Net | +MoWE | U-Net | +MoWE | |
| BUSI | 72.59±1.51 | 74.55±1.66 | 47.01±3.65 | 43.49±3.01 |
| UDIAT | 74.65±5.44 | 73.29±1.78 | 29.72±7.00 | 34.64±4.80 |
| BUS-UCLM | 73.48±2.46 | 74.48±2.24 | 43.53±6.15 | 39.63±5.80 |
| TN3K | 79.73±0.93 | 81.19±0.53 | 32.92±2.20 | 29.90±1.56 |
Metric computation. Binary predictions are obtained by applying a sigmoid and thresholding at 0.5. Dice and IoU are computed per case and then averaged; reported variation is calculated across training seeds or predefined folds. HD95 and average symmetric surface distance (ASSD) are computed with MedPy, with the image diagonal assigned when exactly one of the prediction and target masks is empty. CAMUS predictions use softmax followed by argmax, and foreground metrics are macro-averaged over the three anatomical classes.
4. Results and Discussion
4.1. U-Net Results
We first evaluate MoWE as a replacement for the standard resolution transitions in U-Net. Performance is quantified using the Dice Similarity Coefficient (DSC) for regional overlap and the 95th-percentile Hausdorff Distance (HD95) for boundary precision. The results are reported in Table 2.
On BUSI, MoWE raises the mean DSC from 72.59% to 74.55% and reduces HD95 from 47.01 to 43.49 px. On BUS-UCLM, it raises DSC from 73.48% to 74.48% and reduces HD95 from 43.53 to 39.63 px. On TN3K, DSC increases from 79.73% to 81.19% and HD95 decreases from 32.92 to 29.90 px. UDIAT shows the opposite trend: DSC decreases from 74.65% to 73.29%, while HD95 increases from 29.72 to 34.64 px.
UDIAT is the only dataset where MoWE lowers the mean. MoWE reduces the cross-fold standard deviation of DSC from 5.44 to 1.78 points while shifting the mean by -1.36 points, so the routed model trades a small average loss for markedly more consistent predictions. UDIAT is also the smallest benchmark in our study: 163 images from a single center, with roughly 111 training images per fold (Table 1). The result is consistent with the possibility that the additional routing components are harder to estimate in this setting, although the current experiments do not isolate
Table 3. Comparison with nnU-Net on BUSI. DSC and IoU are reported in %; ASSD and HD95 are reported in px.
| Method | DSC ↑ | IoU ↑ | ASSD ↓ | HD95 ↓ |
|---|---|---|---|---|
| nnU-Net | 80.18 | 71.89 | 20.07 | 52.34 |
| nnU-Net + MoWE | 81.97 | 73.58 | 17.25 | 54.02 |
the effects of dataset size or acquisition heterogeneity. The worsened HD95 alongside the mild DSC change suggests that the regression concerns boundary localization rather than gross region failure.
4.2. Comparison with nnU-Net
nnU-Net is a strong benchmark across diverse medical image segmentation tasks [14, 15]. We therefore compare nnU-Net with nnU-Net + MoWE on BUSI (Table 3).
MoWE improves DSC by 1.79 percentage points and IoU by 1.69 points, while reducing ASSD from 20.07 to 17.25 px (a 14.1% reduction). HD95 changes from 52.34 to 54.02 px; the gains lie in overlap and average surface agreement.
ASSD measures the mean symmetric surface distance within each case, whereas HD95 measures the 95th percentile of the surface distances; both are then averaged across cases. Their divergence suggests that average surface agreement improves while tail errors remain, although the aggregate values do not establish the per-case failure pattern. The routing distribution also changes with the backbone: with nnU-Net, the router assigns 46.8% of pooled locations to db2 and only 19.5% to db4, a less balanced distribution than under U-Net (Sec. 4.7).
4.3. Cross-Domain Evaluation
We also evaluate on CAMUS echocardiography (Table 6). On U-Net, DSC changes from 89.14% to 89.10%, while HD95 decreases from 8.38 to 7.99 px.
Echocardiography probes a different operating regime than lesion segmentation: chamber boundaries are large and supported by strong shape priors, the baseline already exceeds 89% DSC, and speckle interacts with smooth chamber walls rather than ill-defined lesion margins. In this regime MoWE leaves overlap unchanged (-0.04 points) while improving boundary precision (HD95 -0.39 px, a 4.7% reduction) and reducing variance (DSC std 0.66 to 0.24, HD95 std 0.68 to 0.26). Outside its target domain, MoWE leaves an already-strong baseline intact and concentrates its benefit on boundary precision.
4.4. Qualitative Analysis
Figure 2 shows representative U-Net predictions and expert-contribution maps. Standard spatial pooling can cause the predicted mask to extend into surrounding tissue in regions
Table 4. Wavelet U-Net controls on BUSI. Each row applies a single fixed wavelet family at every resolution transition; all other components match the MoWE configuration. DSC and IoU are reported in %; HD95 and ASSD are reported in px.
| Family | DSC ↑ | IoU ↑ | HD95 ↓ | ASSD ↓ |
|---|---|---|---|---|
| Haar | ||||
| db2 | ||||
| db4 |
Table 5. Component ablation on BUSI using the U-Net backbone.
| Method | K | Ctx. | Det. | DSC ↑ | HD95 ↓ |
|---|---|---|---|---|---|
| U-Net | - | - | - | ||
| U-Net (MoWE) | 1 | - | ✓ | ||
| U-Net (MoWE) | 3 | ✕ | ✓ | ||
| U-Net (MoWE) | 3 | ✓ | ✕ | ||
| U-Net (MoWE) | 3 | ✕ | ✕ | ||
| U-Net (MoWE) | 3 | ✓ | ✓ |
Table 6. Cross-domain results on CAMUS echocardiography.
| DSC ↑ | HD95 ↓ | |
|---|---|---|
| U-Net | ||
| U-Net (MoWE) |
affected by acoustic shadowing. MoWE produces tighter boundaries in these examples. For each expert k, the contribution map is computed from the signed difference between the full-model logits and the logits obtained when expert k is excluded. Positive contributions are normalized across experts to obtain a per-pixel share, visualizing the spatial influence of each expert on the prediction.
4.5. Comparison with Fixed Wavelet U-Nets
Table 4 isolates the contribution of spatial routing from the contribution of wavelet downsampling itself. Each control is a Wavelet U-Net that applies a single wavelet family at every resolution transition; the architecture, training protocol, and detail adapter are otherwise identical to MoWE, and the routed model differs only in selecting among the three families per location. The K = 1 row of Table 5 (73.47% DSC, 41.66 px HD95) coincides with the Haar control.
The fixed controls show an overlap–boundary trade-off. db2 attains the best fixed-family overlap (DSC 73.76%, IoU 65.14%), whereas Haar attains the best boundary scores (HD95 41.66 px, ASSD 18.76 px); DSC varies by only half a point across families while HD95 varies by 2.35 px. This split is consistent with the filters’ support length and vanishing moments [9]: Haar’s two-tap support can favor bound-

Figure 2. Qualitative U-Net comparison. Standard spatial pooling can miss boundaries in regions affected by acoustic shadowing. MoWE produces tighter boundaries in these examples. The Route column shows the expert-contribution map, with Haar, db2, and db4 encoded as red, blue, and green, respectively.
ary localization, while db2's longer, smoother filter can represent gradually varying tissue more compactly. No single fixed family is simultaneously best on both metric families, indicating the utility of adaptive spatial routing.
The routed model shifts this trade-off toward overlap: it reaches 74.55% DSC, 0.79 points above the strongest fixed control, while its HD95 (43.49 px) lies between the fixed extremes. Fixed Haar still surpasses the routed model on HD95: when boundary quality alone matters and the dataset is known in advance, a single compact basis is a strong choice, whereas routing attains the best overlap without requiring that choice a priori. The mean BUSI routing shares (Haar 31.6%, db2 35.4%, db4 33.1%) show that the router draws on all three families rather than collapsing onto one (Sec. 4.7).
4.6. Component Ablation
Table 5 then reports an additive component study on BUSI using the U-Net backbone. A single-expert Haar variant improves DSC from 72.59% to 73.47% over the U-Net baseline. The full model reaches 74.55% DSC and 43.49 px HD95, separating the use of a fixed wavelet transition from routing among wavelet families.
We then ablate each auxiliary component from the full
Table 7. Single-image computational profile at on an RTX 3090 GPU (50 timed repetitions). Parameters are in millions; Fwd and Step are latency in ms; Mem is peak training memory in MB.
| Model | Params | GFLOPs | Fwd | Step | Mem |
|---|---|---|---|---|---|
| U-Net | 31.04 | 96.18 | 5.37 | 19.35 | 728.0 |
| U-Net (MoWE) | 29.04 | 96.45 | 17.24 | 45.62 | 1124.2 |
model. Removing the context bias (; DSC: , HD95: ) leaves routing based on the local logits. Without the Detail Adapter (DSC: , HD95: ), the high-frequency subbands are passed to reconstruction without learned rescaling, improving HD95 at the expense of DSC. Removing both components produces the weakest overlap (DSC ) yet the best boundary score of the ablation (HD95 ). This pattern mirrors the fixed-family trade-off of Sec. 4.5: boundary sharpness and region overlap pull in different directions, while the full combination attains the highest DSC among the ablations.
4.7. Computational Cost and Routing Diagnostics
MoWE evaluates every expert transform densely before applying the hard routing mask. GFLOPs include convolutions within the DWT and IDWT; latency is measured at with batch size one. The resulting trade-off is summarized in Table 7. On U-Net, MoWE reduces trainable parameters by because the fixed DWT/IDWT filters replace max-pooling and transposed-convolution upsampling, while forward latency increases by and training-step latency by in this measurement. GFLOPs remain nearly unchanged (96.18 to 96.45) because the wavelet transforms themselves are cheap; the latency gap reflects the memory traffic of caching all expert subbands rather than arithmetic cost.
Routing statistics reveal how expert selection depends on the backbone and on encoder depth. With U-Net on BUSI, the mean shares are balanced (Haar 31.6%, db2 35.4%, db4 33.1%), and the load-balancing term keeps every expert well above the collapse regime. Assignments nevertheless shift systematically with depth: the db2 share decreases monotonically from 36.4% at the shallowest transition to 28.4% at the deepest, while the Haar share rises from 31.5% to 36.8% and db4 peaks mid-encoder (37.1% at the second-deepest transition). One possible interpretation is that shallower texture-heavy features favor smoother bases, whereas deeper features favor the compact Haar basis; the usage counts alone, however, do not identify which feature properties drive these assignments. Under nnU-Net on the same dataset, the distribution changes markedly (db2 46.8%, Haar 33.6%, db4 19.5%), showing that the selected mixture also depends on the backbone under the same task.
4.8. Limitations
The current design has practical and empirical limitations. Dense evaluation of the expert bank makes the method more expensive: forward latency increases by , training-step latency by , and peak training memory by over U-Net despite the lower parameter count (Table 7). Evaluating only the selected expert would reduce this overhead, but would remove the dense gradients that make the hard assignment trainable with a straight-through estimator. The gains also vary across datasets: on the small, single-center UDIAT corpus, the routed model has lower mean accuracy, while with nnU-Net it does not improve the tail boundary metric (HD95). Finally, the evaluation covers only 2D ultrasound and echocardiography, uses Daubechies-family experts, and is limited to U-Net and nnU-Net. Additional U-Net variants, larger expert banks, learnable bases, and 3D volumetric data remain to be evaluated.
5. Conclusion
Ultrasound segmentation presents a difficult trade-off at every resolution transition: preserving weak boundary evidence can also preserve speckle, while suppressing noise can erase lesion structure. Our results suggest that this trade-off should not be resolved by choosing one pooling operator or wavelet basis for the entire image. MoWE instead adapts the frequency decomposition to spatial content while maintaining consistent analysis and reconstruction. On BUSI, the fixed-wavelet controls exposed a clear split between bases that favor overlap and those that favor boundary localization; spatial routing achieved the best overlap among them. This advantage extended beyond the controlled comparison: MoWE improved both Dice and HD95 on three of four lesion datasets with U-Net, and improved Dice and ASSD when integrated with nnU-Net on BUSI, while using fewer trainable parameters. The evidence is not uniformly positive: performance declined on the small, single-center UDIAT dataset, nnU-Net HD95 did not improve, and dense expert evaluation substantially increased latency. The central finding is therefore not that one wavelet is a better pooling operator, but that the appropriate resolution transition can vary across spatial regions and network contexts. Efficient sparse routing, determination of the best wavelet family and number of wavelets, evaluation on various U-Net architectures and larger datasets should be the next step towards assessing whether this principle generalizes beyond our present setting.
References
[1] Talha Ahmed, Nehal Ahmed Shaikh, and Hassan Mohy-ud-Din. Wave-GMS: Lightweight multi-scale generative model for medical image segmentation. In IEEE International Conference on Acoustics, Speech, and Signal Processing, pages 6761–6765. IEEE, IEEE, 2026.
[2] Walid Al-Dhabyani, Mohammed Gomaa, Hussien Khaled, and Aly Fahmy. Dataset of breast ultrasound images. Data in brief, 28:104863, 2020.
[3] Md Mahfuz Al Hasan et al. WaveFormer: A 3D transformer with wavelet-driven feature representation for efficient medical image segmentation. In MICCAI 2025, pages 684–694. Springer, Springer Nature Switzerland, 2025.
[4] Silvia Maria Alessio. Discrete wavelet transform (DWT). In Digital Signal Processing and Spectral Analysis for Scientists, pages 645–714. Springer, 2016.
[5] Carlos Aumente-Maestro, Jorge Díez, and Beatriz Remeseiro. A multi-task framework for breast cancer segmentation and classification in ultrasound imaging. Comput. Methods Programs Biomed., 260:108540, 2024.
[6] Aharon Azulay and Yair Weiss. Why do deep convolutional networks generalize so poorly to small image transformations? Journal of Machine Learning Research, 20(184):1–25, 2019.
[7] Hu Cao, Yueyue Wang, Jieneng Chen, Dongsheng Jiang, Xiaopeng Zhang, Qi Tian, and Manning Wang. Swin-Unet: Unet-like pure transformer for medical image segmentation. In ECCV Workshops, pages 205–218. Springer Nature Switzerland, 2022.
[8] Jieneng Chen, Yongyi Lu, Qihang Yu, Xiangde Luo, Ehsan Adeli, Yan Wang, Le Lu, Alan L Yuille, and Yuyin Zhou. TransUNet: Transformers make strong encoders for medical image segmentation. arXiv.org, 2021.
[9] Ingrid Daubechies. Ten Lectures on Wavelets. Society for Industrial and Applied Mathematics, Philadelphia, PA, 1992.
[10] Said El-Khamy, Shimaa El-Bana, Ahmad Al-Kabbany, and Hassan Elragal. Toward better semantic segmentation by retaining spectral information using matched wavelet pooling. Neural computing & applications (Print), 37(10):7049–7066, 2025.
[11] William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120):1–39, 2022.
[12] Zhihua Gan, Zhongxiang Xie, Yushu Zhang, Weihong Han, Bo Zhang, and Xiuli Chai. WTCM-UNet: A hy-
brid CNN-SSM framework combining wavelet transform for medical image segmentation. Biomedical Signal Processing and Control, 112:108525, 2026.
[13] Haifan Gong, Jiaxin Chen, Guanqi Chen, Haofeng Li, Guanbin Li, and Fei Chen. Thyroid region prior guided attention for ultrasound segmentation of thyroid nodules. Comput. Biol. Medicine, 155:106389, 2023.
[14] Fabian Isensee, P. Jaeger, Simon A. A. Kohl, Jens Petersen, and Klaus Hermann Maier-Hein. nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation. Nature Methods, 18(2):203–211, 2020.
[15] Fabian Isensee, Tassilo Wald, Constantin Ulrich, M. Baumgartner, Saikat Roy, Klaus H. Maier-Hein, and P. Jaeger. nnU-Net revisited: A call for rigorous validation in 3D medical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 488–498. Springer, Springer Nature Switzerland, 2024.
[16] Eric Jang, S. Gu, and Ben Poole. Categorical reparameterization with Gumbel-softmax. In International Conference on Learning Representations, 2017.
[17] Sarah Leclerc, E. Smistad, J. Pedrosa, A. Østvik, F. Cervenansky, F. Espinosa, T. Espeland, Erik Andreas Rye Berg, Pierre-Marc Jodoin, T. Grenier, et al. Deep learning for segmentation using an open large-scale dataset in 2D echocardiography. IEEE transactions on medical imaging, 38(9):2198–2210, 2019.
[18] Ruocheng Li et al. MoE-SAM: Enhancing SAM for medical image segmentation with mixture-of-experts. In MICCAI 2025, pages 367–377. Springer Nature Switzerland, 2025.
[19] Pengchen Liang, Quanhong Zeng, Bocheng Liang, Haishan Huang, Yudong Zhang, Bin Pu, and Jianguo Chen. WKPNet: A novel wavelet-KAN-POLA network for medical image segmentation. Biomedical Signal Processing and Control, 113:108988, 2026.
[20] Jun Ma, Feifei Li, and Bo Wang. U-Mamba: Enhancing long-range dependency for biomedical image segmentation. arXiv.org, 2024.
[21] O. Oktay, Jo Schlemper, Loic Le Folgoc, M. J. Lee, M. Heinrich, K. Misawa, K. Mori, Steven G. McDonagh, Nils Y. Hammerla, Bernhard Kainz, et al. Attention U-Net: Learning where to look for the pancreas. arXiv.org, 2018.
[22] Fan Qin, Yongjie Liang, Chaofeng Yang, Yulong Cao, Jiaying Fan, Peiyuan Wang, and Bizhong Wei. Medical image segmentation network based on multi-scale cross-attention and wavelet transform. Journal of King Saud University-Computer and Information Sciences, 37(5), 2025.
[23] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 234–241. Springer, Springer International Publishing, 2015.
[24] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. International Conference on Learning Representations, 2017.
[25] Noelia Vallez, Gloria Bueno, Oscar Deniz, Miguel Angel Rienda, and Carlos Pastor. BUS-UCLM: Breast ultrasound lesion segmentation dataset. Scientific Data, 12(1):242, 2025.
[26] Guoan Wang, Jin Ye, Junlong Cheng, Tianbin Li, Zhaolin Chen, Jianfei Cai, Junjun He, and Bohan Zhuang. SAM-Med3D-MoE: Towards a non-forgetting segment anything model via mixture of experts for 3D medical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 552–561. Springer, Springer Nature Switzerland, 2024.
[27] Jiangtao Wang, N. Ruhaiyem, and Panpan Fu. A comprehensive review of U-Net and its variants: Advances and applications in medical image segmentation. IET Image Processing, 19(1), 2025.
[28] Trent Williams and Rong Li. Wavelet pooling for convolutional neural networks. In International Conference on Learning Representations, 2018.
[29] Xiaolong Xiao, Jianfeng Zhang, Yuan Shao, Jialong Liu, Kaibing Shi, Chunlei He, and Dexing Kong. Deep learning-based medical ultrasound image and video segmentation methods: Overview, frontiers, and challenges. Sensors, 25(8):2361, 2025.
[30] Moi Hoon Yap, Gerard Pons, Joan Marti, Sergi Ganau, Melcior Sentis, Reyer Zwiggelaar, Adrian K Davison, and Robert Marti. Automated breast ultrasound lesions detection using convolutional neural networks. IEEE journal of biomedical and health informatics, 22(4):1218–1226, 2018.
[31] Pengcheng Zhang, Xiaocao Ouyang, and Ran Peng. UWT-Net: Mining low-frequency feature information for medical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 615–624. Springer, Springer Nature Switzerland, 2025.
[32] Richard Zhang. Making convolutional networks shift-invariant again. In International Conference on Machine Learning, pages 7324–7334, 2019.
[33] Ziyao Zhang, Qiankun Ma, Tong Zhang, Jie Chen, Hairong Zheng, and Wen Gao. Switch-UMamba: Dynamic scanning vision Mamba UNet for medical im-
age segmentation. Medical Image Anal., 107:103792, 2025.