Cross-Slice Persistence as the Tiebreaker Between Texture and Weak Boundaries

Segmentation networks for CT and MRI must make one hard call over and over. They have to decide whether a local change in appearance marks the edge of an organ or only a variation inside it. The two errors pull in opposite directions. Methods that sharpen weak boundaries also sharpen the patchy internal texture of organs like the pancreas, so the organ breaks into fragments, which we call over-segmentation. Methods that smooth away internal texture also smooth away the faint boundary between pancreas and surrounding fat. Within a single 2D slice this conflict cannot be resolved, because a faint true boundary and a strong texture edge can look the same locally. In the full volume they behave differently. A real organ surface continues from slice to slice, shifting only a little. Internal texture, noise, and contrast mottling mostly do not line up across slices.

This note proposes to measure that difference directly and to build it into the network. The core idea fits in two sentences. Score every candidate edge by how consistently it reappears in neighbouring slices, allowing a small positional shift that scales with slice thickness. Then use that persistence score, rather than local contrast, to decide which edges the network should sharpen and which it should merge. Volumetric context, usually treated as a smoothness bonus, becomes the specific signal that separates texture from low-contrast boundaries.

Core Claim

The claim has two parts, and the first is a measurable hypothesis that could fail. On low-contrast abdominal organs, a cross-slice persistence score should separate true boundary voxels from high-gradient interior voxels with clearly higher AUROC than in-plane gradient magnitude or a learned 2D edge probability. If that holds, a 2.5D segmenter whose edge branch is gated by persistence should reduce both fragmentation of textured interiors and leakage across faint boundaries. Contrast-driven boundary methods cannot improve on both at once.

Existing methods either make boundaries sharper or make textures flatter. None uses cross-slice agreement as the arbiter between the two. That is what would be new.

Why the Obvious Combinations Fall Short

The file documents the two sides of the dilemma separately. The first group motivates the proposal by showing the gap. PnPNet works on full 3D volumes. A "pushing" branch amplifies semantic differences between adjacent voxels to tighten uncertain boundaries, and a "pulling" branch draws voxel features toward one learned prototype per class. Both assume a homogeneous interior, so a textured organ risks false internal borders and a split prototype. DB-MSMUNet adds an explicitly supervised edge path to pancreas segmentation. It processes slices independently and names the lack of 3D consistency as its own limitation. Boundary DoU loss reweights errors toward the perimeter using a 2D boundary-length-to-area ratio. It treats interior errors identically regardless of texture.

The second group supplies constraints. Edge Enhancing Diffusion is a nonlinear smoothing filter that stops at strong gradients. It makes networks texture-blind, but it erases thin and low-contrast targets. That rules out any design that decides "edge or texture" from gradient strength. TextureSAM fine-tunes SAM-2 on masks whose interiors are replaced with textures from the Describable Textures Dataset. It reduces fragmentation but slightly lowers general ADE20K mIoU, a warning that forcing texture invariance costs semantic accuracy.

The third group supplies method pieces. CSA-Net runs pixel-level attention between a slice and its two neighbours, and CSAM pools attention across the whole slice stack. Both show that 2.5D context beats naive 3D under anisotropy, for example 51.0% versus 37.0% DSC against 3D nnU-Net on prostate cancer in CSAM. Neither asks whether an edge persists. They mix neighbouring features and leave any texture/boundary separation implicit.

The closest existing work is therefore PnPNet together with the 2.5D attention models. We differ in replacing their local-difference and implicit-attention signals with an explicit persistence test that accounts for anisotropy.

Research Program

Stage 1: diagnostic study, done before any model is built. On NIH Pancreas and MSD Pancreas we label two groups of voxels:

  • ground-truth boundary voxels;
  • "texture-edge" voxels, meaning interior voxels, at least 3 mm from the boundary, whose in-plane gradient falls in the top quantile.

We compare how well three scores separate the groups. The first is in-plane gradient magnitude. The second is the edge probability from a trained 2D edge branch, a DB-MSMUNet-style path. The third is the persistence score applied to either of those edge maps.

