Transport Supervision for Tiny, Faint Targets in Segmentation

When a segmentation network misses a small, low-contrast target such as an early polyp, a stroke lesion, or a pancreas edge, the usual training losses largely stop telling it where to look. Overlap losses like Dice or IoU score how much the predicted region and the true region intersect. Once the prediction sits beside the target instead of on it, a predicted blob a few pixels away receives no push toward the right place. The stalling worsens deeper in the network. Each downsampling step (pooling or strided convolution, which halves the image grid) shrinks a 10-pixel lesion until it is smaller than a single cell, so coarse decoder stages see almost nothing to overlap with. Thresholding the downsampled mask can erase the target entirely.

We propose to supervise every decoder scale with a cheap optimal-transport loss. Optimal transport here means the minimum total distance needed to move the predicted "mass" of foreground probability onto the true mask's mass. Average pooling preserves both the total mass and its centroid, so this distance stays meaningful at any resolution. It also gives every predicted pixel a gradient proportional to how far its mass must travel. The claim is narrow and testable. On benchmarks dominated by tiny, faint targets, the loss's benefit should concentrate on the smallest and lowest-contrast cases. It should also show up as faster discovery of targets early in training. A blurred-target or single-Gaussian shortcut should not reproduce the benefit.

Core Claim

It helps to be exact about where the gradient vanishes, because the research file overstates it. With soft predictions $p_i$ and binary target $g_i$, the gradient of soft Dice with respect to a background pixel ($g_i=0$) is proportional to minus the current intersection $\sum_j p_j g_j$. When prediction and target are disjoint, that intersection is near zero. A confident false-positive blob next to a missed lesion therefore receives essentially no penalty from Dice. Pixels inside the target still receive an "increase here" signal. But that signal is purely local: it helps only if the features at those pixels already distinguish the lesion, which is exactly what downsampling and low contrast destroy.

Boundary Difference over Union (Boundary Difference Over Union Loss For Medical Image Segmentation) is a ratio of the same overlap quantities, a boundary-weighted variant of IoU. It saturates at 1 under zero overlap in the same way. Per-pixel cross-entropy never vanishes, but it treats the stray blob and the missed lesion as unrelated errors.

A transport loss couples the two errors. It says "move this mass there," and its gradient on each pixel is the transport potential, which grows with distance from the target. This is the mechanism Kervadec et al.'s distance-map loss (Boundary loss for highly unbalanced segmentation) approximates with a fixed, precomputed field. The difference is that the transport potential is recomputed against the current prediction at every step. It is normalized by predicted mass, and it is defined at each decoder resolution rather than only at the output.

The new element is not optimal transport as such. It is nonparametric spatial transport on mask probability fields, applied at the coarse scales where downsampling makes overlap losses blind. This differs from three neighbors. NWD (A Normalized Gaussian Wasserstein Distance for Tiny Object Detection) uses transport between boxes summarized as single Gaussians. Generalized Wasserstein Dice (Generalized Wasserstein Dice Loss, Test-Time Augmentation, and Transformers for the BraTS 2021 Challenge) uses transport between class labels, not between locations. Kervadec's loss uses a fixed distance map at full resolution only.

Research Program

The loss is a sliced Wasserstein-1 distance computed on the pixel grid. We borrow the slicing idea from Slicing the Gaussian Mixture Wasserstein Distance, which makes mixture transport tractable by projecting onto one-dimensional lines where transport has a closed form. That paper works on Gaussian mixtures and was never tested on dense images. We apply slicing to raw pixel mass instead, with no Gaussian fitting.

At decoder scale $s$, let $\hat p^{(s)}$ and $\hat g^{(s)}$ be the predicted foreground probabilities and the average-pooled target, each normalized to sum to one. Pick $K$ directions $\theta_k$. Let $\pi_k$ order the grid cells by their projected coordinate along $\theta_k$, and let $\Delta_{k,j}$ be the gap between consecutive projected coordinates. Then

$$\mathcal{L}^{(s)}_{\text{SOT}} = \frac{1}{K}\sum_{k=1}^{K}\sum_{j}\Big|\sum_{i\le j}\hat p^{(s)}_{\pi_k(i)}-\sum_{i\le j}\hat g^{(s)}_{\pi_k(i)}\Big|\,\Delta_{k,j}.$$

