acceptodds
Under review as a conference paper at ICLR 2027

AdaptMIL: Domain Adaptation for Multiple Instance Learning in Digital Pathology

Abstract

Pathology foundation models (PFMs) support a wide range of histopathology tasks on whole-slide images through multiple instance learning (MIL). Despite recent progress, these models remain sensitive to cross-hospital distribution shifts: performance often degrades when a task head (e.g., classification) is trained on data from one hospital and then used on data from another hospital. To address this challenge, we propose AdaptMIL, a training strategy for integrating domain adaptation into MIL training. AdaptMIL is motivated by our finding that directly applying domain adaptation objectives during MIL training can interfere with MIL aggregation learning, often resulting in performance degradation over standard training. AdaptMIL resolves this by decoupling representation-level domain alignment learning from MIL aggregation learning through a two-stage training procedure. We show that AdaptMIL improves cross-hospital performance and outperforms alternative adaptation methods across experiments spanning multiple WSI datasets, tasks, PFMs, MIL architectures, and domain adaptation objectives. AdaptMIL's code will be released upon publication.

Primary area:
applications to computer vision, audio, language, and other modalities
Keywords:
Digital pathology, domain adaptation, cross-hospital robustness, multiple instance learning

Reviews

Among:
Shape:
1234this paper, Top 30%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.67 over 3 reviews, above 70% of the others.
Reviewer_BZrMOpenReview ↗
Rating
2
Confidence
3
Informativeness
1
Presentation
3
Soundness
2
Read review
Paper summary

The paper studies UDA for MIL in digital pathology. In terms of observation, the authors show that standard domain adaptation losses interact poorly with MIL aggregation. To this end, the authors propose a two-stage training strategy that first aligns the projection layer and then trains the attention aggregation.

Critical strengths
  1. Cross-hospital adaptation is an important problem, as staining protocols might differ across hospitals.
  2. I see that the design is simple and easy to integrate with existing MIL pipelines. It does not require modifying the pretrained pathology foundation model and operates on pre-extracted patch features.
  3. The proposed design outperforms single-stage UDA and source-only training.
Critical weaknesses

Weakness

  1. Fig. 1 is not clear in terms of: (i) what dataset is used, and (ii) what degree of feature-level shift exists in the UDA setting.
  2. The claimed explanation for single-stage UDA failure is not fully established. The paper shows that the attention distribution becomes more concentrated during standard UDA and that performance drops. This is an interesting observation. The authors are suggested to measure representation alignment before and after aggregation and inspect whether an attention shift exists.
  3. The paper proposes two-stage adaptation. First, it adds a projection layer to learn a more domain-invariant space and aligns the source and target domains via mean pooling, a domain adaptation loss, and a CE loss. Pathology consists of multiple morphological patterns, which might form sub-groups of features [1,2]. How does mean pooling tackle this constraint?

[1] Song, Andrew H., et al. "Morphological prototyping for unsupervised slide representation learning in computational pathology." 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2024. [2] Waqas, Muhammad, et al. "The next layer: augmenting foundation models with structure-preserving and attention-guided learning for local patches to global context awareness in computational pathology." NPJ Precision Oncology 10.1 (2026): 109.

  1. In general, I view the paper as being closer to a training strategy or optimization schedule rather than a new domain adaptation method.

  2. The experiments and ablations do not fully show the effectiveness of the proposed method. Some missing experiments are needed: What is the degree of feature-level shift between the source and target domains? What is the trade-off between the degree of domain shift and downstream task performance? The authors are suggested to evaluate against stain-based or feature-based adaptation methods on WSI.

Questions for authors

My question mainly include that

  1. The authors are suggested to analyze the relation between feature-level domain shift and performance degradation. Does a larger feature shift lead to a larger performance drop?
  2. Since Stage 1 uses mean pooling, how does the method handle different morphological subgroups in a WSI?
  3. The paper claims that single-stage UDA changes the MIL aggregation pattern. The authors are suggested to measure feature alignment and attention alignment before and after aggregation to support this claim.
4 comments
AuthorsOpenReview ↗

Response to reviewer BZrM

We thank reviewer BZrM for the time and valuable feedback. We address all comments in the following and will incorporate the relevant changes into the revised manuscript.


Q1: Figure 1 and degree of domain shift

(i) Figure 1 uses the TCGA NSCLC dataset for lung cancer subtyping. We will clarify this in the figure caption.

