## 3 Method
### Uncertainty-Guided Source-Free Transfer Learning  
In a typical transfer learning training task, there exists a divergence in data distribution and content between the source and target domain datasets, resulting in imbalances both inter- and intra-domain. This lack of alignment is referred to as \"unalignment\". However, by adapting the source domain data, we can progressively approximate the feature space of the target and source domain models through various inter- and intra-domain alignment strategies. Nevertheless, this task becomes more challenging in the case of source-free domain adaptation since the source data are inaccessible in this scenario.  
In this paper, we directly leverage the pre-trained source model to transfer knowledge to the target domain. However, a significant challenge arises when using the source model to generate pseudo-labels for target data, as it may result in uncertain predictions. To address this uncertainty issue, we propose an uncertainty-guided transfer learning strategy, which can quantitatively estimate the uncertainty of the source domain model to prevent reduced accuracy caused by overconfidence in the pseudo-labeling process.  
First, we conduct a complete pre-training session by feeding the source domain data \(X^{s}\) into model \(f(\cdot)\). This simulation is performed to establish the source domain model, which will remain unchanged in subsequent tasks. During this training session, the parameters of the source network are updated by minimizing the source loss \(\mathcal{L}_{s}\).  
\[\mathcal{L}_{s}=\min_{W_{s}}-\sum_{i=1}^{N^{s}}y_{i}^{s}\log f\big{(}W_{s},x_{i} ^{s}\big{)} \tag{7}\]  
where \(W_{s}\) represents the source network parameters of \(f(\cdot)\). Through the aforementioned update approach, the network parameters are adjusted, enabling the source domain network \(f(\cdot)\) to effectively extract features and recognize patterns from the source domain data. In other words, the source domain model gains the capability to capture specific lesion characteristics from medical images within the source domain. This serves as a crucial foundation for our subsequent unsupervised domain adaptation tasks, even in the absence of source domain data.  
To evaluate the uncertainty in the subsequent target domain training task, we employ the Laplace approximation method to estimate the posterior distribution of the predicted values. This approach is described in Equation (5) in the preliminary section.  
\[p(y_{c}\mid h,X^{s})\approx\int_{w}\phi_{c}(g(h))\text{N}\Big{(}W\mid W_{\text{ MAP}},\mathbf{H}^{-1}\Big{)}\text{d}W \tag{8}\]  
With the completion of the aforementioned steps, we are prepared for the subsequent tasks. Prior to commencing the training of the target model, we initialize \(g(\cdot)\) using the frozen network parameters of \(f(\cdot)\). This initialization ensures that the target model starts with the knowledge transferred from the source domain model.  
\[y_{j}^{t}=\text{softmax}\Big{(}g\Big{(}W_{g},x_{j}^{t}\Big{)}\Big{)} \tag{9}\]  
where \(W_{g}\) denotes the parameters of the target network, and \(y_{j}^{t}\) is the generated pseudo-label for the target data.  
As for the pseudo-labeling process in the target domain, we apply a filtering mechanism by ranking the predicted probabilities. Specifically, for the first ten epochs, both the probability predicted from source model \(p_{j}^{s}=f(W_{s},x_{j}^{t})\) and the one from target model \(p_{j}^{t}=g(W_{t},x_{j}^{t})\) must exceed the probability threshold \(\alpha\) in order to pass the screening for pseudo-labels.