SGCD: Stain-Guided CycleDiffusion for Unsupervised Domain Adaptation of Histopathology Image Classification
Authors: Hsi-Ling Chen
Chun-Shien Lu
Pau-Choo Chung
Venue: NeurIPS 2025 spotlight ()
Keywords: Transfer Learning
Domain Adaptation
Generative Models
Primary area: deep_learning

Abstract: The effectiveness of domain translation in addressing image-based problems of Unsupervised Domain Adaptation (UDA) depends on the quality of the translated images and the preservation of crucial discriminative features. However, achieving high-quality and stable translations typically requires paired data, which poses a challenge in scenarios with limited annotations in the target domain. To address this issue, this paper proposes a novel method termed Stain-Guided Cycle Diffusion (SGCD), employing a dual diffusion model with bidirectional generative constraints to synthesize highly realistic data for downstream task fine-tuning. The bidirectional generative constraints ensure that the translated images retain the features critical to the downstream model in properly controlling the generation process. Additionally, a stain-guided consistency loss is introduced to enhance the denoising capability of the dual diffusion model, thereby improving the quality of images translated between different domains using latents from one domain and a diffusion model trained on another. Experiments conducted on four public datasets demonstrate that SGCD can effectively enhance the performance of downstream task models on the target domain.

SGCD: Stain-Guided CycleDiffusion for Unsupervised Domain Adaptation of Histopathology Image Classification
Hsi-Ling Chen Minn-Wu School of Computing National Cheng Kung University, Taiwan mm6114027@gs ncku. edu.tw
Chun-Shien Lu Institute of Information Science
Academia Sinica, Taiwan ccs0iis. sinica. edu, tw
Pau-Choo Chung
Department of Electrical Engineering National Cheng Kung University National Chung Cheng University, Taiwan pechung@ee ncku. ncku.edu.tw
Abstract
The effectiveness of domain translation in addressing image-based problems of Unsupervised Domain Adaptation (UDA) depends on the quality the translated images and the preservation of crucial discriminative features. However, achieving high-quality and stable translations typically requires paired data, which poses a challenge in scenarios with limited annotations in the target domain. To address this issue, this paper proposes a novel method termed Stain-Guided Cycle Dif- fusion (SGCD), employing dual diffusion model with bidirectional generative constraints to synthesize highly realistic data for downstream task fine-tuning. The bidirectional generative constraints ensure that the translated images retain the features critical to the downstream model in properly controlling the generation process. Additionally, stain-guided consistency loss is introduced enhance the denoising capability of the dual diffusion model, thereby improving the quality of images translated between different domains using latents from one domain and a diffusion model trained on another. Experiments conducted on four public datasets demonstrate that SGCD can effectively enhance the performance of downstream task models on the target domain.
1 Introduction
Machine learning is powerful for aiding pathologists in analyzing histopathology slides and diagnos- ing cancer. However, in medical imaging, models trained dataset often struggle generalize across different hospitals or laboratories due to variations sample preparation, staining protocols, and digitization processes HHoward al. (202T). These inconsistencies create domain shifts between the training domain (source domain) and real-world application settings (target domain), leading to drop in model performance. In scenarios where the source domain is fully labeled but the target domain lacks annotations, Unsupervised Domain Adaptation (UDA) Wilson and Cook (2020) seeks bridge this gap by aligning the distributions of two domains, allowing models trained on the source domain to perform effectively in the target domain.
Traditional stain normalization-base UDA methods Chang al. 2221 Vahadane et al. (006)); Zhou et al. (2019) align image distributions by decomposing an input image into stain color matrix and stain density map, using reference image's stain color matrix for normalization. However, their
39th Conference on Neural Information Processing Systems (NcurIPS 2025).

---

performance is highly dependent on selecting an appropriate reference image, which requires domain expertise ensure it accurately represents the target domain. Moreover, annotating Whole Slide Images (WSIs) is time-consuming and demands expert interpretation, adding complexity to domain adaptation. In histopathology. positive and negative samples often share similar morphological features, making it challenging to distinguish critical diagnostic details. Preserving subtle structural information is crucial for reliable cancer diagnosis, yet it is easily lost during domain adaptation.
While generative model-based UDA methods methodssChang et al. (2021); Figueira et al. (2020); Xing et al. (2019) transform images across domains, they primarily emphasize statistical feature alignment, often at the expense of fine-grained structural details. For instance, STRAP Yamashita et al. (2021)
STRAAPYYaashita
employs AdaIN Huang and Belongie| (2017) to normalize feature distributions, and SST Cho et al. (2017) utilizes Kullback-Leible divergence for feature alignment. However, according to Khamankar et al. 2202). these techniques tend to overlook structural integrity, which is crucial for accurate diagnosis in histopathology.
While contrastive (e.g., CluSiam Wu et al. (2023)) and continual learning (e.g., ConSlide ConSlide/Huang et al. (2023) enhance feature representations using unlabeled data, they do not directly tackle domain discrepancies. GAN-based methods address this by generating realistic samples to align source and target domains, thereby reducing domain shifts Chiou et al. (024). Dual consistency models like HistAuGAN Wagner et al. (2021) and ContriMix Nguyen et al. (2024) further enhance alignment by extracting Nomain-invariaee
content through encoder-decoded designs. However, this architectural dependence limits their ability to disentangle domain specific and pathology-relevan
features [i et al.
(2023b). For instance, MultiPathGANN Nazki et al. 2023) shows that while high-level structures can be modeled, semantic alignment remains a challenge. ContriMix's 's reliance on accurate content and attribute encoders also constrains its adaptation performance Nguyen et al. (2024). Other approaches, such as Degion-Guided CycleGAN Boyd et al. (2022) and CAGAN Cong et al. (2022). utilize ROI localization or histogram loss but are sensitive ROI accuracy reference quality. Additionally, GANs commonly suffer from mode collapse, limiting sample diversity and their domain adaptation
efficacy.
Thus, diffusion models Ho et al. (2020) have emerged as a promising alternative to GANs for image translation in UDA problems, offering more stable and controlled training while improving diversity. While proper diffusion modeling requires paired data to ensure reliable domain transformation through direct supervision enabliin the model learn exact correspondences between the source and target domains- such data are often extremely difficult to obtain in real-world scenarios, particularly in the medical domain. To address this limitation, our study proposes Stain-Guided CycleDiffusion (SGCD) architecture with bi-directional generation constraints to synthesize highly realistic data for downstream task fine-tuning. The dual-diffusion model is based on the stain-based conditional constraints and semantic constraints, which allows the semantic information of the predicted images be refined backward and forward from the initial generation step. ensuring that important discrimi- native features are preserved in the generated images, and thus achieving higher UDA performance. Meanwhile, the stain- stain-guider guided consistency loss also proposed, which can enhance the denoising ability of the dual-diffusion model in the domain translation.
The contributions of this study include:
The proposed SGCD a dual diffusion framework with bidirectional generative constraints that preserves semantic information during domain translation to enhance downstream task performance in the target domain.
The stain-guided consistency loss mitigates the reliance on paired data, thereby improving the model's applicability in real-world scenarios.
The results obtained on four public pathology test sets show that SGCD can generate higher- quality images, which further ensures the performance of downstream task models on the target domain.
2
Related Work
This section reviews the related work on three key approaches underlying the proposed SGCD method. In [T] we compare SGCD with existing stain UDA methods based on various aspects, including whether they require paired training data or specific reference images for adaptation, rely on auxiliary

---

Input Image
Generative
Paired Data Reference Imaaee
Handling Heterogeneity
Auxilary Models Data
Method
Model
Vahadane Vahadane al.
2016
Stain mix.up hang
WSI
X
X
V
StainNet Kang et 202
WSI
GAN
X
X
StainDif
WSI
Diffusion Model
BEDM el 2025g
Natural Image
Diflusion Model
V
X
X
A-Bridge WANG
Natural Image
Diffusion Model
X
HistAuGAIY Wingner er
2021
WSI WSI
GAN
X
V
V
G-SAN 21235
GAN
V
X
STRAP
2021
WSI
X Diffusion Model
X
V
X
Ours (SGCD)
WSI
X
X
Table 1: Comparision of different stain UDA methods. SGCD does not require specific reference
images and can be directly applied to the target domain without the need for image normalization.
models incorporate additional input information, and are capable handling the less heterogeneity of medical images.
2.1 Stain Normalization
When scanning histologically stained tissue samples, histopathology image x R with n pixels in RGB space is converted to its relative optical density via the Beer-Lambert (BL) law Gavrilovic al. (2013): (I.
loog # WH, where is the illumination intensity (255 for 8-bit images), and W E R3xs and H E R represent the stain color matrix and stain density map, respectively, for stains. BL law supports stain normalization by reconstructing target image using the source's s stain density and the target's s stain color. However, relying on a single reference image Chang et al. (202T); Rabinovich et al. (2003); Vahadane et al. (2016) may introduce color artifacts due to staining and digitization variability. ContriMix Nguyen et al. (2024) builds on this with ottlc transfer to synthesize images for domain adaptation, but its performance limited by encoder accuracy and the difficulty of designing content and attribute encoders for diverse datasets.
2.2 Generative Adversarial Network (GAN)
Numerous GAN-based approaches have been developed for UDA in histopathology Vasiljević et al. (2023); Guan et al. (2024); Nazki et al. 2023); Wagner et al. (202T). Similar to stain normalization
methods Hetz al. (2024); Salehi and Chalechale (2020); Nishar al. 2020). these approaches
often convert target domain images into the source domain to enable direct application of source- trained models. StainGAN (Shaban et al. (2019) first adopted CycleGAN-based architecture Zhu et al. (2017) for stain normalization, while StainNet Kang et al. (2021) enhanced performance and efficiency via knowledge distillation using StainGAN outputs. Alternatively, model generalization techniques Figueira et (2020): Xing et al. (2019) transform annotated source images into the target domain for training. HistAuGAN Wagner et al. (202I) disentangles content and style to manipulate color properties, but despite producing realistic structures, such GANs often struggle with semantic consistency Nazki et (2023).
2.3 Denoising Diffusion Probabilistic Models (DDPM)
Denoising Diffusion Probabilistic Models (DDPM) Ho et al. (020)) consist of a forward and a reverse phase of small, reversible transformations. In the forward phase, noise is progressively added the input image until it approximates a normal distribution A (00 I). Let x, be the latent at step and let D be the diffusion model. The forward process is defined as:
q D) N NZri y
BP 11-1. PI),
(I)
where 3. denotes the noise schedule, The reverse process gradually removes the noise to recover the original data, modeled as:
p(x D)
3P
N
æ1-11
21
D(2r,) 1)
.8.1
(2)
/1
3
3D
3

---

