Anthony Bilic, Guangyu Sun, Ming Li, Md Sanzid Bin Hossain, Yu Tian, Wei Zhang, Laura Brattain, Dexter Hadley, Chen Chen
University of Central Florida
We propose Fourier Transform Multiple Instance Learning (FFT-MIL), a framework that augments MIL for WSI classification with a frequency-domain branch to provide compact global context. Low-frequency crops are extracted from WSIs via the Fast Fourier Transform and processed through a modular FFT-Block composed of convolutional layers and Min-Max normalization to mitigate the high variance of frequency data. The learned global frequency feature is fused with spatial patch features through lightweight integration strategies, enabling compatibility with a diverse set of MIL architectures.
conda create -n fftmil python=3.9
conda activate fftmil
pip install -r requirements.txt# FFT-MIL refers to the path of the top-level of this repository.
python FFT-MIL/dataset_setup/setup_data_dirs.py Expected file structure
/data/fftmil/
├── BRACS/
│ └── images/
├── LUAD/
│ └── images/
└── IMP/
└── images/
A. BRACS
cd /data/fftmil/BRACS/
wget --no-parent -r ftp://histoimage.na.icar.cnr.it/
python FFT-MIL/dataset_setup/move_bracs_images.pyB. LUAD
Manually download the Histopathology data to: /data/fftmil/LUAD/
python FFT-MIL/dataset_setup/move_luad_images.pyC. IMP
python FFT-MIL/dataset_setup/download_IMP.pycd FFT-MIL/CLAM/
python create_patches_fp_bracs.py
python create_patches_fp_luad.py
python create_patches_fp_imp.pycd FFT-MIL/CLAM/
python extract_features_fp_bracs.py
python extract_features_fp_imp.py
python extract_features_fp_luad.pycd FFT-MIL/ACMIL/
create_datasets_h5.pycd FFT-MIL/CLAM/
create_datasets_h5.pyNote: You can run multiple instances of each these files in parallel to speed up the process.
cd FFT-MIL/create_ffts/
create_bracs_fft.py
create_imp_fft.py
create_luad_fft.pyNote: Run each file from their DIRECTORY, where the <DATASET> corresponds to the dataset on which you wish to run the experiment.
| Method | DIRECTORY | FILE |
|---|---|---|
| CLAM | CLAM | train_clam_<DATASET>.py |
| CLAM (Ours) | CLAM | train_clam_<DATASET>_fft.py |
| MIL | CLAM | train_mil_<DATASET>.py |
| MIL (Ours) | CLAM | train_mil_<DATASET>_fft.py |
| Method | DIRECTORY | FILE |
|---|---|---|
| ABMIL | ACMIL | train_abmil_<DATASET>.py |
| ABMIL (Ours) | ACMIL | train_abmil_<DATASET>_fft.py |
| ACMIL | ACMIL | train_acmil_<DATASET>.py |
| ACMIL (Ours) | ACMIL | train_acmil_<DATASET>_fft.py |
| IBMIL | ACMIL | train_ibmil_<DATASET>.py |
| IBMIL (Ours) | ACMIL | train_ibmil_<DATASET>_fft.py |
| Method | DIRECTORY | FILE |
|---|---|---|
| ABMIL | DGR | train_abmil_<DATASET>.py |
| ABMIL (Ours) | DGR | train_abmil_<DATASET>_fft.py |
| ILRA | DGR | train_ilra_<DATASET>.py |
| ILRA (Ours) | DGR | train_ilra_<DATASET>_fft.py |
For example, to run the CLAM method on the BRACS dataset, you would run:
cd FFT-MIL/CLAM/
python train_clam_BRACS.pyThis repository incorporates code from the following papers.
- Data Efficient and Weakly Supervised Computational Pathology on Whole Slide Images (CLAM)
- Attention-Challenging Multiple Instance Learning for Whole Slide Image Classification (ACMIL)
- Exploring Diverse Global Representation in Multiple Instance Learning for Whole Slide Image Classification (DGR-MIL)
Researchers seeking to build upon this work can consult discussion.zip for additional context, including methodological notes, limitations, and potential avenues for future research.
If you find this work useful, please cite:
@misc{bilic2025fouriertransformmultipleinstance,
title={Fourier Transform Multiple Instance Learning for Whole Slide Image Classification},
author={Anthony Bilic and Guangyu Sun and Ming Li and Md Sanzid Bin Hossain and Yu Tian and Wei Zhang and Laura Brattain and Dexter Hadley and Chen Chen},
year={2025},
eprint={2510.15138},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2510.15138}
}