Papers
Topics
Authors
Recent
Search
2000 character limit reached

L1-weighted Dice Focal Loss for Lesion Segmentation

Updated 23 June 2026
  • L1DFL is a loss function developed for voxel-wise segmentation that uses dynamic L1-based weighting to focus on hard-to-classify lesion regions.
  • It combines a weighted Dice loss with a focal loss reweighted by voxel error density, enhancing sensitivity to rare and challenging voxels.
  • Experimental results on PSMA PET/CT imaging demonstrate that L1DFL improves segmentation metrics and aligns closely with expert annotations.

L1-weighted Dice Focal Loss (L1DFL) is a supervised loss function developed for voxel-wise segmentation tasks in deep learning, with demonstrated efficacy in automated lesion segmentation in PSMA PET/CT imaging for prostate cancer. L1DFL explicitly integrates dynamic, data-adaptive weighting of voxels based on L₁ norm errors into a weighted Dice-Focal framework, refining the sensitivity of segmentation models to rare, hard-to-classify regions while controlling for the dominance of easy background voxels. The approach yields substantial improvements in quantitative clinical metrics and agreement with expert annotations on complex medical images (Dzikunu et al., 22 Apr 2025, Dzikunu et al., 4 Feb 2025).

1. Mathematical Definition

The L1-weighted Dice Focal Loss re-weights the sum of a squared-denominator Dice loss and a focal loss term by a voxel-wise, data-driven weight derived from prediction error statistics. The full computation is as follows:

  1. L₁ norm calculation (per voxel ii and class cc):

Δi(c)=pi(c)gi(c)\Delta_i(c) = |p_i(c) - g_i(c)|

where pi(c)p_i(c) is the predicted probability and gi(c){0,1}g_i(c)\in\{0,1\} is the ground-truth label.

  1. Density estimation via binning: Bin Δi(c)\Delta_i(c) into non-overlapping bins of width κ\kappa (typically $0.1$ over [0,1][0,1]), constructing a histogram over all voxels and classes in a batch. The density in bin BB is:

cc0

with cc1 as the effective bin width.

  1. Weight assignment: Each bin receives a weight inversely proportional to its density,

cc2

where cc3 is the total number of (voxel, class) pairs; each voxel cc4 uses cc5 for its assigned bin cc6.

  1. Loss combination:
    • Weighted squared-denominator Dice loss:

    cc7

  • Focal loss (with cc8 and cc9):

    Δi(c)=pi(c)gi(c)\Delta_i(c) = |p_i(c) - g_i(c)|0

  • Total L1DFL loss:

    Δi(c)=pi(c)gi(c)\Delta_i(c) = |p_i(c) - g_i(c)|1

All hyperparameters, including Δi(c)=pi(c)gi(c)\Delta_i(c) = |p_i(c) - g_i(c)|2, are fixed across architectures and splits (Dzikunu et al., 22 Apr 2025, Dzikunu et al., 4 Feb 2025).

2. Rationale and Theoretical Motivation

Standard Dice Loss and its derivatives operate globally, treating every voxel or class equally and are typically insensitive to the changing batch-wise distribution of errors. Focal Loss introduces class-level modulation, but not local adaptivity. L1DFL leverages the following rationale:

  • PSMA PET lesion voxels are challenging—small, low-contrast, and irregular—meaning that a small number of difficult voxels can dramatically reduce segmentation fidelity.

  • By estimating the batch-wise distribution of L₁-norm errors and inverting their density, L1DFL dynamically up-weights rare or hard examples (often lesion boundaries or small lesions) and down-weights abundant, easy examples (background).

  • This mechanism adaptively focuses the model’s gradient updates on the specific difficult regions in each mini-batch, leading to improved detection sensitivity, boundary accuracy, and reduced false positives in high class-imbalance regimes (Dzikunu et al., 22 Apr 2025, Dzikunu et al., 4 Feb 2025).

3. Comparison with Other Losses

The table below summarizes key properties distinguishing L1DFL from alternatives:

Loss Function Weighting Mechanism Sensitivity to Hard Voxels Adaptive?
Dice Loss (DL) Uniform None No
Dice+Cross-Entropy Uniform None No
Dice Focal Loss (DFL) Global (focal term) Some (via Δi(c)=pi(c)gi(c)\Delta_i(c) = |p_i(c) - g_i(c)|3) No
L1DFL Per-bin L₁, dynamic High (bin count-inverse) Yes (per-batch)

L1DFL outperforms DL and DFL, particularly in scenarios with small, irregular, or low-contrast lesions, by adaptively targeting high-error voxels (Dzikunu et al., 4 Feb 2025, Dzikunu et al., 22 Apr 2025).

4. Experimental Protocol

