Structure-Centered Alignment for Few-Shot 3D Segmentation

When a 3D scan is aligned to a reference template before segmentation, a small leftover rotation does little harm near the point the rotation turns around (the pivot), but grows into a large boundary shift far from it. Radiotherapy has measured this precisely. On a 20 cm head-and-neck field, a 2° tilt moves the field edge by 3.5 mm, and 97% of cone-beam CT setup scans show at least 0.5° of rotation, with forward–backward head tilt (pitch) the most frequent error (Implementation of the HexaPOD™ evo RT system). Few-shot medical segmentation networks, which learn to outline a new organ from a handful of labeled examples, ignore this geometry. Their alignment step predicts one global transform about the volume center and scores it with a loss that treats every voxel equally. We propose to move the pivot to each target structure, and to weight the alignment penalty by each structure's distance from the pivot. The aim is that the structures most exposed to leftover rotation, which are small, peripheral and through-plane, stop being the ones the network gets most wrong.

The claim is narrow and testable. In few-shot 3D segmentation with atlas alignment, residual rotation error should scale with distance from the pivot. Re-centering alignment on each structure, with a lever-weighted loss, should therefore help most on structures far from the volume center and under out-of-plane rotations. The gain should be small for central, bulky organs. If the improvement does not track distance, the idea is wrong.

Where this sits

The closest work is registration-assisted prototypical learning for cross-institution male pelvic organs. That method does several things:

  • It is a 3D few-shot network. It builds several local "prototypes" (average feature vectors of the target class) from overlapping 3D windows.
  • Its alignment module predicts an affine transform to a reference atlas and applies it to the feature maps.
  • On 178 T2-weighted MRI scans from 6 institutions, it reports 41.73% mean Dice on novel classes. A 2D baseline reaches 38.44% and the fully supervised 3D upper bound is about 64.3%.
  • Removing its alignment module costs at least 12% on cross-institution tests.

This paper motivates our proposal, because it shows alignment matters a lot under few-shot constraints. It also supplies the method we build on: we reuse its backbone, episodes and feature-space warping. It differs from our proposal in two ways. It uses one global pivot, and its alignment objective has no notion of distance. We change only those two things.

Two radiotherapy registration lines constrain the design. CPT-DIR and cIDIR fit continuous deformation fields one patient at a time and reach sub-millimeter error on DIR-Lab. cIDIR, however, needs 20–90 minutes of per-pair training, and neither method shares an atlas across patients. That tells us per-patient optimization is the wrong place to put the lever constraint in a population few-shot model.

Weakly supervised MR-CT alignment for cervical cancer uses rigid bone as an alignment anchor before deformable refinement. This supports the idea that a well-chosen rigid anchor matters. It still optimizes uniform similarity terms and does not model lever geometry.

The volumetric-context literature explains why the pivot problem is worse for slice-based pipelines. Out-of-plane rotations such as pitch and roll mix slices together. A 2D model cannot undo them, it can only undo in-plane rotation. Roth et al. had to patch slice-wise outputs with post-hoc 3D smoothing. Wolf et al. show that 2D vision-language models sit near chance on relative organ position, and that GPT-4o falls from 75% to 50% accuracy when scans are flipped. Both point the same way: orientation errors are not recoverable from single slices.

Core mechanism

For a rotation error of angle $\theta$ about pivot $\mathbf{p}$, a point at distance $r = \|\mathbf{x}-\mathbf{p}\|$ moves by about $r\theta$ (the small-angle form of $L\sin\theta$). With few examples, the estimated rotation is noisy. If $\sigma_\theta$ is the typical size of that estimation error, the boundary error at structure $k$ grows like $r_k\sigma_\theta$, where $r_k$ is the distance from structure $k$ to the pivot.

Moving the pivot to the structure centroid $\mathbf{c}_k$ makes $r$ about the size of the structure itself. Rotation then contributes little error, and translation, which is estimated more reliably from few samples, does most of the work.

Concretely, the alignment module outputs one global affine transform $(\mathbf{A},\mathbf{t})$, as in the prior work. It also outputs, for each queried structure $k$, a small residual rotation $\mathbf{R}_k$ and translation $\mathbf{t}_k$ applied about the predicted centroid $\hat{\mathbf{c}}_k$. The features feeding structure $k$'s prototype comparison are warped by the composed transform. We train this with a lever-weighted alignment loss:

$$ \mathcal{L}_{\text{lever}} = \sum_k \Big( \|\hat{\mathbf{c}}_k - \mathbf{c}_k^{\text{atlas}}\|^2 + \lambda\, \rho_k^2 \,\|\mathbf{R}_k \mathbf{R}_k^{\text{atlas}\top} - \mathbf{I}\|_F^2 \Big), $$

Here $\mathbf{c}_k^{\text{atlas}}$ and $\mathbf{R}_k^{\text{atlas}}$ are the structure's position and orientation in the atlas, both computed from support labels mapped to the atlas. $\rho_k$ is the structure's radius of gyration, so the rotation penalty is expressed in millimeters of boundary motion. $\lambda$ is a single weight. The penalty is applied only where support labels exist, so it adds no new annotation burden.

The segmentation loss is unchanged. The whole system stays one network, trained episodically, with the same 5.7M-parameter 3D backbone as the baseline.

Research Program

The work has three parts, and each answers a separate question.

Measuring the problem in the baseline. First, we measure whether the problem exists in the existing method. We reproduce the affine-aligned baseline on the pelvic benchmark and record, for each of the 8 structures, the distance between its centroid and the volume center. We then test whether the baseline's per-structure Dice deficit relative to the supervised upper bound correlates with that distance. The benchmark's structures span central, bulky organs (bladder, prostate zones) and small, peripheral ones (neurovascular bundles, seminal vesicles, obturator internus). If no correlation exists, the premise fails and we stop.