(ii) Figure 1 presents classification performance rather than domain shift, so we believe this question is not directly related to the figure. Nevertheless, we have conducted an additional quantitative analysis of domain shift in our UDA setting and will include it in the supplementary material of the revised manuscript.

Table A below uses MMD as a distance metric to measure the shift between mean-pooled UNI slide embeddings for all pairs of hospitals in the TCGA NSCLC dataset. Diagonal entries compare disjoint sets of slides from the same hospital, providing a within-hospital reference.

The table shows that within-hospital MMD values (0.029–0.129) are lower than cross-hospital values (0.279–1.029), demonstrating the expected feature-level differences between hospitals, consistent with prior findings (Kömen et al., 2026).

Table A. MMD between mean-pooled UNI slide embeddings across the six TCGA NSCLC hospitals.

AsterandChristiana HealthcareRoswell ParkUniv. of PittsburghJohns HopkinsIGC
Asterand0.0480.7410.6250.6851.0290.679
Christiana Healthcare0.7410.0590.5330.4200.7730.448
Roswell Park0.6250.5330.1150.2790.6960.470
Univ. of Pittsburgh0.6850.4200.2790.1290.6680.459
Johns Hopkins1.0290.7730.6960.6680.0290.861
IGC0.6790.4480.4700.4590.8610.031

Q2: MIL–domain adaptation failure mode

We have conducted a more thorough analysis of the failure mode and will include it in the revised manuscript. Specifically, we show that the attention module, rather than the projection layer, is the main contributor to the performance gap between single-stage UDA and AdaptMIL. Further, we provide evidence suggesting why concentrated attention can lead to lower performance and why domain adaptation may promote this behavior. To avoid duplicating content, we kindly refer the reviewer to our Q1 response to reviewer mumA for the detailed analysis.

We are not certain we understand the request to measure representation alignment "before and after aggregation." Before aggregation, representations are at the patch level, whereas after aggregation, they are at the slide level. While alignment can be measured at each level, we are unsure how these could be compared. Similarly, we are unsure what is meant by "attention shift" in this context. If the request is for a more detailed analysis of changes in attention patterns, we have conducted such an analysis in our Q2 response to reviewer mumA.

The reviewer makes similar requests in Question 3 under "Questions for Authors." Our questions regarding the intended measurements also apply there. Can the reviewer please clarify those points? We would be happy to address the requests after clarification.


Q3: Mean pooling and multiple morphological patterns

Mean pooling is a strong baseline in computational pathology (Shao et al., 2025), often competitive with complex MIL architectures. Although patches represent diverse morphological patterns, mean-pooled embeddings have proven effective across diverse downstream tasks (Shao et al., 2025), motivating their use in AdaptMIL's first stage. Our experimental results demonstrate the effectiveness of AdaptMIL relying on mean pooling during the first stage.

Morphology-aware alignment using methods such as PANTHER (Song et al., 2024) could potentially further improve adaptation. However, reliably identifying corresponding morphological clusters across source and target hospitals is challenging, as domain shifts can induce hospital-specific clustering in patch embeddings (Kömen et al., 2026).

We therefore leave morphology-aware alignment for future work, but will further emphasize the motivation for mean pooling in the revised manuscript.

Q4: AdaptMIL as a training strategy

We agree with the reviewer. AdaptMIL is presented as a training strategy throughout the paper. Our main finding is that directly applying standard UDA during MIL training often degrades performance, and that a simple modification to the training procedure can address this issue effectively. This allows us to leverage established domain adaptation objectives without introducing new losses specifically designed for MIL or digital pathology.


Q5: Domain shift, performance degradation, and baselines

We address the three points separately.

(i) What is the degree of feature-level shift between the source and target domains?

Please see our response to Q1, where we quantify feature-level domain shift across all hospital pairs.

(ii) What is the trade-off between the degree of domain shift and downstream task performance?

Although our results demonstrate a performance gap between hospitals, the relationship between the change in the domain at the feature-level and the degradation of performance is more complex. Classical domain adaptation theory establishes that target performance depends not only on domain discrepancy, but also on source-domain performance and differences in the relationship between features and labels across domains (Ben-David et al., 2010).

Our work builds on the established problem of cross-hospital performance degradation (Kömen et al., 2026) and proposes AdaptMIL to mitigate it. Our focus is on improving cross-hospital generalization rather than investigating deeper aspects of the problem itself, such as the relationship between domain shift and performance degradation.

