Pruning Away the Scanner: Compression That Removes Hardware-Specific Features

Hospitals that want to run 3D segmentation networks on local servers or edge devices must shrink them, and those same networks fail badly on scanners they were not trained on. Structured pruning removes whole channels from a network, and the usual way to choose them is to keep whichever channels matter most for accuracy on a small set of example scans. We propose a different rule. Before compression, measure how much each channel's activity changes from one scanner to another, using unlabeled scans whose scanner model can be read from the image file header. Then remove the channels that mostly encode the scanner rather than the anatomy. The aim is a single compression step that makes the model both cheaper and less sensitive to scanner hardware, carried out once before certification so the deployed model never needs site-by-site weight changes.

This matters because the two problems are currently studied separately. Scanner shift is severe: in a cross-vendor study of seven public datasets, a prostate MRI classifier trained on Siemens data fell from AUC 0.791 to 0.505 on other vendors, and AMOS reports drops of more than 20% on MRI from unseen scanners. Compression papers, by contrast, report results on in-distribution language benchmarks. Nobody has checked whether pruning makes scanner shift worse, and nobody has used scanner variation as a signal for deciding what to prune.

Core Claim

Some of a convolutional network's channels respond mostly to acquisition properties such as contrast, noise texture and reconstruction kernel. These channels can be identified cheaply because the scanner label is free metadata. If they are removed first during structured pruning, a compressed 3D-UNet should show a smaller gap between seen and unseen scanners than an equally sized network pruned by task importance alone, with in-distribution accuracy roughly unchanged and the same wall-clock latency.

The test is deliberately falsifiable. If scanner sensitivity turns out to be spread evenly across channels, or if the scanner-sensitive channels also carry the features the task needs, the method gives no gain over standard importance pruning, and the experiments are designed to show that.

Relation to Prior Work

Three groups of prior work play different roles.

Work that motivates the proposal. The scanner-shift study, AMOS and FeTA 2024 measure how large the shift is. FeTA attributes about 0.075 Dice to acquisition site and includes a 0.55T low-field test set. All three evaluate dense models only.

Work that supplies the machinery. LLM-Pruner removes structured groups of weights using gradient-based importance computed on a small calibration set. We reuse that importance estimate as our task term. Dynamic slicing by layer redundancy shows that pruning budgets should differ across layers, and we allocate our budget per layer in the same spirit.

The closest existing work. It constrains the design without occupying it:

  • FedIAT finds that scanner variation lives mostly in the encoder and annotation style mostly in the decoder. It handles this with personalized low-rank adapters trained over 200 federated rounds. We remove weights in a single pass and need no federation and no per-site adapters. We also use its encoder/decoder asymmetry as a hypothesis about where scanner-sensitive channels sit.
  • Cross Domain Model Compression by Structural Weight Sharing clusters channels into domain-shared and domain-private groups, but only to save storage across several domains that are all kept. We delete the domain-private channels to gain robustness on a domain that was never seen.
  • VeloxSeg builds a 1.66M-parameter 3D segmenter whose channel groupings are chosen to preserve distances between features. It never tests cross-vendor shift. Preserving all feature distances might also preserve scanner-specific ones, which is exactly the opposite of our goal.
  • Out-of-distribution robustness in learned compression concerns compressing data, not model weights. It is relevant mainly as a warning that robustness can cost in-distribution accuracy, so we report both.

Research Program

Stage one: measurement. We take a 3D-UNet trained in nnU-Net style and prune it to 30%, 50% and 70% channel removal using three standard rules: weight magnitude, gradient importance, and per-layer budgets set by layer redundancy. Each pruned model gets the same short fine-tuning. We then measure the gap between seen and unseen scanners. This answers Gap 1 directly: does ordinary pruning widen scanner shift? That result is publishable regardless of what follows.

Stage two: the method. For each channel $c$ we compute a task importance $g_c$, which is the first-order estimate of loss change when the channel is removed, averaged over labeled source scans. We also compute a scanner sensitivity $s_c$ from unlabeled scans drawn from several scanners. The sensitivity is a Fisher ratio: the variance across scanners of the channel's average activation, divided by the variance within each scanner. Channels are kept in order of

$$\text{keep}_c = \frac{g_c}{\max_{c'} g_{c'}} - \lambda \, \frac{s_c}{\max_{c'} s_{c'}},$$

where $\lambda \ge 0$ trades task importance against scanner sensitivity. Setting $\lambda = 0$ recovers standard importance pruning. $\lambda$ is selected on a validation scanner that is excluded from both calibration and test.

Handling the anatomy confound. Scanner identity is partly tangled up with hospital and patient population; in AMOS, scanners are nested within two centers. Without care, $s_c$ could flag channels that respond to real anatomical differences. To limit this, activations are pooled separately inside each predicted organ region before computing $s_c$. Differences in how much of the volume each organ occupies then do not inflate the score. We also report $s_c$ computed within a single center wherever that center has more than one scanner model.

