Contrast-Preserving 3D Spectral Augmentation for Cross-Scanner Segmentation of Low-Contrast Organs

Segmentation models trained at one hospital often fail at another because each scanner renders the same anatomy with different brightness, texture and blur. A popular cheap fix is frequency-domain augmentation: the image is decomposed into its spatial frequencies, the smooth low-frequency content that carries "style" (overall intensity, shading) is randomized, and the sharp high-frequency content assumed to carry "structure" is kept. The fix works well on 2D images with crisp edges such as retinal vessels. It rests on an assumption that breaks for soft-tissue boundaries. The border between the pancreas and the duodenum, or around a thin right-ventricular wall, has no sharp edge. It is a faint, gradual difference in mean intensity, and that difference lives largely in the same low and middle frequencies the augmentation randomizes. Our hypothesis is that unconstrained spectral augmentation often erases the only image evidence for these boundaries while keeping the label. The model is then trained on voxels whose label the image no longer supports, and it learns to smear or hallucinate exactly the borders that matter clinically.

We propose a simple test and a simple remedy. We apply spectral style randomization to whole 3D volumes, with the same filter across all slices and filter radii matched to each scan's voxel spacing. Any sampled filter that reduces the measured intensity contrast across pre-identified low-contrast boundaries below a fraction $\tau$ of its original value is rejected. Sweeping $\tau$ from zero, which is ordinary unconstrained augmentation, upward gives a direct measurement of whether protecting boundary evidence helps cross-scanner accuracy on small, ambiguous organs. If it does, the result is a cheap, architecture-agnostic change to training. If it does not, it clears the way for the standard practice.

Core Claim

The claim is that frequency-style augmentation for single-source generalization carries a hidden boundary cost that grows as tissue contrast falls. Constraining the augmentation to keep label-supporting contrast should improve boundary accuracy (95th-percentile Hausdorff distance, HD95) on low-contrast organs under unseen-scanner shift without hurting high-contrast organs. The claim makes a falsifiable prediction. The gain should concentrate on the class pairs with the lowest boundary contrast, such as pancreas, adrenal glands, duodenum and right ventricle. It should be near zero on the liver or spleen. The benefit curve over $\tau$ should peak at a nonzero value rather than at $\tau = 0$ or at very high $\tau$, where augmentation becomes too timid to cover the shift.

The proposal differs from its three closest neighbours. FreeSDG mixes Gaussian-filtered frequency views of a single source domain and adds a self-supervised reconstruction task. RaffeSDG randomizes low frequencies with Butterworth filters and blends homologous samples. Both are 2D and binary, and both assume that edges survive in the high band. We keep their mechanism, reuse it in 3D, and test that assumption directly on multi-class soft tissue. Frequency Domain Adversarial Training for Robust Volumetric Medical Segmentation is the closest volumetric work. It trains 3D networks against worst-case 3D cosine-transform perturbations with a frequency consistency loss, but it targets adversarial robustness rather than realistic scanner shift and has no notion of boundary evidence. Our constraint is label-aware and non-adversarial.

Research Program

The first step is diagnostic. For each training volume $x$ with label map $y$, and for each pair of adjacent classes $(a,b)$, we define a thin band of voxels on each side of their shared interface. The boundary contrast is

$$c_{ab}(x) = \frac{|\mu_a(x) - \mu_b(x)|}{\sigma_{ab}(x)},$$

where $\mu_a$ and $\mu_b$ are the mean intensities in the $a$-side and $b$-side bands and $\sigma_{ab}$ is the pooled intensity standard deviation within both bands. We rank class pairs by median $c_{ab}$ on the training set and pre-register the lowest-contrast pairs as the "ambiguous set" before any cross-domain evaluation. We then measure the distribution of the ratio $c_{ab}(Hx)/c_{ab}(x)$ under randomly sampled 3D style filters $H$ drawn from RaffeSDG-style Butterworth and FreeSDG-style Gaussian families. This shows directly how often standard augmentation erases boundary evidence and whether the damage is concentrated on the ambiguous set. The answer is useful on its own, and it tells us whether the method is worth running.

The second step is the method. A sampled filter $H$ is accepted only if

$$\min_{(a,b)\in\mathcal{A}} \frac{c_{ab}(Hx)}{c_{ab}(x)} \ge \tau,$$

where $\mathcal{A}$ is the ambiguous set present in the current crop. Otherwise it is resampled, with a fixed maximum number of retries before falling back to the identity. Three details make the method volumetric.

The contrast check applies to both families.

The third step crosses the augmentation with explicit boundary supervision. The file's Gap 2 notes that nobody has tested whether contour branches stay useful under frequency augmentation. We add the auxiliary contour branch of A Medical Image Segmentation Method based on Multi-scale Features and Contour Loss Constrain, which gives 10% weight to a contour loss on Canny edges of the label, to a 3D nnU-Net-style backbone. We train all four combinations of constrained or unconstrained augmentation, with or without the contour loss. Our prediction is that a contour loss trained under unconstrained augmentation partly learns to draw edges where the image has none, and that the constraint recovers its benefit.

We deliberately use a convolutional 3D U-Net backbone. AMOS reports 3D-UNet at 89.04% mDice on CT against 86.32% for the best transformer, and FeTA 2024 reports nnU-Net winning across centers. This keeps the question about data and loss rather than architecture.

Baselines

Naive reference. A 3D U-Net trained with spatial augmentation only (flips, rotations, scaling) and Dice plus cross-entropy loss. This fixes how large the unseen-scanner drop is without any intervention. AMOS reports that this drop exceeds 20% for MRI from unseen scanners. The file gives no absolute cross-scanner mDice, so we reproduce it ourselves.

