TL;DR
Until now, detecting medical anomalies with just a handful of examples required training a dedicated model for every single organ or scan type—a cumbersome "one-for-one" approach. ProX-MAD breaks this bottleneck with a single, unified "one-for-many" model that learns compact, specialized "proxy" tokens to summarize what healthy and diseased tissues look like across wildly different medical domains. Trained just once, it outperforms specialist models while running faster and keeping a constant, lightweight memory footprint.
What Problem Does This Paper Address?
Gathering massive, pixel-labeled medical datasets is notoriously difficult, which has pushed researchers toward few-shot medical anomaly detection (MAD)—teaching models to spot pathologies using just 1 to 4 normal and abnormal reference scans.
Currently, few-shot MAD lives in a "one-for-one" world: you train one model for Brain MRIs, another for Liver CTs, and another for Chest X-rays. If you try to train a single unified model across all these domains at once ("one-for-many"), existing methods fall apart, especially when trying to pinpoint the exact pixels of a lesion.
Why? The authors diagnose two failure modes in current paradigms:
- Blurred Decision Boundaries: Methods that learn a single boundary between "normal" and "abnormal" (often built on CLIP) get confused when forced to reconcile a brain tumor, a lung opacity, and a retinal lesion simultaneously.
- Bloated, Naive Memory Banks: Methods that store reference image patches in a memory bank struggle to cover diverse normal anatomy with just a few shots, can't easily store "abnormal" patches (which usually mix healthy and diseased tissue), and balloon in memory cost as you add more shots and datasets.
Methods
ProX-MAD replaces rigid boundaries and sprawling memory banks with a compact set of learnable prototypes called proxies, paired with a spatially sharp visual backbone.
- Swapping CLIP for DINOv1: Standard methods rely on CLIP, which is trained for global image-text alignment and produces spatially blurry patch features. ProX-MAD uses a frozen DINOv1 (ViT-B/8) backbone. Because DINO is self-supervised on pure visual structure and uses a tiny $8\times8$ patch size, it yields crisp boundaries between healthy and pathological tissue out of the box.
- State-Specific Learnable Proxies: Instead of storing raw image patches, the model maintains $N$ learnable vector tokens ("proxies") for the normal state and $N$ for the abnormal state ($N=24$ in the unified setting) across four intermediate layers of the backbone.
- Masked Proxy Infusion Attention (MPIA): This is the core novelty. To ground the learnable proxies in a specific dataset's reality, proxies act as queries in a cross-attention module, pulling spatial context from the few-shot reference images of their matching state (normal proxies attend to normal scans; abnormal to abnormal). Crucially, MPIA applies proxy-wise quantile masking, throwing away the bottom 90% ($\alpha=0.9$) of weak attention scores before the softmax step. This forces each proxy to ignore background noise and specialize in a distinct anatomical or pathological sub-pattern rather than collapsing into identical averages.
- Stochastic Training & Cached Inference: During training, ProX-MAD pairs each query image with just one randomly sampled normal and abnormal reference per iteration—acting as a clever augmentation that prevents overfitting. At test time, it infuses all $k$ reference shots into the proxies, caches those $N$ vectors once per dataset, and scores new test scans via simple cosine similarity.
Datasets
No new datasets are introduced; instead, the authors evaluate on six heterogeneous medical datasets from the established BMAD benchmark:
- Classification + Pixel Segmentation: Brain MRI, Liver CT, and RESC (retinal OCT).
- Classification Only: OCT17 (retinal OCT), Chest X-ray, and Digital Histopathology (His).
- Cross-Dataset Transfer: CheXpert (Chest X-ray) and OCTDL (retinal OCT) are used as unseen test targets to evaluate zero-retraining domain shift.
Key Insights and Ideas
- Why CLIP struggles at medical localization: Visualizing patch features via PCA (see Figure 1d above) reveals a striking insight: CLIP's features blend normal and abnormal medical tissue into a diffuse soup, whereas DINOv1 ViT-B/8 carves out sharp, distinct clusters. Still, a frozen DINOv1 memory bank alone gets a dismal 42.77% pixel-level AP—proving that the proxy mechanism, not just the backbone, does the heavy lifting.
- Masking creates an interpretable codebook: Because MPIA masks out 90% of low-confidence patch matches, proxies naturally divide and conquer. Visualizations show normal proxies tiling healthy anatomy (some lock onto organ borders, others onto background fields), while abnormal proxies specialize in lesions of varying scales and textures.
- $O(N)$ scaling beats memory banks: Whether you give ProX-MAD 1 reference scan or 4 (or 40), the cached test-time representation is compressed into the exact same $N$ proxy tokens. Query latency and memory stay completely flat.
Key Results
Across 1-, 2-, and 4-shot budgets, ProX-MAD sets a new state of the art in both image-level classification and pixel-level segmentation:
- Unified Stability: Moving from specialist (one-for-one) to unified (one-for-many) training causes prior methods' pixel-level Average Precision (P-AP) to drop by up to 5.37% (MadCLIP) and 1.91% (MVFA). ProX-MAD's average AP never drops by more than 0.42%, and actually improves in 1-shot (+0.22%) and 2-shot (+1.06%) pixel segmentation.
- Beating Specialists with One Model: Under the 4-shot unified setting, ProX-MAD hits 92.25% Image-AP and 84.82% Pixel-AP on average—beating MVFA and MadCLIP even when those baselines are given the advantage of training separate specialist models per dataset (where they peak at 90.81% I-AP and 82.75% P-AP).
- Faster and Lighter: On an NVIDIA A6000 GPU (FP16), ProX-MAD runs in 13.26 ms using 2126.9 MB of memory—faster and leaner than both MadCLIP (13.79 ms / 2401.1 MB) and 4-shot MVFA (15.01 ms / 2936.1 MB).
- Zero-Shot Cross-Dataset Transfer: When trained on 1 shot of a source dataset and tested directly on an unseen dataset of the same modality (e.g., OCT17 $\rightarrow$ OCTDL), ProX-MAD leads across the board with 77.99% Image-AUROC and 86.43% Image-AP.
Limitations and Future Work
- Garbage in, garbage out on feature separability: ProX-MAD exploits the spatial separability of its frozen vision backbone rather than fine-tuning the backbone itself. When normal and abnormal tissues aren't cleanly separated in DINO's feature space—most noticeably on the RESC retinal dataset—ProX-MAD trails the MVFA memory-bank baseline in image-level ranking (though it still wins on pixel-level AUROC).
- Toward true zero-shot MAD: ProX-MAD still needs a handful of labeled reference scans at test time to infuse its proxies. Next, the authors plan to distill these learned visual proxies into text-conditioned prototypes using a DINO-style vision-language backbone, paving the way for reference-free, zero-shot deployment on unseen medical modalities.
Summary updated