L1DFL has been validated primarily in binary lesion segmentation of [¹⁸F]DCFPyL PSMA PET/CT scans in prostate cancer. The protocol includes:

  • Dataset: 380 scans, 684 lesions (mean volume Δi(c)=pi(c)gi(c)\Delta_i(c) = |p_i(c) - g_i(c)|4 ml), ground truth via expert PET Edge annotation.

  • Architectures: 3D U-Net, Attention U-Net, SegResNet (with channel and normalization details as specified).

  • Preprocessing: PET to SUV, CT windowing, isotropic 2 mm resampling; spatial augmentations.

  • Training: 5-fold cross-validation, AdamW optimizer (initial Δi(c)=pi(c)gi(c)\Delta_i(c) = |p_i(c) - g_i(c)|5), 1000 epochs with cosine annealing, MONAI + PyTorch, sliding window inference, ensemble via majority voting.

  • Evaluation: DSC, per-lesion F1 (SUVmax voxel overlap), clinical quantification (SUVmax, SUVmean, TMTV, TLA, count, spread), statistical agreement (Lin’s CCC, TOST at Δi(c)=pi(c)gi(c)\Delta_i(c) = |p_i(c) - g_i(c)|6, Bland-Altman, CP, TDIΔi(c)=pi(c)gi(c)\Delta_i(c) = |p_i(c) - g_i(c)|7) (Dzikunu et al., 22 Apr 2025, Dzikunu et al., 4 Feb 2025).

5. Quantitative Results and Comparative Performance

Across architectures and metrics, L1DFL demonstrates the following improvements:

  • Segmentation (median DSC, test set):

  • Clinical metrics, Lin’s CCC (Att-U-Net+L1DFL): SUVmax 0.98, SUVmean 0.96, TLA 0.95, TMTV 0.89, Lesion count 0.91, Dmax 0.90
  • Equivalence (TOST, pi(c)p_i(c)0=0.05, pi(c)p_i(c)120%): L1DFL achieves equivalence for SUVmax, SUVmean, TLA, lesion count; alternatives fail for TLA, count, or Dmax.
  • Coverage Probability (CP) & TDIpi(c)p_i(c)2: L1DFL yields higher coverage and consistently lowest TDIpi(c)p_i(c)3, with Dice/Dice Focal up to pi(c)p_i(c)4 higher deviations (Dzikunu et al., 22 Apr 2025).
  • Cross-study observations: L1DFL shows +13% median DSC improvement over Dice and DFL on test sets; F1 score increases by pi(c)p_i(c)5 over Dice and pi(c)p_i(c)6 over DFL (Dzikunu et al., 4 Feb 2025).
  • Ablation: When pi(c)p_i(c)7 is uniform, weighting reduces to standard Dice behavior, isolating the role of batch-adaptive L₁-based weights.

6. Implementation and Practical Considerations

  • Hyperparameters: All experiments fix bin width pi(c)p_i(c)8; focal parameter pi(c)p_i(c)9; class balance gi(c){0,1}g_i(c)\in\{0,1\}0; smoothing gi(c){0,1}g_i(c)\in\{0,1\}1.
  • Histograms and weighting: Implemented efficiently in PyTorch, typically using torch.bucketize or GPU histogram operations. Weight normalization is implicit via gi(c){0,1}g_i(c)\in\{0,1\}2.
  • Batch-wise adaptivity: All weights and densities are recomputed every batch, maximizing adaptivity to current data statistics.
  • STL/PyTorch workflow: Open-source at https://github.com/ObedDzik/pca_segment.git; trained on Tesla V100 16GB, batch size set per GPU capacity, and code uses MONAI sliding-window segmentation and majority voting ensemble for robustness (Dzikunu et al., 22 Apr 2025, Dzikunu et al., 4 Feb 2025).

7. Limitations and Extensions

While L1DFL demonstrates robust improvements, certain limitations are evident:

  • Lesion spread: Performance declines in the largest anatomical spread quartile (gi(c){0,1}g_i(c)\in\{0,1\}3 cm), signaling challenges in extreme cases.
  • Network specificity: Some interaction with architecture and lesion characteristics; for example, in low-spread lesions SegResNet+Dice Loss may approach L1DFL performance.
  • Hyperparameter sensitivity: While gi(c){0,1}g_i(c)\in\{0,1\}4, gi(c){0,1}g_i(c)\in\{0,1\}5, and gi(c){0,1}g_i(c)\in\{0,1\}6 are robust for PSMA PET/CT, their transferability to other modalities or tasks is unproven; parameter retuning may be required.
  • Potential for generalization: Extensions could include vector L₁ norms for multiclass, dynamic tuning of bin width, incorporation of spatial context, or adaptation to non-PT/PET modalities (Dzikunu et al., 4 Feb 2025).
  • A plausible implication is that L1DFL’s value is highest where class imbalance, voxel-wise difficulty heterogeneity, and rare-event detection are pronounced.

L1DFL establishes an interpretable and practical mechanism for adaptive per-voxel weighting in medical image segmentation networks, improving sensitivity and agreement for challenging tasks such as PSMA PET/CT lesion detection (Dzikunu et al., 22 Apr 2025, Dzikunu et al., 4 Feb 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to L1-weighted Dice Focal Loss (L1DFL).