Source-linked AI summary
Towards Interpretable Foundation Models for Retinal Fundus Images
Samuel Ofosu Mensah, Camila Roa, Kerol Djoumessi, Philipp Berens
TL;DR
Foundation models for retinal imaging often lack faithful explanations and dataset-level views of their learned representations. Dual-IFM combines interpretable-by-design evidence maps with direct 2D representation visualization, achieving competitive benchmark performance while offering local interpretability.
Problem
Foundation models often lack faithful prediction explanations and dataset-level visualization of semantic representation structure, limiting their adoption in high-stakes medical imaging.
Method
Dual-IFM combines a BagNet backbone for class evidence maps with a t-SimCNE-trained 2D projection layer for direct representation-space visualization.
Results
Dual-IFM achieved competitive performance across CFP benchmarks, in some tasks surpassing the much larger RETFound, while producing localized evidence maps and meaningful disease-severity structure.
Takeaways & Limitations
The results support combining local interpretability with representation-space visualization without compromising representation quality in retinal foundation models.
Takeaways & Limitations
The study is limited to color fundus photographs and a restricted fine-tuning hyperparameter search.
Abstract
from arXiv · showhide
Foundation models are used to extract transferable representations from large amounts of unlabeled data, typically via self-supervised learning (SSL). However, many of these models rely on architectures that offer limited interpretability, a critical issue in high-stakes domains such as medical imaging. We propose DualIFM, a foundation model that is interpretable-by-design via a BagNet backbone whose small receptive fields generate class evidence maps that are faithful to the model's decision-making process. Additionally, DualIFM incorporates a $2D$ projection layer during pretraining that enables direct visualization of the representation space, providing a dataset-level view of the learned structure including meaningful clinical clusters as well as potential spurious correlations. We trained DualIFM on over 800,000 color fundus photographs from various sources to learn generalizable representations for different downstream tasks. Our model achieves performance comparable to RETFound, which has $16\times$ more parameters, while providing interpretable predictions on out-of-distribution data. These results suggest that large-scale SSL pretraining paired with inherent interpretability can lead to robust representations for retinal imaging. Code and pretrained models are available at github.com/berenslab/interpretable_FM.
1 Introduction
Foundation models provide transferable representations for downstream ophthalmic tasks but typically lack faithful, built-in explanations, limiting their use in high-stakes medical imaging. Dual-IFM addresses this by combining BagNet-based local explanations with direct visualization of the learned representation space.
- Motivation: Foundation models learn general-purpose representations from massive, diverse unlabeled datasets, typically through self-supervised learning, for adaptation to downstream tasks.RETFound is a widely used ophthalmic foundation model that has inspired studies across ophthalmic imaging tasks.
- Motivation: Because foundation models offer no built-in explanation for predictions, studies often use post-hoc attribution methods that can be unfaithful to model decisions.This lack of faithfulness limits adoption, particularly in high-stakes domains such as medical imaging.
- Motivation: Attribution methods explain individual predictions but do not reveal whether the representation space accurately captures semantic relationships.The geometric properties of high-dimensional latent spaces encode semantic relationships in the learned representations.
- Contribution: Dual-IFM combines local explanations with direct visualization of the representation space for color fundus photography.It uses BagNet with t-SimCNE; restricting BagNet’s receptive field to small patches produces class evidence maps indicating influential image regions.
2 Methods
Dual-IFM combines a BagNet encoder with t-SimCNE self-supervised pretraining and a 2D projection for interpretable representations. A parallel classification branch produces class-wise evidence maps from local image features, and pretraining uses 802,360 fundus photographs from three datasets.
- Architecture and pretraining: Dual-IFM uses a BagNet backbone trained with t-SimCNE to learn generalizable representations from color fundus photographs.The encoder’s high-dimensional representations are used for downstream tasks, while the projection head supports 2D visualization.
- Architecture and pretraining: The projection head maps pooled encoder features to a 2D embedding, where the contrastive loss is computed instead of on SimCLR’s 128D projection.t-SimCNE uses Euclidean similarity to improve visualization, with cosine similarity retained in stage one for Dual-IFM.
- Classification and interpretability: A parallel classification branch applies a 1 × 1 convolution to the final feature map to generate n class-wise activation maps, then globally averages them into class scores.The activation maps directly highlight image regions contributing to predictions.
- Classification and interpretability: Small BagNet receptive fields make each activation-map entry depend on a local image patch, so the evidence maps directly reflect local content contributing to predictions.This provides inherent faithfulness rather than approximating explanations after inference with post-hoc attribution methods.
- Datasets and evaluation: 802,360 images from EyePACS, AREDS, and UKBiobank were quality-filtered and used for pretraining, while evaluation included out-of-distribution retinal datasets.The pretraining datasets contained 567,384 EyePACS, 110,690 AREDS, and 132,010 UKBiobank images.
3 Results
Dual-IFM achieved performance comparable to RETFound and improved over a task-trained BagNet baseline across many retinal tasks, while its learned 2D projection revealed disease-severity structure and its BagNet backbone provided class evidence maps. The 2D projection incurred a modest embedding-quality cost relative to post-hoc dimensionality reduction but enabled direct dataset-level inspection.
- Downstream performance: Dual-IFM performed comparably to RETFound for in-distribution diabetic retinopathy detection and age-related macular degeneration classification, while matching or outperforming task-trained BagNet-33 across most out-of-distribution tasks.Self-supervised domain-specific pretraining improved downstream performance, and Dual-IFM performed similarly to SimCLR and RETFound.
- Downstream performance: Linear probing improved over the task-trained BagNet baseline on 4/7 datasets and over RETFound on 6/7 datasets; fine-tuning generally improved performance except on PAPILA and FIVES.The PAPILA and FIVES decreases were attributed to possible overfitting under a limited hyperparameter search.
- Representation-space visualization: The learned 2D projection embedded entire datasets into a low-dimensional representation space that captured disease-severity structure and exposed overlap among grades as potential borderline cases.APTOS samples followed a curved manifold ordered by diabetic retinopathy severity, while Glaucoma Fundus showed a similar structure.
- Representation-space visualization: Cosine similarity in the first projection stage produced better 2D embedding quality than Euclidean similarity, achieving 0.821 versus 0.745 across datasets.This cosine-similarity variant was adopted for Dual-IFM, and the visualization could be further improved by aligning the projection.
- Representation-space visualization: 0.821 was Dual-IFM’s average k-NN AUROC for 2D embeddings, compared with 0.851 for ImageNet and 0.839 for SimCLR representations reduced post-hoc with 2D PCA.Constraining the projection to 2D during pretraining reduced embedding quality but avoided post-hoc dimensionality reduction.
- Local interpretability: Dual-IFM’s BagNet class evidence maps improved localization with a sparsity constraint, although higher sparsity reduced classification performance after localization peaked.The selected sparsity value maximized localization before performance deteriorated.
4 Discussion
Dual-IFM combines local interpretability with direct representation-space visualization while achieving competitive retinal fundus benchmark performance, in some tasks surpassing the much larger RETFound. The discussion also highlights clinical applicability, computational limitations, and future extensions beyond CFP.
- Contributions: Dual-IFM offers local interpretability and direct visualization of representation space for dataset-level exploration while achieving competitive CFP benchmark performance.Its representations support both linear probing and fine-tuning across downstream tasks.
- Performance: 18.3M parameters enabled Dual-IFM to surpass RETFound in some tasks despite RETFound being much larger.The comparison is reported across some downstream tasks rather than uniformly across all benchmarks.
- Interpretability: BagNet-based class evidence maps highlight lesion-relevant regions inherently, unlike RETFound’s post-hoc attribution methods.This design supports clinical settings requiring both accuracy and transparency.
- Limitations: BagNet training is memory-intensive and requires a relatively small batch size despite Dual-IFM’s low parameter count.The discussion attributes this constraint to training memory requirements and references Table 1.
- Limitations and future work: The study is limited to CFP and a restricted fine-tuning hyperparameter search, motivating evaluation on additional modalities, backbones, and SSL objectives.The authors propose multimodal use of Dual-IFM for cross-modality dataset-level exploration.