Medical segmentation models are trained on masks whose edges are drawn as if every boundary pixel were equally knowable. In low-contrast images such as polyps blending into mucosa, the thin esophagus in CT, or breast lesions in speckled ultrasound, some stretches of a boundary are clearly visible and others are pure annotator guesswork. Training with hard labels asks the network to reproduce that guesswork exactly. We propose to measure, for each stretch of annotated boundary, how much the local image actually tells you about which side of the line a pixel falls on. The measure is a local mutual information score between image features and the mask, computed once per training image. The label is then softened in proportion to how uninformative the image is there: it stays sharp where the evidence is clear and becomes a graded transition where it is not.
The two directions meet asymmetrically. Information-theoretic dependency measures supply the tool. These are mutual information and the maximal information coefficient (MIC), a score that searches over grids on a scatter plot to detect nonlinear association. Low-contrast boundary ambiguity is the problem. The hypothesis is that a label that encodes where the boundary is identifiable reduces boundary error and overconfidence, and transfers better to harder, unseen datasets such as ETIS. A network trained this way is no longer forced to memorize annotator habits in regions where the pixels carry no signal.
Core Claim
For a pixel $p$ on the annotated boundary, take a window $W_p$ of radius $r$ that straddles the boundary. Let $Y$ be the binary ground-truth label of pixels in the window, and let $X_k$ be the $k$-th of $K$ one-dimensional random projections of a frozen backbone's features at those pixels. The random-projection "slicing" is borrowed from Sliced MIC. We define boundary identifiability as
$$s_p = \frac{1}{K}\sum_{k=1}^{K} \frac{\hat I(X_k; Y \mid W_p)}{H(Y \mid W_p)},$$
where $\hat I$ is an estimated mutual information and $H(Y \mid W_p)$ is the label entropy in the window. Because $Y$ is binary, $\hat I \le H(Y)$, so $s_p$ lies in $[0,1]$. A value near 1 means the local features nearly determine the label. A value near 0 means the image is silent. The training target is a locally blurred mask,
$$\tilde y(q) = \sigma\!\left(\frac{d(q)}{\tau_{\max}\,(1 - s_{p(q)}) + \tau_{\min}}\right),$$
where $d(q)$ is the signed distance of pixel $q$ to the annotated boundary, $p(q)$ is its nearest boundary pixel, $\sigma$ is the logistic function, and $\tau_{\min}, \tau_{\max}$ set the sharpest and softest transitions.
The claim has three parts. The spatial allocation of softness, set by $s_p$, matters more than softness alone. It must beat a uniform ramp with matched average width. And it must beat simpler contrast statistics wherever the inside and outside of a lesion differ in texture rather than mean intensity.
Relation to Prior Work
The method comes from Sliced Maximal Information Coefficient. That paper projects frozen VGG16 features onto random Gaussian directions, computes 1D MIC per projection, and averages the results into a training-free spatial map that reweights image-quality error maps. It raised LPIPS from SRCC 0.670 to 0.867 on TID2013. It compares a reference image with a distorted image and never touches labels or segmentation. We reuse its slicing but measure dependency between features and the ground-truth mask. That turns a saliency map into a statement about how well the label is supported by the image.
The choice of estimator is constrained by Equitability, mutual information, and the maximal information coefficient. It shows that MIC's claimed equitability is unattainable, that k-nearest-neighbour (k-NN) mutual information has more statistical power, and that k-NN MI runs about 600 times faster. We therefore treat k-NN MI as the default estimator and MIC as a compared alternative, not the other way round. Because $s_p$ is computed once per dataset offline, MIC's cost does not affect training time. The comparison can therefore be decided on accuracy alone.
The motivation comes from the boundary literature. Bounding Maps for Universal Lesion Detection replaced hard boxes with a handcrafted linear ramp from 1.0 at the centroid to 0.5 at the edge. This lifted Faster R-CNN sensitivity at 4 false positives per image from 82.43% to 86.28%, which is evidence that soft targets help. The ramp is geometric and identical everywhere, whereas ours varies along the boundary with local evidence.
Contour-branch methods take a different route. Multi-scale Features and Contour Loss Constrain supervises a contour branch with Canny-derived edges, and MISNet adds edge-supervised axial boundary attention. Both treat every edge pixel as equally certain.
Other methods push in the opposite direction. The Overlap Loss in Combating Uncertainty with Novel Losses for Automatic Left Atrium Segmentation and the threshold polarization in Parallel Res2Net with Reverse Attention force confident boundary decisions everywhere. On the atrium data, forcing confidence helped (82.01% to 89.83% Dice), which appears to contradict us. We address this directly below. The contradiction is only apparent if confidence is warranted where contrast exists and harmful where it does not, which is exactly what $s_p$ separates.
Research Program
The first stage builds the identifiability map. We will compute $s_p$ with three estimators: k-NN MI with $k=1$, following the corrected setting in the equitability paper; histogram MI; and 1D MIC. Each is applied to two feature sources, raw intensity or color and random slices of a frozen ImageNet backbone. We will fix $r$ from a small grid on validation data, with $K$ around 32.
The second stage validates $s_p$ as a measurement, before any training benefit is claimed. It should predict where a conventionally trained model makes boundary errors. Concretely, the per-boundary-pixel distance between prediction and ground truth should be larger where $s_p$ is low. The correlation should hold both within an image and across datasets, and ETIS should show lower mean $s_p$ than Kvasir.
The third stage trains with the soft targets $\tilde y$. The loss is cross-entropy on $\tilde y$ plus Dice on the hard mask, so that region overlap is still anchored. The loss is plugged into a plain U-Net and into MISNet, which tests whether the gain is additive to strong boundary architectures.
Baselines
The naive reference is the same backbone trained with Dice plus cross-entropy on hard masks. It uses the identical augmentation, schedule, and tuning budget, with the same number of hyperparameter trials for every method.
The strongest softness competitor is a uniform distance-based ramp with fixed $\tau$ in the style of Bounding Maps. We will tune its width over the same grid as ours and also match its mean width to ours. Beating it at matched mean width is the core requirement, because then only the placement of softness differs.
The strongest statistical competitor is a contrast-adaptive ramp. It replaces $s_p$ with a local Fisher ratio: the squared difference of inside and outside means over their summed variances, computed on the same features and windows and squashed to $[0,1]$. It is the natural linear counterpart to MI. A second linear counterpart uses squared Pearson correlation between the feature slice and the label in place of MI.
The shuffled-map ablation keeps the exact distribution of $s_p$ values but permutes them along each boundary. It isolates whether spatial alignment of softness with evidence matters.
We also run the published boundary methods as competitors on our splits. These are the Canny contour branch with a 90/10 loss split, as in the contour-loss paper, and Overlap Loss with Focal Positive Loss. MISNet is the strongest existing polyp method; it reports mDice 0.903 on Kvasir-SEG and 0.918 on CVC-ClinicDB, and a 16.8% drop on ETIS against over 38% for earlier models. For the left atrium, the uncertainty-loss framework reports 92.24% Dice on the Atrial Segmentation Challenge 2018 test volumes. For the SegTHOR esophagus, EMSN reports DSC 0.8597. For BUSI, LSSF-Net reports Jaccard 92.99%.
We will reproduce these under our pipeline rather than compare against copied numbers. "Beating" means a statistically significant improvement over the best reproduced competitor, measured by paired bootstrap over test images. The improvement must appear in 95th-percentile Hausdorff distance (HD95), boundary F-score, or boundary-band calibration error, without losing more than 0.5 Dice points. For MISNet, the test is whether adding our targets narrows its ETIS drop below 16.8% under a reproduced setup.
Why not just…?
Why not just use a uniform soft boundary or label smoothing? This is the most likely reason a gain could appear without our mechanism, since Bounding Maps already shows that softness helps. The matched-width uniform ramp and the shuffled-map ablation test it directly. If both match us, the correct conclusion is that softness, not information, drives the gain, and we will report it that way.
Why not just use local contrast instead of mutual information? This is a real threat. For raw intensity with roughly Gaussian inside and outside distributions, MI and a Fisher ratio rank windows almost identically. MI should earn its place only where the two sides differ in texture or multimodal color rather than mean. Polyps on mucosa, dermoscopy, and ultrasound speckle are candidate cases, and the Fisher and Pearson baselines on identical features settle the question. If contrast ties MI everywhere, the proposal reduces to contrast-adaptive label softening, which is simpler and still a useful result.
Why not just use the network's own predictive uncertainty? Softmax entropy from a trained model marks where the model is unsure. That conflates image ambiguity with the model's own undertraining and requires an extra training round. We include a variant that sets $s_p$ from one minus normalized entropy of the naive model's predictions. $s_p$ computed from features and labels should predict errors on held-out datasets better, because it does not depend on what one model happened to learn.
Why not just use MIC throughout, as Sliced MIC did? The equitability analysis gives principled reasons to prefer k-NN MI. The Sliced MIC results give empirical reasons to take MIC seriously in vision. Since our computation is offline, we run both and let boundary metrics decide.
Proposed Experiments
Polyp models are trained on Kvasir-SEG and tested on Kvasir-SEG, CVC-ClinicDB, and ETIS-LaribPolypDB, with ETIS serving as the transfer test for concealed, low-contrast polyps. For volumetric low-contrast boundaries we use the Atrial Segmentation Challenge 2018 and the esophagus in SegTHOR. For speckle-noise ultrasound we use BUSI and DDTI. Metrics are Dice, HD95, boundary F-score at a 2-pixel tolerance, and expected calibration error restricted to a band around the boundary.
The first decisive check is the measurement test. $s_p$ must correlate negatively with the naive model's per-pixel boundary error, and it must correlate more strongly than the Fisher ratio does on texture-dominated datasets. If $s_p$ fails this test, training results are uninterpretable and we stop.
The second decisive check is the matched-width comparison against the uniform ramp, together with the shuffled-map ablation. We expect improvements concentrated in HD95 and boundary calibration rather than Dice.
The third decisive check is the ETIS transfer gap. The prediction is that the gain grows on the harder, unseen dataset, because label noise that the model learned to fit on Kvasir hurts most there.
The Overlap Loss result is reconciled in the atrium experiments by partitioning boundary pixels into high- and low-$s_p$ groups. Our account predicts that Overlap Loss helps in the high-$s_p$ group and hurts calibration in the low-$s_p$ group, and that our targets help mainly in the low-$s_p$ group. The data will show whether that split holds or whether forced confidence helps everywhere.
References
- Sliced Maximal Information Coefficient: A Training-Free Approach for Image Quality Assessment Enhancement
- Equitability, mutual information, and the maximal information coefficient
- Bounding Maps for Universal Lesion Detection
- 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
- Parallel Res2Net-based Network with ReverseAttention for Polyp Segmentation