Masked feature encoding improves pathology image analysis accuracy
Masked Feature Encoding for Large-Scale Whole Slide Image Representation
Computer Vision and Pattern Recognition
Summary
Analyzing large medical images of tissue slides is tricky because small parts can vary a lot due to lighting, stains, or scanners, which confuses computers trying to find disease patterns. The authors propose a new method called MFE-MIL that helps the computer focus on important signals by masking and reconstructing features in small image windows while also learning to classify. This method reduces distracting differences and improves accuracy in many existing slide analysis systems and datasets. Their approach does not rely on exact patch locations or complex preprocessing, making it simpler to use.
What this means in practice
- •For computational pathology teams: Improve whole slide image diagnostics by reducing noise from staining and scanner differences in patch-based cancer detection systems.
- •For medical image software developers: Integrate masked feature encoding into software pipelines to boost classification accuracy without extra coordinate or segmentation inputs.
Authors
Haoyu He, Basile Tessier-Cloutier, Yang Wang, Mahdi S. Hosseini
Abstract
Whole slide image (WSI) analysis in computational pathology follows a multiple instance learning (MIL) pipeline where patch embeddings are extracted independently and aggregated for slide-level prediction, but within-slide variance from staining, scanner, and local texture can overwhelm the discriminative signal. We propose Masked Feature Encoding for Multiple Instance Learning (MFE-MIL), a feature-space masking framework that trains a lightweight MLP adapter jointly with a window-based masked reconstruction branch and a MIL classification head. The two objectives are complementary. Classification guides the adapter to suppress within-slide patch variance, while window-based masked reconstruction provides an auxiliary regularizer for the adapted features without using patch coordinates, coordinate graphs, or segmentation preprocessing. The raster patch-extraction order is used only as a weak implicit prior. At inference, the decoder is removed, leaving only the adapter and MIL head. Across CAMELYON16/17, PANDA, and TCGA-BRCA with four diverse encoders, MFE-MIL improves ACC/F1 for nearly all tested aggregator-encoder settings and AUC in most, outperforms coordinate-based spatial methods (CAMIL), and achieves higher AUC than 2DMamba on three of four datasets (UNI). On five TCGA survival cohorts it improves the average concordance index for every aggregator tested, its most consistent gain. Code is available at https://github.com/AtlasAnalyticsLab/MFE-MIL.