Class and Region-Adaptive Constraints for Network Calibration

Balamurali Murugesan, Julio Silva-Rodríguez, Ismail Ben Ayed, Jose Dolz

Abstract

Reliable medical image segmentation requires not only high overlap accuracy but also well-calibrated uncertainty estimates. Standard training objectives often lead to overconfident models, particularly at anatomical boundaries, which can have critical consequences in clinical decision-making. We introduce Class and Region-Adaptive Constraints (CRaC), a novel framework that treats calibration as a constrained optimization problem. By utilizing the Augmented Lagrangian Method (ALM), CRaC automatically learns class-specific and spatially-aware penalty weights, distinguishing between "inner" regions and "outer" boundaries. Evaluated on the ACDC and FLARE benchmarks, CRaC consistently outperforms existing regularization techniques in both Expected Calibration Error (ECE) and Dice Similarity Coefficient (DSC), providing a robust, self-tuning solution for medical AI deployment.

Introduction

Deep Neural Networks (DNNs) have become the standard for medical image segmentation. However, their tendency toward overconfidence—where the predicted probability of a class exceeds its actual empirical frequency—poses a significant risk. A model might segment a lesion with 99% confidence while being entirely incorrect, a phenomenon known as miscalibration.

Standard loss functions like cross-entropy are part of the problem; they implicitly minimize entropy and push the model toward "winner-take-all" predictions. While techniques such as label smoothing or fixed penalty constraints have been proposed to mitigate this, they typically apply a uniform regularization strength across the entire image. Such approaches fail to account for the inherent complexities of medical data, such as class imbalance and the varying levels of uncertainty at anatomical boundaries.

The CRaC Framework

The Class and Region-Adaptive Constraints (CRaC) framework addresses these limitations by formulating calibration as a constrained optimization problem. Instead of a static penalty, CRaC introduces a dynamic mechanism to penalize overconfidence based on the specific context of the pixel.

Class and Region-Wise Adaptivity

CRaC recognizes that different anatomical structures and spatial locations require different levels of regularization. The framework assigns independent penalty weights ($\lambda$) based on:

  1. Class-wise Context: Harder-to-segment organs or smaller structures may require different constraints than large, easily identifiable ones.
  2. Spatial Context (Inner vs. Outer): Pixels in the center of an organ ("inner" regions) should naturally exhibit higher confidence than those at the blurry, ambiguous boundaries ("outer" regions). By separating these regions, CRaC allows the model to maintain necessary uncertainty at edges while remaining confident in stable regions.

Optimization via Augmented Lagrangian Method (ALM)

A major hurdle in multi-constraint optimization is the manual tuning of penalty weights. To eliminate this "human-in-the-loop" requirement, CRaC employs the Augmented Lagrangian Method (ALM). This technique transforms the constrained problem into a dual unconstrained one. During training, the penalty weights are updated iteratively based on the model's performance on a validation set. This ensures that the regularization strength adapts as the model learns, "pushing back" against overconfidence only when and where it is detected.

The framework utilizes the Powell-Hestenes-Rockafellar (PHR) penalty function to manage the trade-off between the primary segmentation loss and the adaptive calibration constraints, ensuring stable convergence.

Experimental Evaluation

The researchers evaluated CRaC using two prominent medical imaging datasets:

  • ACDC (Automated Cardiac Diagnosis Challenge): Cardiac MR volumes featuring annotations for the left/right ventricles and myocardium.
  • FLARE (Fast and Low-resource Abdominal Organ Segmentation): Multi-organ abdominal CT volumes.

The framework was integrated into two standard architectures: the classic UNet and the self-configuring nnUNet.

Results and Discussion

CRaC demonstrated superior performance across multiple metrics, ranking first in a multi-criteria Friedman rank analysis against competitive baselines like Focal Loss, Label Smoothing, and NACL.

Calibration and Accuracy

On the ACDC dataset with a UNet backbone, CRaC achieved an Expected Calibration Error (ECE) of 0.057, a substantial improvement over the standard Focal Loss (0.153). Crucially, this improvement in calibration did not come at the cost of segmentation accuracy. CRaC reached a Dice Similarity Coefficient (DSC) of 0.877 on ACDC, the highest among all tested methods. This suggests that proper calibration can actually serve as a beneficial regularizer for the primary segmentation task.

Stability and Robustness

One of the most significant findings was the stability of CRaC compared to previous state-of-the-art methods like NACL. While NACL is highly sensitive to its balancing weight—often requiring extensive grid searches for different datasets—CRaC remains stable because it learns its own optimal parameters. This makes CRaC a more viable candidate for real-world clinical pipelines where data distributions vary significantly.

Conclusion and Future Directions

CRaC represents a significant step toward autonomous, reliable medical image segmentation. By acknowledging that uncertainty is a spatially and categorically varying feature, the framework provides a more nuanced approach to network calibration.

While the current implementation requires a validation set for ALM updates, the trade-off is a significantly more robust model that requires far less manual intervention. Future work may explore increasing the granularity of spatial constraints beyond the binary "inner/outer" definition or extending the framework to fully 3D volumetric contexts.

Summary updated

BibTeX
@inproceedings{murugesan2024class,
  author = {Balamurali Murugesan and Julio Silva-Rodríguez and Ismail Ben Ayed and Jose Dolz},
  title = {{Class and Region-Adaptive Constraints for Network Calibration}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2024},
  doi = {10.1007/978-3-031-72111-3\_6},
}
Figure