Geometry as the Shared Latent: Atlas Warps for Semi-Supervised Segmentation Across Scanners

When a segmentation network trained at one hospital is used at another, it usually fails because the new scanner renders the same heart or brain with different contrast, noise and intensity scaling, not because the anatomy is different. Current semi-supervised methods address this by splitting the network's internal representation into an "anatomy" part and an "appearance" part, then using unlabeled scans from other hospitals to train that split. The anatomy part, however, is still an unconstrained stack of feature maps, so nothing stops scanner style from leaking into it. We propose a different anatomy code. It is a smooth deformation field: a map saying how to bend a fixed reference template, an atlas, so that it lines up with this patient. Appearance becomes a small vector that says how this scanner paints that geometry. To segment a scan, the model warps the atlas's labels, then applies a small learned correction.

The point of this choice is that a deformation field has no slot in which to store contrast. Unlabeled scans from other hospitals also give a training signal that existing methods do not use. If we take one patient's estimated geometry, repaint it with another scanner's appearance, and re-estimate the geometry, we should get the same deformation back. This consistency check needs no labels and directly trains the geometry estimator to ignore the scanner. It is aimed at the realistic case where only one center has annotations and other centers contribute only raw scans.

Core Claim

In semi-supervised domain generalization (training with few labels plus unlabeled data, then testing on hospitals never seen in training), we claim that representing anatomy as a diffeomorphic deformation of a population atlas generalizes better than representing it as a free feature map. A diffeomorphic deformation is a smooth, invertible warp that cannot fold tissue onto itself. We further claim that training this deformation with cross-center appearance-swap consistency makes it invariant to the scanner, and that the gain should be largest exactly where current methods fail: at the extreme base and apex slices in cardiac MRI, on small low-contrast structures such as spinal cord gray matter, and on topology. The topology claim follows because a folding-free warp of an atlas cannot create holes or extra connected components.

This claim is distinct from the closest work. DGNet motivates our design and is our main comparator. It splits an image into anatomical feature maps, a shared appearance code and a domain-specific appearance code, trains with reconstruction on unlabeled scans, and enforces invariance with a heuristic low-rank penalty. It has no atlas and no geometric constraint, and its meta-learning needs several labeled source centers. DIVA supplies the three-way latent split: task, domain, residual. It works only for global classification, treats spatial variation as unstructured noise, and becomes hard to balance as the proportion of unlabeled data grows. Registration-assisted prototypical learning supplies evidence that atlas alignment helps across institutions: removing its alignment module costs at least 12% Dice in some cross-institution tests. That alignment is affine only, is supervised, and has no appearance split. VoxelMorph supplies the method, a learned deformable registration network with a differentiable warping layer. It also constrains us, because its intensity-based loss degrades under strong intensity shift. That weakness is precisely what the appearance code and swap consistency are meant to remove.

Research Program

The model has four parts.

First, a template. We build a population atlas from the labeled scans by groupwise registration. For cardiac data this atlas is an intensity template $A$ with label maps $L_A$.

Second, a geometry encoder $E_g$. It maps a scan $x$ to a stationary velocity field. Integrating that field gives a diffeomorphic warp $\phi$, which is folding-free by construction and therefore avoids the negative-Jacobian problem common in learned deformable registration.

Third, an appearance encoder $E_a$. It maps $x$ to a low-dimensional code $s$. A rendering decoder $R$ then produces the image from the warped template, $\hat{x} = R(A\circ\phi, s)$.

Fourth, a residual head. It predicts a correction $\delta$, and the segmentation is $\hat{y} = L_A\circ\phi + \delta$. The norm of $\delta$ is penalized so the warp carries most of the anatomy. Without that penalty, the residual head would simply become an ordinary segmentation network.

Training uses three signals. Labeled scans contribute a Dice and cross-entropy loss on $\hat{y}$. Every scan, labeled or not, contributes the reconstruction loss $\|x - \hat{x}\|$ plus a smoothness penalty on the velocity field. The new ingredient is appearance-swap consistency. For scans $x_i$ and $x_j$ drawn from different centers, we render $\tilde{x}_{ij} = R(A\circ\phi_i, s_j)$ and require

$$\mathcal{L}_{\text{swap}} = \| E_g(\tilde{x}_{ij}) - E_g(x_i) \|^2 + \| E_a(\tilde{x}_{ij}) - s_j \|^2 ,$$

where $E_g(\cdot)$ denotes the estimated velocity field. In words, the geometry estimated from a repainted image must match the original geometry, and the appearance must match the donor's. Unlabeled data from many centers is what makes this term informative, because it supplies a broad range of real scanner appearances $s_j$ to swap in.

Unlike pseudo-labelling, this signal never trains on the model's own guessed masks, so it avoids the confirmation bias that compounds errors on shifted data. It also stays well defined when labels come from a single center, which is the cross-domain setting formalized by DAC.

