Certificates That a Shape Is Not Star-Convex, and What They Tell Segmenters

Many cell and lesion segmentation models assume each object is star-convex: some interior point can "see" every boundary point along a straight line that stays inside the object. Under that assumption the outline reduces to one distance per ray angle. When an object is C-shaped, bent, or branched, the assumption is false, and the model either drops the concavity or splits the object. Today nobody checks the assumption per object. A practitioner sees a low score and cannot tell whether the model needs more training or whether no star-shaped outline could ever fit that object.

We propose to compute, for every ground-truth instance in a dataset, a small and independently checkable counter-example: a concrete piece of evidence that the instance is not star-convex. For a polygonal outline, the set of valid centers (the kernel) is the intersection of the inner half-planes of its edges. By Helly's theorem in the plane, if that intersection is empty, then some three edges already have empty intersection. Those three edges are the counter-example. A verifier confirms it by solving three linear inequalities. Extending this idea, a set of boundary points whose visibility regions are pairwise disjoint proves that at least $k$ centers are needed. A greedy placement of centers gives a matching upper bound. With these certificates we can audit benchmarks, predict which instances a star-convex model must fail on, and choose how many centers a multi-center shape prior should use for each object. The center count is the open problem that the multi-center prior of Convex Combination Star Shape Prior leaves to heuristics.

Core Claim

A certified, noise-robust measure of star-convexity violation predicts per-instance failure of star-convex segmenters better than cheap shape statistics, and it does so in a way that separates errors the representation forces from errors that come from fitting. The measure has two parts. The first is a violation depth $\delta^\ast$, the smallest outward shift (in pixels) of the witnessing edge half-planes that makes them intersect. The second is a bracket $[k_{lo}, k_{hi}]$ on the number of centers needed to see the whole boundary. Setting the number of centers per instance from $k_{lo}$ should match or beat the heuristic center choice in multi-center priors, at lower cost than always using many centers.

The new part is not falsification as such. Three lines of work supply the falsification logic but never touch shape. CRAFT uses executable violation functions with structured search to falsify ML theorems, and it warns that random search misses thin violation regions. FormalRx-CC and AI Coding Benchmarks Need Proofs, Not Just Tests argue that machine-checkable witnesses beat scalar scores or test suites, which finite tests cannot replace. We borrow their asymmetry: a witness is proof, and its absence is weak evidence.

The closest bridge, Counterexample-Guided Data Augmentation, mines failures of a bounding-box detector over scene parameters such as lighting and pose. Our counter-examples instead concern the object's own geometry, and they certify a limit of the representation rather than a weakness of a particular trained model. Here the geometry gives exact, small certificates, so no search is needed in the common case. This sidesteps CRAFT's search-budget problem.

Research Program

The first component is the certificate engine. Each instance mask is turned into a polygon, simplified at a set of tolerances, and its kernel is computed. When the kernel is empty, the engine extracts a triple of edges whose half-planes have empty intersection and computes the violation depth $\delta^\ast$ by a small linear program. The resolution problem matters here: pixel staircases create fake concavities. We therefore count an instance as non-star-convex only if its witness survives a 1–2 pixel erosion and dilation and simplification at matched tolerance. We report $\delta^\ast$ in pixels so that shallow violations are not confused with deep ones. Instances with holes are handled through visibility computation rather than the edge-intersection shortcut.

The second component is the center-count bracket. The lower bound $k_{lo}$ is the size of a boundary point set with pairwise disjoint visibility regions. No single center sees two such points, so at least that many centers are needed. The upper bound $k_{hi}$ comes from greedily placing centers until the whole boundary is visible. Ray-based models need the boundary to be visible from a center, which is exactly what this measures. We also compute an oracle ceiling for single-center radial models. For each candidate center and each ray, we pick the radius that maximizes IoU against the ground truth, then take the best center. This number bounds what a single-center radial model with $R$ rays could achieve on that instance.

The third component uses the certificates. We first audit how often and how deeply instances violate star-convexity in each benchmark. We then test whether $\delta^\ast$ and $k_{lo}$ predict per-instance errors of a trained single-center model. Finally, we set the per-instance center count of a multi-center prior from $k_{lo}$ during training, using certificates computed on ground truth. At inference, the count is predicted by a small head supervised by $k_{lo}$.

Baselines

