DARE: Dual-Level Adversarial Learning with Domain-Aware Regularization for Whole Slide Image Classification

Yuxuan Jiang, Haichuan Dong, Manning Wang

TL;DR

Deep learning models can diagnose cancer from gigapixel pathology slides with superhuman accuracy—until you move them to a new hospital with slightly different microscopes or chemical stains, where their performance often crashes. This paper introduces DARE, a plug-and-play framework that adapts pathology models to new, unlabeled hospital data without requiring pathologists to manually re-annotate thousands of slides. By aligning features at both the microscopic cell level and the macroscopic tissue level—while forcing the model to ignore "easy" hospital-specific shortcuts—DARE dramatically outperforms existing adaptation techniques.

What Problem Does This Paper Address?

Digital pathology deals with Whole Slide Images (WSIs)—massive scans of tissue biopsies reaching up to $100,000 \times 100,000$ pixels. Because you can't feed a gigapixel image directly into a GPU, standard pipelines chop the slide into thousands of tiny patches, extract features from each patch using a frozen foundation model, and use an attention mechanism to weigh and combine them into a single slide-level prediction. This paradigm is called Multiple Instance Learning (MIL).

The catch? Pathology slides suffer from severe domain shift. Hospital A and Hospital B might use different staining chemicals or scanners, resulting in noticeably different color profiles. Even modern pathology foundation models get tripped up by this, mapping slides of the exact same cancer subtype into completely different regions of feature space.

Domain discrepancy in pathology slides and single-level alignment failures

Normally, Unsupervised Domain Adaptation (UDA)—transferring a model from a labeled source dataset to an unlabeled target dataset—would be the fix. However, standard UDA methods built for natural images (like photos of cats and cars) fail on WSIs for three reasons:

  1. Two-level hierarchy: Aligning only patch features misses global tissue context; aligning only slide features leaves local cellular features scrambled.
  2. Attention shortcuts: Most of a biopsy slide is normal tissue. Attention mechanisms zoom in on a tiny fraction of patches, easily latching onto hospital-specific staining quirks rather than true biological signals.
  3. Class-blind alignment: Globally mashing two datasets together in feature space doesn't guarantee that Cancer Subtype A from Hospital 1 aligns with Cancer Subtype A from Hospital 2.

Methods

DARE (Dual-level Adversarial learning with domain-aware REgularization) sits on top of standard frozen foundation models and attention-based MIL aggregators. During inference, all the training scaffolding is stripped away, adding zero extra compute overhead.

Here is what is novel under the hood during training:

  • Dual-Level Adversarial Alignment: Using standard Gradient Reversal Layers (which train a feature projector to "fool" a domain classifier), DARE forces feature distributions from the source and target hospitals to overlap at both the local patch level and the aggregated slide level.
  • Domain-Aware Attention Masking: To stop the attention network from cheating, DARE calculates a joint score for every patch in an unlabeled target slide by multiplying its attention weight by how strongly the patch-level domain classifier thinks it looks like the source domain. It then masks out the Top-$K$ "easiest," most source-like patches and re-aggregates the remaining ones. This forces the model to hunt for harder, truly domain-invariant biological evidence.
  • Adaptive Teacher-Student Pseudo-Labeling: To ensure distinct cancer subtypes don't get mixed up during global alignment, DARE uses self-training. A slowly updating "teacher" network looks at the unmasked target slide to generate soft pseudo-labels. The "student" network looks at the masked slide and tries to match the teacher's prediction. To keep noisy guesses out, the authors maintain a global memory bank with smoothly updating per-class confidence thresholds and inverse-frequency class weighting so rare cancer subtypes aren't ignored.

Datasets

The authors evaluate DARE across four public WSI datasets paired into two cross-hospital benchmarks (tested in both transfer directions):

  • Lung Cancer (Binary Classification): TCGA-NSCLC and CPTAC-NSCLC, used to distinguish Lung Adenocarcinoma (LUAD) from Lung Squamous Cell Carcinoma (LUSC).
  • Brain Cancer (5-Class Classification): TCGA-GBMLGG and IPD-Brain, used to classify five distinct glioma subtypes across varying patient populations and staining styles.

