Abstract
Early diagnosis of glaucoma and age-related macular degeneration (AMD) from volumetric optical coherence tomography (OCT) is critical for preventing vision loss, yet current approaches face challenges including time-consuming manual review, inter-reader variability, and scarcity of labeled data. This work introduces CAP-FSL (Cross-Attentive Prototypical Few-Shot Learning), a framework designed for 3D OCT analysis that maintains strong diagnostic performance with only a handful of labeled volumes. Unlike standard Prototypical Networks that form static support-only centroids, CAP-FSL employs query → support cross-attention to dynamically condition support embeddings before prototype formation, yielding query-aware class exemplars that better capture subtle pathological variations. The architecture integrates a 3D ResNet-50 backbone with squeeze-and-excitation (SE) attention to effectively capture volumetric structural patterns while remaining label-efficient and quick to adapt. Evaluated on two public OCT cohorts—one focusing on optic nerve head (ONH) for glaucoma detection and another on macular scans for AMD diagnosis—CAP-FSL consistently outperforms established metric-learning baselines including Matching Networks, standard Prototypical Networks, and Deep Subspace Networks in both 1-shot and 5-shot scenarios. In 5-shot testing, the method achieves classification accuracies of 95.74% ± 2.18% for glaucoma, 93.85% ± 2.70% for AMD, and 92.73% ± 3.18% for normal cases, representing substantial improvements over baseline Prototypical Networks. High sensitivity and specificity metrics with low variance across ten random seeds demonstrate the method’s reliability under data scarcity conditions. The cross-attention mechanism produces interpretable attention maps that align with known disease biomarkers, enhancing clinical interpretability. By combining query-conditioned prototypes with efficient 3D feature extraction, CAP-FSL offers a practical approach for rapidly adapting OCT screening and triage models in data-constrained clinical settings. Code and trained models are publicly available at https://github.com/Rimsa78/CAP-FSL.