Segmentation networks trained on one hospital's scanners often break on another's. On the AMOS abdominal benchmark, models lose more than 20% of their accuracy on MRI scanners they never saw in training, and small organs such as the pancreas and adrenal glands fail worst. One part of the image does not change across scanners: anatomy. The liver sits next to the gallbladder, the left and right kidneys are near-twins, and the aorta and inferior vena cava are paired vessels. A text encoder already holds these relations as distances between organ descriptions. We propose to use that fixed, language-derived map of how organs relate to one another as an anchor for the segmentation network's internal features. During training it acts as a regularizer. On each new scan from an unseen scanner it becomes a label-free objective that the network can minimize by itself, and the size of the remaining mismatch serves as a warning signal for failure.
Put in two sentences: for every scan, we pool the network's features into one summary vector per organ and require the pattern of similarities among those vectors to match the pattern of similarities among the organs' text descriptions. Scanner shift distorts the feature pattern but leaves the text pattern untouched. A single unlabeled test scan therefore supplies both a correction signal and a reliability score, with no need for target-hospital training data.
Core Claim
The closest existing work, TCSA-UDA, matches the covariance of visual features to the covariance of text-prompt embeddings for CT↔MRI heart segmentation. It reaches 82.4% Dice on MRI→CT and 71.6% on CT→MRI on MMWHS. However, it is an unsupervised domain adaptation method, which means it needs a pool of unlabeled scans from the target site at training time. It also uses one-line prompts ("A cardiac CT imaging of a [CLS]").
Our claim differs in three ways. First, the text-derived organ geometry is enforced per scan, so it can be optimized on a single test volume from an unseen scanner without any target corpus. Second, the anchor is built from descriptive anatomical text rather than class-name templates. Third, the residual geometry mismatch after adaptation predicts per-scan segmentation failure better than the network's softmax confidence.
We make one prediction that could falsify the role of language. Across modality (CT→MRI), a text-derived anchor should beat an anchor taken from source-domain feature prototypes, because CT prototypes partly encode Hounsfield-intensity similarity rather than anatomical relation. Within a single modality across scanners, the two may tie. If the source-prototype anchor matches the text anchor even across modality, language is not the active ingredient, and we will report the method as "geometry anchoring" without the semantic framing.
Mechanism
Let $f(v)$ be the decoder feature at voxel $v$ of a 3D U-Net, and let $p_k(v)$ be its predicted probability for organ $k$. For each scan we form organ prototypes $\mu_k = \sum_v p_k(v) f(v) / \sum_v p_k(v)$, project them with a small linear head $g$, and compute their pairwise cosine similarity matrix $G_{ij} = \cos(g(\mu_i), g(\mu_j))$. Let $t_k$ be the frozen text embedding of a descriptive passage about organ $k$, covering location, neighbors, and shape. The target is $T_{ij} = \cos(t_i, t_j)$, and the anchoring loss is
$$ L_{\text{geo}} = \sum_{i<j} w_{ij}\,(G_{ij} - T_{ij})^2 , $$
where $w_{ij}$ down-weights pairs whose predicted volume in the scan is too small to give a stable prototype. During training, $L_{\text{geo}}$ is added to the usual Dice plus cross-entropy loss. At test time, we freeze everything except the normalization layers' scale and shift parameters and take a few gradient steps on $L_{\text{geo}}$ for that one scan.
The obvious failure mode is cheating. The network could satisfy the geometry by shrinking or relocating a hard organ. To block this, we compute the prototype weights $p_k$ with stop-gradient from the unadapted model's prediction and add a penalty on changes in predicted organ volume. The ablations below check whether these guards are needed.
The descriptive passages are generated and curated in the spirit of the structure prior of KnoBo. KnoBo retrieves clinical concepts from textbooks and PubMed to build classification bottlenecks. We borrow only the idea that literature-derived knowledge carries domain-invariant priors, and we apply it to dense 3D segmentation, which KnoBo does not address. We will compare a general-purpose and a biomedical text encoder, and short labels against rich descriptions.
Research Program
Prior work plays three roles here. The motivating evidence is the cross-scanner MRI collapse and small-organ failure documented on AMOS by Ji et al., together with the home-field advantage across chest X-ray hospitals reported by Pooch et al.. The supplied method is the covariance-matching idea of TCSA-UDA, moved from corpus-level adaptation to per-scan, label-free adaptation.
Two results constrain the design. Müller et al. show that adversarial feature alignment does not scale to real medical images and that strong invariance methods need labels for the confounder. This pushes us toward an anchor that needs neither site labels nor adversaries. Ouyang et al. correct only confidence, using a denoising-autoencoder shape prior that the authors note is limited to compact organs like the heart. A relational anchor among many organs should not share that rigidity, and we test this directly on small, irregular abdominal organs.
The work has three stages. Stage one trains 3D U-Nets on AMOS with and without $L_{\text{geo}}$. Stage two adds per-scan test-time adaptation. Stage three tests the mismatch score as a failure detector. Throughout, we track per-organ results, with the pancreas, adrenal glands, and gallbladder reported separately, because the AMOS failures concentrate there.
Baselines
The naive reference point is a 3D U-Net trained only on source scanners with standard preprocessing. Ji et al. report that this architecture reaches 89.04% mDice on AMOS CT and beats Swin-UNetr (86.32%). It is therefore the strongest plain architecture on this benchmark, and its reported drop of more than 20% on unseen MRI scanners is the gap we aim to close. We retrain it ourselves on our leave-scanner-out splits so every method shares data, architecture, and epochs.
The second baseline is multi-modality pooling: training jointly on CT and MRI. Ji et al. report that this gives +2.14% mDice on MRI. It is the cheapest data-driven competitor, and we add $L_{\text{geo}}$ on top of it rather than replacing it.
The third baseline is the same U-Net with aggressive intensity and appearance augmentation (gamma, bias field, random intensity remapping). This is the field's default response to scanner shift. We found no reported result on Lacuna for augmentation-based domain generalization on AMOS, so we will establish the number ourselves under the same tuning budget we give our method: an equal number of hyperparameter trials, selected on held-out source scanners only.
The fourth baseline is source-only VLCoL. This is the covariance loss of TCSA-UDA trained without target images, applied at the level of the whole batch. It isolates whether our per-scan formulation and test-time use add anything beyond the existing loss.
The fifth baseline is entropy-minimization test-time adaptation that updates the same normalization parameters for the same number of steps. It is the standard label-free test-time competitor. We found no reported result on Lacuna for it on AMOS or MMWHS.
As an upper reference that uses information we deny ourselves, we include full TCSA-UDA with unlabeled target data. Its reported numbers on MMWHS are 71.6% Dice CT→MRI and 82.4% MRI→CT. Approaching these numbers without target data would be a strong result, though not required to beat.
The key ablations hold the training and adaptation pipeline fixed and change only the target matrix $T$. One uses the identity matrix, which demands only that organs be mutually dissimilar. One uses source-domain prototype similarities frozen after warm-up. One uses text similarities from class-name templates, and the last uses text similarities from rich descriptions. We will count the method as beating the field if it improves mean Dice on held-out MRI scanners over the best of the augmentation and pooling baselines by a margin larger than the seed-to-seed spread, and also improves small-organ Dice. We will count language as mattering only if the rich-text target beats the source-prototype target on CT→MRI.
Why not just…?
Why not just pool more scanners into training? Pooling helps, and we include it. But AMOS already trains on scans from 8 scanners at two centers and still loses more than 20% on unseen MRI scanners (Ji et al.). Pooling cannot cover scanners that do not yet exist in the training set, whereas a per-scan objective applies to any new scan.
Why not just use heavy intensity augmentation? This is the most serious threat, because many scanner differences are intensity remappings that augmentation can imitate. We have no Lacuna number for it here, so the experiment settles the question: we run augmentation alone, $L_{\text{geo}}$ alone, and both together. If augmentation alone matches the combination on the held-out scanners, the training-time regularizer is redundant. The claim would then reduce to the test-time adaptation and failure-detection components, which augmentation does not provide.
Why not just run TCSA-UDA, which already aligns to text? When unlabeled target scans can be collected in advance, one should. Our setting is deployment at a site with no collected target corpus. In that setting TCSA-UDA cannot run, and its source-only loss is our fourth baseline.
Why not just use entropy minimization at test time? Entropy minimization rewards confident predictions, and on a shifted scan these can be confidently wrong. Small organs are the most likely to be absorbed into neighbors. The geometry objective instead penalizes relational distortion. The head-to-head comparison at matched steps and parameters, reported per organ, decides between them.
Why not just anchor to source-feature geometry and skip language? This is the honest alternative for within-MRI scanner shift, and we expect it may tie there. Our language claim rests only on the cross-modality prediction above. If that prediction fails, we drop the semantic framing.
Proposed Experiments
The first testbed is AMOS. We run leave-one-scanner-out on MRI, using per-scan scanner identifiers if released and splitting by center otherwise. We also run CT-trained models tested on MRI. Metrics are per-organ Dice and 95th-percentile Hausdorff distance.
The second testbed is MMWHS, run in both directions (CT→MRI and MRI→CT) with source-only training, compared against the TCSA-UDA reference numbers.
The third testbed is cardiac MRI across sequences, ACDC bSSFP to MS-CMRSeg LGE. This lets us compare calibration with Ouyang et al., who report expected calibration error (ECE) dropping from 16.78% to 15.37%. We measure both ECE and Dice, because their method changes confidence only, not masks.
The decisive checks are three. First, test-time geometry adaptation must improve small-organ Dice on unseen MRI scanners beyond entropy minimization with the same parameters and steps. Second, the rich-text anchor must beat the source-prototype anchor on CT→MRI. Third, the per-scan residual $L_{\text{geo}}$ must rank-correlate with per-scan Dice more strongly than mean softmax confidence does. We measure that as the area under the curve for flagging scans whose Dice falls below 0.7.
A negative outcome on the second check reframes the contribution without language. Negative outcomes on both the first and third checks would mean that relational anchoring offers nothing beyond augmentation, and we would report that.
References
- TCSA-UDA: Text-Driven Cross-Semantic Alignment for Unsupervised Domain Adaptation in Medical Image Segmentation
- A Textbook Remedy for Domain Shifts: Knowledge Priors for Medical Image Analysis
- AMOS: A Large-Scale Abdominal Multi-Organ Benchmark for Versatile Medical Image Segmentation
- Can We Trust Deep Learning Based Diagnosis? The Impact of Domain Shift in Chest Radiograph Classification
- Benchmarking Dependence Measures to Prevent Shortcut Learning in Medical Imaging
- Improved Post-hoc Probability Calibration for Out-of-Domain MRI Segmentation