Controlled rotation tests. Second, we inject rotations into test volumes. This isolates rotation from the many other cross-institution differences. We apply in-plane rotations and through-plane rotations (pitch and roll) at 0.5°, 1°, 2° and 5°. The lower range follows the clinical distribution reported for the HexaPOD cohort; 5° is a stress case. This produces curves of boundary error versus angle and versus distance for every method.

Small-sample bias–variance study. Third, we vary the number of support volumes per episode from 1 to 5. For each support size we compare translation-only, global-affine and structure-centered alignment. The prediction is specific:

  • Translation-only alignment has a fixed bias proportional to $r\theta$.
  • Global affine alignment has a variance that grows as support shrinks.
  • Structure-centered alignment should dominate at small support, and the gap should narrow as support grows.

Baselines

The naive reference is the same 3D prototypical network with the alignment module removed. The prior paper reports this costs at least 12% on cross-institution tests. It sets the floor and confirms that our reproduction shows the known effect.

The strongest existing method is the affine-aligned registration-assisted prototypical network from Li et al., with a reported 41.73% mean novel-class Dice on the cross-institution pelvic MRI benchmark. It is the strongest competitor because it already combines native 3D context, atlas alignment and episodic few-shot learning on exactly this data. Our change can only be judged against it. We will rerun it from the authors' design under our own splits:

  • the same institution hold-outs and novel-class assignments,
  • the same 5.7M-parameter backbone,
  • the same number of training episodes,
  • the same GPU budget,
  • an identical hyperparameter search budget for both methods.

Beating it means two things. The mean novel-class Dice must exceed our reproduction of the baseline on paired test cases, with a paired test across held-out institutions. We pre-commit to two additional conditions: the per-structure gain must increase with centroid distance from the volume center, and HD95 must fall on the peripheral structures. A mean improvement that comes entirely from the bladder would not count.

A second strong competitor is classic atlas segmentation by label propagation. Support labels are carried to the query by 3D deformable registration, using either B-splines or a learned registration network of the TransMorph/VoxelMorph type, as compared in the cervical MR-CT work. No reported result was found on Lacuna for label propagation on the cross-institution pelvic MRI benchmark, so we will run it ourselves with the same support volumes.

Two ablations isolate the key ingredient:

  • The first keeps per-structure residual transforms but leaves the pivot at the volume center. This tests whether the pivot location, rather than the extra parameters, carries the gain.
  • The second keeps the structure-centered pivot but drops the $\rho_k^2$ weighting. This tests the lever weighting.

A 2D slice-wise variant restricted to in-plane alignment tests the volumetric claim directly. Its deficit should appear specifically under pitch and roll injections.

Why not just…?

Why not just use full deformable atlas registration and propagate labels? This is the most serious alternative. Deformable registration has no single pivot, so lever effects do not apply in the same form. Its known weaknesses work against it here. Warping into templates can smear patient-specific margins and breaks under large anatomical change (MSD notes interpolation and shear distortions). Accurate per-patient optimizers such as cIDIR take 20–90 minutes per pair. We will run label propagation directly. If it matches our method on peripheral structures at comparable runtime, the honest conclusion is that learned few-shot segmentation adds little for these structures, and we will report that.

Why not just add heavy rotation augmentation to the affine baseline? Augmentation teaches the network to tolerate rotation. It does not remove the $r\theta$ geometry of a single global pivot. The prior work's ablation shows augmentation did not replace explicit alignment, losing at least 12% without the module. Still, augmentation could shrink $\sigma_\theta$ enough to close the gap, so it is a real threat. We will train the affine baseline with rotation augmentation matched to our injection range. If its distance-error curve is as flat as ours, our contribution reduces to a training trick and we will say so.

Why not just crop around each structure and run the existing method on the crop? A detect-then-crop cascade also re-centers the pivot. It is close to our idea. The difference is that cropping is a hard, non-differentiable hand-off. Errors in localization pass directly into segmentation, which is the failure documented for the cascaded pipeline of Dong et al.. Cropping also discards the global context the prototypes use. We include the cascade as a baseline with oracle and with predicted crops. If predicted-crop cascades match our method, the end-to-end formulation is unnecessary.

Why not just correct translation only, as many clinical setups do? Translation-only alignment is the few-shot analogue of 3-DOF couch correction. In the clinical setting, 3D-versus-6D registration differences were statistically significant (HexaPOD). It is also the low-variance choice when support is tiny. That is why it appears as an explicit arm of the support-size study rather than being dismissed. If it wins at one-shot, that is a finding about how many alignment degrees of freedom few-shot learning can afford.

Decisive checks

The study succeeds if three things hold together on held-out institutions:

  • Structure-centered alignment beats our reproduction of the affine baseline in mean novel-class Dice.
  • Its per-structure gain correlates positively with centroid distance from the volume center.
  • Under injected pitch and roll, its boundary error grows more slowly with angle than the global-pivot and 2D variants.

Results are reported in millimeters of peripheral boundary shift, so they can be read against the clinical 1–3.5 mm figures cited above.

Two outcomes would falsify the idea. The first is a flat gain-versus-distance curve. The second is the pivot-at-center ablation matching the full method, which would show that capacity, not geometry, drove the gain. Secondary replication uses multi-structure tasks in the Medical Segmentation Decathlon. Because its scans are already standardized to a canonical orientation, it tests whether the effect survives once gross orientation ambiguity is removed.