The naive reference point is a single-center radial model trained with standard augmentation and no certificate information. The 2018 Data Science Bowl, described in Nucleus segmentation across imaging experiments, reports that the top model reached F1 0.712 at IoU 0.7. This anchors what is achievable on that benchmark. We found no reported StarDist number on Lacuna for any benchmark in the file, so we will train it ourselves with the same splits and augmentation as every other arm.

For the diagnostic question, the strongest cheap competitors are three hand-crafted shape statistics: solidity (area divided by convex-hull area), whether the centroid lies inside the mask, and the number of times rays from the centroid cross the boundary. The last is the multiple-intersection failure described for BayesBD and TextRay. These cost nothing to compute and are what a reviewer would reach for first. We compute all of them on identical masks. To beat them, $\delta^\ast$ and $k_{lo}$ must give a higher rank correlation with per-instance error and better AUC for flagging instances below IoU 0.5. Each comparison must hold separately on BBBC038, BBBC010, and Usiigaci.

For instance segmentation of non-star-convex objects, the strongest existing methods are SplineDist and EmbedSeg. SplineDist replaces rays with spline curves; no overall test IoU is reported in the file. EmbedSeg predicts pixel offsets toward each instance's medoid (the in-object pixel with smallest average distance to the others), avoiding centroids that fall outside the object. It reports AP 0.965 at IoU 0.5 on BBBC010. For semantic segmentation with shape priors, the strongest method is the CCS prior added to SAM, with reported Dice 80.82% on Refuge and 86.91% on Kvasir. Each competitor is rerun on our splits with its published configuration and the same hyperparameter-search budget as our arms. Its own reported number serves as a sanity check on our reproduction.

The key ablation compares four center-count rules within the same multi-center model and training budget: a fixed $k=1$, a fixed $k$ equal to the dataset maximum, CCS's default center selection, and per-instance $k$ from the certificate. Beating the baselines means certificate-driven $k$ is at least as accurate as fixed-maximum $k$ while using fewer centers on average, and is more accurate than CCS's heuristic on the instances where $k_{lo} \ge 2$.

Why not just…?

Why not just use solidity or a centroid-inside test? These statistics measure non-convexity, not non-star-convexity. A spiky but star-shaped cell has low solidity yet fits a radial model well. A thin crescent can have its centroid inside the mask and still lack a kernel. That said, this is the real threat to the proposal. If solidity predicts radial-model failure as well as $\delta^\ast$ on all three instance benchmarks, the diagnostic claim fails, and we will report that. The per-dataset correlation comparison above settles the question directly.

Why not just read failures off the trained model's per-instance IoU? A low IoU does not say whether better training could fix the error. The oracle ceiling and the witness separate the two cases: an instance whose ceiling is far below the observed IoU of competing methods is a representation failure, and one with a high ceiling but low IoU is a fitting failure. This matters because the remedies differ. One calls for a different representation, the other for more data in the style of Counterexample-Guided Data Augmentation. We will report the fraction of errors in each class.

Why not just abandon star priors and use EmbedSeg or Cellpose everywhere? The file gives evidence on both sides. EmbedSeg does well on worms. Center-pointing flow fields break on deep concavities, as shown in Robust 3D Cell Segmentation: Extending the View of Cellpose. Shape priors help SAM under occlusion, as the CCS paper reports. If EmbedSeg beats every certificate-driven multi-center arm even on instances with $k_{lo} \ge 2$, the usable result shrinks to the audit and failure prediction. We would state that plainly, not defend the routing.

Proposed Experiments

The audit runs on BBBC038, BBBC010, Usiigaci, Kvasir-SEG, Refuge, and ISIC 2018. For each, we report the fraction of instances with certified empty kernels, the distribution of $\delta^\ast$, and the distribution of $[k_{lo}, k_{hi}]$. We expect nuclei to be almost entirely star-convex and worms mostly not, which would justify using BBBC010 as the stress set.

The first decisive check is predictive. On held-out instances, $\delta^\ast$ and $k_{lo}$ must outrank solidity, the centroid-inside test, and ray-crossing counts as predictors of the single-center model's error.

The second decisive check is the center-count ablation on BBBC010 and Usiigaci. We report AP at IoU 0.5 and 0.9, since the file notes that gaps between methods widen at stricter thresholds. We also report the average number of centers used. The same rule is then plugged into CCS on Kvasir and Refuge and compared with its reported Dice.

Finally, we validate the certificates themselves in two ways. Every witness is re-checked by an independent linear-program solver. We also measure how often witnesses disappear under 1-pixel mask perturbation, which bounds the false-alarm rate that pixelation introduces.