SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Intuitively, it encourages to optimize a standard VAE and minimize the KL divergence between  $q(\pmb{y}_0^t \mid \pmb{x}^t)$  and the approximation  $p_{\omega}(\pmb{y}_0^t \mid \pmb{z}^t)$ . However, the ground-truth  $q(\pmb{y}_0^t \mid \pmb{x}^t)$  is agnostic in practice. In this work, we implement it in a Knowledge Distillation (KD) framework [53], where  $q(\pmb{y}_0^t \mid \pmb{x}^t)$  is substituted with the output of a teacher model  $f_{\Omega'}$  that is optimized by exponential moving average (EMA) from the weights of student model  $f_{\Omega}$ . We denote the KD loss as  $\mathcal{L}_{KD}$  and weight it by  $\lambda_{kd}$  to absorb the influence of wrong predictions from the teacher model. And only those with confident predictions (larger than a pre-defined threshold  $\alpha$ ) from the teacher model will be involved in this term. Meanwhile, we hope that the predictions of target samples to be individually confident and holistically diverse, which results in the following loss function:
$$
\mathcal {L} _ {t} ^ {u} = - \mathcal {L} _ {E L B O} ^ {u} + \lambda_ {k l} \underbrace {\left[ \right. D _ {K L} \left(\mathbb {E} _ {\boldsymbol {x} ^ {t} \sim \mathcal {T} _ {u}} \mathbb {E} _ {q _ {\rho} \left(\boldsymbol {z} ^ {t} | \boldsymbol {x} ^ {t}\right)} \left[ p _ {\omega} \left(\boldsymbol {y} _ {0} ^ {t} \mid \boldsymbol {z} ^ {t}\right)\right] \| \frac {\boldsymbol {1} ^ {K}}{K}\right) - \mathbb {E} _ {\boldsymbol {x} ^ {t} \sim \mathcal {T} _ {u}} \mathbb {E} _ {q _ {\rho} \left(\boldsymbol {z} ^ {t} | \boldsymbol {x} ^ {t}\right)} \left[ D _ {K L} \left(p _ {\omega} \left(\boldsymbol {y} _ {0} ^ {t} \mid \boldsymbol {z} ^ {t}\right) \| \frac {\boldsymbol {1} ^ {K}}{K}\right)\right]} _ {\mathcal {L} _ {K L}}, \tag {13}
$$
where  $\lambda_{kl}$  is the weighting coefficient. The derivation of Eq. (12) can be found in Appendix A.3.
Adversarial Learning between Labeled and Unlabeled data. The distribution shift between labeled and unlabeled data is a key obstacle to active learning. To extend the applicability of the diffusion model trained on labeled data to unlabeled ones, we apply a discriminator  $D_{\tau}$  parameterized by  $\tau$  and conduct adversarial learning between labeled and unlabeled data, expecting to learn an invariant latent space. Inspired by CDAN [22], we also leverage the model prediction as the conditioning for joint distribution alignment, which gives the following training loss for the discriminator:
$$
\mathcal {L} _ {a d v} = - \mathbb {E} _ {\boldsymbol {x} \sim (\mathcal {S} \cup \mathcal {T} _ {l})} \mathbb {E} _ {\boldsymbol {z} \sim q _ {\rho} (\boldsymbol {z} | \boldsymbol {x})} \log \left[ D _ {\tau} \left(p _ {\omega} (\boldsymbol {y} _ {0} \mid \boldsymbol {z}), \boldsymbol {z}\right) \right] - \mathbb {E} _ {\boldsymbol {x} \sim \mathcal {T} _ {u}} \mathbb {E} _ {\boldsymbol {z} \sim q _ {\rho} (\boldsymbol {z} | \boldsymbol {x})} \log \left[ 1 - D _ {\tau} \left(p _ {\omega} (\boldsymbol {y} _ {0} \mid \boldsymbol {z}), \boldsymbol {z}\right) \right].
$$
This minimax process is trained in an end-to-end mode using the gradient reversal layer [1].
3.3 Two-Stage Training Procedure
The whole model in our framework includes an encoder  $\rho$ , two decoders  $\phi, \psi$ , a discriminator  $\tau$ , a deterministic classifier  $\omega$  and a diffusion-based classifier  $\theta$ . As shown in Section 3.1, the diffusion model requires the i.i.d. assumption to hold and injects the mean estimate  $f_{\Omega}(\pmb{x})$  into both forward and reverse diffusion process. Therefore, we schedule a two-stage training procedure in each active round. Specifically, the first stage is called the adaptation stage, which yields the following objective:
$$
\max  _ {\tau} \min  _ {\rho , \phi , \psi , \omega} \mathcal {L} _ {s} + \mathcal {L} _ {t} ^ {u} + \mathcal {L} _ {t} ^ {l} - \mathcal {L} _ {a d v}. \tag {14}
$$
Figure 1: Framework of DAPM. Each active learning round goes through three stages: two stages for training and one stage for selection. Parameters in blue and green backgrounds are trained in the adaptation stage and the diffusion stage, respectively. When the adaptation stage ends, the parameters involved will be frozen. The teacher model  $f_{\Omega^{\prime}}$  is updated by EMA from the student model  $f_{\Omega}$ .
The first stage ensures a well-behaved mean estimator  $f_{\Omega}$  and a domain-invariant latent embedding. We then freeze all the trained parameters and train the diffusion model  $\epsilon_{\theta}(z, y_t, f_{\Omega}(x), t)$  in the second stage, namely the diffusion stage, with all labeled data:
$$
\min  _ {\theta} \mathcal {L} _ {s} + \mathcal {L} _ {t} ^ {l}. \tag {15}
$$
Having the diffusion model, we select target samples according to the strategy in Section 3.4 if there is a remaining budget. We depict the whole framework for ADA in Fig. 1.
Extension to Source-Free ADA (SFADA). We naturally extend our method to SFADA [47] based on the fact that the model  $f_{\Omega} \coloneqq \{\rho, \omega\}$  in the adaptation stage can be initialized (like in ADA) or source pre-trained. For the latter, we pre-train the source model with  $\mathcal{L}_s$ , and disable the source-related losses, i.e.,  $\mathcal{L}_s$  and  $\mathcal{L}_{adv}$  in the adaptation stage. Besides, we use confident unlabeled target data pseudo-labeled by the teacher model to substitute the source samples in  $\mathcal{L}_s$  in the diffusion stage. The detailed procedure of the training process can be found in Appendix. B.
3.4 T-test-Based Selection Strategy
Existing ADA methods generally select both target-representative and uncertain samples. The former characteristic can be naturally absorbed within the adaptation stage, which makes our model operate in a domain-agnostic latent space. Therefore, we mainly focus on selecting samples with high predictive uncertainties. For each  $\boldsymbol{x}^t \sim \mathcal{T}_u$ , we generate  $N$  predictions independently with the diffusion classifier, denoted by  $\{\widehat{\boldsymbol{y}}_n^t\}_{n=1}^N$ . Since the raw predictions can be arbitrary real vectors, we then convert them into the probability simplex by a softmax operation following [19], resulting in a set  $\{\widetilde{\boldsymbol{y}}_n^t\}_{n=1}^N$ . Based on that, we identify the two most predicted classes among  $N$  votes for each instance, which gathers two groups of predicted scores  $g_1 = \{\widetilde{\boldsymbol{y}}_n^t[a]\}_{n=1}^N$  and  $g_2 = \{\widetilde{\boldsymbol{y}}_n^t[b]\}_{n=1}^N$ , where  $a, b$  denote two most voted class labels. We assume independent generation in each dimension and evaluate the uncertainty by conducting an independent two-sample t-test, where the t-value is:
$$
t = \frac {\bar {g} _ {1} - \bar {g} _ {2}}{S _ {\bar {g} _ {1} - \bar {g} _ {2}}}, S _ {\bar {g} _ {1} - \bar {g} _ {2}} = \sqrt {\frac {s _ {1} ^ {2} + s _ {2} ^ {2}}{N}}, \tag {16}
$$
here we use  $\bar{g}_1$  (or  $\bar{g}_2$ ) and  $s_1^2$  (or  $s_2^2$ ) to denote the mean and variance of the two groups, respectively. Conceptually, the t-value is formulated as the ratio of mean difference between groups to sampling variability. Compared to Best-versus-Second-Best (BvSB) [36] used in deterministic model-based AL methods, the t-test-based criterion can not only allow us to see if two means are different, but also tell us how significant the differences are. As a result, we use the p-value to express the significance of such a difference. Intuitively, uncertain samples are those with small mean differences between groups and high sampling variabilities, which leads to small t-values and high p-values. In practice, we choose unlabeled target samples with top- $b$  p-values for annotation in each active selection round.
Datasets and Baselines. We evaluate our method on three widely used domain adaptation benchmarks, i.e., Office-31 [54], Office-Home [55] and VisDA [56]. We construct three groups of baselines
Table 1: Accuracy (%) on VisDA and Office-31 datasets under different settings with  $5\%$  labeled target samples (ResNet-50).
Category	Method	VisDA	Office-31
Synthetic → Real	A → D	A → W	D → A	D → W	W → A	W → D	Avg
Source-Only	ResNet [58]	44.7 ± 0.1	81.5	75.0	63.1	95.2	65.7	99.4	80.0
Active Learning	Random	78.6 ± 0.6	87.1	84.1	75.5	98.1	75.8	99.6	86.7
BvSB [36]	81.3 ± 0.4	89.8	87.9	78.2	99.0	78.6	100.0	88.9
Entropy [7]	82.7 ± 0.3	91.0	89.2	76.1	99.7	77.7	100.0	88.9
CoreSet [33]	81.9 ± 0.3	82.5	81.1	70.3	96.5	72.4	99.6	83.7
BADGE [57]	84.3 ± 0.3	90.8	89.1	79.8	99.6	79.6	100.0	89.8
Active DA	AADAD[37]	80.8 ± 0.4	89.2	87.3	78.2	99.5	78.7	100.0	88.8
TQS [11]	83.1 ± 0.4	92.8	92.2	80.6	100.0	80.4	100.0	91.1
CLUE [4]	85.2 ± 0.4	92.0	87.3	79.0	99.2	79.6	99.8	89.5
EADA [5]	88.3 ± 0.1	97.7	96.6	82.1	100.0	82.8	100.0	93.2
* DUC [20]	88.9 ± 0.2	95.8	96.4	81.9	99.6	81.4	100.0	92.5
DAPM (Baseline)	80.8 ± 0.7	94.3	93.5	72.1	97.6	72.3	99.3	88.2
DAPM-TT	89.1 ± 0.1	96.8	98.6	82.3	99.8	83.3	100.0	93.5
SFADA	* ELPT [47]	83.5 ± 0.6	98.0	97.2	81.2	99.4	80.7	100.0	92.8
DAPM (Baseline)	73.4 ± 0.2	93.7	92.9	72.2	98.1	72.6	99.1	88.1
† Random	86.2 ± 0.8	94.4	95.1	78.2	98.1	79.2	99.6	90.8
† BvSB [36]	88.1 ± 0.2	96.7	96.5	81.1	99.0	81.5	100.0	92.5
† Entropy [7]	87.5 ± 0.3	96.3	95.6	80.3	98.8	80.5	100.0	91.9
† CoreSet [33]	87.3 ± 0.1	94.7	96.5	80.0	97.9	79.9	100.0	91.5
† BADGE [57]	87.9 ± 0.3	96.5	97.1	79.3	98.5	80.1	99.8	91.9
DAPM-TT	88.4 ± 0.3	96.8	96.4	83.5	99.7	81.7	100.0	93.0
* For DUC and ELPT, we report the results on Office-31 and VisDA based on our own runs, respectively, according to the official code.
† For SFADA, we implement several active learning methods upon our SFDA baseline and report the mean results over 3 runs.
for comparison. (i) Active learning: Random, Entropy [7], BvSB [36], CoreSet [33], BADGE [57]. (ii) Active Domain Adaptation: AADA [37], TQS [11], CLUE [4], EADA [5], DUC [20]. (iii) Source-Free ADA: ELPT [47], and our SFDA baseline with other AL selection methods: Random (DAPM-RD), BvSB (DAPM-BS), Entropy (DAPM-ET), CoreSet (DAPM-CS), BADGE (DAPM-BG). We denote our method with the t-test-based selection criterion by DAPM-TT thereafter. It is worth noting that in the SFADA setting, we retain the abbreviation as DAPM for consistency, however we do not employ the adversarial learning loss.
Implementation. We implement our method on Pytorch and MindSpore<sup>3</sup>. The ResNet-50 [58] pre-trained on ImageNet [59] is adopted as the backbone, which constitutes the main body of the encoder. The decoder is simply a two-layer MLP. Following previous works [5, 20], we schedule 5 selection rounds, where in each round, the model selects  $b = 1\% \times n_t$  samples for annotation, and therefore the total budget  $B = 5\% \times n_t$ . We use SGD optimizer in the adaptation stage. The learning rate is set as 0.01 except for the VisDA dataset in SFADA, where we use 0.001 for training. The batch size is 32 for ADA and 64 for SFADA. We adopt the same learning rate scheduler as [22, 1]. For hyperparameters, we use  $\lambda_{kl} = 0.1$ ,  $\lambda_{kd} = 0.1$  for ADA and  $\lambda_{kl} = 1.0$ ,  $\lambda_{kd} = 1.0$  for SFADA. For all tasks, the confidence threshold  $\alpha$  for knowledge distillation is set to 0.9. We set  $N = 100$ , i.e., we generate 100 predictions for each individual sample for uncertainty estimation. More implementation details are provided in Appendix. C. Code is available at https://github.com/TL-UESTC/DAPM.
Evaluation Protocol. There are two classifiers involved in our method, i.e., a deterministic classifier parameterized by  $\omega$  and a diffusion classifier parameterized by  $\theta$ . For evaluating a target sample  $\boldsymbol{x}^t$  encoded by  $\boldsymbol{z}^t$ , we leverage the predictions generated from the diffusion classifier by calculating the expected class probability based on  $N$  independent votes, i.e.,  $\bar{p}_{\theta}(\boldsymbol{y}^t \mid \boldsymbol{z}^t) = \frac{1}{N} \sum_{n=1}^{N} \tilde{\boldsymbol{y}}_n^t$ . We show in Sec. 4.3 that  $\bar{p}_{\theta}(\boldsymbol{y}^t \mid \boldsymbol{z}^t)$  provides a more calibrated prediction than the output of the deterministic classifier  $p_{\omega}(\boldsymbol{y}^t \mid \boldsymbol{z}^t)$ . On the other hand, we use the majority vote as the final predicted class.
Active Domain Adaptation. We present our results on Office-31 and VisDA in Table 1. Notably, among traditional active selection strategies, those based on uncertainty (e.g., BvSB, Entropy, BADGE) tend to achieve higher performance compared to those based purely on representativeness (e.g., CoreSet). This is because a portion of the target domain is already well-aligned with the source domain, and selecting these easy samples would not provide informative feedback to the model. This highlights the importance of incorporating predictive uncertainty in the selection criterion. However, the accuracies of all traditional AL methods are significantly lower than those of ADA methods due
<sup>3</sup>https://www.mindspore.cn/
Table 2: Accuracy (%) on Office-Home dataset under different settings with  $5\%$  labeled target samples (ResNet-50). Marks have the same meaning as in Table 1.
Category	Method	Ar→Cl	Ar→Pr	Al→Rw	Cl→Ar	Cl→Pr	Cl→Rw	Pr→Ar	Pr→Cl	Pr→Rw	Rw→Ar	Rw→Cl	Rw→Pr	Avg
Source-Only	ResNet	42.1	66.3	73.3	50.7	59.0	62.6	51.9	37.9	71.2	65.2	42.6	76.6	58.3
Active Learning	Random	52.5	74.3	77.4	56.3	69.7	68.9	57.7	50.9	75.8	70.0	54.6	81.3	65.8
BvSB [36]	56.3	78.6	79.3	58.1	74.0	70.9	59.5	52.6	77.2	71.2	56.4	84.5	68.2
Entropy [7]	58.0	78.4	79.1	60.5	73.0	72.6	60.4	54.2	77.9	71.3	58.0	83.6	68.9
CoreSet [33]	51.8	72.6	75.9	58.3	68.5	70.1	58.8	48.8	75.2	69.0	52.7	80.0	65.1
BADGE [57]	58.2	79.7	79.9	61.5	74.6	72.9	61.5	56.0	78.3	71.4	60.9	84.2	69.9
Active DA	AADAD [37]	56.6	78.1	79.0	58.5	73.7	71.0	60.1	53.1	77.0	70.6	57.0	84.5	68.3
TQS [11]	58.6	81.1	81.5	61.1	76.1	73.3	61.2	54.7	79.7	73.4	58.9	86.1	70.5
CLUE [4]	58.0	79.3	80.9	68.8	77.5	76.7	66.3	57.9	81.4	75.6	60.8	86.3	72.5
EADA [5]	63.6	84.4	83.5	70.7	83.7	80.5	73.0	63.5	85.2	78.4	65.4	88.6	76.7
DUC [20]	65.5	84.9	84.3	73.0	83.4	81.1	73.9	66.6	85.4	80.1	69.2	88.8	78.0
DAPM (Baseline)	51.9	73.1	78.4	59.6	76.3	74.9	61.2	53.5	80.2	70.2	58.3	81.3	68.2
DAPM-TT	64.2	85.4	85.7	69.2	84.2	83.5	69.1	63.4	86.0	77.2	68.4	88.6	77.1
SFADA	ELPT [47]	65.3	84.1	84.9	72.9	84.4	82.8	69.8	63.3	86.1	76.2	65.6	89.1	77.0
DAPM (Baseline)	50.5	76.1	80.6	66.5	74.9	77.8	63.8	49.9	80.1	72.4	53.9	83.5	69.2
† Random	58.5	82.4	82.3	68.8	81.0	80.6	69.4	60.5	82.2	76.2	64.2	85.6	74.3
† BvSB [36]	62.5	83.5	83.4	72.1	84.5	83.0	70.3	60.4	85.5	76.3	63.7	87.4	76.1
† Entropy [7]	59.2	82.1	84.2	68.2	82.0	80.2	66.2	58.7	84.1	75.7	63.3	87.6	74.3
† CoreSet [33]	61.2	83.5	85.0	70.7	82.5	82.6	68.9	60.3	83.5	76.3	63.8	86.9	75.4
† BADGE [57]	60.2	83.9	84.9	71.8	83.7	81.6	69.1	59.8	85.1	75.9	62.8	88.1	75.6
DAPM-TT	64.4	85.8	85.4	72.4	84.7	84.1	70.0	63.3	85.6	77.4	65.8	89.1	77.3
(a) ECE of the target data on Office-Home.
Figure 2: (a) Visualization of Expected Calibration Error (ECE) for ADA on task  $\mathrm{Ar} \rightarrow \mathrm{Cl}$  and  $\mathrm{Cl} \rightarrow \mathrm{Ar}$ . (b) Performance under different choices of  $N$  on Office-Home for ADA and SFADA.
(b) Performance under different  $N$  on Office-Home.
to the neglect of domain shift. Among ADA methods, our DAPM-TT outperforms other methods and achieves the best accuracies on both Office-31 and VisDA, surpassing the deterministic model EADA [5] by  $0.8\%$  and  $0.3\%$  on the two datasets, respectively. Compared to the recent method DUC [20], our method still achieves better performance, boosting the accuracy by  $1.0\%$  on Office-31 and achieving a slightly better performance on VisDA, showing the superiority of our probabilistic framework. The results in Table 2 demonstrate that our method outperforms all deterministic ADA methods on the Office-Home dataset. Although it does not achieve the best accuracy in this case, it remains highly competitive with DUC. Moreover, it is worth noting that our probabilistic modeling is mainly designed to capture predictive uncertainty, rather than to optimize classification accuracy that is largely depended on domain adaptation methods. We will show in Sec. 4.3 that our method induces more calibrated predictions than DUC.
Source-Free Active Domain Adaptation. For SFADA, we mainly compare our DAPM-TT with other AL strategies using our SFDA baseline, where we conduct the adaptation stage and adopt some representative AL strategies based on the deterministic classifier. The results in Table 1 and Table 2 show that DAPM-TT consistently achieves the best performance on all datasets. In particular, we find that BvSB [36], which can be considered as the deterministic counterpart of DAPM-TT, achieves relatively good results on all datasets. However, our DAPM-TT outperforms BvSB by considering the full distribution of the predicted variable, providing a better measure of uncertainty. Compared to the recent SFADA method ELPT [47], our DAPM-TT is able to surpass it on all datasets, especially the VisDA dataset, where we achieve a  $4.9\%$  improvement in mean accuracy.
4.3 Analytical Experiments
Expected Calibration Error (ECE). To evaluate the calibration ability of our model, we plot the ECE curves for two tasks on Office-Home in Fig. 2a. The results demonstrate that, in both tasks, the output of our deterministic classifier is much more uncalibrated compared to that of the diffusion classifier, even though their accuracies remain very close (as shown in the Ablation Study). This confirms the well-known phenomenon that softmax classifiers based on point estimates tend to make overconfident predictions [60], which can be unsafe when dealing with uncertain estimation. Our DAPM aims to recover the full predictive distribution by modeling the uncertainty in both data
Figure 3: (a) Accuracy curves as budget goes from  $0\%$  to  $20\%$ . (b) Model performance varying with parameters  $\lambda_{kl}, \lambda_{kd} \in \{0.01, 0.1, 0.2, 0.5, 1.0\}$  on task D → A (Office-31).
Table 3: Comparison between different selection strategies for ADA (5% budget on Office-31).
Method	Deterministic Classifier	Diffusion Classifier
DAPM-RD	DAPM-BS	DAPM-ET	DAPM-CS	DAPM-BG	DAPM-VT	DAPM-IW	DAPM-AE	DAPM-TT
Accuracy (%)	92.0	92.2	92.1	91.8	92.5	93.1	92.9	92.7	93.5
generation and model prediction, thereby effectively mitigating this issue. Compared to DUC [20], which only models the distribution in output space, our method achieves smaller ECE values in both tasks, demonstrating the benefits of our probabilistic framework.
Effect of Different Sampling Scales. We evaluate our model under varying sampling numbers  $N$  and report the performance on Office-Home in Fig. 2b. Our results demonstrate that the model performance initially improves as  $N$  increases. This is because when  $N$  is too small, the model suffers from sampling bias, which results in a performance degradation to a level similar to that of the point estimate. However, an excessively large number of samples can lead to increased storage and computing resources. We find that when  $N$  is around 100, the performance becomes stable.
Effect of Different Annotation Budgets. Fig. 3a shows how different budgets affect the model performance. For both ADA and SFADA, our method is able to select the most informative samples at the beginning, resulting in superior performance even with a small budget. As the budget increases, the advantage of our method is slightly diluted. However, it is still able to maintain a leading accuracy.
Evaluation of Active Learning. We also provide the baseline domain adaptation performance (i.e., DAPM without active learning) in Table 1 and 2. It shows that without active selection and learning, our DAPM only achieves a moderate performance compared to modern methods that are specifically designed for UDA, given that the probabilistic backbone is mainly used for uncertainty modeling rather than accuracy. However, we are encouraged to observe that incorporating AL with our designed selection criterion significantly enhances the domain adaptation performance on all datasets. This outcome demonstrates the effectiveness of our diffusion-based uncertainty estimation, as it identifies informative samples that considerably improve overall performance.
Performance under Different Selection Strategies. To explore the superiority of our t-test-based selection strategy, we test our DAPM using other selection strategies for the ADA task. The results are presented in Table 3. In addition to strategies based on the deterministic classifier, we also evaluate three strategies based on the diffusion classifier: DAPM-VT, DAPM-IW and DAPM-AE. DAPM-VT, DAPM-IW select samples with the top-  $B$  highest prediction variance and interval width on the majority voted class, respectively. DAPM-AE averages the entropy across the  $N$  predictions to get the final nonparametric entropy estimate for each data point, and select the ones with highest averaged entropies for annotation. As expected, DAPM achieved the best results. Our findings suggest that the t-test-based criterion is more suitable for the diffusion classifier since it takes into account both sampling variability and cross-category ambiguity.
T-SNE Visualization of Latent Representations. We visualize the latent representations of unlabeled target data and selected target data in Fig. 4 using t-SNE [61]. In this visualization experiment, we compared our DAPM-TT with BvSB [36] that is based on the deterministic classifier. It can be observed that BvSB tends to select samples from relatively ambiguous regions (the center region) since these samples often have ambiguity between different classes. However, many samples selected by BvSB are in areas where the model is able to make predictions accurately. Therefore, it will not help to correct the samples with wrong predictions, resulting in modest improvement on performance.
(a) BvSB  $(\mathrm{Ar}\rightarrow \mathrm{Cl})$
Figure 4: Visualization of latent representations using t-SNE [61] on task  $\mathrm{Ar}\rightarrow \mathrm{Cl}$  (a to b) and  $\mathrm{Rw}\rightarrow \mathrm{Pr}$  (c to d) of ADA. Darkblue points are unlabeled target samples correctly classified by our model. Lightblue points represent unlabeled target samples misclassified by our model. Red stars are the selected target samples.
(b) DAPM-TT  $(\mathrm{Ar}\rightarrow \mathrm{Cl})$
(c) BvSB  $(\mathrm{Rw}\rightarrow \mathrm{Pr})$
(d) DAPM-TT  $(\mathrm{Rw}\rightarrow \mathrm{Pr})$
Our DAMP-TT, on the other hand, can select samples from both the regions where there is ambiguity between classes and the regions where a large number of samples are misclassified, which are exactly the ones we want to select for annotation.
How Does T-test-based Selection Ensure Diversity? While our method mainly focuses on uncertainty estimation, we show that it has properties that help mitigate redundant selections. Firstly, the diffusion process introduces stochasticity by generating varied predictions for the same input. This creates more diversity in the uncertainty estimates across similar instances. In other words, duplicate inputs will not necessarily have identical uncertainty. Secondly, the t-test criterion accounts for both variability across predictions and similarity of top-2 classes. Highly variable samples with closer competing classes will be favored, which is naturally distributed around the classification boundary of every class, thus enabling diversity. In Fig. 4, we observe that our approach naturally selects a diverse range of sample classes, even though we did not explicitly impose a diversity constraint.
Ablation Study. We conduct extensive experiments to investigate the influence of different classifiers and losses in our method. The results are summarized in Table 4, and we observed the following: Firstly, in most cases, the diffusion classifier yields slightly better results than the deterministic one, indicating its superior tolerance for domain shift. Secondly, our approach still achieves much better results than other traditional AL methods without any loss function for domain adaptation, demonstrating the superiority of our selection method. Lastly, all the loss functions have a positive effect on the final result.