In 2020, an estimated 79.6 million people were affected by glaucoma, which is expected to increase to 111.8 million by 2040. Early identification is critical, but most automatic detection systems do not generalize well across hospitals and imaging devices. In this paper, we present the neuro-symbolic glaucoma detection framework (NSC), which combines an efficient network (EfficientNet-B4) using dual spatial-channel attention, a six-node anatomical graph attention network (GAT-GNN), and a differentiable symbolic constraint module that applies four clinical fuzzy logic rules involving cup-to-disc ratio (CDR), rim thinning, defects in retinal nerve fiber layer (RNFL), and vessel density. The framework is trained on 9100 fundus images drawn from a curated corpus of 12,619 images across eight datasets and eight countries. The 12,134 non-holdout images were split 75%/12.5%/12.5% into 9100 training, 1517 validation and 1517 test images; the 485-image RIM-ONE DL set was held out entirely as a never-seen cross-hospital test set. Augmentation is applied during training and does not alter the number of distinct images in any split. Among the evaluated variants the highest cross-hospital AUC is obtained by EfficientNet-B4+Symbolic (B4, 0.6997, 95% CI 0.649–0.750); the differences between B2, B3 and B4 on the cross-hospital holdout are small and not statistically significant. EfficientNet-B4+GAT-GNN (B3) is proposed as the deployment configuration on the basis of in-distribution performance and inference cost rather than cross-hospital AUC. The full NSC model achieves a test AUC of 0.946 (95% CI 0.934–0.958) and sensitivity of 0.900, while B3 achieves the highest in-distribution AUC among the evaluated variants at 0.9612 (95% CI 0.951–0.972). Ablation studies show that adding the GAT-GNN to EfficientNet-B4 improved in-distribution test AUC by 1.4 percentage points in the single-seed ablation (0.9472–0.9612) and the performance of GNN-symbolic interaction in terms of cross-hospital AUC is reduced by 8.1 points (z = − 3.08, p = 0.002). Across three independent training runs (seeds 42, 1337, and 2024), B3 achieved a mean test AUC of 0.9602 ± 0.0002, compared with 0.9492 ± 0.0015 for B2. On images excluded from training, agreement between the CDR proxy and expert-measured cup-to-disc ratio is weak and inconsistent across datasets (\(\rho = 0.549\), \(n = 26\) on DRISHTI-GS; \(\rho = 0.081\), \(n = 100\) on REFUGE2), so anatomical grounding of the CDR proxy is not established. Validation of the CDR, RNFL, rim and vessel latent representations against segmentation ground truth remains future work. To the best of the authors’ knowledge, this is the first neuro-symbolic framework for glaucoma detection from fundus images, combining differentiable fuzzy constraints with anatomical graph reasoning, evaluated in a strict cross-hospital holdout setting (Canon CR-2 to Nidek AFC-210) without using segmentation masks.

Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

Reprints and permissions