However, following the reviewer's question, we examined the correlation between source–target feature discrepancies, measured using MMD as a distance metric on frozen UNI embeddings, and the corresponding performance gaps. We found a negligible Spearman correlation (ρ = −0.025, p = 0.90), consistent with the finding that domain discrepancy alone does not determine the performance gap.

Ben-David et al. (2010). A Theory of Learning from Different Domains. Machine Learning.

(iii) Evaluation against stain-based or feature-based adaptation methods on WSIs.

Our original experiments already include Macenko stain normalization as a stain-based baseline, as well as patch-level PFM fine-tuning and single-stage UDA with multiple adaptation objectives as feature-based baselines.

Following reviewer mumA's suggestions, we additionally evaluated patch-level UDA using MMD, CORAL, and DANN, as well as HED color augmentation. Please see our Q4 and Q5 responses to reviewer mumA.


The three questions under "Questions for Authors" repeat the points raised in Q5, Q3, and Q2, respectively. We have addressed all three in our responses above.

Reviewer_BZrMOpenReview ↗

Responses to Authors

Thank you very much for the detailed response and the additional experiments.

Clarification of my earlier request. By “alignment before and after aggregation” I meant the source–target discrepancy measured (a) on the projected patch features, pooled without attention, and (b) on the attention-pooled slide embedding, for ERM, single-stage UDA, and AdaptMIL. If single-stage UDA lowers (b) much more than (a), this would show the shortcut directly. By “attention shift” I meant whether the attention distribution differs between source and target slides. Your new alignment table for attended and remaining patches largely answers this. If possible, please add the discrepancy of the actual attention-pooled slide embeddings.

W1, W2, W5: The new shift table, the failure-mode analysis, and the patch-level UDA and augmentation baselines address my concerns.

W3: I accept the argument for mean pooling, and I agree that morphology-aware alignment can be future work.

AuthorsOpenReview ↗

Response to Q2 after clarification

Thank you very much for replying. We are pleased to hear that our response has addressed most of your concerns.

Following the clarification, in Table B below we extend Table C from our response to reviewer mumA with two additional pooling strategies: attention-weighted pooling and mean pooling over all patches.

For both projected and raw features, attention-weighted pooling yields MMD values close to those obtained by mean pooling over the top-50 attended patches. Likewise, mean pooling over all patches yields values identical to pooling over the remaining non-top-50 patches (identical after rounding), since excluding the top-50 patches has little effect on the overall mean. Thus, for single-stage UDA, the attention-weighted representations are more aligned than the mean-pooled representations.

Consistent with our earlier findings, these results suggest that single-stage UDA shifts attention toward patches that are already better aligned and concentrates domain alignment on those patches.

We hope this additional analysis addresses your remaining concern and would appreciate it if you could consider raising our paper's score.

Table B. Source–target MMD on slide representations pooled using different strategies, including attention-weighted pooling and mean pooling over all patches.

FeaturesPoolingSource-only (ERM)Single-stage UDAAdaptMIL
ProjectedTop-50 patches0.320.090.15
ProjectedAttention0.380.060.13
ProjectedRemaining (all except top-50)0.560.200.05
ProjectedMean (all patches)0.560.200.05
Raw UNITop-50 patches0.350.210.37
Raw UNIAttention0.420.210.45
Raw UNIRemaining (all except top-50)0.600.600.60
Raw UNIMean (all patches)0.600.600.60
Reviewer_n2CJOpenReview ↗
Rating
3
Confidence
3
Informativeness
3
Presentation
3
Soundness
2
Read review
Paper summary

This work investigates unsupervised domain adaptation for whole-slide classification in the setting of frozen pathology foundation models and trainable multiple-instance learning (MIL) aggregators. The authors find an interaction between domain alignment and attention learning: optimizing both of these objectives together may alter aggregation behavior, but lead to lower target set performance. AdaptMIL first learns the patch representation via mean pooling and source-domain-only supervision, along with the domain alignment loss. The learned representation is then fixed, and attention aggregation is optimized only via source supervision.

Critical strengths
  1. It is an important problem with realistic deployment motivation since domain shift is a major obstacle in computational pathology. Performing adaptation using frozen FM features is an attractive and realistic setting. The approach avoids expensive model fine-tuning and does not require many annotations.

  2. The method is easy to understand. The proposed training scheme is relatively simple and doesn't need a new loss function designed specifically for the adaptation process. It works well with various available alignment objectives. This simplicity will make the proposed method more likely to be applied in real practice.

  3. Experiments are thorough. The experiments are conducted across several encoders and adaptation objectives. The size of improvements in Table 1 are practical, and the improvement over unstable single-stage baseline methods is also noticeable.

  4. The ablation study and supplementary experiments strengthen the paper. I find valuable that the authors analyze the effect of stage-1-only training, continuation of alignment in stage 2, which suggests that learned MIL aggregation contributes additional predictive capacity beyond mean pooling. I agree with the authors that attention concentration is not harmful by itself, and the authors admit that there are certain dependency issues in statistical analysis.

