Abstract
Precise lens structure segmentation is essential for the design of intraocular lenses (IOLs) in cataract surgery. Existing deep segmentation networks typically weight all pixels equally under cross-entropy (CE) loss, overlooking the fact that sub-regions of lens structures are inhomogeneous and that boundary regions often suffer from poor segmentation calibration. We propose an Adaptive Confidence-Wise (ACW) loss to group lens structure sub-regions into different confidence levels via a dynamic threshold, exploiting expert annotation confidence priors. Specifically, ACW clusters target regions into low-confidence and high-confidence groups, applying a region-weighted loss to reweigh them. Furthermore, we introduce Boundary Expected Calibration Error (BECE) to better quantify miscalibration in boundary regions. Extensive experiments demonstrate that ACW significantly outperforms competitive methods, achieving a 6.13% IoU gain and a 4.79% BECE reduction in lens structure segmentation using U-Net.
Introduction
In cataract surgery, highly precise segmentation of lens structures—including the nucleus, cortex, and capsule—from Anterior Segment Optical Coherence Tomography (AS-OCT) images is a prerequisite for successful intraocular lens (IOL) design. While deep learning has advanced medical image segmentation, standard loss functions like Cross-Entropy (CE) treat every pixel with equal importance. This approach ignores the inherent "inhomogeneity" of medical images: certain structures, like the lens capsule, have much more ambiguous boundaries and smaller proportions than others. Clinically, experts naturally focus more on these low-confidence regions. Models trained with uniform weighting often become overconfident yet inaccurate at boundaries, leading to poor calibration—a significant safety concern in clinical applications.
Methods
Adaptive Confidence-Wise (ACW) Loss
The proposed ACW loss shifts the focus from a pixel-level perspective to a region-level perspective. It operates in two primary stages:
- Clustering via Adaptive Confidence Threshold Optimization (ACTO): Instead of using a static threshold, the ACTO algorithm dynamically sets a confidence threshold based on the 80th percentile ($Q_{80}$) of predicted probabilities. This ensures a stable 8:2 ratio between high-confidence ($R_h$) and low-confidence ($R_l$) pixels throughout training, preventing loss collapse as the model's overall certainty increases.
- Region-Weighted Loss: Once pixels are grouped, ACW applies a suppression term to downweight "easy" high-confidence pixels and an enhancement term to amplify "hard" low-confidence pixels. This forces the network to concentrate its learning capacity on ambiguous boundaries and small, difficult structures.
Boundary Expected Calibration Error (BECE)
To address the limitations of standard Expected Calibration Error (ECE), which measures global calibration, we propose BECE. This metric specifically calculates the discrepancy between accuracy and confidence at structural boundaries, where segmentation errors are most clinically impactful.
Experimental Results
The ACW loss was evaluated on a clinical Lens AS-OCT dataset (857 images), a multi-structure AS-OCT dataset, and the public Synapse multi-organ CT dataset.
Performance Gains
On the Lens AS-OCT dataset using a U-Net backbone, ACW achieved:
- 6.13% increase in IoU and 4.33% increase in Dice Similarity Coefficient (DSC) compared to standard CE.
- 4.79% reduction in BECE, indicating significantly improved reliability at structural boundaries.
- Small Structure Improvement: The capsule region, typically the most challenging to segment, saw a DSC increase from 71.28% (CE) to 81.96% (ACW).
Generalization
The method demonstrated robustness across various architectures, including TransUNet and MedSAM. On the Synapse dataset, ACW improved IoU by 3.08% and DSC by 2.48%, proving its utility beyond ophthalmic imaging.
Discussion and Conclusion
The ACW loss effectively translates clinical intuition—that difficult regions deserve more attention—into a mathematical framework. By dynamically weighting regions based on confidence and introducing the BECE metric, this work provides a path toward more accurate and better-calibrated medical image segmentation. While imaging artifacts remain a challenge, the significant gains in both accuracy and calibration highlight the potential of confidence-wise optimization in safety-critical medical AI applications.
The code for this project is available at: https://github.com/XiaoLing12138/Adaptive-Confidence-Wise-Loss
Summary updated