Balancing Organs and Scanners Together: Region-Level Domain-Class Alignment for Multi-Organ Segmentation

Segmentation models for abdominal scans fail in two ways that are usually studied separately. They miss small, rarely seen organs such as the adrenal glands, and they break when moved to a new scanner or modality. These are not two problems but one. In a dataset like AMOS, with 500 CT scans and 100 MRI scans, the scarcest thing is neither "MRI" nor "adrenal gland." It is "adrenal gland on MRI": a few hundred tiny regions buried inside volumes dominated by CT livers. We propose to make the unit of balancing the (domain, organ) region, meaning all voxels of one organ in one scan, tagged with the scanner or modality it came from. Each region is summarized as one feature vector, and those vectors are aligned across domains with weights set by the inverse frequency of each domain-organ pair. This is a training-only auxiliary branch, so the deployed segmenter is unchanged.

The core claim fits in two sentences. Long-tail methods for dense prediction balance classes but ignore domains, and multi-domain long-tail methods balance domain-class pairs but only for whole-image classification. Moving domain-class alignment from pooled images to decorrelated organ regions should recover small organs on unseen scanners and modalities more than either ingredient alone, including organs that are never labeled in the target modality.

Where this sits

Three pieces of prior work motivate the idea, and each supplies part of the method. On Multi-Domain Long-Tailed Recognition, Imbalanced Domain Generalization and Beyond (BoDA) treats domain-class pairs as nodes in a transferability graph and aligns their prototypes with inverse-count weights. It reports +7.7% accuracy over standard training on TerraInc-MLT, and it can classify domain-class pairs never seen in training. BoDA computes one pooled vector per image, so it cannot represent a scan that holds a head organ and a tail organ at once. Region Rebalance for Long-Tailed Semantic Segmentation shows why we should not simply move BoDA to individual voxels. Neighboring pixels are highly correlated, and pixel-level rebalancing trades false negatives for a surge of false positives. Averaging pixels into region features lowered the imbalance factor on COCO-Stuff164K from 2,612 to 528. We reuse that region-gathering trick, but Region Rebalance balances classes only and has no notion of domain. Long-Tail Learning with Foundation Model: Heavy Fine-Tuning Hurts constrains the design: tail representations are fragile when the whole network is updated aggressively. This is one reason we add an auxiliary objective rather than a site-specific fine-tuning stage.

Medical work at the intersection leaves the joint problem open. A Semantic Knowledge Complementarity based Decoupling Framework for Semi-supervised Class-imbalanced Medical Image Segmentation rescues small organs with a balanced auxiliary head; for example, gallbladder Dice rises from 0.0% to 62.0% on Synapse. It is evaluated within a single dataset and never across scanners. Labeled-to-Unlabeled Distribution Alignment for Partially-Supervised Multi-Organ Medical Image Segmentation aligns prototypes between labeled and pseudo-labeled pools, but only on 2D CT slices and without modality shift. A-Eval shows that brute-force joint training across cohorts is the strongest existing route to cross-dataset transfer, but it does not model imbalance at all. AMOS documents both failure modes in one benchmark. Its models do well on the liver and spleen but struggle on the adrenals and duodenum, and MRI performance drops by more than 20% on unseen scanner models.

Core Claim

The effective imbalance in multi-domain dense segmentation is defined over (domain, organ) region pairs. Correcting it at that granularity, rather than at the level of voxels, classes, or images, is what closes the small-organ gap under scanner and modality shift.

The claim yields two testable predictions. First, region-level domain-class alignment should beat class-only rebalancing and domain-balanced sampling specifically on the tail domain-organ pairs. Second, it should transfer to organs left unlabeled in the target modality, because the target modality's other organs pull its feature space toward the source modality's.

Research Program

We start from a standard 3D segmenter, an nnU-Net/STU-Net pipeline as used in A-Eval. During training, a ground-truth mask is available for each labeled organ $c$ in a scan $r$ from domain $d$. We average the decoder features inside that mask to get one region vector $z_r$. Here a domain is a scanner model or a modality, both taken from metadata. We keep a running prototype $\mu_{d,c}$ for every domain-organ pair and count its regions $N_{d,c}$. The auxiliary loss is a BoDA-style contrastive alignment on these region vectors:

$$ \mathcal{L}_{\text{align}} = -\sum_{r} \frac{1}{N_{d_r,c_r}} \log \frac{\sum_{d' \neq d_r} \exp(-\lVert z_r - \mu_{d',c_r}\rVert^2)}{\sum_{(d'',c'')\neq(d_r,c_r)} \exp(-\lVert z_r - \mu_{d'',c''}\rVert^2)} $$

This loss pulls a region toward the same organ in other domains and pushes it away from other organs in every domain. The $1/N_{d,c}$ weight keeps abundant pairs, such as CT-liver, from dominating the gradient. The total objective is the usual Dice plus cross-entropy loss, plus $\lambda \mathcal{L}_{\text{align}}$. The branch is dropped at inference.

