MIL-PF: Multiple Instance Learning on Precomputed Features for Mammography Classification
Authors: Nikola Jovišić, Milica Škipina, Nicola Dall'Asen, Dubravko Ćulibrk
Organizations: Institute for AI R&D of Serbia, Serbia · Faculty of Technical Sciences, University of Novi Sad, Serbia · University of Trento, Italy · University of Pisa, Italy · Fondazione Bruno Kessler, Italy
Modern foundation models provide highly expressive visual representations, yet adapting them to high-resolution medical imaging remains challenging due to limited annotations and weak supervision. Mammography, in particular, is characterized by large images, variable multi-view studies and predominantly breast-level labels, making end-to-end fine-tuning computationally expensive and often impractical. We propose Multiple Instance Learning on Precomputed Features (MIL-PF), a scalable framework that combines frozen foundation encoders with a lightweight MIL head for mammography classification. By precomputing the semantic representations and training only a small task-specific aggregation module (40k parameters), the method enables efficient experimentation and adaptation without retraining large backbones. The architecture explicitly models the global tissue context and the sparse local lesion signals through attention-based aggregation. MIL-PF achieves state-of-the-art classification performance at clinical scale while substantially reducing training complexity. We release the code for full reproducibility.
Figures & tables
Figure 1: The MIL-PF pipeline diagram, divided into distinct stages: Feature Precomputing producing Embeddings dataset E and Head Training using them.
VinDr
EMBED
Model/Paper
# Trainable Params (M)
Level
AUC ↑
bAcc ↑
Spec@ Sens=0.9 ↑
AUC ↑
bAcc ↑
Spec@ Sens=0.9 ↑
ES-Att side [ 12 ]
22.89
Case
0.786
0.749
0.193
0.836
0.668
0.558
SIL IL GMIC-ResNet18 [ 12 ]
22.49
Image
0.911
0.855
0.698
0.875
0.802
0.566
GMIC [ 18 ]
14.11
Image
0.899
0.826
0.690
0.816
0.736
0.380
FPN-AbMIL [ 8 ]
1.76
Image
0.920
0.844
0.720
0.802
0.740
0.367
FPN-SetTrans [ 8 ]
5.38
Image
0.908
0.827
0.670
0.794
0.728
0.364
Table 1: Quantitative comparison of MIL-PF against SOTA baselines on VinDr and EMBED on BI-RADS-based malignancy. MIL-PF demonstrates superior performance, particularly on the large-scale, noisy EMBED dataset, highlighting its robustness.
VinDr - Mass
VinDr - Calcification
RSNA - Cancer
Model/Paper
# Trainable Params (M)
Level
AUC ↑
bAcc ↑
Spec@ Sens=0.9 ↑
AUC ↑
bAcc ↑
Spec@ Sens=0.9 ↑
AUC ↑
bAcc ↑
Spec@ Sens=0.9 ↑
ES-Att side [ 12 ]
22.89
Case
0.738
0.669
0.266
0.937
0.864
0.877
0.890
0.799
0.642
SIL IL GMIC-ResNet18 [ 12 ]
22.49
Image
0.772
0.703
0.307
0.953
0.886
0.886
0.899
0.754
0.684
GMIC [ 18 ]
14.11
Image
0.755
0.687
0.286
0.941
0.855
0.899
0.773
0.699
0.434
FPN-AbMIL [ 8 ]
1.76
Image
0.792
0.720
0.382
0.954
0.902
0.904
0.891
0.793
0.628
FPN-SetTrans [ 8 ]
5.38
Image
0.785
0.734
0.367
0.942
0.884
0.836
0.874
0.773
0.656
Table 2: Quantitative comparison of MIL-PF against SOTA baselines on the VinDr and RSNA datasets. MIL-PF demonstrates superior performance.
Figure 2: Attention maps for masses and calcifications obtained by overlapping the MIL-PF’s local stream window. Ground truth is shown in green and predictions in red.
Calcification
Mass
Model/Paper
mAP ↑
mAP s ↑
mAP m ↑
mAP l ↑
mAP ↑
mAP s ↑
mAP m ↑
mAP l ↑
FPN-AbMIL [ 8 ]
32.0
9.1
34.8
57.5
28.2
4.7
32.1
66.2
FPN-SetTrans [ 8 ]
37.4
18.8
39.5
62.2
24.3
3.0
28.0
73.2
MIL-PF (Ours, DINOv2)
24.4
0.4
22.5
94.44
16.3
0.1
15.9
62.8
MIL-PF (Ours, MedSigLIP)
38.4
1.2
52.5
84.9
14.1
0.1
11.3
58.4
Table 3: Comparison of proposed MIL-PF with FPN [ 8 ] . Detection performance is reported for all (mAP), small (mAP s ), medium (mAP m ) and large (mAP l ) lesions.
Model
Resolution
AUC ↑
Spec@Sens=0.9 ↑
MammoCLIP [ 4 ]
1520×912
0.870
0.558
BiomedCLIP [ 22 ]
224×224
0.872
0.606
MedSigLIP [ 17 ]
448×448
0.897
0.691
RADDINO [ 13 ]
518×518
0.854
0.499
DINOv2 [ 11 ] ViT Giant
518×518
0.897
0.655
DINOv3 [ 19 ] ViT Huge+
512×512
0.831
0.497
Table 4: Encoder selection (left) and ablation on aggregation types (right) on EMBED.
Foundation models are increasingly used as image feature extractors for mammography, but their robustness under external domain shift remains unclear. We benchmark 15 foundation-model backbones across breast density, BI-RADS severity, and cancer status using a unified frozen-backbone linear-probe protocol, training on 3 source datasets and evaluating on 12 task-compatible out-of-distribution (OOD) datasets after label harmonization. Mammography-specific vision-language models (Mammo-FM and MaMA) provide the strongest mean OOD performance, but robustness is not explained by mammography exposure alone. DINOv3 remains a competitive vision-only baseline, and mammography-adapted pretraining does not consistently improve generalization. Dataset-level analysis further shows that even leading models show heterogeneous performance across datasets. Feature-space inspection reveals that useful representations can preserve clinical signal while retaining dataset and acquisition structure. These findings highlight dataset-level OOD evaluation as a central criterion for assessing mammography representations. Our code is publicly available: https://github.com/biomedia-mira/mammo-ood.
Giang Nguyen, Raghav Mehta, Emma A. M. Stanley +4
College of Engineering and Computer Science, VinUniversity, Hanoi, Vietnam · Imperial College London, London, UK · Radiology Department, Vietnam National Cancer Hospital, Hanoi, Vietnam +2
Multiple Instance Learning (MIL) is the predominant framework for classifying gigapixel whole-slide images in computational pathology. MIL follows a sequence of 1) extracting patch features, 2) applying a linear layer to obtain task-specific patch features, and 3) aggregating the patches into a slide feature for classification. While substantial efforts have been devoted to optimizing patch feature extraction and aggregation, none have yet addressed the second point, the critical layer which transforms general-purpose features into task-specific features. We hypothesize that this layer constitutes an overlooked performance bottleneck and that stronger representations can be achieved with a low-rank transformation tailored to each patch's phenotype, yielding synergistic effects with any of the existing MIL approaches. To this end, we introduce MAMMOTH, a parameter-efficient, multi-head mixture of experts module designed to improve the performance of any MIL model with minimal alterations to the total number of parameters. Across eight MIL methods and 19 different classification tasks, we find that such task-specific transformation has a larger effect on performance than the choice of aggregation method. For instance, when equipped with MAMMOTH, even simple methods such as max or mean pooling attain higher average performance than any method with the standard linear layer. Overall, MAMMOTH improves performance in 130 of the 152 examined configurations, with an average +3.8% change in performance. Code is available at https://github.com/mahmoodlab/mammoth.
Daniel Shao, Joel Runevic, Richard J. Chen +4
Massachusetts Institute of Technology, Cambridge MA · Harvard University, Cambridge MA · Emory University, Atlanta GA +1
Vision Transformers (ViT) have become the architecture of choice for many computer vision tasks, yet their performance in computer-aided diagnostics remains limited. Focusing on breast cancer detection from mammograms, we identify two main causes for this shortfall. First, medical images are high-resolution with small abnormalities, leading to an excessive number of tokens and making it difficult for the softmax-based attention to localize and attend to relevant regions. Second, medical image classification is inherently fine-grained, with low inter-class and high intra-class variability, where standard cross-entropy training is insufficient. To overcome these challenges, we propose a framework with three key components: (1) Region of interest (RoI) based token reduction using an object detection model to guide attention; (2) contrastive learning between selected RoI to enhance fine-grained discrimination through hard-negative based training; and (3) a DINOv2 pretrained ViT that captures localization-aware, fine-grained features instead of global CLIP representations. Experiments on public mammography datasets demonstrate that our method achieves superior performance over existing baselines, establishing its effectiveness and potential clinical utility for large-scale breast cancer screening. Our code is available for reproducibility here: https://aih-iitd.github.io/publications/attend-what-matters
Department of Computer Science and Engineering, IIT Delhi, New Delhi, India · Yardi School of AI, IIT Delhi, New Delhi, India · Department of Radiodiagnosis, PGIMER Chandigarh, Chandigarh, India