\section{Experimental Setup}

\myparagraph{Datasets} We conduct our experiments on whole-slide images (WSIs) from multiple publicly available datasets from TCGA~\cite{tomczak2015review}: TCGA-NSCLC (Non–Small Cell Lung Cancer)  and TCGA-BRCA (Breast Invasive Carcinoma) for the binary subtyping task, TCGA-LUAD (Lung Adenocarcinoma) for TP53 mutation prediction, Camelyon16~\cite{bejnordi2017diagnostic} for binary metastasis detection in breast lymph node.

\myparagraph{Implementation Details}
Slides were processed using the same approach as in \cite{clam} to obtain patches of size 256x256 at 20x magnification. We use pre-extracted features with two different image encoders: \textbf{(i)} ResNet50 \cite{he2016deep} pre-trained on ImageNet \cite{ImageNet} and \textbf{(ii)} UNI-V1 \cite{chen2024uni} foundation model, to test performance in both in and out of domain pre-training. Please note that any other encoder could be integrated into our method. Experiments were conducted under five cross-validation settings for TCGA-NSCLC, TCGA-BRCA, and TCGA-LUAD using a learning rate of 0.0002. We used the originally published train-test split for Camelyon16 in three runs with a learning rate of 0.0002. All experiments were conducted using the Adam optimizer~\cite {adam2014method} with a maximum total of 150 epochs and an early stopping criterion of 50 epochs. 


