‌Navigating the MIL Trade-Off: Flexible Pooling for Whole Slide Image Classification
Authors: Hossein Jafarinia
Danial Hamdi
Amirhossein Alamdar
Elahe Zahiri
Soroush Vafaie Tabar
Alireza Alipanah
Nahal Mirzaie
Saeed Razavi
Amir Najafi
Mohammad Hossein Rohban
Venue: NeurIPS 2025 poster ()
Keywords: Whole Slide Image
Self-Supervised Learning
Multiple Instance Learning
Data Augmentation
Primary area: machine_learning_for_sciences

Abstract: Multiple Instance Learning (MIL) is a standard weakly supervised approach for Whole Slide Image (WSI) classification, where performance hinges on both feature representation and MIL pooling strategies. Recent research has predominantly focused on Transformer-based architectures adapted for WSIs. However, we argue that this trend faces a fundamental limitation: data scarcity. In typical settings, Transformer models yield only marginal gains without access to large-scale datasets—resources that are virtually inaccessible to all but a few well-funded research labs. Motivated by this, we revisit simple, non-attention MIL with unsupervised slide features and analyze temperature-$\beta$-controlled log-sum-exp (LSE) pooling. For slides partitioned into $N$ patches, we theoretically show that LSE has a smooth transition at a critical $\beta_{\mathrm{crit}}=\mathcal{O}(\log N)$ threshold, interpolating between mean-like aggregation (stable, better generalization but less sensitive) and max-like aggregation (more sensitive but looser generalization bounds). Grounded in this analysis, we introduce Maxsoft—a novel MIL pooling function that enables flexible control over this trade-off, allowing adaptation to specific tasks and datasets. To further tackle real-world deployment challenges such as specimen heterogeneity, we propose PerPatch augmentation—a simple yet effective technique that enhances model robustness. Empirically, Maxsoft achieves state-of-the-art performance in low-data regimes across four major benchmarks (CAMELYON16, CAMELYON17, TCGA-Lung, and SICAP-MIL), often matching or surpassing large-scale foundation models. When combined with PerPatch augmentation, this performance is further improved through increased robustness. Code is available at \href{https://github.com/jafarinia/maxsoft}{\texttt{https://github.com/jafarinia/maxsoft}}

Navigating the MIL Trade-Off: Flexible Pooling for Whole Slide Image Classification
Hossein Jafarinia', Danial ; Amirhossein Alamdar'; Elahe Zahiri² Soroush Vafaie Tabar', Alireza Alipanah' , Nahal Mirzaie', Saeed Razavi'
Amir Najafi' I Mohammad Hossein Rohban'
Computer Engineering Department, Sharif University of Technology 2 Department of Mathematical Sciences, Sharif University of Technology
{jafarinia, amirhossein alamdar,
soroush. vafaie96, alireza. alipanah46, nahal.mirzai saeed. razavi, amir majaffi, Asharif. edu danial hamdi@outtook.coo
Abstract
Multiple Instance Learning (MIL) is a standard weakly supervised approach for Whole Slide Image (WSI) classification, where performance hinges both feature representation and MIL pooling strategies. Recent research has predominantly focused on Transformer-based architectures adapted for WSIs. However, we argue that this trend faces a fundamental limitation: data scarcity. In typical set- tings, Transformer models yield only marginal gains without access to large-scale datasets-reseeeee resources that are virtually inaccessible to all but a few well-funded research labs. Motivated by this, we revisit simple, non-attention MIL with unsu- pervised slide features and analyze pooling. For slides partitioned into N patches, we theoretically show that LSE has smooth transition at critical Seri = O N) threshold, interpolating between mean-like aggregation (stable, better generalization but less sensitive) and max-like aggregation (more sensitive but looser generalization bounds). Grounded in this analysis, we introduce Maxsoft novel MII. pooling function that en- ables flexible control over this trade-off, allowing adaptation to specific tasks and datasets. To further tackle real-world deployment challenges such as specimen het- erogeneity, we propose PerPatch augmentation-2 simple effective technique that enhances model robustness. Empirically, Maxsoft achieves state-of-the-un performance in low-data regimes across four major benchmarks (CAMELYON 16, CAMELYON17, TCGA-Lung, and SICAP-MIL). often matching or surpassing large-scale foundation models. When combined with PerPatch augmentation, this performance is further improved through increased robustness. Code is available at https: http///tttttt///////////e com/ aufariniammin mmaasooft
log-sum-exp (LSE)
Introduction
Whole Slide Image (WSD) analysis using machine learning holds significant promise for supporting the complex and labor-intensive workflow of pathologists [1-3]. However, the extremely large and variable size of WyIs-typically on the order of 150,000 150,000 pixels-render the direct application of standard computer vision models, such as Vision Transformers (ViTs) [4], infeasible. The prevailing solution is divide WSIs into smaller patches and apply weakly supervised framework known as Multiple Instance Learning (MIL). MIL enables joint modeling of slide-level and patch-level predictions by decomposing the task into patch- representation encoder followed by pooling function that aggregates patch features for WSI-level classification [5, 6).
"qqual contribution.
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

Following the success of the attention mechanism [7] and the introduction of the Transformer architecture [8], attention-based methods such as ABMIL were adopted in the context of pathology MII,, leading to modest performance gains [5]. In parallel, the introduction of self self-superviied learning (eggni-b with SimCLR [9] and its application in DSMIL [10]-enabled training of encoders from scratch on domain-specift patches, resulting in substantial improvements. Since then, much of the research has centered on pairing powerful SSL-trained encoders with increasingly complex connsformr-bbaeed architectures to push state-of-the- -ftt--rrr-tttttttee (SoTA). However, these works often lack thorough analysis of performance attribution and frequently credit improvements to architectural complexity without sufficient empirical justification [11-16].
In this paper. we demonstrate that Transformer-bes based MIL methods yield only marginal gains in low-data settings (Figure 3), and once a strong representation encoder is in place, Transformer architectures offer little to no added benefit (see Tables and when the Encoder Prov-Gig nrov-GigaPath [17]). Drawing on our comprehensive encoder experiments in Tables 1 and 3 and the data-qua data-quality analysis in Appendix N. we attribute this effect to their well-documented reliance on large-scald scale training data [4, 15, 18-31]. Unfortunately, most publicly available WSI datasets are relatively small [18, 19]. comprising only a few hundred to a few tens of thousands of slides--inuuffiient for Transformer training (WSI-level, not patch-level). To our knowledge, the largest existing dataset contains approximately 200,000 WSIs [17], is not publicly accessible, and is still arguably too small for training Transformer models. Moreover, the computational resources required to process such datasets are concentrated in a few well-resoureed laboratories, making this direction impractical for most groups working on WSI classification.
This motivates a reconsideration of classical (non-attention-basse) MIL. pooling strategies such as max pooling and mean pooling. In particular, we analyze log-sum-exp (LSE) pooling, a pnteraturr-ppraamtteiieee function:
N
log 1
(4 IN
S4:
defined for real-valued inputs Qi...., QN with an adjustable parameter 3 2 0 (inverse temperature). The LSE function smoothly interpolates between mean and max behavior: when 3 < 1. it approxi- mates the mean; when 3 >>>>> 1, it approaches the maximum. Through a combination of theoretical and empirical analyses, we observe smooth phase transitions in model behavior as 3 crosses a critical threshold of order (log N). where N denotes the number of patches. In the small-3 regime (i.e.. B < Olog N)), the model exhibits improved generalization but reduced sensitivity (see Theorem 1). In contrast, in the large-8 regime (i.e., B >> (log N)), sensitivity increases the cost of looser generalization bounds (see Theorem 2) and less stable training. This trade-off reveals form of Pureto optimality in the temperature parameter, enabling task-specific tuning to balance generaliza- tion and sensitivity. Additionally, while max pooling aligns well with the MIL inductive bias, its non-differentiability and high gradient variance make it challenging to optimize, often resulting in unwanted test-time performance fluctuations (see Tables 1 and 3).
Motivated by these observations and insights from Backward Pass Differentiable Approximation (BPDA) [32], we propose Maxsoft pooling-a novel MIL pooling strategy that applies LSE with oo (i.e., max) during the forward pass, and the gradient of LSE with moderate 3 during the backward pass. Conceptually, this hard forddddrwwrd/soft- srrward/sftt-bcckward backward design is closely related to straight- through estimators [33] (e.g.. Frraigh--Throueee optimization stability. generalization, and inference-tine sensitivity. Across four major pathology datasets and five standard MIL benchmarks, Maxsoft consistently demonstrates strong performance. On the challenging CAMELYON17 dataset [35], we achieve WSI-level AUC of 1 1.0 and a patch-level AUC of 0.93 to our knowledge, the best reported results to date in WSI classification.
Cuumbel-Softaal [34]. This design improves
From a different perspective, real-world deployment presents challenges such as staining variability, artifacts introduced during slide preparation, and acquisition noise. To enhance robustness under these conditions, we explored data augmentation strategies that reflect such clinically relevant variations. We found that previously proposed WSI-specific augmentations offer negligible or no benefit, as they fail to introduce meaningful or diverse transformations. To address this, we also introduce PerPatch augmentation-a simple yet previously unexplored technique that leverages the inherent letel granularity of WSIs to increase training diversity in MIL. We observed that combining PerPatch with existing methodologies further improves results in a measurable and consistent manner, and also reduces performance fluctuations.
2

---

In summary, our main contributions are:
A theoretical and empirical analysis of LSE pooling, motivated by its ability to interpolate between max and mean behaviors through tunable temperature parameter. In particular, we establish several smooth and competing phase transitions in model behavior, revealing trade-offs between generalization and sensitivity.
The introduction of Maxsoft, novel MII. pooling method derived from our analysis, which demonstrates strong performance, especially low-data regimes.
The proposal of PerPatch augmentation, a simple yet effective data augmentation strategy that leverages the patch-level structure of WSIs to substantially increase data diversity and yield measurable performance improvements.
2 Related Work
2.1 Transformer-based Architectures
Motivated by the success of the attention mechanism [7], the Transformer architecture [8], and biological insights suggesting that spatial relationships between regions in a WSI influence diagnostic outcomes, recent work has predominantly focused on Transformer-based MIL pooling architectures to capture inter-patch dependencies. WSIs typically consist of large number of patches (e.g.. around 20,000 per slide), making the naive application of self-attention- ity ity-infeasible due to prohibitive GPU memory requirements. Among these approaches, ABMIL [5] was the first to introduce attention mechanisms in this context, while DSMIL [10] and Snuffy [15]
its O(N2) complex-
proposed sparse self-attention variants. Notably, Snuffy provided theoretical justification that their sparse attention mechanism can approximate full self-attention under certain conditions [15].
Beyond Transformers, there are graph-base based methods, which are hampered by graph construction and nucleus segmentation, and many graph- hybrids collapse self- eeff-attention effectively Transformer MIL (e.g., GTP) [13, 36-39] and prototype-basee approaches, which are also emerging and are sometimes not strietly MIL (e.g., PANTHER) [40, 41].
2.2 Classical MIL Pooling Functions
In addition and mean, several other pooling functions have been used, such noisy-or [42] (any single cause), noisy-and [43] (sufficient proportion of causes), Integrated Segmentation and Recognition (ISR) [44] smooth OR with evidence accumulation), and smooth approximations to max/mean such as LSE [45], generalized mean (GM), and smoothmax [46].
2.3 Pathology Foundation Models
Recent efforts to develop Foundation Models pathology [17, 47-49] have largely focused on training representation encoders using massive numbers of patches extracted from as many WSIs as possible. For instance, UNI [47] is trained on 100 million patches, while Prov-GigaPath [17] uses 1.3 billion patches from 200,000 WSls-both based DINOv2 [50]. These approaches yield highly robust encoders that can boost performance across various MIL pooling strategies. However, building such models faces key challenges: limited public data, high computational cost, lack of flexibility compared to generative foundation models like LLMs [51, 52], and sensitivity to training errors such as poor hyperparameter choices. Consequently, progress remains confined to few well-resoureed labs. Complementing these efforts, the recently proposed RºT-MIL targets foundation model-level performance in low-data regimes via online feature re-embedding during MIL pooling training.
2.4 Augmentation Methods
WSI-level Augmentation modifies slide-level representations by selecting fixed number of repre- sentative patches, inspired by Mixup [53] and Mask Augmentation [54]. Methods such as ReMix [55], RankMix [56], PseMix [19], MixupMII. [57], and Attention-Guided Mixup [58] apply vari- ous mixing strategies after aggressive patch downsampling (e.g., using centroids, ranked attention scores, pscudo-bags). This leads to substantial information loss and degraded performance, often

---

requiring
distillation for limited gains (see Tables and 4). Additionally, many such augmentations lack realism.
Patch-level Augmentation methods apply standard image transformations- such as random rotation, color jitter, and Saraattooyyi------nAAAAAAA (HED) jitter-directly patches prior to feature extraction. These augmentations are typically inspired by patch classification research [59, 60]. To increase efficiency, EMBAUGMEETERR [61] and AugDiff [62] employ latent generative models simulate augmented patch representations during MIL training. SSRDL [63] builds on this by introducing a DINO-based [64] framework that performs online sampling from learned distribution of augmented features and reuses parts of the model during MIL pooling training. While these methods improve efficiency and robustness, they often suffer from limited diversity-e.g. applying the same aug- mentation uniformly across patches especially in SSRDI., where the specific form of augmentation is not directly observable.
AugDiff) and and reduced interpretability.
3 Background: MIL Formulation
In a binary image classification setting, the dataset D = {(11 v....... (In: Bn)} consists of im- ages (or equivalently bags of patches) I, where each bag I, (x() i ..... X x contains N corresponding instances. Each bag label y/ E {0, is determined by its individual instance la- (t), bels {ul") UN J. where Vj {), are unknown during training. Under the standard MIL. assumption, we have
y1 (L,
if E 50 -0)==
fu/ Vi = =i 5-1...,N
max
otherwise,
Thus, bag 4 is labeled positive if at least one of its instances is labeled positive; otherwise, it is labeled negative. The MIL model trained by optimizing the log-likelihood function:
P(yl2) - ~=1))-
where ((T) (())= (X,, Xx) E [0. 1] represents the predicted probability of (y = 1) given the bag T. Since MIL assumes ordering or dependency among instances, ((T) must be a permutation- invariant function. This is ensured by the fundamental theorem of functrieeuunctions with monomials [65] and similar result by [66], which states that for any permutation-invarie function & satisfying Hausdorff continuity, there exist functions &i and Φ
I. + R, and a -ivvariiinnnnnniia function
T: RV
R such that
(1) Here, té and & are continuous transformations, and и is cermmutaiioninvariiin function (such as sum or max). MIL. methods typically follow two primary approaches: i) Instance-level approach, where d is an instance classifier and + is the identity function. ii) Embedding-level approach, where z is a feature extractor, and & maps the extracted features to a bag classification score.
( - (T(((( ().... + X N)))
In Deep MIL, & typically uses pre-trained vision backbones to extract features from bag instances [10-12, 15, 18, 67, 68). The aggregation function ranges from non-parametric methods like max pooling to parametric ones like attention mechanisms. as detailed in Section 2.1. For multi-class and multi-task classification, d's output dimension is adjusted to the number of classes [69-71].
4
Our Method
While SoTA MIL pooling architectures focus on embedding-level methods, this work emphasizes instance-level approaches. In clinical practice, pathologists prioritize patch-level predictions as they allow validation of the model's reasoning. As a result, instance-leve methods offer full interpretability. Although max pooling and mean pooling can be applied at both embedding and instance levels, focus exclusively on their instance-leva variants throughout this work (i.e., + in (1) is identity).
We begin by following the standard MIL pooling procedure: each image in D is divided into N non-overlapping patches X, XI...., X N- We model the function (b-) in (1) by passing each patch through fixed, pre-trained VIT, followed by trainable fully-connected MLP, and concluding with sigmoid function in order to compute qi A (Xx,) E 0, for = -,...,, N (see Section 5 for more details). The next subsection establishes theoretical foundation for the trade-offs associated with the choice of aggregation function (-).

---

4.1 Theoretical Analysis
Assume, instead of the standard max/mean pooling, we choose soft LSE, function for IT-) in (1). We theoretically demonstrate that smaller values of β generally lead to better generalization and more stable training process. Conversely, larger values of are more suitable for reducing training error and increasing the model's sensitivity in weal-world scenarios, where only a few patches may contain malignant patterns, and the model must detect and respond to them effectively. A full version of this section is provided in Appendix A, with summary of informal results here: Theorem (Informal) Effect of B3 on Generalization Error). Assuming mild conditions- as Lipschitz continuity of the loss function, i.i.d. sampling of images in datasel D, and local statistical dependence umong image patches-we show that the generalization error undergoes smooth phase transition as B increases from below (log N) to above. In the small-3 regime, the generalization gap can be bounded as O ((nN)- 1/2 + n )),, while in the large-B regime, it can be as large as Ω (12).
The formal version of this theorem (Theorem 4), including precise bounds, threshold conditions, and constants, is provided in Appendix A, along with a complete proof. Next, we focus on sensitivity analysis. Notably, in contrast to generalization which favors smaller values of | hiihhhhhhhhh sensitivity in noisy regimes requires sufficiently large B.
Theorem 2 ((Informal) Effect of 3 on True Positive False Negative Rate). Assume general statistical model for the distribution of ()(x;) )) on each patch, and suppose the number of cancer- indicative patches (i.e., patches exhibiting malignant patterns) is, with high probability, substantially smaller than N. Then, for any
(0,1), 1), ), if B 2 O (log (N/a)). the true positive rate of classifier L ((1(()))..... x/( X )) is at least 1 a. Conversely, if 3 remuins O(1) with respect to N, the false negative rate is at least 1/2.
Again, the formal version of this theorem (Theorem 6), along with a complete proof and further explanations, is provided in Appendix A. Specifically, we show that choosing 3 >> O(log N) is both necessary and sufficient to achieve a high true positive rate and to mitigate false negatives. The key conclusion of this section is that all values of 3 (0, +00) are Pareto-optimal: depending assect-ggnneralizatti generalization or sensitivity- is prioritized. and how the trade-off is weighted, the optimal choice of B will vary. This insight supports the central idea behind our method: using smaller values of B during training to promote generalization, while selecting larger values (possibly even oo) at inference time to enhance sensitivity.
which
4.2 Maxsoft pooling
High gradient variance can lead to instability during training, slowing convergence and requiring more iterations to reach a desired accuracy [72-74]. Thus, reducing variance improves stability, enhances generalization, and promotes more reliable learning dynamics [75-77]. This underscores the need to regulate gradient variance to balance stability with effective optimization. max pooling and mean pooling, the two dominant MIL pooling strategies, represent opposite ends of this spectrum: max pooling excels in instance discrimination but suffers from instability and worse generalization due to its non non-smooth, non-diffen differentiable nature, while mean pooling stable, fully differentiable, and robust for bag classification but weaker at distinguishing instances. We provide unified theoretical explanation for these trade-offs in Section 4.1.
Leveraging this insight, we introduce Maxsoft pooling (see Figure 1), novel strategy that combines the stability and smoothness of mean pooling with the diseriminative power of max pooling. In the forward pass, we use LSE (Q1:N) )= max; qi, while in the backward pass we approximate the gradient of the max operator by VLSE, (gI.N) for some moderate 3 < co. For more details on the learning procedure, see Algorithm 1. Maxsoft pooling retains the exact behavior of max pooling during the forward pass, but employs a differentiable function in the backward pass by replacing the max operator with the LSE. This ensures smoother gradient computation, improved stability, and reduced generalization gap (see [32], and Theorem 1).
4.3 PerPatch Augmentation
Existing WSI-level augmentation methods, as outlined in Section 2.4, often yield marginal gains or even degrade performance [19, 55, 62, 63]. Therefore, we shift focus to patch-level augmentation.
5

---

MIL
Encoder
Patches
LSB
Masofi
do MI. Pxoling
MIL Pooling
Represetations
Patch Scoees
WSI Score
Figure 1: Overview of MIL (a) The WSIs are segmented into patches, followed by embedding extraction via pre-trained encoder. (b) Embeddings are fed into MIL pooling for patch, (c) mean, max, LSE, and Maxsoft with their respective forward and backward behaviors.
which introduces more meaningful variability. Latent generative models [61, 62] add computational overhead without consistent benefits (Tables 2, 4). Instead, we precompute multiple augmented versions of each patch and employ the PerPatch sampling strategy, enabling substantial increase in WSI diversity during MII. pooling training.
PerPatch augmentation differs from PerSlide by sampling each patch independently- from its original version one of its augmented variants-insted of applying the same augmentation transformation across all patches in a single WSI (see Figure 5). Specifically, given WSI /, we
generate multiple augmented variants ((k) {x x+()), ), A: 0, ....: m, where 7(0) the original WSI and m denotes the number of augmentations. We then construct an augmented
WSI by independently sampling each patch from its available versions: = ( X N) with X, = x
Uniform( 1,,. .......). Thus, each patch X, is independently sampled from either the original version (A: = 0) or one of its m augmented variants (1 S S m). For a visual and procedural comparison between PerSlide and PerPatch augmentations, refer to Figure 5 and Algorithms and 3. We argue that PerPatch creates significantly more diverse augmentations during MIL pooling training compared PerSlide, and this may explain why the method consistently improves results, as shown in Tables 2 and 4.
Experiments and Results
Our major experiments are on major WSI classification datasets. Analyses of classical MIL pooling functions are in Appendix O. Although out-of-distribution (OOD) generalization is beyond our scope, we include such experiments in Appendix Q. We also evaluate on five canonical MIL datasets, reported in Appendix R.
5.1 Datasets
We evaluate on four large-scale pathology WSI datasets-CAMELLYYR Lung and SICAP-MIL [78, 35, 79, 80]. CAMELYON16 contains 270 training 129 test slides; CAMELYON17 has 1,000 slides across four tumor-type labels (normal, macro, micro, ITC); TCGA- Lung spans 1,042 slides split between LUAD and LUSC: SICAP-MIL comprises 349 slides with normal/abnormal labels and primary/secondary Gleason grades. Further dataset statistics and split protocols are given in Appendix E.
CAMELYON17, TCGA-
5.2 Experimental Setup
All WSIs are tiled into 256 256 patches at 20x magnification, discarding background. For CAME- LYON16 use the official split; CAMELYONI7, TCGA-Lung and SICAP-MIL are each partitioned