Critical weaknesses
  1. Putting stronger constraints on the mechanistic finding and somewhat incremental contribution is important. Enhanced attention concentration is correlated with degradation, but does not by itself indicate the existence of an alignment shortcut and discard of relevant tissue. The one-shot approach of Table 4 using its own mean-pooling alignment head achieves 84.87% compared to 85.80% achieved by AdaptMIL. Unfreezing the projection leads to 85.56%. Hence, the most important aspect of the gain might be in preventing alignment gradients from affecting attention.

  2. It is necessary to properly dissociate domain shift from label distribution shift. The motivation for cross-hospital adaptation provided by the authors comes from differences in staining, tissue preparation, etc. However, the data sets used in the experiment also contain significant differences in class distribution between the hospitals. There is a large proportion difference in LUAD samples in TCGA NSCLC in Table 5. It is important since aligning the marginal feature distributions of the source and target domain may lead to negative transfer.

  3. Statistical evidence and generalization need better handling. The paper averages the results over all source-target pairs and conducts the signed-rank test for the 30 directed hospital pairs in the TCGA-NSCLC. However, these 30 hospital pairs are not independent observations. Each hospital is present in many such pairs, and the target slides are tested against models trained on multiple sources. Therefore, statistical evidence from the above test needs to be taken with caution. There is no standard deviation or confidence intervals provided in the tables.

Questions for authors
  1. Is the two-stage procedure substantially superior to stopping adaptation gradients before they reach attention? Table 4 indicates only a 0.93 gap between full AdaptMIL and the current mean-pooling head baseline.

  2. What evidence discounts class-prior difference as an alternative cause of failure of the single-stage UDA?

  3. How did the hyperparameters and checkpoints get chosen in the absence of target labels? Was tuning of the adaptation coefficients independent for the single-stage UDA and AdaptMIL approaches?

  4. Is the attention-based failure hypothesis robust to a direct experimental test? Could the authors provide patch-level alignment and the connection between attention focus and target performance at the level of individual hospital pairs?

4 comments
AuthorsOpenReview ↗

Response to reviewer n2CJ

We thank reviewer n2CJ for the time and valuable feedback. We address all comments in the following and will incorporate the relevant changes into the revised manuscript.


Q1: Failure mode analysis and preventing alignment gradients from affecting attention

We address the two points separately.

(i) Failure mode analysis

We conducted additional experiments for the failure mode analysis, presented in our Q1 response to reviewer mumA. Specifically, we show that the attention module, rather than the projection layer, is the main contributor to the performance gap between single-stage UDA and AdaptMIL. Further, we provide evidence suggesting that concentrated attention can lead to lower performance by neglecting tumor regions and suggest why domain adaptation may promote concentrated attention.

To avoid duplicating content, we kindly refer the reviewer to our Q1 response to reviewer mumA. We will incorporate this analysis into the revised manuscript.

(ii) Preventing alignment gradients from affecting attention

We agree that the key insight is to prevent domain adaptation gradients from influencing attention learning, as we noted in lines 452-453 in the paper. AdaptMIL achieves this through two-stage training, while the alternative mean-pooling head approach we propose in Table 4 achieves this through a separate alignment head. We chose AdaptMIL as our main method due to its better empirical performance. In the revised manuscript, we will further emphasize the general principle of separating domain alignment gradients from attention learning.


Q2: Dissociating domain shift from label shift

We thank the reviewer for raising this concern. Our data reflects realistic cross-hospital settings involving both domain shift and label shift. However, we agree that it is important to verify whether the trends observed for single-stage UDA and AdaptMIL persist in the absence of class-prior differences between hospitals.

To investigate this, we repeated the main MMD experiments on a class-balanced variant of the TCGA NSCLC dataset. Specifically, we randomly removed majority-class slides from each hospital's training and test splits, ensuring a balanced LUAD/LUSC class distribution in every hospital. This eliminates class-prior differences between hospitals but reduces the dataset from 489 to 340 slides. All other experimental settings remained unchanged.