Two analyses accompany the method. The first measures the imbalance factor at four granularities on AMOS: voxel, organ, organ-region, and domain-organ-region. This tests whether the domain-organ view actually exposes a sharper tail. The second tracks region-level versions of BoDA's distances during training. These are the within-organ cross-domain distance and the between-organ distance. We test whether improvements in tail Dice are predicted by shrinkage of the cross-domain distance for tail organs specifically.

For organ-domain pairs with no labels, the region vectors cannot be formed from ground truth. This is exactly the dependency that Region Rebalance leaves open. We study two options. In the first, the pair simply has no node and transfer relies on the graph structure, as in BoDA's zero-shot pairs. In the second, confidence-thresholded pseudo-regions fill the node. We report pseudo-region noise as a separate factor.

Baselines

The naive reference is a single-modality model: nnU-Net trained on AMOS CT only and tested on MRI, and trained on one MRI scanner group and tested on held-out scanners. This reproduces the documented gap. AMOS reports a 3D-UNet CT test mDice of 89.04% and a drop of more than 20% on unseen MRI scanners.

The strongest existing method is joint multi-domain training with the same pipeline and no imbalance handling, following A-Eval. A-Eval reports 88.90% mean DSC and 93.81% mean NSD on unseen BTCV for jointly trained STU-Net, and AMOS reports that joint CT+MRI training improves MRI mDice by 2.14%. We found no reported result on Lacuna for per-organ MRI Dice under a leave-scanner-out AMOS protocol, so we will run that baseline ourselves.

To beat joint training, our method must raise mean Dice over the tail domain-organ pairs on held-out MRI scanners by a margin exceeding the seed-to-seed spread across three seeds. It must also keep overall mDice and the A-Eval BTCV numbers within one point.

We add three competitors that isolate the ingredients. The first is domain-organ balanced sampling and loss weighting: joint training where patches are sampled, and Dice terms weighted, by inverse $N_{d,c}$. This is the cheap version of our idea. The second is Region Rebalance with class-only nodes, which balances organs while ignoring domains. The third is BoDA on globally pooled scan features, which balances domains with no spatial structure. For a semi-supervised side comparison we include SKCDF with unlabeled scans drawn from a different scanner group, where its reported 53.81% Dice at 5% labels on AMOS serves as the in-domain reference.

Ablations remove one piece at a time: the region pooling (alignment on individual voxels), the inverse-count weights, and the cross-domain positives (which reduces the method to a class-only contrastive loss).

All methods share the same preprocessing, augmentation, patch size, epoch budget, and a fixed hyperparameter search of eight trials on a validation scanner group that is never used for testing.

Why not just…?

Why not just pool everything and train a bigger model? A-Eval already shows this is the strongest recipe. It also shows that STU-Net-H did not consistently beat STU-Net-L, and that models trained on large cohorts still drop on unseen data. Pooling also preserves AMOS's 5:1 CT-to-MRI skew. Our joint-training baseline uses the same pooled data, so any gain we report comes on top of scale, not instead of it. If the gain is absent at STU-Net-L, the claim fails.

Why not just reweight or resample by (domain, organ) frequency? This is the real threat, since it attacks the same imbalance unit with no extra loss. Region Rebalance gives a reason to expect it to fall short: voxel-level reweighting inflates false positives and treats correlated voxels as independent samples. That evidence comes from natural images, not from CT or MRI, so we include this as a full baseline. If balanced sampling matches our tail-pair Dice, the conclusion is that the domain-organ unit matters but the alignment loss does not, and we will report it that way.

Why not just apply Region Rebalance or Seesaw-style class balancing plus heavy intensity augmentation? These methods (Seesaw Loss for Long-Tailed Instance Segmentation, Region Rebalance) estimate class frequencies within a single domain. They cannot tell an organ that is rare everywhere from one that is rare only on MRI. The class-only Region Rebalance baseline, run with the same augmentation, measures how much the domain axis adds.

Why not just fine-tune or adapt per site? LIFT-style evidence indicates heavy fine-tuning harms tail classes. Per-site adaptation also needs target labels for the very organs that are missing. The zero-shot experiment below covers the case where such labels do not exist.

Proposed Experiments

The primary benchmark is AMOS with two protocols. The first trains on all CT plus MRI from a subset of scanner models and tests on MRI from held-out scanner models. The second trains on CT only plus unlabeled MRI and tests on MRI. Metrics are per-organ Dice and NSD, mean Dice over a predefined tail set (adrenals, gallbladder, esophagus, duodenum, pancreas), and the worst single domain-organ pair. Secondary evaluation uses A-Eval: train on FLARE22, AMOS, WORD and TotalSegmentator with dataset as the domain, then test on unseen BTCV.

The decisive check is a withheld-pair test. We remove adrenal and gallbladder labels from all MRI training scans while keeping them for CT, then measure MRI Dice on those organs. Joint training and class-only rebalancing should do poorly because they have no MRI signal for these organs. If region-level domain-class alignment recovers a substantial share of the fully labeled MRI score, that is direct evidence for the transfer mechanism, and no simpler baseline in the file can produce it. If it does not, the method reduces to a rebalancing trick, and balanced sampling becomes the fair comparison.

A second check correlates per-organ shrinkage of the cross-domain region distance with per-organ Dice gain. The method's story predicts a positive relationship concentrated on the tail organs.