Teaching Segmenters to Bridge Fading Vessels with Synthetic Contrast Fades

Thin structures in images, such as blood vessels, nerve canals and cracks, usually break in segmentation output for a mundane physical reason. Somewhere along their length the contrast against the background fades into the noise, and the network stops seeing them. One missing pixel on a vessel's centerline cuts the predicted network in two, even if overlap scores such as Dice stay high. We propose a simple, targeted way to synthesize this failure. Take an annotated training image, pick a spot on the structure where a break would change the network's connectivity, and gradually turn down the structure's contrast there until it sinks toward the noise floor, while the label stays connected. Pair each fade with a matched "true ending," where the structure is removed from both image and label. The network then learns when to bridge a faint gap and when a structure genuinely stops.

This places synthetic anomaly generation in a new role. Self-supervised anomaly work makes fake defects so that a model learns a sharp boundary around normal data. Here the fake defect is the specific degradation that causes topological breaks, and it is used to train a supervised segmenter on exactly the cases it fails on. The bet rests on an uncomfortable negative result. Data Augmentation is a Hyperparameter shows, across 420 anomaly tasks, that synthetic corruptions help only when they match the real defect mechanism, and that mismatched corruptions cause negative transfer. Our claim is that contrast fading, unlike rectangular cuts or mask erosion, is the matched mechanism for fragmentation of thin structures. We also propose a direct test of that claim on real data.

Core Claim

Breaks in thin-structure segmentation concentrate where the local contrast-to-noise ratio (CNR, the structure-minus-background intensity divided by background noise) is low. Training with synthetic image-space contrast fades should therefore reduce topological errors more than three cheaper alternatives:

  • generic intensity augmentation of equal strength,
  • topology losses alone,
  • mask-space error simulation.

We expect the gain to appear specifically in the low-CNR range. Placing fades at topologically critical points, meaning skeleton segments whose removal changes the number of connected components or loops, should matter beyond random placement. The paired true-ending negatives should keep the network from hallucinating bridges at real anatomical terminations.

The Fade Operator

Let $I$ be a training image with annotated mask $M$ and centerline (skeleton) $K$. We choose a seed segment of $K$ and give each pixel $x$ near it an arc-length coordinate $s(x)$ along the centerline. We estimate a local background $b(x)$ by inpainting the structure from its surroundings. The faded image is

$$I'(x) = b(x) + a(s(x))\,\big(I(x) - b(x)\big) + \epsilon(x),$$

where:

  • $a(s)\in[a_{\min},1]$ is a smooth attenuation profile, either a dip for an interior gap or a ramp for terminal fading.
  • $a_{\min}$ sets the residual CNR, drawn so that it ranges down to near zero.
  • $\epsilon$ is noise whose variance makes up the loss of signal variance, so the faded region does not look unnaturally smooth.

The label $M$ is left unchanged. For the paired true-ending negative we set $a=0$ beyond a cut point and truncate $M$ there. We also make a small fraction of fades end exactly at the noise floor, so the network sees borderline cases from both sides.

Seed placement is weighted toward critical skeleton segments. These are found by computing which segment deletions change the zeroth or first Betti number (the number of components or loops) of $M$. This is a cheap, label-only computation and needs no persistence computation during training.

The operator builds on three existing generators and differs from each. CutPaste-Scar, in CutPaste, pastes thin strips to simulate scratches, but its edges are sharp and unrelated to how real structures disappear. ErrorNet injects breaks into predicted masks with a shape-prior variational autoencoder, so its corruptions never touch image intensities. CaPro synthesizes whole curvilinear structures with fractal L-systems to prompt a frozen SAM, and does not model attenuation. Our operator works in image space, starts from real annotated structures, and models graded attenuation rather than hard removal.

Research Program

The work has three parts.

Measuring the fragmentation–contrast link on real data. We train strong baselines and locate every predicted break, defined as a ground-truth skeleton segment with no predicted support. We then record the local CNR of each break. If breaks are not concentrated at low CNR, the premise fails and we stop. This analysis is also a contribution on its own. Automatic segmentation of mandibular canal using transformer based neural networks reports qualitatively that its model fails at the head and tail of the canal where bone density hides the boundary, but nobody has quantified the effect.

Training with fades on top of existing topology losses. We use soft-clDice from clDice, which compares predicted and true skeletons against each other's volumes. This is the most relevant pairing because clDice suffers most where contrast fades: its soft skeleton of a blurred prediction is itself broken. Fades give clDice many more training examples of exactly those regions. We also run a 2D variant with the spatially matched persistence loss of Topologically Faithful Image Segmentation via Induced Matching of Persistence Barcodes, to check that the effect does not depend on the choice of loss.

Testing the alignment principle directly. Following the "diagonal" logic of Data Augmentation is a Hyperparameter, we compare corruption types on real breaks grouped by CNR. To avoid the cherry-picking that paper warns about, we fix all fade hyperparameters (range of $a_{\min}$, profile length, fraction of fades versus true endings) on a single development dataset, CHASE retinal images. We then transfer them unchanged to the other domains.

Baselines

The naive reference is the same segmentation network, with the standard nnU-Net-style augmentation pipeline and Dice plus cross-entropy, trained without fades or topology losses. On the mandibular canal this is the nnU-Net figure of 0.796 Dice reported in Automatic segmentation of mandibular canal using transformer based neural networks. We rerun it in our pipeline rather than relying only on the reported figure.

Strongest existing method on the canal. This is Swin-UNetR with a residual convolution decoder trained with clDice, from the same paper. It reports 0.844 Dice and 2.947 mm 95th-percentile Hausdorff distance on the ToothFairy-style CBCT dataset. It is the strongest competitor because it already combines a transformer encoder, contrast-enhancing preprocessing (CLAHE), and a topology loss. Our method is an augmentation added to this exact model, so the comparison isolates the fades. Beating it means:

  • a statistically reliable reduction in Betti errors and in terminal reach error (centerline distance between predicted and true canal endpoints),
  • no loss in Dice,
  • improvement concentrated in the head and tail regions the authors identify as failing.

Mask-space error simulation. ErrorNet (ErrorNet) is the closest prior idea of simulating breaks to fix them. It reports an average cross-dataset Dice of 71.0 when trained on CHASE and tested on DRIVE, STARE, ARIA and HRF. We reimplement it on the same backbone and compare in that exact transfer protocol. Beating it means higher clDice and lower Betti error at equal or better Dice, with the gain concentrated in low-CNR breaks.

Abdominal CT vessels. The reference is B-MIM pretraining (B-MIM), which reports clDice 0.582 on IRCAD against 0.491 for a Swin-nnUNet baseline. Because B-MIM improves the encoder while fades improve the training data, we test fades both against B-MIM and on top of it.

Fairness. All methods share data splits, backbone, epochs and compute. Each method gets the same budget of 20 hyperparameter trials, tuned only on validation folds, and results are reported over three seeds.

Ablations. Two ablations isolate the key ingredients. The first is an equal-strength random local contrast reduction, with the same area and attenuation but placed off the centerline or uniformly at random; this tests whether alignment matters. The second is fades without critical-point weighting and without true-ending negatives; this tests placement and the over-bridging safeguard.

Why not just…?

Why not just use stronger generic intensity augmentation? This is the most serious threat. Random gamma, local contrast reduction and noise injection are already standard and might produce most of the benefit. The equal-strength random-placement ablation answers this directly. If it matches fades on low-CNR breaks, our alignment claim is wrong and the contribution shrinks to "use more contrast augmentation." We would report that outcome.

Why not just rely on clDice or Betti matching? These losses penalize breaks only where the training set already contains faint segments, and those are rare. The canal results in Automatic segmentation of mandibular canal using transformer based neural networks show that clDice plus CLAHE still truncates the canal at its faint ends. The clDice-alone versus clDice-plus-fades comparison on the same model tests whether more hard examples, not a better loss, is what is missing.

Why not just refine the mask afterwards, as ErrorNet does? A refiner working on a broken mask must guess whether a gap is fading or a real ending, and its corruption model never sees image intensities. The CNR-grouped comparison will show whether image-space simulation helps more where the image evidence is faint. The rate of false bridges at real retinal vessel endpoints will show which approach over-connects.

Why not just iterate refinement at test time, as RecycleNet does? RecycleNet sharpens uncertain margins by feeding features back through the network. However, it adds inference cost with every pass and has no training signal tied specifically to connectivity. We include it as a secondary baseline at matched inference compute. If it closes the same breaks, fades still have the advantage of costing nothing at test time.

Proposed Experiments and Decisive Checks

We evaluate on three settings:

  • the mandibular canal CBCT dataset, for terminal fading in 3D,
  • CHASE-trained retinal transfer to DRIVE, STARE, ARIA and HRF, for interior gaps and domain shift,
  • IRCAD liver vessels, for 3D branching networks.

Metrics are Dice, clDice, zeroth and first Betti errors, terminal reach error on the canal, and recall of skeleton segments grouped by CNR bin. We also report false-bridge rate, measured on held-out synthetic true endings and on annotated real vessel endpoints. The clDice paper reports Betti improvements on DRIVE only as relative claims. No reported number was found on Lacuna for Betti error on DRIVE, so we compute all Betti baselines ourselves.

The study succeeds if three things hold together. First, real breaks are concentrated at low CNR. Second, fades reduce those breaks more than equal-strength random contrast augmentation, with frozen hyperparameters carried over from CHASE. Third, the false-bridge rate does not rise relative to the clDice baseline.

The study fails if the random-placement ablation matches fades, or if bridging gains come with a matching rise in false bridges. Either outcome would show that the network learned to connect everything rather than to read faint evidence.