Let $e_z(p)$ be the edge evidence at pixel $p$ in slice $z$. The persistence score is

$$\pi_z(p) = \frac{1}{2K}\sum_{\delta=\pm1,\dots,\pm K}\ \max_{\|u\|\le \rho\,|\delta|\,a}\ e_{z+\delta}(p+u).$$

Here $K$ is the number of neighbouring slices checked on each side and $u$ is an in-plane displacement. The factor $a$ is the ratio of slice spacing to in-plane pixel spacing. The parameter $\rho$ is the steepest surface slope we tolerate, so thick slices are allowed proportionally larger shifts. The score is high when an edge reappears nearby in adjacent slices and low when it appears on only one slice.

We also stratify the analysis by boundary contrast, measured as the Hounsfield-unit difference across the boundary. The claim only matters if persistence helps most in the lowest-contrast bins. If persistence does not beat learned 2D edge probability there, the project stops at this stage. That negative result would still be informative.

Stage 2: the model. A 2D encoder-decoder with an edge branch, using the DB-MSMUNet design as the reference backbone, receives a short slice stack. The edge branch produces $e_z$ for each slice. A differentiable module computes $\pi$, implementing the inner max as a soft max-pool over a displacement window and possibly adding a learned orientation-agreement term. The gated edge map $e_z\cdot\pi_z$ is passed to the region decoder.

Training uses the usual region loss and an edge loss on ground-truth boundaries. It adds an interior-coherence term that penalizes sharp changes in predicted foreground probability wherever persistence is low. That term tells the network to merge across non-persistent edges, which is roughly what PnPNet's pulling branch does, but applied only where the volume says the edge is texture.

Known failure mode. Some internal structures, such as the pancreatic duct, splenic vessels, and prostate zonal interfaces, persist across slices yet lie inside the label. Persistence alone would sharpen them. We expect the region loss to learn to ignore persistent edges that sit in the label interior. We will measure this rather than assume it by reporting false internal splits along the duct separately.

Baselines

Naive reference. A 2D slice-wise U-Net with Dice plus cross-entropy, followed by 3D Gaussian smoothing of the probabilities. This is the recipe of Deep convolutional networks for pancreas segmentation, which reported 68% DSC on NIH Pancreas, up from 56% before smoothing. Any method must clear it by a wide margin.

Strongest 2D boundary-aware competitor. DB-MSMUNet reports 89.47% DSC on NIH Pancreas and 87.59% on MSD Pancreas. It is the most direct competitor because it already has an explicit edge path on exactly our target organ. We will retrain it on our folds rather than copy those numbers, because splits and preprocessing may differ. Beating it means higher DSC together with lower 95th-percentile Hausdorff distance (HD95) and fewer fragments per organ.

Strongest volumetric competitor. 3D full-resolution nnU-Net, from nnU-Net. The file reports only aggregate MSD wins for nnU-Net, with no reported per-task result found on Lacuna for nnU-Net on MSD Pancreas, so we will run it ourselves. The file's anchor that plain 3D U-Nets are hard to beat on abdominal CT is 89.04% mDice for 3D-UNet on the AMOS CT test set, versus 86.32% for Swin-UNETR, per AMOS.

Boundary-method comparators. PnPNet is the strongest volumetric boundary-confusion method; it reports an ASSD reduction from 1.517 mm to 1.317 mm on the Fused Lung Lobe set. Boundary DoU loss reports HD falling from 31.45 mm to 26.29 mm on Synapse with a UNet.

Fairness conditions. All methods get the same folds, the same preprocessing to a common spacing, the same GPU-hour budget, and the same number of hyperparameter trials, with nnU-Net's own automatic configuration counting as its tuning.

Ablations that isolate the key ingredient.

  • Identical model with the gate removed ($\pi\equiv1$).
  • Gate computed with zero displacement tolerance ($\rho=0$).
  • Gate computed from randomly shuffled neighbouring slices, which keeps the architecture and compute but destroys anatomical persistence.
  • CSA-Net-style neighbour attention with the same stack and parameter count but no explicit persistence.

