Slice Thickness as a Hidden Hospital Shift

When a medical image segmentation model trained at one hospital fails at another, the usual explanation is appearance: a different scanner vendor, field strength, or reconstruction filter changes image contrast and texture. A second difference is almost never isolated. Hospitals also acquire volumes with different slice thicknesses and gaps between slices. One site might scan the prostate at 3 mm, another at 4.5 mm with a gap, and one CT site reconstructs at 1 mm while another uses 5 mm. Most cross-site benchmarks resample every scan to a common grid before training. That hides the spacing difference and adds interpolation artifacts. So when a model drops 20% at a new site, nobody can say how much of the drop comes from contrast and how much from geometry.

This note proposes to separate the two, and then to fix the geometric part with information every hospital already provides. The separation uses a controlled study: thin-slice scans from each site are re-synthesized at a range of physically realistic thicknesses, which breaks the natural link between site and thickness. The fix rests on an asymmetry. The site a scan came from is not known at a new hospital, but its slice thickness and spacing are written in every image header. We therefore build a segmentation network whose between-slice processing is conditioned on that known physical spacing. We test whether this removes the spacing-driven part of cross-hospital failure better than thickness augmentation alone.

Core Claim

The claim has two parts. The first is empirical: a measurable share of the cross-institutional performance drop in anisotropic CT and MRI is caused by through-plane spacing mismatch, not by contrast. Anisotropic here means volumes whose slices are much thicker than their in-plane pixels. That share interacts with how each architecture mixes information across slices. The second part is methodological. Spacing is always available at test time. A network that sets its through-slice mixing from the reported thickness and gap, trained on a dense range of simulated thicknesses, should close the spacing share at unseen sites without site labels. It should also leave the contrast share unchanged, where it can be handled by existing style-invariance methods.

What is new is not another hybrid 2D/3D block. It is treating physical spacing as a known covariate of domain shift, and measuring its effect separately from contrast shift. No work in the file does this. AlignShift comes closest. It frames thin versus thick CT as a domain gap and shows that resampling to a common grid adds artifacts. It uses a fixed, parameter-free shift factor (reference thickness over actual thickness), and it is evaluated only within DeepLesion, a single repository, on lesion detection. The multi-site methods, MS-Net and DCAC, define shift as appearance and never vary spacing. These papers motivate the proposal: AlignShift shows spacing can act as a shift, and the multi-site papers show nobody has measured it across hospitals.

Research Program

Controlled shift benchmark. For sites that provide thin-slice acquisitions, we simulate thicker acquisitions from the physics. Each volume is convolved along the slice axis with a slice-profile kernel of width $s$ and then sampled at spacing $d$. For MRI, we add a noise adjustment because thicker slices collect more signal. Simply dropping slices would not be realistic. Every site then appears at every thickness in the grid, so the site–thickness correlation found in real data is removed.

For a model trained on source sites at their native spacing, we measure four Dice drops against the in-distribution score. $\Delta_{\text{spacing}}$ comes from moving to a new thickness at a seen site. $\Delta_{\text{contrast}}$ comes from a new site at a seen thickness. $\Delta_{\text{total}}$ comes from a new site at its native thickness. The interaction term is

$$ I = \Delta_{\text{total}} - \Delta_{\text{spacing}} - \Delta_{\text{contrast}}, $$

and it tells us whether the two shifts compound. We also train a small classifier to recover acquisition spacing from real headers. This checks whether simulated thick scans can be told apart from real ones. If they can, the simulation is treated as a threat to validity and reported as such.

Spacing-conditioned network. The backbone follows the structure the anisotropy literature supports: 2D processing in early, high-resolution stages and volumetric mixing later. This design comes from recursive 2D-3D networks and uC 3DU-Net. We build on the uC 3DU-Net code.

The change is limited to the layers that mix across slices. There, a small network takes the header values $(s, d)$ and generates a scale and shift for the between-slice convolution features, plus a learned version of AlignShift's shift factor. In-plane filters are untouched. This differs from DCAC in two ways. DCAC infers a "domain code" from image features and uses it to generate in-plane filters. We use a measured physical scalar that needs no inference, and we modulate only the through-plane path. Training samples a thickness uniformly per volume from the simulation grid, so the network sees spacing as a continuous covariate rather than a handful of sites.

Secondary analysis: do 2D paths carry site texture? The file records an unresolved tension. uC 3DU-Net argues that 2D in-plane processing gives cleaner features. The discrete-token prostate classifier shows that continuous 2D features absorb scanner texture: its ResNet and ViT baselines lose 4.5 to 5.0 AUC points under noise, against 1.2 for the discretized model.

We fit linear probes that predict site identity from features in the 2D skip paths and in the 3D paths, then relate probe accuracy to each model's $\Delta_{\text{contrast}}$. This is diagnostic only. If the 2D paths do leak site texture, a style-invariance method becomes a natural complement to the spacing-conditioned network, and we would report that. We would not fold it into the method.

Baselines