Perrein
Funvard
Enalaee
WiS
of
stakeett
Revense
Wilt
i-stepo
lineeop
Dioniin B
Eompunttto
(A)
Figure I: Illustrative example. (a) Similarity of the generated image with domain and domain B, respectively. After adding specific degree of noise to the image from domain A, the reverse process performed via diffusion model trained domain B. The generated images are more similar to domain B when more noise is added. For less noise, it is more similar to domain A. The results show the same trend when using Inception V3 and ResNet50 as feature extractors for FID metrics. (b) The reverse process guided by the additional condition preserves the desired categorical features regardless the increase in added noise.
with 3 II: -.). Recent works such as BBDM Li al. (2023a) and A-Bridge WANG al. (2024) enable image-to-image translation by modifying the noise schedule. SynDiff Ozbey et al. (2023) incorporates paired generators and discriminators into the reverse process for source-target domain translation with large-step sampling. StainDiff [hen and Ke (2023) further adapts diffusion for stain normalization in histopathology images, but its reliance fine structural details may hinder robustness in handling rare or subtle patterns.
auxiliary networks to preserve
3 Preliminary and Motivation
Let Da the diffusion model trained on domain and let & be the given timestep. Referring to Eq. (1). the forward process for an initial image zo is defined as: f' (No, k) = II (<0:/<t- Da). From Eq. ( the reverse process for diffusion model DA and noisy image 2e be defined as: TDA (Ik.
p(*2) II. p( DA). Two experiments were performed justify the motivation and intuition underlying the proposed SGCD method: (1) An investigation into the relationship between the images generated by the diffusion model and the actual target domain images; and (2) A demonstration of the use of additional constraints to ensure that the generated images retain specific, important features.
3.1 Similarity of Generation Distributions to Target Distributions
As previously described, the diffusion model's forward process adds noise to input images, while the reverse process removes it to reconstruct the data. This enables domain-specific image generation by applying the reverse process to noise using model trained the target domain (S et al. (2022).
However, it remains unclear whether a latent from domain can yield similar results when denoised by model trained domain B. To examine this, used public diffusion models from Google Google (2022a|b), b), trained on the LSUN bedroom and church datasets Yu et al.] (2013). representing domains A and B, respectively (denoted D and DB). Images x
A were corrupted
at various noise levels and then denoised using DB, i.e., rDg (JD, kk, k). As shown in Figure a FID scores Heusel al. (201)) computed with Inception v3 Szegedy al. (2016) and ResNet50 He et al. (2066) reveal that higher noise levels led to outputs resembling domain B, but at the cost losing key characteristics of the original domain images.
3.2 Reverse Process Guided by Conditions
In diffusion models, conditional constraints can retain critical information during forward and reverse processes. For instance, Gao el al. Gao al. (2023) applied low-pass filtering to preserve image outlines throughout denoising, enabling corrupted categories to be inferred from restored images. To explore this mechanism further, we conducted a second experiment using the Office31 dataset et al. (2010), which includes three domains and 31 categories. Specifically, the Amazon (domain

---

(%
MADDC VADIC (2
Stage
Stage
Figure 2: Overview of the proposed method. (a) shows the two-stage conversion of proposed SGCD architecture. (b) shows the training flow target classifier CT, where both the annotated image converted by S and the target image are used to fine-tune the classifier to be applied to the target domain.
A) and Webcam (domain B) domains were selected to observe changes in categorical features. Algorithm D in Appendix A.1 describes the condition-guided reverse process. Unlike Gao al. (2023). we use a Canny edge detector Canny (1986) as s(.), guiding f along the gradient minimizing the difference between ((0o) and (( thus preserving texture features. As shown in Figure (b), the unconditional case yields textures unrelated to the original image, while conditional guidance ensures generated features resemble the source.
4 Proposed Method
4.1 Stain-Guided CycleDiffusion (SGCD)
Figure 2 iillustrates the basic structure of the proposed SGCG method. Based on the similarity results shown in Figure a). dual diffusion model pre-trained the source and target domains is utilized to perform the reverse process, effectively converting the input images into their corresponding domains. However, such a transformation does not guarantee the preservation of key features. In SGCD, this issue is addressed by a dual diffusion model combined with bidirectional constraints and a quind- consistency loss.
To better simulate the target domain and improve the performance of the downstream task model, two-stage conversion cyclic framework is utilized train the dual diffusion model. Without this cyclic framework, the diffusion model would merely convert data from one domain to another with no additional control, potentially leading inconsistencies and loss of important features. However, the proposed cyclic framework allows the final reconstruction results to be incorporated as additional constraints, thereby enhancing the consistency between the translations from domain to domain B and domain B to domain A, respectively. As result, the model's 's ability to generate realistic target images improved. For a given diffusion model D and latent x, at time an estimate image at step 0 is obtained by: (2,2) = de It - b, D(2e, t), where a = /1/3P and by = V1/3P 1.
And given reference image Iref. . the stain stain-guided process is:
G( her) = 8.-1 - Va, (( Trell for t.-1 1 DtU |r,, D);
which can be iterated by: xt
(n+1) G(z(") (m) Let)
2 (0)
It.
In Eq. (3), image 2;-1 is moved along the gradient that minimizes the distance between (x;))) and Ireg. In the first stage, the diffusion model Dr trained using the target domain T converts the source images in S to a set target-style images, denoted as Ts. for a given timestep & (i.e., S + T). Meanwhile, the diffusion model Dş in source domain S converts the target images in T to set of source-style images, denoted as Sr, for a given timestep (i.e. + S). The first stage can be summarized
T' (f, 1 TTT),
(4)
5

---

Ts Ts= (r k))
| (.rES). ST
S fros (2lka)) ,)
TTT. = (5) kg.
Eq. (4) denotes the forward noise addition processes on S and T, respectively. In Eq. (5) Ts denotes the target-style image generated from the source image and ST denotes the source-style image produced from the target image. Tss uses a reference image constructed using the target stain color matrix Wr and the source stain density map Hs, while ST uses a reference image constructed using the source stain color matrix Wg and the target stain density map Hr, respectively.
The second stage transforms the outputs of the first stage back to the original source and target domains (i.e., S T + S and T S + T). It is formulated as:
T'g = (U k) x Tsh, ST = (/Dg x E Sr),
(6)
= (rD (1lkk), ,K)
x E Í= (rDr (alhk) k²) I E St), == kg.
(7)
Eq. 66) denotes the forward noise addition processes on Ts and Sr, respectively. In Eq. 7. denotes the source image reconstructed from the target-style image and T denotes the target image reconstructed from the source-style image. Š uses reference image constructed using the source stain color matrix Ws and the source stain density map Hg. while I' uses reference image constructed using the target stain color matrix WT and the target stain density map Hr, respectively.
$
4.2 Training of Dual Diffusion Model
Recall that the results of the second experiment FFigure[Jb)) show that the use of only diffusion model to convert images from one domain to another may result in the loss of important features. To effectively realize the conversion between different domains, while simultaneously ensuring that the detailed information in the pathological images is preserved during the conversion process, SGCD utilizes bidirectional constraints and stain-guided consistency (SGC) loss to enforce the diffusion model's generative process in both forward and backward directions.
A stain-guided constraint is applied at each reverse step from k to ka, where kG is the hyperparameter to control the range of stain-guide constraint. Specifically, for the route + T's in Figure a)),, the reference image 1t's is used to guide the generation of Ts. Each step in the reverse process is moved along the gradient that is close to the reference image, ensuring that the final converted image at step is as similar possible to the reference image. An analogous procedure is employed for the route T + S1 T and Ts + S. The detailed steps of the S + T + S conversion process are shown in Algorithm in the Appendix.
2
Let Cs and Cr be the source and target classifier, both pre-trained on S. Task constraints Σ y Cs(S) and Σy. y (T's are applied to preserve the crucial feature information required for downstream tasks from step 0 to k. thereby enabling the downstream model to produce consistent results. Additionally, ensure the latents from the source (target) domain be converted into the target (source) domain, consistency constraint is imposed on the guided reconstructed images $ and T for further improving the quality of the converted images. Therefore, the Stain-Guided Consistency (SGC) loss is defined as: loss5GC [|$-$112 Σv Cs($) + -
(8)
Σ y Cr(s)...
Since the pre-trained diffusion model is capable of generating images corresponding to the training domain directly, the guiding processes in S + T - S and T S + ''' do not require paired images or specified reference images. Thus, our method does not require specific reference images and paired data, making it more adaptable to a wider variety of applications, as described in Table [] The two-stage conversion process yields complete S + S and T + T cycles. Thus, the round-trij -mpp cyclic process can used to fine-tune pre-trained diffusion models, enabling them to generate images with distributions similar to the training domain, even when the input is perturbed (i.e., different from the training domain). This then allows the converted source domain images to be used train downstream task models. A more detailed discussion of the task losses is provided in the next section.

---

4.3 Training Strategy
An alternating training approach used to update the diffusion models and classifiers iteratively. Css is fixed during all the training phases to force the diffusion model to produce the correct image during the training phase. Cr is the desired target model, whose classifier head will be fine-tuned through the alternating training. In particular, classifiers Cs and Cr are first fixed, and the two-stage conversion process introduced in the previous section is performed using Eq. (8) to fine-tune the diffusion models with the reconstructed images in S and T, and the target-style images in Ts. In the next step, the two diffusion models are fixed and the classifier CT is trained using the task loss in Eq. (2). The generalization ability of the classifier Cr is gradually enhanced using the images converted by the boosted diffusion model and source images with annotations such that it can progressively adapt to operating in the target domain. Furthermore, given the availability of unlabeled target domain images, the maximum mean discrepancy (MMD) Gretton et al. (2012) loss is additionally employed to reduce the distribution distance between the converted images and the real target images. Thus, the task loss is defined as:
loSStask -E v. CT(T,) + loSs (Cr(T)), CT(T)),
where I0SSMMD represents the MMD loss, which is used to measure the distance between the two embedding feature distributions. Given the annotated target-style images Ta. the cross entropy loss is used to fine-tune the target classifier Cr. The training process of CT is shown in Figure 2bb).
5
Experiment Results
5.1 Datasets
SGCD was evaluated on four open datasets: Camelyon17 Bejnordi et al. (2017), Camelyon16
Bejnordi et al. (2117), CamelyonI7-WILDS Koh et al. (202)), and MITOS & AT Racoceanu
et al. 2014). The details of the four datasets provided in Sec. A.2 of the Appendix.
5.2 Setting
The experiments were implemented on NVIDIA V100 GPU with Python 3.10.12 and Pytorch 2.4.0. The Adam optimizer was employed with learning rate of 2e 4 and batch size of 4. The total timestep T of the diffusion models was set 1000. Stain guidance was applied from timestep 600 to 100. The remaining timesteps used the standard reverse diffusion process in Eq. ②
For the balanced dataset Camelyon 7-WILDS, following the WILDS benchmark, 1en Huang et al. (017)) was used as the backbone of classifiers Cs and Cr, and the models were evaluated using the average accuracy. For the imbalanced datasets Camelyon 16 and Camelyon 17, ResNet50 He et al. (2016) was used as the backbone of the classifiers, and the Area Under the Curve (AUC) was adopted as the evaluation metric, For the MITOS & ATYPIA 14 dataset, visualizations of the generated images were provided, and their quality was evaluated using the SSIM Wang et al. (2004) and PSNR metrics.
5.3 Comparison of General UDA Methods
To investigate the distinction between the medical image-specific UDA methods and general UDA methods, experiments were conducted Camelyon17-WII 1-WILDS. Table 2 presents the comparison results. Among the comparison methods, Connect Later Qu and Xie (024)) and SwAV Caron et al.) (200)) were initially trained on the target domain enhance their clustering capability inside followed by fine-tuning on the labeled source domain. Regarding the difference between the various comparison models, Connect Later simulates the target data by augmenting the source data, while AFN Xu et al. (2019) aims to achieve domain invariance between the source and target domains. Simprov Tahir et al. (2022) adopts knowledge distillation to enable the student model to adapt to the target domain. RLSbench [Garg et al. (2023) refines the estimation of the target domain distribution, making more closely aligned with that of the actual target. Designed specifically for medical imaging, ContriMix Nguyen et al. (2024), STRAP Yamashita et al. (2021), and our SGCD demonstrate better performance than general UDA approaches. Nevertheless, Connect Later, through its tailored augmentation approach and subsequent model fine-tuning, demonstrates marginally
7

---

Test
Test
Method
ACC
AUC
Connect Later QQu and Xie (2024)
95.0
98.7
SWAV Caron ct al (2020)
91.4
95.2
AFN Xu ct al 2019)
83.2
91.3
Simprov Tahir el al.
2022
92.8
RLSbench Garg
2122
86.8
STRAP Yamashita a.
2021
93.7
98.1
ContriMix Nguyen et al.
2024
94.6
Ours (SGCD)
94.7
98.6
Table Histopathology classification results for CamelyonI7-WILLDS.
superior performance as a result of an enhanced feature-level alignment between the source and target domains.
5.4 Histopathology Classification
For histopathology classification, Vahadane et al. (2016), Macenko et al. (2009), and Reinhard et al. (200T) are classical stain normalization methods, while Stain Mix-Up Chang et a (2021) uses stain-normalized images augmented data to train the classifiers for improved generalization.
StainNet Kang et al. (2021) and MultiPatGAAN Nazki et al. (2023) utilize GANs for stain normal- ization, further enhancing the image quality. BCD-net Yang al. 2023) estimates more accurate color matrices and stain density maps using two models, leading to improved stain normalization results. SPA Xiao et al. 20044,, advanced UDA method for general images, enhances in-domain classification and cross cross-domain alignment using latent feature matching.
Table 3 presents the classification results. It is observed that the traditional stain normalization methods exhibit a poorer performance and are susceptible to the influence of the reference images, resulting in less stable performance. StainNet and MultiPathGAAN, benefiting from the excellent image generation capabilities of GAN architectures, achieve promising results on many domains. G- et al. (2023b) improves the feature alignment in GAN to further enhance the classification accuracy. HistAuGAN Wagner et al. (2021) and ContriMix Nguyen et al. (2024) are both augmen- tation methods but are inherently constrained by the diversity of input data or the availability of source-domain samples, leading to performance discrepancies when encountering unseen data. Stain Mix-Up enhances model generalization by using augmented data, but perturbed data in highly similar domains may lead the model to deviate from the target domain. Connect Later performs better in the balanced dataset, Camelyon 17-WILDS, than the imbalanced dataset, Camelyon primarily due to its sensitivity to augmentation hyperparameters. BCD-Net, which focuses on solving blind color deconvolution problems for histological images, and SPA, which employs latent feature matching, can both preserve more critical class information the images, and thus yield better performance. A more thorough evaluation presented in Sec. A.3 of the Appendix.
Table presents the classification results for Camelyon16. In comparison to traditional stain nor- malization and GAN-based methods (e.g., StainGAN and StainNet), SGCD exhibits higher AUC score.
5.5 Ablation Studies
The visual results of various stain transfer methods are presented and discussed in Sec. A.4 of the Appendix. In addition, the validation of proposed two-step conversion process is examined in Sec. A.5 of the Appendix.
5.6 Remarks on Stability, Reproducibility, and Generalizability
SGCD aims to enable diffusion models to accept specific images as input instead of noise. This adaptation accomplished through fine-tuning with consistency constraints, avoiding the need for complex training framework.

---

Method
C2
Ca
C4
Cs
Average
No adaptation
83.8
64.5
85.0
73.6
76.7
Vahadane er
Vahadane
2016
79.5
88.1
86.4
67.3
80.3
Mackenko et al.
Macenko ct
2009
63.1
86.9
71.8
78.8
75.2
Reinhard et al.
Reinhard et al
2001
82.9
85.9
81.6
88.6
84.8
Stain Mix-Up Chang et al.
202T
87.2
82.6
86.9
68.3
81.3
StainNet Kang
2021
83.6
89.5
86.2
87.7
86.8
MultiPathGAAN Nazki
(2023
85.0
69.8
90.7
80.3
81.5
BCD-net Yang ei al. 2023
89.0
92.4
91.8
87.9
90.3
Connect Later Quu and Xie
20244)
88.9
82.3
93.0
84.1
87.1
SPA Xiaō ct al. 2124
88.7
92.3
94.7
92.7
92.1
HistAuGAN Wagner
(021
90.5
90.3
91.9
85.0
89.4
G-SAN La ct al. (2023b)
87.9
84.7
92.7
82.5
87.0
ContriMix
Nguyen et al. (2024)
89.0
90.3
92.0
88.5
90.0
Ours (SGCD)
89.1
94.9
98.1
93.9
94.0
Table 3: Histopathology classification results for Camelyon17 7 under the condition that C1 is the source domain and others regarded as the target domain individually. Here, AUC (9)) was adopted as the evaluation metric.
Method
Test AUC (%)
No Adaptation
75.9
Reinhard et al.
Reinhard et al.
2001
89.3
Mackenko et al.
Macenko et a.
2009
90.3
Vahadane et al.
Vahadane et al. 2016
88.2
StainGAN Shaban al.
[0
90.5
StainNet Kang al. 2021
93.5
Ours (SGCD)
95.8
Table 4: Histopathology classification for Camelyon16.
Stability: SGCD fine-tunes pre-trained diffusion model using consistency constraints to guide the adaptation process. Since the process involves only fine-tuning, it is inherently stable.
Reproducibility: The fine-tuning process involves only hyperparameter, i.e., the timestep k introduced Sec. 4.2 In addition, the proposed two-step approach preserves both structural integrity and distribution consistency in the S-+T and T-+S transformations, validated in Sec. Af Appendix.
Generalizability:
The consistency constraints allow SGCD to generalize effectively across diverse pathological domains, as shown in Tables 5 images from different staining protocols and Table 6 and Figure of the appendix for images from diverse scanners.
6 Conclusion
An innovative stain stain-guided cyclic diffusion (SGCD) model has been proposed to effectively solve the problem of model performance degradation caused by domain distribution differences in histopathol- ogy images. SGCD consists of: (1) bidirectional generative constraints to maintain feature consistency, (2) SGC loss to improve the quality the synthesized images, and (3) high-quality target domain synthesized images that preserve crucial discriminative features and enhance the generalization ability of downstream task models. The experimental results have confirmed the superiority of SGCD for adaptive tasks in the pathology image domain.
Limitations. We acknowledge that the cyclic bi-directional training, while crucial for maintaining semantic integrity without paired data, introduces additional computational demands compared to traditional UDA techniques. For more efficient deployment in practice, future efforts will focus on optimizing sampling schedules to reduce inference steps, and exploring smaller, more efficient diffusion model architectures.
Future Work. Our initial focus on binary classification within H&E staining establishes founda- tional efficacy. Future studies will explore applying SGCD to more complex scenarios, including

---

multi-class classification and adaptation between entirely different staining protocols (e.g., H&E to immunohistochemistty... We plan tackle highly challenging cross-organ domain adaptation tasks and generalize the methodology to other medical imaging domains, such as immunology problems, where domain heterogeneity is significant challenge.
Acknowledgement
This work supported by the National Science and Technology Council (NSTC) with Grant NSTC 114-2634-F-006-022 We thank to National Center for High- erformance Computing (NCHC) for providing computational and storage resources.
10

---

References
Bahak Ehteshami Bejnordi, Mitko Veta, Paul Johannes Van Diest, Bram Van Ginneken, Nico Karssemeijer, Laak. Meyke Hermsen, Quirine Manson, Maschenka Balkenhol, al. Diagnostic assessment of deep learning algorithms for detection of lymph node metastases in women with breast cancer. Juma, 318(22)22199-222 2017.
Geert Litjens, Jeroen AWM
Joseph Boyd, Irène Villa, Marie-Christing Mathieu, Eric Deutsch, Nikos Paragios, Maria Vakalopoulou, and Stergios Christodoulidis, Region-guided cyclegans for stain transfer in whole slide images. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 356-365. Springer, 2022.
John Canny. A computational approach to edge detection. IEEE Transactions on pattern andlysis and machine intelligence, (9986,9-69,, 1986.
Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning visual features by contrasting cluster assignments, Advances in neural information processing systems, 33:9912 9924, 2020.
Jia-Ren Chang, Min-Sheng Wu, Wei-Hsiang Yu, Chi-Chung Chen, Cheng-Kung Yang. Yen-Yo Yu Lin, and Chao- Yuan Yeh. Stain mix-up: Unsupervised domain generalization for histopathology images. In International Conference on Medical Image Computing and Computer-Assisee Intervention, pages 117-126, 2021.
Chien-Yo Yu Chiou, HUNG-WER TSAF, WEI-JONG YAN, MING TING St, MARIA GABRANIN KUO-SHENG
CHENCP, MENG-LING WU, PAU-CHOO CHUNG, et al. Acc-gan: Cross scanner robustness with annotation consistency guided cycle-gan. Journal of Information Science & Engineering, 40(3), 2024.
Hyungjoo Cho, Sungbin Lim, Gunho Choi, and Hyunseok Min. Neural stain-style transfer learning using gan for histopathological images. arXiv preprint arXiv: 171000834,, 2017.
Cong Cong, Sidong Liu, Antonio Di leva, Maurice Pagnucco, Shlomo Berkovsky, and Yang Song. Colour adaptive generative networks for stain normalisation of histopathology images. Medical Image Analysis, 82: 102580, 2022.
Gonçalo Figueira, Yaqi Wang, Lingling Sun, Huiyu Zhou, and Qianni Zhang. Adversarial- domain adaptation networks for unsupervised tumour detection in histopathology. In 2020 IEEE 17th International Symposium on Biomedical Imaging (ISBI), pages 1284-1288. IEFE, 2020.
Jin Gao, Jialing Zhang, Xihui Liu, Trevor Darrell, Evan Shelhamer, and Dequan Wang. Back to the source: Diffusion-driver drivenn test-time adaptation. In 2023 IEEE/CVF Conference on Computer Vision and Patern Recognition (CVPR), 2023.
Saurabh Garg, Nick Erickson, James Sharpnack, Alex Smola, Sivaraman Balakrishnan, and Zachary Chase Lipton. Risbench: Domain adaptation under relaxed label shift. In International Conference Machine Learning, pages 10879-10928. PMLR, 2023.
Milan Gavrilovic, Jimmy C Azar, Joakim Lindblad, Carolina Wählby, Ewert Bengtsson, Christer Busch, and Ingrid B Carlbom. Blind color decomposition of histological images. JEEE transactions on medical inaging, 32(6):983-994, 2013.
Google. DDPM for bedroom image generation. httpp:///hnggggggeee.oo////o/oop bedroom--eeddooommooo 256
2022a. [Online; accessed 01-July-2024).
Google, DDPM for church image generation. http:e///unggigggee...oo/o////sp 256
2022b. [Online; accessed 01 01-July-2024J.
Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Schölkopf, and Alexander Smola. A kerne two-sample test. The Journal of Machine Learning Research, 13(1):723-773, 2012.
Xianchao Guan, Yifeng Wang. Yiyang Lin, Xi Li. and Yongbing Zhang. Unsupervised multi-domain progressive stain transfer guided by style encoding dictionary. IEEE Transactions on Image Processing. 2024.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016.
Martin Hetz, Tabea-Coe Clara Bucher, and Titus Brinker. Multi domain stain normalization for digital pathology: A cycle-consistent adversarial network for whole slide images. Medical Image Analysis, 94: 143, 2024.
11

---

Martin Heusel, Hubert Ramsauer. Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge local nash equilibrium. In Advances in Neural Information Processing Systems. Curran Associates, Inc., 2017.
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840 6851, 2020.
Frederick M Howard, James Dolezal, Sara Kochanny, Jefree Schulte. Heather Chen, Lara Heij, Dezheng Huo, Rita Nanda, Olufunmilayo Olopade, Jakob N Kather, al. The impact of site-specific digital histology signatures on deep learning model accuracy and bias. Nature communications, 12(1))4423, 2021.
Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and puttern recognition, pages 4700-4708, 2017.
Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE international conference on computer vision, pages 1501-1510, 2017.
Yanyan Huang, Weiqin Zhao, Shujun Wang. Yu Fu, Yuming Jiang, and Lequan Yu. Conslide: Asynchronous hierarchical interaction transformer with rreaaup-rerraanize rehearsal for continual whole slide image analysis. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 21360, 2023.
Hongtao Kang, Die Luo, Weihua Feng. Shaoqun Zeng, Tingwei Quan, Junbo Hu, and Xiuli Liu. Stainnet: a fast and robust stain normalization network. Frontiers in Medicine, 8:746307, 2021.
Vaihhav Khamankar, Sutanu Bera, Saumik Bhattacharya, Dehashis Sen, and Prabir Kumar Biswas. Histopatho- logical image analysis with style-angmented feature domain mixing for improved generalization. In Inter- national Conference on Medical Image Computing and Computer-Assiste Intervention, pages 285-294. Springer. 2023.
Pang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie, Marvin Zhang, Akshay Balsubramani, Weihua Hu, Michihiro Yasunaga, Richard Lanas Phillips, Irena Gao, et al. Wilds: A benchmark of in-the-wild distribution shifts. In International conference on machine learning, pages 5637 56644, PMLR, 2021.
Bo Li, Kaitao Xue, Bin Liu, and Yu- Kun Lai. Bbdm: Image- ponge-to-ime to-image translation with brownian bridge diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pottern Recognition, pages 1952-1961, 2023a.
Fangda Li, Zhiqiang Hu, Wen Chen, and Avinash Kak. A laplacian pyramid based generative h&c stain augmentation network. JEEE Transactions on Medical Imaging, 2023b.
Marc Macenko, Mare Niethammer, James S Marron, David Borland, John T Woosley, Xiaojun Guan, Charles Schmitt, and Nancy E Thomas. A method for normalizing histology slides for quantitative analysis. In 2009 IEEE international symposium on biomedical imaging: from nano to macro, pages 1107-1110 10. IEEE, 2009.
Haseeb Nazki, Ognjen Arandjelovic, In Hwa Um and David Harrison. Multipathgan: Structure preserving stain normalization using unsupervised multi-domall domain adversarial network with perception loss. In Proceedings of the 38th ACM/SIGAPP Symposium Applied Computing, pages 1197-1204, 2023.
Tan Nguyen, Dinkar Juyal, Jin Li, Aaditya Prakash, Shima Nofallah, Chintan Shah, Sai Chowdary Gullapally, Limin Yu, Michael Griffin, Anand Sampat, John Abel, Justin Lec, and Amaro Taylor- Weiner. Contrimix: Scalable stain color augmentation for domain generalization without domain labels in digital pathology. In MICCA/ Workshop on Computational Pathology with Multinodal Data (COMPAYL), 2024.
Harshal Nishar, Nikhil Chavanke, and Nitin Singhal. Histopathological stain transfer using style transfer network with adversarial loss. In Medical Image Computing and Computer Assisted mmervention-MCCCA 2020: 23rd International Conference, Lima, Peru, October 4-8, 2020, Proceedings, Part 233, pages 330-340. Springer. 2020.
Muzaffer Özbey, Onat Dalmaz, Salman UH Dar, Hasan A Bedel, Şaban Özurr, Alper Güngör, and Tolga Çukur. Unsupervised medical image translation with adversarial diffusion models. IEEE Transactions on Medical Imaging. 2023.
Helen Qu and Sang Michael Xie. Connect later: Improving tne-tuning for robustness with targeted augmenta- tions. In Forty-first International Conference on Machine Learning, 2024.
12

---

Andrew Rabinovich, Sameer Agarwal, Casey Laris, Jeffrey Price, and Serge Belongie. Unsupervised color decomposition of histologically stained tissue samples. Advances neural information processing systems, 16, 2003.
Daniel Racoceanu, Jessica Calvo, Elham Attich, Gilles Le Naour, and A. Gloaguen. Detection of mitosis and evaluation of nuclear atypia score in breast cancer histological images. 2014.
Erik Reinhard, Michael Adhikhmin, Bruce Gooch, and Peter Shirley. Color transfer between images. IEEE Computer graphics and applications, 21(5))34-41, 2001.
Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In Computer Vision ECCV 2010: 11th European Conference on Computer Vision, Heraklion, Crete, Greece, September 5-11, 2010, Proceedings, Part IV 11, pages 213-226. Springer, 2010.
Pegah Salehi and Abdolah Chalechale. Pix2pix-hased stain-to-stain translation: A solution for robust stain normalization in histopathology images analysis. 2020 International conference on machine vision and image processing (MVIP), pages 1-7. IEEE, 2020.
M Tarek Shaban, Christoph Baur, Nassir Navab, and Shadi Alharqoumi. Staingan: Stain style transfer for digital histological images. In 2019 leee 16th international sympoxium on biomedical imaging (Isbi 2019), pages 953-956, IEEE, 2019.
Yiqing Shen and Jing Ke. Staindiff: Transfer stain styles of histology images with denoising diffusion proba- bilistic models and self- eelf-ensemble. In International Conference on Medical Image Computing and Computer- Assisted Intervention. pages 549 559, 2023.
Xuan Su. Jiaming Song, Chenlin Meng, and Stefano Ermon. Dual diffuusion implicit bridges for image-to-image translation. In The Eleventh International Conference on Learning Representations, 2022.
Christian Szegedy, Vincent Vanhoucke, Sergey loffe, Jon Shiens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference computer vision and pattern recognition, pages 2818-258 2818-2826, 2016.
Anique Tahir, Lu Cheng, Ruocheng Guo, and Huan Liu. Distributional shift adaptation using domain-specifie features. In 2022 IEEE International Conference on Big Data (Big Data), pages 5593-5597. IEEE, 2022.
Abhishek Vahadane, Tingying Peng, Amit Sethi, Shadi Albarqouni, Lichao Wang, Maximilian Baust, Katja Steiger, Anna Melissa Schlitter, Irene Esposito, and Nassir Navah. Structure-preserving color normalization and sparse stain separation histological images. IEEE transactions on medical imaging, 35(8):1962-1977 2016.
Jelica Vasiljević, Friedrich Feuerhake, Cédric Wemmert, and Thomas Lampert. Histostargan: A unified approach to stain normalisation, stain transfer and stain invariant segmentation in renal histopathology. Knowledge- Based Systems, 277:1 10780, 2023.
Sophia Wagner, Nadich Khalili, Raghav Sharma, Melanie Boxberg, Carsten Marr, Walter De Back, and Tingy- ing Peng. Structure- Structure-preserving multi-domain stain color augmentation using style-transfer with disentangled representations. In Medical Image Computing and Computer Assisted Intervention-MICAA 2021: 24th International Conference, Strashourg, France, September 27-October 2021, Proceedings, Part VIII 24, pages 257-266. Springer, 2021.
PEIYONG WANG, Bohan Xiao, Qisheng He, Carri Glide-Hurst, and Ming Dong, Score-based image-to-image brownian bridge. In ACM Multimedia 2024, 2024.
Zhou Wang, Alan Bovik, Hamid R Sheikh, and Eero Simoncelli. Image quality assessment: from visibility to structural similarity. IEEE transactions on image processing, 13(4):600-66 -120000-12.600 2004.
Garrett Wilson and Diane J Cook. A survey of unsupervised deep domain adaptation. ACM Transactions on Intelligent Systems and Technology (TIST), 11(5):146,, 2020.
Weiyi Wu, Chongyang Gao, Joseph DiPalma, Soroush Vosoughi, and Saced Hassanpour. Improving repre- sentation learning histopathologic images with cluster constraints. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 21404 21414, 2023.
Zhiqing Xiao, Haobo Wang, Ying Jin, Lei Feng, Gang Chen, Fei Huang, and Junbo Zhao. Spa: a graph spectral alignment perspective for domain adaptation. Advances in Neural Information Processing Systems, 36, 2024.
13

---

Fuyong Xing, Tell Bennett, and Debashis Ghosh. Adversarial domain adaptation and pseudo-labeling for cross- modality microscopy image quantification. In Medical Image Computing and Computer Assisted Intervention- MICCAI 2019: 22nd International Conference, Shenzhen, China, October 13-17, 2019, Proceedings, Part I 22, pages 740-749. Springer, 2019.
Ruijia Xu, Guanbin Li, Jihan Yang. Liang Lin. Larger norm more transferable: adaptive feature norm approach for unsupervised domain adaptation. In Proceedings of the IEEE/CVF international conference on computer vision, pages 1426-1435, 2019.
Rikiya Yamashita, Jin Long, Snikitha Banda, Jeanne Shen, and Daniel L. Rubin. Learning domain domain-agmostic visual representation for computational pathology using medically medically-irreleannt style transfer augmentation. IEEE Transactions Medical Imaging, 40(12):3945-3995 2021.
Shuowen Yang, Fernando Beezz, Francisco M. Castro-Macías, Rafacl Molina, and Aggelos K. Katsagge- los. Deep bayesian blind color deconvolution of histological images. In 2023 IEEE International Conference on Image Processing (ICIP), pages 710-714, 2023.
Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser, and Jianxiong Xiao. Lsum: Construction of large-scale image dataset using deep learning with humans the loop. arXiv preprint (Xiv::506.03366 2015.
Niyun Zhou, Cai, Xiao Han, and Jianhua Yao. Enhanced cycle-consistent generative adversarial network for color normalization h&ee stained images. International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 694-702, 2019.
Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexci Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE international conference on computer vision, pages 2223-2232, 2017.
14

---

A Appendix
A.1 Pseudo Code Proposed Method-SGCD
Algorithms and 2
show the pscudo-codes of the proposed SGCD method.
Algorithm 1 Reverse Process Guided by Conditions
Input: =n² Image from A, D3: DDPM pretrained on B, Φ(-): Canny edge detector
Parameter: Timestep
Output: Converted image 28
1: 2kk fDA (2:) k) using Eq.
2: for - k...1 do
3: ④t-1 p(p [1t, DB) using Eq. 2
4: 20 V a1 Ft V a. 1 (z
5: Ft-1 Ft-1 Vx, 10(())) d(zg))l
6: end for
7: return 2B D0
Algorithm 2 + S conversion of SGCD
Input: z Image from S, x Image from T, Ds: DDPM pretrained on S, Dy: DDPM pretrained
on T
Parameter: Timestep k, Guide range kG
Output: Converted image zş
1: Compute Wr and, Hr from uff and Ws and Hs from ay, respectively, using BL law in 2.1
2: Get noisy image ~ fD (I k) using Eq. (1)
Get reference image Iref Io exp(-W, Hs).
4: for t + k...k do
5:
ft-1 1--1= GD, (It, Iref) using Eq.
6: end for
7: Initialization for the next stage x0 rDD (rk kG).
8: Get noisy image 2y ~ fDr (x0 T's k) using Eq.
9: Get reference image Iref Io exp( Hs)
10: for 4- ki...i do
11: Ft-1 GD. (2it, Tres) using Eq. 7
12: end for
13: return 2g DDs (I kG)
In Algorithm 2 Lines 2 and 8 represent the forward processes on S and T. respectively. Lines 4~66 represent the Stain-Guided reverse process on T, and Lines 10~12 represent the Stain-Guided reverse process on S. Lines derives stain-guided reference images from BI. law Sec. 2.1 which are used to guide the reverse processes to S and T, respectively. To ensure that the image can be transformed to the corresponding domain by the diffusion model, a hyperparameter kG is employed to specify the guidance. Furthermore, by adding stain guidance at each step within specified range in the reverse process, it can be ensured that the converted image Zo is as similar as possible to the reference image Iref (especially in terms of the stain color and stain density map), thereby encouraging each sep-generaeed image to retain similar features to the stain guided reference image. Similar steps are applied to T + S -T T.
A.2 Datasets
The effectiveness of SGCD was evaluated on four open datasets: Camelyon17 Bejnordi et al. (2017), Camelyon16 Bejnordi al. (0117), Camelyon|7-WII
Koh et al. (2021). and MITOS & ATYPIA14 Racoceanu et al. (014).. The details of the four datasets are described below. Camelyon17 obtained from five hospitals, denoted by C₁ to Cs. in the Netherlands. In the present study, C was taken the source domain and the others were taken the target domain.
15

---

1 is obtained from two hospitals, Radboud University Medical Center (RUMC) and University Center Utrecht (UMCU), in the Netherlands. RUMC contains 249 WSIs, 99 of which have tumor annotations, while UMCU contains 150 WSIs, 60 of which have tumor annotations. In the experiments, RUMC and UMCU were set as the source domain and target domain, respectively. is a balanced version of Camelyon17. Given the extremely small number
Camelyon 1eeelynn7-WWI.ID of lesion areas compared to normal ones in Camelyon17, the ratio of positive to negative samples derived from WSI patches is unbalanced. By comparison, equitable ratio of positive and negative samples. Furthermore, it groups the images from hospitals with similar characteristics into training set, with the data in the remaining hospitals serving as the validation and test sets. MITOS & ATYPIA 14 is obtained from the same slide samples scanned by two scanners, namely Aperio Scanscope XT (A) and Hamamatsu Nanozoomer 2.0-HI (H). A training set was constructed consisting of 10, 000 patches randomly selected from the first 184 WSIs of the two scanners. Furthermore, 500 patches from the remaining 100 WSIs from the scanners were selected at random for testing. The A domain was taken as the source domain, and the H domain was taken the target domain.
Memellyon7-WILL.
provides a more
A.3 Thorough Evaluations in Histopathology Classification
A complete evaluation was conducted on the Camelyon17 7 dataset in addition to Table 3 to validate the efficacy of SGCD further. Table 5 presents the results of a cross- hoss-hospital domain adaptation experiment in that each of the five hospitals in Camelyon17 was in turn assigned as the source domain while the remaining hospitals served as the target domain. For example, when hospital C2 was the source domain, hospitals C1, Cs. C4. and C3 were treated as the target domains. It is observed that the proposed method, SGCD, generally demonstrates superior performance in almost all cases and the best result averagely. indicating that it enables diffusion models to generate more realistic and high-quality images, which can be effectively fine-tuned for downstream task models.
Mathod
C:
C2
Ca
G3
Avemge
Method
G2
C2
C3
Cs
Average
No adupsation
78.4
66.0
79.5
64.6
72.1
No adaptattoon
75.5
76.0
67.4
60.1
69.8
Vahudane al
Vihadune al.
3016
79.8
77.7
83.1
76.8
79.9
Vahudane al
Vahudane al
2016
85.0
81.3
76.9
76.5
79.9
Markenko et at.
Mictokaeial
2009
75.9
71.0
85.1
73.3
76.3
Mackenko at
Magenko
2009
83.2
76.5
72.5
76.5
77.2
Reinhard
78.2
Reinhard
Keuabad
1001
83.8
78.2
77.7
79.6
Stain Mix Up
Chang al
M221
89.1
73.3
90.5
88.9
83.0
Stain Mis
Chang ctal
A041
85.7
80.5
87.8
85.2
84.8
StainNet
85.8
SininNet
Kang
-022
87.6
88.9
85,9
86.9
MuhiPutKiAAN
Nazic et
X
85.4
80.4
87.3
89.1
$6.3
Mulriattii
Nocki all
1025
53.8
90.1
84.7
86.1
87.4
BCD
Yanc
2023
82.8
BCD--net
Yang
20125
92.2
91.1
Consect
Later Qn and Xie
2024
88.8
85.1
96.7
91.0
90.4
Connect Later
Qu and Xx
3114
94.5
93.0
91.7
91.3
92.6
SPA Yau
83.6
SPA
10.4
93.6
92.9
HistAuAAAN
Wieees d
2021
86.6
86.5
95.7
82.4
87.8
HistAuCiA
Warser CF
2021
87.5
86.5
95.7
82.4
88.0
G-SAN
20235
87.0
ContiiMix Nguyen al. 2026
86.8
85.8
94.0
88.9
$8.9
ComriMix
Nguyen et al
3024
90.6
86.8
91.3
85.4
88.5
Ours (SCCD)
87.3
(SCCT))
95.7
95.4
(a) Experiment results when C2 as source domain. (b) Experiment results when C4 as source domain.
Method
C:
Co
Ca
C;
Averge
Method
Ci
C
Ca
Ca
Average
No adoptation
74.9
77.1
79.5
85.4
7X.M
No adaptationn
65.2
65.9
73.8
69.4
68.6
Valudanne ml
Villadane
2016
76.3
Vahadane
Valudanc
2016
73.3
76.3
Markenko et ol
Mavinkee ml
2000
76.1
74.0
82.6
87.3
$0.0
Mackenko af
Macenko e al
7000
76.7
77.3
74.0
70.0
74.5
Reinhand
72.2
84.4
Reinhard
2mm
72.6
Stai Mix- Up
Lhing et
1021
90.7
77.0
88.6
95.2
87.9
Stain Mis-U U
Cumg el
85.7
81.9
81.8
77.9
81.8
Stainee
Kang cl
82.1
75.1
SeainNe
Kang st
52.1
79.9
76.0
79.7
MuliPwiha
Nuzis el x
2003
84.8
84.4
91.7
94.6
$8.9
MulaPathG
Narki et 20/23
85.1
82.1
87.2
83.7
85.3
BCD
85.9
96.8
BCD
Yang al Kil23
89.0
39.8
87.5
Connect Laber Vn and Xie
2014
92.9
84.9
92.5
95.5
91.5
Connect Laver
Vu and Xag
N125
53.7
80.6
91.3
90,1
87.7
Xii at
87.6
96.6
SPAXXio
90.0
91.1
89.1
HistAuLLAN Wagnes
al
2021
98.9
80.5
92.1
93.6
90.3
HastAciA
Waeser
al
2021
88.7
81.7
85.7
89,0
86.3
G-SAN
201235
86.7
87.7
88.5
93.1
G-SAN
3033
90.2
80.3
81.0
88.7
85.1
CoaniMix Nguyen dt al.
2024
89.0
84.3
94.8
95.7
90.5
ContiMix
Nguyea et al
3,24
90.1
81.4
84.7
93.1
87.8
Our (SGCI)
94.3
80.3
95.7
97.5
Chis (SGC))
92.5
82.6
93.5
05.2
91.0
(c) Experiment results when C3 as source domain.
(d) Experiment results when Cs as source domain.
Table 5: Histopathology classification results for Camelyon17 were obtained under a series of experimental settings. Here, one of the four hospitals C2r~Css was designated as the source domain, while the remaining four ones were the target domains. Here, AUC (%) was adopted as the evaluation metric.
16

---

A.4
Visual Results
T T t
S
ss
I
s
T
I
T
S
Figure 3: Samples generated by SGCD used to train diffusion models Ds and Dr.
T L
S
T
T
Figure 4: Samples generated by SGCD used to train target classifier Cr.
Method
SSIM
PSNR (dB)
Vahadane normalization
Vahadane et al.
2016
0.63
12.7
Mackenko normalization
Macenko al.
2009
0.66
13.5
Reinhard normalization Reinhard al.
2001
0.61
13.6
StainGAN Shaban et 2019
0.71
17.1
Ours (SGCD)
0.88
27.5
Table 6: Quantitative results of stain transfer on MITOS & ATYPIA14, Each image from A-domain converted into H-domain, and both SSIM and PSNR are calculated between converted image and corresponding ground truth image in H-domain.
Figure and Figure 4 present some typical samples obtained when applying SGCD on Camelyon 17. Figure illustrates the cyclic architecture (S + T + S and T' - + 7) used for training the diffusion model, while Figure demonstrates the results generated by the diffusion model under different conditional constraints. The images transformed from S to T are used to train the target classifier. The transformed images in Figure Jand quantitative results in Trbeee that the stain normalization method suffers from a loss of detail information and distortion due to its normalization process, resulting lower SSIM and PSNR scores. contrast, StainGAN, which based on a GAN architecture, generates images of higher quality and greater accuracy, thus outperforming the stain normalization methods. Nonetheless, among all the considered methods, proposed SGCD method, which incorporates cyclic and conditional constraints, and leverages the image generation capabilities
17

---

Target
Ours
StainGAN
Mackenko
Reinhard
Vahadane
Source
Figure 5: Visualization results of different conversion methods on MITOS & ATYPIA14 dataset. Paired images from domains and H are used, with H-domain serving as ground truth. Rightmost column shows source images from A-domain, and leftmost column shows corresponding target images from H-domain.
of diffusion models, achieves the best performance on this task. Moreover, Figure 6 illustrates the UMAP embeddings of color statisties from different domains wherein the embeddings demonstrate that the transformed images closely match the target domain distribution, a critical factor for effective downstream task performance.
B Damii
Domiin
A-Dmmain
H-Darails
A-Demain
H-Domen
(b)
Figure 6: UMAP embeddings of color statistics across domains. (a) Embeddings for A-domain,
H-domain, and the images converted from H-domain A-domain. (b) Embeddings for H-domain,
A-domain, and the images converted from A-domain to H-domain.
A.5 Validation of the Two-step Conversion Process
Experiments were conducted on the paired data in MITOS & ATYPIA14 to validate the effectiveness of SGCD adapting a diffusion model trained on domain A to generate images resembling domain A from domain B images. To evaluate the sensitivity of SGCD to different hyperparameter settings, was varied. The performance between the generated images and their ground truth equivalents in both domain S and domain T. The results are visualized in Figure where the stain guidance process was stopped at step 100. can be seen that as & increases, the quality of the transformed results improves accordingly. Specifically,
SGCD was measured by computing PSNR and SSIM metrics
18

---

Ab
Tincdapp
Timestop
PSNR berween and 7,5
PSNR between and
Timestep
Timestop
SSIM between To and T.S
SSIM between and 7,5
10SS
Timosio22
Timesop
Compered to Compared
Figure 7: Quantitative results and visualization results the two-stage conversion process on MITOS & ATYPIA14.
the transformed T's becomes more similar to the actual T, and the transformed Š becomes more similar to the actual S, evidenced by the consistent increase in the PSNR and SSIM metrics. However, am excessively large may lead to loss of original image features, resulting in a decrease in the SSIM value after conversion. Therefore, optimal performance. The same experiment was also conducted on Camelyon17. As Camelyon17 lacked paired image, only the visualization results of the reconstructed and converted images are shown in Figure and Figure respectively. Overall, the proposed SGCD improves the ability of the diffusion model to perform bidirectional translation between S and T, making a powerful tool for downstream task fine-tuning
600 was employed in our experiments to achieve
19

---

Input
Reconstructed
Input
Reconstructed
Input
Reconstructed
Input
Reconstructed
Figure The visualization results of input and reconstructed images using SGCD on the Camelyon 17 dataset.
Input
Converted
Input
Converted
Input
Converted
Input
Converted
Figure 9: The visualization results of input and converted images using SGCD on the Camelyon17 dataset.
20

---

A.6 Performance with the new image Ts
This section presents supplementary experimental evidence on Camelyon dataset to quantify intrinsic value of our generated synthetic images (T's) and clarify their role in our overall domain adaptation pipeline. Our Our method's core contribution is the ability to produce high-quality, labeled T3 images that are both stylistically consistent with the target domain and class conssssnnsst We argue that even before the full domain adaptation (DA) process, these generated images are a powerful resource that establishes a strong baseline. The full adaptation pipeline then refines the model further by incorporating unlabeled target images (T) via a feature alignment strategy (e.g., MMD) to optimize performance the true target domain distribution. Table 7 shows the results that quantify the impact of these two distinct steps.
Method
AUC (%)
No Adaptation (Source Only)
75.9
Training with only Ts
92.6
Training with Tş and T
95.8
Table 7: Quantitative analysis of the contribution of synthetic images (T's.
The results clearly demonstrate that training classifier on only our generated Ts images achieves strong AUC of 92.6%, representing substantial gain over the Source Only baseline (75.9%). This highlights the primary benefit of our method: generating class-consistent, labeled images that can be used directly for Domain Adaptation. The further performance gain to 95.8%, achieved by additionally incorporating the unlabeled target domain images (T), confirms that our approach provides excellent, high-performance starting point with T's, which subsequent feature alignment steps can leverage to achieve maximum performance.
A.7 Ablation Study of Components
Dual Diffusion Model
SGC Loss
FT of Diffusion Models
AUC (%)
V
V
95.8
V
92.8
V
89.4
86.8
Table 8: Component-wis ablation study the Camelyon16 dataset.
This section provides a component wise ablation study precisely quantify the individual contri- butions of our key architectural elements: the dual diffusion model, the Stain-Guided Consistency (SGC) loss, and the fine-tuning (FT) of the diffusion models. This analysis confirms the source of performance gains stems from the synergistic effect of these targeted components, rather than diffusion in general. The results, measured on the Camelyon16 dataset, are summarized in Table X
The results underscore the following key findings:
ffusion Dual Diffusion's Crucial Role: Comparing the full model ('V V V') to the single-dit dingle-diffusion approach ("- V V²) shows significant performance contribution from the dual diffusion model (95.8 vs. 92.8). This indicates that the cyclie nature and the bidirectional generative constraints are essential for achieving the highest performance.
Impact of SGC Loss: The introduction of the SGC loss provides a substantial boost the method's effectiveness (comparing 'V V V to 'V- V" 95.8 vs. 89.4). This confirms the value of targeted stain guidance in aligning features during the adaptation process.
Synergistic Gains: The performance difference between the full model (95.8) and the baseline without any of our proposed components (86.8) demonstrates that the gains are primarily derived from the synergistic effect both cycle consistency and targeted stain guidance, rather than solely from the general properties of diffusion models.
21

---

A.8
Robustness to Non-Stain Domain Degradations
Augmentation Method
No Adaptation (AUC (%))
With SGCD (AUC (%))
Blur
61.4
86.3
Noise
59.3
82.9
Blur + Noise
62.1
83.5
Table 9: Robustness comparison against non-stain related domain degradations.
While our core loss function is stain-guided, the bidirectional generative constraints inherent in our dual-diffusion framework provide a degree robustness against other common types of domain shift, including structural variations and image artifacts.
To demonstrate this broader applicability, we conducted supplementary experiments on the Came- 1yon16 16 dataset where common image imperfections (blur and noise) were simulated through data augmentation. The results in Table compare the baseline performance (No Adaptation) against our SGCD method under these corrupted conditions. As shown, the SGCD method significantly improves performance even when input images are corrupted with common artifacts like blur and noise. This suggests that the dual-diffusion framework, while optimized for stain variations, possesses a broader adaptability to structural or artifactual variations frequently encountered real-world medical imaging. This aligns with findings in related workGao et al. (2023) exploring diffusion-driven adaptation to test-time corruption.
A.9 Ablation Study of Diffusion Timesteps
We conducted a dedicated ablation study on the key hyperparameters' k and kg (as defined in Eq, 5 and 7f the manuscript) evaluate proposed SGCD's robustness to their variation. The AUC(%) results, measured on the Camelyon 16 dataset, are presented in To The experimental results demonstrate that our proposed method consistently achieves superior performance compared to existing methods across wide range of k values. This suggests that while these hyperparameters influence peak performance, our method's 's overall effectiveness robust reasonable variations.
Via
10
100
150
200
88.6
94.5
85.6
400
93.6
94.2
89.1
600
94.1
95.8
90.9
800
85.9
94.7
90.4
1000
91.5
94.9
83.9
Table 10: Ablation study on the hyperparameters k and kg-
A.10
Quantifying Semantic Preservation (Class Consistency)
Method
Class Consistency Ratio
No Adaptation
0.66
With SGCD
0.85
Table 11: Quantitative analysis of Class Consistency.
Semantic preservation is critical for clinical decision-makeen We address this through collaborative training where the target classifier actively guides the diffusion model, ensuring generated images retain semantic information consistent with the source.
To quantify this, we measured the Class Consistency Ratio on the Camelyon16 dataset, comparing the class labels of original images with their transformed counterparts. This metric demonstrates that our method significantly improves the preservation of class-level semantic information during domain translation, thereby establishing necessary foundation for clinical trust.
22

---

A.11 Robustness to Limited Target Domain Data
We acknowledge that handling data scarcity is critical in real-world applications. To quantify our method's ability to adapt with minimal target domain samples, we conducted supplementary experiment on 1 using varying percentages of available target data.
The results, shown in T2 demonstrate the effectiveness of our Stain-Guided Consistency Diffusion (SGCD) even with heavily restricted data access. The results indicate that method shows promising adaptability even with only 1% of target domain data (AUC 87.5), significantly outperforming the Source-Only baseline (75.9). This confirms our method's capability to generalize effectively in challenging, data-scarce scenarios.
Target Data %
Source-only
1%
10%
50%
100%
AUC (%)
75.9
87.5
89.4
93.5
95.8
Table 12: Robustness to Limited Target Domain Data.
A.12 Fine-Grained Pathological Fidelity
Histopathology relies on subtle details. To provide quantitative validation that our method preserves diagnostically meaningful structures, measured the pixel-level overlap of tumor nuclei regions before and after image translation. We used a semantic segmentation model trained on the target domain for evaluation consistency.The results in Table compare segmentation performance original target images with that on our translated images (Ts). These high metrics confirm that method is highly effective preserving fine-gre grained pathological structures. The marginal performance drop provides strong quantitative evidence that our approach maintains the critical pixel-level details essential for accurate pathological interpretation.
Original
Translated
loU
0.9661
0.9124
Dice Score
0.9827
0.9542
Table 13: Quantitative validation of Fine-Grained Pathological Fidelity.
A.13 Robustness to Rare Cohorts (Positive Class Performance)
Our datasets inherently class-imbalanced, with tumor regions often representing rare cohorts. To explicitly address performance on the most challenging, clinically relevant rare samples, we compared our full method against Source-Only baseline in the 1% target data setting. The results demonstrate severe performance degradation the Source-Only baseline for the rare positive class (Recall: 0.212). In stark contrast, our full SGCD method achieves a robust Recall of 0.8 and high F1-score of 0,861 for the same rare class. This evidence confirms that our domain adaptation strategy provides crucial and decisive benefit in accurately identifying challenging, clinically relevant rare samples.
Metric
No Adaptation (Source Only) SGCD with 1 1% Target Data
Precision
0.985
0.835
Recall
0.967
0.917
Fl-score
0.976
0.874
Table 14: Comparison of performance metrics for the Negative/Majority Class on the Camelyon16 dataset with only 1 1% target domain data.
A.14 Reference image selection
Our method does not rely on a specific, fixed reference image for domain translation. Instead, we dynamically sample images from the target domain during training to provide stain information for
23

---

Metric
No Adaptation (Source Only)
SGCD with 1 1% Target Data
Precision
0.104
0.908
Recall
0.212
0.819
Fl-score
0.140
0.861
Table 15: Comparison performance metrics for the Positive/Rare Class on the Camelyon 16 dataset with only 1% target domain data.
the Stain-Guided Consistency (SGC) loss. This inherent design makes the adaptation process robust by accounting for the natural variations in stain matrices within the target domain.
Furthermore, this dynamic process leads to an implicit benefit: occasionally generated images with slight stylistic deviations from the target mean act as form of on-the-fly data augmentation for the target classifier. This strengthens the model's generalization capability against minor distribution shifts Chang al. (2021).
However, while beneficial, this randomness is also the source of potential failure cases, shown in Figure TO When the dynamic reference image leads to an overly aggressive style shift or excessive distortion of fine-grained pathological structures, the resulting synthetic image may become diagnostically ambiguous, leading to classifier errors.
Input
Converted
Figure 10: The fail cases of input and converted images using SGCD the Camelyon 17 dataset.
24

---

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:
We have explained the contribution and scope of the paper in 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 long is clear that these goals are not attained by the paper.
2. Limitations
Question:
Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Justification: The limitations of relying on pre-trained models and hyperparameter selection are discussed in the main paper (Section 5) and Appendix (Section A).
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 a 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 (c.g.. independence assumptions, noiseless settings, model sellsspeciiiationn 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 on the scope of the claims made, e.g., if the approach was only tested on few datasets or with few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect on 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-tex, system might not be used reliably to provide closed captions for online lectures because it fails handle technical jargon.
The authors should discuss the computational efficiency of 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 faimesss.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a 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 an 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 proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
25

---

Answer:
[NA]
Justification:
This thesis does not contain theoretical studies.
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 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 provide all experimental details in the main paper (Section 5) and in the Appendix (Section A).
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
26

---

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: [No]
Justification: We do not include the code in this submission, but in the future, will organize the experimental code and documentation, and released on GitHub.
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurlPS code and data submission guidelines (https://nips.co
cublic/guuddes/Cdeettbii.. wtt.:eeewuumiisisooooooooooo 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
/ wwtps/cccpbllcgguuiieeeeee
Stteee//CooSSSemsssS.Si.a www.ssssiicggsooooo 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 details are in the main paper (Section 5) and in the Appendix (Section A).
Guidelines:
The answer NA means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper to a 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: [No]
Justification: We took the average of the results of three independent repeated experiments as the results of the main experiment, but did not analyze and discuss the differences in detail.
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.
27

---

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% CL, 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 out of range (e.g. negative error 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 in the text.
8. Experiments compute resources
For each experiment, does the paper provide sufficient information on the com- puter resources (type of compute workers, memory, time execution) needed to reproduce the experiments?
Question:
Answer: [Yes]
Justification:
The details are the main paper (Section 5).
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 as 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 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 NeurlPS Code of Ethics
Answer:
[Yes]
Justification: We fully comply with the NeurIPS code of ethics.
Guidelines:
The answer NA means that the authors have not 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 sure to preserve anonymity (e.g., there a special consid- eration due to laws 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:
The paper poses no such risks.
Guidelines:
The answer NA means that there no societal impact of the work performed.
If the authors answer NA or No, they should explain why their work has no societal impact why the paper does not address societal impact.
28

---

Examples of negative societal impacts include potential malicious unintended uses (e.g., disinformation, generating fake profiles, surveillance), faireess 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 not 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, it 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 as 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 to 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
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)?
Question:
Answer: [NA]
Justification:
The paper does not pose significant 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 usage guidelines 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: We have added appropriate citation notes to the existing papers, models, and datasets mentioned in this paper.
Guidelines:
The answer NA means that the paper does use existing assets.
The authors should cite the original paper that produced the code package or dataset.
The authors should state which version of the asset is used and, if possible, include URL.
The name of the license (e.g., CC-BY 4.0) should be included for each asset.
For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.
29

---

If assets are released, the license, copyright information, and terms of use in the thcode. has curated licenses for some datasets. Their licensing guide can help determine the license of dataset.
package should be provided. For popular datasets, paperswi
latasets.paperssi
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.
If this information not available online, the authors are encouraged to reach out to the asset's s creators.
13. New assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer: [NA]
Justification: The paper does not release new assets.
Guidelines:
The answer NA means that the paper does not release new assets.
Researchers should communicate the details of the dataset/code/moode as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent obtained from people whose asset is used.
At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.
14. Crowdsoureing 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 screenshots, if applicable, as well details about compensation (if any)?
Answer: [NA]
Justification:
The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Including this information 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 NeurIPS Code of Ethics, 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 or 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 equivalent approval/review based the requirements of your country institution) were obtained?
Answer: [NA]
Justification: The paper does not involve crowdsoureing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing research with human subjects.
Depending 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.
30

---

We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors adhere 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 as the institution conducting the review.
16. Declaration of LLM usage
Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods in this research? Note that if the LLM is used only for writing, editing, formatting purposes and does not impact the core methodology, scientific rigorousness, or originality of the research, declaration is not required.
Question:
Answer: [NA]
Justification: The core method development in this research does involve LLMs as any important, original, or non-standard components.
Guidelines:
The answer NA means that the core method development in this research does not involve LLMs as any important, original, non-standard components.
Please refer to our LLM for what should or should not be described.
31


Reviews:
[{"review_id": "zu0V59o42T", "reviewer": "Reviewer_1BK2", "summary": "This paper aims to address the problem of UDA problem for histopathology image classification, where models trained on one domain  stained slides often underperform on another’s due to stain and preparation variations. The authors propose  SGCD, a dual-diffusion generative framework that translates images from source to target domain while preserving crucial morphological features. The SGCD architecture imposes bidirectional generative constraints, which is a cyclic consistency between source to target and target to source translations similar to the cycleGAN, to maintain semantic fidelity during translation. Additionally, a stain-guided consistency loss is introduced to guide the diffusion models and enhance their denoising and translation quality without requiring any paired training images. In addition, the author also use a classification loss to ensure that the source classifier should predict the same label for the reconstructed image. Experiments on four public histopathology datasets demonstrate that SGCD substantially improves target-domain classification performance compared to prior stain normalization and UDA methods.", "questions": "1. While you compare to GAN-based and other UDA methods, it would strengthen the work to see an ablation or comparison showing the benefit of dual diffusion and SGC loss  a one-diffusion approach. Are the gains primarily coming from the cycle consistency or from diffusion in general?\n2. The method is described as “stain-guided”, suggesting it’s tailored to color/stain variations. How would SGCD handle domain shifts that are not purely stain differences? For instance, if the target domain has different tissue structures or artifacts (blur, scanner noise) that the source doesn’t, can the dual diffusion still adapt effectively? Please kindly refer to the weakness part and the question part for the author.", "limitations": "Please kindly refer to the weakness part and the question part for the author.", "rating": 4, "confidence": 2, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 4, "significance": 3, "originality": 3, "strengths_and_weaknesses": "Strengths:\n\n1. The author propose dual-diffusion architecture with bidirectional generative constraints,  which first pushes an image to the opposite domain, then brings it back through another noisy–denoise cycle, similar to the cycleGAN,  the idea seems interesting.\n\n2. The proposed stain-guided loss  steers each denoising step toward a Beer–Lambert–based stain reference while simultaneously enforcing task-level classification consistency, enabling high-quality translation without paired data.\n3. The author use source-trained classifiers to synthesized images, the classification loss make synthesized images remain discriminative for downstream diagnosis.\n4. SGCD delivers state-of-the-art performance on four pathology benchmarks, demonstrating superior stability, reproducibility, and cross-hospital robustness.\n\nWeaknesses:\n\n1. The approach involves training/fine-tuning two diffusion models (for source and target domains) and then generating many synthetic images for classifier training. Diffusion models are resource-intensive, and although the authors fine-tune rather than train from scratch, the method still likely requires substantially more computation than simpler UDA techniques (like feature adaptation or one-pass style transfer). The paper does not report training times or complexity in detail. As a reviewer, I worry about the practicality: e.g., how many diffusion steps k are needed for good results,  some discussion or results on efficiency would strengthen the work.\n\n2. All experiments focus on binary classification tasks (tumor vs. normal or mitosis detection), and mostly on H\\&E stain variations. It remains to be seen how SGCD performs for more complex scenarios, such as multi-class classification or adaptation between entirely different staining protocols (e.g. H\\&E vs. immunohistochemistry).", "was_revised": true, "final_justification": "These results from the rebuttal alleviate some of my concerns. Nevertheless, the method remains computationally demanding and, at present, is limited to benefiting binary classification on a single staining, which limits its immediate clinical applicability. For these reasons, I will keep my original borderline-accept rating.", "rebuttal": "Dear Reviewer 1BK2,\n\nWe are truly grateful for your insightful and comprehensive review of our manuscript. Your positive feedback on the originality of our dual-diffusion architecture, the effectiveness of the stain-guided loss, and the state-of-the-art performance of SGCD is deeply appreciated. We are particularly encouraged by your recognition of our method's contribution to unsupervised domain adaptation in histopathology and its practical implications.\n\nYour constructive criticisms and precise questions have been invaluable in guiding us to further strengthen the clarity, completeness, and practical considerations of our paper. We have carefully addressed each of your points and made significant revisions to the manuscript accordingly. Our main updates include:\n\n* Providing a detailed discussion on the computational overhead and strategies for efficient deployment.\n\n* Presenting a comprehensive ablation study to clarify the individual contributions of our key architectural components.\n\n* Including new experimental results demonstrating the method's robustness to non-stain related domain shifts.\n\nPlease find our point-by-point responses below, addressing each of your valuable comments.\n\n**Q1: Computational overhead and efficiency concerns.**    \nA1: You raise a very valid and important concern regarding the computational overhead and practicality of our method. We wholeheartedly agree that diffusion models, by their nature, are more resource-intensive than traditional UDA techniques. We acknowledge that the cyclic bi-directional training, while crucial for maintaining semantic integrity without paired data, indeed introduces additional computational demands during training.  \nWe understand the need for more transparency on efficiency. While a full breakdown of training times across all experiments is extensive, we will add a dedicated discussion in the revised manuscript to address these practical implications. We propose several strategies to mitigate computational costs for more efficient deployment:  \n\n* Optimized Sampling Schedules: Utilizing advanced diffusion model sampling schedules (e.g., DDIM, DPM-Solver) can significantly reduce the number of inference steps required (the 'k' you mentioned), thereby speeding up inference time considerably without compromising quality.  \n\n* Model Size Optimization: Exploring smaller, more efficient diffusion model architectures tailored for specific histopathology tasks can reduce both training and inference resource requirements.  \n\nEnhancing training and inference efficiency will be a key focus of our future research, and we appreciate you highlighting this important challenge.  \n\n**Q2: Performance on complex scenarios (multi-class, different staining protocols).**    \nA2: Thank you for this insightful comment on the scope of our current evaluation. We agree that our initial experiments primarily focus on binary classification tasks and variations within H&E staining. This was a deliberate choice to establish the foundational effectiveness of SGCD in a controlled yet clinically relevant setting.  \nWe acknowledge that extending SGCD to more complex scenarios, such as multi-class classification or adaptation between entirely different staining protocols (e.g., H&E to immunohistochemistry, or even different tissue types), presents unique challenges and opportunities. We believe our underlying dual-diffusion architecture and the concept of stain-guided consistency are fundamentally adaptable to these scenarios, potentially with modifications to the guidance term or network architecture. We will explicitly discuss this as a crucial and exciting direction for future research in the revised manuscript's \"Limitations and Future Work\" section. Exploring these more diverse and challenging domain shifts is indeed a high priority for us.\n\n**Q3: Ablation/comparison showing benefit of dual diffusion and SGC loss over one-diffusion approach; source of gains (cycle consistency vs. general diffusion).**     \nA3: Thank you for this precise and excellent question. We completely agree that a component-wise ablation study is vital for understanding the individual contributions of our key architectural elements. We have now conducted a comprehensive ablation study to isolate the effects of the dual diffusion model, the stain-guided consistency (SGC) loss, and the fine-tuning (FT) of diffusion models. The results, using the Camelyon16 dataset, are summarized in the table below:\n\n| Dual Diffusion Model  | SGC Loss | FT of Diffusion Models | AUC |\n|:-------------:|:-------------:|:-------------:|:-------------:|\n| V | V | V | 95.8 |\n| - | V | V | 92.8 |\n| V | - | V | 89.4|\n| - | - | - | 86.8 |\n\nThis experiment clearly demonstrates that the dual diffusion model significantly contributes to the method's performance (comparing 'V V V' to '- V V'), indicating that the cyclic nature and the bidirectional generative constraints are crucial. Furthermore, the introduction of the SGC loss provides a substantial boost to the proposed method's effectiveness (comparing 'V V V' to 'V - V'). The baseline without any of our proposed components ('- - -') shows significantly lower performance. These results underscore that the gains are primarily coming from the synergistic effect of both the cycle consistency (enabled by the dual diffusion architecture) and the targeted stain guidance provided by the SGC loss, rather than diffusion in general alone. We have incorporated this detailed ablation study and its discussion into the revised manuscript.\n\n**Q4: SGCD's handling of non-stain domain shifts (e.g., tissue structures, artifacts like blur/noise).**      \nA4: Thank you for this insightful follow-up question, which helps us clarify the broader applicability of SGCD beyond pure stain variations. While our method is indeed \"stain-guided\" in its core loss design, the underlying diffusion process, particularly the bidirectional generative constraints, inherently provides a degree of robustness to other forms of domain shifts, including those related to tissue structures or common image artifacts.\n\nTo demonstrate this, we have conducted an additional experiment on the Camelyon16 dataset, where we simulated common image imperfections like blur and noise through data augmentation. The results, using our SGCD method, are as follows:\n\n| Augmentation Method  | No Adaptation | With SGCD|\n|:-------------:|:-------------:|:-------------:|\n| Blur | 61.4 | 86.3 |\n| Noise | 59.3 | 82.9 |\n| Blur + Noise | 62.1 | 83.5 |\n\nAs shown in the table, our method significantly improves performance even when the input images are corrupted with blur and noise, suggesting its ability to effectively handle certain types of input degradation that are not purely stain differences. This aligns with similar conclusions found in related work, such as Gao et al. (2023), which explored diffusion-driven adaptation to test-time corruption. This demonstrates that our dual-diffusion framework, while optimized for stain, possesses a broader adaptability to other structural or artifactual variations commonly encountered in real-world medical imaging. We will include this discussion and the supplementary experiment in the revised manuscript.\n\nOnce again, we extend our sincerest gratitude for your invaluable feedback and time. We believe that the revisions made in response to your comments have substantially improved the clarity, completeness, and practical relevance of our manuscript. We sincerely hope that our detailed responses address your concerns, and we eagerly look forward to your further feedback.\n\nReference: Jin Gao, Jialing Zhang, Xihui Liu, Trevor Darrell, Evan Shelhamer, and Dequan Wang. Back to the source: Diffusion-driven adaptation to test-time corruption. In CVPR, 2023."}, {"review_id": "6lFhRtLEBV", "reviewer": "Reviewer_TZLz", "summary": "The authors tackle stain/style shifts in histopathology with Stain-Guided Cycle Diffusion (SGCD. Two pre-trained diffusion models (one per domain) that translate patches back-and-forth under (i) bidirectional generative constraints and (ii) a stain-guided consistency (SGC) loss. Unlike prior GAN or color-deconvolution approaches, SGCD needs no paired data or hand-picked reference slide and explicitly pushes the reverse process to preserve pathology-relevant structure. On four public datasets, the method consistently outperforms current methods.", "questions": "1. Why Connect Later performs marginally better in table 2 but in table 3 it doesn't?\n2. Would it generalize to other areas in the medical domain?", "limitations": "yes", "rating": 5, "confidence": 2, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 3, "originality": 3, "strengths_and_weaknesses": "Strengths:\n1. Clever reuse of pre-trained diffusion models plus a stain-aware guidance term. The cyclic bi-directional training is a nice twist that avoids the usual need for paired patches and still keeps semantics intact (although not really new, as this is a known trick first introduced by CycleGAN).\n2. Uses four well-accepted datasets, multiple cross-hospital splits, and compares to 10+ baselines, including the latest diffusion UDA (StainDiff) and medical DG methods\n3. Pathology practitioners struggle with stain heterogeneity; a drop-in diffusion-based adaptor that outperforms current methods is valuable. The approach may generalize to other low-data medical domains.\n4. The paper is mostly easy to follow; pseudo-code and training details (optimizer, timesteps, GPUs) are given, and the code is promised.\n\nWeaknesses:\n1. The method adds overhead. Performing a cycle while training is always a big cost in training run-time and resources.\n2. Minor: No ablation on the (seemingly important) hyper-param k. It would be interesting to see how sensitive the method is to it.\n3. It would be nice to see visually the failure cases (which I'm sure exist) in order to understand better the method.", "was_revised": true, "final_justification": "The rebuttal has addressed most of my concerns.", "rebuttal": "Dear Reviewer TZLz,\n\nWe are truly grateful for your thorough and insightful review of our manuscript. We deeply appreciate your positive feedback on the originality of our dual-diffusion architecture, the effectiveness of the stain-guided loss, and the state-of-the-art performance of SGCD. Your recognition of our method's contribution to unsupervised domain adaptation in histopathology and its practical implications is very encouraging.\n\nYour constructive suggestions and precise questions have been invaluable in guiding us to further strengthen the clarity, completeness, and practical considerations of our paper. We have carefully addressed each of your points and made significant revisions to the manuscript accordingly. Our main updates include:\n\n* Providing a discussion on the computational overhead and strategies for efficient deployment.\n\n* Presenting a comprehensive ablation study on the hyperparameter k.\n\n* Committing to include visual examples of failure cases in the appendix.\n\n* Clarifying the performance of baselines in different experimental settings.\n\n* Discussing the generalizability of our method to other medical domains.\n\nPlease find our point-by-point responses below, addressing each of your valuable comments.\n\n**Q1: Computational Cost--\"The method adds overhead. Performing a cycle while training is always a big cost in training run-time and resources.\"**  \nA1: We sincerely appreciate your concern regarding the computational overhead during training. We acknowledge that the cyclic bi-directional training, while crucial for maintaining semantic integrity without paired data, indeed introduces additional computational demands. This is an inherent trade-off for the benefits our method provides. However, we believe this can be mitigated by exploring different diffusion model sampling schedules and optimizing the size of the diffusion model itself. Enhancing the training efficiency will be a key focus of our future research, and we have added a discussion on this aspect in the revised manuscript.\n\n**Q2: Hyperparameter $k$ Ablation**  \nA2: Thank you for pointing out the importance of an ablation study on hyperparameter $k$. We agree that understanding its sensitivity is crucial for a robust method. We have now conducted a dedicated ablation study on the Camelyon16 dataset, and the results are presented in the table below, where $k_G$ is as defined in Equations 5 and 7 of our manuscript:\n\n| $k$ \\ $k_G$  | 10 | 100 | 150 |\n|:-------------:|:-------------:|:-------------:|:-------------:|\n| 200 | 88.6 | 94.5 | 85.6 |\n| 400 | 93.6 | 94.2 | 89.1 |\n| 600 | 94.1 | 95.8 | 90.9 |\n| 800 | 85.9 | 94.7 | 90.4 |\n| 1000 | 91.5 | 94.9 | 83.9 |\n\nThe experimental results demonstrate that our proposed method consistently achieves superior performance compared to existing methods across a wide range of $k$ values. This suggests that while k does influence performance, our method's effectiveness is robust to reasonable variations in this hyperparameter. We have incorporated this ablation study and its discussion into the revised manuscript.\n\n**Q3: Visual Failure Cases**  \nA3: We appreciate this valuable suggestion. Due to the constraints of the rebuttal submission format, we are unable to provide experimental images here. However, we fully agree that visualizing failure cases is important for a comprehensive understanding of our method's limitations. We will supplement the failure case images and their analysis in the appendix of the revised manuscript. Our method primarily aims to improve the performance of target classifiers in the target domain by generating high-quality images, and understanding failure modes will further guide future improvements.\n\n**Q4: Connect Later Performance Discrepancy.**  \nA4: In both Table 2 and Table 3, we strictly followed the hyperparameter settings proposed by the original authors of Connect Later [1]. However, it's important to note that these settings might not generalize optimally across all simulated scenarios. Specifically, Table 3 simulates a more complex environment (transfer from a single source domain to multiple target domains) compared to Table 2. The original Connect Later [1] also highlights the critical importance of targeted data augmentation for specific scenarios. We believe that the inherent complexity of the multi-target domain setting in Table 3, combined with the fixed hyperparameter settings, explains the observed performance difference for Connect Later.\n\n**Q5: Generalizability to Other Medical Domains.**  \nA5: This is an excellent question that touches upon the broader impact of our work. Given the nature of our currently available datasets, our primary research focus has been on pathological images. However, we are profoundly optimistic about the potential for our method to generalize effectively to other medical imaging domains, such as immunology problems, where stain or domain heterogeneity is also a significant challenge. Extending our methodology to these diverse medical imaging fields will be a crucial and exciting direction that we envision for our future research.\n\nOnce again, we extend our sincerest gratitude for your invaluable feedback and time. We believe that the revisions made in response to your comments have substantially improved the clarity, completeness, and practical relevance of our manuscript. We sincerely hope that our detailed responses address your concerns, and we eagerly look forward to your further feedback.\n\nReference: \n[1] Helen Qu and Sang Michael Xie. Connect Later: Improving Fine-tuning for Robustness with Targeted Augmentations. In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp, editors, Proceedings of the 41st International Conference on Machine Learning, Volume 235, pages 41769–41786. PMLR, July 21–27 2024."}, {"review_id": "cSgId2mOsh", "reviewer": "Reviewer_dvqh", "summary": "The paper introduces a new technique for unsupervised domain adaptation that uses diffusion models. The method is based on converting source domain images in the target style domain using a bidirectional diffusion process. The new source images obtained are used to train a target classifier by using cross entropy on those images and aligning distribution between target and source.", "questions": "1. As previously mentioned, the adaptation component of the second phase of the method is similar to standard practices commonly used in unsupervised domain adaptation [1]. Can the authors clarify the novelty of this part, as it seems limited. The benefits of the proposed approach seem to result essentially from the image generation stage rather than the target model training step.\n\n2. Also, since the advantage of the proposed method seems to rely on the generated images, can the authors explain on why diffusion-based images perform better than those generated by GANs for adaptation? What would happen if images from a GAN were used instead during the second stage of adaptation?\n\n3. Can the authors clarify how their model would perform on more challenging cross-organ adaptation tasks, such as adaptation between GlaS and CAMELYON as defined in [2], or on other datasets involving stronger domain shifts ? \n\n\n4. Also, it appears that training the model requires a reference image, which I assume is selected from the target domain. However, the paper does not explain how the reference image is selected. It would be interesting to understand if selecting differents images impacts the results. Since each image in the target domain may have a different stain matrix, this parameter could influence the method's performance. Can the author explain more precisely this aspect.\n\n\n[2] Source-Free Domain Adaptation of Weakly-Supervised Object Localization Models for Histology, $\\textit{Alexis Guichemerre, Soufiane Belharbi, Tsiry Mayet, Shakeeb Murtaza, Pourya Shamsolmoali, Luke McCaffrey, Eric Granger}$", "limitations": "yes", "rating": 4, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": 3, "clarity": 3, "significance": 2, "originality": 2, "strengths_and_weaknesses": "**Strengths:**\n\n1. The paper is well written and easy to follow to understand the proposed architecture. \n\n2. The proposed SGCD method uses a bidirectional diffusion framework combined with a stain-guided consistency mechanism. Unlike traditional domain adaptation approaches based on unidirectional image translation  (GANs), SGCD employs two separate diffusion models. Each model is trained on the source and target domains, respectively, enabling a cyclic conversion process (S → T → S and T → S → T)\n. This dual-path architecture ensures that the generated images retain essential structural and semantic features of the original data. Furthermore, the Stain-Guided Consistency loss guides the reverse process during generation, allowing more consistency for style transfer across domains.\n \n3. Also, the proposed approach doesn’t require paired images across domains, which is a significant advantage in medical imaging scenarios such as histology.\n\n4. Empirical results show improved performance on different standard histology datasets.\n\n**Weaknessess:**\n\n\n\n1. The second part of the method relies on a standard feature alignment strategy that is already used in existing domain adaptation literature [1]. \n\n2. Since the adaptation step is not novel, the main contribution lies in the generation part of the source images in the style of the target domain using diffusion models. However, the paper does not provide sufficient justification or empirical evidence demonstrating the advantage of diffusion-based generation over traditional GAN-based approaches. \n\n\n*Minor Weaknessess:*\n\n1. The authors defined $C_{t}$ and  $C_{s}$ sometimes as Classifiers and target model line 227 and 228. Can be nice to clarify this aspect. Also the equation 9 need to be clarify as the authors use $C_{t}(T_{s})$ in the two part but for the first part it’s more the prediction of the model and second part for MMD it’s the feature of $T_{s}$ it’s inconsistent.\n\n2. The authors can support the claim line 33 and 34 about \"time consuming and expert interpretation\"\n\n\n\n[1] Domain Impression: A Source Data Free Domain Adaptation Method, $\\textit{Vinod K Kurmi, Venkatesh K Subramanian, Vinay P Namboodiri}$", "was_revised": true, "final_justification": "The authors' responses are convincing on several points and highlight the advantages of the proposed method, particularly in scenarios where shifts between the source and target domains result from staining variations within the same organ. Nevertheless, it remains unclear which component of the method contributes most significantly to the observed performance: is it the diffusion process, or the adaptation step between the generated images $T_{s}$ and $T$? \n\nI recommend a borderline accept.", "rebuttal": "Dear Reviewer dvqh,\n\nThank you for your thorough review and valuable feedback. We appreciate your recognition of our paper's clarity, the originality of our diffusion-based framework, and its practical significance for addressing stain heterogeneity in pathology without requiring paired data. Your insights have helped us further strengthen our manuscript.\n\nWe've addressed your points with significant revisions, including:\n* Clarifying the novelty of our adaptation strategy.\n* Justifying the advantages of diffusion-based generation.\n* Refining notation and supporting claims.\n* Committing to further experiments on challenging cross-organ tasks.\n* Explaining our approach to reference image selection.\n\nPlease find our point-by-point responses below.\n\n---\n\n**Q1: Novelty of feature alignment strategy.**  \nA1: You raise a crucial point about the novelty of our adaptation step and the advantage of diffusion over GANs. While some aspects of classifier fine-tuning may resemble existing methods like SDDA [1], our novelty lies in the collaborative and guided generative process. Unlike SDDA, which relies on statistical alignment and can struggle with large domain shifts or pseudo-labeling [3, 4], our method does not emphasize pure statistical alignment. Instead, we leverage pre-trained diffusion models' ability to capture data distributions. During fine-tuning, stain information and semantic consistency constraints from the classifier dynamically guide the diffusion model, generating images precisely suited for target classifier refinement. This synergistic training (diffusion model and classifier working together) is distinct from approaches where the generator is trained independently.\n\n**Q2: Justification for diffusion vs. GANs in generation.**  \nA2: We agree that justifying the advantage of diffusion-based generation is crucial. Our empirical results in Tables 3 and 4 show that methods like StainGAN and StainNet, despite incorporating stain normalization and consistency constraints, perform slightly weaker than our approach. We attribute this to GANs' inherent mode collapse and training instability, which hinder accurate distribution modeling. Diffusion models, conversely, offer superior training stability and produce higher-quality, more diverse image generations. This is vital for robust data augmentation. Unlike GANs, diffusion models benefit from a step-by-step denoising process that can be precisely guided by fine-grained information (like our stain guidance), leading to more consistent and semantically accurate style transfer. GANs, due to their architectural differences, cannot achieve this gradual guidance, making their generated images highly dependent on the initial GAN quality. We will include a dedicated discussion on this comparative advantage in the appendix, potentially with supplementary experiments using GANs for image generation within our framework.\n\n**Q3: Clarification of classifier notation and Equation 9.**  \nA3: Thank you for pinpointing these important inconsistencies. We will revise lines 227-228 to consistently define $C_S$ as the source domain classifier and $C_T$ as the target domain classifier (our target model). For Equation 9, we'll clarify that $C_T(x)$ refers to the prediction (e.g., logits) in the first part, and to the feature representation (embedding) for MMD in the second part. This precision will be reflected in the revised manuscript.\n\n**Q4: Support for WSI annotation claim.**  \nA4: We agree this claim needs support. Annotating Whole Slide Images (WSIs) is indeed highly time-consuming and requires expert interpretation. We'll support this claim in lines 33-34 by referencing relevant literature [5] that discusses the complexity and cost of obtaining such annotations.\n\n**Q5: Novelty of the adaptation component.**  \nA5: As detailed in our response to Q1, the novelty lies in the collaborative training of our adaptation phase. Unlike most UDA methods where the generator is trained independently, our approach enables synergistic training where the target classifier actively guides the diffusion model's generation. This dynamic feedback loop ensures generated images are tailored to the classifier's needs, optimizing directly for downstream classification. This active co-training distinguishes our adaptation from a passive consumption of pre-generated data.\n\n**Q6: Advantages of diffusion-based images over GANs for adaptation.**  \nA6: As addressed in Q2, diffusion models generally offer superior fidelity and diversity compared to GANs. While pre-trained diffusion models capture target distribution, our method integrates stain guidance and classifier-driven semantic consistency for effective image transformation. If GANs were used, their structural differences would prevent step-by-step, fine-grained stain guidance, making generated images highly dependent on initial GAN quality and prone to instability/mode collapse. This would hinder precise style transfer and semantic preservation, limiting adaptation performance. We will include further discussion on this in the appendix.\n\n**Q7: Performance on challenging cross-organ adaptation.**  \nA7: We appreciate this excellent suggestion. In responding to this, we are conducting  additional experiments on challenging cross-organ adaptation tasks, referencing settings from [2] (GlaS and CAMELYON adaptation) and potentially other datasets with stronger domain shifts [6]. However, these cannot be finished before rebuttal deadline (July 30). Once they are finished, the results and discussion on our model's performance under these more extreme conditions will be included in the appendix of the revised manuscript, providing valuable insights into its generalizability.\n\n**Q8: Reference image selection process.**  \nA8: Thank you for this clarification request. Our method does not rely on a specific fixed reference image. During training, we dynamically use randomly sampled images from the target domain to provide stain information for our stain-guided consistency loss. This inherently accounts for variations in stain matrices within the target domain, making our method robust. Moreover, occasionally generated images with slight deviations can act as a form of data augmentation for the classifier [7]. We will clarify this crucial aspect in the revised manuscript.\n\n---\n\nOnce again, we sincerely thank you for your invaluable feedback. We believe our revisions significantly enhance the manuscript's clarity, completeness, and practical relevance. We hope our detailed responses address your concerns and look forward to your further feedback.\n\nReference:  \n[3] Haifeng Xia, Handong Zhao, and Zhengming Ding. Adaptive adversarial network for source-free domain adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 9010–9019, October 2021.\n\n[4] Song Tang, Wenxin Su, Mao Ye, and Xiatian Zhu. Source-free domain adaptation with frozen multimodal foundation model. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 23711–23720, June 2024.\n\n[5] Weiyi Wu, Chongyang Gao, Joseph DiPalma, Soroush Vosoughi, and Saeed Hassanpour. Improving representation learning for histopathologic images with cluster constraints. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 21404–21414, 2023.\n\n[6] Fangda Li, Zhiqiang Hu, Wen Chen, and Avinash Kak. Adaptive supervised patchnce loss for learning h&e-to-ihc stain translation with inconsistent groundtruth image pairs. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 632–641. Springer, 2023.\n\n[7] Jia-Ren Chang, Min-Sheng Wu, Wei-Hsiang Yu, Chi-Chung Chen, Cheng-Kung Yang, Yen-Yu Lin, and Chao-Yuan Yeh. Stain mix-up: Unsupervised domain generalization for histopathology images. In Marleen de Bruijne, Philippe C. Cattin, Stéphane Cotin, Nicolas Padoy, Stefanie Speidel, Yefeng Zheng, and Caroline Essert, editors, Medical Image Computing and Computer Assisted Intervention -- MICCAI 2021, pages 117–126. Springer International Publishing, 2021."}, {"review_id": "88Am4QkSIU", "reviewer": "Reviewer_5ZXg", "summary": "The paper proposes a novel method called Stain-Guided CycleDiffusion (SGCD) for unsupervised domain adaptation in histopathology image classification. Recognizing that conventional models struggle to generalize across hospitals due to differences in staining protocols and imaging devices, the authors introduce a dual diffusion model framework that enables style transfer between domains without requiring paired data. The method leverages a cyclic structure and introduces a stain-guided consistency loss to preserve crucial structural and semantic information during the domain translation process. Experimental results on multiple public pathology datasets demonstrate that SGCD outperforms existing stain normalization, GAN-based, and general domain adaptation approaches, particularly in maintaining high-quality, diagnostically relevant features in the target domain images. The approach is designed to facilitate more robust histopathology image analysis across diverse clinical environments.", "questions": "1. Clinical/Pathological Semantic Consistency:\nCan the authors provide more evidence that the proposed method preserves diagnostically meaningful structures in the transformed images? For example, have any pathology experts reviewed the generated images for semantic fidelity, or are there metrics (e.g., segmentation overlap, class activation consistency) that can better quantify this? Additional qualitative or expert-blinded assessments would be helpful to build clinical trust in the transformations.\n\n2. Handling of Rare Cohorts and Limited Data:\nHow does the method perform when the target domain contains rare disease subtypes or underrepresented pathological features? Are there experiments or analyses—such as leave-one-class-out, few-shot adaptation, or stratified performance reporting—that can clarify the model’s robustness in these challenging settings? If possible, consider including experiments or discussions on rare cohort generalization.\n\n3. Component-wise Ablation and Contribution Analysis:\nCould the authors provide a more detailed ablation study to isolate the effect of each architectural component, such as the cyclic structure and the stain-guided consistency loss? Understanding the individual contributions would help clarify which elements are most important for the observed gains.\n\n4. Practical Deployment and Computational Overhead:\nGiven the resource demands of diffusion models, what are the practical implications for clinical deployment, especially compared to existing CNN or GAN-based approaches? Are there strategies to mitigate computational costs, or are there scenarios where the overhead is justified by performance gains?\n\n5. Failure Cases and Limitations:\nCan the authors share any observed failure cases or known limitations—such as when the domain shift is too large, or when key features are not preserved? Transparency about boundaries of the method’s effectiveness will be valuable for both clinical and research users.\n\n\nScore Adjustment Criteria:\nIf the authors can provide convincing evidence of preserved diagnostic structures (via expert review or strong semantic metrics), demonstrate robustness to rare or limited data scenarios, and clarify the practical deployment implications, my evaluation score would increase. Conversely, persistent uncertainty in these areas would limit my confidence in the method’s clinical applicability.", "limitations": "The authors have addressed several methodological limitations, such as the need for sufficient target domain diversity and the computational demands of diffusion models. However, the discussion of clinical limitations—especially regarding semantic consistency of diagnostically relevant features and handling of rare disease cohorts—could be expanded. I would encourage the authors to include more discussion of these aspects, as well as to consider the potential risks of over-reliance on synthetic images in clinical decision-making. Explicit acknowledgment of these points, and transparency about where the method may or may not be reliable, would further strengthen the paper.", "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- Originality:\nThe paper presents a timely and creative approach by adapting diffusion models—rather than traditional GANs—to the problem of unsupervised domain adaptation in histopathology images. The integration of a cyclic framework with stain-guided consistency loss offers a fresh perspective within this area.\n\n- Significance:\nDomain shift remains a major barrier for clinical deployment of machine learning in pathology. By addressing domain adaptation without requiring paired data or precise reference images, the proposed method has practical relevance for real-world applications.\n\nWeaknesses\n- Clinical Relevance and Semantic Consistency:\nWhile the paper achieves strong quantitative results in classification tasks, it remains unclear whether the transformed images consistently preserve diagnostically critical structures at a level required for clinical decision-making. The stain-guided consistency loss primarily enforces color and statistical similarity, but does not guarantee preservation of fine-grained semantic or pathological features—an aspect that is crucial in actual pathology workflows.\n\n- Rare Cohort and Limited Data Scenarios:\nThe method, like many domain adaptation approaches, relies on sufficient representation of target domain characteristics in the training data. In practice, rare disease subtypes or underrepresented cohorts remain a significant challenge. The current evaluation does not directly address how well the model preserves or generalizes rare pathological features, which can limit its impact in real-world clinical settings.\n\n- Practical Deployment Considerations:\nAlthough diffusion models offer benefits in diversity and stability over GANs, they are also considerably more resource-intensive, both in terms of training and inference time. The paper does not thoroughly discuss these limitations or provide guidance for efficient deployment in clinical environments.\n\n- Ablation and Qualitative Assessment:\nWhile the proposed method demonstrates quantitative superiority, a more detailed ablation study dissecting the contributions of each architectural component (e.g., cyclic structure, stain-guided loss) would strengthen the claims. Additionally, qualitative analysis—such as expert review of the generated images for diagnostic fidelity—would be valuable for establishing trust in the method.", "was_revised": true, "final_justification": "Summary: The rebuttal meaningfully addresses my core concerns, so I raise my score by one level to Borderline Accept.\n\nResolved\n•\tSemantic preservation / clinical relevance: Clearer description of classifier-guided training plus a quantitative class-consistency improvement on Camelyon16 (0.66 → 0.85) directly mitigates my concern.\n•\tData scarcity: New sensitivity analysis with as little as 1% target data shows consistent gains over source-only, supporting sample efficiency.\n•\tDeployment clarity: Inference relies only on the trained target classifier; diffusion cost is confined to training.\n•\tAblation support: Component-wise ablations (dual diffusion, SGC loss, fine-tuning) substantiate the architectural choices.\n•\tTransparency: Commitment to document failure cases and limitations improves reproducibility.\n\nOverall Recommendation: The paper is methodologically original and empirically solid, with improved clarity and supporting analyses after rebuttal. Given remaining gaps in clinical validation, I cannot justify a larger increase, but the manuscript is just above the bar for acceptance.", "rebuttal": "Dear Reviewer 5ZXg,\n\nWe sincerely thank you for your thorough and insightful review of our manuscript. We deeply appreciate your positive feedback on our SGCD method's originality, the effectiveness of our bidirectional diffusion framework and stain-guided loss, and its strong empirical performance. Your constructive comments have significantly helped us improve the manuscript.\n\nWe have carefully addressed all your points and made substantial revisions, including:\n* Clarifying the semantic consistency of transformed images.\n* Discussing robustness to limited data and rare cohorts.\n* Addressing practical deployment considerations and computational overhead.\n* Presenting a detailed component-wise ablation study.\n* Discussing failure cases and limitations.\n\nPlease find our point-by-point responses below.\n\n---\n\n**Q1: Clinical Relevance and Semantic Consistency.**  \nA1: You raise a critical point regarding semantic consistency for clinical decision-making. We agree that solely relying on statistical information may not guarantee semantic preservation. Our method addresses this through collaborative training between the diffusion model and the target classifier, where the classifier actively guides the diffusion model to ensure generated images retain semantic information consistent with the source. To quantify this, we measured the class consistency on Camelyon16, comparing the class labels of original images with their transformed counterparts:\n\n| Method | Class Consistency Ratio |\n| :-----------: | :---------------------: |\n| No Adaptation | 0.66 |\n| With SGCD | 0.85 |\n\nThis demonstrates that our method significantly improves the preservation of class-level semantic information. While this provides strong evidence, we acknowledge that direct expert review by pathologists or specific segmentation overlap metrics for fine-grained pathological features are crucial for full clinical trust. We consider these critical next steps for future work and will explicitly discuss this limitation and future plans in the revised manuscript.\n\n**Q2: Handling of Rare Cohorts and Limited Data Scenarios.**  \nA2: We agree that handling rare disease subtypes and limited data presents a significant challenge in real-world clinical settings. It's important to note that our four datasets, being WSI slices, are inherently class-imbalanced, with tumor regions often representing relatively rare cohorts. The results presented in our main paper already offer insights into our method's performance under such imbalanced conditions.\n\nIn responding to specifically address performance with limited target domain data, we have conducted a supplementary experiment on Camelyon16, evaluating our method with varying percentages of available target domain data:\n\n| Target Data % | Source-only | 1% | 10% | 50% | 100% |\n| :-----------: | :-----------: | :-----------: | :-----------: | :-----------: | :-----------: |\n| AUC | 75.9 | 87.5 | 89.4 | 93.5 | 95.8 |\n\nThe results indicate that our method shows promising adaptability even with very limited target domain data (e.g., 1% of target data), significantly outperforming the source-only baseline. This suggests our method's capability to generalize effectively in challenging, data-scarce scenarios. We will include this supplementary experiment in the appendix of the revised manuscript. We acknowledge that direct experiments on rare disease subtypes or few-shot adaptation are crucial for a comprehensive understanding, and we will explicitly state this as a key direction for future research.\n\n**Q3: Practical Deployment and Computational Overhead.**   \nA3: You correctly highlight the resource demands of diffusion models. We want to clarify that our method's primary resource demand is during the training phase, not inference. For clinical deployment, only the trained target classifier is used for inference, which does not introduce additional computational overhead. For the training phase, we acknowledge the resource intensity. However, this can be mitigated by optimizing diffusion model sampling schedules and adjusting model sizes. Reducing training costs will be a key focus of our future research. We have expanded our discussion on these practical implications and mitigation strategies in the revised manuscript.\n\n**Q4: Component-wise Ablation and Qualitative Assessment.**   \nA4: Thank you for this excellent suggestion. We have conducted a detailed component-wise ablation study to isolate the contributions of the dual diffusion model, the stain-guided consistency (SGC) loss, and the fine-tuning (FT) of diffusion models. The results are summarized below:\n\n| Dual Diffusion Model | SGC Loss | FT of Diffusion Models | AUC |\n| :------------------: | :------: | :--------------------: | :--: |\n| V | V | V | 95.8 |\n| - | V | V | 92.8 |\n| V | - | V | 89.4 |\n| - | - | - | 86.8 |\n\nThis study clearly demonstrates that both the dual diffusion architecture and the SGC loss are critical for achieving the observed performance gains. We have incorporated this detailed ablation analysis into the revised manuscript. Regarding qualitative analysis and expert review, as mentioned in Q1, we fully concur with its importance for building clinical trust and consider it a critical next step for future work.\n\n**Q5: Failure Cases and Limitations.**   \nA5: Thank you for emphasizing transparency regarding failure cases and limitations. Our method does not rely on a specific reference image. During early training, when the diffusion model is not yet fully fine-tuned, or when domain shifts are very large, unexpected images might be generated, potentially increasing training difficulty. We will supplement the appendix of the revised manuscript with visual examples of observed failure cases and a detailed discussion on these limitations, providing valuable insights into the boundaries of our method's effectiveness.\n\n---\n\nOnce again, we extend our sincerest gratitude for your invaluable feedback and time. We believe that the revisions made in response to your comprehensive comments have substantially improved the clarity, completeness, and clinical relevance of our manuscript. We sincerely hope that our detailed responses address your concerns, and we eagerly look forward to your further feedback."}]

Author rebuttal:

Meta-review: The paper proposes a new method, Stain-Guided CycleDiffusion (SGCD), to address domain adaptation challenges in histopathology image analysis. It leverages dual diffusion models with cyclic constraints and a stain-guided consistency loss to generate realistic, diagnostically useful images without requiring paired data. Experiments on multiple datasets show that SGCD outperforms existing approaches in accuracy and robustness, making it a promising direction for medical imaging where stain and preparation differences can hinder model generalization.

Reviewers praised the paper’s originality, technical soundness, and strong empirical performance. They highlighted its clear writing, innovative use of diffusion models, and demonstrated improvements across several benchmarks. Concerns centered on high computational cost, the method’s current focus on binary classification, and the need for more evidence of clinical relevance, particularly regarding rare disease subtypes and preservation of fine-grained pathological details. The authors responded with detailed rebuttals, additional ablation studies, new experiments on limited-data settings, and quantitative evidence showing that SGCD preserves diagnostic features.

The paper received positive final ratings from reviewers--two Accepts and two Borderline Accepts. Three of the four reviewers kept their original rating after rebuttal, citing remaining doubts about clinical validation and computational practicality; one reviewer raised their rating, acknowledging that the rebuttal satisfactorily addressed their concerns. Overall, the paper was judged to be technically solid, original, and impactful within its subfield. The area chair agrees with the reviewers' judgements, and recommends acceptance as a spotlight paper, recognizing it as the best submission within the set of papers assigned to this AC.
Decision: Accept (spotlight)