This is the exact one-dimensional Wasserstein-1 distance along each direction, averaged over directions.

One implementation detail makes the loss cheap. The grid is fixed, so each ordering $\pi_k$ and each gap $\Delta_{k,j}$ can be precomputed once per resolution. The loss is then a gather followed by a cumulative sum, linear in the number of pixels per direction, with no sorting during training.

Normalizing the predicted mass discards information about size. We therefore add a log-ratio term on total predicted versus true mass. We keep Dice plus cross-entropy at full resolution, so the transport term handles location and shape while the overlap term handles fine boundary agreement. Images with no target are handled by applying only the mass term. A small uniform floor on $\hat p$ keeps the normalization defined when a prediction is nearly empty.

The total loss sums $\mathcal{L}^{(s)}_{\text{SOT}}$ over the decoder scales with weights $\lambda_s$. We will test a schedule that shifts weight from coarse to fine over training, against a constant schedule.

Multi-component targets are handled natively, because transport splits predicted mass among components. Ring-shaped and thin structures also need no shape assumption. This avoids the shape-collapse problem the file raises for single-Gaussian models of anatomy.

The analysis component matters as much as the loss. We will log a "disjoint fraction" over training: the share of training images whose predicted mass at scale $s$ has zero overlap with the pooled target. We will log it per scale and per target-size bin. If the core claim is right, this fraction is large at coarse scales for tiny targets under Dice. It should fall faster under transport supervision, and the drop should precede the gains in final metrics.

The low-contrast direction enters as the regime of study and as a stratification axis. We will estimate per-image contrast as the intensity difference between a thin band inside and a thin band outside the true boundary. The prediction is that gains grow as contrast falls. Gains should be negligible on large, high-contrast targets.

Baselines

The naive reference point is the same encoder-decoder trained with Dice plus cross-entropy. It will be run once with output-only supervision and once with deep supervision, meaning the same loss applied to average-pooled targets at each decoder scale. This isolates "supervising coarse scales at all" from "supervising them with transport." Beating it means a gain in mean Dice and in 95th-percentile Hausdorff distance (HD95, a measure of worst-case boundary error) on the smallest-target and lowest-contrast bins. The gain should exceed seed-to-seed spread across three seeds.

The strongest loss-level competitors are three. The first is Kervadec et al.'s boundary loss paired with Generalized Dice under their ramp schedule. It reports 0.656 Dice on ISLES versus 0.575 for Generalized Dice alone (Boundary loss for highly unbalanced segmentation). The second is Amini et al.'s regional Hausdorff loss built on differentiable soft erosion. It reports 0.82 Dice and 16.94 HD on MSD Pancreas versus 0.77 and 25.14 for the Dice baseline (Regional Hausdorff Distance Losses for Medical Image Segmentation). The third is Boundary DoU, which reports a 2.3-point Dice gain and an HD drop from 31.45 mm to 26.29 mm on Synapse with a UNet. These three are the strongest competitors because each already injects geometry into the loss. Our claim survives only if adding spatial transport across scales beats geometry applied at output resolution. Each will be re-implemented in one codebase on the same backbone, data splits, augmentation and epoch budget. Each gets an equal hyperparameter search of the same number of trials over its own weight and schedule.

The strongest system-level competitor on polyps is Polyper (Polyper: Boundary Sensitive Polyp Segmentation). It refines boundaries by cross-attending interior features into an eroded and dilated boundary band, and reports 86.51% mean Dice on ETIS against 81.00% for SegT. CaraNet (CaraNet: Context Axial Reverse Attention Network for Segmentation of Small Medical Objects) reports 74.7% mean Dice on ETIS and is a secondary architectural reference. We will not try to out-architect Polyper. Instead we will retrain Polyper under its own protocol with and without our loss.

Beating Polyper means the loss-augmented Polyper exceeds our own reproduction of Polyper on ETIS mean Dice, with the gain concentrated in the small-polyp subset. We will compare against our reproduction, not only the reported 86.51, so that implementation drift does not create a spurious gain.

Two ablations isolate the key ingredient. The first, "NWD for masks," fits a single Gaussian to each predicted and true mask by first and second moments and uses the closed-form Gaussian distance at each scale. This is the obvious extension of A Normalized Gaussian Wasserstein Distance for Tiny Object Detection to segmentation. The second applies the sliced transport only at full resolution, separating the transport effect from the multi-scale effect. We will also vary the number of directions $K$ to check that a handful suffice.