---

into 60% train, 15% val, 25% test (with SICAP-MIL's official split). Details on train/val/test alloca- tions and tiling thresholds appear in Appendix F.
5.3 Evaluation Metries
We report slide-level AUC and accuracy, patch-level AUC and F1 (omitting patch accuracy due to class imbalance). plus F1 and Expected Calibration Error (ECE) assess confidence calibration in cancer detection. Formal definitions and details for ECE are in Appendix G.
5.4 Models and Implementation Details
Encoders: We compare domain-specific and natural-image backbones including DINO Domain (ViT-S/16) trained on around a few million in-domain patches, DINO Natural (ViT-S/16) [64] pre- trained on ImageNet- IKK UNI (ViT-L/16) [47] with 100 million pathology patches, Prov-GigaPath (ViT-G/14) [17] with 1.3 billion patches, ResNet-50 [81] pre-trained on ImageNet-IK, PLIP [82]. CLIP-based model fine-tuned on around 208 thousand text-annotated pathology patches, and SSRDL-trained ViTs [63] via its Representation Augmentation Module on domain patches.
MIL-Pooling: We evaluate max, mean, LSE, ABMIL [5], DSMIL [10], Snuffy [15], R [16] and our Maxsoft.
Miscellancous:
For completeness, we also evaluate GTP [37] and PANTHER [41] as non-MIL WSI
classifiers.
We compare standard WSI-level wistlines-with basic augmentations and simple per-slide transforms (Random Rotation, Gaussian Blur, and Color Jitter; see Appendix I)-and prior augmentation strategies (ReMix [55], RankMix [56], AugDiff [62], and SSRDL's latent augmenta- tions [63]) against PerPatch, our patch-level method. Hyperparameters, optimizer settings, learning rates, and batch sizes are provided in Appendix H.
Augmentations:
5.5 Results and Analysis
Across all datasets, stronger encoders yield better performance: DINO Natural DINO Domain UNI < Prov-GigaPath. With Prov-Gigal GigaPatt,,,, every MIL pooling strategy attains high scores (Tables and 3). For visualizations of the resulting representations, see Appendix
Max pooling shows high variability, whereas mean pooling offers lower variance and on average better generalization. Guided by theoretical analysis, we select B via validation: B 5 for CAMELYON16/17, 3 = 10 for TCGA-Lung, and / = 3.5 for SICAP-MIL. This choice reflects the datasets' characteristics- sparser positives in CAMELYON demand higher sensitivity, while more frequent positives in TCGA-Lung and SICAP-MIL favor generalization.
LSE matches outperforms both Transformer-based and non-Trame Son-Transforme--baae methods (ABMIL, DSMIL, Snuffy, R"T-MIL, GTP, and PANTHER) despite its simplicity. Maxsoft attains the highest overall performance and substantially lower variance than pooling, validating the use of B = in the forward pass with a moderate 8 for gradients. These results indicate that, at current WSI dataset sizes, encoder quality dominates architectural complexity and attention-based pooling yields limited gains.
On augmentation (Tables 2 and 4), PerSlide yields inconsistent negative effects, whereas PerPatch uniformly reduces variance and often improves accuracy, indicating robustness. WSI-level methods like ReMix and RankMix underperform due to aggressive patch downsampling and because DINO [64] embeddings lack intpennttationnnepplllttee
consistency between the image and feature spaces. Among prior approaches, only AugDiff and, at times, SSRDL show improvements-iie likely because, despite the issues above, they still produce diverse, non non-redundant feature augmentations. SSRDL [63] offers some gains TCGA-Lung but at high cost, since each new augmentation requires retraining self-super model from scratch. Overall, PerPatch delivers the largest gains through richer, more varied augmentations. For analysis of special cases, Appendix L.2.
Notably, Maxsoft with DINO Domain surpasses Prov-GigaPath in accuracy while requiring 0.001 x less computation and having 0.0026x fewer parameters. In terms of augmentation speed, AugDiff is

---

(b)
(c)
(d)
Figure 2: Overview of ROIs through patch classification on (a) sample WSI from CAMELYON17 by (b) max pooling, (c) mean pooling, and (d) Maxsoft pooling, The cancerous area is specified with a black border. Mean pooling is classifying most of the WSI as cancerous incorrectly.
prohibitively slow due to its multi-step diffusion, a limitation not addressed in the original work. For a detailed analysis of special cases, see Appendix L.I.
Finally, for patch-level classification and localization, simple instance-level pooling methods outper- form SoTA embedding-level schitectures-excepp Snuffy- underscrrnn the advantage of direct patch-wise aggregation. For qualitative comparison, see Figures 2 and 8.
Table 1: Results of MIL pooling methods CAMELYON16 and CAMELYON17 [78, 35], reported as mean snd for performance metrics. Times are given as pre-training (days) / MII. training (minutes).
Niteed
YAVELYONIE
CAMELION
ABC
ABC
(1000
1:40
6114
3,50gm
1.10.00
0.157.mm
4.53
699t
0131
131700
Seatt
6.55m
042
3586/3
15
155
1174K2
LA0 podiag
6338
0447
15 10001/01
T1LL
1.3m
19
665
0381
1.05
7:113
peripeiing Eng
mm77m
mm
0141
0000
mm
355
177
085
0.05
1.55
1.512.300
AUNIL
6533
0172
L16:1235
mm
105/3913
DOMEL
8333
0756
0521
013ien
1.7
68532
1.53
158
022
023
1500
155 14
ml
075
187
1.67.
655
0380
137000.1
1128
1.020
1012
1.6.
148.
1:0
2010
-1181
115
143m
1.0
-127
0388
0581
-1253
3051
1,000
mm
4.07mm
1000
1.6m
140
CIP
-201
135
130.0
052
1770
1.00
-1186
18811
135m
6477.r
470
6512m:
m.
12
16236/136
15.1
183
1800m
14296:24
ABNIL
a18mm
103
5600
16036/443
26131
1977.
168
430mm
74 003002633
2013
197.
197.3
650
16636/93
2501794
8.1
1.0
198.m
638
(10)
NA/N
01000
1162
647
10236/135
119139
1000
108
6784
1101955
676
(417
-1490
213807
1.7
144.0
-0.34
213817
ROVTHE
6107
0118
18:41
00000
038
(9180
667
Ablation Study
We first compare representative Transformer-baseee and classical methods across varying dataset sizes, then analyze Maxsoft by isolating the contribution of its key components to WSI- and patch-level performance.
Dataset size. Figure reports results on SICAP-MIL for both Transformer- baasedd based and classical MIL pooling under different numbers of training WSIs. These findings indicate that, given current data scales, Transformer architectures offer no clear benefit. Notably, fine-tuning the Transformer-based Prov-GigaPath pre-rrrerai on roughly 200,000 WSIs does not provide meaningful gains, highlighting the data inefficiency and limited practicality of complex, data-hungry approaches in this setting.
8

---

Table 2: Results of augmentation methods on CA and CAMELYON17 [78, 35], reported as mean sid for performance metrics. Times are given as MIL training (hours).
Methol
Slak:
Psddi
Receast
Sldc
Poct
Rosaac
ALC
ABC
F1
BCB
ALC
P1
Tirsc
ALC
ABC
F1
BCE
AUC
F1
"Iine
No Aug
0.833 ms
0,58
0.068.c:
3,010
(.92)
0.04%
0.068 es
3,807 um
0.90kunz
0.131xa
0.500us
ReMix
0,807a
0.100us
0.334 mc
0.524
0.798 am
0.345x11
RaskMii
0.55km
0.000mm
0.234
Aughher
m/
6.8mmm
0.7
0.77
0.830
2.332
Table 3: Results of MIL pooling methods on TCGA-Lung and SICAP-MIL [79, 80), reported as mean, std for performance metries. Times are given as pre-training (days) / MIL training (minutes).
Enooker
Mrited
TOGA-Jing
SECAP-MII
Slide
Reseence
Slide
Reseuree
ADC
ACC
F1
ECB
Tiese
dPares
ADC
ADC
BCF
Timee
iPaiate
mas pooking
01801
0:8:3aex
15.03/M122
265-
[1:020
11708
0.770um
0.300
16.0511.136
1355
Iscas pooting
0.507
0.795
0,758kmm
0,076
16.0/77 133
355
0.500
0.745
0.757
0.331
36,66/1.21
1355
DINO Natend
ABMIL
g0800
0.291
0.501
18.00/919.44 94
99674
0.770
0.732
0.230
10.00/11.70
555312
DSMI
e187
0.803am
0.000
16.00/002
01267
0.538
0.327
16 14
0.785vo
0.512
0.765
0.100
16.06/3.31
1777340
LSS pooling
cm
Masudil pooling
0.802.00
0.80 pv
0,809
10:06/174177
74113
0.844
0.02
0.781
6.188
10.00/2.568
T6279
mas gooding
vm
7/3/0
mm
cs
0:51/1
rsce poolicg
vo
0,363,00
6.344,0
7.01/8.00
365
0.500 ms
0.747 PM
6.179az
0.54/1.19
LIEG
DIND Danan
AUNIL
11879pm
0,88
7.33/611
0.00 c/
0.31/3312 M0
DSMIL
0.553
0.033 m1
7:18/630.99 99
66262
0.55 mx
0.7 mm
0.757
0.162 m
0.51/3120
TOU36
Seafly
0,905
0,582
0.108
7.18211224
1770012
[U57
1.290
0.798uz
0.54/23775
3777542
CTP
01000
0:321
7:13/00
131355
0.507
0.56
c m
0.51255.0
131100
LSE pooling
0.500
0.8
0,954
0
7.18/00.114
74113
0.500
0.995
0.758
6.258
0.54/1.077 L077
T4439
Macadi
0.900.00
0.885,mm
60004
7.35/17.046
24113
0.800
0.808.mm
0.34/2299
14289
Ina pooling
0.54
0.158 0,353
/11.015
1025
0,502
0.841
0,838
0.168 ms
-1.8
307G
mEEs postiar
0.661 gu
0.80
0,392
1125
0344
0.74220
-/1.200
3315
ARMI
0.86
0.357
-710077 11
NG3554
0.33
0:920
DSMIL
0.875xu
0.068 112
10765
6.174x6
(16.78
10300)
Seafly
as
12001322
-/4.181
GTP
0.168 0,87
122101
0.71 mm
0.67
0:571a al
-7767
172405 1
L.SE pooling
y4
0,873aua
0:138aus
-10 020
055113
0.570 mm
0.87
-71.719
Macadi posling
0.042 am
0:882 sss
0.585 o84
125115
0.877 am
0.541
0.142 ve4
/8.129
026620
mas peolicg
0.000 as
0.500um
0.308
J52 11:001
1817
8:700
0.207 as
6.243u0
152.86/1.345
4621
meas pooling
(1917 om
0.867.m:
0:310
18236118318
1507
8.0 mn
0.707 on
0.738mm
167.50/2.00
1337
AUMIL
(1009 on
0.310
30013
0.701 m
0.223 cm
0.833
133.36/555-
41
DSMIL
0.607 ox
0.000vm
0.9:3ae>
0.866mm
182.66/9000.08 500
216328
0.33 m
0.878
0:177
158.56//33.22
24
211146
Seafly
0:000 a155i
0.304per
J52 .62.4//9..887
38377846
IL790 m
1L779 um
0.728um.
0:229.00
152.56/7 5442
26145814
GTP
0:786
0.51).ai
0.700)
163 /83.38/299/8
309033
0.87
0.01
0.509
0-316
1011300 02/227
LSE poiling
a.500
0.805
0,9:3nm:
0,100
362 26725777
1151185
p,500
0.798
0.758
0.218
168.76/1.812
1182725
Macadi
0.905
g.9224
0.054.m3
J82 26/29.99
115/180
0.82.am
0.305
0.372
152.28/1.812
1182725
x R'T-MLL
0.929
0.865
0,859
0.158
/28.017
203000
0.554
0.823
0.738pu
0,168
/4.77
2001167
R-T-MLL
0,801
0,358
0.100)
/24/252
2434817
0,822
0,713
0.734
0,252
(4.001
2453845
7 PANTHER
0.854
0.115
-/50.13 13
63070
0.766
0.33
0.055
0.115
01
16335
Table 4: Results of augmentation methods on TCGA-Lung and SICAP-MIL [79, 80), reported as mean std for performance metrics. Times are given as MIL training (hours).
Augmestation
TOGA-Lung
SICAP-MIL
Methool
Slido
Resourve
Slide
Resounce
ACC
BCE
Time
ALCC
ACC
F1
No Aug
0.940 mo
9.885 our
0.504 oia
0.064 um
0.29h
0.850 ml)
0.50S ass
0.796
0.211
0.05h
Maxsofl pooling
ReMix
0.900,
0.565 cos
01.500.m
n.061 ozz
8.256
0,819 ugs
0.814
0.772
0.180
0.13h
RankMix
0.905..co
0.855 con
0.680..c oot
0.006 oz)
3.64
0.845
0.816 os
0.782
0.280
0.07h
DugDif
0.9344,07
0.812
0.856 not
0.136 012
527A
0.818
0.787 013
0.778
0.180
SSRDI
0.3444,004
0. 0.806 0.834.gus
0.116.
84.5A
0.838 022
0. 7.708
0,7888
0. 0.161,003 oo0
4h
PerSlide
0.908.coc
0.877.cos
0.805..o0
ou:
14h
0.857 ooom
0.705 oos
0.802 a1a
0.198
PerPatch
0. 9:44 pu1
0.876
0.904 201
0.051 .012
15A
0.827
0.705
0.767
0.223
0.21A
Effect of ( in LSE pooling. We assess the sensitivity of the LSE pooling operation to the temperature parameter 8, evaluating values in the range {0.5. 2,5, 5, 7.5, 10). As shown in Figure 4, lower | values approximate mean pooling behavior, while higher values approach max pooling. The results indicate a trade-off:: smaller 3 values reduce variance but underemphasize salient features, whereas larger values overly amplify them. We find that 3 = 5 offers the best compromise, yielding the highest performance on both WSI and patch classification.
9

---

0.8
0.7
Senffy
LSE
0.5
Max
0.5
Moan
ABMIL
Prose GigaPit
0.4
$30
$1.0 (+170kg
$150 (11)
(+170k)
Dataset
(-1786)
Figure 3: Performance of major Transformer based and classical MIL pooling methods on the SICAP-MIL dataset across different training set sizes.
Augmentation
Slide
Patch
6.00
AUC
ECE
AUC
6.01
0.983..os
0.121 11121.os
0.839.um
0.00
Random Rotation
0.965
0.133
0.854.
Random Deformation
oca
0.861.a31
0.811
Random Affine Transformtiinn
0.900..12
0.193
0.822
Random
Blurring
007
0.081 oca
0.862.m1
Random Color Jitter
0.955
0.084 001.
0.876
Random Jitter
0.955.eo
0.156
0.874.as0
Table 5: Result of each base augmentation on the CAMELYON17 dataset, reported as mean sad-
6.93
Figure The impact of in Maxsoft archi- tecture on CAMELYONI6, CAMELYON17, TCGA-Lung, and SICAP-MIL, datasets.
Impact of Base Augmentations. To evaluate the augmentations from Section 5.4, ablated them individually. We also examined the spatial transforms Random Elastic Deformation and Random Affine Transformation. As shown in Table 5, these spatial operations consistently reduced performance. We hypothesize that such transformations fail to capture clinical variability and primarily inject noise rather than useful diversity.
7 Conclusion and Discussion
This work highlights the value of instance-level representation learning under current data constraints in WSI diagnosis. In response, we present theoretical and empirical analysis of classical MIL pooling and introduce Maxsoft-a simple, resource-efficiet pooling function with strong, adaptable performance. limitation is that, despite clinically acceptable visualizations, patch-level performance lags behind WSI-level accuracy. Another weakness is that, while our theory offers numerical guidance for selecting 33 in Maxsoft, a small dataset-specific search is still required; future work should make this selection tuning-free free and integrated into training. Moreover, standard augmentations (e.g., Random Affine, Elastic Deformation) do not capture real distribution shifts, underscoring the need for more realistic techniques. Finally, advocate studying cancer detection via anomaly detection [83-88], especially in data-scarce regimes, since naturally targets rare or novel abnormalities without large labeled cancer sets [89-92]]
10

---

Acknowledgments
We thank Mehrab Moradzadeh, Mohammad Mosayyebi, Arian Komaci Koma, Amir Hossein Saberi, Mohammad Azizmalayeri, Hossein Mirzaei, Hosein Hasani, and the anonymous reviewers for their helpful discussions and feedback on this work.
References
[1] Andrew Song, Guillaume Jaume, Drew FK Williamson, Ming Y Lu, Anurag Vaidya, Tiffany Miller, and Faisal Mahmood. Artificial intelligence for digital and computational pathology. Nature Reviews Bioengineering, 1(12):930-94) 999, 2023.
[2] Jana Lipkova, Richard J Chen, Bowen Chen, Ming Y Lu, Matteo Barbieri, Daniel Shao, Anurag J Vaidya, Chengkuan Chen, Luoting Zhuang, Drew FK Williamson, et al. Artificial intelligence for multimodal data integration in oncology. Cancer cell, 109551109-11110,, 2022.
[3] Artem Shmatko, Narmin Ghaffari Laleh, Moritz Gerstung, and Jakob Nikolas Kather, Artificial in- telligence in histopathology: enhancing cancer research and clinical oncology. Nature cancer, 3(9): 1026-1038, 2022.
[4] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv: /929,, 2020.
[5] Maximilian Ilse, Jakub Tomezak, and Max Welling. Attention based deep multiple instance learning. In International conference on machine learning, pages 2127-22222111 2136. PMLR, 2018
[6] Jaeseok Jang and Hyuk- Yoon Kwon. Are multiple instance learning algorithms learnable for instances? Advances in Neural Information Processing Systems, 37:10575- 10612, 2024.
[7] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint 1rXiv:1409.0000 4074047, 2014.
[8] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
[9] Ting Chen, Simon Korbllith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In International conference on machine learning, pages 1597-1607. PmLR, 2020.
[10] Bin Li, Yin Li, and Kevin W Eliceiri. Dual-stream multiple instance learning network for whole slide image classification with self-supervised contrastive learning. In Proceedings of the IEFF/CVF conference on computer vision and pattern recognition, pages 14318-14328, 2021.
[11) Linhao Qu, Xiaoyuan Luo, Shaolci Liu, Manning Wang. and Zhijian Song. Dgmil: Distribution guided multiple instance learning for whole slide image classification. In International conference on medical image computing and computer-assisted intervention, pages 24-34. Springer, 2022.
[12] Yushan Zheng, Jun Li, Jun Shi, Fengying Xie, Jianguo Huai, Ming Cao, and Zhiguo Jiang. Kernel attention transformer for histopathology whole slide image analysis and assistant cancer diagnosis. IEEE Transactions on Medical Imaging, 42(9):2726-7739 2023.
[13] Gianpaolo Bontempo, Angelo Porrello, Federico Bolelli, Simone Calderara, and Elisa Ficarra. Das-mil: distilling across scales for mil classification of histological wsis. In International conference on medical image computing and computer- intervention, pages 248-258. Springer, 2023.
[14] Olga Fourkioti, Matt De Vries, Chen Jin, Daniel Alexander, and Chris Bakal. Camil: Context- aware multiple instance learning for cancer detection and subtyping in whole slide images. arXiv preprint arXiv:2305.00 053 2023.
[15] Hossein Jafarinia, Alireza Alipanah, Danial Hamdi, Saced Razavi, Nahal Mirzaic, and Mohammad Hos- sein Rohban. Snuffy: Efficient whole slide image classifier. arXiv e-prints, pages arXiv-2408, 2024.
[16] Wenhao Tang, Fengtao Zhou, Sheng Huang. Xiang Zhu, Yi Zhang, and Bo Liu. Feature re em-edddinng To- wards foundation model-level performance in computational pathology. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pages 11343-11333 2024.
11

---

[17] Hanwen Xu, Naoto Usuyama, Jaspreet Bagga, Sheng Zhang, Rajesh Rao. Tristan Naumann, Cliff Wong. Zelalem Gero, Javier González, Yu Gu, al. A whole-slide foundation model for digital pathology from real-world data. Nature, 630(8015):181-188, 2024.
[18] Hongrun Zhang, Yanda Meng. Yitian Zhao, Yihong Qiao, Xiaoyun Yang. Sarah E Coupland. and Yalin Zheng. Difd-mil: Double-tiet tier feature distillation multiple instance learning for histopathology whole slide image classification. Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 18802-18812, 2022.
[19] Pei Liu, Luping Ji. Xinyu Zhang, and Feng Ye. Pseudo-bag mixup augmentation for multiple instance learning-bast based whole slide image classification. IEEE Transactions on Medical Imaging, 43(5):1841- 1852, 2024.
[20] Lucas Beyer, Xiaohua Zhai, and Alexander Kolesnikov. Better plain vit baselines for imagenet- Ik. arXiv preprint arXiv:2205.0 51580, 2022.
[21] Ilya O Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Thomas Unterthiner, Jessica Yung, Andreas Steiner, Daniel Keysers, Jakob Uszkoreit, et al. MIp-mixon An all-mip architecture for vision. Advances in neural information processing systems, 34:24261 24272, 2021.
[22] Peng Li, Lu Huang, Jin Li, Haiyan Yan, and Dongjing Shan. Graph-based vision transformer with sparsity for training small datasets from scratch. Scientific Reports, 15(1):24520, 2025.
[23] Namuk Park and Songkuk Kim. How do vision transformers work? arXiv preprint arXiv:2202.06709. 2022.
[24] Maithra Raghu, Thomas Unterthiner. Simon Kornblith, Chiyuan Zhang, and Alexey Dosovitskiy. Do vision transformers see like convolutional neural networks? Advances in neural information processing systems, 121112111122222 2021.
[25] Zhiying Lu, Hongtao Xie, Chuanbin Liu, and Yongdong Zhang. Bridging the gap between vision transformers and convolutional neural networks on small datasets. Advances in Neural Information Processing Systems, 35:14663-1490 2022.
[26] Yahui Liu, Enver Sangineto, Wei Bi, Nicu Sebe, Bruno Lepri, and Marco Nadai. Efficient training of visual transformers with small datasets. Advances in Neural Information Processing Systems, 34: 23818-23830, 2021.
[27] Ali Hassani, Steven Walton. Nikhil Shah, Abulikemu Abuduweili, Jiachen Li, and Humphrey Shi. Escaping the big data paradigm with compact transformers. arXiv preprint arXiv:2104.055 057044, 2021.
[28] Seung Hoon Lee, Seunghyun Lee, and Byung Cheol Song. Vision transformer for small-size datasets. arXiv preprint arXiv:2112.
2021.
[29] Ibrahim Batuhan Akkaya. Senthilkumar S Kathiresan, Elahe Arani, and Bahram Zonooz. Enhancing performance of vision transformess on small datasets through local inductive bias incorporation. Pattern Recognition, 153:1 10010, 2024.
[30] Francisco Carrillo- Perezz Marija Pizurica, Michael G Ozawa, Hannes Vogel, Robert B West, Christina S Kong, Luis Javier Herrera. Jeanne Shen, and Olivier Gevaent. Synthetic whole-slide image tile generation with gene expression profile- profile-iffused deep generative models. Cell Reports Methods, 3(8), 2023.
[31] Jun Li, Junyu Chen, Yucheng Tang, Ce Wang, Bennett A Landman, and S Kevin Zhou. Transforming medical imaging with transformers? comparative review of key properties, current progresses, and future perspectives. Medical image analysis, 85: 102762, 2023.
[32] Anish Athalye. Nicholas Carlini, and David Wagner. Obfuscated gradients give false sense of security: Circumventing defenses to adversarial examples. In International conference machine learning, pages 274 283. PMLR, 2018.
[33] Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint /r88::3308.3432 2013.
[34] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax, arXiv preprint arXiv:1611 1et.11111144444 2016.
[35] Peter Bandi, Oscar Geessink, Quirine Manson. Marcory Van Dijk, Maschenka Balkenhol. Meyke Hermsen, Babak Ehteshami Bejnordi, Byungjae Lee, Kyunghyun Paeng, Aoxiao Zhong, et al. From detection of individual metastases to classification of lymph node status at the patient level: the camelyon17 challenge. IEEE transactions medical imaging, (8(2)5550-560 2018
12

---

[36] Siemen Brussee, Giorgio Buzzanca, Anne MR Schrader, and Jesper Kers, Graph neural networks in histopathology: Emerging trends and future directions. Medical Image Analysis, page 103444, 2025.
[37] Yi Zheng, Rushin H Gindra, Emily J Green, Eric Burks, Margrit Betke, Jennifer E Beane, and Vijaya Kolachalama. graph-transformer for whole slide image classification. IEEE transactions on medical imaging, (1(11))3003- 3015,015,2000 2022.
[38] Chaitanya K Joshi. Transformers are graph neural networks. arXiv preprint arXiv:2506. 2025.
[39] Chen Cai, Truong Son Hy. Rose Yu, and Yusu Wang. On the connection between mpnn and graph transformer. In International conference machine learning, pages 3408-3430. PMLR, 2023.
[40] Jin- Jin-Gang Yu, Zihao Wu, Yu Ming, Shule Deng, Yuanqing Li, Caifeng Ou, Chunjiang He, Baiye Wang. Pusheng Zhang, and Yu Wang. Prototypical multiple instance learning for predicting lymph node metastasis of breast cancer from whole-slide pathological images. Medical Image Analysis, 85: 2023.
[41] Andrew H Song. Richard J Chen, Tong Ding, Drew FK Williamson, Guillaume Jaume, and Faisal Mahmood. Morphological prototyping for unsupervised slide representation learning in computational pathology. In Proceedings of the IEEE/CVF Conference on Computer Vision and Puttern Recognition, pages 1566-11578, 2024.
[42] Cha Zhang, John Platt, and Paul Viola. Multiple instance boosting for object detection. Advances in neural information processing systems, 18, 2005.
[43] Oren Z Kraus, Jimmy Lei Ba, and Brendan J Frey, Classifying and segmenting microscopy images with deep multiple instance learning. Bioinformatics, 32( 32)155255, 2016.
[44] James Keeler, David Rumelhart, and Wee Leow. Integrated segmentation and recognition of hand hand-printed numerals. Advances neural information processing systems, 3, 1990.
[45] Jan Ramon and Lue De Raedt. Multi instance neural networks. In Proceedings of the ICML-2000 workshop on attributevallue and relational learning, pages 53-60, 2000.
[46] Florentin Bieder, Robin Sandkühler, and Philippe C Cattin. Comparison of methods generalizing max-and average-pooling. arXiv preprint 103::22033011400 2021.
[47] Richard J Chen, Tong Ding, Ming Y Lu, Drew FK Williamson, Guillaume Jaume, Andrew H Song. Bowen Chen, Andrew Zhang, Daniel Shao, Muhammad Shaban, et al. Towards general-purpose foundation model for computational pathology. Nature Medicine, 30(3)8500 862, 2024.
[48] Xiyue Wang, Junhan Zhao, Fliana Marostica, Wei Yuan, Jictian Jin, Jiayu Zhang, Ruijiang Li, Hongping Tang, Kanran Wang. Yu Li, et al. A pathology foundation model for cancer diagnosis and prognosis prediction. Nature, 634(8035):970- 979-978, 2024.
[49] Nanne Aben, Edwin D de Jong, Ioannis Gatopoulos, Nicolas Känzig, Mikhail Karasikov, Axel Lagré, Roman Moser, Joost Doom, Fei Tang, et al. Towards large-scale training of pathology foundation models, arXiv preprint arXiv:2404. 15217, 2024.
[50] Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy V. Vo, Mare Szafranice, Vasil Khalidov, Pierre Fernandez, Daniel HAZIZA, Francisco Massa. Alaaeldin El-Nouby, Mido Assran, Nicolas Ballas, Wojeiech Galuba. Russell Howes, Yao Huang. Shang- Wen Li, Ishan Misra. Michael Rabbat, Vasu Sharma, Gabriel Synnaeve, Hu Xu, Herve Jegou, Julien Mairal, Patrick Labatut, Armand Joulin. and Piotr Bojanowski. DINOv2: Learning robust visual features without supervision. Transactions on Machine Learning Research, 2024. ISSN 2835-8856. URL https: http://pppeeeiiieeeeeeee www.iieennee/ooooiiiiii a68SUt62Ft. Featured Certification.
[51] Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. Gpt-4 technical report. arXiv preprint ar3iv:2303.0 087774, 2023.
[52] Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. The llama herd of models. arXiv preprint arXiv:2407.2 21733, 2024.
[53] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Laz. mixup: Beyond empirical risk minimization, arXiv preprint arXiv:1710.09412.. 2017.
13

---

[54] Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint
2017.
[55] Jiawei Yang, Hanbo Chen, Yu Zhao, Fan Yang, Yao Zhang, Lei He, and Jianhua Yao. Remix: A general and efficient framework for multiple instance learning based whole slide image classification. International Conference on Medical Image Computing and Computer-Assie Assiiseed Intervention, pages 35-45. Springer, 2022.
[56] Yuan-Chih Chen and Chun-Shien Lu. Rankmix: Data augmentation for weakly supervised learning of classifying whole slide images with diverse sizes and imbalanced categories. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 23936-23945, 2023.
[57] Michael Gadermayr, Lukas Koller, Maximilian Tschuchnig, Lea Maria Stangassinger, Christina Kreutzer, Sebastien Couilladd-Despres, Gertie Janneke Oostingh, and Anton Hittmair. Mixup-mil: Novel data augmentation for multiple instance learning and study thyroid cancer diagnosis. In International conference on medical image computing and cosputer-asisted intervention, pages 477-486. Springer, 2023.
[58] Farchan Hakim Raswa, Chun-Shien Lu, and Jia-Ching Wang. Attention-guided prototype mixing: Diversifying minority context on imbalanced whole slide images classification learning. In Proceedings of the IÉLÉ/CVF Winter Conference on Applications of Computer Vision, pages 7624-7633, 2024.
[59] David Tellez, Geert Litjens, Péter Bándi, Wouter Bulten, John-Melle Bokhorst, Francesco Ciompi, and Jeroen Van Der Laak. Quantifying the effects of data augmentation and stain color normalization in convolutional neural networks for computational pathology. Medical image analysis, 58:1015::4 2019.
[60] Khrystyna Faryna, Jeroen Van der Laak, and Geert Litjens. Tailoring automated data augmentation to h&e-stained histopathology. In Medical imaging with deep learning, 2021.
[61] Imaad Zaffar, Guillaume Jaume, Nasir Rajpoot, and Faisal Mahmood. Embedding space augmentation for weakly supervised learning in whole-slide images. In 2023 IEEE 20th International Symposium on Biomedical Imaging (ISBI), pages 1-4, IEFF, 2023.
[62] Liuxi Dai, Yifeng Wang, Haoqian Wang. Yongbing Zhang, et al. Augdiff: Diffusion based feature augmentation for multiple instance learning in whole slide image. IEEE Transactions on Artificial Intelligence, 2024.
[63] Kunming Tang. Zhiguo Jiang, Kun Wu, Jun Shi, Fengying Xie, Wei Wang. Haibo Wu, and Yushan Zheng. Self-supervised representation distribution learning for reliable data augmentation in histopathology wsi classification. IEEE Transactions on Medical Imaging, 2024.
[64] Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in supervidd vision transformers. In Proceedings of the IEEE/CVF international conference on computer vision, pages
2021.
[65] Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Russ Salakhutdinov, and Alexander Smola. Deep sets. Advances in neural information processing systems, 30, 2017.
[66] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. Proceedings of the IEEE conference on computer vision and pottern recognition, pages 652-660, 2017.
[67] Ming Y Lu, Drew FK Williamson, Tiffany Y Chen, Richard J Chen, Matteo Barbieri, and Faisal Mahmood. Data-efficient and weakly supervised computational pathology on whole-slide images. Nature hiomedical engineering, 56):555-5770 2021.
[68] Zhuchen Shao, Hao Bian, Yang Chen, Yifeng Wang, Jian Zhang, Xiangyang Ji, et al. Transmil: Trans- former based correlated multiple instance learning for whole slide image classification. Advances in neural information processing systems, 34:2136 2147, 2021.
[69] Ladislav Lene and Pavel Král. Two-level neural network for multi-labe document classification. In Artificial Neural Networks and Machine Learning-ICAN ICANN 2017: 26th International Conference on Artificial Neural Networks, Alghero, Italy, September 11-14, 2017, Proceedings, Part II 26, pages 368-375. Springer, 2017.
[70] Ladislav Lenc and Pavel Král. Combination of neural networks for multi-label document classification. In International Conference on Applications of Natural Language to Information Systems, pages 288-282, Springer, 2017.
14

---

[71] Andrew Maxwell, Runzhi Li, Bei Yang, Heng Weng, Aihua Ou, Huixiao Hong, Zhaoxian Zhou, Ping Gong, and Chaoyang Zhang. Deep learning architectures for multi-label classification of intelligent health risk prediction. BMC bioinformatics, 18:121-131, 2017.
[72] Florian Hübler, llyas Fatkhullin, and Niao He. From gradient clipping to normalization for heavy tailed sgd, 2024. URL https://arxiv wrgg httg//bs/24100 13849.
[73] Léon Bottou, Frank F. Curtis, and Jorge Nocedal. Optimization methods for large-scale machine learning, 2018. URL hwwph:tttaaaaaeet wwwpwwwwww.o.aa///o/// 04888.
[74] Fartash Faghri, David Duvenaud, David J. Fleet, and Jimmy Ba. study of gradient variance in deep learning, 2020. URL htttts:///aattttt wwwaarwwww......eeaaaaaaa wwt.oogg///aa...e.ooooo. wrg/aba/200..045333 04532.
[75] Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy. and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima, 2017. URL https:// http://axxvv..rrrg org/abs//6000 /1609 04836.
[76] Dong Yin, Ashwin Pananjady, Max Lam, Dimitris Papailiopoulos, Kannan Ramchandran, and Peter Bartlett. Gradient diversity: key ingredient for scalable distributed learning, 2018. URL https:
/aarrii.org/ab//1//006 .5699.
[77] Dominic Masters and Carlo Luschi. Revisiting small batch training for deep neural networks, 2018. URL https:/ //appii///xxv....// www.vvv..r//aaaa org/abs 07600.07.6....
[78] Babak Ehteshami Bejnordi, Mitko Veta, Paul Johannes van Diest, Bram van Ginneken, Nico Karssemeijer, Geert J. S. Litjens. Jeroen A. van der Laak. Meyke Hermsen. Quirine F. Manson, Maschenka C. A. Balkenhol, Oscar G. F. Geessink, Nikolaos Stathonikos, Marcory Crf van Dijk, Peter Bult, Francisco Beca, Andrew H. Beck, Dayong Wang. Aditya Khosla, Rishab Gargeya, Humayun Irshad, Aoxiao Zhong, Qi Dou, Quanzheng Li, Hao Chen, Huangjing Lin, Pheng-Am Ann Heng, Christian Hass, Elia Bruni Quincy Kwan-Sut Wong, Ugur Halici. Mustafa Umit Oner, Rengul Cetin-Atalay, Matt Berseth, Vitali Khvatkov. A. Vylegzhanin, Oren Z. Kraus, Muhammad Shaban, Nasir M. Rajpoot, Ruqayya Awan, Korsuk Sirinukunwattnna, Talha Qaiser. Yee-Wah Tsang, David Tellez, Jonas Annuscheit, Peter Hufnagl, Mira Valkonen, Kimmo Kartasalo, Leena Latonen, Pekka Ruusuvuori, Kaisa Lümmataienn, Shadi Albarqouni, Bharti Mungal, Amitha Anna George, Stefanie Demirei, Nassir Navab, Seiryo Watanabe, Shigeto Seno, Yoichi Takenaka, Hideo Matsuda, Hady Ahmady Phoulady, Vassili A. Kovalev, Alexander Kalinovsky, Vitali Liauchuk, Gloria Bueno. Maria del Milagro Fernández-Caud Carrobles, Ismael Serrano, Oscar Deniz, Daniel Racoceanu, and Rui Venâncio. Diagnostic assessment of deep learning algorithms for detection of lymph node metastases in women with breast cancer. JAMA, 318:2199-22100 2017. URI. https: / /apii.pp.... www.stimmmchonttooeeeeeee wwwpoolarrrro//ooooeoo org/CorpusID: :tt//CrrruIII:2058655555 205086555.
[79] Lee AD Cooper. Elizabeth G Demicco, Joel I Saltz, Reid T Powell, Arvind Rao, and Alexander Lazar. Pancancer insights from the cancer genome atlas: the pathologist's perspective. The Journal of pathology. 244(5):512 524, 2018.
[80] Julio Silva- Rodríguez, Arne Schmidt, María A Sales, Rafael Molina, and Valery Naranjo. Proportion constrained weakly supervised histopathology image classification. Computers in Biology and Medicine, 147:105714, 14, 2022.
[81] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. Proceedings of the IEEE conference on computer vision and puttern recognition, pages 770-778, 2016.
[82] Zhi Huang, Federico Bianchi, Mert Yuksekgonul, Thomas J Montine, and James Zou. A visual-language foundation model for pathology image analysis using medical twitter. Nature medicine, 29(9) 2316, 2023.
[83] Milda Pocevičiūté, Gabriel Eilertsen, and Claes Lundström. Unsupervised anomaly detection in digital pathology using gans. 202/ IEEE 18th International Symposium on Biomedical Imaging (ISBI), pages 1878-1882. IEEF, 2021.
[84] Lukas Ruff, Robert Vandermeulen, Nico Goernitz, Lucas Deecke, Shoaib Ahmed Siddiqui, Alexander Binder, Emmanuel Müller, and Marius Kloft. Deep one-class classification. In International conference on machine learning, pages 4393-4402. PMLR, 2018
[85] Chun-Liang Li, Kihyuk Sohn, Jinsung Yoon, and Tomas Prister. Cutpaste: Self-super learning for anomaly detection and localization. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 9664-9674, 2021.
15

---

[86] Vitjan Zavrtanik, Matej Kristan, and Danijel Skočaj. Draem-a discriminatively trained reconstruction embedding for surface anomaly detection. In Proceedings of the IEEE/CVF international conference on computer vision, pages 8330-8339, 2021.
[87] Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. A simple unified framework for detecting out-af-distribution samples and adversarial attacks. Advances neural information processing systems, 31, 2018.
[88] Mojtaba Nafez, Amirhossein Koochakian, Arad Maleki, Jafar Habibi, and Mohammad Hossein Rohban. Patchguard: Adversarially robust anomaly detection and localization through vision transformers and pseudo anomalies. In Proceedings of the Computer Vision and Pattern Recognition Conference, pages 20383-20394, 2025.
[89] J Dippel, N PreniBI, J Hense, al. Ai-based anomaly detection for clinical-grade histopathological diagnostics. nejm Aioa2400468, 2024.
[90] Cosmin Bereea, Benedikt Wiestler, Daniel Rueckert, and Julia Schnabel. Generalizing unsupervised anomaly detection; towards unbiased pathology screening. In Medical Imaging with Deep Learning, 2023.
[91] Yu Cai, Weiwen Zhang, Hao Chen, and Kwang- Ting Cheng. Medianomaly: A comparative study of anomaly detection in medical images. Medical Image Analysis, page 103500, 2025.
[92] Toannis Lagogiannis, Felix Meissen, Georgios Kaissis, and Daniel Rueckert. Unsupervised pathology detection: deep dive into the state of the art. IEEF transactions on medical imaging, 4311)224--25,, 2023.
[93] John Duchi and Hongseok Namkoong. Variance-based regularization with convex objectives. Journal of Machine Learning Research, 20(68):1 55, 2019.
[94] Robert G Gallager. Stochastic processes: theory for applications. Cambridge University Press, 2013.
[95] Michel Ledoux. Measure concentration, transportation cost, and functional inequalities. Summer School on Singular Phenomena and Scaling in Mathematical Models, Bonn, pages 10-13, 2003.
[96] Martin Wainwright. High-dimensional statistics: non-asymptotic viewpoint, volume 48. Cambridge university press, 2019.
[97] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Köpf, Edward Yang. Zach Vito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performann deep learning library, 2019.
[98] Paul Tourniaire, Marius Ilie, Paul Hofman, Nicholas Ayache, and Hervé Delingette. Ms-clam; Mixed supervision for the classification and localization of tumors in whole slide images. Medical Image Analywis, 85:102763, 2023.
[99] Tong Ding, Sophia J Wagner, Andrew H Song, Richard Chen, Ming Y Lu. Andrew Zhang, Anurag/ Vaidya, Guillaume Jaume, Muhammad Shahan, Ahrong Kim, et al. Multimodal whole slide foundation model for pathology. arXiv preprint arXiv:2411. 19666, 2024.
[100] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In International conference machine learning, pages 1321-1330. PMLR, 2017.
[101] Ilya I Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2017. URL, httph: //api. semanti org/CorpustD 53592270.
[102] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by time-scale update rule converge local nash equilibrium. Advances neural information processing systems, 30, 2017.
[103] Muhammad Ferjad Nacem, Scong Joon Oh, Youngjung Uh, Yunjey Choi, and Jacjun Yoo. Reliable fidelity and diversity metrics for generative models. In International conference on machine learning, pages 7176-7185. PMLR, 2020.
[104] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imagenet? In International conference on machine learning, pages 2019.
PMLR,
16

---

[105] Rohan Taori, Achal Dave, Vaishaal Shankar, Nicholas Carlini, Benjamin Recht, and Ludwig Schmidt. Measuring robustness natural distribution shifts image classification. Advances in Neural Information Processing Systems, 13:18583-18859 2020.
[106] John P Miller, Rohan Taori, Aditi Raghunathan, Shiori Sagawa, Pang Wei Koh, Vaishaal Shankar, Percy Liang. Yair Carmon, and Ludwig Schmidt. Accuracy on the line: on the strong correlation between out-of-distriuttion and in-distribution generalization. In International conference on machine learning. pages 7721-7735. PMLR, 2021.
[107] Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang. Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, et al. The many faces of robustness: A critical analysis of out-of-distribution generalization. In Proceedings of the IEEE/CVF international conference computer vision, pages 8340-8349, 2021.
[108] Thomas G Dietterich, Richard H Lathrop, and Tomás Lozano- Pérez. Solving the multiple instance problem with axis parallarlllel rectangles. Artificial intelligence, 89(1-2331-71, 1997.
[109] Stuart Andrews, Joannis Tsochantaridis, and Thomas Hofmann. Support vector machines for multiple- instance learning. Advances neural information processing systems, 15, 2002.
17

---

A Theoretical Analysis
In this section, we first provide a mathematical formulation of the multiple instance learning (MIL) setting considered in this work. We begin by establishing the notation and then describe the main problem setup, along with the data generation model. Specifically, we introduce statistical model that captures the generation process of images in the dataset, as well as the set (or bag) patches associated with each image. Our modeling approach is intentionally kept general, incorporating only standard and widely accepted assumptions such as the local dependence of image patches and the i..d. nature of images in the training set. Additionally, although our experiments use the cross-entropy loss, the theoretical analysis accommodates any proper, continuous, Lipschitz loss function.
We then proceed to the theoretical analysis, starting with uniform convergence bounds that provide generalization guarantees for our method. In particular, we study the role of the hyperparameter / in the log-sum exp formulation and its influence on generalization. Our main result in this part is stated Theorem
Subsequently, we shift focus to the sensitivity analysis in Section A.4. Notably, contrast to general- favors smaller values of 3 high sensitivity in noisy regimes requires sufficiently large B. In Theorem 6, we show that choosing 3 >> Oloog N) is both necessary and sufficient to achieve high true positive rate and mitigate false negatives.
The key conclusion of this section that all values of E (0, +oo) are Pareto-optimal: depending on which aspect- generalization sensitivity iis prioritized and how the trade-off is weighted, the optimal choice of ]3 will vary. This insight supports the central idea behind our method: using smaller values of / during training promote generalization, while selecting larger values (possibly even 20) at inference time to enhance sensitivity.
A.1 Data Generation Model
Let n, NN E N. Assume we observe n i.i.d. images II,...,,,. i.d.d an unknown distribution over images size D1 D2, with D1, D2 E Assume each image I, for j E [n] is decomposed into N -on-overla (or possibly overlapping) patches:
Po. where Po E M(R is
Patch(13) A (x
Each image patch x (for j E in], [N] is passed through a fixed vision transformer model network V-T produce feature vector xx!"
2!!' ViT ((()) X,
22)
where C RRd is the feature space, and d denotes the feature dimension. Define the bag of features for image I
Bag(L,) A ( (1)
R. j [n].
Assumption 1 (Local Dependence of Image Patches). Let I ~ Po, and consider the N feature vectors (II,...,,NN 2N) in Bag(T). Then, we assume they form a locally dependent stochastic process such that:
x; L Lx
Vije [N] with i j B,
(3)
where indicates statistical independence according to Po, and 1 S & N a fixed parameter independent of N.
This assumption has been widely validated empirically across a broad range of natural and medical image datasets. Indeed, the statistical correlations among different patches of such images are predominantly local: patches that are spatially distant-i.e., whose patch indices differ by more than certain bandwidth = 0(1)-are typically almost independent, even though they might be identically con-identically distributed.
18

---

A.2 Model Training via SGD
Consider the class of Multi-Layer Perceptrons (MLPs) defined as
= {fo X - R 0 θ)
where & denotes the parameter space, i.e., the set of all possible weight configurations of the neural networks. For each 0 E θ, the function fe represents MLP that maps input feature vectors from X to real-valued outputs.
Definition 3 (LSE Loss), Fix 3 (0, +00) and Lipschitz loss function L(yllv') [0, 1]2 R+ for (soft) labels y, y E [0, 1]. For æ E X, define the log-sum-eey, aggregation function: functiioon
N
A ( ;(n...,,,,))))
log Σ
exp (3 (0.0
where a So is the composition of learned function So X R and an activation - [0,
The LSE-based loss function for parameters f E θ for the empirical dataset [(7], My)] j = .,....,.) then given by:
n
LLSE
(0)
Σ 72
Vj
(
A
( x
9 N
(4)
Note that we have
lim A (x)......................
1
Σ fo (x;),
8-50
N
while
lim A (m NN) = max fo(a;) $+000
(5)
[E[N]
Consider the loss function defined in Definition 3, and suppose that empirical risk minimization (ERM) procedure yields the estimator θERM defined
PRR
argmin LLSE (0).
dee
The minimization problem is assumed to be solved using standard Stochastic Gradient Descent (SGD) algorithm with an arbitrary batch size. is important to note that such optimization problems are generally non-convex and, therefore, are not expected to be solved to global optimality. In practice, due to early stopping and the inherent complexity of the loss landscape, the algorithm typically converges to local minimum stationary point. However, this does not impact the validity our subsequent analysis. Specifically, our generalization guarantees are stated as high- probability uniform convergence bounds that hold for all 0 O, regardless of the particular solution returned by the optimization algorithm.
A.3 Generalization Bounds
Define the generalization error as
GE
i
PERM
A Ero
[LSE (EERS) LLSE (PERM)
Theorem 4 (Effect of 3 Generalization Error), Let Assumption I hold for some B, and define B.. A o f JōERM for all images E [n] and patch ids E [N]. Also let U E max; 4.j and M A 1 E median qt.j. Then, having 3 < log(N/2). with high probability results into the U-M
following bound:
G S (O. 1/2 +-
On the other hand, if l/g(N/2)
U- M then, depending the tail behavior of the qu, 's, the generaliza-
tion error may (again with high probability) satisfy
GE(OERM) =Onn 11122)).
19

---

Proof of Theorem 4. We first show that the LSE behaves similarly to an exponentially weighted average, exhibiting smooth phase transition as B increases from below above the threshold
log N
U M
In the small-3 regime, the LSE behaves roughly like a simple average, and thus the variance of the loss decreases with both and N. In contrast, in the large-8 regime, the LSE approximates the maximum operator, which may exhibit weaker concentration properties depending on the tail behavior of the variables fo(
Lemma 1. For B3 the log-sum-exp (LSE) and the exponentially weighted average of N values . QN bound each other as follows:
N
N
log
1
Bq
Σ
SC
CC-min min {B. log N
Σラ=
Bgs
where a constant independent of B, but dependent on the empirical distribution of the qu8.
Proof. For 3 < 1, we use the Taylor expansion of the exponential function: e" = -1+x+ +0(x))
Applying this to e @u0 we get
N
N
1 1 Bq + 3d9
2 + -0(83))
log
c
:q:
= log
Σ
3
N
3
N
1=1
1=1
g² 9² 0(89))
log
1
1
Bq +
3
q
+
(g²
/") + 0(89)
(8)
2
where q= = 1 En q and q2
Li=1
N
q..
For the exponentially weighted average, we expand
N.
the weights similarly:
N
94
N
1 Bg, + (
Σ
4:
N + +
iml
=
3 (12 (²) + 0
(9)
Thus, the absolute difference between the two expressions is
A - B < 8 2 Var(gn AN) + 0(32).
For 8 > 1, denote 4max max; gi and let i" be the index where this maximum achieved. We write
Algmax 9:) 1)
N
log
By
1
log
1
Agmax
I
+
Σ
N 1=1
3
N
log N
qmax
+ log
1 Σ c M(tmax 4i)
8
log N
Qmax
+ 0(3-2).
(10)
3
For the exponentially weighted average,
N
Bq.
Imax + Eijrr qie 1ie-9lee 91ymax
4
N
eoa
1 + Eijie 6- --8lmmax-
1==l
= 4max
+ 0(8-2).
(11)
20

---

Therefore, the difference in this regime satisfies |A - B s we obtain the claimed bound:
lng N
+ +0
Combining both cases,
N
log N
log
eq:
C ---mii
B. B f
B
N
eBss
==1
Hence, the formulations become asymptotically equivalent 8 0+ and B - oc. In these limiting regimes- which are of primary interest this analysis- we may treat the two expressions interchangeably.
Lemma 2. Assume real values satisfying
S q2 S... S qN and let B 82 0. Define:
A - 9N
91 8 _ 9/N/21 91-
Then, for all j 1,.... N, the exponentially weighted probubilities satisfy:
2 CA
20
$ Pj
1=1 Say
(12)
N
86
N
1 c06
Proof. To prove the upper-bound, we can write
N
Σ
B0.
Amax
Σ
AA
Σ
3(1=
91)
8A
N
N
86
2
(13)
+
e.5
The bower-bound can be achieved in similar fashion:
Bg)
Σ
8q1
Σ
Bq
3(g
i=l
N
N
36
2
2
2
(14)
G5
+
34
This completes the proof.
Corollary 1. Under the setting of Lemma 2. for
3 log(N/2)
-
have P3 S <(B)/N for all j, where c(B) is a constant independent of N. Conversely, when
>> (N/(N/2)
there exists index j* E [N] such that Py- > (B) and P5 S (B) for all #5, with d' (3)
also independent of N. Moreover,
lim c(3) = 1,
lim d()) =
$-0+
8000
21

---

Proof. The proof is straightforward. We only need to show that the quantity
log (N/2)
serves as the critical threshold such that, for all B < 8", the upper bound in Lemma drops below 1.
Specifically, we verify that
2 1+ +
N 2 log
8
For < 3", the resulting distribution over the Pj values is nearly uniform. contrast, when >> 5*. the probability mass concentrates sharply on the index j corresponding to qj = Imax with Pj 2 1 and all other Pj values approaching zero.
Lemma 3 (Uniform Convergence Bound in Eq. (2) of [93]). Let H. (hg X - Q be
learnable class of functions, and let Po be a probability measure over X. Suppose x θ R is loss function satisfying mild regularity conditions. Then, with high probability and uniformly over all E O the following generalization bound holds:
Var (e(X;0))
C2 n
EP [{(x;)) S ((x;;))+
(15)
n
where II...., X, ltd. Po. and Cn C2 are constants depending on the model and confidence parameters.
The proof can be found in [93], as well as in several other related works cited therein. To bound the generalization gap, we must bound the variance Var (E(I, y; 0)). where
N
2B00folee.) )
log and (1, 3) is a sample drawn from Po. with Bag(!) (II...., xN).
C(I, y: 0) =
N
Lemma 4. Assume that the function h + ((yl(h) is L-Lipschitz for some L 2 0 and all y E [0, Then, by the Efron- Stein inequality.
Var (E(I, y: 0)) L2 Var
log
fooo
The proof follows directly from the Lipschitz continuity of L. Recall that due to the statement of the theorem we assume L [0, 1j2 >> smooth and Lipschitz. Define
U
max a (Folz!3)).
M M
2
median o (fo(o!)))
I....N
Analysis for small 8: Assume that
8 (og(N/2)
-
Then, using Lemma and related results, we obtain:
1 Σ o fo
Var (f(I, y: 0)) < L2) Var
L322(3)
N
Cov (a fo(x;), oo fo(z;))
N
1 (222(8)
Σ
Cov (a fo( o fo(x,))
2
(1)
(B)
(16)
4N
22

---

where (i) follows from mixing or local- -eell-depenence assumption, and (ii) uses the fact that any variable bounded in [0, 1] has variance at most 1/4.
Therefore, the generalization gap is bounded by:
Var (E(X;0)
C2 IO
VNn )
1
where the constants are (1) in the limit as n, N + oo, assuming 3 is sufficiently small. These constants may also depend on other complexity measures (e.g., Rademacher complexity or VC- dimension in binary classification settings).
Analysis for large 3: Assume that
log( (N() B -
Then, based Corollary 1, we have
Var (8(1, y; 0) x
Var
max a fo(xz)) ii=I....N
The term above-i.e., the variance of the maximum of N weakly-dependent random variables-does not, general, admit a closed-form analytical expression. Moreover, depending on the tail behavior of the variables f'( the variance of their maximum may not even decrease with N.
Lemma 5 (Var(max; Zi) for exponentials). Assume 2r...., Zn itd. xe- Az for 2 0 and some
> 0, and define Mx 2 max;=1..... Z. Then:
N
Var (Mx) X
Σ
1
which converges to x² <62() as N + co, and hence does not vanish as grows.
The proof can be found in Chapter 8 of [94]. In general, unless one is dealing with degenerate cases with sharply truncated support (e.g., uniform distribution on 00, 1]. the variance the mean decays faster than that of the maximum of [//B] random variables [94, 95]. This completes the proof. G
A.4 Selection Sensitivity Analysis
In this section, we aim theoretically analyze the effect of the parameter 3 on the sensitivity of the inference-time time performance of the model LSEp (ar fe (xI:N)), where LSE B is defined as:
N
1
LSE AN)
log
Sq
(17)
B
N
A commonly accepted assumption in the analysis of whole-slide histopathology images is that often only small fraction of image patches may contain cancerous patterns yet this sufficient to label the entire slide cancerous. The remaining patches may contain entirely normal tissue.
Another widely accepted assumption that the values of o fo(#,) across different patches of an image T-i.e., for Bag(1 /) = (ær,.... x and some learned parameters f E @-exhibit statistical variation. For instance, for "normal tissue" patches æ; E N, the outputs are distributed around mean value μo, whereas for "abnormal" or "critical tissue" patches 2; i E C, they are distributed around a higher mean Me, with μee > μo. Here, N,, C C [N] form bipartition of the patch indices corresponding to normal and abnormal regions, respectively (so that [W] = N - [C]). In real-world scenarios, it typically the case that [C] N.
The variances of the aforementioned class-cone candiiooniiional distributions, as well as the mean gap μ4. Aa- depend on how well the parameters 0 have been learned during training.
In what follows, we argue that-independent the training quality (as captured by the class- conditional variances and the mean difference He choosing larger value of B leads to
23

---

improved accuracy bias and higher sensitivity, especially in the regime where |C] < N. Conversely, when [C] 2 ,,, selecting a smaller value of preferable. However, since the former condition (IC) & N) is the one that arises in practice, our analysis supports choosing larger values of B for better sensitivity.
Assumption& 2. Let I ~ Po denote a random image, and let (a (æI,...., ENN denote its random patches. Let Q1 be a distribution supported over [N] {0). Then, suppose that Ne Q1 denotes the number of abnormal patches in the image, which can be zero upon being a "normal" image. Then, there exist Ne unknown patches containing cancerous patterss, indexed by [N] if Ne > 0, and the remaining patches are normal, indexed by N = [N] \ C. For these patches, we assume:
a fo( Qn for i E fo Qe for i E C.
(18)
(19)
where Qn and Qu are unknown distributions satisfying the following:
(X) BQ, (X) for some known A > 0,
* Var((Qn), ca) S V for some known V 2 O.
No further assumptions are made about the distributions Q1, Qn, or Qu. since they all depend on the learned parameter E e
For simplicity, we threshold the value of LSEg(a o fo(21:N) for an image I at
T Me + Un
2
where values above this threshold are considered indicative cancer, and values below it indicate a normal image. While this threshold can be optimized in more complex settings, such refinements do not affect the core analysis presented this section. Also, consider the following standard definition for performance measure:
Definition 5 (TP/FP/NN/NN Rates of f). For a random image Po and corresponding bag of patch features .i..... N. and under Assumption 2, we define the true/false positive (TP/FP) and true/false negative error rates of a given parameter 0 E θ as follows:
True Positive rate is the probability LSEg (ar fe(ø1.N)) 2 given N: 2 1,
False Positive rate the probability of LSE,3 (ar fo (111:)) )) 2 T given N:
True Negative rate the probability of LSE, (o So (xI:N) T given N. O.
False Negative rate is the probability of LSE, (a (x))) < T given N. 2 1. Theorem 6 (Effect of 3 on Sensitivity). Let Assumption 2 hold for some unknown sub-Gaussian distributions Qo, Q1, and Q2. For E (0, 1), assume
2C E
log
N N.
No 2
(1
(
N No
N No21 1.221).
B 3
log log
20% V..
A
where Ca and C² have polylogarithiic dependence on a -1 and 7 E (0, a constant depending on the tail properties of Q1 and Q2 Then, we have TP 2 1 1 S No < N/2, assume that
Conversely, conditioned on
850
2N N
where the constants only depend on Q1 and Q2. Then, we have FN 2 1/2 conditionally.
Proof of Theorem 6. According Assumption and based the definition of log-sum-exp (LSE),
we have
1
1
LSEg(a fo(#1:N))
log
exp (B a fo(a;))
B
N
1=1
1
N
N gr, N
log
e
rr,
(20)
B
N

---

where
To d log
Σ
e
In d log B
Σ
(21)
Ne
N No iEN
with ......, AN.
hid Qo and
IN....INN-N.
hdd On Moreover,
To pe
1
log
M(n--e)
- pe + Age:
N-Ne Oli--Ma)
Fn = Pn +
log
A pr + Aqn.
(22)
B
N
- N
==1
where Age and Agn are the 3-LSE of Ne and N N: zero-mean sub-Gaussing Gaussian random variables, respectively. is known that as 3 ranges from 0 to +o0, the expected values E[Aqe], B[ grow from to (( log No) and (VVVlog(M N.)), respectively [96]. Additionally, their variances vanish at the rate (N.: N- No) for some 7 (1/2, 1) depending the tail behavior of Q. and Qn. Therefore.
(gq. S C. C.VV No N. Aq S C. C.V. CoVV(log( No) + (N - -N,) 2 a/2,
and
P P(Ag. -C C. Aq, 2 - No) 21 a/2.
for all a E (0, 1). where C. has polylogarithmic dependence a -!
Guarantee on TP rate:
With probability at least - given No, we have
LSEş(a fo(Ø1.N) Pn A log(N/No)
1
log (oedie+ (N- No
(NNN. c c- c
B
18
No
M2 + A log(N/Ne
Age
B
Log(N/N.)
2 Pn
C. C.V.N
(23)
B
Thus, to ensure LSEg(a fe(œ1:N)) 2 T, it suffices that
log(N/No)
B A C. CaVVN.
Taking expectation over No, it suffices that
20' E [og(N/ No 2 1]
3
A 2C VV..V
which implies TP 2 1 a. This proves the first part.
Guarantee on FN rate: Next, we show that small values of 3 sharply degrade the TP rate, leading to an increase in FN rate. When 3 is small, the distributions of Aqe and Aqn are nearly symmetric. This directly implies that 9-LSE value is symmetrically distributed around
No euo +
N N cp -Noceun
log
N
Therefore, conditioned on N. 2 1, we consider the case where
log
No
Bue +
N No
<
He + Hn.
3
N
N
2
25

---

which implies FN 2 1/2. Using Taylor expansion for small 3:
+
No
N
No
2
log
2
3
N
N
No
No
N
No
Me.
+
3p2
+
Mn +
B1 + 0(3)).
(24)
N
2N
N
2N
Rearranging yields the sufficient condition:
A (1 2N=
B
N 1 + N (A2 A)
which guarantees a conditional FN rate of at least 1/2. This completes the proof.
Theorem shows that selecting sufficiently large value of ensures an arbitrarily high true positive (TP) rate. Specificallyy setting, >> O log N)-with constants depending only polylogarithmically on the target confidence level-is sufficient achieve any desired TP rate. Conversely, in the presence of noise, choosing small 33 leads to substantial false negative (FN) rate, significantly degrading performance. Therefore, the theorem recommends using large values of 3 to ensure robust sensitivity.
B
Algorithms
B.1
Maxsoft
To avoid using complex notation, we explain our algorithm on a binary classification problem. With simple modifications, method can be extended other MIL problems such multiclass classification or regression.
As defined, LSE,, is an aggregation function in form of
(g VN) B
log
(25)
represents a scalar instance value in the range [0,1]. 1]. For simplicity, we denote LSE,(g as LSE,(Q)...., We can see that
ØLSE
8q.
(guN)
0qi
N Σj=
which is simply the Softmax funetion when applied to Q1, .h.....th QN-
In multiple instance learning of WSI we aim to train a model to reduce LLSE(()) with respect to (see Definition 3). Let us introduce likelihood probability with
Pj P(yj = 11T P(y; = 1
(26)
rephrasing LLSE(O) as 1 ΣØ-1 (ys [l:)). We specifically use the cross entropy loss function for C.
In Maxsoft, perform the forward pass with p5 max;(q))) "
R)) Afterward, in the backward step, we approximate (LSE(() by replacing the max aggregation operator with LSE,3 More precisely, approximate VøLLSE
OC Pp:
(max(((.w) Softmax(gl.w)) J J (0).
VoLESE RJ
(27)
where J is the Jacobian matrix. Notice that in case calculated the original gradients, the Softmax
term would be replaced with the max gradient (which due to non-differentiabiiiiy has instable
behavior) and in case we initially used LSE in the forward pass, 8p, (max (
ac
(1:N)
would be
replaced with BL. (LSE, (i:N) Op:
26

---

Algorithm Multiple Instance Learning of WSI with Maxsoft
1: Input: WSI Dataset D { y1), (Ins Vn))
2: Input: 3: Hyperparameter for LSE,
3: Input: ViT: Frozen Vision Transformer feature extractor
4: Input: fe: Trainable MIL classification head
5: Input: a: Step size (learning rate)
6: Output: fe-: Trained model
7: for each training epoch do
8: for = do
9:
Extract patches {X X N from image Ij
Obtain features { () ViT(X*
)
Compute instance-level scores q: (fo ) for i = =,........ ,,...,N N
11:
Compute bag-level prediction: Pj max (1:N) (which is also test time prediction)
13:
Compute loss C(y
14:
end for
15:
Compute gradient approximation:
a Oc (Y,ll max(g
VOLISE ~0
Σ j=l
(1)) Softmax(g (
(0) 911
Op,
Update model parameters: 0 a VOLLSE
17:
end for
Return trained model: 0* 0
19:
return fo-
Algorithm PerSlide Augmentation for WSI Tasks
1: Input: WSI Dataset D ((1,,1)),... (In, Bo)]. Augmentation functions T = (TI, Tm
Epochs E, Number of instances per data point N
2:
Output: Trained model
3: for epoch t 1 to E do
4: Initialize augmented dataset Dime +- 0
5: for each I, E D do
6: Sample augmentation t ~ Uniform(? TT)
7: Apply to the whole image 7, to get T
8: Add (T, to D
9: end for
10: TrainOneEpoch( D, t)
11: end for
27

---

Algorithm 3 PerPatch Augmentation
WSI Dataset D (1).. (In, vn)) Augmentation functions {TI..... Tm Epochs E, Number of instances per data point N, ViT Frozen Vision Transformer feature extractor
Input:
2:
Output: Trained model
3: Precompute Stage:
4: for each image I, D do
5: Set first augmented image variant as the original 1, +- 4
6: for each augmentation 7x E T, where .....: m do
7: Initialize augmented image variant n(() +- 0 for each patch X, T; where 1.2, N do
8:
Apply augmentation: xx(h) Tx (X3)
9:
Compute embedding for further optimization: z) ViT(x
10:
11: Add = to ((4)
12: end for
end for
14:
end for
15: Training Stage:
E do 17: Initialize augmented dataset Di t- 0 for each image E 1) do
for epoch
19:
Initialize empty set I; 0 for each patch X, I where j 1,,,...,AA do
20:
21:
Sample augmentation index it ~ Uniform m))
Retrieve embedding z; from r(())
22:
(k) Add s; 24: end for
23:
7;
25: Add (I,,6)) Wi) to D.
26: end for
27:
TrainOneEpoch( D, t)
28:
end for
For cases with multiple classes simply modify MLP's linear head to have multiple heads for each class (or in the worst case for architectures which differ from MLP, multiple classification head and Maxsoft per class), extending equation 26 for cases with y k. To further facilitate the usage of our Maxsoft aggregation function, we provide a simple Python implementation of in the paper. It can be easily integrated into any code like other Pytorch [97] layers.
28

---

C PyTorch Implementation of Maxsoft Pooling
Listing presents the PyTorch-style implementation of Maxsoft pooling.
Listing 1: Pytorch-style implementation for Maxsoft
class MaxSoftmaxSTE (torch (torch autograd. Function): @staticmethod
def forward (ctx, imput, beta):
# Save the input tensor for backward pass saxesfae_oor_ aooo_bbaaaarddd (ackuard(input) ctx.beta beta
# Perform the forward pass (select maximum value) max_val, torch max (input, dim=0)
return max_val
@staticmethod
def backvard prad_output): # Retrieve the saved input tensor input, ctx. savedd beta = ctx. beta
# Compute the Softmax Softmax_grad torch. Softmax (input beta, dim=0)
the input for gradient
# Multiply the incoming gradient (grad_output) by # the Softmax weights
grad grad_output Softmax_grad
return grad, None
D PerSlide vs. PerPatch Figure
Figure 5 contains visual comparison of the difference between PerSlide and PerPatch augmentations.
AugmentedPatehes
Embeddings
Fleski
Sampling Patch
Encoder
Jiter
Sampling
Per Slide
Orla
Figure 5: Comparison of PerSlide and PerPatch augmentations: PerSlide applies single augmenta- tion uniformly across all patches in a WSI, whereas PerPatch independently selects an augmentation for each patch from multiple variants, resulting in substantially higher diversity during MIL, pooling training.
29

---

E
Datasets
CAMELYONI6 and CAMELYON17 are large-scale WSI datasets introduced for benchmarking automated methods in detecting metastatic breast cancer in lymph nodes, Developed for challenging settings, they serve as standards for evaluating tumor detection algorithms in histopathology. Au- tomating this task can reduce pathologist workload, improve diagnostic consisteney. and mitigate subjectivity [78, 35J. CAMELYON16 includes two
and tumor-whil CAME- LYON17 includes four: normal, macro, micro, and ITC. The ITC class (isolated tumor cells) is especially challenging due to its sparse, small tumor clusters (<0.2 mm or <200 cells). Both datasets are difficult because tumor regions occupy only small area in positive WSIs. CAMELYONI6 pro- vides an official labeled test split and pixel-level annotations for all WSIs, whereas CAMELYONI7 lacks test labels and includes pixel-level annotations for only 100 of its 500 training WSIs.
-CGA-Lung is a subset of The Cancer Genome Atlas (TCGA) comprising WSIs from two lung cancer subtypes: Lung Adenocarcinoma (LUAD) and Lung Squamous Cell Carcinoma (LUSC). After filtering out low-quality slides, the dataset includes 1,042 WSIs LUAD and 512 LUSC. key characteristic is that tumor regions occupy the majority of each slide. Additionally, most patients contribute multiple WSIs [79]. Pixel-level annotations are not available.
SICAP-MIL is a publicly available dataset designed to benchmark MIL-based approaches for prostate cancer grading in WSIs. It includes biopsy slides from 271 patients, scanned at 40x and tiled into overlapping 512 x 512 patches at 10x resolution. Each slide is globally labeled by expert pathologists with primary and secondary Gleason grades, reflecting the dominant tumor patterns. The dataset also introduces proportional constraints that represent the relative occurrence of each grade, supporting the development of constrained MIL methods that can rival fully supervised models. Slides are labeled as normal or abnormal and further annotated with Gleason grades (GG3, GG4, GG5). In abnormal WSIs, tumor-associated regions are present in significant portion, though not the majority of the slide. Exact pixel-level annotations are not provided [80].
F Additional Experimental Setup
CAMELYONI6 and CAMELYON17: WSIs are tiled into 256 x 256 non-overlapping patches 20x magnification, with background regions excluded following [67]. For CAMELYON16, we use the official test split. As CAMELYONI7 lacks an official labeled test set and includes one low-quality slide, we discard that slide and randomly split the remaining data into approximately 60% training, 15% validation, and 25% testing, using the balanced splitting protocol from [78, 35, 98). Specifically, we ensure each split has a roughly equal number of Normal, Macro, Micro, and ITC samples.
For CAMELYON16, train on 50 WSIs and evaluate on the full set. For CAMELYONI7, we the 99 high-quality annotated WSIs, as region-level annotation is climically most relevant. This limited- WSI setup emulates extreme low-data regimes typical of rare cancers (070 WSIs/type [99]). The CAMELYON16 patching yields =s 1.5M patches, averaging 77,900 per WSL For CAMELYON17, obtain 880k patches, about 8.000 per WSI average. Patches overlapping annotated tumor regions are labeled tumor; all others are labeled normal. Each model is trained from scratch five times, and we report means and standard deviations for all metrics. We binarize CAMELYONI7 following [14], treating ITC-llbeled WSIs as tumorous. This is the most challenging setting, as some ITC slides contain only one two tumor patches. For experiments using the complete versions of these two datasets, see Appendix P.
WSIs are tiled into non-overlapping 256 x 256 patches at 20x magnification, excluding background regions. This results in approximately 3.5 million patches, averaging around 3,500 patches per WSI. The dataset is roughly split into training (60%), validation (15%), and test (25%) sets and enforce patient-level grouping, whereby all slides from a patient are assigned to a single split (no cross splss- leakage) [79].
TCGA-Lung:
SICAP-MIL:
Each 512 x 512 patch divided into four 256 x 256 patches, yielding approximately
34,000 patches in total, with each WSI containing around 100 patches on average. Each model is trained from scratch five times independently, and we report the mean and standard deviation for all performance metrics [80].
30

---

G
Calibration Metric ECE
Let Bn denote the set of indices for samples with prediction confidence in the interval Im m==1
m
The accuracy within bin Bm is defined as:
M2
M
Σ IE
1 = yy);
(28)
1m
where y; the predicted label and yt is the ground-truth label for sample i. The average confidence in bin Bm is:
conf(
Σ Ps.
(29)
Bm
ie i
where P; denotes the predicted confidence for sample i. The Expected Calibration Error (ECE) is computed as:
M
Bml
ECE
(30)
where n is the number samples.
perfectly calibrated model satisfies acc Bm) = conf( B,.) for m, resulting in an ECE of 0 [100].
For instance, both p. with y: and p. O with Ús F y: contribute lower BCE [15].
H
Implementation Details
H.1 MIL Models
For DINO Domain [64] train a ViT-S/16 from scratch on all patches from training WSIs using the default hyperparameters from the official DINO repository [64]. For SICAP-MIL [80], we apply the same default settings for ViT-S/16.
CAMELYONI6, CAMELYON17, and TCGA-Lung [78, 35, 79], we
For all MIL methods, including Maxsoft pooling, we tune learning rate, weight decay, and weight initialization using the validation set. The best configuration is selected based on validation per- formance. No early stopping is applied. All models are trained for 500 epochs using the AdamW optimizer [101] with default parameters unless otherwise specified.
CAMELYON16. DINO Natural (LR 0.002, WD 0.05, Xavier-uniform); DINO Domain (LR 0.1, WD 0.05, truncated-normal init); UNI (LR 0.02, WD 0.05, Xavier-uniform); Prov-GigaPath (LR 0.02, WD 0.05, Xavier-uniform)
CAMELYONI7. DINO Natural (LR 0.02, WD 0.005, Xavier-uniform) DINO Domain (LR 0.1, WD 0.05, truncated-nomen truncated-normaa);; UNI (LR 0.02, WD 0.005, Xavier-uniform); Prov-GigaPath (LR 0.02, WD 0.05, Xavier-uniform)
TCGA-Lung. DINO Natural (LR 0.02, WD 0.05, Xavier-uniform); DINO Domain (LR 0.002, WD 0,005, truncated-normaa);; UNI (LR 0,002, WD 0.05, Xavier-unifor)); Prov-GigaPath (LR 0.1, WD 0.05, orthogonal).
SICAP-MIL, DINO Natural (L.R 0.02, WD 0.05, orthogonal); DINO Domain (LR 0.002, WD 0.005, Xavier-uniform): UNI (LR 0.002, WD 0.05, truncated-normal), Prov-GigaPath (LR 0.1, WD 0.05, trunattd-normal),
H.2 Augmentations
Base PerPatch augmentations comprise Random Rotation, Random Gaussian Blur, and Random Color Jitter, selected per our analyses Appendix and Table 4; hyperparameters are dataset- specific: CAMELYONI6 LR 0.1, WD 0.05, Xavier-uniform: CAMELYONI7 0.I. WD 0.05,
31

---

orthogonal; TCGA-Lung LR 0.1, WD 0.05, orthogonal; SICAP-MIL- LR 0.1, WD 0.05, truncated- normal. All MIL models are trained with bag-level labels only. Experiments use PyTorch 2.1 and scikit-learn on an RTX 4090 [97].
H.3 Augmentations and Architectures
We further extend our range of experiments assess the effect of different augmentation methods on various MIL pooling architectures on the CAMELYONI7 and SICAP-MIL datasets [80]. As shown in Table 6, our PerPatch augmentation method demonstrates AUC improvements in most setups. Among the previous methods, AugDiff [62] shows performance stability across multiple architectures, whereas MixUp methods [55, 56] exhibit poor performance in some settings.
Table 6: The effect of various augmentation methods across MII. architectures on the Camelyon17 and SICAP datasets.
CAMELYON
Asgrertatin
FOD postry
Tacin pontrc
BCS
LSU porting
ECE
Micoll podiing
ReMic (MS4Uj0
7:5 as
08345
203
15:15
155
0 106...
(.723
01.63 pm
0868 (N6
0.179
0.577
0.315
3:3.2 k17
AggEAff
3:422
0. 168
966
0..47
0 188
0.838
0.06T
18000
0.189
8.860
1550
8.506.09
3.101
SARDL
1.280
am
11.35 a07
I4827
IL583 mm
16.26 am
112077 Am
53901 123
SICAPAB
ALC
AUC
8CB
ABC
ECB
BCB
ABC
BCE
ABC
BCB
AEC
EXE
0,105 4x
0.56.ss
0.500
RasiMic (hii
11355
03000
AxgDXf
0.801
0.
200
8.04] om
0.724
0 2500..m
0.225
3,000
0,031
0.888m
PaPridi
0.870
0.
0.810
0.881
0 0.219
0882
0.115
0.000
0.186
0.860
0. 0.110mm
0.800
0.239
I Augmentations Descriptions and Samples
Figure 6 presents examples of four CAMELYONI7 [35] patches augmented with Random Rotation, Random Elastic Deformation, Random Affine Transformation, Random Gaussian Blurring, Random Color Jitter, and Random Memattxxllin-Eoiin-DD
(HED) Jitter [59, 62]. The augmentations defined as follows: Random Rotation: Rotates the image by a random angle within a predefined range. Random Elastic Deformation: Applies spatially varying smooth deformations to simulate clastic distortions. Random Afline Transformation: Combines translation, rotation, scaling, and shearing. Random Gaussian Blurring: Convolves the image with a Gaussian kernel reduce high-frequency noise. Random Color Jitter: Randomly modifies brightness, contrast, saturation, and hue. Random HED Jitter: Perturbs the HED color space representation to simulate staining variations [59, 62].
J Augmentation Quality and Complexity
In this section, we evaluate the effectiveness of Base augmentations using four key metrics: FID, Density, and Coverage.
FID (Fréchet Inception Distance): FID is a widely used metric that quantitatively compares the distribution of generated images against real images in deep feature space. In the context of image augmentation, FID helps assess how well the augmented images capture the underlying data distribution of the real dataset. A lower FID score indicates that the augmented images are closer in distribution to the original images, which implics that the generative model produces realistic and coherent augmentations. A good FID score suggests that the additional images maintain the essential visual characteristics of the real-world data, thereby potentially improving the downstream performance of learning algorithms [102].
Density:
The density metric measures how densely the generated images occupy the feature space relative to the real images. In image augmentation, high density implies that the synthetic images generated by the model are not only realistic but also well-aligned with the clusters of real images in the feature space. This alignment is critical, as it suggests that the augmented images reinforce the intrinsic patterns found in the data rather than creating spurious or outlier representations. Evaluating density helps to understand whether the augmentation process is introducing variations that are
32

---

Original
Random Rotation
Random Gaussiun blurring
Random Color Jitter
Random Aftine
Random Elustic Deformation
Random Hematoxylin- Bosin-DAB
Transformaion
(a)
(b)
Figure 6: Augmentation schemes (a) sample CAMELYON!7 patches (b) augmented versions of the
same patches.
plausible and beneficial for training robust models, ensuring that the augmentation enriches the dataset with high-qualigy representative samples [103].
Coverage: Coverage evaluates the diversity of the generated images by determining the proportion of the real image distribution that is covered by the synthetic samples. In the realm of image augmentation, high coverage indicates that the method is capable of producing a wide range of variations that collectively span the real data manifold. This is particularly important when the goal is to enhance a dataset by introducing new variations that help prevent overfitting and improve generalization in downstream tasks. A model with good coverage ensures that the augmented dataset not biased toward a narrow subset of the data distribution, thereby providing a more comprehensive training set that captures the full spectrum of variability present in real-world images [103].
Table shows that Random Hematoxylin -osiiin---Ein-D--BBBB (HED) Jitter exhibits the lowest Density and Coverage and the highest FID. Despite its cathhllgy-speccffi design, this augmentation neither reduces slide-level AUC variance nor improves ECE, indicating that the transformations introduces do not reflect realistic imaging variability. In general, augmentations with higher Density and Coverage and lower FID perform better, as illustrated by the strong results of Random Rotation, Random Gaussian Blur, and Random Color Jitter, and the poor performance of Random Elastic
33

---

Deformation and Random Affine Transformation (see Table 5). We attribute the latter two failures to their limited relevance to real-world slide variations. Collectively, these findings indicate that the most effective strategy remains PerPatch combined with Random Rotation, Random Gaussian Blur, and Random Color Jitter.
Table 7: Quality Metrics for different augmentations on the CAMELYON17 dataset. The results are reported in the form mean,atd.
Augmentation
FID
Density
Coverage
Random Rotation
73.801 799
0.785 u00
0.999p.u0z
Random Elastic Deformation
274.585 951
0.353p 162
0. 0.6366.18 185
Random Affine Transformation
135.422, 42574.2200
0.434
0.858p.10s
Random Gaussian Blurring
6.842,, 197
0.986o .000
0.999..000
Random Color Jitter
30.085;.60
0.672o 063
0.997o.00
Random Demaatoyylin-Esinn-De (HED) Jitter
2395,841296.3mm
0.000p.000
0.001o.001
K UMAP of Patch Embeddings Based on Encoder
Figure presents UMAP visualizations patch representations obtained from DINO Natural, DINO Domain, UNI, and Prov-GigaPath on four test samples from the CAMELYONI7 dataset. In general, as the strength of the representation encoder increases, the embeddings exhibit improved clustering by both label and patient, reflecting higher feature discriminability and domain alignment.
(a)
(b)
(c)
(d)
Figure 7: UMAP of representations. (a) with Dino Natural (b) Dino Domain (c) UNI (d) Prov- GigaPath.
L Error Analysis
L.1 Error Analysis on UNI for CAMELYON17
As we can in Table 1, the results of UNI the CAMEYON17 dataset are low. This is an exception to our finding that the better the representation encoder (in particular the more data it has been trained on) the better the perofrmance of the MIL pooling. Through an error analysis we found that the problem with UNI comes from the fact that it cannot generalize well in WISs with extremely low tumor regions (mostly ITC and then Micro subgroups). This only happens in CAMELYON since only this dataset has such small tumor regions and probably comes from the fact that UNI's autopsy WSIs do not provide such samples. The results can be found at Table 8.
L.2 Error Analysis for Augmentations and ECE on CAMELYON
When Per-Patch augmentation is applied to the sparsely annotated CAMELYON17 WSIs, the network is repeatedly exposed to heavily transformed, minute tumorous regions. This increased morphological diversity strengthens its ability to recognise genuinely positive tissue and, as result, raises accuracy on slides that contain tumour (Table 9). The same shift, however, slightly erodes performance on the overwhelmingly abundant tumour-free free slides: features that were previously dismissed as benign now more readily interpreted as malignant, leading to a higher false- positive rate. original claim. The model
From a calibration standpoint, the effect is likewise inverted relative becomes better calibrated on the rare, hard positives-ccoffidnnce confidence scores now align closely with their improved correctness- but it grows over-confident negatives, which dominate the data distribution
34

---

Table 8: Accuracy results for each subgroup in CAMELYONI7 UNI representaton encoder.
Method
Slide
ITC ACC
Micro ACC
Macro ACC
Negative ACC
max pooling
0.531 .18
0.604 443
0.535.30 .399
0.787,211 .217
mean pooling
0.484 .880
0.667 .337
0.514, 1,614,18
0.758, 162
ABMIL
0.417 .358
0.583, .488
0.542.400
0.681 .350
DSMIL
0.521 .17
0.604
0.535, ,393
0.821 .49
Maxsoft pooling
0.713, 184 184
0.308 3335
0.753
0.816, 1229
yet see fall in accuracy. Consequently, the overall ECE still increases, though the underlying driver is the miscalibration of negative patches rather than of positives.
In short, Per-Patch augmentation sharpens decision boundaries around the scarce tumour class, boosting sensitivity and reducing inter-run variance for positive findings, while sacrificing portion of specificity on normal tissue. Post-hoc calibration targeted at the negative majority- e.g. temperature scaling on a validation set enriched for benign slides-offers a principled way to retain the newfound robustness to tumour heterogeneity without compromising probabilistic reliability.
Table 9: Accuracy results for each subgroup in CAMELYONI7 with DINO Domain representation encoder with and without Augmentation.
Method
Slide
ITC ACC
Micro ACC
Macro ACC
Negative ACC
Maxsoft pooling No Aug Maxsoft pooling PerPatch
0.713 184
0.308 _3358,33 0.500. 235
0.753.30 .433
0.816 129
1.000. 0000
0.500 .235
0.750,om
M
Additional ROI Detection Images
Figure 8 shows additional examples of patch-level classification on the CAMELYONI7 dataset [78, 79). Consistent with previous results, max pooling and Maxsoft pooling yield the most accurate ROI detections, while mean pooling performs noticcably worse.
N Sensitivity to Data Quality
Although our datasets are high quality and processed under stringent protocols, simple visual inspection can verify their appearance; to test whether the underperformance of Transformer-based models in current. data regimes stems from data quality, reran all CAMELYON17 experiments under varied JPEG compression levels (50; 75-the the common setting used in Tables 1; 100-the highest) and with Gaussian blur quality corruption. The results in Table 10 replicate prior trends: neither decreasing nor increasing quality alters Transformer behavior, rejecting data quality as the cause of Transformer-basee MIL deficiencies in current data regimes.
Experiment on Classical MIL Pooling Functions
We evaluate major classical MIL pooling functions on CAMELYONI7 [35] to assess their effective- ness for WSI classification. As shown Table 11, Maxsoft achieves the best slide- and patch-level metrics (except patch-level on DINO Natural); noisy-or performs poorly [43], ISR excels on patches, and smoothmax lies between LSE and Maxsoft, smoothmax remains without theoretical analysis; intuitively, its weaker performance may arise because its gradient weights instances by deviation from the current smoothmax value rather than Softmax-based importance, potentially hindering credit assignment relative to Maxsoft's 'ss direct Softmax path and motivating future theoretical study.
35

---

(a)
b
(c)
(d)
Figure 8: Overview of additional ROIs identified on representative WSIs from the CAMELYON17
dataset [35], using (a) max pooling, (b) mean pooling, and (c) Maxsoft pooling.
Table 10: MIL pooling performance under varied JPEG compression levels and Gaussian blur corruptions.
Method
JPEG 50
JPEG 75
JPEG 100
Gaussian Blur
AUC
ACC
AUC
ACC
AUC
ACC
AUC
ACC
max pooling
0.737
0.617
0.767
0.800
0.792
0.810
0.763
0.717
mean pooling
0.790
0.696
0.897
0.700
0.890
0.700
0.853
0.667
ABMIL
0.697
0.600
0.750
0.683
0.805
0.750
0.737
0.650
DSMIL
0.803
0.683
0.833
0.800
0.891
0.825
0.807
0.750
Snuffy
0.745
0.570
0.755
0.650
0.852
0.830
0.769
0.665
LSE pooling
0.857
0.783
0.850
0.800
0.923
0.817
0.863
0.800
Maxsoft pooling
0.970
0.883
0.983
0.867
0.987
0.950
0.963
0.883
P Full-Data Experiments CAMELYON
For completeness, we report results from training on the full CAMELYONI6 (80% train, 20% validation) and CAMELYON17 (60% train, 20% validation, 20% test) with 5-fold cross-validation. rather than the subsets in Appendix F, across MIL. pooling architectures Table 12 and augmentations in Table 3. Even in this setting, while some gains appear, the overall trend holds, and Maxsoft continues surpass prior methods. Together with Tables and 3, these results indicate that Maxsoft improves generalization regardless of data availability, consistent with its inductive bias.
Out-of-Distribution Generalization (CAMELYONI7 CAMELYONI6)
While our primary focus in-distribution generalization. motivated by growing interest in out-of- distribution (OOD) generalization, we report OOD generalization results by training on CAME- LYON17 [35] and evaluating on CAMELYONI6 [78] with no exposure to the latter during training. As shown in Table 13, Maxsoft again overall surpasses prior methods, consistent with the established observation that stronger in-distribution accuracy often correlates with improved OOD performance [104-107]. A notable exception is DINO Domain, where mean pooling outperforms all methods and even its counterparts with other encoders. We hypothesize that because CAMELYON17 contains positive slides with only single malignant patch, many models (including Maxsoft) become overly
36

---

Table 11: Performance of major MIL pooling functions on CAMELYON17.
Eneoder
Method
CAMELYON17
Slide
Patch
AUC
ACC
F1
ECE
AUC
FI
LSE pooling
0.683 .93
0.600 087
0.654 .700
0.361 .075
0.168,20 291
0.040,069
DINO Natural
GM pooling
0.670 o17
0.700, .000
0.700 .00
0.166 023
0.643,omz
0.034.g00
ISR pooling
0.620.csv
0,600
0.533 .00
0.213 uz2
0,453,cm o46
0,035.g60
noisy-and pooling
0.607 .oos
0.583 .28
0.625 .000
0.095 0o3
0.655.om 002
0.049.000 .000
noisy-or pooling
0.500.com
0,500
0. 0.000 .000
0,500 000
0.568.
0.021 0008
smoothmax pooling
0.643,owr .400
0.583, 104
0.714, 031
0.248 .o5
0.505,00 .15
0.000,goz
Maxsoft pooling
0. 0.710 o10
0.650
0.658 .083
0.345 040
0.312,024
0.000.000
LSE pooling
0.850, .ro
0.800 .550
0.833 .21
0,185 068
0.836 026
0.499.
DINO Domain
GM pooling
0.867 .233
0.717,029
0.822 .003
0.136.106
0.800,012
0.303.
ISR pooling
0.863 ps1
0.683 029
0.812 .44
0.198 pas
0.796.om
0.206
noisy-and pooling
0.873.o0 .06
0.650,o00
0.842 .37
0.169 p2s
0.799.014
0.055.g03
noisy-or pooling
0.500.co
0.500, om0
0.000 .000
0.500 poo
0.646,
0.029..11
smoothmax pooling
0.803 oos
0.583, ore
0.703 118
0.302 p6a
0.774,026
0.292 058
Maxsoft puoling
0.983 oss
0.867.cm orre
0.935.c o32
0.121 o5
0.839.om .199.019
0.386
LSE pooling
0.603.g 351
0.617.2e
0.628 4000
0.386 230
0.709 213
0.210.
GM pooling
0.730.121
0.667, 144
0.744 .997
0.114 0144
0.700. 165
0.030.o12
ISR pooling
0.607 235
0.583.1s9 189
0.712 pos
0.397 .176
0.830
0.186
UNI
noisy-and pooling
0.727 138
0.633, 126
0.769 .099
0.191 Los3
0.616.154
0.036.g14
noisy-or pooling
0.500.coa
0.500 _000..00
0.000 p000
0.500 poo
0.642, 121
0.028.g20
smoothmax pooling
0.537
0.533, 104
0.573 .33
0.346.148
0.650.268
0.204.352
Maxsoft pooling
0. 0.753.or ,711
0.750 205
0.779, 040
0,238 172
0.786, 255
0.476 4.9
LSE pooling
0.933.ca1
0.900.a50
0.932. .27
0.095.pa p48
0.943.004
0.741. 108
Prov- GigaPath Path
GM pooling
0.900 os0
0.767
0.825 107
0,135 029
0.915.00
0.374
ISR pooling
0.930,c oo8
0.867 .29
0.893 053
0.1 0.144 oss
0.916.02 026
0.658, 165
noisy-und pooling
0.893 pos
0.783 o29
0.881 aass
0.150 oru
0.836 0116
0.138 oos
noisy-or pooling
0.500.com
0.500,000
0.000 g00
0.500 poo
0.757 130
0.301 Lo21
smoothmax pooling
0.917.ng .22
0.700 050
0.889 8000
0.245 p21
0.930.co .04
0. 0.704.cm
Maxsoft pooling
1.000 noo
0.933 .22
1.000 .000.000....
0.062 022
0.948 on9
0.744.084 084
sensitive, whereas mean pooling is less affected. This explains mean pooling's 's advantage within DINO Domain; its superiority over all encoders, however, warrants further analysis.
R MIL Datasets Out of Pathology Context
To evaluate the broader applicability of our approach beyond the pathology domain, test proposed method-alongside prior pathology MIL methods-on classical MIL benchmark datasets. These include MUSK] and MUSK2, which model molecular binding: each molecule is represented by multiple conformations and is labeled positive if at least one conformation binds to a target protein, though the binding instance is not identified.
Animal-based datasets follow a similar MIL assumption. The Elephant dataset comprises 200 bags (100 positive, 100 negative), where each bag contains instances derived from segmented image features. A bag is labeled positive if it contains at least one elephant instance. The Tiger and Fox datasets follow the same structure, with bags labeled positive if they contain at least one instance of a tiger or fox, respectively. Instance-level labels are unavailable all cases ooles-only bag-level supervision is provided [108, 109].
Following standard protocol [108, 109], we conduct 10-fold cross-validation with five runs per fold and report the mean and standard deviation for each metric.
37

---

Table 12: MIL pooling results on the full CAMELYON and CAMELYON17 datasets [78, 35].
Mediod
CAMELYON16
CAMELYONI7
Eaooder
AUC
ACC
F1
ECE
ADC
F1
AUC
ACC
F1
ECB
pooling
0.72%
0,079,352
1.701.223
01.48.a15
0.718
0.633
0,232
meen pooling
0.619
0.713
0.4
0.692. 292
0.939 000
0.328 am
0.738 803
0.720kxco
0.820
0.060 o00
ABMIL
0.857
0.808
0.758
0.143
1.610
11358
0.736
0.777
0.723
0.255
DSMIL
0,768.123
0.702ccs
0.677).u7
0.083,011
13545
pu136
0,753.117
0.707
0.630.1m
0.127
DINO
Snufty
0.792
0.767
0,706
0.053
0.712
0.216
0.708 as4
0.503
0.700
0.111
SS pooling
0.864
0.816
0.733
Maxsoft pooling
0.0 0.911am
0.856
0 9:84 o13
0.110 092
0.509 p04
0 ms
0.883 o11
0 0.827.8m aas
0.749 oos
0, 0.207
pooling
0.886
0.853
0.952
0.055
0.902
0.650
0.918
0.005
0.857
0.053
DINO Domuta
mean pooling
0,022.000
0.007.c0
0.413.00
0.023 0z5
0.743.001
0.037
0.1022
ADMIL
0,308
0.554
0,500
0.046
0.540
0.687 215
0.889
0.870
0
0.111
0.963.ass
m.144mm
0.860
Soutty
0,827
0.887 co
0.750
0.125
0.501 co
0.407 ac
0.003 aes
0.758
0.813
0.125
LSE pooling
0,078
0.952
0.951
0,058
0.948
0.731
0.031
0.507
0,852
0.054
Macsoft pooling
ms
0.961 am
0.968 cms
0.037. m9
0.055 cm
0.0541o0
0.954 m1
0.927 am
0.904 cos
0.027 1996
max pooling
0,3866,05
0.974
0,5883.12
0.027.313
p.2000.07
0.662
0.827
0.88T
0. 0.864
0.150
pooling
0.683
0.594
0,370,
0.621 pme
ABMIL
0,977..15
0.588 oo
0 om
0.001
0.928 cc
0,397
0.804 so
0.517 mm
0.791
0.146
DSMIL
0.071,m12
0.961.co
0,836
0.057.345
0.717
0.177
0.874..4
0.907
0,840
0.130
Snuffy
0.931 usa
0.8
o.050
m.
0.597 mm
0.932 aPs
0.906
0. 8.875
1.006 mm
LSE pooling
0,9833
0.969 con
0
0,002
0.967
0,558
0.806 ass
0,540
0,784
0,180
Massoft pooling
cm
0.957 non
2013
max pooling
0,3
0.560
0.977
0.017.305
0.556 u0
0.008 pea
0.943
0.921 azi
0.157 aun
Poo-Gigabhh
pooling
0,540.a30
0.594.07
0,379
0,335,324
0L855
0.231
0.813
0.770
0,670
0.140
ABMIL
0.082.as
0.964 ro4
0.9088
0.051.32
0.965 ce
0 0.688 124
0.063 ax
0.960 mn
0.057 a17
0.050 mm
DSMIL
0,977
0.1544
0.945
0.118.34:
0.500
01125
0,909
0:947
0.946
0,041
Snuffy
0,962
0.902.mm
0.121
0:922
0,8700
0.0700.sx
LSF pooling
0.380aa1
0.972 cm
0.9770
0.028 s1
0.962 pm
0.902
0.908 ser
0:950 ars
0. 8.900 ass
0.271
Massoft pooling
0.968
0.974am
os4
0.965
0.536
0.906
0.971
RCT MIL
0,013,a3
0.869 cee
0.832
0.117,351
0,702 p4s
0.800 un
0. 0.735)
0,200 ams
R'T-MIL
0.146.11
0.891
0.873aus
0.095,1a3
0.806
0.800
0.857
0,108
PANTHER
01836
coe
0.140,p35
0.890 nss
0.845
am
As shown in Table 14, Maxsoft pooling outperforms all baselines nearly every dataset, achieving an AUC of 1.0 on MUSKI. The observed gap between AUC and accuracy is likely due to using a fixed decision threshold rather than tuning per dataset. These results demonstrate the versatility and strong generalization of Maxsoft pooling as a broadly applicable MII. aggregation method.
38

---

Table 13: OOD generalization results from models trained on CAMELYONI7 and evaluated on CAMELYONI6.
Method
CAMELYON16
Encoder
Slide
Patch
AUC
ACC
F1 Score
ECR
AUC
Fi
DINO Natural
max
0.541.oss
0.587 o6s
0.458.gor
0.158 oss
0.379.08s
0.000..00
mcan
0.504.o02
0.442 000
0.409
0.189
0.388
0.093.0o
DSMIL
0.527
0.550.cm o47
0.391 .211
0.235 oso
0.577 .17
0.154. ose
LSE
0.579.o1s
0.558.our o1a
0.507 osa
0.149.oc .0a
0.297 Joos
0.006.on
Maxsoft
0. 0.594.004
0.589
0.502.or
0.187.115
0.327 oo3
0.007 .002
DINO Domain
max
0.477.os3 oss
0.390 oco
0.413.204
0.397 .oa1
0.003.c04
0.321
mean
0. 0.702.000 0000
0. 0.628 o00
0. 0.624.000
0.574.000
0. 0.148 0000
0.034.on0
DSMIL
0.580.oso
0. 1.0
0.505.o77
0.464.127
0.102.o46
0,130.120
LSE
0.474.015
0.411 oz
0.530 m1
0.578 o1z
0.044.013
0.269 pas
Maxsoft
0.530.o74
0.437 ooo
0.499. 036
0.407 oss
0.001 .002
0.441 097
0.653 2014
0.548.190
0.532. 202
0.165. 122
0.682,
0.253 s8s
mean
0.553.com ous
0. 0.496 pos
0.558 po6
0.392 oos
0.582 ,010
0.153, 004
UNI
DSMIL
0.692
01636,113
0.650.11
0.163
0.500
0.125,cm
LSE
0.709. 1744
0.643.
0.617.174
0.122 .00
0.733 192
0.218. 2,79
Maxsoft
0. 0.778.1m0 160
0.765..m 128
0.700 203
0.120. ono
0.869.1 19
0.157.147
Prov- GiguPath
0.931 Loco
0.827.130
0.878,075
0.085 105
0.958 .003
0.495,0m .01
mean
0.506.com 004
0.491 .coe
0.537,003
0.390.om 0009
0.550 po3
oon1
DSMIL
0.897 .22
0. p.7
0.793..11
0.161 ooe
0.500 000
0.125.000
LSE
0.969 mo00
0.938 048
0.959.cm
0.110
0.9444.22
0.561 081
Max
0.979.oo1
0.951 .22
0.963.gmm 015
0.050 oso
0.938 .044
0.526.ost .82
Table Results of MII. pooling on MUSKI, MUSK2, ELEPHANT, TIGER, and FOX datasets.
Method
MUSKI
MUSK2
ELEPHANT
TIGER
FOX
AUC
ACC
AUC
ACC
AUC
ACC
AUC
ACC
AUC
ACC
max paoling
0.881
0.778.000
nas
0.767,ums
0.753.cem
0.700
0.879,u7
0.850.cm
0.675.mm
ucs
mean paoling
0.762 ees
0.704
0.750
0.700
(1.980 o00
0.917 029
0.890..
0.817
0.646 o164
0.6390.00
LSE pooling
0.976
0.815
0.931
0.750.
0.957
0.900.sm
0.509
0.883.c4
0.720
0.625
ABMIL
0.870.11
07a
37a
0.973
0.933 pmm
0.892,06
0.850 mm
sor
0.617
DSMIL
0.5129
0.589 000
0.875
0.733 oss
0.947 .015
0.925 om7
0.919 cs0
0.833..o c22
0.730 oro
0.617 .c2
Souffy
0.813
0.833
0. 0.917
0.800
0.965
0.825
0.801)
0.850
0.756
0.625
Maxsoftt pooling
moo
oco
0.954.az4
0.767 nss
0.958 cco
aso
0.950
0,900 c321
axa
0.650 ogs
39

---

NeurIPS Paper Checklist
1. Claims
Question:
Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Answer: [Yes]
Justification: The scope of the effectiveness and main claims are clearly demonstrated the abstract and introduction
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made in the paper.
The abstract and/or introduction should clearly state the claims made, including the contributions made the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.
It is fine to include aspirational goals as motivation as long as is clear that these goals attained by the paper.
2. Limitations
Question:
Does the paper discuss the limitations the work performed by the authors?
Answer: [Yes]
Justification: Yes, we provided formal assumptions of our theoretical analysis in the Ap- pendix A and made clear reasoning on why we consider them true and how general our bounds are. We also discussed the limitations of our work in Section 7.
Guidelines:
The answer NA means that the paper has limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.
The authors are encouraged to create separate "Limitations" section in their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification. asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.
The authors should reflect the scope of the claims made, e.g., if the approach was only tested on a few datasets or with few runs. In general, empirical results often depend implicit assumptions, which should be articulated.
The authors should reflect the factors that influence the performance of the approach. For example, facial recognition algorithm may perform poorly when image resolution low or images are taken in low lighting. Or speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.
The authors should discuss the computational efficiency the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.
While the authors might fear that complete honesty about limitations might used by reviewers as grounds for rejection, worse outcome might be that reviewers discover limitations that aren't 't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play impor- tant role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.
3. Theory assumptions and prool's
Question: For each theoretical result, does the paper provide the full of assumptions and complete (and correct) proof?
40

---

Answer: [Yes]
Justification:
Refer to Appendix A.
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross- referenced.
All assumptions should be clearly stated or referenced in the statement of any theorems.
The proof's can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch provide intuition.
Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental result reproducibility
Does the paper fully disclose all the information needed to reproduce the main ex- perimental results the paper to the extent that affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided not)?
Question:
Answer: [Yes]
Justification: We talk about all models and datasets in Section 5, method in the Section 4, extra details on hyperparameters, splits and training details are provided in Appendix
Guidelines:
The answer NA means that the paper does not include experiments.
If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, descríbing the architecture fully might suffice, or if the contribution is specific model and empirical evaluation, it may be necessary to either make possible for others to replicate the model with the same dataset, provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g.. g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.
While NeurIPS does not require releasing code, the conference does require submis- sions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) the contribution is primarily a new algorithm, the paper should make clear how reproduce that algorithm. (b) If the contribution is primarily new model architecture, the paper should describe the architecture clearly and fully.
(c) the contribution is a new model (e-g., a large language model), then there should either be way to access this model for reproducing the results or way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).
(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should possible for other researchers to have some path to reproducing verifying the results.
5. Open access to data and code
41

---

Question: Does the paper provide open access to the data and code, with sufficient instruc- tions faithfully reproduce the main experimental results, as described in supplemental material?
Answer: [Yes]
Justification: Codes and information of datasets that are constructed reused in the paper are included in the GitHub repository.
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurlPS code and data submission guidelines (https://nips.cm
onPolicy for more details.
While encourage the release of code and data, understand that this might not be possible, so "No" is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for new open-source benchmark).
The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurlPS code and data submission guidelines (https: / /ttpp/.ccpppliiiii/mmm/tao./nttc wwtppccppcc////ccccccccccccccclt htpplli//giieee http//uudeeee/eee https//ooSSSuuiiseeeeeeee
for more details.
The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the proposed method and baselines. only subset of experiments are reproducible, they should state which ones are omitted from the script and why.
At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information as possible in supplemental material (appended the paper) is recommended, but including URLs to data and code is permitted.
6. Experimental setting/details
Question: Does the paper specify all the training and test details (e.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification: The paper clearly describes the datasets, models evaluated, and evaluation metrics in Section 5.2 and Appendices E, F, and H.
Guidelines:
The answer NA means that the paper does not include experiments.
The experimental setting should be presented the core the paper to level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, as supplemental material.
7. Experiment statistical significance
Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Question:
Answer: [Yes]
Justification: All experimental results are calculated over 5 different random initializations and their mean and std are reported.
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by emor bars, confi- dence intervals, or statistical significance tests, least for the experiments that support the main claims of the paper.
42

---

The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).
The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)
The assumptions made should be given (e.g., Normally distributed errors).
It should be clear whether the error bar is the standard deviation or the standard error of the mean.
is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have 96% CI, if the hypothesis of Normality of errors is not verified.
For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out range (e.g. negative еπτог rates).
If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information the com- puter resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Question:
Answer: [Yes]
Justification: Yes. We specified our compute resources in the supplementary materials. Additionally compared our compute time relative previous methods in the main tables.
Guidelines:
The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs well estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make into the paper).
9. Code of ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https: //nerrip// cc/ wawbllccEthicsuuieeee
Answer: [Yes]
Justification: All authors read and confirm that the research in the paper conform with the NeurlPS Code of Ethics.
Guidelines:
The answer NA means that the authors have reviewed the NeurIPS Code of Ethics.
If the authors answer No, they should explain the special circumstances that require deviation from the Code of Ethics.
The authors should make to preserve anonymity (e.g., . if there is special consid- eration due to laws or regulations in their jurisdiction).
10. Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [NA]
Justification: There is no societal impact of the work performed.
Guidelines:
The answer NA means that there is no societal impact of the work performed.
43

---

If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.
Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), faimess considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.
The conference expects that many papers will be foundational research and tied to particular applications, let alone deployments. However, if there is direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology is being used intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional unintentional) misuse of the technology.
If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g.. gated release of models, providing defenses in addition attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).
11. Safeguards
Question:
Does the paper describe safeguards that have been put in place for responsible release of data models that have high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
Answer: [NA]
Justification:
The paper has no such risks.
Guidelines:
The answer NA means that the paper poses no such risks.
Released models that have high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make best faith effort.
12. Licenses for existing assets
Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Question:
Answer: [Yes]
Justification: Every asset that we utilized for our implementations have been appropriately referenced, both within the paper itself and in the code (if needed). Although did not specify the names of their respective licenses, you can find these details on the webpages we' 've cited.
Guidelines:
The answer NA means that the paper does not use existing assets.
The authors should cite the original paper that produced the code package dataset.
The authors should state which version of the asset used and, possible, include URL.
The name of the license (c.g., CC-BY 4.0) should be included for each asset.
44

---

For scraped data from a particular source (e.g., website). the copyright and terms of service of that souree should be provided.
assets are released, the license, copyright information, and terms use in the package should be provided. For popular datasets, paperswi thcode. cowc dataetts has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
For existing datasets that are re- re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.
If this information is available online, the authors encouraged to reach out the asset's s creators.
13. New assets
Question: Are new assets introduced in the paper well documented and the documentation provided alongside the assets?
Answer: [Yes]
Justification: This paper makes the code and our self pretrairt weights and embeddings available through the external link.
Guidelines:
The answer NA means that the paper does release assets.
Researchers should communicate the details of the dataset/code/mmodll as part their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent was obtained from people whose asset used.
At submission time, remember to anonymize your assets (if applicable). You can either create anonymized URL or include an anonymized zip file.
14. Crowdsourcing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and sereenshots, if applicable, as well as details about compensation (if any)?
Answer: [NA]
Justification: This study uses only publicly available, de-identified datasets: CAMELYON16 CAMEL TCGA-Lung, and SICAP-MII. We performed
data collection
interaction with human participants and conducted no crowdsourcing. Data were used under the datasets' terms; and/or consent. We made no attempt to re-identify individuals and followed dataset usage policies.
knowledge, original providers obtained the necessary approvals
Guidelines:
The answer NA means that the paper does not involve crowdsoureing research with human subjects.
Including this information in the supplemental material is fine, but if the main contribu- tion of the paper involves human subjects, then as much detail as possible should be included in the main paper.
According to the NeurlPS Code of Ethies, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.
15. Institutional review board (IRB) approvals equivalent for research with human subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [NA]
45

---

Justification: The study uses only publicly available, de-identified datasets (CAMELYON16. CAMELYONI7. TCGA-Lung, SICAP-MIL). We conducted no new data collection or interaction with human participants; thus, this work does not constitute human-subjecti research and IRB review was not required. We followed each dataset's usage terms and made no attempt to re-identify individuals.
Guidelines:
The answer NA means that the paper does not involve crowdsoureing nor research with human subjects.
Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.
We recognize that the procedures for this may vary significantly between institutions and locations, and expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.
For initial submissions, do not include any information that would break anonymity (if applicable), such the institution conducting the review.
16. Declaration of LLM usage
Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods this research? Note that if the L.LM used only for writing, editing, or formatting purposes and does not impact the core methodology. scientific rigorousness, or originality the research, declaration is not required.
Answer: [NA]
Justification: The paper only uses LLMs for text and code editing.
Guidelines:
The answer NA means that the core method development in this research does not involve LLMs any important, original, non-standard components.
Please refer to our LLM policy (https: http://eeeuiuppeeeeee http://eeccccceeeeeeee////////// for what should or should not be described.
46


Reviews:
[{"review_id": "cEmEl0PMil", "reviewer": "Reviewer_KwFs", "summary": "This work addresses the problem of Multiple Instance Learning (MIL) in the context of Whole Slide Image (WSI) classification. The authors argue that the main limitation of transformer-based MIL methods lies in their dependency on large-scale training data: \"Transformer models yield only marginal gains without access to large-scale datasets.\" To mitigate this issue, the authors propose a pooling strategy inspired by both max and mean pooling. Specifically, they introduce MaxSoft, a simple, differentiable alternative to attention-based aggregation mechanisms. Additionally, they propose a novel augmentation scheme, PerPatch, which enhances patch diversity during training and improves robustness.", "questions": "1) The central motivation—that transformer-based MIL methods underperform in low-data regimes—is underdeveloped and insufficiently supported. While data scarcity is a known challenge in digital pathology, it is unclear whether the limitations observed by the authors are intrinsic to transformer architectures or confounded by other variables (the type of encoder used, the quality and domain alignment of pretraining data). \n\n2) The paper would benefit from a more rigorous empirical characterization of why and when transformer-based methods fail in these settings. This is especially important given that the authors’ main contribution is motivated by this claim. Moreover, while the proposed MaxSoft pooling is elegant and easy to implement, it is not obvious why this simpler mechanism should not suffer from the same data-efficiency limitations as attention mechanisms (no experiment is provided about data scarcity). \n\n3) Another omission is the lack of discussion of non-transformer MIL alternatives, such as graph-based models [1], which are relevant and increasingly adopted in histopathology. Including such methods in the benchmark—or at least discussing them—would strengthen the experimental comparison. Some recent MIL baselines not mentioned in the paper that should be considered for a more comprehensive evaluation include [2–8].", "limitations": "Several competitor are missing and despite the strong theoretical content of the supplementary material the main motivation is still not adequately supported.", "rating": 3, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 2, "clarity": 3, "significance": 3, "originality": 2, "strengths_and_weaknesses": "Weaknesses\n1) The central motivation—that transformer-based MIL methods underperform in low-data regimes—is underdeveloped and insufficiently supported. While data scarcity is a known challenge in digital pathology, it is unclear whether the limitations observed by the authors are intrinsic to transformer architectures or confounded by other variables (the type of encoder used, the quality and domain alignment of pretraining data). \n\n2) The paper would benefit from a more rigorous empirical characterization of why and when transformer-based methods fail in these settings. This is especially important given that the authors’ main contribution is motivated by this claim. Moreover, while the proposed MaxSoft pooling is elegant and easy to implement, it is not obvious why this simpler mechanism should not suffer from the same data-efficiency limitations as attention mechanisms (no experiment is provided about data scarcity). \n\n3) Another omission is the lack of discussion of non-transformer MIL alternatives, such as graph-based models [1], which are relevant and increasingly adopted in histopathology. Including such methods in the benchmark—or at least discussing them—would strengthen the experimental comparison. Some recent MIL baselines not mentioned in the paper that should be considered for a more comprehensive evaluation include [2–8].\n\nStrengths\n1) MaxSoft is a lightweight and theoretically well-motivated pooling strategy. It is simple to implement and does not require many parameters.\n2)The PerPatch augmentation scheme is intuitive and may be beneficial across various MIL pipelines, not only the proposed one.\n3)The experimental evaluation is extensive, spanning multiple WSI datasets, with thorough ablations and implementation details included in the supplementary material.\n\nSuggested Missing References\n[1] Graph Neural Networks in Histopathology: Emerging Trends and Future Directions\n[2] H2-MIL: Exploring Hierarchical Representation with Heterogeneous Multiple Instance Learning for Whole Slide Image Analysis\n[3] A Trainable Optimal Transport Embedding for Feature Aggregation and Its Relationship to Attention\n[4] Morphological Prototyping for Unsupervised Slide Representation Learning in Computational Pathology\n[5] DAS-MIL: Distilling Across Scales for MIL Classification of Histological WSIs\n[6] A Graph-Transformer for Whole Slide Image Classification\n[7] Prototypical Multiple Instance Learning for Predicting Lymph Node Metastasis of Breast Cancer from Whole-Slide Pathological Images\n[8] TransMIL: Transformer-Based Correlated Multiple Instance Learning for Whole Slide Image Classification", "was_revised": true, "final_justification": "Authors partially failed to provide a theoretical justification that support the transformers fail in low data regimes and I find this issue the main issue of the work. The technical solution is lightweight and sound but indeed the theoretical aspect of the problem is understudied. Their supportive answer is based on empirical observation in other methods results but it is still a weak motivation to me in terms of better understanding of the problem.\nI do not find this aspect can be addressed in the discussion phase as it is central for the validity of the work.\nI will leave my vote unchanged.", "rebuttal": "# Rebuttal For KwFs\n\nWe thank the reviewer for the constructive feedback. We appreciate your recognition of our theory-driven methodology, the intuitiveness of PerPatch, and the breadth of our empirical study. We also value the suggestion to apply PerPatch within alternative MIL pipelines and regard this as a promising future direction. We note that our theoretical section introduces new theorems for the underexplored Log-Sum-Exp (LSE) pooling, which we believe will benefit the broader ML community. We respond to each point below and will incorporate the feedback in the revision.\n\nOwing to space constraints, we use “transformer-based” to encompass both transformer- and attention-based approaches. We likewise omit rarely cited metrics and standard deviations, consistent with prevailing practice in the literature.\n\nInitially, we observe that the **Questions** section repeats the **Weaknesses** points exactly. We were not sure that this was intentional by the reviewer. We are open to discuss any additional questions to improve our work and really appreciate it.\n\n> W1&Q1&L1: Motivation underdeveloped.\n> \n\nWe thank the reviewer for raising this concern and apologize if our exposition made the motivation appear incomplete. Below, we restate, without introducing new claims, the body of evidence already present in the paper.\n\n**Well-documented data scarcity in MIL.** Numerous MIL studies are driven by the scarcity of labeled slides; in particular, [1] and [2] are motivated enuclearntirely by sample scarcity and both explicitly observe that transformer-based MIL is most vulnerable. More broadly, vision transformers are repeatedly characterized as data-hungry because of their weak inductive bias [3–5].\n\n**ViT as an MIL model.** Removing positional embeddings converts a ViT into a set-based MIL architecture. The MoCoV3 ablation in [6] trains such a “ViT-MIL” on the full 1.28 M-image ImageNet-1K yet still observes the same data-hungriness issue, showing that the limitation is architectural rather than dataset-specific.\n\n**Our empirical evidence.** Figure 9 demonstrates that test accuracy for ABMIL, DSMIL, Snuffy, and Prov-GigaPath rises monotonically with slide count, closely tracking the slope in Fig. 3 of [3]. This pattern replicates across all four datasets we evaluate (CAM16, CAM17, SICAP, and TCGA).\n\nThe reviewer proposes several alternative explanations, each of which we tested:\n\n*Encoder type.* Tables 1 & 3 evaluate four encoders: DINO-Natural (ImageNet-1K), DINO-Domain (pretrained on the training split patches, e.g., CAM16), UNI (100 M pathology patches), and Prov-GigaPath (1.3 B pathology patches). Across every dataset, MaxSoft pooling surpasses transformer pooling, ruling out encoder capacity or domain mismatch.\n\n*Data quality.* Three of the four datasets were curated under stringent, pathologist-led QC protocols [6-9]; visual inspection confirms their clarity. Consistent with the broader CV literature, however, quantity—not quality alone—enhances transformer hunger (e.g., LAION-2B in [9]), so the gap remains.\n\n*JPEG fidelity.* Digital-pathology pipelines typically store tiled patches as JPEG Q = 75. We therefore generated three new variants—Q = 50, Q = 100, and Q = 75 + Gaussian blur—to test whether artefacts influence sample efficiency. The accompanying table (Table S4) shows an unchanged ordering, demonstrating that neither lowering nor raising quality affects the conclusion.\n\n*Training protocol & domain alignment.* All models are trained from scratch via standard i.i.d. sampling and evaluated on held-out test splits drawn from the same dataset; DINO-Domain is trained exclusively on in-domain patches (Section 5, Appendix D, and line 163). The transformer gap persists under these strictly matched conditions.\n\n*Pretraining scale.* UNI and Prov-GigaPath are foundation encoders trained on 100 M and 1.3 B patches, respectively. We finetuned the Prov-GigaPath MIL head (pretrained on ≈200,000 slides)—originally trained on **≈**200 K slides—on SICAP-MIL, yet it still underperforms MaxSoft, indicating that present-day slide counts remain insufficient for transformer MIL on WSIs.\n\nCollectively, these observations validate our original claim: under current pathology data regimes, transformer-based MIL is data-inefficient, whereas MaxSoft delivers robust gains under the same conditions.\n\n\n|Model|JPEG 50|JPEG 75|JPEG 100|Gaussian Blur|\n|-|-|-|-|-|\n||AUC/ACC|AUC/ACC|AUC/ACC|AUC/ACC|\n|DSMIL|.803/.683|.833/.800|.891/.825|.807/.750|\n|Snuffy|.745/.570|.755/.650|.852/.830|.769/.665|\n|ABMIL|.697/.600|.750/.683|.805/.750|.737/.650|\n|Max|.737/.617|.767/.800|.792/.810|.763/.717|\n|Mean|.790/.696|.897/.700|.890/.700|.853/.667|\n|LSE|.857/.783|.850/.800|.923/.817|.863/.800|\n|**MaxSoft**|**.970**/**.883**|**.983**/**.867**|**.987**/**.950**|**.963**/**.883**|\n\n\n> W2&Q2: Data-efficiency untested.\n> \n\nFigure 9 directly addresses data efficiency. Under limited training samples, at least one simple pooling (Max, Mean, LSE, or MaxSoft) surpasses transformer-based MIL; specifically, Mean pooling leads at 50 slides, while MaxSoft dominates from ≥100 slides.\n\n> W3&Q3: Missing non-transformer baselines.\n> \n\nWe appreciate the request to suggest graph MIL models; however, our study deliberately excluded them because their current formulations introduce well-documented limitations that render them unreliable for WSI classification. As noted in the cited survey, two persistent challenges are **“graph-structure definition”** and **“dependence on segmentation output.”** Most pipelines define each nucleus as a node and connect only spatially adjacent pairs, which raises three issues:\n\n1. reliance on a separate nuclei-segmentation model discards information whenever segmentation errs;\n2. the distance threshold for edge creation lacks a biologically motivated rationale; and\n3. nucleus-centric graphs omit non-nuclear cues—e.g., tissue morphology—that pathologists routinely use.\n\nMethods that first encode patches with ViTs and then build a graph [10] are essentially transformer-based models in disguise. Theoretical analyses show that a ViT is a message-passing GNN on a fully connected token graph, while a Message Passing Neural Network (MPNN) with a virtual node can approximate self-attention; thus, such hybrids are functionally equivalent to transformer MIL [11–13].\n\nNonetheless, to address your concern we added **GTP** [13]—one of the strongest graph baselines—to the Additional Baselines table. Its results confirm our main conclusions. We also note a practical drawback: GTP constructs an explicit adjacency matrix, incurring **O(N²)** memory per slide and frequently triggering CUDA out-of-memory errors (cf. GitHub issue #25, opened 20 Mar 2025, unresolved to date).\n\n> W3: Missing recent MIL baselines.\n> \n\nWe thank the reviewer for highlighting additional MIL baselines. Our study already benchmarks ABMIL and DSMIL—two widely cited transformer-based MIL methods—and Snuffy, a current SOTA whose Tables 1–2 show clear gains over TransMIL (ref. 8). Of the suggested non-graph papers (refs. 3, 4, 7, 8), ref. 3 is unrelated to MIL, WSI, or pathology; refs. 4 and 7 propose prototype-based morphology models and ref. 4 explicitly state it is not MIL, with ref. 7 reporting very weak CAM16 results at 20×—the magnification we use (l. 525); and ref. 8 is another transformer-style MIL architecture. The “Additional Baselines” table already corroborates our findings. As we were not sure which one of the above methods picked the reviewer interests due to explained reasons, if the reviewer deems any further method essential, we would appreciate if they explain why it was necassary, and also we will gladly include it.\n\n**Additional Baselines: CAM16 and CAM17, TCGA, and SICAP**\n\n|Embeddings|Model|CAM16 Slide|CAM17 Slide|TCGA Slide|SICAP Slide|\n|-|-|-|-|-|-|\n|||AUC/ACC|AUC/ACC|AUC/ACC|AUC/ACC|\n|**_Natural_**\n||TransMIL|.711/.760|.698/.614|.889/.810|.811/.772|\n||GTP|.652/.698|.646/.617|**.910**/**.844**|.794/.770|\n||**MaxSoft**|**.754**/**.822**|**.710**/**.650**|.892/.809|**.834**/**.802**|\n|**_Domain_**\n||TransMIL|.903/.815|.913/.788|.932/.870|.793/.790|\n||GTP|.852/.764|.862/.821|.933/.870|.802/.784|\n||**MaxSoft**|**.934**/**.863**|**.983**/**.867**|**.940**/**.885**|**.850**/**.808**|\n|**_UNI_**\n||TransMIL|.964/.905|.644/.728|.941/.880|.865/.839|\n||GTP|.918/.890|.624/.686|.936/.877|.828/.805|\n||**MaxSoft**|**.992**/**.966**|**.753**/**.750**|**.942**/**.882**|**.891**/**.877**|\n|**_Prov_**\n||TransMIL|.965/.939|.954/.917|.940/.894|.855/.791|\n||GTP|.939/.899|.924/.874|.942/.884|.839/.815|\n||**MaxSoft**|**.985**/**.966**|**1.000**/**.933**|**.966**/**.905**|**.872**/**.821**|\n\n\nFinally, we noticed that reference [1] is cited but not discussed in your review; please let us know if there are specific points from that work you would like us to address.\n\n[1] Zhang H., DTFD-MIL\n\n[2] Liu P., Pseudo-Bag Mixup\n\n[3] Dosovitskiy A., An Image Is Worth 16×16 Words\n\n[4] Beyer L., Better Plain ViT Baselines\n\n[5] Tolstikhin I., MLP-Mixer\n\n[5] Chen X., Empirical Study of Self-Supervised ViTs\n\n[6] Bejnordi B., DL for Lymph Node Metastases Detection\n\n[7] Bandi P., Camelyon17 Challenge\n\n[8] Cooper L., Pancancer Insights from TCGA\n\n[9] Shao Z., TransMIL\n\n[10] Bontempo G., DAS-MIL\n\n[11] Joshi C., Transformers Are Graph Neural Networks\n\n[12] Cai C., On the Connection Between MPNN and Graph Transformer\n\n[13] Zheng Y., Graph-Transformer for WSI Classification"}, {"review_id": "7YMecHWJWr", "reviewer": "Reviewer_tjrh", "summary": "- This paper argues that attention and transformer-based MIL models offer limited benefits without massive data and computational resources. Instead, the paper returns to classical pooling strategies like Log-Sum-Exp (LSE). It theoretically analyze LSE pooling, showing a trade-off between generalization and sensitivity, depending on the temperature parameter which makes it choose between a mean and max pooling function.\n\n- The paper proposes MaxSoft, a new pooling method that uses the max operation in the forward pass but smooth gradients (via LSE) in the backward pass for stability.\n\n- It also introduces PerPatch augmentation, a simple strategy to improve training robustness by applying random augmentations independently to each patch in a WSI.\n\n- It show strong empirical results, where MaxSoft and PerPatch outperform both classical and Transformer-based methods, often matching the performance of massive foundation models with far lower compute.", "questions": "- Can we have the third dataset in Figure 3 as well. The effect of $/beta$ on the a problem with diffused signal is important to note so readers are aware of the kind of problems this is most suitable for.\n- Given how critical ω is to MaxSoft’s success, have you considered a way to automatically choose it based on bag size, dataset statistics, or validation confidence?", "limitations": "The paper does mention limitations briefly, but it's not very specific to their analysis or method, but applies more generally for most MIL methods.", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "**Strengths**\n- The theoretical analysis explaining when and why different pooling strategies work, and showing generalization vs. sensitivity trade-offs with max vs mean is a useful framework which leads to intuitive conclusions on utility of each pooling type. Theorem 2 showing generalization vs TPR tension is something practitioners have observed with MIL models and the theoretical analysis helps structure the argument well.\n- MaxSoft is an interesting idea where max pooling is used for forward pass but a smooth approximation is used for the backward pass using a moderate $\\beta$ in LSE pooling. It's simple to implement and results in no extra parameters or complexity.\n- The authors make a strong and honest case against over-reliance on attention/transformer models in small datasets, which is often glossed over in literature.\n- The paper has extensive experimental results. Experiments cover multiple datasets (CAMELYON16/17, TCGA-Lung, SICAP-MIL) and compare with powerful baselines (Prov-GigaPath, SSRDL, ABMIL, DSMIL, Snuffy, R2T-MIL).\n\n**Weaknesses**\n- Generalization-sensitivity tradeoffs predominantly exist in problems where the signal in the WSI is very localized. This is true for Camelyon and the SICAP-MIL dataset, but other problems like NSCLC subtyping or prediction of molecular signatures from WSI where signal is more diffused, these pooling type tradeoffs changes significantly. This is seen even in the results in TCGA-Lung vs other datasets. This solution offers less value in these cases.  \n- MaxSoft requires manual selection of 𝜔 (tuned via validation), and performance is sensitive to this choice.\n- During backward pass, gradients come from a different function (LSE with moderate 𝜔) than the forward pass (hard max). This breaks consistency since the gradients are not true gradients of the original function. It also leads to training vs inference mismatch, it can hurt generalization. \n- Assessing true generalization without an independent heldout test set is hard and results to show how this method translates to better generalization and lower FNR for Camelyon problems should ideally deploy on a new test set outside of the competition.\n- Many MIL implementations apply per-patch augmentations randomly in the data loader, so it happens by default. Specific papers and review papers and their code [2] have mentioned applying per-patch augmentations, so this doesn't seem to be a novel contribution.\n\n[1] Gadermayr, Michael, and Maximilian Tschuchnig. \"Multiple instance learning for digital pathology: A review of the state-of-the-art, limitations & future potential.\" Computerized Medical Imaging and Graphics 112 (2024): 102337.\n\n[2] Juyal, Dinkar, et al. \"SC-MIL: Supervised Contrastive Multiple Instance Learning for Imbalanced Classification in Pathology.\" Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. 2024.", "was_revised": true, "final_justification": "Thanks for adding the cross-Camelyon generalization results as well as the beta ablation for TCGA. Have retained my accept rating.", "rebuttal": "We thank the reviewer for the constructive evaluation. We address the points raised under **Weaknesses**, **Questions**, and **Limitations** below:\n\n> W1\n> \n\nWe thank the reviewer for noting that on diffuse-signal tasks like TCGA-Lung (≈80 % slide-level signal), MaxSoft’s localization-oriented pooling yields smaller gains (Tables 1 & 3; \\[2–6]). Such tasks are inherently easier—strong baselines already perform well—so the narrower margin reflects task simplicity, not a weakness of our method. Nonetheless, even modest improvements are valuable in high-stakes diagnostics. We will incorporate this balanced discussion and clarify our focus on slide-level classification rather than molecular-signature prediction.\n\n> W2&Q2\n> \n\nThere is no ω discussed in the entire paper, and we think you mean β so we answer assuming you meant β. We agree that this is part of our method, what we did, and how we experimented. Although we argue that at the moment there is no solution in the deep learning community that does not require selection of hyperparameters, and we do it in a principled way by choosing it with our independent validation set, which we do not train the model on. Below is a thorough explanation of how we chose β’s range based on our theoretical analysis,s which also matches with our experiments and can be considered as automatic.\n\n### 1. What the theory already gives us\n\n- **Upper anchor (pivot to max‑like behavior).**\nCorollary 1 shows that the soft weights stop being almost‑uniform and start collapsing on the maximum once\n\n$$\n\\boxed{\\ \\beta_{\\triangle}\\=\\\\frac{\\log (N/2)}{\\varphi}\\}\n$$\n\nwhere $N$ is the number of patches and $\\varphi=q_{N/2}-q_{1}$ is an (unknown) inter‑quantile gap.\nIn practice we drop $\\varphi$ (or set $\\varphi\\approx1$) and simply treat\n\n$$\n\\beta_{\\text{high}}\\=\\\\log (N/2)\n$$\n\nas the **sensitivity ceiling**.\n\n- **Lower anchor (guaranteed true‑positive rate).**\nTheorem 6 proves that, with confidence $1-\\alpha$, any desired TP rate is achieved provided\n\n$$\n\\beta \\ge \\frac{2C_\\alpha\\, \\mathbb{E} \\left[\\log\\left(\\frac{N}{N_c}\\right) \\bigg| N_c \\ge 1 \\right]}{\\Delta - 2C'_\\alpha \\sqrt{V} N_c^{-\\gamma}}\n$$\n\nwhere $N_c$ is the (random) number of tumor patches, $V$ their sub‑Gaussian variance and $\\gamma\\!\\in\\!(\\tfrac12,1)$ the tail exponent.\nTaking the “worst reasonable” constants $C_\\alpha=1,\\;V=1,\\;\\gamma=\\tfrac12$ gives a **safe lower bound**\n\n$$\n\\beta_{low} = 2 log(N/N_c) / (1 - 2(N_c^{-0.5}))\n$$\n\nBetween these two anchors every β is Pareto‑optimal: smaller values tighten the generalization bound (Theorem 4, small‑β analysis), while larger values buy sensitivity at the cost of variance.\n\n---\n\n---\n\n### 2. A suggestion for β picker\n\n1. **Estimate** $N$ **and** $N_c$**.**\n$N$ is known at WSI load‑time; $N_c$ can be (i) the empirical tumor fraction on the training split, or (ii) a running Bayesian estimate updated after each epoch.\n2. **Compute the bracket** $[\\beta_{\\text{low}},\\beta_{\\text{high}}]$ exactly as above.\n3. **Select β on‑the‑fly**\n    - During training we start at the geometric mean\n    $\\beta_{0}=\\sqrt{\\beta_{\\text{low}}\\beta_{\\text{high}}}$\n    to balance variance and sensitivity.\n    - Every $k$ epochs we re‑evaluate validation AUC and, if the β‑distribution‑adjusted confidence interval still overlaps the desired TP threshold, we decay β by √2; otherwise we increase it by √2, but never step outside the bracket.\n\n\n- Because both anchors are monotone in $N$ and $N_c$, this scheduler stays differentiable and data‑driven; no manual grid search is required. \n---\n\n### 3. Assumptions made explicit\n\n- Constants $C_\\alpha=V=1,\\;\\gamma=\\tfrac12$ correspond to unit‑variance sub‑Gaussian logits with mid‑heavy tails—exactly the regime sampled in Appendix A.4.\n- If you have tighter priors (e.g. heavier tails ⇒ larger $\\gamma$), simply plug them into (*); the code path is identical.\n\n---\n\n**In short:** yes, the paper’s theorems give two *numerical* guideposts; turning them into an automatic scheduler is straightforward, and we now include that reference implementation in the supplementary.\n\n> W3\n> \n\nWe derive generalization guarantees via uniform‐convergence bounds: a drop in training loss implies a drop in test loss regardless of optimizer. Empirically, training loss decreases and MaxSoft generalizes best across datasets. As noted (l. 61), our update follows BPDA \\[7], whose cure for forward–backward mismatch is extra epochs; accordingly, we train all methods for 500 epochs (MIL training is fast—≈5 min on CAM17; Table 1). A formal optimization analysis, akin to work on STEs in binary nets \\[8], remains future work.\n\n> W4\n> \n\nWe thank the reviewer for stressing rigorous evaluation. As detailed in Sec. 5.2, we use a standard split with an independent test set, and all proofs (Thm. 1; App. A.1, Lem. 3, 5; Thm. 6) assume i.i.d. sampling. Out-of-distribution (OOD) generalization is beyond our primary scope; nonetheless, we report the only cross-dataset check our data allow—training on CAM17 and evaluating on CAM16—with results in the table below. This aligns with well-known findings that higher in-distribution accuracy tends to boost OOD performance \\[9–12].\n\n|Embedding|Model|CAM16 Slide|CAM16 Patch|\n|-|-|-|-|\n|||AUC/ACC|AUC\n|**_Natural_**\n||Max|.534/.553|.328|\n||Mean|.513/.429|.337|\n||ABMIL|.560/.584|**.491**|\n||DSMIL|.532/.563|.474|\n||Snuffy|.521/.542|.468|\n||LSE|.581/.576|.256|\n||**MaxSoft**|**.591**/**.592**|.352|\n|**_Domain_**\n||Max|.519/.442|.467|\n||Mean|.527/.474|.516|\n||ABMIL|.510|.571|.522|\n||DSMIL|.526/.476|.495|\n||Snuffy|.523/.456|.513|\n||LSE|.514/.377|.501|\n||**MaxSoft**|**.565**/**.588**|**.618**|\n|**_UNI_**\n||Max|.617/.615|.601|\n||Mean|.557/.509|.606|\n||ABMIL|.643/.625|.632|\n||DSMIL|.669/.602|.500|\n||Snuffy|.638/.586|.483|\n||LSE|.720/.708|.715|\n||**MaxSoft**|**.737**/**.726**|**.724**|\n|**_Prov_**\n||Max|.924/.814|.947|\n||Mean|.539/.481|.551|\n||ABMIL|.912/.824|.950|\n||DSMIL|.891/.726|.500|\n||Snuffy|.916/.754|.873|\n||LSE|.921/.845|.949|\n||**MaxSoft**|**.976**/**.956**|**.960**|\n|\n|ImageNet_1K|RRT|.654/.627|-\n|PLIP|RRT|.775/.736|-\n\n\n> W5\n> \n\nWe thank the reviewer for calling attention to our PerSlide vs. PerPatch distinction. In our setup, PerSlide applies the same augmentation to every patch in a WSI, whereas PerPatch samples independently per patch. For example, ABMIL’s “random rotation and mirror every patch” is actually PerSlide, since all tiles use the same transform. The works it builds on [13] provide no augmentation code or detail, and other related papers [14, 15] only report per-slide mean–std normalization. To our knowledge, no prior method explicitly implements PerPatch as we define it. We will clarify these definitions in the final manuscript.\n\n> Q1\n> \n\nWe thank the reviewer for the suggestion. As images cannot be included in the rebuttal, we reproduce Fig. 3 as a table spanning all four datasets, thereby adding the requested third dataset and illustrating β’s effect on both diffuse- and localized-signal tasks.\n\n|$\\beta$|CAM16|TCGA|\n|-|-|-|\n||AUC|AUC|AUC|\n|**_.5_**|.899|.937|\n|**_1_**|.912|**.942**|\n|**_2_**|.919|.937|\n|**_3.5_**|.921|.940|\n|**_5_**|**.934**|.937|\n|**_7.5_**|.923|.936|\n|**_10_**|.914|.939|\n\n\n> L1\n> \n\nWe thank the reviewer for this insightful point. Our theory indeed prescribes an optimal β that adapts to each WSI’s tumor fraction—ideally varying at every weight update—but we instead pick a fixed β via a rule‐of‐thumb derived from overall dataset statistics. This is suboptimal given the wide slide‐to‐slide variation in cancer burden (e.g., Fig. 6’s nearly fully malignant CAM17 example). To address this, we propose a simple heuristic that estimates tumor fraction online from the model’s own (initially noisy) predictions and adjusts β according to our theoretical equations. Though early‐epoch instability and alternative strategies remain possible, this per-slide β selection is a concrete MaxSoft limitation we’ll explicitly discuss in the final manuscript.\n\n[1] Liu D., Dual-Attention MIL Framework\n[2] Tang W., MIL with Masked Hard Instance Mining\n[3] Shao Z., TransMIL\n[4] Zhang H., DTFD-MIL\n[5] Bontempo G., DAS-MIL\n[6] Qu L., DGMIL\n[7] Athalye A., Obfuscated Gradients\n[8] Yin P., Straight-Through Estimator\n[9] Recht B., Do ImageNet Classifiers Generalize?\n[10] Taori R., Robustness to Natural Distribution Shifts\n[11] Miller J., Accuracy on the Line\n[12] Hendrycks D., The Many Faces of Robustness\n[13] Juyal D., SC-MIL: Supervised Contrastive MIL\n[14] Qiu P., SC-MIL: Sparsely Coding MIL\n[15] Yang Z., SCMIL: Sparse Context-aware MIL"}, {"review_id": "iaaSYBHu3i", "reviewer": "Reviewer_NKLh", "summary": "This paper studies pooling operations for weakly supervised, bag‐level classification of whole‐slide images (WSIs). It first derives theoretical bounds showing how the Log-Sum-Exp (LSE) pooling’s temperature $\\beta$ trades off generalisation error bounds. Building on this, the authors propose MaxSoft pooling, which applies a hard max during the forward pass but uses the differentiable LSE gradient (with tuned $\\beta$) in the backward pass. They introduce PerPatch augmentation, which precomputes m augmented variants per patch and samples them independently to increase bag diversity without incurring runtime costs. Experiments on four pathology benchmarks (CAMELYON16/17, TCGA-Lung, SICAP-MIL) and five classical MIL datasets compare MaxSoft and PerPatch against standard pooling and recent attention-based MIL methods.", "questions": "- How many augmentations (m) per patch did you use? How to pick the number m for a dataset? I suspect that one gets diminishing (or even negative) returns after a specific value.\n\n- It seems like $\\beta$ needs to be tuned to a dataset. Did you tune the values of $\\beta$ using the validation split?\n\n- Adaptive Noisy-AND pooling [5] also tries to balance Max and Mean pooling. It may be worth mentioning in the related work.\n\n- Why does related work include a section on foundation models? Is it only because the paper uses these models as frozen encoders?\n\n**[5]** Kraus, Oren Z., Jimmy Lei Ba, and Brendan J. Frey. \"Classifying and segmenting microscopy images with deep multiple instance learning.\" Bioinformatics 32.12 (2016): i52-i59.", "limitations": "Yes", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 2, "significance": 4, "originality": 3, "strengths_and_weaknesses": "The paper presents theoretical derivations concerning the effect of the $\\beta$ parameter on generalisation error (Theorem 1) and true positive/false negative rates (Theorem 2). While I appreciate the effort to provide theoretical grounding for the proposed method, a detailed verification of the correctness of these proofs is unfortunately beyond my expertise. Therefore, I have proceeded with the assumption that the proofs as presented in the main paper and the Appendix are mathematically correct.\n\n### **Strengths:**\n- Simplicity of MaxSoft: The forward-max/backward-LSE trick is easy to implement and introduces minimal overhead over attention-based pooling methods or other methods that require extra parameters.\n\n- Although beyond my area of expertise, the theoretical analysis seems to support the idea of combining max-pooling and mean-pooling.\n\n- PerPatch precomputes m variants per patch, allowing for the pre-computation of their respective features using the frozen encoder.\n\n- The experiments use a lot of different backbones for extracting features, and the authors also run ablation studies for the parameter $\\beta$.\n\n### **Weaknesses:**\nMy biggest concern is the experimental setup, both dataset utilisation and baseline comparisons. \n1. For CAMELYON16/17 datasets, the use of only 50 and 99 WSIs, respectively, is highly restrictive and significantly limits the generalizability of the findings. The paper should:\n\t- Use the full dataset and report metrics on the full dataset. The numbers do not need to be SOTA as the proposed approach is simpler than other approaches.\n\t- If authors decide to use a smaller subset, then it should be explicitly stated that the proposed approach works better only in \"low-data regime\" and also justified (for example, due to the use of data augmentation). For the experiments, the authors should divide the train set into K equal parts and report the mean (with std) accuracy for those parts. Or randomly sample n WSIs, with replacement, but sample them a lot of times so as to cover the whole dataset (bootstrap).\n\n2. Furthermore, the reported performance of established baselines such as ABMIL and DS-MIL across all datasets appears consistently lower than typically expected in the literature. For CAMELYON16/17, it could be due to the use of a small subset of the training data (point 1. above) but the numbers are low for TCGA-Lung as well. For example, the accuracy and AUC for ABMIL and DSMIL are higher (compared to many but not all in the paper) even when using ResNet50 pre-trained on ImageNet as a backbone [1-3].\n\n3. While the paper theoretically discusses the generalisation gap, the experimental evaluation demonstrates only low variance in performance metrics across internal splits. An empirical validation of a smaller generalisation gap typically requires testing on an external (out-of-distribution) dataset.\n\n4. The proposed MaxSoft operation is very similar to a Straight Through Gumbel Softmax. Proper attribution to Straight Through Estimators (STEs) is missing.\n\n5. The authors' claim (lines 40-46) that Transformer-based architectures offer little benefit due to small WSI datasets overlooks a critical aspect of WSI data scale. While WSI counts may be limited, individual gigapixel WSIs yield an enormous number of patches, which is the true unit of training for patch-based Transformers. Therefore, the total patch count available, even from moderately sized WSI datasets, is often substantial and perhaps sufficient to meet the data demands of Transformer models. This is supported by recent literature [4] (section II D. *The effect of training data size*).\n\n6. In line 206, the authors claim that existing methods might even \"degrade performance\" but I could not find anything in the referenced papers to support this claim.\n\n\n**[1]** Shao, Zhuchen, et al. \"Transmil: Transformer based correlated multiple instance learning for whole slide image classification.\" Advances in neural information processing systems 34 (2021): 2136-2147.\n\n**[2]** Tang, Wenhao, et al. \"Feature re-embedding: Towards foundation model-level performance in computational pathology.\" Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2024.\n\n**[3]** Zhang, Hongrun, et al. \"Dtfd-mil: Double-tier feature distillation multiple instance learning for histopathology whole slide image classification.\" Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2022.\n\n**[4]** Aben, Nanne, et al. \"Towards large-scale training of pathology foundation models.\" arXiv preprint arXiv:2404.15217 (2024).", "was_revised": true, "final_justification": "The authors have adequately addressed all of my concerns through additional experiments and clarifications. I have also reviewed the comments from other reviewers and the authors’ responses.\n\nConsidering everything, I am pleased to raise my score to 5. This paper proposes a novel, straightforward approach that outperforms many established baselines without introducing any additional parameters—an outcome I find pleasantly surprising. The experiments appear to have been conducted rigorously and in a readily reproducible manner (see the discussion below), which is of paramount importance.", "rebuttal": "# Rebuttal For NKLh\n\nWe thank the reviewer for the thoughtful evaluation. We address the points raised under Weaknesses, Questions, and Limitations below:\n> W1\n> \n\nWe thank the reviewer for scrutinizing our data splits and apologize for omitting details in the main text. We selected 50 CAM16 WSIs to emulate the extreme low-data regimes typical of rare cancers (≈70 WSIs/type [1]), a scenario closely aligned with few-shot learning. CAM16’s official test set is used in full (l. 525–526), matching standard protocols. As noted (l. 145–148), patch-level outputs are critical for pathologists, so patch metrics remain central. For CAM17, only 500/1000 slides have slide-level labels, just 100 carry pixel annotations (one discarded for quality; l. 508, 531), limiting patch evaluation (l. 530–531). Despite this, our method still outperforms prior approaches (Tabs. 1, 2). We have now run four-fold experiments on complete CAM16 and CAM17 splits (omitting CAM17 patch metrics) to confirm our initial splits and validate our conclusions. While CAM16 evaluation follows its standard test set, we acknowledge K-fold cross-validation could further bolster robustness. For CAM17, our random stratified sampling across Macro/Micro/ITC classes reduces variance relative to naïve splits [2], though it does not replace full cross-validation. We will clarify these choices and incorporate full-dataset results in the final manuscript.\n\n|Embedding|Model|CAM16 Slide|CAM16 Patch|CAM17 Slide|\n|-|-|-|-|-|\n|||AUC/ACC|AUC|AUC/ACC\n|**_Natural_**\n||Max|.691/.726|.752|.728/.713|\n||Mean|.619/.713|**.939**|.739/.720|\n||ABMIL|.857/.858|.810|.795/.777|\n||DSMIL|.768/.762|.546|.783/.767|\n||Snuffy|.687/.658|.569|.742/.653|\n||LSE|.884/.837|.907|.816/.793|\n||**MaxSoft**|**.911**/**.886**|.899|**.883**/**.827**|\n|**_Domain_**\n||Max|.986/.953|.954|.928/.903|\n||Mean|.621/.667|.939|.772/.750|\n||ABMIL|.958/.954|.940|.876/.887|\n||DSMIL|.963/.948|.465|.925/.833|\n||Snuffy|.948/.957|.950|.834/.803|\n||LSE|.978/.952|**.954**|.931/.897|\n||**MaxSoft**|**.993**/**.961**|**.954**|**.954**/**.927**|\n|**_UNI_**\n||Max|.986/**.974**|.966|.827/.887|\n||Mean|.583/.594|.821|.839/.800|\n||ABMIL|.970/.948|.928|.804/.837|\n||DSMIL|.971/.961|.717|.874/.907|\n||Snuffy|.876/.855|.919|.875/.834|\n||LSE|.983/.969|.967|.846/.840|\n||**MaxSoft**|**.998**/**.974**|**.973**|**.982**/**.957**|\n|**_Prov_**\n||Max|.980/.969|.964|.921/.895|\n||Mean|.540/.594|.855|.937/.897|\n||ABMIL|.982/.964|.963|.970/.950|\n||DSMIL|.977/.954|.500|.969/.940|\n||Snuffy|.962/.913|.943|.954/.924|\n||LSE|.980/.972|.952|.978/.956|\n||**MaxSoft**|**.988**/**.974**|**.965**|**.996**/**.973**|\n|\n|ImageNet_1K|RRT|.973/.942|-|.762/.686|\n|PLIP|RRT|.980/.954|-|.926/.884|\n\n|Augmentation|CAM16 Slide|CAM16 Patch|CAM17 Slide|\n|-|-|-|-|\n||AUC/ACC|AUC|AUC/ACC| \n|ReMix|.974/.949|.941|.929/.895|\n|RankMix|.972/.949|.931|.931/.887|\n|AUGDIFF|.980/.952|.930|.935/.892|\n|SSRDL|.975/.938|.936|.931/.877|\n|PerSlide|.989/.942|.948|.949/**.913**|\n|PixMix|.971/.960|.949|.933/.884|\n|**PerPatch**|**.992**/**.961**|**.951**|**.952**/**.913**|\n\n> W2\n> \n\nWe thank the reviewer for the careful comparison. On CAM16, the lower baseline scores reflect the extreme low-data split; transformer-based MIL methods are inherently data-hungry. For CAM17, few papers report slide-level results: [3] obtains AUC = 0.863/ACC = 0.815 for DSMIL on 500 WSIs, while our closest configuration (DINO-Domain) yields 0.833/0.800 on 100 WSIs. Their encoder was SimCLR-trained on CAM16 patches, ours DINO-trained on in-domain patches; the larger sample size partly offsets their out-of-distribution (OOD) features. For TCGA, any apparent discrepancy is purely presentational: our table shows baseline AUCs slightly above [5] and slightly below the others. Such small variations are expected given differences in splits, background thresholds, JPEG quality, backbone pre-training (SimCLR vs DINO), and unspecified hyperparameters—there is currently no community standard. We therefore maintain that our evaluation is transparent, rigorous, and fully consistent with prior work.\n\n**Reported metrics for TCGA in different papers:**\n\n|Paper|AUC/ACConABMIL|AUC/ACConDSMIL|\n|-|-|-|\n|[5]|0.865/0.771|0.892/0.805|\n|[6]|0.952/0.903|0.956/0.904|\n|[7]|0.941/0.869|0.939/0.888|\n|[8]|0.948/0.900|0.963/0.919|\n|US|0.910/0.870|0.937/0.864|\n\n> W3\n> \n\nWe thank you for raising this point, which Reviewer tjrh also mentioned, external experiments to evaluate generalization. We think out-of-distribution generalization experiments are out of our work’s context; see our response to reviewer tjrh Weakness 4 for further details. Nevertheless, we appreciate more discussion on different aspects of our method’s improvement in generalization. Variance is not uniformly low: Tables 1 and 3 show that Max-pooling consistently exhibits higher variance than MaxSoft across all datasets—especially CAM16 and CAM17—and across all encoders. This aligns with our theory: Max-pooling is LSE-pooling with β = ∞, lacks differentiability, and consequently widens the generalization gap (Theorems 1 & 4).\n\n> W4\n> \n\nWe appreciate the reviewer noting the similarity to Straight-Through Gumbel Softmax \\[9]. Historically, STEs replaced non-differentiable binary activations with the identity in the backward pass; the more general Backward-Pass Differentiable Approximation (BPDA) was formalized in \\[11], and—as STE is a special case of BPDA—we cited BPDA at l. 61. Functionally, Straight-Through Gumbel Softmax forwards a categorical sample but back-propagates the softmax gradient, whereas MaxSoft forwards a hard max and back-propagates the Log-Sum-Exp gradient, a choice informed by our theoretical bounds on LSE temperature to tighten the generalization gap. Furthermore, STE-based methods target discrete latent variables, while our work handles continuous patch scores and slide-level outputs, so the correspondence is not straightforward. We will cite both Straight-Through Gumbel Softmax and BPDA in the final manuscript and have included an STE-variant ablation in our response to Q3.\n\n> W5\n> \n\nWe thank the reviewer for the critical perspective; it sharpens our manuscript. Our main point may not have been explicit enough. In the WSI-MIL pipeline, the final stage trains a slide-level model on frozen features, so the effective sample count is the number of WSIs, not their many patches. This is analogous to training ViT-S/16 on ImageNet-1K: the dataset is 1.28 M images, not $(224 \\div 16) \\times (224 \\div 16) \\times 1.28 \\approx 250$M, which is the number of patch tokens within them. Slide-level sample scarcity is well documented in the literature [7, 14] and motivates all augmentation baselines we report. The referenced work [13] addresses patch-level classification with patch labels, not slide-level MIL. It thus lies outside the scope of our study and does not speak to our claim. We will further clarify this distinction in the final revision.\n\n> W6\n> \n\nWe apologize for the confusion from last-minute edits: the encoder for the augmentation experiments was inadvertently unstated, and the baselines from Tables 1 and 3 were omitted in Tables 2 and 4. Nevertheless, DINO-Domain results confirm our claim at l. 206: comparing Tables 1→2 and 3→4, MaxSoft outperforms all augmentation baselines. On CAM16 it achieves AUC 0.934 / ACC 0.863 / Patch AUC 0.919 (vs. lower scores for Remix, RankMix, AugDiff, SSRDL); on CAM17 it reaches Slide AUC 0.983 / ACC 0.867 / Patch AUC 0.839; for TCGA it records Slide AUC 0.940 / ACC 0.885; and on SICAP Slide AUC 0.850 / ACC 0.808. We will explicitly specify the encoder and include the missing baseline rows in the final manuscript.\n\n> Q1\n> \n\nWe chose m=3 (Table 5; App J) using Random Rotation, Random Gaussian Blur, and Random Color Jitter. A single augmentation collapses to PerSlide sampling and degrades performance (Tables 2, 4; l. 276–277), whereas PerPatch sampling yields diverse per-patch variations and drives the gains we observe. We dropped Random H&E-DAB Jitter (low density/coverage; no AUC‐variance or ECE benefit), Random Elastic Deformation, and Random Affine Transformation (limited real-world relevance). In practice, augmentations with higher density/coverage and lower FID (i.e., closer to the original data manifold) perform best. Our trio was selected on these qualitative grounds rather than via an exhaustive sweep over mm; we can provide a performance-vs-mm curve if desired.\n\n> Q2\n> \n\nYes. As noted in l. 267, we tune β on the validation split; we will state this more explicitly in the final manuscript.\n\n> Q3\n> \n\nThank you for mentioning this. We will make sure to incorporate it in the related work. Also, to provide a more comprehensive analysis on methods that are relatively similar to our method, Noisy-AND and Straight Through Gumbel Softmax, we decided to provide experiments on them following the setup that we already tested in our manuscript on CAM17 but due to character limit we cannot provide now and will provide in discussion if asked.\n\n> Q4\n> \n\nWe thank the reviewer for suggesting Adaptive Noisy-AND pooling. We’ll cite it in Related Work and have run comparative experiments—including Adaptive Noisy-AND and the STE variant of Straight-Through Gumbel Softmax—under our CAM17 setup. Due to space constraints, we’ve omitted the detailed results here but can provide them upon request.\n\n[1] Ding T., Multimodal Pathology Foundation Model [2] Haugh M., Further Variance Reduction Methods (note) [3] Fourkioti O., CAMIL: Context-Aware MIL [4] Chen T., Simple Contrastive Learning Framework [5] Shao Z., TransMIL [6] Tang W., Feature Re-Embedding [7] Zhang H., DTFD-MIL [8] Dual-stream MIL Network (Self-supervised) [9] Jang E., Gumbel-Softmax Reparameterization [10] Bengio Y., Gradients Through Stochastic Neurons [11] Athalye A., Obfuscated Gradients [12] Yin P., Straight-Through Estimator [13] Aben N., Large-Scale Pathology Foundation Models [14] Liu P., Pseudo-Bag Mixup [15] Kraus O., Deep MIL for Microscopy"}]

Author rebuttal:

Meta-review: This paper investigates the theoretical aspects of Log-Sum-Exp pooling in Multiple Instance Learning (MIL) for Whole Slide Image (WSI) classification and, based on this analysis, introduces MaxSoft, a lightweight pooling method. Initial reviews were mixed, and even after rebuttal and discussion, consensus was not reached. Reviewers acknowledged that MaxSoft is theoretically well-motivated and shows competitive empirical performance, especially in low-data regimes. The main remaining concern centers on the motivation: "Transformer-based MIL methods show only marginal gains in low-data settings." Reviewer KwFs highlighted that this claim is not theoretically justified. Reviewer NKLh also noted that the motivation is largely empirical and requires clarification, yet advocated for the acceptance of this paper based on its technical contributions. After considering the paper, reviews, and discussion, the AC finds the contribution meaningful and key message worth communicating to the community, even if the paper is empirically motivated. Therefore, the AC concurs with the majority view and recommends acceptance. The AC urges the authors to (1) strengthen the empirical justification of their motivation; and (2) fix missing visual elements in the camera-ready version.
Decision: Accept (poster)