betaFeedback

WorksComputer Science

Learning Pathology-Sensitive Representations for Unsupervised Retinal OCT Anomaly Detection

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.

Introduction

Optical coherence tomography (OCT) has become central to the diagnosis and monitoring of retinal diseases, with approximately 30 million scans performed worldwide each year1. 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], including disease classification[4], referral prediction[5], and fluid quantification[6]. Several ophthalmic artificial intelligence systems have also been approved as medical devices[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, 9, 10, 11, 12], reflecting a broader movement toward generalist medical artificial intelligence[13, 14]. Despite these advances, most existing approaches remain dependent on predefined disease categories or annotated abnormalities, 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] and previously unseen abnormalities[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]. Pretrained representations have also demonstrated value for anomaly detection in natural, industrial, and medical images[19, 20, 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], while others have found that general-purpose or natural-image pretrained models can match or outperform domain-specific alternatives[23, 24], consistent with broader evidence of effective transfer from natural-image representations to medical imaging[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]. Reconstruction-based approaches, including autoencoders and generative adversarial networks, identify abnormalities through discrepancies between observed images and reconstructions learned from normal data[28, 29, 30]. Feature-based methods estimate anomalies by measuring deviations from normal feature distributions[20, 31], while self-supervised approaches use synthetic anomalies to encourage sensitivity to abnormal patterns without requiring annotated pathological examples[32, 33, 34, 35]. In retinal OCT, these approaches have demonstrated the ability to identify potential disease markers[36], detect diverse pathological changes[37, 38, 39], and localize abnormalities without lesion-level supervision[28, 36]. Nevertheless, systematic evaluations have revealed substantial variability in performance across methods and datasets[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.

Motivated by these considerations, 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.

Results

Study overview

We developed an anatomy-aware, triplet-guided framework that adapts pretrained vision transformers for unsupervised retinal OCT anomaly detection and localization (Figure 1). The framework learns to recognize deviations from normal retinal anatomy without requiring pathological training images or disease-specific annotations. During training, three images are used: an anchor from a normal retina, a positive from a different normal retina, and a negative generated by introducing perturbations into the anchor. All three images pass through a shared encoder, which produces representations used for two complementary learning objectives. A linear patch decoder reconstructs the normal images and learns to recover the clean anchor from its perturbed version, with reconstruction losses emphasizing retinal structures. Meanwhile, a triplet objective encourages similar representations for normal images while separating synthetically altered images from them. Together, these objectives teach the model to reconstruct normal retinal anatomy while remaining sensitive to abnormal structural changes. After training, abnormalities are identified through reconstruction differences or deviations from normal feature representations. We evaluated the models using normal images from Kermany[4] for training, its held-out test set for image-level detection, and RETOUCH[42] for pixel-level localization without additional training. We further examined the effects of training objectives, data availability, anomaly scoring, and synthetic perturbations. Additional methodological details are provided in the Methods section.

Overview of the proposed representation-learning framework

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.

Datasets

We used two public OCT datasets that play different roles in the study. The Kermany dataset was used to train and validate all models and to evaluate image-level detection. RETOUCH was used only for testing, to evaluate whether the models can localize pathology at the pixel level on images from devices they had not seen during training.

The Kermany dataset[4] contains macular B-scans acquired with Spectralis OCT (Heidelberg Engineering), each labeled as normal, CNV, DME or drusen. It is well suited to our setting for two reasons. It contains a large number of normal B-scans, which allows models to be trained on normal images alone, and its three disease classes differ in appearance, which allows detection to be tested across different types of structural change. We used the same data partition as in our previous study[43]. The training set contained 48,286 normal B-scans. The validation set contained 1,007 normal B-scans and was used to select checkpoints and to set decision thresholds using normal and synthetically perturbed validation images, so that no pathological image was involved in either step. The test set contained 2,019 B-scans, approximately half normal and half abnormal, with CNV, DME and drusen equally represented among the abnormal images. Disease labels were used only to evaluate the models.

Because the Kermany dataset provides labels at the image level only, it cannot show whether a model detects an abnormal image for the right reason, that is, whether the anomaly signal comes from the lesion itself. For this purpose we used RETOUCH[42], which contains OCT volumes from patients with neovascular age-related macular degeneration or retinal vein occlusion, with expert pixel-level annotations of IRF, SRF and PED. RETOUCH images were acquired with three devices (Cirrus, Spectralis and Topcon), so the dataset also tests how well the models generalize beyond the device used for training. We used the RETOUCH validation set, for which reference annotations are available. No RETOUCH image or annotation was used for training, model selection or threshold calibration.

Anomaly detection

Image-level anomaly detection was evaluated on the Kermany test set, which contains normal B-scans and B-scans with choroidal neovascularization (CNV), diabetic macular edema (DME) or drusen. The complete models of the three encoders were compared with a ConvNeXt-based reconstruction model, a variational autoencoder (VAE), VQ-VAE, VQGAN, f-AnoGAN and an anatomy-aware VQGAN[43]. We report area under the receiver operating characteristic curve (AUROC), together with F1 score and accuracy at the operating threshold (Table 1).

MethodAUROCF1 (%)Accuracy (%)
ConvNeXt0.71669.762.8
VAE0.68569.660.0
VQ-VAE0.73771.465.5
VQGAN0.74771.367.6
f-AnoGAN0.76371.168.4
(Ours) VQGAN0.79975.271.7
(Ours) DINOv30.71963.270.5
(Ours) RETFound0.85982.784.2
(Ours) ViT0.92185.987.3

Table 1. Image-level anomaly detection on the Kermany test set. F1 score and accuracy are computed at the operating threshold. Best values are shown in bold.

Anomaly localization

Pixel-level localization was evaluated on the RETOUCH validation set, with the expert annotations of intraretinal fluid (IRF), subretinal fluid (SRF) and pigment epithelial detachment (PED) as the reference. The models from the detection experiment were applied to RETOUCH without further training, and their anomaly maps were compared with the annotations using Dice and mean intersection over union (mIoU)(Table 2).

MethodDicemIoU
ConvNeXt0.1810.100
VAE0.1230.066
VQ-VAE0.1850.102
VQGAN0.1450.078
(Ours) VQGAN0.2000.111
(Ours) DINOv30.1400.075
(Ours) RETFound0.2200.124
(Ours) ViT0.2420.138

Table 2. Unsupervised anomaly localization on RETOUCH. All models were trained on Kermany only and applied to RETOUCH without further training. mIoU is foreground-only (background excluded from the class average). Best values are shown in bold.

Ablation studies

We performed four ablation studies, examining the training objective, the amount of normal training data, the anomaly scoring strategy and the perturbation strategy. Each was evaluated for detection on Kermany and for localization on RETOUCH.

Training objective

To assess the contribution of each part of the training objective, we trained each encoder in four configurations of increasing adaptation. In the first, the encoder was frozen and only the linear reconstruction head was trained with the reconstruction loss. In the second, the encoder and reconstruction head were jointly trained using only the reconstruction loss. In the third, the encoder and head were trained jointly with the reconstruction loss and the triplet objective. In the fourth, retinal region-of-interest (ROI) weighting was added to the pixel loss. Results are shown in Table 3.

Table 3: Effect of the training objective. Frozen: the pretrained encoder is fixed and only the linear reconstruction head is trained. + Reconstruction: the encoder and head are trained jointly using reconstruction loss only. + Triplet: the encoder and head are trained jointly with the reconstruction and triplet objectives. + ROI: retinal region-of-interest (ROI) weighting is added to the pixel loss (complete model). Image-level metrics are computed on Kermany and localization metrics on RETOUCH. mIoU is foreground-only (background excluded from the class average).

EncoderConfigurationAUROCF1 (%)Acc. (%)Prec. (%)Rec. (%)DicemIoU
DINOv3Frozen0.44013.052.986.07.00.0120.006
+ Reconstruction0.51021.054.883.012.00.0230.012
+ Triplet0.83471.676.991.758.70.0740.038
+ ROI0.71963.270.583.051.00.1400.075
RETFoundFrozen0.59813.452.671.27.40.0300.015
+ Reconstruction0.64026.455.375.016.00.0510.026
+ Triplet0.87578.281.392.967.50.1420.076
+ ROI0.85982.784.290.476.30.2200.124
ImageNet ViTFrozen0.57715.752.666.48.90.0200.010
+ Reconstruction0.62529.156.276.018.00.0390.020
+ Triplet0.91081.584.095.571.20.0910.048
+ ROI0.92185.987.389.184.70.2420.138

Table 3.

Amount of training data

To assess how much normal data is required, we trained the complete models on random subsets containing 0.5%, 1%, 2%, and 5% of the normal training set and compared them with models trained on the full training set. All other settings were kept fixed. As shown in Table 4 and Figure 2, performance generally improved with increasing training data, although the three encoders showed different patterns. RETFound performed best with only 0.5% of the training data, achieving an AUROC of 0.766 and a Dice score of 0.141, suggesting an advantage of retinal-domain pretraining when normal training samples are limited. In contrast, the ImageNet-pretrained ViT showed more consistent improvements as additional data became available, ultimately achieving the highest AUROC (0.921) and Dice score (0.242) with the full training set. DINOv3 remained the weakest performer across all training fractions. These findings indicate that the amount of normal training data influences the relative effectiveness of different pretrained representations, with RETFound offering an advantage under highly limited data availability and ImageNet-pretrained ViT benefiting more from larger training sets.

Training dataEncoderAUROCF1 (%)Acc. (%)Prec. (%)Rec. (%)DicemIoU
0.5%DINOv30.60547.860.870.636.10.0900.047
RETFound0.76672.777.189.262.30.1410.076
ImageNet ViT0.70963.070.985.349.90.1090.058
1%DINOv30.58845.860.572.033.50.0810.042
RETFound0.74067.474.290.153.80.1450.078
ImageNet ViT0.75369.475.289.356.80.1250.067
2%DINOv30.59746.162.278.632.60.0840.044
RETFound0.75971.876.488.160.60.1370.074
ImageNet ViT0.77773.477.790.161.90.1430.077
5%DINOv30.65555.966.179.043.20.1090.058
RETFound0.76272.276.989.660.40.1430.077
ImageNet ViT0.81677.480.591.267.20.1770.097
100%DINOv30.71963.270.583.051.00.1400.075
RETFound0.85982.784.290.476.30.2200.124
ImageNet ViT0.92185.987.389.184.70.2420.138

Table 4. Effect of the amount of normal training data on the complete models. Percentages refer to the fraction of the normal training set used for training. Image-level metrics are computed on Kermany and localization metrics on RETOUCH. mIoU is foreground-only (background excluded from the class average). Bold values indicate the best performance for each metric at a given training-data percentage.

Figure 2. Effect of the amount of normal training data on the complete models. a, AUROC and b, F1 score for image-level detection on Kermany. c, Dice for anomaly localization on RETOUCH. The x axis shows the percentage of the normal training set used for training, on a logarithmic scale.

Feature-level scoring

To compare anomaly scoring in pixel space with scoring in feature space, we evaluated the complete models with two scoring strategies. In reconstruction-based (pixel-level) scoring, abnormality was measured from the residual between each image and its reconstruction. In feature-level scoring, the patch features of each image were compared with a bank of patch features from normal training images, and abnormality was measured as the distance to the nearest normal feature. Both strategies used the same trained models and thresholds calibrated on normal and synthetically perturbed validation images using Youden’s J statistic (Table 5).

ScoringEncoderAUROCF1 (%)Acc. (%)Prec. (%)Rec. (%)DicemIoU
Pixel levelDINOv30.71963.270.583.051.00.1400.075
RETFound0.85982.784.290.476.30.2200.124
ImageNet ViT0.92185.987.389.184.70.2420.138
Feature levelDINOv30.87154.068.396.737.40.2730.158
RETFound0.9174.479.397.860.50.3970.248
ImageNet ViT0.91073.579.098.858.80.3180.189

Table 5. Comparison of reconstruction-based (pixel-level) and feature-level anomaly scoring for the complete models. Image-level metrics are computed on Kermany and localization metrics on RETOUCH. mIoU is foreground-only (background excluded from the class average).

Perturbation strategy

To examine the effect of different synthetic perturbations on anomaly detection and localization, we conducted an ablation study using the ImageNet-pretrained ViT-L/16 encoder. Six perturbation strategies were considered: retinal layer thinning, layer thickening, subretinal fluid, pigment epithelial detachment (PED), foci and as demonstrated in Figure 3.

Perturbation strategy used to build training triplets from healthy normal OCT B-scans

Figure 3. Perturbation strategy used to build training triplets from healthy (normal) OCT B-scans. A clean normal image xx is used as the anchor. Its retinal band is detected automatically and used to place and scale the synthetic lesions.

Each model was trained using a single perturbation type to generate synthetic negative samples for triplet learning. An additional model was trained using all six perturbation types to evaluate their combined effect. All models were evaluated for image-level anomaly detection on the Kermany test set and pixel-level anomaly localization on RETOUCH. The results are presented in Table 6.

Perturbation StrategyAccuracyF1AUROCAUPRCDicemIoU
Thinning58.0033.7550.9160.316.803.52
Thickening71.2763.8470.0177.885.973.08
Subretinal fluid64.5952.6262.6870.236.853.55
PED65.2850.6063.9572.266.523.37
Foci73.6066.9671.6379.487.944.13
drusen80.4976.2479.5786.556.843.54
All perturbations82.6281.3485.5089.2810.725.66

Table 6. Comparison of different synthetic perturbation strategies for OCT anomaly detection and segmentation. The best result for each metric is highlighted in bold. All values are reported as percentages. mIoU is foreground-only (background excluded from the class average).

Discussion

In this study, we compared general-purpose and retina-specific encoders for unsupervised detection and localization of retinal abnormalities in OCT. Adapting the encoders to normal retinal anatomy with synthetic structural perturbations was the main determinant of performance and produced models that outperformed previous unsupervised methods for both detection and localization, including on images from unseen devices. The most suitable pretraining depended on the task, the scoring strategy and the amount of normal data available.

With frozen encoders, all three models missed most abnormal B-scans, and DINOv3 performed below chance. Reconstruction-based anomaly detection relies on the model failing to reconstruct structures it has not learned to represent. Large pretrained encoders, however, are designed to represent almost any visual content. A linear head trained on such features can therefore reconstruct pathological structures nearly as well as normal anatomy, and the residual no longer separates the two. A similar tendency of reconstruction models to generalize to anomalous inputs has been described for autoencoders trained on normal data[44], and adapting pretrained features to the normal training data has been shown to improve anomaly detection over using them frozen[19]. Benchmarks of ophthalmic classification also report consistent gains from fine-tuning over frozen features[22, 24].

Adapting the encoder with the triplet objective produced the largest improvement in detection for all three encoders. We attribute this to two complementary signals. The reconstruction loss focuses the representation on the anatomy of the normal retina, while the triplet objective explicitly teaches the model that structural departures from this anatomy should be represented differently.

With full training data and reconstruction-based scoring, the conventionally pretrained ImageNet ViT performed best, followed by RETFound and DINOv3. This ranking differs from the common expectation that foundation models, and particularly domain-specific ones, provide the best starting point[8, 13]. It is, however, consistent with recent benchmarks of supervised ophthalmic tasks, in which natural-image and general-purpose encoders matched or exceeded retina-specific models[23, 24], and in which no encoder pretrained exclusively on OCT, including RETFound, ranked among the best-performing models even on OCT tasks[24]. We believe the explanation lies in how well each representation suits reconstruction-based anomaly detection rather than in its general quality.

RETFound was pretrained with masked autoencoding[45] on a large collection of OCT images drawn from routine clinical care, which includes eyes with retinal disease[8]. Its representation may therefore already encode pathological structures and help the model reconstruct them, which reduces the residual contrast between normal and abnormal images. Features of the masked-autoencoder version of RETFound have also been reported to be highly similar across different colour fundus images[22], suggesting that such representations separate individual images less sharply, which may further limit how well normal and abnormal scans are distinguished before adaptation. Supervised ImageNet features, in contrast, are trained to discard image detail that is not needed for object classification. After adaptation on normal OCT, such a representation may reconstruct normal anatomy well while remaining less able to reproduce structures outside this distribution, which is exactly what reconstruction-based detection requires. DINOv3 produces rich, dense features[18], but these features are not organized for pixel reconstruction, and a linear head may be unable to map them back to images accurately. The feature-level analysis supports this interpretation.

ROI weighting improved localization for all three encoders, while its effect on detection depended on the encoder. Without weighting, much of the reconstruction error comes from the background above and below the retina, where speckle and acquisition noise are common. Concentrating the loss on the retina makes the reconstruction more accurate within the tissue, so that the remaining residuals there are more specific to pathology. Image-level detection, however, depends on the largest residuals anywhere in the B-scan. Weighting increased recall and F1 score for the ImageNet ViT and RETFound but reduced detection performance for DINOv3. A possible explanation is that, for a representation that is already difficult to decode into pixels, shifting the reconstruction effort towards the retina reduces fidelity elsewhere enough to raise residuals in normal images as well.

The value of each pretraining regime also depended on how much normal data was available. With the smallest training set, RETFound performed best for both detection and localization, consistent with having already learned the appearance of OCT images during pretraining and with the data efficiency reported for domain-specific self-supervised pretraining in supervised settings[8, 46]. Its performance changed little until the full dataset was used, whereas the ImageNet ViT improved steadily and overtook RETFound with a small fraction of the data. RETFound may start closer to the target domain but gain less from limited adaptation, whereas the ImageNet representation must first learn OCT anatomy but then benefits more from each additional normal image. In practice, retina-specific pretraining may be most useful when a model must be adapted to a new clinical site or device with very few normal scans, while conventionally pretrained encoders may be preferable when more normal data are available. DINOv3 remained the weakest encoder at every data size, indicating that its limitation in this setting is not caused by insufficient adaptation data.

Feature-level scoring showed that the representations contain more information about abnormality than their reconstructions reveal. Measuring abnormality directly in feature space improved localization for all three encoders and improved detection AUROC for DINOv3 and RETFound. The gain was largest for DINOv3, indicating that its adapted representation does capture abnormality but that this information is largely lost when the features are mapped back to pixels by a linear head. This agrees with the strong performance of feature-based anomaly detection methods[20, 31] and with the design of DINOv3, which was optimized for dense feature quality rather than pixel reconstruction[18]. Feature-level scoring also changed the ranking for localization, with RETFound achieving the best localization in the study. Retina-specific pretraining therefore appears to produce patch features that distinguish normal from abnormal retinal tissue particularly well, an advantage that reconstruction-based scoring hides because RETFound can also reconstruct abnormal structures.

This study has limitations that also point to future work. First, localization was evaluated only against fluid annotations, which cover a subset of the abnormalities that the anomaly maps can highlight; datasets with annotations of drusen, atrophy and layer disruption would allow a more complete assessment. Second, we deliberately used a linear reconstruction head to make the comparison between encoders fair. This choice limits absolute performance, and stronger decoders or combinations of pixel-level and feature-level scoring may improve results. Third, we compared three encoders of a single architecture and size, and other foundation models and model sizes should be evaluated. Finally, the framework operates on individual 2D B-scans; extending it to OCT volumes and evaluating it prospectively with clinicians will be needed to establish its value for screening and triage.

In conclusion, pretrained encoders, whether general-purpose or retina-specific, did not detect retinal abnormalities without adaptation. Adapting them to normal retinal anatomy with synthetic structural perturbations produced annotation-free detectors that outperformed previous unsupervised methods for both detection and localization. These findings indicate that adaptation to normal retinal structure, rather than foundation-model alone, is the key to building unsupervised OCT anomaly detectors.

Methods

Image preprocessing

All B-scans were processed in the same way for both datasets. Images were resized to 256×256256 \times256 pixels using bicubic interpolation and then normalized with the ImageNet channel mean and standard deviation. We did not apply any data augmentation during the main framework training, so that the models learned only from the natural variation present in normal B-scans.

Pretrained encoders

We selected three encoders that represent different pretraining strategies.

DINOv3[18] represents general-purpose foundation models. It was pretrained with self-supervision on a very large collection of natural images and is designed to produce dense, spatially detailed features that transfer to many tasks without labels. If broad visual knowledge is enough to capture retinal structure, this model should perform well even though it has never seen OCT images during pretraining.

RETFound[8] represents domain-specific foundation models. It was pretrained with masked autoencoding[45] on a large collection of retinal OCT images and has been shown to transfer well to a range of ophthalmic tasks. It therefore tests whether prior exposure to retinal images gives an advantage over general pretraining.

The ImageNet-pretrained vision transformer[47] represents conventional supervised transfer learning. It was trained to classify natural images into object categories and has long been the default starting point in medical imaging. It serves as a baseline that shows how much the two foundation models add beyond standard practice.

Together, these models separate two factors that are often mixed in the literature. Comparing DINOv3 with RETFound, both self-supervised, shows the effect of the pretraining domain (natural images versus retinal OCT). Comparing DINOv3 with the ImageNet model, both pretrained on natural images, shows the effect of the type of pretraining (self-supervised versus supervised). To make the comparison fair, all three encoders share the same architecture, ViT-L/16. Each divides a 256 × 256 image into 256 patches of 16 × 16 pixels and represents every patch with a 1024-dimensional token. For reconstruction, we used the patch tokens from the final layer of each encoder. The class token was not used for reconstruction but provided the image-level embedding for the triplet objective. Components specific to the original pretraining task were removed: the register tokens of DINOv3, the classification head of the ImageNet model and the decoder of RETFound. For RETFound, the patch tokens were also returned to their original spatial order, because the masked autoencoder rearranges them internally. As a result, the three encoders produce features of the same shape and can be connected to the same reconstruction head.

Reconstruction framework

Each encoder was turned into an anomaly detector by training it to reconstruct normal B-scans. A model that has learned the appearance of the normal retina should reconstruct normal images accurately but fail to reconstruct structures it has not learned, such as fluid, drusen or neovascular lesions. The difference between an image and its reconstruction can therefore indicate whether the image is abnormal and where the abnormality is located as illustrated in Figure 1. To this end, we attached a reconstruction head that maps patch tokens back to pixels. Each token zi∈R1024z_i \in\mathbb{R}^{1024} was mapped independently by a single linear layer

Dϕ:R1024→R768,(1)D_{\phi}:\mathbb{R}^{1024} \to\mathbb{R}^{768}, \tag*{(1)}

where 768 corresponds to the 16 × 16 × 3 pixel values of one patch. The reconstructed patches were then placed back on a 16 × 16 grid to form the reconstructed image x^\hat{x}.

We kept this head as simple as possible on purpose. A deep decoder could learn to produce realistic retinal images by itself, which would hide differences between the encoders. A linear head with about 0.79 million parameters, in contrast, has no spatial context and cannot add structure that is not already present in the tokens. The quality of the reconstruction, and therefore the quality of the anomaly signal, depends mainly on the encoder.

We evaluated each encoder in four configurations of increasing adaptation. In the first, the encoder was kept frozen and only the reconstruction head was trained with the reconstruction loss, which shows how useful the original pretrained features are for OCT. In the second, the encoder and reconstruction head were trained jointly using only the reconstruction loss, allowing us to assess the effect of reconstruction-based adaptation without triplet learning. In the third, the encoder and the head were trained together with the reconstruction loss and the triplet objective described below, which shows how much each representation benefits from adapting to normal OCT anatomy. In the fourth, a separate retinal ROI-weighted reconstruction term was added, so that reconstruction errors within the retina received greater emphasis than errors in the background. The fourth configuration is the complete model used in all further analyses.

Training objectives

The models were trained to reconstruct normal B-scans using a loss with three complementary terms:

Lrec=λpixLpix+λssimLssim+λpercLperc.(2)\mathcal{L}_{\mathrm{rec}} = \lambda_{\mathrm{pix}}\mathcal{L}_{\mathrm{pix}} + \lambda_{\mathrm{ssim}}\mathcal{L}_{\mathrm{ssim}} + \lambda_{\mathrm{perc}}\mathcal{L}_{\mathrm{perc}}. \tag*{(2)}

The pixel term Lpix\mathcal{L}_{\mathrm{pix}} is an L1 loss that measures intensity differences. Because much of an OCT B-scan is background above and below the retina, the complete model gave retinal pixels a higher weight in this term. A binary retinal mask MM was obtained from the clean target image using multi-scale horizontal Gabor filters, which respond strongly to the layered structure of the retina, followed by binarization, as in our previous study[43]. The detailed ROI extraction procedure and spatial weighting configuration are provided in Supplementary § 7.2. Each pixel ii was weighted by 1+αMi1 + \alpha M_i, and the weights were normalized to a mean of one in each image; α=0\alpha= 0 corresponds to the configuration without ROI weighting. The structural term Lssim=1−SSIM⁡(x,x^)\mathcal{L}_{\mathrm{ssim}} = 1 - \operatorname{SSIM}(x, \hat{x}) encourages the reconstruction to preserve local contrast and layer organization. The perceptual term Lperc\mathcal{L}_{\mathrm{perc}} compares the original and reconstructed images at the level of features rather than pixels. It is the L1 distance between the patch tokens of xx and x^\hat{x}, computed by a frozen copy of the same pretrained encoder used in the model. Using each model’s own pretrained features, rather than a single shared network, prevents the perceptual loss from favoring one encoder over the others.

A model trained only to reconstruct normal images learns what normal anatomy looks like, but it is never told which changes in structure should be treated as abnormal. It may therefore also learn to reconstruct abnormal structures well, which would weaken the anomaly signal. To address this, we added the triplet objective, which provides an explicit signal about structural abnormality without using any real pathology. Each training triplet contained an anchor xax_a, which was a normal B-scan; a positive xpx_p, which was a different normal B-scan; and a negative xnx_n, which was a synthetically perturbed version of the anchor. The anchor and positive were reconstructed to themselves, and the negative was reconstructed towards the clean anchor. The triplet loss pulls the representations of normal images together and pushes the perturbed image away from its normal source:

Ltri=max⁡(∥f(xa)−f(xp)∥22−∥f(xa)−f(xn)∥22+m,0),(3)\mathcal{L}_{\mathrm{tri}} = \max\left(\lVert f(x_a) - f(x_p) \rVert_2^2 - \lVert f(x_a) - f(x_n) \rVert_2^2 + m, 0\right), \tag*{(3)}

where m=0.1m = 0.1 is the margin and f(⋅)f(\cdot) is an image-level embedding obtained by projecting the encoder’s class token to 128 dimensions with a linear layer, followed by L2 normalization. The full training objective is

L=Lrec+λtriLtri.(4)\mathcal{L} = \mathcal{L}_{\mathrm{rec}} + \lambda_{\mathrm{tri}}\mathcal{L}_{\mathrm{tri}}. \tag*{(4)}

We used the triplet objective as a fixed adaptation step, applied in the same way to every encoder, so that we could compare how different representations respond to the same signal.

The synthetic negatives were created from normal B-scans using the two perturbation families. Structural deformation locally thickens and bends the retinal layers, and localized intensity perturbation changes the brightness of a small retinal region. Both were applied only within the retina, and each anchor was paired with a single negative generated by randomly selecting one of the two perturbation families. These perturbations were not designed to imitate any particular disease. Instead, they represent general types of structural change, so that the model learns to separate normal anatomical variation from departures from it. The complete training procedure is summarized in Algorithm 1.

Image-level anomaly scoring

After training, each test image was passed through the model and compared with its reconstruction using the absolute residual map R=∣x−x^∣R = \lvert x - \hat{x} \rvert. Many retinal lesions occupy only a small part of a B-scan, and averaging the residual over the whole image would dilute their signal. We therefore defined the anomaly score A(x)A(x) as the mean of the 5% largest residuals in the image.

To classify images without using any real pathological data, we set the decision threshold T using normal and synthetically perturbed validation images. The threshold was selected by maximizing Youden’s JJ statistic, defined as J(t)=Sensitivity⁡(t)+Specificity⁡(t)−1J(t) = \operatorname{Sensitivity}(t) + \operatorname{Specificity}(t) - 1, where normal images were treated as negative samples and synthetically perturbed images as positive samples. The selected Algorithm 1 Structure-aware adaptation of a pretrained encoder

Require: normal OCT training set D\mathcal{D}; pretrained ViT-L/16 encoder EE; linear reconstruction head DϕD_{\phi}; linear projection head gg; frozen copy of the pretrained encoder FEF_E; ROI weight α\alpha (α=0\alpha= 0 without ROI weighting)

  1. for each training iteration with mini-batch B⊂D\mathcal{B} \subset\mathcal{D} do

  2. for each anchor xa∈Bx_a \in\mathcal{B} do

  3. Sample a different normal B-scan xp∼Dx_p \sim\mathcal{D}, xp≠xax_p \ne x_a

  4. Ma←GaborROI⁡(xa)M_a \leftarrow\operatorname{GaborROI}(x_a) ▷ retinal mask of the anchor

  5. xndef←Deform⁡(xa,Ma)x_n^{\mathrm{def}} \leftarrow\operatorname{Deform}(x_a,M_a); xnint←IntensityPerturb⁡(xa,Ma)x_n^{\mathrm{int}} \leftarrow\operatorname{IntensityPerturb}(x_a,M_a)

  6. for (x,xt)∈{(xa,xa),(xp,xp),(xndef,xa),(xnint,xa)}(x,x_t) \in\{(x_a,x_a),(x_p,x_p),(x_n^{\mathrm{def}},x_a),(x_n^{\mathrm{int}},x_a)\} do

  7. Z←E(x)Z \leftarrow E(x) ▷ 256 patch tokens

  8. x^←Unpatchify⁡(Dϕ(Z))\hat{x} \leftarrow\operatorname{Unpatchify}(D_{\phi}(Z))

  9. Mt←GaborROI⁡(xt)M_t \leftarrow\operatorname{GaborROI}(x_t) ▷ mask from the clean target

  10. Compute Lrec(xt,x^;Mt,α)\mathcal{L}_{\mathrm{rec}}(x_t,\hat{x};M_t,\alpha) ▷ L1 + SSIM + perceptual

  11. end for

  12. f(x)←g(Ecls(x))/∥g(Ecls(x))∥2f(x) \leftarrow g(E_{\mathrm{cls}}(x))/\lVert g(E_{\mathrm{cls}}(x))\rVert_2 for x∈{xa,xp,xndef,xnint}x \in\{x_a,x_p,x_n^{\mathrm{def}},x_n^{\mathrm{int}}\}

  13. Compute Ltri(f(xa),f(xp),f(xn))\mathcal{L}_{\mathrm{tri}}(f(x_a),f(x_p),f(x_n)) for xn∈{xndef,xnint}x_n \in\{x_n^{\mathrm{def}},x_n^{\mathrm{int}}\}

  14. end for

  15. Update EE, DϕD_{\phi} and gg using L=Lrec+λtriLtri\mathcal{L}=\mathcal{L}_{\mathrm{rec}}+\lambda_{\mathrm{tri}}\mathcal{L}_{\mathrm{tri}} ▷ FEF_E stays frozen

  16. end for

threshold was then applied to the independent test set without further adjustment. A test image was classified as abnormal when A(x)>TA(x) > T. For each model, we kept the checkpoint with the lowest loss on the normal validation set.

Anomaly localization

Beyond deciding whether an image is abnormal, a clinically useful detector should indicate where the abnormality is. Here, localization means identifying the pathological region responsible for the anomaly signal, not segmenting the retinal layers. We used the residual map RR as a pixel-level anomaly map and applied the models trained on Kermany directly to RETOUCH, without further training or recalibration. To obtain a binary prediction, we used the 99th percentile of pixel residuals in the Kermany normal validation images as the threshold, so that no RETOUCH information was involved. The predicted regions were compared with the combined IRF, SRF and PED annotations using the Dice coefficient and mIoU.

Because all models were trained on images from a single device, whereas RETOUCH includes three devices that differ in resolution, noise and intensity, this evaluation also tests whether the anomaly maps localize pathology on devices that were not seen during training.

Feature-level anomaly scoring

The reconstruction-based score measures abnormality in pixel space, after the encoder features have passed through the linear head. Because this head is deliberately simple, some information that the encoder has captured about abnormal structure may not appear in the reconstruction. To measure abnormality directly in the representation, we also scored images in feature space.

Following memory-bank approaches to anomaly detection[20], we extracted the patch features of the normal training images for each trained model and stored them in a feature bank. For a test image, each patch feature was compared with the bank, and its anomaly score was the distance to its nearest normal feature. A large distance means that the patch does not resemble any normal patch seen during training. The image-level score was obtained by aggregating the highest patch scores, and the decision threshold was calibrated on normal and synthetically perturbed validation images using Youden’s J statistic, in the same way as for reconstruction-based scoring. For localization, the patch scores were kept separately, arranged on the 16×1616 \times16 patch grid and resized to the image resolution, so that patches far from all normal features formed the predicted anomaly region. As with the reconstruction-based approach, no real pathological image or annotation was used to build the feature bank or set the thresholds. Additional details of normal feature-bank construction and nearest-neighbor anomaly scoring are provided in Supplementary § 9.

Ablation studies

Four ablation studies were performed to examine the influence of training objectives, training data availability, anomaly scoring strategies and synthetic perturbations on detection and localization performance.

The first ablation investigated the contribution of different training components to the learned representations. Four configurations were considered. In the first, the pretrained encoder was frozen and only the linear reconstruction head was trained, allowing the reconstruction capability of the original pretrained features to be assessed without modifying the encoder. In the second, the encoder and reconstruction head were jointly optimized using only the reconstruction loss to assess reconstruction-based adaptation without triplet learning. In the third, the encoder and reconstruction head were jointly optimized using reconstruction and triplet losses to examine the effect of adapting the representation to normal retinal anatomy while distinguishing synthetic abnormalities. The fourth configuration introduced ROI weighting to the reconstruction loss to assess whether emphasizing retinal structures, rather than treating retinal and background pixels equally, improves anomaly detection and localization.

The second ablation examined the sensitivity of the framework to the amount of available normal training data. Because the proposed approach relies exclusively on normal images, understanding its data requirements is important for settings where large collections of healthy OCT scans may not be available. The complete models were trained using randomly selected subsets containing 0.5%0.5\%, 1%1\%, 2%2\% and 5%5\% of the normal training set and compared with models trained on the full dataset. These fractions were selected to examine performance under highly restricted training conditions and how it changes as more normal samples become available. All other training settings were kept fixed, and each subset size was repeated with ten independent random subsets to account for variability in sample selection.

The third ablation compared reconstruction-based and feature-level anomaly scoring to examine how the representation of abnormalities affects detection and localization. Reconstruction-based scoring identifies abnormalities through pixel-level differences between the input and its reconstruction, whereas feature-level scoring measures deviations from the representations of normal retinal images using a normal feature bank. This comparison was motivated by the possibility that structural changes captured by the encoder may not be fully reflected in the reconstructed image, particularly when using a simple linear decoder. Both strategies were applied to the same trained models, allowing the effect of the scoring approach to be examined independently of model training.

The fourth ablation examined how the type and diversity of synthetic perturbations used to construct training triplets affect anomaly detection and localization. Six pathology-inspired perturbations were selected to represent different changes in retinal anatomy: thinning and thickening capture changes in retinal layer geometry, drusen and PED introduce localized elevations and deformations, subretinal fluid creates hyporeflective spaces, and foci introduce localized hyperreflective regions. These perturbations were chosen to examine how different structural and intensity changes contribute to representation learning without requiring pathological training images. Two settings were compared: a combined strategy using all six perturbations with normal augmentations (blur, low contrast, speckle or tilt) applied to anchors and positives; and six single-perturbation models, each trained using only one abnormal perturbation while retaining the same normal augmentations (Figure 3). The perturbation generation settings, including the ranges used to vary lesion size, number and location, are provided in Supplementary § 8. All models were selected using held-out normal validation data and evaluated on the same Kermany and RETOUCH datasets.

Comparison methods

We compared the pretrained encoders with six unsupervised methods that were trained and evaluated using identical data partitions and evaluation protocol: a ConvNeXt-based reconstruction model[48], a variational autoencoder (VAE)[49], VQ-VAE[50], VQGAN[51], f-AnoGAN[29] and an anatomy-aware VQGAN that combines a vector-quantized generative model with the triplet objective and ROI weighting[43].

Evaluation metrics

The primary metric for image-level detection was AUROC, which summarizes performance across all thresholds. At the threshold TT, we also report accuracy, F1 score, precision and recall. For localization, we report the Dice coefficient and mIoU.

Implementation

All models were implemented in PyTorch and trained on a single GPU with 48 GB of memory. Detailed model configurations, optimization hyperparameters and loss weights are provided in Supplementary Section S1.

Statistical analysis

Image-level anomaly detection was evaluated on the held-out Kermany test set using AUROC, accuracy, and F1 score. Pixel-level localization was evaluated on RETOUCH using the Dice coefficient and mIoU. All models were evaluated on identical test sets to ensure consistent comparisons. For image-level detection, decision thresholds were determined using Youden’s J statistic on normal and synthetically perturbed Kermany validation images. The threshold maximizing the difference between sensitivity and false-positive rate was selected for each model and scoring strategy and applied unchanged to the independent test set. For reconstruction-based pixel-level localization, the threshold was set at the 99th percentile of pixel-level reconstruction errors from normal Kermany validation images and applied unchanged to RETOUCH. No real pathological images or annotations were used for threshold calibration.

Statistical uncertainty was quantified using 100 bootstrap resamples, with 95% confidence intervals calculated from the 2.5th and 97.5th percentiles of the bootstrap distributions. Differences between models were assessed using paired bootstrap comparisons, in which the same resampled test observations were used to calculate the performance difference between models in each iteration. For the data-efficiency ablation, each training fraction was evaluated using ten independently sampled subsets, with performance summarized as the mean.

Acknowledgements

This work was supported by the U.S. National Institutes of Health and National Eye Institute under Grants 1R01EY037828-01, R15EY035804 and R21EY035271.

Author Information

contributions

T.H. and S.G. conceived the study and developed the experimental framework. T.H. and S.G. implemented the models, conducted experiments, and analyzed results. H.T. contributed to study design and methodological interpretation. M.N.A. supervised the project, contributed to the clinical and technical framing, and acquired funding. T.H. and S.G. drafted the manuscript. All authors reviewed and revised the manuscript and approved the submitted version.

Corresponding author

Correspondence to Minhaj Nur Alam.

Competing interests

The authors declare no competing interests.

Data availability

The Kermany OCT dataset is publicly available from Mendeley Data (https://data.mendeley.com/datasets/rscbjbr9sj). The RETOUCH dataset is available from the challenge website (https://retouch.grand-challenge.org) under its data-use terms.

Code availability

The code for preprocessing, training, inference and evaluation will be released in a public repository upon publication.

Supplementary Information

Model configuration and training

All models used a ViT-L/16 encoder with a lightweight linear patch decoder. The final-layer patch representations were mapped independently from 1,024 features to 16×16×316 \times16 \times3 reconstructed pixel values. A separate linear projection mapped the class token to a 128-dimensional, ℓ2\ell_2-normalized embedding for the triplet objective. The same architecture and training protocol were applied to DINOv3, RETFound and the supervised ImageNet ViT. The principal settings are summarized in Table S1.

ParameterSetting
Model architecture and preprocessing
Pretrained encodersDINOv3, RETFound, and supervised ImageNet ViT-L/16
Input resolution256×256256 \times256 pixels
Image preprocessingBicubic resizing; ImageNet normalization
Patch size and grid16×1616 \times16 pixels; 16×1616 \times16 patches (256 tokens)
Patch embedding dimension1,024
Reconstruction decoderSingle linear layer, 1024 →\to 768
Triplet projection headLinear, 1024 →\to 128; ℓ2\ell_2 normalization
Optimization
OptimizerAdamW
Batch size16
Training epochs100
Encoder learning rate1×10−51 \times10^{-5}
Decoder learning rate1×10−31 \times10^{-3}
Projection learning rate1×10−41 \times10^{-4}
Weight decay1×10−41 \times10^{-4}
PrecisionMixed precision (FP16)
Training objectives and selection
Reconstruction loss weights (L1, SSIM, perceptual)1.0, 0.2, 0.1
Triplet loss weight0.5
Triplet margin0.1
ROI weighting factorα=4.0\alpha= 4.0; spatial weights normalized to unit mean
Model selectionLowest loss on normal-only validation data
Training hardwareSingle GPU with 48 GB memory

Table S1. Model architecture, training hyperparameters, and optimization settings used for the OCT anomaly detection framework.

Retinal region-of-interest estimation

The retinal ROI was estimated automatically from each clean OCT B-scan. Bright image borders were removed before intensity normalization and gamma correction (γ=0.7\gamma= 0.7). Horizontal retinal structures were enhanced using a bank of Gabor filters with a 31×3131 \times31 kernel, wavelengths {4,8,16}\{4, 8, 16\} pixels, scales σ∈{2,4}\sigma\in\{2, 4\} and orientation 0∘0^\circ. Maximum filter responses were combined and binarized with Otsu thresholding, followed by morphological opening and closing. A connected component spanning a substantial portion of the image width was selected to identify the retinal band.

The resulting mask MM was used to emphasize the retinal tissue relative to background in the reconstruction objective. With Mi∈{0,1}M_i \in\{0,1\} and ROI weighting factor α\alpha, the spatial weights were defined by

wi=1+αMi1N∑j=1N(1+αMj).(5)w_i = \frac{1+\alpha M_i}{\frac{1}{N}\sum_{j=1}^{N}(1+\alpha M_j)}. \tag*{(5)}

Synthetic perturbation generation

Synthetic negative samples were constructed from normal OCT B-scans to supply a controlled abnormality signal without requiring diseased training images. The six perturbation families evaluated in the perturbation ablation were selected to span complementary anatomical changes. Perturbation placement was guided by the ROI of the clean image so that modifications affected the retinal structures rather than unrelated background pixels.

The size, number, and location of synthetic abnormalities were varied within predefined ranges based on image width and retinal thickness. Local retinal thickness was reduced by 20–40% for thinning and increased by 25–60% for thickening. Drusen and hyperreflective foci were generated as 3–9 and 8–25 localized abnormalities per image, respectively. Subretinal fluid and PED were simulated by introducing localized retinal elevations with varying widths and heights.

Normal feature bank and feature-level scoring

To evaluate anomaly evidence directly in feature space, a normal reference bank was constructed independently for each trained encoder. Final-layer spatial patch embeddings were extracted from normal Kermany training images and stored as a collection B\mathcal{B} of reference features. For each test patch embedding ziz_i, the patch anomaly score was defined as its distance to the nearest normal reference feature:

ai=min⁡b∈Bd(zi,b).(6)a_i = \min_{b \in\mathcal{B}} d(z_i,b). \tag*{(6)}

Here, dd denotes the distance used by the feature-bank implementation. Higher values indicate stronger deviations from the representations observed in normal training images. Patch scores were arranged according to their spatial locations and upsampled to the image resolution to obtain a dense anomaly map. Image-level scores were obtained by aggregating the most anomalous patches.

References

  1. [2]Ursula Schmidt-Erfurth, Amir Sadeghipour, Bianca S Gerendas, Sebastian M Waldstein, and Hrvoje Bogunović. “Artificial intelligence in retina”. In: Progress in Retinal and Eye Research 67 (2018), pp. 1–29. DOI: 10.1016/j.preteyeres.2018.07.004.
  2. [3]Daniel Shu Wei Ting, Louis R Pasquale, Lily Peng, John Peter Campbell, Aaron Y Lee, Rajiv Raman, Gavin Siew Wei Tan, Leopold Schmetterer, Pearse A Keane, and Tien Yin Wong. “Artificial intelligence and deep learning in ophthalmology”. In: British Journal of Ophthalmology 103.2 (2019), pp. 167–175. DOI: 10.1136/bjophthalmol–2018–313173.
  3. [4]Daniel S Kermany et al. “Identifying medical diagnoses and treatable diseases by image-based deep learning”. In: Cell 172.5 (2018), 1122–1131.e9. DOI: 10.1016/j.cell.2018.02.010.DOI
  4. [5]Jeffrey De Fauw et al. “Clinically applicable deep learning for diagnosis and referral in retinal disease”. In: Nature Medicine 24 (2018), pp. 1342–1350. DOI: 10.1038/s41591–018–0107–6.DOI
  5. [6]Thomas Schlegl, Sebastian M Waldstein, Hrvoje Bogunovic, Franz Endstraßer, Amir Sadeghipour, Ana-Maria Philip, Dominika Podkowinski, Bianca S Gerendas, Georg Langs, and Ursula Schmidt-Erfurth. “Fully Automated Detection and Quantification of Macular Fluid in OCT Using Deep Learning”. In: Ophthalmology 125.4 (2018), pp. 549–558. DOI: 10.1016/j.ophtha.2017.10.031.DOI
  6. [7]Ariel Yuhan Ong, Priyal Taribagil, Mertcan Sevgi, Aditya U Kale, Eliot R Dow, Trystan Macdonald, Ashley Kras, Gregory Maniatopoulos, Xiaoxuan Liu, Pearse A Keane, et al. “A scoping review of artificial intelligence as a medical device for ophthalmic image analysis in Europe, Australia and America”. In: npj Digital Medicine 8 (2025), p. 323. DOI: 10.1038/s41746–025–01726–8.DOI
  7. [8]Yukun Zhou, Mark A Chia, Siegfried K Wagner, Murat S Ayhan, Dominic J Williamson, Robbert R Struyven, Timing Liu, Moucheng Xu, Mateo G Lozano, Peter Woodward-Court, Yuka Kihara, Andre Altmann, Aaron Y Lee, Eric J Topol, Alastair K Denniston, Daniel C Alexander, and Pearse A Keane. “A foundation model for generalizable disease detection from retinal images”. In: Nature 622 (2023), pp. 156–163. DOI: 10.1038/s41586–023–06555–x.DOI
  8. [9]Jianing Qiu, Jian Wu, Hao Wei, Peilun Shi, Minqing Zhang, Yunyun Sun, Lin Li, Hanruo Liu, Hongyi Liu, Simeng Hou, et al. “Development and Validation of a Multimodal Multitask Vision Foundation Model for Generalist Ophthalmic Artificial Intelligence”. In: NEJM AI 1.12 (2024), AIoa2300221.DOI
  9. [10]Jose Morano et al. “Multimodal foundation model and benchmark for comprehensive retinal OCT image analysis”. In: npj Digital Medicine (2025). DOI: 10.1038/s41746–025–01852–3.DOI
  10. [11]Sina Gholami, Fatema-E Jannat, Atalie Carina Thompson, Sally Shin Yee Ong, Jennifer I Lim, Theodore Leng, Hamed Tabkhivayghan, and Minhaj Nur Alam. “Distributed training of foundation models for ophthalmic diagnosis”. In: Communications Engineering 4.1 (2025), p. 6.DOI
  11. [12]Jinze Zhang, Jian Zhong, Li Lin, Jiaxiong Li, Ke Ma, Naiyang Li, Meng Li, Yuan Pan, Zeyu Meng, Mengyun Zhou, Shang Huang, Shilong Yu, Zhengyu Duan, Sutong Li, Honghui Xia, Juping Liu, Dan Liang, Yantao Wei, Xiaoying Tang, Jin Yuan, and Peng Xiao. “Full end-to-end diagnostic workflow automation of 3D OCT via foundation model-driven AI for retinal diseases”. In: npj Digital Medicine (2026). DOI: 10.1038/s41746-026-03151-x.DOI
  12. [13]Michael Moor, Oishi Banerjee, Zahra Shakeri Hossein Abad, Harlan M Krumholz, Jure Leskovec, Eric J Topol, and Pranav Rajpurkar. “Foundation models for generalist medical artificial intelligence”. In: Nature 616 (2023), pp. 259–265.DOI
  13. [14]Shaoting Zhang and Dimitris Metaxas. “On the challenges and perspectives of foundation models for medical image analysis”. In: Medical Image Analysis 91 (2024), p. 102996.arxiv.org/abs/2306.05705
  14. [15]Philippe Burlina, William Paul, Philip Mathew, Neil Joshi, Katia D Pacheco, and Neil M Bressler. “Low-Shot Deep Learning of Diabetic Retinopathy With Potential Applications to Address Artificial Intelligence Bias in Retinal Diagnostics and Rare Ophthalmic Diseases”. In: JAMA Ophthalmology 138.10 (2020), pp. 1070–1077. DOI: 10.1001/jamaophthalmol.2020.3269.DOI
  15. [16]Abhijit Guha Roy, Jie Ren, Shekoofeh Azizi, Aaron Loh, Vivek Natarajan, Basil Mustafa, Nick Pawlowski, Jan Freyberg, Yuan Liu, Zach Beaver, et al. “Does your dermatology classifier know what it doesn’t know? Detecting the long-tail of unseen conditions”. In: Medical Image Analysis 75 (2022), p. 102274.DOI
  16. [17]Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, et al. “DINOv2: Learning Robust Visual Features without Supervision”. In: Transactions on Machine Learning Research (2024).arxiv.org/abs/2304.07193
  17. [18]Oriane Simeoni, Huy V Vo, Maximilian Seitzer, Federico Baldassarre, Maxime Oquab, Cijo Jose, Vasil Khalidov, Marc Szafraniec, Seungeun Yi, Michael Ramamonjisoa, et al. DINOv3. 2025. DOI: 10.48550/arXiv.2508.10104. arXiv: 2508.10104 [cs.CV].DOI
  18. [19]Tal Reiss, Niv Cohen, Liron Bergman, and Yedid Hoshen. “PANDA: Adapting Pretrained Features for Anomaly Detection and Segmentation”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021, pp. 2806–2814.arxiv.org/abs/2010.05903
  19. [20]Karsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard Schölkopf, Thomas Brox, and Peter Gehler. “Towards Total Recall in Industrial Anomaly Detection”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2022, pp. 14318–14328.arxiv.org/abs/2106.08265
  20. [21]Chaoqin Huang, Aofan Jiang, Jinghao Feng, Ya Zhang, Xinchao Wang, and Yanfeng Wang. “Adapting Visual-Language Models for Generalizable Anomaly Detection in Medical Images”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2024, pp. 11375–11385.arxiv.org/abs/2403.12570
  21. [22]Yukun Zhou, Paul Nderitu, Jocelyn Hui Lin Goh, Justin Engelmann, Siegfried K Wagner, Anran Ran, Hongyang Jiang, Lie Ju, Ke Zou, Sahana Srinivasan, et al. Generalist versus Specialist Vision Foundation Models for Ocular Disease and Oculomics. 2025. DOI: 10.48550/arXiv.2509.03421. arXiv: 2509.03421.DOI
  22. [23]Qingshan Hou, Yukun Zhou, Jocelyn Hui Lin Goh, Ke Zou, Samantha Min Er Yew, Sahana Srinivasan, Meng Wang, Thaddaeus Lo, Xiaofeng Lei, Siegfried K Wagner, et al. “Can a natural image-based foundation model outperform a retina-specific model in detecting ocular and systemic diseases?” In: Ophthalmology Science 6.1 (2026), p. 100923. DOI: 10.1016/j.xops.2025.100923.DOI
  23. [24]Jay Zoellin, Colin Merk, and Bence György. “Benchmarking Vision Encoders for Image Classification in Ophthalmology”. In: Computational and Structural Biotechnology Journal 36.2 (2026), p. 0178. DOI: 10.34133/csbj.0178.DOI
  24. [25]Joana Palés Huix, Adithya Raju Ganeshan, Johan Fredin Haslum, Magnus Söderberg, Christos Matsoukas, and Kevin Smith. “Are Natural Domain Foundation Models Useful for Medical Image Classification?” In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. 2024, pp. 7619–7628.arxiv.org/abs/2310.19522
  25. [26]Tharindu Fernando, Harshala Gammulle, Simon Denman, Sridha Sridharan, and Clinton Fookes. “Deep Learning for Medical Anomaly Detection – A Survey”. In: ACM Computing Surveys 54.7 (2021), p. 141.arxiv.org/abs/2012.02364
  26. [27]Yu Cai, Weiwen Zhang, Hao Chen, and Kwang-Ting Cheng. “MedIAnomaly: A comparative study of anomaly detection in medical images”. In: Medical Image Analysis 102 (2025), p. 103500.DOI
  27. [28]Thomas Schlegl, Philipp Seebock, Sebastian M Waldstein, Ursula Schmidt-Erfurth, and Georg Langs. “Unsupervised anomaly detection with generative adversarial networks to guide marker discovery”. In: Information Processing in Medical Imaging. Springer, 2017, pp. 146–157. DOI: 10.1007/978-3-319-59050-9_12.DOI
  28. [29]Thomas Schlegl, Philipp Seebock, Sebastian M Waldstein, Georg Langs, and Ursula Schmidt-Erfurth. “f-AnoGAN fast unsupervised anomaly detection with generative adversarial networks”. In: Medical Image Analysis 54 (2019), pp. 30–44. DOI: 10.1016/j.media.2019.01.010.DOI
  29. [30]Christoph Baur, Stefan Denner, Benedikt Wiestler, Nassir Navab, and Shadi Albarqouni. “Autoencoders for unsupervised anomaly segmentation in brain MR images: A comparative study”. In: Medical Image Analysis 69 (2021), p. 101952.DOI
  30. [31]Thomas Defard, Aleksandr Setkov, Angelique Loesch, and Romaric Audigier. “PaDiM: A Patch Distribution Modeling Framework for Anomaly Detection and Localization”. In: International Conference on Pattern Recognition Workshops. 2021, pp. 475–489.arxiv.org/abs/2011.08785
  31. [32]Chun-Liang Li, Kihyuk Sohn, Jinsung Yoon, and Tomas Pfister. “CutPaste: Self-Supervised Learning for Anomaly Detection and Localization”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021, pp. 9664–9674.arxiv.org/abs/2104.04015
  32. [33]Vitjan Zavrtanik, Matej Kristan, and Danijel Skočaj. “DRAEM – A Discriminatively Trained Reconstruction Embedding for Surface Anomaly Detection”. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021, pp. 8330–8339.arxiv.org/abs/2108.07610
  33. [34]Hannah M Schlüter, Jeremy Tan, Benjamin Hou, and Bernhard Kainz. “Natural Synthetic Anomalies for Self-supervised Anomaly Detection and Localization”. In: European Conference on Computer Vision. 2022, pp. 474–489.arxiv.org/abs/2109.15222
  34. [35]Yu Tian, Fengbei Liu, Guansong Pang, Yuanhong Chen, Yuyuan Liu, Johan W Verjans, Rajvinder Singh, and Gustavo Carneiro. “Self-supervised pseudo multi-class pre-training for unsupervised anomaly detection and segmentation in medical images”. In: Medical Image Analysis 90 (2023), p. 102930. DOI: 10.1016/j.media.2023.102930.DOI
  35. [36]Philipp Seebock, Sebastian M Waldstein, Sophie Klimscha, Hrvoje Bogunovic, Thomas Schlegl, Bianca S Gerendas, Rene Donner, Ursula Schmidt-Erfurth, and Georg Langs. “Unsupervised identification of disease marker candidates in retinal OCT imaging data”. In: IEEE Transactions on Medical Imaging 38.4 (2019), pp. 1037–1047. DOI: 10.1109/TMI.2018.2873750.DOI
  36. [37]Philipp Seebock, Jose Ignacio Orlando, Thomas Schlegl, Sebastian M Waldstein, Hrvoje Bogunovic, Sophie Klimscha, Georg Langs, and Ursula Schmidt-Erfurth. “Exploiting epistemic uncertainty of anatomy segmentation for anomaly detection in retinal OCT”. In: IEEE Transactions on Medical Imaging 39.1 (2020), pp. 87–98. DOI: 10.1109/TMI.2019.2919951.DOI
  37. [38]Kang Zhou, Yuting Xiao, Jianlong Yang, Jun Cheng, Wen Liu, Weixin Luo, Zaiwang Gu, Jiang Liu, and Shenghua Gao. “Encoding Structure-Texture Relation with P-Net for Anomaly Detection in Retinal Images”. In: European Conference on Computer Vision. 2020, pp. 360–377.arxiv.org/abs/2008.03632
  38. [39]Guilherme Aresta, Teresa Araujo, Ursula Schmidt-Erfurth, and Hrvoje Bogunovic. “Anomaly Detection in Retinal OCT Images With Deep Learning-Based Knowledge Distillation”. In: Translational Vision Science and Technology 14.3 (2025), p. 26. DOI: 10.1167/tvst.14.3.26.DOI
  39. [40]Ioannis Lagogiannis, Felix Meissen, Georgios Kaissis, and Daniel Rueckert. “Unsupervised Pathology Detection: A Deep Dive Into the State of the Art”. In: IEEE Transactions on Medical Imaging 43.1 (2024), pp. 241–252.DOI
  40. [41]Jinan Bao, Hanshi Sun, Hanqiu Deng, Yinsheng He, Zhaoxiang Zhang, and Xingyu Li. “BMAD: Benchmarks for Medical Anomaly Detection”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops. 2024, pp. 4042–4053. DOI: 10.1109/CVPRW63382.2024.00408.DOI
  41. [42]Hrvoje Bogunovic, Freerk Venhuizen, Sophie Klimscha, Stefanos Apostolopoulos, Alireza Bab-Hadiashar, Ulas Bagci, Mirza Faisal Beg, Loza Bekalo, Qiang Chen, Carlos Ciller, et al. “RETOUCH The Retinal OCT Fluid Detection and Segmentation Benchmark and Challenge”. In: IEEE Transactions on Medical Imaging 38.8 (2019), pp. 1858–1874. DOI: 10.1109/TMI.2019.2901398.DOI
  42. [43]Tania Haghighi, Sina Gholami, Hamed Tabkhi, and Minhaj Nur Alam. “Anatomy-Aware Unsupervised Detection and Localization of Retinal Abnormalities in Optical Coherence Tomography”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops. 2026, pp. 6640–6649.arxiv.org/abs/2604.22139
  43. [44]Dong Gong, Lingqiao Liu, Vuong Le, Budhaditya Saha, Moussa Reda Mansour, Svetha Venkatesh, and Anton van den Hengel. “Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder for Unsupervised Anomaly Detection”. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2019, pp. 1705–1714.arxiv.org/abs/1904.02639
  44. [45]Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollar, and Ross Girshick. “Masked Autoencoders Are Scalable Vision Learners”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2022, pp. 16000–16009.arxiv.org/abs/2111.06377
  45. [46]Shekoofeh Azizi, Laura Culp, Jan Freyberg, Basil Mustafa, Sebastien Baur, Simon Kornblith, Ting Chen, Nenad Tomasev, Jovana Mitrović, Patricia Strachan, et al. “Robust and data-efficient generalization of self-supervised machine learning for diagnostic imaging”. In: Nature Biomedical Engineering 7 (2023), pp. 756–779.DOI
  46. [47]Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. “An Image Is Worth 16x16 Words Transformers for Image Recognition at Scale”. In: International Conference on Learning Representations. 2021.
  47. [48]Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, and Saining Xie. “A ConvNet for the 2020s”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2022, pp. 11976–11986.
  48. [49]Diederik P Kingma and Max Welling. “Auto-Encoding Variational Bayes”. In: International Conference on Learning Representations. 2014.arxiv.org/abs/1312.6114
  49. [50]Aaron van den Oord, Oriol Vinyals, and Koray Kavukcuoglu. “Neural Discrete Representation Learning”. In: Advances in Neural Information Processing Systems. Vol. 30. 2017.arxiv.org/abs/1711.00937
  50. [51]Patrick Esser, Robin Rombach, and Björn Ommer. “Taming Transformers for High-Resolution Image Synthesis”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021, pp. 12873–12883.arxiv.org/abs/2012.09841

Paper details

vlnc:W_kbjpt6tj
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents