A Noise-Calibrated Test for Star-Convexity

Many segmentation methods for cells, nuclei and organs assume every object is star-convex: there is some point inside it, a "pole", from which every boundary point is visible along a straight line. StarDist predicts one distance per ray from that pole, Cellpose-style methods push pixels along flows toward a single sink, and the Convex Combination Star prior bends foundation-model masks toward star shapes. All of these methods depend on two things they never check: that a valid pole exists, and where it is. They usually take the centroid, or a heuristic center. On curved, folded or branching objects the centroid can fall outside the object, and the method then fails in ways that are hard to diagnose.

We propose to check this directly. The set of all valid poles, called the star kernel, is the intersection of half-planes bounded by the object's tangent lines. Tangents need derivatives, and derivatives of noisy masks are exactly what the numerical-differentiation literature warns against. We therefore write the star-convexity condition in weak form: it is integrated against small smooth bump functions, so the derivative falls on the bump and not on the data. Because the mask enters linearly, each local test has a noise variance we can compute exactly. The output is a statistical test at a chosen spatial scale. It answers "is this object star-convex at scale σ?" and, if the answer is yes, returns a certified region of valid poles found by a small linear program.

Core Claim

Let $u(x)\in[0,1]$ be a soft object mask (a network probability map or a noisy annotation) in $d$ dimensions, and let $x_0$ be a candidate pole. The object is star-convex about $x_0$ exactly when $u$ never increases as one moves outward along a ray, that is, when $(x-x_0)\cdot\nabla u(x)\le 0$ everywhere.

Take a nonnegative bump $\psi_{\sigma,y}$ of width $\sigma$ centred at a test location $y$, multiply the condition by the bump, and integrate by parts. This gives the weak violation

$$W_\sigma(x_0,y) = -\int u(x)\,\big[d\,\psi_{\sigma,y}(x) + (x-x_0)\cdot\nabla\psi_{\sigma,y}(x)\big]\,dx \;\le\; 0,$$

which must hold for all $y$ and involves no derivative of $u$.

Splitting $x-x_0=(x-y)+(y-x_0)$ shows that $W_\sigma$ is affine in the pole:

$$W_\sigma(x_0,y) = A_\sigma(y) + B_\sigma(y)\cdot(y-x_0).$$

Here $A_\sigma(y) = -\int u\,[d\psi + (x-y)\cdot\nabla\psi]\,dx$ and $B_\sigma(y) = -\int u\,\nabla\psi\,dx$. Both are ordinary convolutions of $u$, computed once per scale.

The estimated kernel is therefore a convex polytope,

$$\hat K_\sigma = \{x_0 : A_\sigma(y)+B_\sigma(y)\cdot(y-x_0)\le \tau_\sigma(y,x_0)\ \ \forall y\},$$

and finding a point in it is a linear program in 2 or 3 variables.

The threshold $\tau_\sigma$ comes from noise, not from tuning. If $u$ carries pixel noise of variance $s^2$, then $W_\sigma$ has standard deviation $s\,\|d\psi+(x-x_0)\cdot\nabla\psi\|_2$, which is known in closed form. We set $\tau_\sigma$ to $z$ standard deviations. We space the test centres at least one bump-support apart so that the local tests are independent. This mirrors the separation rule $k\ge 2$ in A stable finite difference ansatz for higher order differentiation of non-exact data, where averaging windows are kept apart to stop errors from accumulating like a random walk. Independence is what lets us control false violations across the whole boundary.

The smoothing operation itself is not new. At first order, $B_\sigma$ is simply a Gaussian-type smoothed gradient, the same operation that Mollifier Layers uses for PDE residuals. What we claim is new is the combination of three things built on it:

  1. a scale-indexed, variance-calibrated test for star-convexity;
  2. a certified pole region obtained by linear programming;
  3. using that region to set poles and to decide when a star prior should not be applied.

Research Program

Build the test. We will implement the test in 2D and 3D. For 3D volumes with unequal voxel spacing, the bumps become ellipsoids, following how Star-convex Polyhedra for 3D Object Detection and Segmentation in Microscopy adapts its ray lattice to voxel spacing. Near image borders, test centres are restricted to locations where the bump's support lies fully inside the image. This avoids the boundary bias reported for mollifiers.

Choose the scale. We will choose $\sigma$ per object with a Lepski-style rule: take the smallest scale whose verdict agrees with all coarser ones within noise. The rule separates two cases:

  • concavities smaller than the noise-resolvable scale, which are ignored;
  • real folds, which persist across scales.

This is the scale-dependent tightness of the prior that the literature lacks. The resulting scale gives the smallest concavity the test can resolve, which lets us report what a star prior provably cannot represent in a given image.

Analyse the test. We will derive the test's power against a concavity of depth $\delta$ and width $w$. The expected form is detection once $\delta w$ exceeds roughly $s\sigma^{(d+2)/2}$, which follows from the signal integrating over the bump while the noise standard deviation scales with its $L^2$ norm. We will verify this rate on synthetic shapes.