Two design risks need early diagnosis. The first is pathology the atlas cannot reach by smooth warping, such as severely dilated ventricles. We will log how the norm of $\delta$ varies across disease groups. The second is information leaking from appearance into geometry anyway. We will train a probe that predicts center identity from the velocity fields and report its accuracy against the same probe trained on DGNet's anatomy features.

Baselines

The naive reference is a supervised nnUNet trained only on the labeled scans with its default augmentation. DGNet reports this baseline at 65.94% average Dice on M&Ms with 2% labels, alongside 64.57% for SAML. We retrain it under our exact splits rather than relying on the quoted figure.

The strongest existing method on our primary benchmark is DGNet itself. It reports 72.85% average Dice on M&Ms with 2% labels, and 79.58% Dice on spinal cord gray matter (SCGM) with 20% labels against 76.73% for the best baseline it compared. It is the most direct competitor because it uses the same unlabeled data through reconstruction and the same anatomy/appearance split. The only difference is that its anatomy code is a free feature map regularized by low rank.

For the single-labeled-center setting, the strongest competitor is DAC. It combines co-training with cross pseudo-label and cross feature supervision and was designed for exactly this setting. We found no reported result on Lacuna for DAC on M&Ms, and its SCGM numbers appear only in figures, so we will run it ourselves.

All methods will share the same 2D/3D preprocessing, the same labeled and unlabeled splits, the same backbone width, a matched GPU-hour budget, and an equal hyperparameter search of 20 trials tuned on a held-out source center, never on test vendors. Beating DGNet means a higher mean Dice on unseen vendors across three seeds with non-overlapping confidence intervals. It also means a clear reduction in boundary-slice error and in Hausdorff distance, since mean Dice alone can hide the failures we target.

Four ablations isolate the key ingredient. The first keeps everything but replaces the warp with a DGNet-style free anatomy map plus the same swap loss. This tests whether geometry or swapping does the work. The second keeps the warp but drops the swap loss. The third restricts the warp to affine, which reproduces the alignment of the registration-assisted model. The fourth removes the unlabeled data.

Why not just…?

Why not just use heavy intensity augmentation or histogram matching with nnUNet? This is the most serious threat. Histogram matching augmentation was used on M&Ms, and the M&Ms challenge report notes that the best entries cut the unseen-vendor drop from about 6% to 1.5%, largely through augmentation. If our model only matches augmented nnUNet on mean Dice, the geometric latent has not earned its complexity. We therefore include nnUNet with histogram matching and random intensity transforms as a baseline in the matched-budget comparison. We will claim success only if we win in the low-label regime (2–5%, where augmentation cannot replace missing shape supervision) or on base/apex slices and topology, where a warp offers a structural guarantee that augmentation does not.

Why not just do atlas-based segmentation with VoxelMorph and intensity augmentation? Pure registration followed by label propagation already ties geometry to an atlas. However, VoxelMorph optimizes intensity correlation and is known to degrade under large intensity shift. It also has no correction head for anatomy that the atlas cannot reach. We run it as a baseline, trained on all labeled and unlabeled scans with the same augmentation. Our residual-head and swap ablations show what each addition contributes beyond it.

Why not just register every scan to the atlas as preprocessing and then run DGNet or DAC? This two-stage pipeline is cheap. Its weakness is that registration errors on unseen scanners are frozen before segmentation, and the downstream feature map still absorbs style. We run this pipeline, using the same registration network, in front of DGNet. If it matches our joint model, the contribution reduces to "register first," and we will report that outcome.

Proposed Experiments

The primary benchmark is M&Ms under the DGNet protocol at 2% and 5% labels. In this protocol, vendors A and B are labeled, vendor C is unlabeled, and testing covers all vendors, with vendor D never seen in training. We add a cross-domain variant in which only vendor A is labeled and B and C are unlabeled, matching the DAC formulation. We report Dice and HD95 per structure (LV, RV and myocardium), with separate figures for basal and apical slices.

SCGM at 20% labels tests small, low-contrast structures against DGNet's reported 79.58%.

The FeTA 2024 fetal brain benchmark tests topology through Euler characteristic difference. There, the winning method reached an Euler characteristic difference of 20.9 at Dice comparable to other teams, and the 0.55T out-of-domain set gave Dice 0.86. Because gestational age changes the anatomy, FeTA also requires an age-conditioned atlas in the spirit of LucidAtlas. If a single static atlas collapses there, that result directly measures the known atlas-rigidity limitation.

Three checks are decisive. First, the free-feature-map ablation must underperform the warp model on unseen vendors, showing the geometric latent matters. Second, the center-identity probe on velocity fields must sit near chance while the same probe on DGNet's anatomy features does not, showing the warp blocks style leakage. Third, our model must beat augmented nnUNet on basal and apical slices at 2% labels, so that the gain is not something augmentation alone provides. If all three hold, geometry is a better shared latent than features for semi-supervised generalization across scanners. If only the third fails, the honest conclusion is that augmentation already captures most of the benefit.