Deployment target. All models are measured for wall-clock latency on CPU, and the comparison is always at matched channel counts. This avoids the frequent gap between counted operations and real speed noted in the compression literature.

Proposed Experiments

Primary benchmark: AMOS. It has eight scanner models and both CT and MRI. We use a leave-one-scanner-out protocol:

  • Labels come from the source scanners only.
  • Unlabeled calibration scans come from other scanners, never the held-out test scanner.
  • Testing is on the held-out scanner.

This tests generalization to a scanner that was never seen, not adaptation to a known target. We run it on MRI, where shift is large, and on CT, where the scanner study predicts little shift. CT therefore serves as a control: the method should help little there and must not hurt.

Secondary benchmark: FeTA 2024. We hold out each site in turn, and separately hold out the 0.55T low-field set. We report Dice, the 95th-percentile Hausdorff distance, and the Euler characteristic difference, which counts topological errors such as holes and disconnected pieces. Pruning could break topology even when overlap scores look fine.

Classification check. We apply the same scoring to the prostate MRI classification split from the scanner study and report AUC.

Baselines

Do nothing. The naive reference is the dense 3D-UNet evaluated on held-out scanners. On AMOS CT the paper reports 89.04% mDice in distribution. For MRI on unseen scanners it reports only "a drop of over 20%"; it gives no per-scanner figure, so we reproduce this number ourselves. The do-nothing baseline sets the gap that every compressed model is judged against.

Strongest existing method. This is gradient-importance structured pruning in the style of LLM-Pruner, adapted to 3D convolutional channels, followed by fine-tuning. It is the strongest competitor because it is the standard calibration-based structured pruner. We give it exactly the same unlabeled multi-scanner calibration pool, the same labeled data, the same fine-tuning epochs and the same tuning budget for its hyperparameters as our method. I found no reported result on Lacuna for structured pruning of a 3D-UNet under cross-scanner shift on AMOS or FeTA.

What counts as winning. At 50% and 70% channel removal, our method must close at least a third of the unseen-scanner MRI gap that this baseline leaves. In-distribution mDice must stay within one point, and CPU latency must match. The win must hold over three seeds and across most held-out scanners, not just on average.

Ablation isolating the key ingredient. This is the $\lambda = 0$ case, run in two forms: calibration on source scanners only, and calibration on the multi-scanner pool. Comparing the two forms separates two effects that could otherwise be confused. One is simply showing the pruner more diverse calibration data. The other is the scanner-sensitivity term itself.

Random control. We also remove channels at random, but matched in their distribution of $s_c$ values. This tests whether $s_c$ carries real information or whether any change to which channels are removed would produce a similar result.

Purpose-built small network. VeloxSeg, trained from scratch at matched parameter count using its released code, tests whether a network designed to be small beats a pruned one. Its reported 62.51% Dice on AutoPET-II is not comparable to our benchmarks. It has no cross-scanner result on Lacuna.

Why not just…?

Why not just use heavy intensity augmentation? The scanner study found that Gaussian noise augmentation failed to close the scanner gap and often lowered accuracy. That study did not test stronger contrast and gamma randomization, so augmentation remains a real threat. All our models already train with nnU-Net's default intensity augmentation. If the scanner-sensitive channels have already been suppressed by augmentation, $s_c$ will be uninformative and the random control will match our method. That would be a clear negative result.

Why not just re-estimate normalization statistics at each new site? This is cheap and often effective against intensity shift, and I found no result for it on these benchmarks in the file. It does, however, change the deployed model at every hospital, which is the kind of per-site modification that the locked-model argument rules out. We report it as a reference point. Our method should also stack with it: if our pruned model plus site-level statistic updates beats the dense model plus the same updates, the two address different parts of the shift.

Why not just fine-tune on 10–20% labeled target data? The scanner study shows this recovers most of the lost accuracy. But it requires expert labels at every site and changes certified weights. Our setting assumes no target labels and no target scans of any kind. We include target fine-tuning as an upper bound so readers can see what fraction of that recovery our method achieves for free.

Why not just train the dense model on all scanners? Our calibration pool is unlabeled, so it cannot be used for supervised training. A fair version of this alternative is unsupervised domain-alignment training on the same pool. The input-adapter results show that alignment can move data further from the source distribution while still helping, which suggests that matching distributions is not the right objective. We nonetheless run a domain-adversarial dense model on identical data, then prune it with the standard rule, as an additional baseline.

Decisive Checks

The first check is whether ordinary pruning widens the unseen-scanner gap on AMOS MRI while leaving CT unchanged. The second is whether $s_c$ predicts harm: removing only the top 10% most scanner-sensitive channels from the dense model, with no other compression, should reduce the MRI gap. Removing the same number of the least sensitive channels should not. The third is whether, as FedIAT implies, the sensitive channels cluster in the encoder.

If the second check fails, the idea is wrong and the study reduces to a measurement paper. If it passes but the full method only matches the multi-scanner $\lambda = 0$ ablation, then the gain comes from calibration diversity rather than the scanner-sensitivity score, and we will report it that way.