Source-linked AI summary
Beyond Accuracy: Uncertainty-Guided Boundary Refinement for Reliable Biomedical Image Segmentation
Anima Kujur
TL;DR
WBC segmentation can achieve high overlap while remaining unreliable at morphology-relevant boundaries. RABR-Net combines uncertainty and boundary cues to guide localized residual refinement, improving boundary-sensitive results while calibration does not automatically improve.
Problem
WBC segmentation models may remain overconfident at ambiguous boundaries, while overlap-focused evaluation does not fully assess boundary trustworthiness.
Source: §1 · p. 2Method
RABR-Net combines uncertainty and boundary cues into a reliability representation that guides gated residual corrections to uncertain boundary pixels while preserving confident predictions.
Source: §1 · p. 2, §4.5 · p. 11Results
RABR-Net achieves the best Dice, Boundary Dice, and HD95 among compared settings, with gains concentrated in boundary-sensitive metrics.
Source: §5.10 · p. 22, §7 · p. 26Takeaways & Limitations
The method’s spatially localized corrections target uncertain contours, with gates and correction maps making the refinement process inspectable.
Source: §5.10 · p. 22, §7 · p. 26Calibration does not automatically improve, and refinement may leave errors unresolved or introduce small boundary errors when uncertainty misses errors, predictions are confidently wrong, or image degradation obscures contours.
Source: §5.9 · p. 22
Abstract
from arXiv · showhide
Accurate biomedical image segmentation requires not only high global overlap but also reliable delineation of clinically meaningful boundaries. In blood-smear microscopy, cytoplasm and nucleus contours provide the structural basis for downstream morphology analysis; however, deep segmentation models may remain uncertain or overconfident near ambiguous boundary regions even when achieving strong Dice scores. This work proposes a Reliability-Aware Boundary Refinement Network (RABR-Net), a two-stage framework for trustworthy image segmentation. A strong UNet++ EfficientNet-B4 base segmenter first produces initial class probabilities and logits. Predictive entropy, test-time augmentation variance, margin uncertainty, probability gradients, and soft boundary cues are then combined into a boundary-aware reliability representation. This representation guides a gated residual refiner that selectively corrects uncertain boundary pixels while preserving confident regions of the base prediction. The framework is evaluated using overlap accuracy, class-wise Dice, Boundary Dice, HD95/ASSD, calibration, risk--coverage analysis, robustness under image perturbations, qualitative correction maps, and paired statistical testing. On the held-out test set, the proposed method improves Dice from 0.9602 to 0.9614, Boundary Dice from 0.3448 to 0.3611, and HD95 from 3.0354 to 2.8274 compared with the cached base prediction. Statistical analysis confirms significant improvements in Dice, Boundary Dice, and HD95. Qualitative results show that the learned gate concentrates around uncertain cytoplasm and nucleus boundaries, and correction maps confirm localized boundary refinement. Although calibration does not automatically improve after refinement, the proposed framework provides an interpretable and reliability-focused strategy for boundary-sensitive biomedical image segmentation.
1 Introduction
WBC boundaries carry morphology-relevant information that global overlap scores may not capture, yet segmentation models can remain uncertain or overconfident at ambiguous contours. RABR-Net combines uncertainty and boundary cues to guide localized residual corrections while preserving confident predictions.
1 Introduction
- Boundary errors can distort downstream measurements of nuclear area, cytoplasmic volume, nuclear irregularity, and nucleus-to-cytoplasm ratio despite high global Dice.Staining, illumination, weak cytoplasm boundaries, and irregular or multilobed nuclear contours create ambiguity in blood-smear images.Source: §1 · p. 2
- WBC segmentation is framed as a trustworthiness problem requiring boundary quality, uncertainty, calibration, robustness, and interpretability alongside overlap scores.The evaluation includes class-wise Dice, Boundary Dice, HD95/ASSD, calibration, risk–coverage, perturbation robustness, correction maps, and paired statistical testing.Source: §1 · pp. 2–3
- RABR-Net uses a two-stage pipeline in which uncertainty and boundary cues guide a gated residual refiner to correct uncertain pixels while preserving confident base predictions.The base segmenter is UNet++ with an EfficientNet-B4 encoder.Source: §1 · p. 2
- The method combines predictive entropy, test-time augmentation variance, margin uncertainty, probability gradients, and soft boundary cues to localize ambiguous boundaries.The gated refiner selectively adjusts uncertain boundary pixels rather than replacing the full segmentation.Source: §1 · p. 2
- The framework aims to make boundary corrections spatially inspectable through uncertainty maps, refiner gates, and correction maps.Accurate WBC component segmentation provides structural support for quantitative morphology analysis.Source: §1 · pp. 2–3
2 Related Work
Prior work supplies architectural, loss, uncertainty, calibration, and selective-prediction foundations for biomedical segmentation. The paper builds on these threads while focusing on boundary reliability and uncertainty-guided refinement for WBC segmentation.
2.1 Deep Learning Architectures for Biomedical Image Segmentation
- The paper uses a UNet++ decoder with a pretrained EfficientNet-B4 encoder, focusing on boundary reliability rather than proposing a new backbone.The reviewed architectures include U-Net, Attention U-Net, V-Net, TransUNet, and nnU-Net.Source: §2.1 · p. 3
2.2 Loss Functions for Class-Imbalanced and Boundary-Sensitive Segmentation
- Boundary- and imbalance-aware losses motivate explicit boundary-derived cues because regional losses can underemphasize small or thin contours.The discussion contrasts Generalized Dice, boundary loss, and focal loss before motivating probability-gradient and soft-boundary inputs.Source: §2.2 · p. 3
2.3 Uncertainty Quantification in Deep Neural Networks
- RABR-Net combines predictive entropy, test-time augmentation variance, and margin uncertainty rather than relying on a single uncertainty estimator.The cited work distinguishes test-time dropout, ensemble disagreement, test-time augmentation uncertainty, and softmax confidence.Source: §2.3 · p. 4
2.4 Calibration of Segmentation Models
- Calibration is evaluated alongside overlap and boundary accuracy because boundary refinement does not automatically resolve confidence-calibration issues.The paper uses confidence histograms, expected calibration error, and reliability diagrams.Source: §2.4 · p. 4
2.5 Selective Prediction and Risk–Coverage Analysis
- The paper adapts risk–coverage analysis from classification to pixel-wise segmentation to measure accuracy as uncertain pixels or regions are excluded.The framework examines how boundary accuracy and Dice degrade as coverage changes.Source: §2.5 · p. 4
2.6 White Blood Cell Segmentation Datasets and Methods
- Prior WBC datasets and methods establish both the data foundation and domain-specific challenges, including ambiguous cytoplasm boundaries and imaging variability.Raabin-WBC provides about 40,000 images, with segmentation ground truth for a curated subset; other work evaluates WBC segmentation across Raabin-WBC, LISC, and BCCD.Source: §2.6 · pp. 4–5
2.7 Dynamical Systems Perspectives on Uncertainty
- As an exploratory proof of concept, the paper treats uncertainty maps under controlled perturbations as observables of an underlying dynamical process.The discussion draws on Koopman operator theory and deep-autoencoder approaches to discovering Koopman eigenfunctions.Source: §2.7 · p. 5
3 Data
The study uses WbcMSBench WBC microscopy images with three semantic labels, predefined data splits, and training-only augmentation. Base predictions and uncertainty cues are cached for refinement, with the held-out test set reserved for final reporting.
3 Data
- The study evaluates three-class WBC segmentation on WbcMSBench from the MedSegBench benchmark suite using RGB images and pixel-wise masks.The classes are background, cytoplasm, and nucleus.Source: §3 · p. 5
3.2 Segmentation Labels
- Masks distinguish background, cytoplasm, and nucleus, and evaluation includes class-wise Dice, Boundary Dice, HD95, and ASSD alongside global overlap metrics.The foreground WBC region is defined as the union of cytoplasm and nucleus.Source: §3 · p. 5, §3.2 · p. 6
3.3 Preprocessing
- Images and masks are resized to 256 × 256 pixels, with nearest-neighbor interpolation used for masks to preserve integer class labels.Images are converted to RGB tensors in [0, 1], and test-set intensity statistics are not used for normalization.Source: §3 · p. 5, §3.3 · p. 6
3.1 Dataset Splits
- Official train, validation, and test splits support optimization, model selection, and final reporting, respectively.The same separation is maintained for the base segmenter and refinement module.Source: §3.1 · p. 5
3.4 Training-Time Data Augmentation
- Training-only augmentation simulates microscopy variability through geometric, photometric, noise, blur, and elastic transformations.The same geometric transform is applied to image and mask, while photometric transforms affect only the image; validation and test images are not augmented.Source: §3.4 · pp. 6–7
3.5 Cached Prediction Data for Refinement
- Cached base predictions make refinement modular and reproducible, allowing the refiner to be trained or evaluated without rerunning the base segmenter.The cache includes images, masks, base logits and probabilities, and test-time augmentation variance; probabilities are combined with uncertainty and boundary maps for the reliability tensor.Source: §3.5 · p. 7
3.6 Held-Out Test Protocol
- The held-out test set is used only after model choices, post-processing settings, and the evaluation protocol are fixed.Final reporting covers accuracy, boundary quality, calibration, risk–coverage behavior, robustness, and statistical reliability.Source: §3.6 · p. 7
4 Methods
RABR-Net pairs a base WBC segmenter with a reliability-guided refinement stage that makes local corrections while preserving confident predictions. The methods specify three-class pixelwise segmentation, a UNet++ EfficientNet-B4 base model, and a compound loss that includes boundary Dice.
4 Methods
- The refinement stage uses uncertainty and boundary-derived information to guide gated residual corrections to uncertain cytoplasm and nucleus boundaries while preserving confident base predictions.The framework is designed as a two-stage segmentation-refinement pipeline.Source: §4 · p. 7
4.1 Problem Formulation and Notation
- Inputs use three semantic labels—background, cytoplasm, and nucleus—with H = W = 256, and refinement takes the image, base probabilities, uncertainty maps, and boundary-derived maps.The refinement stage predicts a refined segmentation.Source: §4.1 · p. 8
4.2 Base Segmentation Model
- The base segmenter is UNet++ with an ImageNet-initialized EfficientNet-B4 encoder, trained with AdamW and cosine annealing for up to 150 epochs with early stopping.The selected base model balances global overlap and boundary quality.Source: §4.2 · pp. 8–9
4.3 Compound Segmentation Loss
- Training combines cross-entropy, multiclass Dice, focal, and differentiable boundary Dice losses, with respective weights 0.35, 0.35, 0.10, and 0.20.Boundary Dice is included because high-performing WBC models may be weak on boundary accuracy.Source: §4.3 · p. 9
4.4 Uncertainty Estimation
The base model’s probabilistic outputs are used to estimate pixelwise uncertainty for downstream refinement. Entropy, class-margin uncertainty, and test-time augmentation variance capture complementary uncertainty signals.
4.4 Uncertainty Estimation
- Normalized predictive entropy lies in [0, 1], with higher values indicating greater uncertainty in the base prediction.The uncertainty maps are used to construct the refinement network’s reliability-aware input.Source: §4.4 · p. 10
- Margin uncertainty is based on the difference between the two largest class probabilities, so similar top-two probabilities indicate greater uncertainty.Source: §4.4 · p. 10
- Test-time augmentation evaluates horizontal and vertical flips and their combination, then estimates uncertainty from the mean class-wise variance across transformations.The variance map is normalized image-wise by its maximum value.Source: §4.4 · p. 10
4.5 Boundary-Aware Reliability Map
The boundary-aware reliability representation combines uncertainty and boundary cues to guide a gated residual refiner. The refiner applies localized corrections, with gate regularization discouraging unnecessary changes.
4.5 Boundary-Aware Reliability Map
- The refiner input concatenates the image, averaged base probabilities, and five one-channel reliability maps into an 11-channel tensor.The maps include entropy, margin uncertainty, TTA uncertainty, probability-gradient magnitude, and a soft boundary hint.Source: §4.5 · p. 11
- The reliability score weights entropy at 0.25 and margin, TTA variance, and probability gradients at 0.20 each, with soft boundary cues weighted at 0.15.A boundary-weighted map multiplies this score by 0.5 + 0.5Ubd and supports interpretation and visualization of uncertain boundary regions.Source: §4.5 · p. 11
4.6 Gated Residual Refinement Network
- The refiner predicts residual logit corrections and a spatial gate, which controls where corrections affect the base logits.When the gate is near zero the base prediction is preserved; near one, the residual has stronger influence.Source: §4.6 · p. 12
- The compact encoder-decoder refiner uses a skip connection, a residual head, and a sigmoid gate head, with base channel width 48.Source: §4.6 · p. 12
- Gate regularization uses λg = 0.005 and discourages unnecessary spatial corrections, encouraging the refiner to act only where needed.Source: §4.6 · p. 12
4.7 Biology-Aware Post-Processing
Optional post-processing applies WBC-specific foreground and nucleus constraints to the refined mask. It removes small components, fills foreground holes, and keeps nucleus pixels inside the foreground.
4.7 Biology-Aware Post-Processing
- Post-processing assumes WBC foreground consists of cytoplasm and nucleus, with nucleus pixels lying inside the main cell foreground region.Source: §4.7 · p. 12
- Foreground components smaller than 40 pixels are removed, and the largest remaining foreground connected component is retained.Source: §4.7 · p. 13
- Foreground holes are filled, nucleus pixels are constrained inside the foreground, and nucleus components smaller than 15 pixels are removed.The procedure is described as preserving multilobed nuclear structures while removing implausible small islands and enforcing foreground consistency.Source: §4.7 · p. 13
4.8 Evaluation Metrics
The evaluation covers overlap accuracy, boundary quality, calibration, uncertainty-error alignment, and selective prediction reliability. Metrics are defined for the two foreground classes, with calibration also assessed on foreground and boundary pixels.
4.8 Evaluation Metrics
- Dice and IoU are defined per class, with mean scores computed over cytoplasm and nucleus.The predictions and ground truth are compared for each foreground class.Source: §4.8 · p. 13
- Boundary Dice compares extracted predicted and ground-truth boundaries and is averaged over cytoplasm and nucleus.Binary boundaries are extracted for each foreground class before computing the metric.Source: §4.8 · pp. 13–14
- HD95 and ASSD use foreground-class boundaries and are averaged over the two foreground classes.Surface distances use each boundary point’s Euclidean distance to the nearest point in the other boundary set.Source: §4.8 · p. 14
- ECE is assessed overall, on foreground pixels, separately for cytoplasm and nucleus, and at ground-truth boundary locations.Foreground ECE restricts pixels to y(u) > 0; boundary ECE restricts them to ground-truth boundaries.Source: §4.8 · p. 14
- Uncertainty-error alignment is measured by Pearson correlation, while selective risk retains the lowest-uncertainty pixels and is reported at 80%, 90%, and 95% coverage.Risk–coverage AUC integrates risk over 20 uniformly spaced coverage values from 0.05 to 1.00.Source: §4.8 · pp. 14–15
4.9 Robustness Evaluation
Robustness is evaluated under deterministic microscopy-style image perturbations at multiple severity levels. Paired image-level analyses compare base and proposed predictions using bootstrap intervals and Wilcoxon tests.
4.9 Robustness Evaluation
- The test images receive deterministic perturbations at severity levels 0–5, including brightness, contrast, gamma, blur, noise, JPEG compression, and stain-like color shifts.Severity 0 denotes the clean image; robustness is reported with Dice, Boundary Dice, HD95, and ECE.Source: §4.9 · p. 15
4.10 Statistical Analysis
- Paired image-level differences compare base and proposed predictions, with 5,000 bootstrap resamples used for confidence intervals and paired Wilcoxon signed-rank tests.The reported statistics include mean difference, bootstrap confidence interval, Wilcoxon p-value, and improved, worsened, and unchanged case counts; lower-is-better metrics use the corresponding sign convention.Source: §4.10 · p. 16
5 Results
RABR-Net adds uncertainty-guided gated residual refinement to a strong WBC segmenter, targeting local contour errors while preserving confident predictions. On the held-out test set, it improves Dice, Boundary Dice, and HD95 over the cached base prediction, while calibration and robustness analyses reveal remaining limitations.
5.1 Experimental Setting and Evaluation Protocol
- RABR-Net was evaluated for three-class WBC segmentation using overlap, class-wise, boundary, calibration, risk–coverage, and perturbation robustness measures, with model selection on validation data and final reporting on the test set.The baseline was UNet++ with an EfficientNet-B4 encoder; refinement was applied as a second stage.Source: §5 · p. 16, §5.1 · pp. 16–17
5.2 Main Quantitative Comparison
- Dice rose from 0.9602 for the cached base prediction to 0.9614 after refinement and biological post-processing; Boundary Dice rose from 0.3448 to 0.3611, and HD95 fell from 3.0354 to 2.8274.Table 2 presents the held-out test comparison; the reported gains are strongest for boundary-sensitive metrics.Source: §5.2 · p. 17, Table 2 · p. 17
5.3 Boundary-Focused Refinement Analysis
- Correction maps show changes concentrated near cytoplasm and nucleus boundaries; a representative example improved Dice by 0.004 and Boundary Dice by 0.062.The zoomed analysis describes thin adjustments along outer cytoplasm and inner nucleus boundaries rather than broad mask replacement.Source: §5.3 · p. 18, Figure 2 · p. 18
5.4 Refiner Gate and Correction Mechanism
- The gate activates primarily around uncertain cytoplasm and nucleus boundaries, making the refiner a spatially inspectable reliability-guided correction module rather than an unconstrained second segmenter.Entropy, TTA variance, margin uncertainty, probability gradients, and a soft boundary hint form the reliability map; gate responses concentrate where uncertainty and boundary evidence overlap.Source: §5.4 · pp. 18–19, §5.5 · p. 19
5.6 Robustness Under Microscopy Perturbations
- The selected base model remained relatively stable under blur, noise, and JPEG compression, but high-severity contrast, brightness, and stain-like color shifts caused larger drops; contrast severity 5 yielded Dice 0.8815 and Boundary Dice 0.2588.This robustness analysis covers the base model; full perturbation-level evaluation of the final refinement pipeline is identified as future work.Source: §5.6 · p. 20, Table 3 · p. 21
5.7 Ablation Study
- Boundary Dice increased from 0.3448 for the cached base prediction to 0.3609 after refinement; biological post-processing added smaller gains, while component-wise reliability ablations remain future work.The ablation attributes the largest improvement to the reliability-guided gated residual refiner.Source: §5.7 · pp. 20, 22, Table 4 · p. 22
5.8 Statistical Reliability of the Improvement
- Paired per-image comparisons, bootstrap confidence intervals, paired significance tests, and direction-aware improved, worsened, or equal counts were used to assess statistical reliability.The analysis was intended to distinguish systematic boundary correction from gains concentrated in a few examples.Source: §5.8 · p. 22, Table 5 · p. 23
5.9 Failure Cases and Limitations Observed in the Results
- Refinement may leave errors unresolved or introduce small boundary errors when uncertainty misses the true error, the base model is confidently wrong, or image degradation obscures contours; probability calibration also does not automatically improve.The overall reported gains primarily come from correcting uncertain boundary regions rather than globally changing the mask.Source: §5.9 · p. 22, §5.10 · p. 22
6 Discussion
RABR-Net’s strongest discussion-level gains are in boundary-sensitive geometry, while calibration remains a separate challenge. Its uncertainty and correction maps make refinement inspectable, but the study’s scope and validation needs constrain practical conclusions.
6.1 Boundary-Sensitive Improvement
- Boundary Dice improved from 0.3448 to 0.3611 and HD95 decreased from 3.0354 to 2.8274 versus the cached base prediction on the held-out test set.The authors describe the HD95 improvement as reducing extreme boundary deviations.Source: §6.1 · pp. 23–24
6.2 Why the Global Dice Gain Is Small but Meaningful
- Dice increased from 0.9602 to 0.9614 versus the cached base prediction; paired analysis found significant improvements in Dice, Boundary Dice, and HD95.The authors relate the modest Dice gain to the strong baseline and the small image area occupied by boundaries.Source: §6.2 · p. 24
6.3 Calibration Does Not Automatically Improve After Refinement
- ECE increased from 0.0079 to 0.0145 after refinement; calibration remains distinct from spatial accuracy and may require calibration-aware objectives or post-hoc recalibration.The discussion notes that logit changes and discrete post-processing can alter confidence without recalibrating probability maps.Source: §6.3 · p. 24
6.4 Interpretability Through Uncertainty and Correction Maps
- Entropy, TTA variance, margin uncertainty, and probability gradients help localize unreliable regions, while learned gates and correction maps show boundary-focused changes and unresolved or new errors.The gate concentrates near cytoplasm and nucleus boundaries rather than uniformly across the image.Source: §6.4 · pp. 24–25
6.5 Clinical and Biological Relevance
- Accurate contours support morphology measurements, but RABR-Net is segmentation support rather than diagnosis; its maps aid inspection and do not replace expert validation.The discussion connects contours to cell area, nuclear shape, cytoplasmic area, and nucleus-to-cytoplasm ratio.Source: §6.5 · p. 25, §6.7 · pp. 25–26
6.6 Robustness Under Image Perturbations
- Blur, noise, and JPEG compression caused relatively moderate degradation, while stronger contrast, brightness, and stain-like shifts caused larger drops at higher severity.The discussion identifies color and intensity distribution shifts as continuing challenges.Source: §6.6 · p. 25
6.7 Limitations
- Evaluation used one benchmark and fixed split; generalization needs independent validation, and refinement can fail when the base model is confidently wrong or structural assumptions meet complex or overlapping cells.Biological post-processing preserves the main foreground component and constrains nucleus pixels within the cell foreground.Source: §6.7 · p. 25
6.8 Future Work
- Future work calls for external validation, calibration-aware refinement, topology- or shape-aware constraints, and testing whether masks improve downstream morphology measurements.Proposed calibration approaches include temperature scaling and differentiable ECE surrogates.Source: §6.8 · p. 26
7 Conclusion
RABR-Net refines uncertain boundary regions while preserving confident predictions. On the held-out test set, it improved Dice, Boundary Dice, and HD95 over the cached base prediction, although calibration did not automatically improve.
- The refiner selectively corrects uncertain boundary regions while preserving confident predictions.Source: §7 · p. 26
- On the held-out test set, RABR-Net improved global Dice, Boundary Dice, and HD95 compared with the cached base prediction.The largest gains were in boundary-sensitive metrics; qualitative visualizations showed boundary-focused gates and localized correction.Source: §7 · p. 26
- Improved segmentation geometry does not automatically imply improved probability calibration; ECE increased after refinement.The conclusion recommends calibration-aware objectives or post-hoc recalibration.Source: §7 · p. 26