Diabetic retinopathy is graded on a five-step scale, and the steps are defined by shape. The first step up from healthy means tiny round dots (microaneurysms) appear. The middle steps depend on how many hemorrhages there are, whether veins become "beaded" with uneven width, and whether small, irregular, twisted vessels appear inside the retina (intra-retinal microvascular abnormalities, or IRMA). The top step means new fragile vessels have grown (neovascularization). Automated graders trained on one hospital's camera still confuse these adjacent steps badly when moved to a new camera. The best domain-generalization grader in the literature reaches 82.6% AUC but only a 43.5% F1 score on unseen hospitals (Towards Generalizable Diabetic Retinopathy Grading in Unseen Domains). Neighbouring grades are exactly where management changes, for instance referral versus rescreening.
We propose to compute these shape criteria directly with classical tube-detection mathematics and feed each one only to the grade decision that clinically depends on it. A Hessian vessel filter measures local curvature of the brightness landscape and scores how tube-like each pixel is. Its standard weaknesses are that it fires on round blobs, collapses at branch points, and misreads beaded or tortuous segments. Here those weaknesses become the signal. We first explain the healthy vascular tree as smooth tubes joined at graph junctions. Whatever geometry the tree cannot explain (blobs off the tree, width oscillation along the tree, twisted segments that do not join the main tree) is summarized per retinal quadrant. These summaries feed an ordinal grading head in which each grade threshold sees its own evidence. The measurements are built from ratios of curvature values, so they do not change when a camera scales or shifts brightness. We therefore expect them to be most useful precisely under camera shift and precisely at the adjacent-grade boundaries.
Core Claim
Our central hypothesis concerns intensity-invariant geometric residuals: the shape evidence a healthy-tree model cannot account for. If these residuals are tied to specific ordinal grade boundaries, they should reduce adjacent-grade confusion under unseen-camera shift. The gain should come mainly from the structure of the pairing, and not from the mere presence of vesselness information. The claim is falsifiable in a specific way. If adding the same Hessian maps as an extra input channel to a strong grader gives the same gain, the structured design is unnecessary, and we will report that.
The invariance argument is short. Let $I$ be the image and $H_\sigma = \sigma^2 \nabla^2 (G_\sigma * I)$ the scale-normalized Hessian at Gaussian scale $\sigma$, with eigenvalues $|\lambda_1| \le |\lambda_2|$ in 2D fundus images. Consider a camera change that acts as an affine brightness map $I' = aI + b$ with $a>0$. Every eigenvalue is multiplied by $a$, so the ratio $\lambda_1/\lambda_2$ and the sign pattern are unchanged. Now consider optical blur of width $s$. It moves the best-responding scale from $\sigma$ to roughly $\sqrt{\sigma^2+s^2}$ (Gaussians compose by adding variances). Taking the maximum over scales therefore approximately preserves the ratio for a tube or blob. Resolution differences are handled by expressing $\sigma$ in units of optic-disc diameter rather than pixels. None of this holds for learned CNN features, which is why VesselMorph's shape-aware representations aligned across cameras while intensity features did not (VesselMorph).
Relation to Prior Work
Two papers motivate the approach, and they sit on opposite sides of the gap. VesselMorph builds a Hessian-inspired tensor field and shows it generalizes across resolution and modality for vessel segmentation: Dice 0.7420 on HRF versus 0.6406 unaligned. It stops at binary segmentation, and its authors report that dense lesions make the tensor field noisy. We reverse that stance and treat lesion-induced deviations from tubularity as the output of interest. LoASP does target domain-generalized grading with structural priors, but it learns them with deformable "snake" convolutions fused through an adapter. Its authors acknowledge that these priors miss fine capillaries and break up in low contrast. We use analytical, non-learned measurements instead and route them to specific grade boundaries rather than fusing them into one feature stream.
Two lesion-aware lines supply methods and constraints. FGADR shows that feeding predicted lesion masks into a grader raises quadratic weighted kappa by up to 8.04%. It also shows that pixel-level segmentation of IRMA and neovascularization is poor, and its segmentation network is itself exposed to camera shift. We reuse its lesion masks only to supervise and validate our evidence channels on source domains. VesRec-SSL uses a binary vessel mask to define a self-supervised reconstruction task for adaptation. It depends on an accurate precomputed mask and never parameterizes caliber or curvature, which are the quantities we measure.
Appearance-based generalization methods constrain the design. CauDR swaps frequency bands, and DG-ADR synthesizes grade-conditioned images with diffusion models. Both can distort thin vessel geometry, which is the information the upper grades depend on. We therefore avoid augmentations that alter geometry on the evidence pathway. We keep GDRNet's physical-artifact augmentation (GDRNet) on the image pathway so the comparison stays fair.
Research Program
The system has three parts, all in 2D fundus photographs.
The first part is a healthy-tree explanation. We compute multi-scale Hessian responses in physically calibrated units, extract a vessel skeleton, and convert it to a graph. Junction nodes explicitly absorb the filter's known collapse at bifurcations. Each graph edge receives a fitted smooth width profile and a tangent-angle profile.
The second part computes geometric residuals, organized to mirror the clinical definition of each grade and aggregated per quadrant. The blob channel counts round, bright-dark-sign-consistent responses lying off the tree at microaneurysm scale; it serves the 0|1 boundary. The beading channel measures width oscillation along venous edges beyond the smooth fit; together with a larger-scale blob count for hemorrhages, it serves the 2|3 boundary. The tortuous-orphan channel measures high-curvature tubular segments that do not connect to the main tree or attach at abnormal junctions; it is a candidate for IRMA and neovascularization and serves the 2|3 and 3|4 boundaries. The 1|2 boundary receives the blob and hemorrhage counts together.
The third part is the ordinal head. A standard image backbone produces an embedding $z$. Each threshold $k$ receives a gate from its own evidence vector $e_k$:
$$P(y > k \mid x) = \mathrm{sigmoid}\big(f_k(z) + g_k(e_k) - \theta_k\big),$$
where $y \in \{0,\dots,4\}$ is the grade, $f_k$ and $g_k$ are small networks, and $\theta_k$ is a learned cut point. The evidence functions $g_k$ are kept low-capacity, such as monotone or shallow networks, so they cannot memorize domain style.
The channels can be checked on source data. On the FGADR Seg-set and IDRiD we test whether the blob channel tracks microaneurysm masks and the orphan channel tracks IRMA and neovascularization masks. Those masks also train a light calibration of each channel's thresholds. At no point is the evidence pathway fit on target domains.
Baselines
The naive reference is empirical risk minimization with a ResNet-50 on pooled source domains under the GDRBench leave-one-domain-out protocol. GDRNet reports 75.9% AUC for this baseline (GDRNet). We re-run it on our splits.
The strongest reported appearance-based method is GDRNet itself, at 82.6% average AUC and 43.5% F1 in the leave-one-out setting and 73.4% AUC in extreme single-domain generalization. It is the right main competitor because it was designed for this benchmark and targets exactly this shift. We will re-run it on identical splits with the same backbone, input resolution, epoch budget, and hyperparameter-search budget, and our model will build on the GDRNet training recipe. Beating it means a higher average F1 and quadratic weighted kappa on unseen domains at no worse AUC, with the gain surviving across seeds.
LoASP is the closest structural competitor. The file reports only relative improvements when LoASP is plugged into GDRNet and other backbones: +5.46% AUC, +4.32% accuracy, and +3.54% F1 in multi-source generalization, and +6.53% AUC in single-domain generalization. We found no reported absolute number on Lacuna for LoASP alone on GDRBench. We will therefore reimplement it as a plug-in on the same GDRNet base and compare the two plug-ins directly.
For the cross-camera slice we additionally run CauDR on 4DR, where it reports 61.82% accuracy against 55.42% for ERM (CauDR). DG-ADR's 81.9% AUC and 43.2% F1 come from a different seven-dataset benchmark, so we cite it for context only and do not treat it as a matched comparison.
Three ablations isolate the key ingredient, grade-specific routing of residual evidence. The first feeds identical Hessian maps as extra input channels to GDRNet. The second concatenates all evidence into a single vector read by every threshold, which removes the routing. The third replaces the healthy-tree residual with raw vesselness statistics, which removes the "what the filter cannot explain" step.
Why not just…?
Why not just add a Frangi vesselness map as a fourth input channel? This is the most serious threat. VesselMorph's success suggests that raw geometric input already carries much of the invariance. It is our first ablation, run with the same budget. If it matches the full model on unseen-domain F1 and kappa, the healthy-tree residuals and routing are not earning their complexity, and we will say so. We expect it to fall short specifically at the 2|3 and 3|4 boundaries. A vesselness map emphasizes normal vessels, which are present at every grade, and the network must still learn from limited severe cases which subtle deviations matter.
Why not just segment lesions and grade from the masks, as FGADR does? That pipeline improves kappa in-domain. However, the FGADR benchmark reports poor segmentation of IRMA and neovascularization, and a learned segmenter is itself subject to camera shift. We run FGADR-style mask-conditioned grading, with the segmenter trained on source only, as an additional baseline. We also measure its lesion-detection degradation on held-out-camera images that have masks (DDR) against the degradation of our analytical channels.
Why not just use a better ordinal loss or stronger augmentation? If adjacent-grade confusion came from the loss function rather than from missing evidence, an ordinal head on the plain backbone would recover most of the gain. We include that variant: identical ordinal head, no evidence. Gains attributable to geometry should appear only when evidence is present, and they should concentrate on domains with the largest brightness and blur differences.
Proposed Experiments
The main experiment uses GDRBench's leave-one-domain-out and extreme single-domain protocols across DeepDR, Messidor, IDRiD, APTOS, FGADR, RLDR, DDR, and EyePACS. We report AUC, accuracy, macro F1, and quadratic weighted kappa, plus per-boundary confusion rates for 0|1, 1|2, 2|3, and 3|4 and sensitivity for referable disease (grade 2 or higher). 4DR provides a pure camera-hardware slice. Because fine grades carry observer noise, we additionally report results on the FGADR Grade-set, which is consensus-graded by six ophthalmologists, as a cleaner test of adjacent-grade accuracy.
Four decisive checks determine whether the idea holds.
First, invariance must be real. We apply controlled affine brightness changes, Gaussian blur, and rescaling to source images, and we measure the cross-dataset distance between feature distributions over GDRBench domains. Both should show the evidence vectors shifting far less than backbone features. If they do not, the premise fails regardless of accuracy.
Second, the gain must localize. Improvement over GDRNet should be largest at the 1|2 and 2|3 boundaries and on the extreme single-domain targets, not spread uniformly.
Third, the full model must beat the vesselness-channel and unrouted ablations. Otherwise the contribution reduces to "add Frangi."
Fourth, we test the known failure regime. We stratify by hemorrhage burden, since VesselMorph reports tensor-field degradation under dense lesions, and check whether the residual channels break at grade 3 and 4 or instead benefit from the extra unexplained geometry.
A later extension carries the same residual logic to the CAD-RADS coronary setting, where mesh-based grading holds κ = 0.71 externally but relies on centerlines that fail at occlusions (Automatic Coronary Artery Plaque Quantification and CAD-RADS Prediction Using Mesh Priors). Those cohorts are not public, so it is not part of the core program.
References
- Towards Generalizable Diabetic Retinopathy Grading in Unseen Domains
- VesselMorph: Domain-Generalized Retinal Vessel Segmentation via Shape-Aware Representation
- Low-Rank Adaptive Structural Priors for Generalizable Diabetic Retinopathy Grading
- A Benchmark for Studying Diabetic Retinopathy: Segmentation, Grading, and Transferability
- Self-supervised Domain Adaptation for Diabetic Retinopathy Grading Using Vessel Image Reconstruction
- CauDR: A causality-inspired domain generalization framework for fundus-based diabetic retinopathy grading
- Divergent Domains, Convergent Grading: Enhancing Generalization in Diabetic Retinopathy Grading
- Automatic Coronary Artery Plaque Quantification and CAD-RADS Prediction Using Mesh Priors