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.
Alex: Welcome to another episode of ResearchPod. Today, we're looking at a study that tackles a real tension in medical AI: how to build models that are both highly accurate and transparent enough for a doctor to actually trust.
Sam: So this paper is asking how we stop treating powerful AI models like black boxes — where we see the output but have no idea why the model made that specific choice?
Alex: Exactly. Modern AI is excellent at spotting patterns, but it often can't explain itself. When a doctor uses an AI to help diagnose a patient, they need to know what the model is actually looking at — not just what conclusion it reached.
Sam: And the current workaround — using separate tools that try to explain the model after it makes a decision — is often unreliable. That's the main problem the researchers are trying to solve?
Alex: Precisely. Their argument is that explanation shouldn't be an afterthought. They've built a model called Dual-IFM where the transparency is baked into the architecture from the very beginning, rather than bolted on at the end.
Sam: So instead of asking "why did it do that?" after the fact, the reasoning is already part of how the model works. How does that actually function?
Alex: The key is something called BagNet — and the name is a clue. Think of a detective who, instead of forming a vague general impression of a crime scene, methodically examines small, specific clues one at a time. BagNet works the same way. It looks at small, local patches of an image rather than the whole picture at once.
Sam: So by restricting the model to small patches, it's forced to base its decision on specific, identifiable features — like a particular lesion in an eye scan — rather than some general sense of the whole image?
Alex: That's exactly it. And because each patch is processed independently, the model can produce what the researchers call a "class evidence map." It's essentially a highlighted version of the original image showing which specific regions drove the diagnosis. You can point to the exact pixels that triggered the decision.
Sam: That's like showing your work in a maths problem instead of just writing down the final answer. But you mentioned this is also a "foundation model" — what does that add?
Alex: Foundation models are pre-trained on enormous amounts of data before being fine-tuned for a specific task — think of it like a medical student who has read thousands of textbooks before ever seeing a real patient. Dual-IFM uses that kind of broad pre-training, but the researchers also added a second layer of transparency on top.
Sam: What does that second layer do?
Alex: It's a projection layer that takes the model's internal data — which exists in a very high-dimensional space, far too complex to visualise — and compresses it down into two dimensions. Imagine taking a vast, tangled network of thousands of patient records and flattening it onto a single page so you can see which cases cluster together.
Sam: And clinicians can actually use that map to understand how the model is grouping different disease stages?
Alex: Yes. You can see whether patients with similar diagnoses are landing near each other on the map, which is a useful sanity check. It also reveals what the researchers call "spurious correlations" — cases where the model might be picking up on the wrong signal entirely. If the model is focusing on something irrelevant, it shows up visually, and a clinician can catch it.
Sam: That's a meaningful safeguard. But here's the obvious question — if the model is so much more transparent, does it pay for that with lower accuracy?
Alex: That's the critical trade-off, and the authors address it directly. Dual-IFM achieves performance comparable to much larger models — including one called RETFound, which has roughly sixteen times more parameters. More parameters generally means more computational power and more data the model can absorb. So Dual-IFM is reaching similar accuracy with a fraction of the complexity.
Sam: So it's not sacrificing performance for transparency. Is there a catch?
Alex: There is one significant limitation: memory. Because BagNet relies on large spatial feature maps to maintain that local, patch-by-patch focus, it demands more memory than you might expect given its size. That's a real constraint for hospitals with limited hardware.
Sam: So the trade-off isn't accuracy versus transparency — it's transparency versus memory footprint.
Alex: That's a precise way to put it. If a clinical setting has the hardware to support it, they get a model that produces an explicit, faithful map of its own reasoning — something you can audit, question, and explain to a patient. The researchers frame this as a meaningful step toward real clinical deployment, where both accuracy and transparency are non-negotiable.
Sam: It's a different way of thinking about trust in AI — not just "does it get the right answer," but "can we follow the logic that got it there."
Alex: And in medicine, that second question may matter just as much as the first. Thanks for listening to ResearchPod.