Table A shows that the results follow the same trend as in the original experiments: single-stage UDA provides modest improvements over ERM or degrades performance, whereas AdaptMIL outperforms both ERM and single-stage UDA across all three PFMs.

These results demonstrate that AdaptMIL's improvements persist in the absence of class-prior differences and therefore cannot be attributed solely to label shift.

Table A. Cross-hospital TCGA NSCLC subtyping results on the class-balanced dataset. The metric is balanced accuracy (%). Values in parentheses denote the difference from ERM.

MethodUNICONCH-1.5H0-mini
In-domain training85.99 (+6.52)88.83 (+0.96)89.84 (+7.25)
Source-only (ERM)79.4787.8782.59
Single-stage UDA (MMD)80.41 (+0.94)88.94 (+1.07)77.68 (−4.91)
AdaptMIL-MMD (ours)84.87 (+5.40)89.41 (+1.54)86.56 (+3.97)

Q3: Statistical evidence and additional details in tables

We agree that the independence assumption of the Wilcoxon signed-rank test is not satisfied in our setting. We explicitly acknowledged this limitation in the original manuscript (lines 795–797).

We applied the test across source–target pairs in the absence of a better alternative, as done in previous domain adaptation studies (e.g., Cai et al., 2019). Enforcing independence by selecting source–target pairs without overlapping hospitals would leave only three pairs out of the 30 TCGA NSCLC pairs, substantially reducing statistical power and requiring an arbitrary selection of pairs. At the same time, we are not aware of a suitable alternative statistical test that allows this dependence.

To provide a more complete characterization of the results, as requested by the reviewer, we will additionally report standard deviations and 95% confidence intervals in the revised supplementary material.

Cai et al. (2019). Learning Disentangled Semantic Representation for Domain Adaptation. IJCAI.

Q4: Two-stage training vs. mean-pooling alignment head

We first clarify that in the mean-pooling head ablation, we do not explicitly stop adaptation gradients from reaching the attention module. Instead, we apply the domain adaptation loss through a separate mean-pooling head, so adaptation gradients do not pass through the attention module.

Regarding statistical significance, we performed a paired Wilcoxon signed-rank test and obtained a p-value of 0.098, indicating that the difference is not statistically significant. Both approaches were developed in this work, and we selected the two-stage AdaptMIL as our main method based on its higher empirical performance.


Q5: Class-prior differences

In our response to Q2 above, we show that the failure of single-stage UDA persists in the absence of class-prior differences.


Q6: Hyperparameter and checkpoint selection

We used the final training checkpoint for all experiments. The only tuned hyperparameter was the adaptation coefficient, while all other hyperparameters were fixed. The coefficient was selected through preliminary experiments on a single UNI–NSCLC source–target pair and subsequently fixed across all datasets, hospital pairs, PFMs and tasks. The same coefficient was used for single-stage UDA and AdaptMIL, without independently tuning the baseline.

Importantly, the sensitivity analysis in Table 8 of the original paper shows that AdaptMIL consistently outperforms single-stage UDA across all tested coefficients, demonstrating that AdaptMIL is robust to coefficient selection.


Q7: Attention-based failure hypothesis, patch-level alignment, and per-pair analysis

We address the three questions separately.

(i) Is the attention-based failure hypothesis robust to a direct experimental test?

We conducted additional experiments to test the hypothesis, and showed that the attention module, rather than the projection layer, is the main contributor to the performance gap between single-stage UDA and AdaptMIL. We also provide evidence explaining why the concentrated attention learned by single-stage UDA may lead to lower performance. Please see our Q1 response to reviewer mumA for the detailed analysis.

(ii) Could the authors provide patch-level alignment?

We apologize but the request isn't clear to us. We interpret patch-level alignment as the discrepancy between source and target patch representations. However, we are unsure whether the reviewer requests this measurement before or after adaptation and whether it should be reported for individual hospital pairs. We would be happy to provide the relevant analysis with additional clarifications.

(iii) Could the authors provide the connection between attention focus and target performance at the level of individual hospital pairs?

We examined this relationship across all source–target hospital pairs in TCGA NSCLC, comparing ERM and single-stage UDA using UNI and the MMD loss. For each pair, we measured the increase in top-50 attention mass and the change in target balanced accuracy from ERM to single-stage UDA. We then examined the correlation between these two measures across all 30 pairs.

We found no significant correlation (Spearman ρ = 0.15, p-value = 0.42). Although single-stage UDA concentrates attention more than ERM in all 30 pairs (by 10.3–60.3%), a larger increase in attention concentration does not necessarily correspond to greater performance degradation.

