arXiv:2610.33143cs.CVOct 2026

Manuscript Offprint

arXiv:2610.33143

Learning Pathology-Sensitive Representations for Unsupervised Retinal OCT Anomaly Detection

Tania Haghighi, Sina Gholami, Behafarin Emam, Jennifer I Lim, Theodore Leng, Atalie C Thompson, Hamed Tabkhi, Minhaj Nur Alam

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Deep learning approaches for retinal optical coherence tomography (OCT) predominantly rely on predefined disease categories, limiting their ability to detect rare or previously unseen abnormalities. While visual foundation models provide transferable representations, their effectiveness in identifying pathological deviations from normal retinal anatomy remains insufficiently understood. In this work, we introduce an unsupervised framework for retinal OCT anomaly detection and localization that adapts pretrained visual representations to normal retinal anatomy through anatomy-aware reconstruction and contrastive triplet learning guided by synthetic structural perturbations, without requiring disease-specific annotations. We systematically investigate the influence of pretraining strategies, anatomy-aware representation adaptation, and anomaly scoring mechanisms on the detection and localization of unseen retinal abnormalities. Our findings demonstrate that adapting pretrained representations to normal retinal structure improves anomaly sensitivity, while pixel-space reconstruction errors and feature-space deviations provide complementary signals for identifying pathological changes. These findings underscore the importance of anatomy-aware representation learning and offer insights into developing generalizable retinal anomaly detection frameworks beyond predefined disease categories.

1 Introduction

Optical coherence tomography (OCT) has become central to the diagnosis and monitoring of retinal diseases, with approximately 30 million scans performed worldwide each year 1^{1}. Deep learning has achieved expert-level performance in OCT analysis when clinical tasks are defined by known diagnostic categories or annotated pathological findings 2,3^{2,3}, including disease classification 4^{4}, referral prediction 5^{5}, and fluid quantification 6^{6}. Several ophthalmic artificial intelligence systems have also been approved as medical devices 7^{7}. More recently, visual foundation models pretrained on large image collections have demonstrated transferable representations for ophthalmic classification, prognosis, and segmentation with reduced reliance on task-specific annotations 8−12^{8-12}, reflecting a broader movement toward generalist medical artificial intelligence 13,14^{13,14}. Despite these advances, most existing approaches remain dependent on predefined disease categories or annotated abnormalities,

*Correspondence: [minhaj.alam@charlotte.edu] limiting their ability to recognize pathological findings that are rare, heterogeneous, or absent from the training data.

This limitation is particularly important in retinal OCT, where pathological changes can manifest as subtle disruptions of anatomical structures, coexist with other abnormalities, or differ substantially from previously observed disease patterns. Supervised models can achieve strong performance within their predefined label spaces but remain vulnerable to underrepresented conditions 15^{15} and previously unseen abnormalities 16^{16}. Consequently, reliable retinal analysis requires moving beyond disease-specific recognition toward learning representations that can distinguish normal anatomical variation from potentially pathological deviations. This raises a fundamental question: can a model learn pathology-sensitive representations capable of detecting and localizing previously unseen retinal abnormalities without requiring annotations for individual diseases? Addressing this question could support more generalizable retinal analysis systems that remain effective across heterogeneous clinical populations and imaging conditions.

Visual foundation models offer a promising starting point for learning such representations. Through large-scale pretraining, these models acquire transferable visual features that can support downstream tasks with limited supervision 8,17,18^{8,17,18}. Pretrained representations have also demonstrated value for anomaly detection in natural, industrial, and medical images 19−21^{19-21}. However, the representations that support semantic recognition are not necessarily optimized for detecting subtle pathological deviations. Pretraining objectives often encourage invariance to local appearance variations, whereas retinal anomaly detection requires sensitivity to small structural changes that may indicate disease. Moreover, the relative suitability of different pretraining strategies remains unresolved. Studies of supervised ophthalmic tasks have reported advantages for retina-specific foundation models 8,22^{8,22}, while others have found that general-purpose or natural-image pretrained models can match or outperform domain-specific alternatives 23,24^{23,24}, consistent with broader evidence of effective transfer from natural-image representations to medical imaging 25^{25}. Importantly, strong performance on supervised ophthalmic benchmarks does not necessarily imply sensitivity to unseen pathological abnormalities. These observations motivate a more fundamental investigation of whether pretrained visual representations contain sufficient anatomical information for anomaly detection and, critically, how they can be adapted to become sensitive to pathological deviations from normal retinal structure.

