## 3 Method
### Preliminaries  
For the cross-domain histopathological image classification task, we define the datasets for the source and target domains as \(X^{s}=\left\{x_{1}^{s},x_{2}^{s},\dots,x_{i^{\prime}}^{s},\dots,x_{N^{k}}^{s}\right\}\) and \(X^{t}=\left\{x_{1}^{t},x_{2}^{t},\dots,\right.\)\(\left.x_{j^{\prime}}^{t},\dots,x_{N^{t}}^{t}\right\}\), respectively. The corresponding labels for the source and target domains are  
Figure 2: The proposed architecture of the uncertainty-guided asymmetric consistency domain adaptation. Note that the red box displays the entire model training flowchart. The process begins with the source domain where histopathological images undergo initial feature extraction through a source model pre-trained from \(L_{s}\) (Step 1). To address the challenges posed by data privacy and the unavailability of large-scale annotated datasets, the Uncertainty-guided Source-free Transfer Learning (USTL) component operates to map the feature space of the source model to the target domain without requiring access to the source data, which can quantifies and mitigates network uncertainties, generating high-quality pseudo-labels for target data (Step 2). Concurrently, the Asymmetric Consistency Learning (ACL) component quantifies and utilizes the symmetries and asymmetries between the source and target domains, facilitating the preservation of crucial inter-domain differences. defined as \(Y^{s}=\left\{y^{s}_{1},y^{s}_{2},\ldots,y^{s}_{i},\ldots,y^{s}_{N^{s}}\right\}\) and \(Y^{t}=\left\{y^{t}_{1},y^{t}_{2},\ldots,y^{t}_{j},\ldots,y^{t}_{N^{t}}\right\}\), where \(N^{s}\) and \(N^{t}\) represent the number of medical images. Notably, the labels in the target domain, denoted as \(Y^{t}\), are treated as pseudo-labels. Assuming that the model for the UCDA source domain is denoted as \(f(\cdot)\), and the model for the target domain is denoted as \(g(\cdot)\). The training process involves initializing the network parameters of model \(g(\cdot)\) with the completed training of model \(f(\cdot)\). During the training of the target domain model, the network parameters of the source domain model are frozen to simulate a scenario without access to the source domain data. In the process of our source-free domain adaptation, two main steps are typically involved. The first step entails training the source domain model, where the network parameters are updated through cross-entropy. In the second step, the focus shifts to maximizing the mutual information between the potential features and the classifier output. First, the cross-entropy loss function for the pre-trained Source Classification (SC) model is defined as  
\[\mathcal{L}_{sc}=\min_{W_{sc}}-\sum_{i=1}^{N^{s}}y^{s}_{i}\log f(W_{sc},x^{s}_{ i}) \tag{1}\]  
where \(W_{sc}\) is the network parameters of source classification model \(f(\cdot)\). In the second step, the source data \(X^{s}\) is deactivated, and the network parameters of the target domain model \(g(\cdot)\) are initialized using the parameters \(W_{\text{SC}}\) of \(f(\cdot)\). Subsequently, an information maximization loss \(\mathcal{L}_{im}\) is employed to update the network parameters of \(g(\cdot)\). \[\mathcal{L}_{\text{im}}=-\mathbb{E}_{p(x^{t})}\sum_{c=1}^{C}\phi_{c}\big{(}g (x^{t})\big{)}\log\phi_{c}\big{(}g(x^{t})\big{)} \tag{2}\]  
\[\mathcal{L}_{\text{div}}=\text{D}_{\text{KL}}\big{(}\hat{\mathbf{p}}\|C^{-1} \mathbf{1}_{C}\big{)}-\log C \tag{3}\]  
where \(x^{t}\) is a given target sample, \(p(x^{t})\) denotes the predicted probability vector of \(x^{t}\), \(C\) represents the category number of medical images, and \(\phi_{c}(x)=\exp(x_{k})/\sum_{k}\exp(x_{k})\) refers to the possibility of \(c\)-th representation in the output of the target domain model. Specifically, \(\mathcal{L}_{\text{im}}\) is responsible for updating the pseudo-labels for the target domain, while \(\mathcal{L}_{\text{div}}\) is used to classify the model predictions into \(C\) classes.