We believe this is because performance change also depends on other factors, including the magnitude of the source–target domain shift, how effectively the shift can be mitigated, and the baseline performance of ERM. Thus, attention concentration alone is not expected to explain the changes in performance from ERM to single-stage UDA.

We emphasize that in the paper, we report an association between increased attention concentration and performance degradation (further investigated in our Q1 response to reviewer mumA). However, we do not claim that the magnitude of the change in attention concentration predicts performance degradation for individual hospital pairs.

Thanks for your response and my concerns were mostly resolved. Since my rating was initially positive, I will keep it unchanged.

Thank you very much for your response and positive rating.

Reviewer_mumAOpenReview ↗
Rating
3(+1)
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper presents a strategy for domain adaptation of MIL in digital pathology, where patch-level representations based on pathology foundation models (PFMs) are aggregated to slide-level supervision. The main observation is that a slide-level domain adaptation objective interferes with the learned attention-based representation aggregation from patch-level to slide-level, such that performance is often decreased on both in-domain and target domain datasets. To overcome this problem, the paper proposes a two-stage training, where in the first stage a projector is trained to adapt patch-level representations, where the training objective is a slide-level domain adaptation loss and a slide-level classification loss. In this stage the patch aggregation is a simple mean of patch-level representations. In the second stage, the learned projector is frozen while an attention-based aggregation is learned using only a slide-level classification loss. Experiments are performed on a set of pathology classification datasets, where distinct in- and out-of-domain data are available. The proposed method is compared against direct domain adaptation, using different domain adaptation losses, stain normalization, and using different PFMs.

Critical strengths
  • The paper is clear and easy to follow. It provides a simple but seemingly effective strategy for improved domain adaptation for MIL in digital pathology. The experiments test relevant variations in terms of domain adaptation objective, datasets, MIL methods, and foundation models.

  • The observed failure mode when straightforwardly applying slide-level DA is an interesting and seemingly important issue in slide-level training for digital pathology applications.

Critical weaknesses
  • There is a certain limitation in terms of novelty. The method itself is a simple modification of the MIL training setup, split into two separate stages. This isn't necessarily a problem, as the modification seems to be effective. However, to me the main problem is that the motivation and explanation for why this is needed lacks in depth. That is, the paper could be expanded/strengthened in terms of analyzing and understanding the failure mode of MIL with domain adaptation. This is now rather weak and speculative, where a more explicit formulation of the failure could establish a stronger case. For example:

    • Why is sparser attention coupled with worse DA, and why does DA loss promote this behavior? How can both CE and DA losses be satisfied by changing how patches are aggregated? There are some vague speculations around these questions, but they do not provide any deeper understanding or formalization of the behavior.
    • Wouldn't you also expect a significant difference in this behavior depending on the domain adaptation loss? For example, does adversarial domain adaptation show a similar narrowing of attention spread, or is this specific to MMD?
    • Even if the focus is on digital pathology, it would be interesting to analyze if the failure mode is specific for this modality or if it is also relevant in other applications.
  • Although the results cover relevant variations in terms of domain adaptation objective, MIL methods, PFMs, etc., there are some baselines that would be important to include:

    • To me, the most straightforward strategy for adding domain adaptation to the MIL setup and addressing the failure of slide-level DA, would be to do patch-level domain adaptation. That is, applying the DA loss directly on representations, before the aggregation but after the projector, instead of using aggregated slide-level features. This would still not require any patch-level annotations, only extraction of patches separately for source and target WSIs, which is performed also for the slide-level adaptation loss. Could this promote the projector to learn invariant features without interfering with the aggregation?
    • Another simple baseline that would be relevant is a simple augmentation-based setup. This would use relatively aggressive color augmentations and other operations relevant for bridging the differences between domains. It would be applied to the input patches for the PFM, thereby enforcing the MIL aggregation to be able to operate under more diverse input variations.
Questions for authors
  • How do the attention maps look like for the trainings with/without UDA and compared to proposed method, i.e. the different setups in Fig. 2? Are there any obvious patterns in how the attention is distributed?
  • Although the mean performance across sites provides a good picture of the general performance, it would be interesting to see tables with performances for each site, to get a better understanding for the variations. This might be difficult to fit in the main paper, but could this be provided in the appendices?
  • CONCH on Camelyon stands out: why does CONCH produce such an extreme improvement on Camelyon compared to UNI and H0-mini, and where domain adaptation doesn't improve over source-only training?
