Foundation Model and Radiomics Distance Scores for Post-Hoc Segmentation Failure Detection
Authors: Simon Johannes Joham, Gianluca Guglielmo, Mateusz Kozinski, Martin Urschler
Organizations: Institute for Medical Informatics, Statistics and Documentation, Medical University of Graz, Graz, Austria · BioTechMed-Graz, Graz, Austria · Institute of Visual Computing, Graz University of Technology, Graz, Austria
Medical image segmentation models can fail silently when clinical data differs from training data. Deployed models rarely ship with quality control, and are often black boxes. Prior methods that work in this post-hoc failure detection setting still need a separate regression or segmentation model, registration, or access to model internals. We instead propose two failure scores based on the Mahalanobis distance to a labeled reference set. The first uses radiomic shape features of the predicted mask. The second uses frozen foundation model (FM) features, made mask-aware by overlaying the mask on the image, encoding it with a frozen DINOv3, and pooling patch features with more weight on the mask region. We test on multi-site prostate and hippocampus MRI under imaging-protocol and population shift. Ranking cases by predicted failure risk within each site, both scores are competitive with the registration-based (Atlas-RCA) and ensemble-based (pairwise Dice) baselines, without registration that can fail silently or access to individual predictions. Our results show that pooling all test cases into one ranking, as prior work does, rewards ordering sites by difficulty, so a detector can rank sites well, miss failures within them, and still look strong. Within-site evaluation measures true per-case failure. The two evaluation schemes reward different behavior, so we recommend reporting both. The code is available at https://github.com/imigraz/fm-radiomics-failure-detection.
Figures & tables
Figure 1: Foundation model score. From the test image x and predicted mask y^ , we render an overlay, encode it with a frozen DINOv3, and pool patch features into an embedding e(x,y^) , keeping only patches that overlap the mask, and weighting each by its mask coverage. To derive a final per-case segmentation failure signal, the case is scored by the Mahalanobis++ distance s(x,y^) to a reference distribution (μ,Σ) fit to labeled reference-site cases, without requiring model internals or registration.
Variant/Mode
Input
Pooling
Img
Image
Global (CLS)
Ov
Image+Overlay
Global (CLS)
W
Image
Mask-weighted patches
OvW
Image+Overlay
Mask-weighted patches
Table 1: Tested embedding variants, spanning two axes: what is used as input (Img, Ov) and how patch features are pooled. For the mask-weighted variants W and OvW, we weight patch features by prediction mask coverage, which gives non-overlapping patches zero weight.
Setting
Site
N
Description
Ref. Dice
Prostate [ 20 ]
RUNMC [ 3 ]
30
Surface coil, 3T (ref.)
92.8±2.0
BMC [ 3 ]
30
Endorectal coil, 1.5T
63.1±22.4
I2CVB [ 16 ]
19
No coil, 3T
68.2±16.4
UCL [ 18 ]
13
No coil, 1.5–3T
86.0±3.80
BIDMC [ 18 ]
12
Endorectal coil, 3T
18.0±19.0
HK [ 18 ]
12
Endorectal coil, 1.5T
89.0±2.60
Table 2: Dataset summary. Each hippocampus is treated as its own case and flipped to same orientation. nnU-Net ensembles are trained on the reference site (ref.) only, all other sites are held out for evaluation. Ref. Dice column shows mean test performance.
Prostate
Hippocampus
Pˉ
Wˉ
Method
Mode
Pooled
Within-site
Pooled
Within-site
Ens-Mpd [ 25 ]
Mask
1.6 [0.9,2.4]
3.7 [1.4,5.7]
1.5 [1.1,1.9]
1.5 [1.1,2.0]
1.55
2.60
Atlas-RCA [ 29 ]
Img,Mask
1.7 [1.2,2.2]
2.2 [1.2,3.6]
1.8 [1.2,2.7]
1.9 [1.3,2.5]
1.75
2.05
Rad-L2 [ 12 ]
Img
5.5 [3.9,7.2]
7.5 [4.5,9.8]
8.6 [7.3,9.9]
6.2 [5.3,6.9]
7.05
6.85
Rad-MD
Img
6.6 [4.7,8.8]
5.6 [3.9,7.1]
3.7 [3.1,4.3]
4.0 [3.4,4.6]
5.15
4.80
Rad-MD
Mask
1.4 [1.0,1.7]
2.8 [1.3,4.3]
2.9 [2.3,3.6]
2.6 [2.1,3.2]
2.15
2.70
Table 3: Pooled and within-site mean E-AURC ( ×10−2↓ ; 95% CI), for prostate ( n=86 , 5 sites) and hippocampus ( n=320 , 2 sites). Pˉ and Wˉ are the pooled and within-site arithmetic means taken over the two settings. Bold / underline : best/second-best per column. Ens-Mpd needs access to ensemble predictions. Atlas-RCA needs registration on reference set. The best proposed scores are highlighted with gray background.
DINOv3-MD
RadDINO-MD
3DINO-MD
Mode
Pˉ
Wˉ
Pˉ
Wˉ
Pˉ
Wˉ
Img
5.25
5.10
6.15
5.30
6.25
6.45
Ov
4.90
5.20
6.35
5.60
6.55
6.20
W
3.95
3.20
3.00
3.10
2.80
3.50
OvW
3.00
2.60
3.10
3.05
3.35
3.40
Table 4: Ablation over backbone (DINOv3, RadDINO, 3DINO) and variants.
Medical image segmentation delineates organs, lesions, and other structures in scans to support measurement, diagnosis, treatment planning, and research.
Foundation models provide highly descriptive representations for medical images, yet their reliability degrades under distribution shifts arising from changes in patients, devices, or acquisition conditions. Reliable out-of-distribution (OOD) detection is therefore essential for safe deployment. Recent post-hoc detectors efficiently exploit frozen embeddings (e.g., kNN), whereas reconstruction-based OOD detection in latent feature space has seen limited adoption due to inconsistent performance. In this work, we show that the limitation of reconstruction-based methods in latent space does not stem from poor reconstruction quality, but from how reconstruction errors are scored. Standard L2 residual norms collapse the anisotropic residual structure, thereby suppressing informative deviations. To address this limitation, we introduce MaRS (Mahalanobis Residual Scoring), a label-free OOD detector that learns an in-distribution manifold using a lightweight autoencoder and measures deviation via a Mahalanobis distance on reconstruction residuals, yielding variance-aware OOD scores. Across three imaging modalities, multiple types of distribution shift, and different model families and scales, MaRS outperforms established confidence-, distance-, and reconstruction-based baselines, while remaining fully post-hoc and lightweight. The code is available at https://github.com/francescodisalvo05/mars.
Francesco Di Salvo, Sebastian Doerrich, Christian Ledig
The rapid proliferation of open-source medical foundation models (FMs) raises a practical question: how well do their pre-trained representations transfer to clinically relevant but data-scarce classification tasks? Particularly in CT-based renal lesion classification, a push toward greater generalizability would be meaningful, as the field is constrained by inherently limited training data. We addressed this through a benchmark of three medical FMs on this specific task. This six-class problem spans common entities like cysts and clear cell renal cell carcinoma, alongside rare subtypes. Using a frozen feature-probing protocol, we compared FM embeddings against a handcrafted radiomics classifier and a 3D ResNet-50 trained from scratch. Models were trained on a composite dataset of 2,854 lesions and evaluated on an external test set of 234 lesions from The Cancer Imaging Archive. Our results reveal two key findings. First, FM performance (AUC 0.70-0.77) matched the from-scratch ResNet (AUC 0.72) while drastically reducing hardware demand, requiring only seconds on a CPU after feature extraction. However, the conventional radiomics baseline significantly outperformed all deep learning approaches, achieving an AUC of 0.88 (all p ≤ 0.002). This suggests that current generalist FM embeddings do not yet capture the fine-grained texture and shape heterogeneity driving histological subtype discrimination. Despite their potential in data-scarce settings, medical FMs did not surpass established models for renal lesion stratification, leaving radiomics as the current state-of-the-art.
Hartmut Häntze, Sarah de Boer, Myrthe Buser +7
Charité - Universitätsmedizin Berlin, Department of Radiology, Berlin, Germany · Radboudumc, Diagnostic Image Analysis Group, Nijmegen, The Netherlands · Klinikum rechts der Isar, TUM University Hospital, Technical University of Munich, Munich, Germany +2
Average segmentation accuracy and model count do not reveal whether models fail on the same cases. We present CoFailMed, an audit of correlated failures in pretrained-encoder pools for medical segmentation. Across five 2D tasks, we evaluate 11 public pretrained encoders (a controlled sample, not a census) using frozen features and separately trained 1×1 readouts with four seeds per encoder. Shared-checkpoint pairs have the highest mean per-case Dice correlation. An expanded 17-encoder analysis shows that distinct checkpoints within the same encoder family remain more correlated than cross-family pairs. At the pooled 33rd-percentile Dice threshold, four-member pools drawn from distinct encoders have mean effective sizes of 1.56-2.92, estimated from failure correlations in pools with enough failures and passes per member. In the primary pool, richer readouts and fine-tuning narrow the Dice-correlation gap between pairs sharing a checkpoint (or the DINOv2-B/S release) and all other pairs. Yet dependence between different encoders can increase, and fine-tuning does not consistently increase effective pool size at 33rd-percentile thresholds recomputed for each training recipe. A smaller between-group gap can coexist with greater dependence. Pool evaluation should therefore report absolute dependence and threshold-specific effective size alongside accuracy and nominal pool size. The CoFailMed release provides aligned per-case traces, analysis scripts and study code to reproduce the central audit results.
Eunseob Choi, Kyeonghun Kim, Hyuk-Jae Lee +1
Gwangju Institute of Science and Technology · OUTTA · Seoul National University