NeurIPS 2025
Authors: Hossein Jafarinia, Danial Hamdi*, Amirhossein Alamdar*, Elahe Zahiri, Soroush Vafaie Tabar, Alireza Alipanah, Nahal Mirzaei, Saeed Razavi, Amir Najafi, Mohammad Hossein Rohban
[arXiv] 📖
This repository provides a complete, runnable implementation of the paper "Navigating the MIL Trade-Off: Flexible Pooling for Whole Slide Image Classification." To reproduce the results presented in the paper, please follow each of the steps outlined below. Detailed explanations for each step are available in their respective README files.
- Requirements
- Download Each Dataset 📥
- Break Slides into Patches 🛠️
- Fold and Split Each Dataset 🔀
- Train SSL 🚀
- Extract Features ✨
- Train MIL Models 🏋️
- Citation
If you prefer not to train DINO from scratch, you can use the final weights or embeddings available here:
| Dataset | Embedder Weights | Embeddings |
|---|---|---|
| CAMELYON16 | weights | Embeddings 🌐 |
| CAMELYON17 | weights | Embeddings 🌟 |
| TCGA-LUNG | weights | Embeddings 💭 |
| SICAP-MIL | weights | Embeddings 🔍 |
Maxsoft pooling uses max pooling for the forward pass of Multiple Instance Learning (MIL) training, and the gradient of LSE (which is equivalent to Softmax) with a moderate temperature for the backward pass. This compensates for the non-differentiability of max pooling. For more details, please see Theorems 1 and 2 in the paper.
For any additional information or queries, feel free to reach out! Thank you for your interest in our work! 😊
This codebase is built upon the work of Snuffy, DINO, and CLAM. We extend our gratitude to the authors for their valuable contributions.
If you find our work helpful for your research, please consider giving a star to this repository and citing the following BibTeX entry.
@inproceedings{jafarinianavigating,
title={Navigating the MIL Trade-Off: Flexible Pooling for Whole Slide Image Classification},
author={Jafarinia, Hossein and Hamdi, Danial and Alamdar, Amirhossein and Zahiri, Elahe and Tabar, Soroush Vafaie and Alipanah, Alireza and Mirzaie, Nahal and Razavi, Saeed and Najafi, Amir and Rohban, Mohammad Hossein},
booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems}
}