7 comments
AuthorsOpenReview ↗

Response to reviewer mumA

We thank reviewer mumA for the time and valuable feedback. We address all comments in the following and will incorporate the relevant changes into the revised manuscript.


Q1: Analysis of the MIL–domain adaptation failure mode

We agree that a deeper analysis of the failure mode would strengthen the paper and thank the reviewer for the insightful suggestions. We conducted additional experiments using UNI, ABMIL, and MMD on the TCGA NSCLC dataset, which we will add to the revised manuscript. We organize our analysis into three parts:

Q1.a: Attention changes drive the performance gap

ABMIL consists of two components: a projection layer and an attention module. We show that the attention module, rather than the projection, is the main contributor to the performance difference between single-stage UDA and AdaptMIL.

We evaluated all nine combinations of projection and attention modules from trained ABMIL models using three strategies: ERM, single-stage UDA, and AdaptMIL. For each combination, we freeze both modules, train a new classifier on source slides, and evaluate on held-out target slides.

Table A presents the results for all combinations. With either the single-stage UDA or AdaptMIL projection fixed, using single-stage attention yields the lowest accuracy, approximately 2% below AdaptMIL attention, which performs best. All combinations using the ERM projection perform lower, consistent with the absence of target data during ERM training.

Fixing the attention and switching between the single-stage UDA and AdaptMIL projections yields smaller performance differences (0.27% to 0.53%), with AdaptMIL's projection performing best across all attention maps. In particular, combining the single-stage UDA projection with AdaptMIL attention achieves 84.36%, recovering most of the performance gap between single-stage UDA and AdaptMIL. Thus, single-stage UDA performance degradation appears to stem mainly from its attention rather than its projection.

Table A. Balanced accuracy (%) for different combinations of projection and attention maps. Rows indicate projection modules, columns indicate attention maps.

Projection \ AttentionSource-only (ERM)Single-stage UDAAdaptMIL
Source-only (ERM)81.0981.5781.91
Single-stage UDA83.6782.3884.36
AdaptMIL84.2082.6584.86

These findings are further supported by our Stage 2 adaptation ablation (Table 4, row 4 in the original paper), where applying domain adaptation in Stage 2 attention learning reduced accuracy by 2.57%, despite keeping the Stage 1 projection frozen.

Q1.b: Why does single-stage UDA attention lead to lower performance?

In the paper, we show that single-stage UDA produces more concentrated attention, and in our experiments described in Q1.a above, we show that the attention is the main contributor to single-stage UDA's lower performance. We now investigate why this attention pattern leads to worse results.

For this analysis, we use tumor-region segmentation annotations from Gao et al. (2025), available for 237 of our 489 TCGA NSCLC slides. We examine whether the models are attentive to patches within tumor regions, which are expected to contain discriminative information for cancer subtyping. Models that focus primarily on non-tumor regions may, therefore, perform worse.

Qualitatively, examining slides where AdaptMIL predicts correctly while single-stage UDA fails, we observe that single-stage UDA often concentrates attention on non-tumor regions. In contrast, AdaptMIL distributes the attention more broadly while maintaining a stronger focus on tumor regions. We will add representative attention visualizations to the revised manuscript.

To quantify this, we measure tumor attention mass (TAM), following Waqas et al. (2026). TAM is defined as the fraction of total attention assigned to patches within tumor regions. Formally, for a slide containing MM patches p1,…,pMp_1,\ldots,p_M, with attention weights a1,…,aMa_1,\ldots,a_M (∑i=1Mai=1\sum_{i=1}^{M} a_i = 1), TAM is defined as ∑i=1Mai 1[pi∈T]\sum_{i=1}^{M} a_i\,\mathbb{1}[p_i \in \mathcal{T}], where T\mathcal{T} denotes the annotated tumor region and 1[⋅]\mathbb{1}[\cdot] is the indicator function.

Table B presents the TAM results. Among the three ABMIL training strategies, single-stage UDA has the lowest mean TAM (0.63), while AdaptMIL achieves the highest (0.71). The TAM differences between single-stage UDA and both ERM and AdaptMIL are statistically significant (two-sided Wilcoxon signed-rank test, paired by slide; p < 0.001 for both comparisons).

Single-stage UDA more frequently reaches both TAM extremes: it allocates less than 20% of its attention to tumor regions in 18.4% of evaluations (vs. 4.1% for AdaptMIL), and more than 95% in 29.3% (vs. 17.0%). Moreover, in 27.7% of evaluations, its TAM is lower than that of mean pooling, compared with only 4.2% for AdaptMIL.