Strong practical baseline. The same backbone with the full nnU-Net default intensity augmentation (gamma, contrast, brightness, Gaussian blur, noise, simulated low resolution). Practitioners actually use this, and it already randomizes much of what spectral augmentation randomizes. Beating it by a margin larger than seed-to-seed variation on ambiguous-set HD95 is the minimum bar.

Strongest existing frequency method. RaffeSDG ported to our setting in two forms: slice-wise 2D filtering, as published, and full-volume 3D filtering without the constraint. The second form is exactly our method at $\tau = 0$ and is therefore the key ablation. RaffeSDG reports Dice 0.775 on STARE when trained on DRIVE, against 0.677 for FreeSDG and 0.600 for a plain U-Net, per RaffeSDG. No reported result was found on Lacuna for RaffeSDG or FreeSDG on 3D multi-organ or cardiac MRI.

Closest volumetric frequency method. VAFT, adversarial 3D frequency training. The file reports 75.66% Dice on clean Synapse with a UNETR backbone and 66.33% under its own attack, per Frequency Domain Adversarial Training for Robust Volumetric Medical Segmentation. We re-run it on our backbone and data.

Boundary-only baseline. The contour-loss network of the MultiBlock paper without any spectral augmentation. It reports 0.8952 Dice and 2.8214 HD95 on in-domain ACDC.

Fairness conditions. Every baseline shares the same backbone, patch size, epoch count and training data. Each receives an equal hyperparameter budget of about ten configurations, selected on a held-out split of the source scanners only, never the target. Each is run with three seeds.

What counts as winning. We report per-organ Dice and HD95 on unseen scanners. "Beating" means lower HD95 on the pre-registered ambiguous set than both nnU-Net default augmentation and unconstrained 3D RaffeSDG, with confidence intervals across seeds and patients that exclude zero, and no significant loss on high-contrast organs.

Why not just…?

Why not just use nnU-Net's default intensity augmentation? This is the most serious threat. Its gamma, contrast and blur transforms cover much of the style variation spectral filters produce, and they may rarely push boundary contrast to zero. Nothing in the file settles this. The diagnostic step does, by measuring the contrast-ratio distribution under nnU-Net transforms as well as spectral filters. If nnU-Net's transforms already keep ambiguous-set contrast high and match our method's cross-scanner HD95, we will report that the constraint adds nothing beyond it. The contrast check could then be ported to nnU-Net's own augmentation as a smaller contribution.

Why not just add a boundary loss and skip frequency augmentation? Contour losses sharpen boundaries in-domain; the MultiBlock paper reduced spleen HD95 from 7.5744 to 5.8814. They do not create robustness to rendering changes the model has never seen. CMRxMotion found that top teams still lost more than 3 Dice points on the left ventricle and struggled on the right ventricle under motion. The factorial design isolates this alternative directly, as the contour-only cell.

Why not just apply published 2D RaffeSDG slice by slice? It is cheaper and already validated. However, it assigns independent styles to adjacent slices, which puts artificial through-plane discontinuities into training. The slice-wise versus volume-consistent comparison tests this. We also measure topology with the Euler characteristic difference from FeTA 2024, which is where slice inconsistency should show up.

Why not just train on CT and MRI jointly? AMOS reports only +2.14% mDice on MRI from joint training, far short of the more-than-20% cross-scanner gap. Joint training is also orthogonal to our method, so we include it as an add-on condition rather than a competitor.

Proposed Experiments

Primary experiment: AMOS MRI. We use AMOS abdominal MRI and split it by scanner. Training uses the MRI scans from a subset of scanners, and testing uses the MRI scans from the remaining unseen scanners. We will confirm the split from the dataset's scanner metadata. The ambiguous set is expected to contain pairs involving the pancreas, adrenals, duodenum and esophagus, but it is fixed from the training-set contrast ranking before testing.

Second experiment: cardiac motion shift. We train on ACDC and test on the CMRxMotion segmentation cohort, stratified by breathing condition from breath-hold to intensive breathing. Both spectral style and k-space motion families are used. The ambiguous set should include the right-ventricle boundaries. Beyond Dice and HD95, we report the error in left-ventricular end-diastolic volume, because CMRxMotion found this error more than doubles under severe motion.

Optional third experiment: FeTA 2024. FeTA provides multi-site and low-field data, and its Euler characteristic difference serves as a topology check. The file reports 0.86 Dice, 1.69 HD95 and 6.26 Euler difference for the best entry on the 0.55T set.

Decisive checks. Four results decide the claim.

  • Contrast diagnostic. Unconstrained spectral augmentation must frequently push ambiguous-set contrast below about half its original value. If it rarely does, the premise fails and we stop.
  • $\tau$ sweep. The sweep over $\tau$ in {0, 0.25, 0.5, 0.75} must show an interior optimum for ambiguous-set HD95, with a flat curve for high-contrast organs.
  • Gain on real shift. The constrained method must beat both nnU-Net default augmentation and unconstrained 3D RaffeSDG on ambiguous-set HD95 under real scanner and motion shift.
  • Contour loss interaction. In the factorial, the contour loss should help more under constrained than under unconstrained augmentation.

Label-noise control. As a control on interpretation, we also train unconstrained augmentation with the loss down-weighted in bands where contrast was destroyed. If this matches the rejection method, the mechanism is label noise at boundaries, and down-weighting is the simpler recommendation.