Foundation Model and Radiomics Distance Scores for Post-Hoc Segmentation Failure Detection

Simon Johannes Joham, Gianluca Guglielmo, Mateusz Kozinski, Martin UrschlerarXiv 2026

TL;DR

Medical AI models often fail "silently"—producing confident but incorrect results when they encounter data slightly different from their training set. This paper introduces two simple, "black-box" methods to flag these failures by measuring how much a predicted segmentation mask deviates from a "normal" reference set, using either geometric shape features or frozen vision foundation models.

What Problem Does This Paper Address?

Imagine a self-driving car that perfectly identifies stop signs in sunny California but starts hallucinating in a London fog. In medical imaging, we face a similar "distribution shift." A segmentation model trained on high-end MRI scanners at a university hospital might struggle when deployed at a rural clinic with older hardware or a different patient demographic.

The scary part? These models often fail silently. They’ll hand a radiologist a segmentation mask that looks plausible at a glance but is anatomically wrong. Most existing "quality control" tools require peeking into the model’s internal weights or training a separate, complex "checker" model. The authors of this paper wanted a post-hoc solution: a way to detect failure using only the final image and the predicted mask, treating the segmentation model itself as an untouchable black box.

Methods

The authors propose two scores based on the Mahalanobis distance. Think of this as a "weirdness" metric: it measures how many standard deviations a new data point is away from the average of a "normal" reference set, accounting for how features vary together.

  1. Rad-MD-Mask (The Shape Approach): This method looks at the geometry of the predicted mask. It extracts "radiomic" features—things like sphericity, flatness, and diameter. If the model predicts a prostate that looks like a jagged star instead of a smooth bulb, the Mahalanobis distance spikes, and the case is flagged.
  2. FM-MD-OvW (The Foundation Model Approach): This uses a "frozen" Foundation Model (specifically DINOv3). Because these models are pre-trained on massive amounts of data, they have an intuitive sense of what images should look like.
  3. The researchers overlay the predicted mask onto the image (creating a "mask-aware" input).
  4. They feed this into the DINOv3 encoder.
  5. They use mask-weighted pooling, which tells the model to pay more attention to the features inside the predicted mask area than the background.
Fig. 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.

Crucially, neither method requires retraining the original segmentation model or having access to its internal "latent" features.

Datasets

The methods were put to the test on two challenging benchmarks involving 3D MRI scans:

  • Prostate Segmentation: Data from six different sites, featuring "protocol shifts" (different scanner types and settings).
  • Hippocampus Segmentation: Data involving "population shifts" (comparing healthy brains to those with Alzheimer’s or schizophrenia).

The models were trained on one "reference" site and then asked to detect failures on all the other "unseen" sites.

Key Insights and Ideas

  • Simplicity Wins: You don't need a fancy neural network to watch over your other neural network. Simple distance metrics in the right feature space are surprisingly effective.
  • The "Pooling" Trap: The authors discovered a major flaw in how failure detection is usually evaluated. If you rank all test cases from all hospitals together ("pooled"), a detector can look great just by realizing that Hospital A is generally harder than Hospital B. But that doesn't help a doctor at Hospital B find the specific bad scan in their pile.
  • Context Matters: For the Foundation Model approach, just looking at the image isn't enough. You have to "steer" the model's attention toward the mask region using overlays and weighted pooling to get a reliable failure signal.

Key Results

The proposed methods were compared against heavyweights like Atlas-RCA (which uses expensive image registration) and Ensembles (which require running five different versions of a model).

  • Performance: Both the Radiomics and Foundation Model scores were competitive with the top baselines. In the hippocampus task, the DINOv3-based score matched the performance of the ensemble method, which is impressive given that the ensemble method requires five times the computation.
  • Within-Site Accuracy: When looking at "Within-site E-AURC" (a metric where lower is better), the DINOv3-MD-OvW method achieved a score of 2.60, effectively tying with the ensemble baseline (2.60) and coming close to the registration-based Atlas-RCA (2.05).
Comparison of different failure detection methods across prostate and hippocampus tasks.

Limitations and Future Work

While powerful, these methods currently focus on binary segmentation (one organ at a time). Detecting failures in multi-class segmentations or highly complex, irregular structures like tumors remains a frontier.

The authors also note that the choice of "reference set" is vital. If your reference set doesn't represent "good" anatomy well, your distance score won't mean much. Future work will likely explore how to combine shape and foundation model features into a single, even more robust "super-detector."

Summary updated

Abstract

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.
BibTeX
@misc{joham2026foundation,
  author = {Simon Johannes Joham and Gianluca Guglielmo and Mateusz Kozinski and Martin Urschler},
  title = {{Foundation Model and Radiomics Distance Scores for Post-Hoc Segmentation Failure Detection}},
  year = {2026},
  eprint = {2611.30582},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.30582},
}
Figure