These results indicate that single-stage UDA's concentrated attention is less reliable: by "betting" on a small subset of patches, it more frequently focuses almost entirely on tumor regions, but also more frequently neglects them almost entirely, potentially discarding discriminative information.

We will provide further details, including the limitations of using TAM as a proxy for attention quality, in the revised manuscript.

Table B. Tumor attention mass (TAM) results. The second column reports mean ± STD. The remaining columns report the percentage of evaluations with TAM below 0.2, above 0.95, or below the TAM obtained with mean pooling on the same slide.

MethodTAM (mean ± STD)TAM < 0.2 (%)TAM > 0.95 (%)TAM below mean pooling (%)
Mean pooling0.49 ± 0.2512.200.80—
Source-only (ERM)0.67 ± 0.298.5020.8017.70
Single-stage UDA0.63 ± 0.3518.4029.3027.70
AdaptMIL0.71 ± 0.264.1017.004.20

Gao et al. (2025). SMMILe enables accurate spatial quantification in digital pathology using multiple-instance learning. Nature Cancer.

Waqas et al. (2026). The next layer: augmenting foundation models with structure-preserving and attention-guided learning for local patches to global context awareness in computational pathology. npj Precision Oncology.

Q1.c: Why does domain adaptation promote concentrated attention?

We investigate why adding a domain adaptation objective to ABMIL leads to more concentrated attention.

First, we demonstrate that ABMIL can satisfy the classification objective with substantially different attention patterns. We compare standard ABMIL, mean pooling (i.e., a projection layer followed by uniform attention, which we can refer to as "ABMIL with uniform attention"), and ABMIL with an additional entropy loss encouraging concentrated attention. All models are trained exclusively on source data, without using target data.

All three models achieve over 75% balanced accuracy on held-out target slides despite their different attention patterns. For example, the entropy-regularized model assigns, on average, 88% of its attention to the top-50 patches vs. 17% for standard ABMIL, while achieving comparable accuracy (78.1% vs. 79.8%).

These results demonstrate that the classification objective permits considerable flexibility in attention allocation, which the domain adaptation objective may exploit as demonstrated next.

To investigate how single-stage UDA exploits this flexibility, we report in Table C the source–target MMD under two pooling strategies: mean pooling over the top-50 attended patches and over the remaining patches. Here, MMD is used as a distance metric, computed between the source and target training slides on which the domain adaptation objective is optimized. We examine both projected features and raw UNI features (before projection).

The projected features reveal different alignment patterns. Single-stage UDA achieves stronger alignment for its top-50 attended patches than for the remaining patches (0.09 vs. 0.2). In contrast, AdaptMIL shows the opposite pattern (0.15 vs. 0.05), indicating that its alignment is not concentrated on the attended patches.

The raw UNI features show that single-stage UDA selects patches that are better aligned before projection: its top-50 patches have an MMD of 0.21, compared with 0.37 for AdaptMIL. Since the raw features are identical across methods, this difference arises from patch selection rather than learned transformations.

Together, these results suggest that single-stage UDA may take an easier route to satisfy the domain adaptation objective: shifting attention toward patches that are already better aligned and concentrating alignment on those patches. This provides an explanation for how the domain adaptation objective can influence attention and motivates separating domain alignment from attention learning, as done in AdaptMIL.

Table C. Source–target MMD on mean-pooled slide representations formed from selected patch subsets (lower indicates better alignment).

FeaturesPoolingSource-only (ERM)Single-stage UDAAdaptMIL
ProjectedTop-50 patches0.320.090.15
ProjectedRemaining patches0.560.200.05
Raw UNITop-50 patches0.350.210.37
Raw UNIRemaining patches0.600.600.60

Comments on the paper

1 comment
AuthorsOpenReview ↗

Manuscript update

Dear Reviewers,

We thank you again for your constructive feedback, which has helped us strengthen the paper.

We have updated the manuscript to address the points raised, including:

  1. Expanded failure-mode analysis in Section 3.2 of the main paper and Section D of the supplementary material, including attention visualizations (Figures 3 and 6).
  2. Additional baselines: Patch-level domain adaptation and color augmentation (added to Table 1).
  3. Additional supplementary analyses: Attention effects across adaptation losses (Table 14, Figure 8), per-site performance (Table 12), experiments controlling for class-prior differences (Table 13), standard deviations and confidence intervals (Table 10), and the degree of domain shift (Figure 5).

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.