Why not just…?

Why not just supervise coarse decoder stages with Dice on blurred targets? This is the most serious threat. Blurring the target, as Bounding Maps does for boxes with a continuous center-to-edge decay (Bounding Maps for Universal Lesion Detection), widens the region where overlap is nonzero, which partly restores the missing gradient. Its reach is limited by the blur radius, though. It also changes what "correct" means at the boundary, which is the opposite of what faint-edge segmentation needs. We include Gaussian-blurred deep supervision at three blur widths, each tuned on the same budget. If its best setting matches transport on the small, low-contrast bins and on the disjoint-fraction curve, we will report that the gain comes from coarse-scale soft supervision rather than transport. In that case we would recommend the simpler method.

Why not just use Kervadec's distance-map loss, which already gives distance-weighted gradients everywhere? Its gradient on each pixel is indeed a fixed signed distance, so it is the closest existing mechanism. But the field is precomputed at full resolution and is not normalized by predicted mass. The authors themselves needed Generalized Dice and a ramp schedule because the loss cannot bootstrap detection alone. Our scale ablation answers this directly. We will also run Kervadec's loss applied to pooled targets at every scale. If that multi-scale distance-map variant matches our method, the honest conclusion is that multi-scale geometric supervision, not transport, is the active ingredient.

Why not just fit a Gaussian to each mask and reuse NWD? It is cheap and closed-form. The file notes, however, that rings, vessels and branching lesions violate a single-Gaussian shape assumption, and a moment-matched Gaussian cannot distinguish a myocardial ring from a filled disk. The NWD-for-masks ablation tests this. We expect parity on compact polyps and a gap on ACDC myocardium and on multi-component lesions. If no gap appears even there, the nonparametric version is not worth its extra cost.

Why not just crop at high resolution with a two-stage pipeline, or preserve detail with better pooling? Cropping relies on a first stage that must already find the faint lesion. The two-stage BraTS pipeline in Generalized Wasserstein Dice Loss, Test-Time Augmentation, and Transformers for the BraTS 2021 Challenge inherits exactly that failure point. Learnable pooling such as LIP: Local Importance-Based Pooling keeps more detail, raising COCO small-object AP from 21.9 to 24.0 in Faster R-CNN, but it changes the features and leaves the loss unchanged. These approaches combine with ours rather than replacing it. We will run one LIP-backbone variant with and without transport supervision to check that the gains add rather than overlap.

Proposed Experiments

A controlled synthetic study comes first. We generate blobs, rings and two-component shapes on textured noise, sweeping target size from 3 to 40 pixels and contrast from strong to near zero. We train from scratch under every baseline and record the disjoint fraction per scale, the epoch at which targets are first found, and final Dice and HD95. This study decides whether the mechanism exists. If transport does not cut early disjoint fractions at small sizes and low contrast relative to blurred deep supervision, the project stops there.

The main medical studies use benchmarks from the file. For polyps, we use the polyp protocol Polyper follows, with ETIS as the hard test set and Kvasir-SEG, CVC-ClinicDB, CVC-ColonDB and CVC-300 as secondary test sets. Results are stratified by polyp area, with the under-6%-of-image subset reported separately. For tiny unbalanced lesions, we use ISLES and WMH under Kervadec's setup. For low-contrast organs, we use MSD Pancreas, under Amini's setup, and Synapse, under the Boundary DoU setup. For thin rings, we use ACDC myocardium. Metrics are mean Dice, mean IoU and HD95, all stratified by size and contrast, plus training wall-clock overhead. The reported anchors are those cited above. We found no reported per-dataset baseline numbers on Lacuna for Kvasir-SEG, ClinicDB, ColonDB, ACDC or DRIVE, so on those datasets all comparisons rest on our own reruns.

Two checks decide the result. First, gains must concentrate where the theory predicts: the smallest and lowest-contrast bins should improve while large, high-contrast targets stay flat. A uniform small gain would suggest generic regularization rather than restored gradient signal. Second, the improvement must survive the blurred-target and multi-scale distance-map ablations under equal tuning. If either matches transport, we report that outcome as the finding rather than defending the loss.