Unsupervised anomaly detection provides a natural framework for investigating this problem. Rather than learning predefined disease categories, unsupervised methods characterize normal anatomical patterns and identify deviations that are inconsistent with those patterns, reducing dependence on exhaustive disease annotations 26,27^{26,27}. Reconstruction-based approaches, including autoencoders and generative adversarial networks, identify abnormalities through discrepancies between observed images and reconstructions learned from normal data 28−30^{28-30}. Feature-based methods estimate anomalies by measuring deviations from normal feature distributions 20,31^{20,31}, while self-supervised approaches use synthetic anomalies to encourage sensitivity to abnormal patterns without requiring annotated pathological examples 32−35^{32-35}. In retinal OCT, these approaches have demonstrated the ability to identify potential disease markers 36^{36}, detect diverse pathological changes 37−39^{37-39}, and localize abnormalities without lesion-level supervision 28,36^{28,36}. Nevertheless, systematic evaluations have revealed substantial variability in performance across methods and datasets 27,30,40,41^{27,30,40,41}. These findings suggest that the effectiveness of unsupervised anomaly detection depends not only on the anomaly scoring mechanism but also on the underlying representation and its ability to preserve anatomically meaningful deviations.

A central challenge, therefore, is learning representations that capture normal retinal anatomy while remaining sensitive to structural changes that may indicate pathology. Retinal OCT exhibits highly organized anatomical patterns, including layered tissue structures whose spatial relationships provide important cues for identifying abnormalities. Representations that preserve these relationships may offer a stronger basis for distinguishing pathological deviations from normal variation. Anatomy-aware reconstruction can encourage the model to encode retinal structure, while contrastive learning with synthetic structural perturbations can explicitly promote sensitivity to anatomically meaningful changes without requiring real pathological annotations. Together, these mechanisms provide a means of adapting pretrained visual features toward pathology-sensitive representations. Furthermore, pixel-space reconstruction discrepancies and feature-space deviations may capture complementary manifestations of abnormalities, suggesting that representation adaptation and anomaly estimation should be investigated jointly rather than treated as independent design choices.

In our preliminary study, we demonstrated that a generative model trained on normal retinal OCT images, combined with retina-focused reconstruction and a triplet learning objective based on synthetic structural perturbations, can improve unsupervised detection and localization of retinal abnormalities 42^{42}. However, that study did not investigate whether modern pretrained visual representations already encode the anatomical information needed for this task, whether general-purpose or retina-specific pretraining offers greater sensitivity to unseen abnormalities, or how pretrained representations can be systematically adapted for pathology-sensitive anomaly detection. These questions are particularly relevant as visual foundation models become increasingly prominent in medical image analysis.

Building on this foundation, we investigate how pretrained visual representations can be adapted to learn pathology-sensitive features for unsupervised retinal OCT anomaly detection and localization. Our framework integrates pretrained visual encoders with anatomy-aware reconstruction and contrastive triplet learning guided by synthetic structural perturbations, without requiring disease-specific annotations. We systematically examine the influence of pretraining strategies, anatomical adaptation, and anomaly scoring mechanisms on the detection of previously unseen abnormalities. In particular, we investigate whether representations optimized for general visual recognition can be transformed into effective anomaly-sensitive representations through adaptation to normal retinal anatomy, and how pixel-space and feature-space anomaly signals contribute to detection and localization performance.

The main contributions of this study are:

  • We introduce a framework for learning pathology-sensitive representations for unsupervised retinal OCT anomaly detection and localization. The framework integrates pretrained visual representations with anatomy-aware reconstruction and contrastive triplet learning guided by synthetic structural perturbations, enabling the identification of pathological deviations without disease-specific annotations.

  • We systematically investigate how pretraining strategies and anatomy-aware representation adaptation influence sensitivity to previously unseen retinal abnormalities. Through controlled experiments, we examine the roles of reconstruction objectives, retinal region weighting, synthetic perturbation diversity, and normal training data availability in learning representations that distinguish anatomical variations from pathological deviations.

  • We investigate the complementary roles of pixel-space reconstruction errors and feature-space deviations in detecting and localizing retinal abnormalities. We evaluate how anomaly scoring mechanisms influence detection performance, localization accuracy, and cross-device generalization without additional training or pathological annotations.

Figure

Figure 1: Overview of the proposed representation-learning framework. A shared ViT encoder processes a clean anchor OCT B-scan, a different clean normal positive, and a perturbed version of the anchor as the negative. CLS tokens are mapped to L2-normalized embeddings and optimized using triplet loss, while patch tokens are reconstructed through a linear patch decoder using the reconstruction objective.

References (51)