The naive reference is the default pipeline: resample every volume to a common grid and train a 3D U-Net in the nnU-Net style. This is what cross-site benchmarks such as FeTA 2024 routinely do. On AMOS, a classic 3D U-Net reaches 89.04% mean Dice on the CT test set, yet models drop by over 20% on MRI from unseen scanners (AMOS). Our method beats this reference only if it cuts $\Delta_{\text{total}}$ at held-out sites. In-distribution Dice alone does not count.

The anisotropy-aware references are CSAM, which adds cross-slice attention to 2D U-Nets, uC 3DU-Net, and AlignShift in its original fixed-factor form. They are the strongest competitors on the geometric question because each was designed to avoid resampling artifacts. CSAM reports 51.0% Dice on anisotropic prostate cancer against 37.0% for 3D nnU-Net. None was tested across hospitals, so their cross-site behaviour is unknown and is itself a result of this study.

The strongest existing cross-site method is DCAC. It reports 90.51% Dice and 0.89 mm average surface distance on Domain 2 of its six-domain prostate MRI benchmark (DCAC). MS-Net reports 91.66% Dice across three sites (MS-Net), but it needs site labels at test time. It is run with known site labels for seen sites only and serves as an upper reference, not a leave-one-out competitor.

The decisive ablation is thickness augmentation alone: the same backbone and the same simulated-thickness sampling, but no conditioning on $(s, d)$. A second ablation feeds the conditioning network a random spacing value. This tests whether any gain comes from the header information or from the extra parameters.

Fairness rules apply to every method. All share the same preprocessing apart from their spacing handling, and the same training epochs and patch memory budget. Each gets the same hyperparameter search of about eight configurations, chosen on source-site validation only. We report three seeds.

Beating the strongest competitors has a specific meaning here. Under leave-one-site-out, the conditioned model must reduce $\Delta_{\text{spacing}}$ by at least half relative to augmentation alone. It must also lower $\Delta_{\text{total}}$ below DCAC's on held-out prostate sites, with no loss of in-distribution Dice beyond seed noise.

Why not just…?

Why not just resample everything to isotropic voxels and use nnU-Net? This is the field default, and AlignShift already shows it adds interpolation blur on thick slices. On anisotropic data, CSA-Net and LambdaUNet report 3D models degrading from those artifacts. But that evidence is in-distribution. Resampling may actually help cross-site if it smooths away site-specific differences. It is therefore not dismissed. It is the naive baseline, and its $\Delta_{\text{spacing}}$ is measured directly.

Why not just augment with simulated thick slices and skip the conditioning? This is the real threat. Augmentation by itself may make any backbone robust to spacing, and the proposal is designed so it can lose to this alternative. The augmentation-only ablation uses identical data. If it matches the conditioned model, we report that the remedy is on the data side, and the contribution becomes the decomposition plus the simulator. We expect conditioning to matter most at extreme or out-of-grid thicknesses, where a single set of through-plane weights must compromise across spacings. We test this by holding out the thickest simulated values during training.

Why not just use a style-invariance method like DCAC or heavy augmentation? These methods target appearance. In the prostate classifier paper, BigAug reached 0.724 AUC across scanners against 0.739 for discrete tokens. DCAC's controller never touches through-plane processing. If $\Delta_{\text{spacing}}$ is non-trivial, these methods should leave it intact, and the factorial benchmark shows that directly. We also run DCAC combined with our conditioning, to test whether the two gains add up.

Why not just use a 2D slice-wise network, which ignores spacing entirely? A 2D network is spacing-invariant by construction, so its $\Delta_{\text{spacing}}$ should be near zero. That makes it a useful control. It pays for this by losing depth context: CSA-Net's cross-slice attention raises Promise12 Dice from 0.910 to 0.921 and urethra Dice from 0.615 to 0.653. The texture probes may also show 2D features carrying more site signal. We include a 2D U-Net and report both its invariance and its in-distribution cost.

Proposed Experiments

The primary testbeds are multi-site prostate MRI and AMOS. Prostate MRI uses the six-domain set from DCAC and the three vendor sites from MS-Net, with leave-one-site-out evaluation; slice thickness genuinely varies across these sites. AMOS covers two centers and eight scanners in CT and MRI, with held-out scanners. We add the M&Ms multi-vendor cardiac challenge, where cine MRI is strongly anisotropic, and DeepLesion to reproduce AlignShift's thin-versus-thick gap as a sanity check. FeTA 2024 is used only as a reference for the resampled regime, because its super-resolution reconstructions remove the native spacing.

The metrics are Dice, 95th-percentile Hausdorff distance, and surface distance. We also report Euler characteristic difference, because FeTA 2024 found that models with equal Dice can differ badly in topology, and thick slices are a likely source of holes and bridges between structures. Finally, we check whether CSAM's slice uncertainty stays correlated with error at new sites. It reports r = 0.791 in-distribution.

The decisive checks are four. First, $\Delta_{\text{spacing}}$ must be a non-trivial fraction of $\Delta_{\text{total}}$ for the resampling baseline on at least two testbeds; if it is not, the premise fails and we say so. Second, the conditioned model must beat augmentation alone on held-out thicknesses and held-out sites. Third, the random-spacing ablation must remove that gain. Fourth, the gains must survive on the real native-thickness held-out sites, not only on simulated ones.