Checking a Segmenter's Claims with 3D Active Surfaces to Find Missing and Misplaced Organs in CT

Most anomaly detectors for medical scans look for tissue that looks wrong, such as a tumour, a bleed or a scanner artifact. They are not built to notice anatomy that is arranged wrongly: a kidney that was surgically removed, a spleen sitting in an unexpected place, an extra or missing vertebra. In industrial inspection this second class is called a logical anomaly. Every local patch of the image looks normal, and the defect exists only as a violation of global rules about count, position or composition. This note proposes a detector for logical anomalies in 3D CT volumes. A whole-body segmentation network proposes where each organ is. A 3D active surface then tests whether the image actually supports each proposal. An active surface is a deformable closed boundary that settles into place by minimizing an energy that rewards smooth shape and uniform intensity inside versus outside. The energy left over once the surface has settled measures how well the image evidence backs the segmenter's claim that an organ is there.

The opportunity matters for two reasons. The obvious pipeline is to segment every organ and then check volumes, positions and counts against normal statistics. That pipeline trusts the segmenter on exactly the scans where it is least trustworthy, because networks trained only on normal anatomy tend to report the organs they expect to see. The other common route is to process the volume slice by slice. That throws away the through-plane continuity that separates a truly absent organ from one that is merely faint on a few slices. The proposal targets both problems: it checks each claim against image evidence, and it measures boundary regularity natively in 3D.

Core Claim

Our claim is that per-organ fit residuals from a 3D region-based active surface are a detection signal the segmenter's own outputs do not provide. We expect them to add to, not replace, composition statistics computed from those outputs. The target cases are logical anomalies in CT: absence, displacement, swaps and count changes. We further expect the benefit to depend on computing the boundary-length term in 3D, and to shrink or vanish when the same energy is computed slice by slice.

The claim is falsifiable in a specific way. If segmenters trained on normal anatomy rarely produce confident, plausibly sized masks for organs that are absent, the residual adds little. In that case the simple "segment and count" baseline is the right answer, and we will report it as such.

Where This Sits

The active-contour line supplies the mechanism. Learning Active Contour Models for Medical Image Segmentation turned the Chan-Vese energy into a differentiable loss for training 2D cardiac segmenters. The Chan-Vese energy combines a boundary-length penalty with a term asking that intensity be uniform inside and outside the contour. On ACDC 2017 this loss reduced left-ventricle Hausdorff distance from 5.43 mm to 4.73 mm. We reuse this energy, but as a test-time evidence check in 3D rather than a 2D training loss. Context-Driven Active Contour (CDAC) added Vision Transformer attention as an external force for lung CT. It works on isolated axial slices, detects nothing, and reports convergence of up to 7.42 s per case, which constrains us to cheap, few-iteration refinement. A finite element method applied to new active contour models and 3D reconstruction from cross sections contributes the balloon force, an inflation pressure that we use in reverse. A surface initialized on a claimed organ that has no supporting evidence should collapse or remain heterogeneous, rather than lock onto a boundary.

The logical anomaly detection line motivates the problem and supplies the composition half of the scorer. PSAD segments parts and compares their class histograms and composition against memory banks of normal examples. ObjectCore matches object sets with bipartite (Hungarian) matching. SALAD learns composition maps from SAM-HQ and DINO clusters. All three are 2D and industrial, and all three inherit the errors of their upstream segmenter; the file notes this bound explicitly for ObjectCore and SALAD. Our contribution is aimed at that inheritance. LogicAL is the closest link between boundaries and logic. It edits static edge maps to synthesize logical defects, but never lets boundaries deform under an energy.

The volumetric context literature constrains the design. Deep convolutional networks for pancreas segmentation in CT imaging documents organs that appear on one slice and vanish on the next when predictions are made slice by slice. Your other Left! shows vision-language models near chance on relative-position questions in medical images. ReCAP states that its slice-based medical anomaly detection misses 3D inter-organ dependencies. IterMask3D is fully 3D and edge-guided, but targets structural lesions through reconstruction error. Whole-body segmenters such as MRSegmentator provide the proposals we check; that work reports kidney Dice up to 0.95 and a mean Dice of 0.84 when generalizing to AMOS CT.

Research Program

For each anatomical structure $k$, a frozen whole-body segmenter produces a soft 3D mask. We use this mask to initialize $u_k \in [0,1]$ over the volume $\Omega$. We then minimize

$$E_k(u_k) = \int_\Omega w(x)\,|\nabla_{3D} u_k| \,dx + \lambda \int_\Omega \big[u_k (I - c_k^{in})^2 + (1-u_k)(I - c_k^{out})^2\big] dx + \mu\, D(u_k, S_k),$$

where the terms are defined as follows. $I$ is the CT intensity. $c_k^{in}$ and $c_k^{out}$ are mean intensities inside and outside the surface, restricted to a band around the initialization. $w(x)$ rescales the through-plane gradient by voxel spacing, so that anisotropic slices are handled correctly. $S_k$ is a shape prior built from normal training volumes, and $D$ is a distance between the current surface and that prior. $\lambda$ and $\mu$ are weights.

