When a polyp fades into the surrounding colon wall, or a heart chamber blurs into the muscle around it, segmentation networks usually get the middle of the object right and the edge wrong. They apply the same fixed filters everywhere. A filter tuned to the average boundary seen in training will be wrong for a boundary that is unusually faint, glossy, or flat. Dynamic convolution, where a layer's filter is assembled for each input as a weighted mix of a few learned candidate filters, looks like a natural fix. In practice, though, the weights that choose the mix are computed by averaging features over the whole image or the whole lesion. The thin ring of pixels where the boundary is uncertain contributes almost nothing to that average. The filter therefore adapts to the object's core, which is the part the network already handles well.
We propose to compute the filter-mixing weights only from the uncertain ring itself. A coarse prediction marks pixels whose foreground probability is near one half. Features are pooled over that soft band, and the pooled mean and spread choose a band-specific filter for that image. That filter is applied only inside the band, while a static filter handles everything else. The claim is narrow and testable. The gain should come from adapting to the contrast profile of each individual boundary, not from simply having separate interior and boundary filters. If so, the gain should be concentrated in boundary metrics and should grow as boundary contrast falls.
Core Claim and How It Differs From Existing Work
The closest prior work is Lesion-aware Dynamic Kernel for Polyp Segmentation (LDNet). It generates a segmentation-head kernel from global context and then updates it stage by stage by pooling features from the predicted lesion interior, with gating against noisy early masks. LDNet shows that input-adaptive kernels help polyp generalization: it reports 78.43% Dice on CVC-ColonDB, and its ablation attributes a 1.58% Dice gain to the dynamic kernel. Its kernel, however, specializes to the polyp's appearance, not to its edge, and it uses no boundary supervision. Our proposal inverts LDNet's pooling region and adds boundary-aware supervision.
The second closest is Uncertainty-Driven Dehazing Network. It generates convolution kernels from a per-pixel uncertainty map and processes uncertain regions, which line up with object edges, differently from confident ones. It does this for image restoration, not dense segmentation. Its kernels are driven by the uncertainty map itself rather than by the image content inside the uncertain region. We borrow its intuition that uncertainty should change the operator, but we condition on what the band looks like rather than on how uncertain it is.
Two boundary-focused methods supply the region-routing idea that we make adaptive. PraNet erases confident foreground with reverse attention, $1-\sigma(P_{coarse})$, and refines what remains with static convolutions. Polyper carves a "potential boundary region" with fixed-radius erosion and dilation, then lets interior features inform boundary features through cross-attention. Polyper's authors note that the fixed radius breaks across lesion scales. Our band is defined by prediction confidence rather than by a structuring element, so its width follows the coarse map's uncertainty.
Standard dynamic convolution (Dynamic Convolution: Attention Over Convolution Kernels) supplies the mechanism: a bank of $K$ kernels, softmax mixing weights from a small pooled branch, and temperature annealing against early collapse. We reuse it unchanged except for where the pooling happens.
Mechanism
Let $p(u)$ be the coarse foreground probability at pixel $u$ from a partial decoder, as in PraNet. Define a soft band weight $b(u)=4p(u)(1-p(u))$. This weight is 1 where the network is maximally unsure and 0 where it is confident. Let $f(u)$ be decoder features, $\mu_b$ and $s_b$ the $b$-weighted mean and standard deviation of $f$, $W_1,\dots,W_K$ the band kernel bank, $W_0$ a static core kernel, and $T$ a softmax temperature. The refinement layer computes
$$\pi(x)=\mathrm{softmax}\big(g([\mu_b, s_b])/T\big),\qquad y(u)=(1-b(u))\,(W_0 * f)(u)+b(u)\,\Big(\textstyle\sum_{k}\pi_k(x)W_k * f\Big)(u),$$
where $g$ is a two-layer perceptron. The spread term $s_b$ is deliberate. Contrast across a boundary shows up as feature variance inside the band, which a mean alone discards.
Compute stays close to one static convolution, since the mixed kernel is formed once per image. Parameters grow by roughly $K$ times for the band layers only. The module stacks across two or three decoder stages, each recomputing $b$ from the previous stage's output. Supervision is Dice plus cross-entropy on the mask, plus a contour term following the 0.9/0.1 weighting of the contour-loss U-Net, which reduced Spleen CT 95% Hausdorff distance from 7.5744 to 5.8814.
The known failure mode is inherited from cascades. If the coarse map misses a flat polyp entirely, $b$ is near zero everywhere and the module does nothing. We will measure this directly rather than hide it, as described in the experiments.
Research Program
The work has three parts. First, we build the module on PraNet's Res2Net-50 encoder and partial decoder, replacing its reverse-attention refinement blocks. Using the same skeleton keeps comparisons clean. Second, we isolate which ingredient matters through a fixed ladder of variants that differ only in the mixing weights $\pi$:
- $\pi$ from global pooling, which is standard dynamic convolution;
- $\pi$ from interior pooling with weight $p$, which is LDNet-style;
- $\pi$ from band pooling, the proposal;
- $\pi$ fixed, giving static region-specific kernels.
Third, we test the mechanistic prediction. We stratify test images by measured ground-truth boundary contrast, defined as the mean absolute intensity difference between thin rings just inside and just outside the true mask. We then check whether the gain of band pooling over the fixed-$\pi$ variant increases as contrast decreases. We will also inspect whether the learned $\pi$ correlates with that contrast measure across images. If $\pi$ ignores contrast, the "adaptation" story is false even if accuracy improves.
Baselines
The naive reference is a U-Net trained with Dice plus cross-entropy on the same splits. It shows how much any boundary machinery buys.
The static boundary baseline is PraNet itself, retrained under our protocol. PraNet reports mean Dice 0.898 on Kvasir and 0.628 on unseen ETIS. It is the direct parent architecture, and it differs from ours only in using static filters on erased features.
The strongest published competitors are Polyper and LDNet. Polyper reports mDice 86.51% on ETIS. This figure is far above PraNet's, and it may reflect a different training protocol, so we will retrain Polyper under ours rather than compare to the published number. LDNet reports 78.43% Dice on CVC-ColonDB and is the closest dynamic-kernel method. We also include MISNet, a static axial boundary-attention model reporting mDice 0.903 on Kvasir and 0.918 on CVC-ClinicDB.
All baselines use the same training data, the same 352-pixel input resolution, the same augmentation, the same epoch budget, and a matched hyperparameter sweep of equal size. We report three seeds each.
The ablations that isolate the key ingredient are the fixed-$\pi$ static region-specific model and a parameter-matched static model whose band branch has $K$ times wider channels. Beating Polyper and LDNet on mean Dice by a margin larger than seed variance on ETIS and CVC-ColonDB would be welcome but is not the decisive claim. Beating fixed-$\pi$ and the parameter-matched static model on boundary F-score and HD95, with the gap widening in the low-contrast stratum, is the decisive claim.
Why not just…?
Why not just use two static filter sets, one for the boundary band and one for the interior? This is the most serious threat. It captures the "boundary pixels need different filters" intuition without any per-image adaptation, and it is exactly the fixed-$\pi$ ablation. Nothing in the file shows that dynamic routing beats region-specific static filtering on boundaries. LDNet's 1.58% ablation compares against a plain baseline, not against this variant. If fixed-$\pi$ matches band pooling, we will report that the benefit is regional specialization rather than dynamism, and the proposal reduces to a cleaner version of Polyper's partition.
Why not just add boundary losses to a standard network? Losses do a lot. In the left atrium study, overlap and focal-positive losses lifted Dice from 82.01% to 91.54%, though an architectural recursive refinement was still needed to reach 92.24%. We therefore give every architecture, including the U-Net reference, the same contour loss. The question becomes what the module adds on top of a good loss.
Why not just use a bigger static model or static attention such as reverse attention or squeeze-and-excitation? Dynamic convolution adds parameters linearly in $K$, and some of its reported ImageNet gains may be capacity rather than adaptivity. The parameter-matched static band branch tests this directly. PraNet and MISNet represent static attention. MISNet's reported 16.8% drop on ETIS suggests that static attention degrades under domain shift, but that is suggestive, not proof that dynamic filters fare better.
Proposed Experiments
We follow the standard polyp protocol: train on Kvasir-SEG plus CVC-ClinicDB, and test on their held-out splits and on unseen CVC-ColonDB and ETIS. ETIS's small, flat polyps are the hardest case for both contrast and coarse-map failure. To check that the effect is not polyp-specific, we repeat the full ablation ladder on the Atrial Segmentation Challenge 2018 volumes, a thin-walled, low-contrast MRI target, using the 80/20 split.
Metrics are mean Dice and IoU, boundary F-score at a 2-pixel tolerance, and HD95. The boundary metrics are primary because global Dice can mask edge errors.
Three checks decide the outcome. The first is whether band pooling beats both fixed-$\pi$ and the parameter-matched static model on boundary F-score and HD95 on ETIS and CVC-ColonDB across seeds. The second is whether that gap is largest in the lowest-contrast tercile and whether the learned $\pi$ tracks measured boundary contrast. The third concerns cascade failure. We report, separately, ETIS images where the coarse map's Dice is below 0.3. On those images we expect no gain. If the module instead hurts them, that limits its use without a fallback.
References
- Lesion-Aware Dynamic Kernel for Polyp Segmentation
- Uncertainty-Driven Dehazing Network
- PraNet: Parallel Reverse Attention Network for Polyp Segmentation
- Polyper: Boundary Sensitive Polyp Segmentation
- Dynamic Convolution: Attention Over Convolution Kernels
- A Medical Image Segmentation Method based on Multi-scale Features and Contour Loss Constrain (S)
- Multi-scale information sharing and selection network with boundary attention for polyp segmentation
- Combating Uncertainty with Novel Losses for Automatic Left Atrium Segmentation