No new datasets were introduced; these are established public benchmarks exhibiting real-world clinical shifts.

Key Insights and Ideas

  • Natural image UDA can actively hurt pathology models: Directly applying classic UDA methods (like MMD, MCD, or SRDC) often results in negative transfer—performing worse than just running the unadapted model blindly. On the hardest lung cancer transfer task, several standard methods collapsed into predicting a single class for every patient.
  • Local domain clues should guide global pooling: By using patch-level domain predictions to mask out attention weights before slide-level aggregation, DARE neatly bridges the gap between microscopic pixels and macroscopic diagnoses.
  • Little data goes a long way: You don't need a massive data dump from a new hospital to adapt a model. Just a tiny handful of unlabeled slides is enough to recalibrate the feature space.

Key Results

Using the CONCH foundation model and DTFD-MIL backbone, DARE achieves state-of-the-art results across all four transfer tasks:

  • Big jumps on hard shifts: On the notoriously tough CPTAC $\rightarrow$ TCGA (lung) task, unadapted DTFD scores 57.46% AUC. DARE boosts this to 87.39% AUC (and 77.71% accuracy), beating the second-best adaptation method by 8.98 AUC points. On the reverse TCGA $\rightarrow$ CPTAC task, DARE hits 97.83% AUC and 94.71% accuracy.
  • Multi-class brain cancer: DARE reaches 83.89% AUC (TCGA $\rightarrow$ IPD) and 83.45% AUC (IPD $\rightarrow$ TCGA), consistently beating both pathology-specific baselines (RAM-MIL, DETA) and natural-image UDA methods.
  • Plug-and-play flexibility: Swapping the MIL aggregator to CLAM or upgrading the feature extractor to the newer UNI2-h foundation model preserves DARE's lead across the board.
  • Extreme data efficiency: Using only 5% of the unlabeled target hospital data, DARE boosts CPTAC $\rightarrow$ TCGA AUC from 57.46% to 74.99%, and TCGA $\rightarrow$ CPTAC accuracy from 54.24% to 79.83%.

Limitations and Future Work

Not discussed in the paper. (Note: Based on the provided main text, the authors do not include a dedicated limitations or future work section, though architectural scope is implicitly bounded to attention-based MIL backbones that output patch-importance scores.)

Summary updated

Abstract

Pathological whole slide images (WSIs) exhibit substantial domain shifts across hospitals due to variations in scanning devices, staining protocols, and tissue preparation procedures, leading to significant performance degradation when models are applied to data from different sources. Although unsupervised domain adaptation (UDA) has shown strong performance in transferring models from a labeled source domain to an unlabeled target domain in natural images, it remains relatively underexplored in computational pathology. The ultra-high resolution of WSIs and their pronounced inter-slide and intra-slide heterogeneity pose unique challenges for domain adaptation, often rendering existing UDA methods unstable and susceptible to negative transfer. To address these challenges, we propose Dual-level Adversarial learning with domain-aware REgularization (DARE), a plug-and-play UDA framework for WSI classification. DARE incorporates adaptive pseudo-labeling within a teacher-student architecture to provide stable supervision for the target domain, alongside adversarial alignment of both patch-level and slide-level embeddings. Together, these components enable the joint optimization of semantic representations at both levels for cross-domain alignment. We further introduce domain-aware attention masking to regularize attention and improve cross-domain generalization. Extensive experiments on four public WSI datasets demonstrate that DARE consistently outperforms state-of-the-art approaches across various domain shifts.
BibTeX
@inproceedings{jiang2026dare,
  author = {Yuxuan Jiang and Haichuan Dong and Manning Wang},
  title = {{DARE: Dual-Level Adversarial Learning with Domain-Aware Regularization for Whole Slide Image Classification}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Eh2LNe24lx},
}
Figure