We run a small fixed number of gradient steps, to keep cost well below CDAC's per-slice iterative evolution. From the settled surface $u_k^*$ we read out two things. The first is the normalized residual $r_k = (E_k(u_k^*) - m_k)/s_k$, where $m_k$ and $s_k$ are the mean and spread of that residual on normal volumes. The second is a composition vector: volume, centroid, number of connected components, and adjacency to neighbouring structures. These are computed from the settled surface rather than from the raw mask. The volume-level score is

$$A = \max_k \; \big( r_k + \alpha \, M_k \big),$$

where $M_k$ is the Mahalanobis distance of structure $k$'s composition vector from the normal memory bank, and $\alpha$ is a weight. Using the maximum over structures means the score also names which structure is implicated.

No 3D logical anomaly benchmark exists in the material, so we will build one from normal abdominal CT, drawing on TotalSegmentator CT, AMOS, BTCV and WORD as catalogued by A-Eval. We will create four anomaly types. Organ removal replaces the organ with intensities sampled from the surrounding fat and bowel. Displacement translates an organ into another plausible compartment. Left-right exchange swaps paired organs. Vertebra count changes remove one vertebra. Following LogicAL's warning that rigid splicing leaves artifacts, each edit will be blended with a smooth deformation field. As a check, we will run IterMask3D-style reconstruction scoring on the edits. If that structural detector flags them easily, the edits leak texture artifacts and must be redone.

We will also attempt to curate a small set of real cases where reference labels show a paired organ absent, for example after nephrectomy. We have not yet verified whether such cases exist in these datasets in usable numbers. We will label them clearly as preliminary and report results on them separately.

Baselines

The naive reference point is a detector that scores each volume by the segmenter's total foreground confidence, or by the number of structures whose mask falls below a fixed voxel count. It shows how far a trivial absence rule already gets.

The strongest competitor is the one a clinician-engineer would build: the same frozen segmenter followed by PSAD-style composition memory banks in 3D. We compute per-structure volume, centroid, component count and adjacency from the raw masks, and score them with Mahalanobis distance, without active-surface refinement or residuals. It is the strongest because it uses the same accurate segmenter and the same composition logic that reached 98.1% logical-anomaly AUROC on MVTec LOCO in PSAD. No reported result was found on Lacuna for 3D logical anomaly detection in CT, so we will establish this number ourselves. This baseline shares our segmenter, normal training volumes and composition features. It receives the same hyperparameter search budget, tuned on one anomaly type and tested on the other three.

We also run a slice-wise 2D logical detector. PSAD's part-composition scoring is applied per axial slice and aggregated by maximum over slices. This represents the "treat the volume as a stack of images" approach that ReCAP explicitly acknowledges as a limitation.

Finally, we run IterMask3D as the strongest 3D unsupervised structural detector. It reports 69.7 Dice on BraTS 2021 FLAIR, against 28.5 for DDPM, in IterMask3D. We retrain it on our normal CT volumes.

Two ablations isolate the key ingredient. The first computes composition from refined surfaces but drops the residual term. The second computes the same energy with a 2D per-slice length term, removing $\partial_z$.

Beating the strongest baseline means a statistically significant gain in volume-level AUROC, tested with a paired bootstrap over test volumes, on the three held-out anomaly types. The gain must be concentrated on removal and displacement, and the false-positive rate on normal anatomical variants must not rise.

Why not just…?

Why not just segment every organ with a whole-body network and check volumes and positions? This is the real threat, and it is our main baseline rather than a straw man. It fails only if the segmenter reports an organ where none exists, or places a displaced organ at its expected location. That is an empirical premise, and we test it directly. For every removal edit, we record whether the segmenter outputs a mask within the normal volume range. If this rate is near zero, the residual has nothing to catch, and we will conclude that segment-and-count suffices.

Why not just run a strong 2D logical detector slice by slice? Absence and displacement are defined along the through-plane axis. An organ that is missing on some slices and present on others looks, slice by slice, like normal variation in where the organ starts and ends. The file documents this failure for 2D slice prediction (Roth et al.), and ReCAP concedes it for slice-based anomaly detection. The slice-wise PSAD baseline and the 2D-length ablation measure exactly this gap.

Why not just use a 3D reconstruction detector like IterMask3D? Reconstruction models repair missing content into valid-looking background. Reverse Distillation describes this as a source of zero-error false negatives, and GLCF outperformed DRÆM by 24.9% in the sPRO localization metric on MVTec LOCO (GLCF). A well-blended organ removal should therefore look normal to IterMask3D. If it does not, our synthesis is leaking artifacts, so this baseline doubles as a realism check.

Why not just ask a vision-language model whether anatomy is in the right place? Your other Left! reports near-chance performance on relative-position questions. We do not expect this to be competitive and include it only as a qualitative reference.

Decisive Checks

Three results decide the proposal. The first is the segmenter-hallucination rate on removal and displacement edits; this determines whether there is any room for improvement over the segmenter's raw outputs. The second is whether adding $r_k$ improves held-out AUROC over the 3D composition baseline, with the improvement located in the cases where the segmenter's mask was confidently wrong. The third is whether replacing the 3D length term with a per-slice one erases that improvement, which tests the volumetric context claim directly. We also report per-volume runtime against CDAC's reported 3.53–7.42 s, and localization accuracy, meaning how often the top-scoring structure is the edited one. If the first check fails, the paper becomes a careful negative result together with the first 3D logical anomaly benchmark, which is still useful to the field.