If the shuffled-slice gate recovers most of the gain, the effect is regularization and not persistence, and the claim is false.

Why not just…?

Why not just use 3D nnU-Net, which can learn cross-slice persistence implicitly? This is the most serious threat on near-isotropic CT. A 3D kernel can in principle learn exactly this test. The evidence against it comes from anisotropic data: 3D nnU-Net scored 37.0% DSC against 51.0% for 2.5D CSAM on prostate cancer MRI (CSAM). That does not prove it fails on pancreas CT. We therefore run a controlled anisotropy sweep that keeps every $n$-th slice of NIH and MSD volumes, raising the spacing ratio from native up to about 5×. If nnU-Net matches the gated model at native spacing, we will narrow the claim to the anisotropic regime. That regime is still clinically common and is exactly where the explicit tolerance $\rho a$ should matter.

Why not just use cross-slice attention such as CSA-Net or CSAM? Attention can mix neighbouring features. Nothing forces it to down-weight single-slice edges, and CSA-Net's three-slice window gives little room to test persistence. The attention-matched ablation above answers this directly. If attention with the same slice stack and parameter count closes the gap on interior fragmentation, the explicit gate is not needed.

Why not just augment interiors with random textures, TextureSAM-style, so the network learns to ignore internal variation? This is a real alternative. It is simple and fully supervised. TextureSAM itself reports a cost in general mIoU, and random textures in CT change the Hounsfield-unit statistics that carry diagnostic meaning. We will include an intensity-preserving variant as a baseline: within the organ mask, perturb local texture with a per-slice independent phase while keeping the mean and variance. It is a good competitor, and it also tests our hypothesis from the other side. If it helps as much as gating, the useful signal is "texture is slice-inconsistent," learned through augmentation instead of computed. We would then report that the diagnostic finding is the contribution and the module is optional.

Why not just pre-filter with edge-enhancing diffusion? EED decides what to smooth from gradient strength, and its authors document that it erases thin and low-contrast structures. That is precisely the pancreas-fat interface. Stage 1 tests this assumption directly. If gradient magnitude separates boundary from texture poorly in low-contrast bins, EED cannot work there. We will also run a 3D EED pre-filter feeding the same 2D U-Net as a baseline.

Proposed Experiments and Decisive Checks

Datasets.

  • NIH Pancreas (82 scans) and MSD Pancreas (281 scans) are the primary low-contrast, textured targets.
  • The AMOS CT subset tests other faint-boundary organs such as the duodenum, adrenal glands, and pancreas across scanners.
  • Promise12 and ProstateX test naturally anisotropic MRI with heterogeneous internal zones. For reference, CSA-Net reports 0.921 Dice on Promise12 and urethra Dice rising from 0.615 to 0.653 on ProstateX.

Controlled probe. Echoing TextureSAM's mixing parameter, we inject synthetic texture into pancreas interiors at amplitude $\eta$ in two forms: slice-coherent and slice-independent. We separately weaken boundary contrast by blending the organ edge toward the neighbouring fat intensity. Persistence predicts a specific pattern. The gated model should be robust to slice-independent texture. It should degrade like the ungated model under slice-coherent texture. It should hold boundary accuracy longer than contrast-based methods as boundary contrast falls. Seeing that pattern would strongly support the mechanism, and not seeing it would count against it.

Metrics.

  • DSC, HD95, and average symmetric surface distance.
  • Two fragmentation measures: extra connected components per organ, and the fraction of predicted boundary voxels lying more than 3 mm inside the ground truth.
  • Slice-to-slice predicted-area jitter, to capture volumetric context loss.
  • The Stage 1 AUROC broken down by contrast bin.

What counts as success. Three results would confirm the claim together:

  • persistence beats learned 2D edge probability in AUROC in the lowest-contrast tercile;
  • the gated model beats retrained DB-MSMUNet on HD95 and fragment count without losing DSC;
  • the shuffled-slice ablation loses most of that gain.

Any one of these failing would locate exactly where the idea breaks.