UBC's L1DFL Cuts False Positives by 66% in Prostate Cancer AI Scans
A new loss function redistributes gradient weight across voxel difficulty using L1 norms, cutting false positives in PSMA PET/CT tumor detection.
ProTakeaways
- New loss function L1DFL uses gradient harmonization via L1 norms to rebalance voxel-level training weight.
- Beats Dice Loss by ≥4% Dice and Dice Focal Loss by ≥26% F1 across five architectures on PSMA PET/CT.
- Cuts false positives dramatically: UNETR dropped from 7.74 to 2.59 mean FPs per scan.
- Produces calibrated predictions with a 0.29 calibration gap versus 0.01 for plain Dice Loss.
- Best pairing was SegResNet + L1DFL with median Dice of 0.68 on 380 scans.
- Code available at github.com/ObedDzik/pca_segment; dataset is proprietary.
Detecting recurrent prostate cancer in whole-body PSMA PET/CT scans is a needle-in-a-haystack problem. Tumor voxels are a tiny fraction of the volume, lesions vary wildly in size and uptake, and the radiotracer lights up healthy organs too. A new paper from a University of British Columbia and BC Cancer Research Institute team proposes a fix at the loss-function level called L1-weighted Dice Focal Loss (L1DFL), and shows it consistently beats the usual Dice and Dice Focal recipes across five architectures.
Why standard losses stumble on PET scans
In lesion segmentation, most voxels are trivially background and a small subset near the boundary is genuinely hard. Region-based losses such as Dice Loss handle inter-class imbalance through overlap-based formulation but treat all voxels within a class equally. Distribution-based losses like Focal Loss try to fix this with a fixed exponent that up-weights hard examples, but that hyperparameter is static and can over-emphasize outliers.
A more principled solution is gradient harmonization, which adaptively weights samples based on gradient density rather than fixed hyperparameters, preventing easy examples from overwhelming the contribution of hard minority cases. The idea had been applied to knee MRI but never to PET, where the imbalance is far more extreme.
How L1DFL actually works
The trick is measuring difficulty and rarity per voxel, then rebalancing. For each voxel the method computes the L1 norm between the predicted probability and the ground truth label. Those values get bucketed into bins of width Γ=0.1 (so 11 bins from 0 to 1). The count of voxels in each bin defines a density, and each voxel is weighted by the inverse of that density.

The net effect: crowded difficulty regions (mostly easy background) get down-weighted, sparse ones (the moderately hard boundary voxels) get up-weighted, and extreme outliers no longer dominate gradient updates. The weighted Dice term is then summed with a standard Focal Loss (γ=2).
The experimental setup
The team trained three 3D convolutional networks (Attention U-Net, SegResNet, U-Net) and a transformer-based UNETR model on 380 PSMA PET/CT scans. They also fine-tuned SAM-Med3D, the 3D volumetric extension of Segment Anything, on the same task. The dataset was split into training, validation, and testing sets containing 258, 65, and 57 samples, respectively, with ground truth annotated by a board-certified nuclear medicine physician.
The numbers
Across architectures, L1DFL consistently outperformed DL and DFL, achieving at least a 4% improvement in DSC. F1 scores were higher by ≥6% and ≥26% compared to DL and DFL, respectively. The best pairing was SegResNet with L1DFL, which hit a median Dice of 0.68. False positive counts tell the sharper story:
| Model | Loss | Median DSC | Mean FP | F1 |
|---|---|---|---|---|
| Attention U-Net | DL | 0.58 | 2.06 | 0.50 |
| Attention U-Net | DFL | 0.54 | 2.65 | 0.44 |
| Attention U-Net | L1DFL | 0.66 | 0.42 | 0.69 |
| SegResNet | L1DFL | 0.68 | 0.52 | 0.66 |
| UNETR | DL | 0.39 | 7.74 | 0.21 |
| UNETR | L1DFL | 0.48 | 2.59 | 0.38 |
The FP collapse on UNETR (from 7.74 to 2.59) matters clinically because every spurious detection means a radiologist has to rule out a phantom lesion.
The real breakthrough: calibrated uncertainty
Beyond the accuracy gains, L1DFL produces models that actually know when they are wrong. Its calibration gap (0.2859) is substantially larger than that of DFL (0.0263) and DL (0.0129), indicating stronger separation between correct and incorrect predictions. When errors occur, L1DFL appropriately expresses uncertainty, with a mean entropy of 0.4762 for incorrect predictions versus 0.0212 for correct ones. Dice and Dice Focal, by contrast, remain confidently wrong.

The sample-weighting analysis confirms the mechanism. The difficulty-weight correlation for L1DFL (0.3376) is substantially lower than DFL (0.9587) indicating that L1DFL assigns more uniform weights across the difficulty spectrum rather than exhibiting strong monotonic dependence on sample difficulty. DFL pours gradient into the hardest samples, which sounds appealing but in practice means training chases outliers and noisy labels.
Caveats and code
L1DFL is not free. Computing L1 norms, binning, and density weights adds overhead that could matter for very large 3D volumes. It also introduces two hyperparameters (Γ and γ), though the ablation shows performance is stable in the 0.51-0.54 Dice range across bin widths from 0.05 to 0.20. And when the difficulty distribution is already balanced, L1DFL collapses to standard Dice Focal Loss, so gains are largest in heavily imbalanced regimes like PET. The dataset is also restricted to oligometastatic recurrence with up to five lesions, so extensive disease remains untested.
The implementation is available at github.com/ObedDzik/pca_segment. The dataset itself is proprietary, but the loss function is a drop-in replacement wherever Dice Focal is currently used, which makes it a low-cost experiment for anyone working on MONAI-style medical segmentation pipelines with severe class imbalance.