Use the test. There are three uses.

  1. Pole placement. Replace centroid poles with the Chebyshev centre of $\hat K_\sigma$, the point deepest inside the kernel, in StarDist target generation and in CCS center selection.
  2. Routing. When $\hat K_\sigma$ is empty, flag the object as outside the star family. We then either route it to a spline outline model or split it with a greedy cover: repeatedly solve the linear program on the test locations not yet covered, until every location is visible from some pole. The resulting poles feed a multi-center CCS.
  3. Calibration. Use the size of the violation margin as a model-mismatch signal alongside the uncertainty scores of Uncertainty Estimation in Instance Segmentation With Star-Convex Shapes.

Baselines

Naive reference. The simplest baseline takes the object centroid as the pole and assumes star-convexity always holds. This is what StarDist and 3D Cellpose effectively do. Robust 3D Cell Segmentation: Extending the View of Cellpose documents this setting failing on concave cells. Beating it means a higher rate of poles falling inside the true kernel, and better downstream instance F1 on objects that are not star-convex, with no loss on nuclei.

Strongest geometric competitor. This baseline smooths $u$ with a Gaussian, extracts the 0.5 level set, computes tangent half-planes by central differences, and intersects them. It uses the same geometry as our method and a comparable smoothing operator. It gets a threshold and $\sigma$ tuned by grid search on a validation split, with the same number of tuning trials we spend on $z$. If this baseline matches our method, the smoothing is not the contribution. We would then need to show that the calibrated threshold and the scale-selection rule are what separate the two. Beating it means comparable or better kernel accuracy without per-dataset tuning, and stable false-violation rates across noise levels where the tuned threshold drifts.

Strongest downstream methods. We run published StarDist and SAM+CCS pipelines unchanged, retrained on identical splits with identical epochs. The only thing that changes is how poles are generated. Reported numbers anchor the comparison:

Ablations. Two ablations isolate the key ingredients:

  • fixed $\sigma$ against scale selection;
  • the variance-calibrated $\tau$ against a constant $\tau$, with and without spacing the test centres apart.

Why not just…?

Why not just Gaussian-smooth the mask and take tangent lines? At first order this is mathematically close to our $B_\sigma$, and we say so. What it lacks is a principled threshold. Without one, a user either tunes a threshold per dataset or accepts many spurious violations along a noisy boundary. It also lacks independence between local tests, which Anderssen et al. show matters for errors in differentiated noisy data. The strongest-competitor baseline above is exactly this method with generous tuning. If it performs as well across noise levels, we will report that the calibration adds nothing and narrow the claim to the scale-selection rule.

Why not just use the innermost point, the maximum of the distance transform, as the pole? This point always lies inside the object, which fixes the most obvious centroid failure. This alternative is a real threat on elongated or mildly curved cells. However, lying inside the object does not guarantee visibility of the whole boundary. On C-shaped objects no single pole works, and this heuristic cannot tell us that. We will measure how often it falls outside the true kernel on the synthetic non-star-convex shapes and on GlaS. If it matches the Chebyshev centre on star-convex objects, we keep it there and rely on our test only for its emptiness verdict.

Why not just flag non-star-convex objects by solidity (area divided by convex-hull area)? Solidity is cheap. But it penalizes every concavity, including the many that are compatible with star-convexity, such as a bean-shaped nucleus. We will compare detection accuracy for "no valid pole exists" between solidity and our test, using a threshold-free area under the curve.

Why not just use SplineDist or Cellpose everywhere and drop the star prior? SplineDist matches StarDist on BBBC038v1 with fewer parameters and handles non-star shapes. If routing gives no gain over SplineDist alone, then the test's value reduces to diagnosis and calibration, and we will report it as such.

Proposed Experiments

Synthetic experiment. We generate shapes with controlled concavity depth, width and topology, following the style of SplineDist's synthetic non-star-convex set. We add either boundary jitter or Gaussian noise to the soft masks. Ground truth is the exact visibility kernel computed from the clean polygons. We measure:

  • whether the verdict "no valid pole exists" is correct;
  • the Hausdorff distance between $\hat K_\sigma$ and the true kernel;
  • how the smallest detectable concavity scales, compared with the predicted rate.

Real data. We use BBBC038v1 (mostly star-convex nuclei), GlaS (folded glands), Meristem (3D plant cells) and PARHYALE (3D, low signal-to-noise). The kernel is computed from network probability maps, and we measure how often the chosen pole lies inside the kernel of the ground-truth annotation.

Downstream. We compare three pole strategies: centroid, innermost point, and Chebyshev centre with routing. For each we report instance F1 at IoU 0.5 and 0.7 for StarDist, Dice for SAM+CCS on Refuge and Kvasir, and calibration error on GlaS using Siddiqui et al.'s hybrid certainty score.

Decisive checks. Three results would support the proposal:

  • GlaS: our method lowers calibration error and raises F1 on GlaS relative to centroid-pole StarDist, while not lowering F1 on BBBC038v1.
  • Noise stability: its false-violation rate stays near the nominal level as noise varies, where the tuned-Gaussian baseline's rate drifts.
  • Centroid fix: on Meristem, Chebyshev-centre poles reduce the over-segmentation of elongated cells that Robust 3D Cell Segmentation attributes to incoherent sinks.

If the first two checks fail, the proposal reduces to Gaussian smoothing plus geometry, and we will say so.