Diffusion-Based Probabilistic Uncertainty Estimation for Active Domain Adaptation
Authors: Zhekai Du
Jingjing Li
Venue: NeurIPS 2023 poster (2023)
Keywords: diffusion-based models
active learning
domain adaptation
source-free domain adaptation
uncertainty estimation

Abstract: Active Domain Adaptation (ADA) has emerged as an attractive technique for assisting domain adaptation by actively annotating a small subset of target samples. Most ADA methods focus on measuring the target representativeness beyond traditional active learning criteria to handle the domain shift problem, while leaving the uncertainty estimation to be performed by an uncalibrated deterministic model. In this work, we introduce a probabilistic framework that captures both data-level and prediction-level uncertainties beyond a point estimate. Specifically, we use variational inference to approximate the joint posterior distribution of latent representation and model prediction. The variational objective of labeled data can be formulated by a variational autoencoder and a latent diffusion classifier, and the objective of unlabeled data can be implemented in a knowledge distillation framework. We utilize adversarial learning to ensure an invariant latent space. The resulting diffusion classifier enables efficient sampling of all possible predictions for each individual to recover the predictive distribution. We then leverage a t-test-based criterion upon the sampling and select informative unlabeled target samples based on the p-value, which encodes both prediction variability and cross-category ambiguity. Experiments on both ADA and Source-Free ADA settings show that our method provides more calibrated predictions than previous ADA methods and achieves favorable performance on three domain adaptation datasets.

Diffusion-Based Probabilistic Uncertainty Estimation for Active Domain Adaptation
Zhekai Du, Jingjing Li'
School of Computer Science and Engineering University Electronic Science and Technology of China zhekaid@std. uestc. edu. cn, 1ijin117@yeah. net
cn,
Abstract
Active Domain Adaptation (ADA) has emerged as an attractive technique for assisting domain adaptation by actively annotating small subset of target samples. Most ADA methods focus on measuring the target representativeness beyond traditional active learning criteria to handle the domain shift problem, while leaving the uncertainty estimation to be performed by an uncalibrated deterministic model. In this work, we introduce probabilistic framework that captures both data- level and prediction-level uncertainties beyond point estimate. Specifically, we use variational inference approximate the joint posterior distribution of latent representation and model prediction. The variational objective of labeled data can be formulated by variational autoencoder and a latent diffusion classifier, and the objective of unlabeled data can be implemented in a knowledge distillation framework. We utilize adversarial learning to ensure an invariant latent space. The resulting diffusion classifier enables efficient sampling of all possible predictions for each individual to recover the predictive distribution. We then leverage t-test- based criterion upon the sampling and select informative unlabeled target samples based on the p-value, which encodes both prediction variability and cross-category ambiguity. Experiments on both ADA and Source-Free ADA settings show that our method provides more calibrated predictions than previous ADA methods and achieves favorable performance three domain adaptation datasets.
Introduction
Machine learning algorithms heavily depend on large amounts of labeled data. However, in many real-world scenarios, the distribution of data can change over time or across different domains, which challenges the training of models to perform consistently in all situations. Unsupervised Domain Adaptation (UDA) 1 2 addresses this problem by transferring knowledge learned from labeled source domain to an unlabeled target domain. Despite impressive achievements, UDA struggles to bridge the performance gap with fully supervised methods due to the lack of target-supervised information. Recognizing this limitation, promising alternative is Active Domain Adaptation (ADA) 4 6, which actively annotates small subset of target data to greatly benefit the UDA model.
In ADA, the primary concern revolves around designing a criterion for selecting the most informative target samples that can have the maximum impact on performance once annotated. Existing ADA methods have been mainly enlightened by traditional Active Learning (AL) methods 7 8 9 [0] and rely on criteria that consider both predictive uncertainty and representativeness of the entire distribution. While they have shown empirical success, they usually handle the distribution shift by further measuring the representativeness of the target domain through various criteria (e.g., the output of domain discriminator [1, free energy score [5], weighted clustering 4 However, these
Corresponding Author.
37th Conference on Neural Information Processing Systems (NcurIPS 2023).

---

methods still estimate uncertainty based on metrics like confidence [1], distinctive margin [6], and entropy 4. obtained from a deterministic model. It is worth noting that distribution shift can easily lead to overconfident predictions for deep models [3], especially deterministic ones [14] 15), which results in poorly calibrated point estimates and unreliable uncertainty estimation in ADA.
In this work, we aim to accurately estimate the posterior distribution of the target variable y given the input æ for target domain samples (i.e., [x), by modeling the uncertainty both data generation and model prediction processes. To achieve this, we utilize diffusion-basee
generative models to explore the implicit predictive distribution beyond a point estimate for each target domain sample. Specifically, we harness the capabilities of diffusion models for classification [19], which involve forward and reverse diffusion chains to generate predictions from the conditional predictive distribution, without any assumptions on the parametric form of p p(y(æ)) Notably, another work 20 also tackles the miscalibration issue in ADA by considering the model prediction as a distribution on the probability simplex and introducing a Dirichlet prior over predictive distributions. However, such constrained parametric form might not be effective if the prior distribution fails to accurately capture the predictive uncertainty [19]. Additionally, their approach only focuses on modeling the probability distribution in the model prediction space, neglecting the inherent uncertainty present in the data representation from a generative perspective.
[6 17 18
To approximate the posterior distribution of both latent data representation and model prediction, we use variational inference by optimizing the evidence lower bound (ELBO) corresponding to the log-likelihood of all data points. Concretely, we show that for labeled data, the training objective can be formulated by Variational Autoencoder (VAE) [21] and a ieffuusioo-based classifier [9 in the latent space. For unlabeled data, they can also be effective utilized by optimizing the ELBO, which can be implemented in a knowledge distillation framework. With the formulation, we establish a two-stage training procedure where we first learn a guided classifier for mean estimate and then train a diffusion probabilistic model guided by that for predictive distribution recovery. To ensure shared latent embedding that can be used to solve tasks for both labeled and unlabeled data, we incorporate adversarial learning I1 [22] resulting in Diffusion-based Adversarial Probabilistic Model (DAPM). With a collection of predictions generated by DAPM for each unlabeled target sample, we conduct t-test 23 between scores of the two most predicted classes and select the most informative samples based on the p-value, which generally takes into account the sampling scale, prediction variability and the cross-category ambiguity estimate the prediction uncertainty for active annotation.
Our contributions: 1) We formulate ADA in a probabilistic framework for uncertainty estimate, which leverages the abilities of VAE and liffusion-based classification models to capture distributions of both data and prediction. 2) We conduct a two-stage training procedure and use adversarial learning to ensure an invariant latent space. A t-test-based criterion is utilized to estimate informativeness from nultiple aspects. 3) We show that our method can naturally handle active learning for both UDA and Fource-Free DA (SFDA). Experiments three datasets show the effectiveness of our method.
2 Related Work
Active Learning 24
aims to tap the fully supervised performance by only annotating a small subset of training data. The selection of informative samples can be made using variety of
25
criteria. Committee- bassed methods (26 27 28 29
leverage diverse classifiers and evaluate the data
informativeness based on their disagreement. Representativeness-baae methods (30 31 aim to select samples that are diverse or representative enough of the entire training distribution, typically through methods resort to various uncertainty
clustering 322 or core-set selection 33 Uncertainty-
heuristies such as entropy [34], confidence [35], and best-vs-sccond--eet score (36). etc, to select the most uncertain instances. However, these AL methods will fail when there is distribution shift between labeled and unlabeled data, limiting their applications in domain adaptation.
Active Domain Adaptation. A series of ADA works have been conducted to select the most informa- tive target samples under domain shift. As an early work, AADA (37 applies a domain diseriminator to evaluate the domainness of target samples and weights it with entropy-based uncertainty. TQS [II] designs a transferrable query criterion based on a classifier committee and a domain discriminator to handle domain shift. CLUE 4 performs an mntroyy-weighee clustering to select both uncertain and diverse samples. SDM G uses a distinctive margin loss for training and selects data lying in the margin. EADA [5] leverages the free-energy bias and uses energy-basee criterion to evaluate

---

the uncertainty and domainness of target samples. Despite the empirical success, these methods mainly focus on compensating for the domain gap by incorporating target-rppresentativeesss into the query function. However, the uncertainty criteria they used are still based on point estimate from a deterministic model, which can be easily miscalibrated for out-of-disrribution data [38]. To remedy this issue, DUC (20) places Dirichlet prior on the class probability and evaluates the predictive uncertainty with a probabilistic view. However, they only consider the uncertainty in model outputs. Besides, the true predictive distribution may not be captured by such a restricted distribution form.
Diffusion-based generative models have been widely appreciated for their impressive capabilities of generating high quality and diverse samples [17, 16 39 I8]. While most works focus on high- dimensional generative tasks such as (conditional) image generation [39 [6], super-resolution
40 4T) image inpainting [42 43), etc.. some attempts have been made to apply diffusion models to categorical data [44 and discrete data [5). indicating their potential in classification tasks.
Recently, Han et al. [99 utilize diffusion models to recover predictive distributions in regression and classification tasks, verifying their effectiveness for uncertainty estimation. Different from [19] that focuses in-distribution scenarios, we consider a more challenging and realistic scenario of capturing predictive distribution in a cross-domain fashion. In addition, we also model the underlying variation of the data in oowdiieesioonll latent space, which can be viewed as data-level uncertainty and more favorable for downstream tasks compared to original image space [46].
3 Methodology
In ADA, we have a source domain S = { (f) with n, labeled samples, and a target domain T = {(]{))] [i with ne unlabeled samples, where 2 (xx) is the input instance, and y, E y is the corresponding label. It is assumed that both domains share a common label space y but conform to different data distributions. Domain adaptation aims to train a model fa : X' + ) parameterized by Ω that achieves good predictive performance on the target domain. To achieve this goal, the problem of ADA involves selecting a small subset of informative samples Ti T for annotation with budget B. where B & ny, such that the model performance on the target domain can be maximally improved. The selection process is typically completed in multiple rounds, where
each round, the model queries b samples from Tu (the remaining unlabeled samples in ') and adds them to Tr. This process repeated until the budget exhausted. In this work, we examine active learning for both UDA and source-free UDA (47). where, besides using unlabeled target data, we can utilize the raw source data and a source-trained model, respectively, for the purposes of selection and adaptation.
3.1 Preliminary of Classification Diffusion Models for Uncertainty Estimation
In AL., a major concern in sample selection is predictive uncertainty. For a K-way classification problem, given an input variable æ, the predictive uncertainty be expressed as the posterior distribution over the predicted variable y I after observing the training set D, i.e., p(y x, D). Most AL methods merely pay attention to accuracy and adopt a non-Bayesian approach to train the model, e.g., Maximum Likelihood Estimation (MLE) or Maximum A Posteriori (MAP). As frequentist techniques, they are not capable of inferring the variance of predictive distribution p(y x), but merely provide a mean estimate Ely æ) under the assumption of additive noise [1]]. Taking a Bayesian view, the predictive uncertainty can be modeled by assuming distributions over network parameters [48 [4], while it involves expensive computation and intractable posterior inference. Some alternative methods include modeling the output of neural network as a probability distribution over possible outcomes [50] 5 or adding the noise term in the model outputs [51). As explicit modeling methods, they all assume specific form in p(y x:) (e.g., Gaussian or Dirichlet distribution).
In this work, we leverage the deep generative models to model the implicit predictive distribution. Specifically, we start with the classification diffusion models [1). Re-denoted by yo E R the one-hot label, the diffusion model first applies a forward diffusion process ( yoo x) to original data by iteratively perturbing it to latent representations y1.r with Gaussian noises. For each step 4,
q (ve 3) x) = N yii /1 B.y (1 V1- 1/111/ B. fn(x),
(I)
where & E (0. 1) is the noise variance and fixed as hyperparameter. Here the model output fa(æ= (mean estimate) injected in the forward process to act as the prior knowledge about the relationship
We use bold font to denote probability vector: y [y1...., WK].
3

---

between a and you so that with a sufficiently large T and proper schedule { we have
p (yr x) ' (fa(æ),
Note that the specific form of the forward diffusion process enables an efficient sampling for arbitrary steps in a closed form:
(y: yo: x) = N (y65 varyo - (1- vāz) [n((:), (+.) ())
with a := 1 - 3, and a₂ := II 0gg- An appreciable feature of diffusion models is that if we know the posterior distribution ( 34,,)), x), we can sample yr ~ N(f((z), I) and run the reverse diffusion process gradually recover the original data from p(yo æ) under the guidance of fa(x). Unfortunately, (()-1 yz, x) is actually intractable, and a feasible alternative is to use a model Po(U:-11 yt, æ) for approximation, which can be trained with the following ELBO:
T
Po (3orT
log pa (yo x>) 2 E Egin v m))
log 9 (y1.T
Cd CELBO yo) = Co +
Σ 1=2
C--1 + LT,
3o: x)]
(4)
Co == E, - log (yo v1.
(5)
f-- = B, DRL (g (Ve-1 ye yo x) lipe (y yr, x)]]
(6)
LT = E2 DKL (g (UT yo: m) (UT x)]],
(7)
where DRr. is the Kullback-Leibler (KL) divergence. It is worth noting that scheduling small 3, will make (y:-1 y/: Vo. 2:) still a Gaussian (52), which can be explicitly formulated using Bayes theorem. Therefore f can be evaluated in closed form. Lr contains no optimizable parameter and is assumed to be sufficiently small and thus can be ignored. By adopting the appropriate form of (3 yr, æ) and reparameterization like DDPM [17), the model can be trained effectively by being tasked at predicting the forward noise for sampling yt, with Eg (æ, Yo, fn(w), t).
3.2 Diffusion-Based Adversarial Probabilistic Model for ADA
The above conditional diffusion model admits the sampling of multiple predictions from p(y x, D) for statistical analysis. However, assumes that the evaluated sample æ and the training set DD comes from the same distribution, which is not the case in UDA. Aware of this, we aim to build model that induces common latent space 2, where the source and target samples share the same representations. We first consider the following generative process defined with the joint probability distributions (We omit the subscript i to represent arbitrary data point in the dataset);
p (yr.r: xx, 2²) p=²)) (2²)pp (x= ==²) (v6r 2²,x""
(8)
p (3O.T x² x')
(z') p (x" x²') (3ó.r 2² x²).
(9)
where ==") E 2 is the latent representation. To model the inference process of ==²²", we employ a shared encoder parameterized by p for both the source and target domains, supposing domain- shared embedding. And we use two separate decoders with parameters & and vh for the source and target reconstructions, respectively, since the generative process requires domain-specifie information encoded in the parameter. Due to intractable posterior distributions, we then aim to learn latent variables for both domains using variational inference, with the following variational objectives:
Objective for Labeled Source Samples. For a labeled source sample (z"))))) our goal is to learn both the dimeensiion embedding x" and latent class variable vi.r- which can be achieved by maximizing the ELBO of the marginal log-likelihood as follows:
log p (æ:", vo) log / p p0=", Vo.r," z²) dy'.d
E B (vt w6n log (VO.T, x0, x*" a (Vi.r 22 xx",, 200
E (x* 1a
[log (x= xz*]]= - DKL (go (x* 1 vi) [lp(2))) ))+ +
(10)
VAE
Do (yoer 2²)
E Egengg (>* (ella-u))) E B (
= LEELBO
(yL.r Vo. x*)
C (x"

---

Eq. (TO) implies a standard VAE and a classification diffusion model in the latent space. We provide the detailed derivation in Appendix A.I. To ensure discriminative classification boundaries in Z, we additionally incorporate a deterministic classifier with parameter w in the training objective. Then the overall objective for the labeled source data can be expressed as:
L. LELOO + Ei
(aa))))))ssB =5) (x= [-)) log =²)]]
(11)
It is worth noting that the parameters of fn have been further decomposed into {o, w) in our case.
Objective for Labeled Target Samples. For target samples with annotation, we treat them the same as labeled data in training. The only difference is that we use parameter eb for target-specific reconstruction. Limited by space, we give the full expression of the training loss Cj in Appendix A.2.
Objective for Unlabeled Target Samples. The training objective for unlabeled target samples can not be carried out in supervised fashion due to the absence of ground-truth labels. Therefore, design the following variational lower bound for them by treating y and x' as latent variables:
log (z') log / (x', yo: x") dyjddz
2 E (((6,=)(00)) [log p ( yo: x²)
(v) 2² ax))
(z plog (xx" x²)] - DKL (90(2") x") x')ll((z))
(12)
Eg Bg aag (tee) [DLLl |x (1) x0)] == C CELBO
ExD
Intuitively, it encourages to optimize a standard VAE and minimize the KL divergence between 9996 æ²) and the approximation Pa =²). However, the ground-truth q(vó x²) is agnostic in practice. In this work, we implement it in a Knowledge Distillation (KD) framework 53) where 4916 æ²) is substituted with the output of a teacher model for that is optimized by exponential moving average (EMA) from the weights of student model fg. We denote the KD loss as LKD and weight it by Ayd to absorb the influence of wrong predictions from the teacher model. And only those with confident predictions (larger than a pre-defined threshold a) from the teacher model will be involved in this term. Mcanwhile, we hope that the predictions of target samples to be individually confident and holistically diverse, which results in the following loss function:
1
1
o7 -C' Au [DRI,EEwtTT By at (16 =²)]l
EmthT, Byg (att (pm. (vú) x²)||
K I]]
K
CxL
(13)
where AgI is the weighting coefficient. The derivation of Eq. can be found in Appendix A.3.
Adversarial Learning between Labeled and Unlabeled data. The distribution shift between labeled and unlabeled data is key obstacle active learning. To extend the applicability of the diffusion model trained on labeled data to unlabeled ones, we apply a discriminator D, parameterized by 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:
E Cadv (S (z(o) log [D, (Po 2), - Ezng, (m) log [1 D, (pw 2)) x)]
This minimax process trained an end-to-end mode using the gradient reversal layer [.
3.3 Two-Stage Training Procedure
The whole model in our framework includes an encoder p. two decoders Φ, v/, a discriminator T, a deterministic classifier and a diffusion-based classifier 6. As shown in Section 3.1 the diffusion model requires the i.i.d. assumption to hold and injects the mean estimate fa(œ) into both forward and reverse diffusion process. Therefore, we schedule two-stage training procedure in each active round. Specifically, the first stage is called the adaptation stage, which yields the following objective:
max min L. + C + c) Ladu. p.o.e..c
(14)
5

---

Adaptation Stage
Diffassoon Stage
Selection Stage
Siaace Docoda:
Enoabe
Deterirnnts Clanttien
Vy
DAIPM
1,00 KD
Billeaas Clesine (.66).
I-lest
Tupeh
proalom
Teadher Medel
Add
Aunotation
Sart
Dorzen Disciiittter
labele (lebeld tarqe)
bapet
the
prediction deternletatic dlasitter
diffedion clasitter
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 fox is updated by EMA from the student model fn-
Figure 1: Framework of DAPM. Each active learning round goes through three stages:
The first stage ensures well- well-behaved mean estimator fa and domain-invariant latent embedding. We then freeze all the trained parameters and train the diffusion model (z, yo fa(x), () in the second stage, namely the diffusion stage, with all labeled data:
min L. + C.. 0
(15)
Having the diffusion model, we select target samples according to the strategy in Section 3.4 if there a remaining budget. We depict the whole framework for ADA in Fig.
Extension to Source-Free ADA (SFADA). We naturally extend our method to SFADA 447 based on the fact that the model fa {p, in the adaptation stage be initialized (like in ADA) source pre-trained. For the latter, we pre-train the source model with L., and disable the source-related losses, i.e., Lg and Ludt in the adaptation stage. Besides, pseudo-labeled by the teacher model to substitute the source samples in Lg in the diffusion stage. The detailed procedure of the training process be found in Appendix. B.
confident unlabeled target data
3.4 T-test-Based Selection Strategy
Existing ADA methods generally select both characteristic can be naturally absorbed within the adaptation stage, which makes our model operate in a Noomain-agnostee latent space. Therefore, we mainly focus on selecting samples with high predictive uncertainties. For each x. ~ Tu we generate N predictions independently with the diffusion classifier, denoted by (0% 1n=1- Since the raw predictions can be arbitrary real vectors, we then convert them into the probability simplex by softmax operation following [19], resulting in a set (7% 1.V Based on that, we identify the two most predicted classes among votes for each instance, which gathers two groups of predicted scores 9i = {W", [a] J and Ø2 {7,[b] []], where a, denote two most voted class labels. We assume independent generation each dimension and evaluate the uncertainty by conducting an independent two-sample t-test, where the t-value is:
and uncertain samples. The former
92 S
8 N
+
t =
(16)
S f1
here 91 (or ÿ2) and (f s²) 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 weweeveersssseuueeee -est (BvSB) [66] used in deterministic model- bbsed AL methods, the b-teet criterion can not only allow us to see two means are different, but also tell us how significant the differences As result, we 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. practice, we choose unlabeled target samples with top-6 p-values for annotation in each active selection round.
Experiments
4.1 Experimental Setup
Datasets and Baselines. We evaluate our method on three widely used domain adaptation bench- marks, i.c., 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
Office311
Synthetic
Roal
A
A
W
W
D)
Avg
Source-Dnly
ResNet
X8
44.7 + 0.1
81.5
75.0
63.1
95.2
65.7
99.4
80.0
78.6
87.1
BvSB 16
81.3 4: 0.4
89.8
$7.9
78.2
99.0
78.6
100.0
88.
Active Leamiing
Eatropy 2
82.7 0.3
91.0
89.2
76.1
99.7
77.7
100.0
88.
CorcSel
BADGE
84.3 12 0.3
90.8
$9.1
79.8
99.5
79.6
100.0
89.8
AADA
37
80.8 0.4
89.2
$7.3
78.2
99.5
78.7
100.0
88.8
TQS
83.1
92.8
100.0
100.0
Active DA
CLUB
85.2 -: 0.4
92.0
87.3
79.0
59.2
79.6
99.
89.5
EADA
5
88.3 0.1
97.7
96.5
$2.1
100.0
82.8
100.0
93.2
DDCC
95.8
96.4
99.6
100.0
DAPM (Hascline)
8018 +: 0.7
94.3
93.5
72.1
97.6
72.3
99.3
88.2
DAPM-TT
89.1 2: 0.1
96.8
98.6
$2.3
99.8
83.3
100.0
93.5
ELLT
17
83.5 4:
98.0
97.2
81.2
99.4
80.7
100.0
92.8
DAPM (Bascline)
73.4 d: 0.2
93.7
92.9
72.2
98.1
72.6
99.
88.
Random
86.2
94.4
99.6
90.8
SPADA
BvSB 36
88.1 0.2
96.7
96.5
81.1
99.0
81.5
100.0
92.5
9 Entropy
87.5 1: 0.3
96.3
95.6
$0.3
98.8
80.5
100.0
91.9
+ CoreSet
33
87.3
94,7
96.5
97.9
79.9
100.0
91.5
BADGE
87.9 0.3
96.5
97.1
79.3
98.5
80.1
99.8
91.9
DAPM-TT
88.4 1 0.3
96.8
96.4
83.5
99.7
81.7
100.0
93.0
runs, respectively, according to the official code. { For SFADA, we implement several active learning methods upon our STDA haseline and report the mean results over 3 runs.
For DUC and ELPT, report results Office-11 and VisDA based
for comparison. (i) Active learning: Random, Entropy 77 BvSB 36]. CoreSet [33 BADGE 557
(ii) Active Domain Adaptation: AADA (37], TQS I1] CLUE 4. EADA S. DUC 20 (iii)
Source-Free ADA: ELPT [47], and our SFDA baseline with other AL selection methods: Random
(DAPM-RD), BySB (DAPM-BS)) 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 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 two-layer MLP. Following previous works 20], we schedule selection rounds, where in each round, the model selects = 1% x n4 samples for annotation, and therefore the total budget rate is set as 0,01 except for the VisDA dataset in SFADA, where we use 0,001 for training. The batch size 32 for ADA and 64 for SFADA. We adopt the same learning rate scheduler as [22] M. For hyperparametens, we use Aut = 0, Aud 0.1 for ADA and du = 1.0. AEd 1.0 for SFADA. For all tasks, the confidence threshold a for knowledge distillation 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 altttps://iithub com
5% X nl. We use SGD optimizer the adaptation stage. The learning
woc.coooomo-- TLL WESTC/ /DPM
Evaluation Protocol. There are two classifiers involved in our method, i.e., a deterministic classifier parameterized by and a diffusion classifier parameterized by 8. For evaluating target sample x' encoded by z", we leverage the predictions generated from the diffusion classifier by calculating the expected class probability based on N independent votes, i.c., (3 x²) &े2 Σn= Tr. We show in Sec. 4.3 that pyy 2²") provides a more calibrated prediction than the output of the deterministic classifier p.. (yy 2²') On the other hand, we use the majority vote as the final predicted class.
4.2 Main Results
Active Domain Adaptation. We present our results on Office-31 and VisDA in Table [ No- tably, 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 portion of the target domain is already well-aligned with the source domain, and selecting these easy samples would not provide informative feedback 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
Pptps://wwwmmindsoon
7

---

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 I
Caigery
Sume--Dal
Rodeei
40.1
66.3
71.3
$5.7
59.0
62.6
$1.9
31.9
31.2
68.2
42.6
76.5
58.3
Randen
53.5
76.3
71.4
55.1
69.7
66.9
17.7
10.9
75.8
76.0
54.6
61.5
05.8
B:5B 20
56.3
78.5
79.3
5S.1
74.0
70.0
59.5
52.5
77.2
11.2
56.4
$4.5
68.2
Adier Lorning
Fymoyy bd
76.1
12.6
63.4
63.6
68.0
RADGE
AADI, E
56.6
76L1
75.0
$9.5
13.7
71.0
60.1
53.1
77.0
70.6
57.0
$4.5
68.3
TO98 [1]
58.6
$1.1
81.5
63:1
76.1
75.%
61.33
14.7
79.1
15.6
53.
86.
70.5
Adtie
CLUE
EADA&
38.8
79.3
90.9
65.5
77.5
76.7
65.3
$7.9
$1.4
75.6
56.3
72.5
BAPM (Boseline)
76.4
61.2
53.5
58.5
DAIM-TT
64.2
95:4
85.7
$4.2
65.5
69.1
63.4
$6.0
77.2
68.4
B8.6
77.1
66.3
$4.1
$4.9
73.9
$4.4
K2.8
69.
63.1
$6.1
16.2
65.6
M0.1
11.0
DAIM (Banclin))
90.6
77.8
63.6
49.9
519
69.3
Rasdon
82.3
50.6
60.5
55.6
SPADA
Enerpy
59.2
92.1
94.2
$2.0
60.2
66.1
58.7
$4.1
55.7
63.3
67.6
94.3
ConeSen 13
61.2
83.5
85.0
70.7
$2.5
82.6
08.9
60.3
13.5
76.3
633
M6.
75.4
BADGE
13
60.2
$3.9
$4.9
71.5
$3.7
81.6
69.1
59.5
$5.1
75.9
60.8
85.3
25.6
DAPM--T
61.4
31.4
71.4
84.1
7000
63.3
77.4
60.85
19.1
77.3
17.00 7733
13
05 206
(a) BCE of the target data Office-Home. (b) Performance under different N Office-Home.
Figure 2: (a) Visualization of Expected Calibration Error (ECE) for ADA on task Ar -> CI and CI -
Ar. (b) Performance under different choices of N on Effice-Home for ADA and SFADA.
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 220 our method still achieves better performance, boosting the accuracy by 1.0% on Office-31 and achieving a slightly better performance on VisDA, showing superiority of our probablistic framework. The results in Table 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, 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 TT with other AL strategies using our SFDA baseline, where we conduct the adaptation stage and adopt some representative AI strategies based on the deterministic classifier. The results in Table and Table 2 show that DAPM-TT consistently achieves the best performance on all datasets. partieular, we find that BvSB [3. 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 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 Ablation Study). This confirms the well-known phenomenon that softmax classifiers based on point estimates tend to make overconfident predictions (60), which can unsafe when dealing with uncertain estimation. Our DAPM aims to recover the full predictive distribution by modeling the uncertainty in both data
8

---

AGA
SRADA
Sycoddoo aell FiM2O0
54.3
015
4000+
8
CADA
D2"
33
(a) Accuracies under different budgets on VisDA. (b) Parameter sensitivity analysis on task D - A.
Figure 3: (a) Accuracy curves as budget goes from 0% to 20%. (b) Model performance varying with parameters ARt Akd E {0.01, 0.1, 0.2, 0.5, 1.0] on task D - A (Office-31).
Table 3: Comparasion between different selection strategies for ADA (5% budget on Office-31).
Detenninisic Classifier
Diffusion Classifie
Method
DAPM-RD
DAPM-BS
DAPM-ET
DAPM-CS
DAPM-BG
DAPM-VT
DAPM
DAPM-AE
DAPM-TT
Accuracy (9)
V2.2
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 Fig. 2b Our results demonstrate that the model performance initially improves 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. 3al 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 begining, 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 [ and 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 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 [66] that is based on the deterministic classifier. It can be observed that By$B 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 (Ar-CI))
(b) DAPM-TT (Ar-CI)
(c) BvSB (Rw
(d) DAPM-TT (Rw+Pr))
Figure Visualization of latent representations using I-SNE 6 on task Ar-CII b) and Rw-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.
Our DAMP-TT, on the other hand, can select samples from both the regions where there is ambiguity between classes and the regions where large number of samples are misclassified, which are exaclty the ones we want to select for annotation.
How Does T-test-based Selection Ensure Diversity? While our method mainly focuses uncer- tainty estimation, we show that 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 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 method. The results are summarized in Table 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 demonstrating the superiority of our selection method. Lastly, all the loss functions have positive effect on the final result.
any loss function for domain adaptation,
Hyperparameter Sensitivity. As shown in Fig. sitivity to both Ag and Akd in ADA, and moderate sensitivity to Agt in SFADA. We conjecture the reason is that the source- available scenario involves more loss terms in the training objective, the additional source do- main data and distribution alignment objectives like Lado may make the optimization landscape more complex and susceptible to suboptimal solutions based on weighting hyperparameters. In contrast, in SFADA, the model solely relies on the target data and regularization losses like LKL for alignment, reducing dependence on precise weighting. As SFADA lacks source- supervised information, we recommend using slightly larger 'ya ensure good adaptation performance.
3b
model exhibits low sen-
Table 4: Ablation study of DAPM-TT Office-31 and VisDA. Dif. and Det. are short for diffusion classifier and deterministic classifier, respectively.
Classifier
Loss
Office-31
VisDA-2017
Dif. Det. LKD Ciu Las
JADA SFADA|ADA
SEADA
99.44
90.8
86.3
86.7
91.0
86.5
86.5
1
192.2
91.9
87.1
87.6
/
92.9
87.7
/
93.0
93.0
88.5
88.4
d
d
93.0
93.1
88.3
88.2
93.5
89.1
/
93.4
88.9
5 Conclusion
In this work, we propose a novel probabilistic framework for ADA that leverages the variability of both latent data representation and model prediction for better uncertainty estimation. Our approach combines a variational autoencoder, diffusion probabilistic classifier, and an auxiliary deterministic classifier to guide training and ensure an invariant latent space. Our experiments on three domain adaptation benchmarks demonstrate the effectiveness of our approach improving task performance and effectively handling uncertainty estimation for both ADA and SFADA.
10

---

Acknowledgments
This work was supported in part by the National Natural Science Foundation of China under Grant 62173066, 62250061 and 62176042, and in part by Sichuan Science and Technology Program under Grant 2023NSFSCC483, and part Sponsored by CAAl-Huawei MindSpore Open Fund.
References
[1] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In ICML, pages 1180-1189. PMLR, 2015.
[2] Zhekai Du, Jingjing Li, Hongzu Su, Lei Zhu, and Ke Lu. Cross-domain gradient discrepancy minimization for unsupervised domain adaptation. In CVPR, pages 3937-3946, 2021.
[3] Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In CVPR, pages 3723-3732, 2018.
[4] Viraj Prabhu, Arjun Chandrasckaran, Kate Saenko, and Judy Hoffman. Active domain adaptation via clustering eetertaintt-weighhie embeddings. ICCV, pages 8505-8514, 2021.
[5] Binhui Xie, Longhui Yuan, Shuang Li, Chi Harold Liu, Xinjing Cheng, and Guoren Wang. Active learning for domain adaptation: An energy-based approach. In AAAI, volume 36, pages 9708-8716, 2022.
[6] Ming Xie, Yuxi Li, Yabiao Wang, Zekun Luo, Zhenye Gan, Zhongyi Sun, Mingmin Chi, Chengjie Wang, and Pei Wang. Learning distinctive margin toward active domain adaptation. In CVPR. pages
2022.
[7] Dan Wang and Yi Shang. A new active labeling method for deep learning. In I/CNN, pages 112-119. IEEE, 2014.
[8] Yazhou Yang and Marco Loog. Active learning using uncertainty information. In ICPR, pages 2646-24 2651. IEEE, 2016.
[9] Zhenyu Lu and Josh Bongard. Exploiting multiple classifier types with active learning. In GECCO, pages 1905-1906, 2009.
[10] Sheng-Jun Huang, Rong Jin, and Zhi-Hua Zhou. Active learning by querying informative and representative examples. In NeurIPS, 2010.
[11] Bo Fu, Zhangjie Cao, Jianmin Wang, and Mingsheng Long. Transferable query selection for active domain adaptation. In CVPR, pages 7272-7281, 2021.
[12] Avishek Saha, Piyush Rai, Hal Daumé, Suresh Venkatasubrramanian and Scott I. DuVall. Active supervised domain adaptation. In ECML-PKDD, pages 97-112. Springer, 2011.
[13] Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In CVPR, pages 427-436, 2015.
[14] Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, David Sculley, Sehastian Nowozin, Joshua Dillon, Balaji Lakshminarayanan, and Jasper Snoek. Can you trust your model's uncertainty? evaluating predictive uncertainty under dataset shift. In NeurIPS, 2019.
[15] Deng-Bao Bao Wang, Lei Feng. and Min-Ling Zhang. Rethinking calibration of deep neural networks: Do not be afraid of overconfidence. In NeurlPS, pages 11809-11820, 2021.
[16] Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis. In NeurlPS, pages 8780-8794, 2021.
[17] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In NeurlPS, pages 6840 6851, 2020.
[18] Alex Nichol, Prafulla Dhariwal, Aditya Ramesh, Pranav Shyam, Pamela Mishkin, Bob McGrew, Ilya Sutskever, and Mark Chen. Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint 112 2021.
11

---

[19] Xizewen Han, Huangjie Zheng, and Mingyuan Zhou. Card: Classification and regression diffusion models. In NeurIPS, pages 18100-18115, 2022.
[20] Mixue Xie, Shuang Li, Rui Zhang, and Chi Harold Liu. Dirichlet-based uncertainty calibration for active domain adaptation. In ICLR, 2023.
[21] Yunchen Pu, Zhe Gan, Ricardo Henao, Xin Yuan, Chunyuan Li, Andrew Stevens, and Lawrence Carin. Variational autoencoder for deep learning of images, labels and captions. In NeurIPS, pages 2360-2368, 2016.
[22] Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I Jordan. Conditional adversarial domain adaptation. In NeurIPS, pages 1640-1650, 2018.
[23] Henry Hsu and Peter A Lachenbruch. Paired t test. Wiley StatsRef: statistics reference online, 2014.
[24] Burr Settles. Active learning literature survey. 2009.
[25] David A Cohn, Zoubin Ghahramani, and Michael I Jordan. Active learning with statistical models. JAIR, 4: 1:12 1996.
[26] Sebastian Seung, Manfred Opper, and Haim Sompolinsky. Query by committee. In COLT workshop, pages 287-294, 1992.
[27] Yoav Freund, H Sebastian Seung, Eli Shamir, and Naftali Tishby. Selective sampling using the query by committee algorithm. Machine learning, 28(2-3):133, 1997.
[28] Ido Dagan and Sean P Engelson. Committee-based sampling for training probabilistic classifiers. In Machine Learning Proceedings 1995, pages 150-157. Elsevier, 1995.
[29] Melanie Ducoffe and Frederic Precioso. Qbde: query by dropout committee for training deep supervised architecture. arXiv preprint 15t::::5510..4111 2015.
[30] Zhao Xu, Kai Yu, Volker Tresp, Xiaowei Xu, and Jizhi Wang. Representative sampling for text classification using support vector machines. ECIR, pages 393-407. Springer, 2003.
[31] Sanjoy Dasgupta and Daniel Hsu. Hierarchical sampling for active learning. In ICMI., pages 208-215, 2008.
[32] Fedor Zhdanov. Diverse mini-batch active learning. arXiv preprint 19X1v: 2019.
[33] Ozan Sener and Silvio Savarese. Active learning for convolutional neural networks: core-set approach. arXiv preprint
2017.
[34] Xin Li and Yuhong Guo. Adaptive active learning for image classification. In CVPR, pages 859-866, 2013.
[35] Keze Wang, Dongyu Zhang, Ya Ruimao Zhang, and I Liang Lin. Cost-effective active learning for deep image classification. TCSVT, 27(12):5511-6600 2016.
[36] Ajay Joshi, Fatih Porikli, and Nikolaos Papanikolopoulos. Multi-class active learning for image classification. In CVPR, pages 2372-2379, IEEE, 2009.
[37] Jong-Chyi Su, Yi-Hsuan Tsai, Kihyuk Sohn, Buyu Liu, Subhransu Maji, and Manmohan Chandraker. Active adversarial domain adaptation. WACV, pages 739-748, 2020.
[38] Jeremiah Liu, Zi Lin, Shreyas Padhy, Dustin Tran, Tania Bedrax Weiss, and Balaji Lakshmi- narayanan. Simple and principled uncertainty estimation with deterministic deep learning via distance awareness. In NewrIPS, pages 7498-7512, 2020.
[39] Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High- resolution image synthesis with latent diffusion models. In CVPR, pages 10684-10695, 2022.
[40] Chitwan Saharia, Jonathan Ho, William Chan, Tim Salimans, David Fleet, and Mohammad Norouzi. Image super-resolution via iterative refinement. TPAMI, 2022.
12

---

[41] Max Daniels, Tyler Maunu, and Paul Hand. Score-based generative neural networks for large-scale optimal transport. In NeurlPS, pages 12955-12965, 2021.
[42] Patrick Esser, Robin Rombach, Andreas Blattmann, and Bjorn Ommer. Imagebart: Bidirectional context with multinomial diffusion for autoregressive image synthesis. In NeurIPS, pages 3518- 3532, 2021.
[43] Andreas Lugmayr, Martin Danelljan, Andres Romero, Fisher Yu, Radu Timofte, and Luc Van Gool. Repaint: Inpainting using denoising diffusion probabilistic models. In CVPR, pages 1 11461-1147] 1471, 2022.
[44] Emiel Hoogeboom, Didrik Nielsen, Priyank Jaini, Patrick Forré, and Max Welling. Argmax flows and multinomial diffusion: Learning categorical distributions. In NeurlPS, pages 12454-
12465, 2021.
[45] Jacob Austin, Daniel D Johnson, Jonathan Ho, Daniel Tarlow, and Rianne van den Berg. Structured denoising diffusion models in discrete state-spaces. In NewrlPS, pages 17981-17993, 2021.
[46] Manuel CarrasCa Guillermo Cabrera- Vives, Pavlos Protopapas, Nicolas Astorga, and Marouan Belhaj. Adversarial variational domain adaptation. CoRR, abs/1909. 1651, 2019.
[47] Xinyao Li, Zhekai Du, Jingjing Li, Lei Zhu, and Ke Lu. Source-free active domain adaptation via energy-based -barey locality preserving transfer. In MM, pages 5802-5810, 2022.
[48] Charles Blundell, Julien Coreeiise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural network. In ICMI., pages 1613-1622, PMLR, 2015.
[49] José Miguel Hernández-Lobe and Ryan Adams. Probabilistic backpropagation for scalable learning of bayesian neural networks. In ICML, pages 1861-1869. PMLR, 2015.
[50] Murat Sensoy, Lance Kaplan, and Melih Kandemir. Evidential deep learning to quantify classification uncertainty. In NeurIPS, 2018.
[51] Alex Kendall and Yarin Gal. What uncertainties do we need in bayesian deep learning for computer vision? In NeurlPS, 2017.
[52] William Feller. On the theory of stochastic processes, with particular reference to applications. In Selected Papers I, pages 769-798. Springer, 2015.
[53] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv: 2015550030252,,111 2015.
[54] Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In ECCV, pages 213-226. Springer, 2010.
[55] Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan.
Deep hashing network for unsupervised domain adaptation. In CVPR, pages 5018-5027, 2017.
[56] Xingchao Peng, Ben Usman, Neela Kaushik, Judy Hoffman, Dequan Wang, and Kate Saenko. Visda: The visual domain adaptation challenge. arXiv preprint arXiv:1710.0694, 2017.
[57] Jordan T Ash, Chicheng Zhang, Akshay Krishnamurthy, John Langford, and Alekh Agar- wal. Deep batch active learning by diverse, uncertain gradient lower bounds. arXiv preprint 1rXiv:1906.03677 2019.
[58] Kaiming He, Xiangyu Zhang, Shaoging Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016.
[59] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248-255, Icee, 2009.
[60] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In ICML, pages 1321-1330. PMLR, 2017.
13

---

[61] Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. JMLR, 9(11), 2008.
[62] Kuniaki Saito, Donghyun Kim, Stan Sclaroff, Trevor Darrell, and Kate Saenko. Semi-supervised domain adaptation via minimax entropy. In ICCV, pages 8050-8058, 2019.
[63] Durk P Kingma, Tim Salimans, and Max Welling. Variational dropout and the local reparame- terization trick. In NewrIPS, 2015.
[64] Yarin Gal and Zoubin Ghahramani. Dropout bayesian approximation: Representing model uncertainty in deep learning. In ICMI,, pages 1050-1059. PMLR, 2016.
[65] Audun Jsang. Subjective Logic: A formalism for reasoning under uncertainty. Springer Publishing Company, Incorporated, 2018.
[66] Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In NeurIPS, 2017.
[67] Shiwei Liu, Tianlong Chen, Zahra Atashgahi, Xiaohan Chen, Ghada Sokar, Elena Mocanu, Mykola Pechenizkiy, Zhangyang Wang, and Decebal Constantin Mocanu. Deep ensembling with overhead for either training or testing: The all-round blessings of dynamic sparsity. arXiv preprint arXiv:2 14568, 2021.
14

---

Appendix Contents
A. Derivations
B. Algorithm
C. More Implementation Details
D. Additional Experimental Results
E. Further Discussion
Limitations and Broader Impacts
A
Derivations
A.1 Derivation of the Labeled Source Objective
Given labeled source sample (ar", vg), goal is inference the latent data representation 2 and a sequence of latent class representations yi.r- which controls the generation process of data points and predictions, respectively. The fog-likelihood of the labeled source data can thus be expressed by:
log (ax, v9) log / (x", Vo.T 2²) dyf.ddz.
(17)
Since Eq. 177) is intractable to compute in practice, we then leverage variational inference to approximate the posterior distribution of unknown variables (z" Virr) and solve by optimizing the following ELBO:
log I p(a" Vo.T z²) dyl- dry' 2 E Bo
p (Vo.r x², 2²)
log
(18)
q (Vi.T: |00 MB)
where q(=", Virr w", 90) is the approximation of the ground-truth joint posterior p(=", Vi.r æ", )g), which can be further factorized as:
q(=", Vi. ve",y63 (0(2" x", (o)((v(r yoo 2², x²,x").
(19)
With Eq. 19) and the generative process assumed in Eq.
8 we have the following derivation:
log p (x", vi) log / p(a", Vū.r. x²) dyírd
log p (yo x. 2²)2
2 E ( (())
(Vi.T. 2" x=, vo)
log p(2 Po (xr 2² p' (y6.r ax,,"" 20)
(vi.. #1 (mn (M))
(= (2 x=, Vo) Bo. 2², x")
p(2*)
+ log 2x") + loog Po (yo.r ,=,,"" 20)
(oii (mnn m
log 4o (2 (2 Yo: .))
( yd 2", ,=,x² xx))
log go (2
p(z*)
+ log |29)
Vh. x)))
log Pe (yO.T xx, x²)
E (vi (16)
q(vi.r yd: 2", x0*)
E (==
log (x [2"]] - DKL (gp (2" (2%%%)) [p((z)))
+
(yOrT x²,2")
E E (x" 26))
q (vvrr V6: 2", 20%)
(20)
In O. the forward diffusion process y (virr x=" z", vo) and the reverse diffusion process po (y6rr ax, 2*) are still based on the original input s." this work, we make a simplifica- tion design to assume that the observed class variable yi and latent ones vi. only conditioned
15

---

on the latent variable z². We demonstrate the reasonabilityy of this simplification in Appendix A.3 Consequently, have
Po (y0.7 x²)) (Vi.r
① = E yyi l=* .66)
(21)
yo: =*)
which has the same form of ELBO as the diffusion classifier in Eq.
A.2 Expression of the Labeled Target Objective
For the labeled target data (a' :6). the unknown latent variables are the same as the labeled source data, and therefore the ELBO analogous that of the labeled source data. The only difference that we use the target-specific decoder (xx" 2²). We give the full expression follows:
logp (x', .96) = log f p (x., Vo.T z²) dy'-dd=
log p (yhrr, xx 2()
(vir of w()))))
9 (Bie xt x', v9)
log p( pio (xx 20 po (2b.r x', 21)
E (vi 4 in m8)
(= 2 x., vo)a You x", x²)
log un (=( vo + +logp (x0 2²) ) + log Po (yb.T x0 x²)
p(zt)
(viira w wb)
g(vi.r yh 2 axt)
pl=²)
+ log |z0)
log (p(2² yh, xt)
(= (a
log Po (Uhrr xx 20)2))
E ( le
q(vi.r Vo: xt, xe,xx))
log pal (zx" =²)] DEL (4p (2" (,, (Ix(2'))
de <=<"">>>"
pa (ytrr xt)
E to0 o(
LIP.ARO
(vi.r v x
(22)
Analogously, we additionally impose the classifier pa (yó source and target labeled data. The final training objective C/ for labeled target data is therefore:
xx ) in the latent space to jointly train the
C = CCELBO + Bgg(( log pa: (vó 1=))]
(23)
A.3 Derivation of the Unlabeled Target Objective
For the unlabeled target data x'. our goal inference the low-dinensional latent embedding z' that induces donain-invariant latent space Z and the class label y based on z Besides, we assume meanfield distribution on g(2", yá x²), which can then be factorized as:
q(z", wo x²) g(2" | (9()) xx)).
(24)
16

---

Therefore, we optimize the following ELBO by regarding z" and vó as unknowns:
logp (xx) log f p p(a', 36. dy
log (ar vo: =²) q (yó= 2t xt)) log p(=))(( (
E (16,2t/aat)
1z 1z (vó x 2²)
go (z'
xx)) 1 (y) xx))
p(2")
log Pu x x²,21)
log 9p(2* xx1)
+ Po 12a)
q(bó x²)
(25)
= -Eg (et) [log pv p (xe"
|2¹)] DrL (go(z') x (1))((((") +
[log Pu x², x²))
Bg qo (x ( (xbllr))
q(vó x²)
E (o (aot) P (x0
|x']] DE (gp(2" x (lp(())
E ( DKL(a(v6
x" ll) (vb x" 2!) CELBO
Since our deterministic classifier encodes the dovariate-dependeee between yó and z', therefore, vó depended on x, in our formulation, i.e., Pa (yó x x²) = P =²). @ demonstrates that, to maximize LELBO Dx (g(5) x. llp hand, we empirically find that (v6 x²) can be good approximation of q x²) even when is solely based on latent z'. Therefore, we assume that the model output y is only depended on the
2²) = 0 should always be satisfied. On the other
latent embedding z", which supports the derivation in Eq. 20
B Algorithm
B.1 Algorithm of DAPM-TT for Conventional Active Domain Adaptation
The overall trianing and section procedure of DAPM-TT for ADA summarized in Algorithm D
Algorithm Pseudo code of DAPM-TT for ADA
Require:
Labeled source dataset S, whole target dataset unlabeled target dataset Tu labeled target dataset T,, total training rounds R, total annotation budget B, per round annotation budget b, step number per adaptation stage Na. step number per diffusion stage Na.
Ensure: Optimal model parameters {0, p, o, 1h, W,W,T).
1: Initialize student model parameters {p, w) and other parameters {0, o, 1. T.T = =0.
2: Initialize teacher model parameters 22 [p,w]
3: for / = to R do
4: for 1 to No do
5: Update parameters {p, Φ. u/, w, 7 via optimizing Eq. 14
% Adaptation Stage
6: Update teacher model parameters 2' with updated {p, w based on EMA.
7:
end for
8:
for j= to N₂ do
9:
Update diffusion classifier parameters 0 via optimizing Eq. end for
15
% Diffusion Stage
11:
if < T then
12:
For each x' Tu. generate N predictions {Ø,, J==1 % Selection Stage
13:
Identify the two most predicted classes a, b for each x². Conduct t-test between (77 [a]] N and (j² [ -= and obtain the p-value for each æ! Selected + Select samples with top-b p-values from T.. 16: Tr, = Selected, Ti Ti U Selected.
14:
15:
17: end if
18:
end for
19:
return Final model parameters (0,p, d, vh, T..
17

---

B.2 Algorithm of DAPM-TT for Source-Free Active Domain Adaptation
In SFADA, We do not use the domain classifier since the source domain data and target domain data cannot co-exist. In addition, we also use confident unlabeled target samples that are pseudo-labeled by the teacher model to substitute the source-labeled samples in Lg in the diffusion stage. We denote the corresponding training loss by C.
The overall trianing and section procedure of DAPM-TT for SFADA summarized in Algorithm
Algorithm 2 Pseudo code of DAPM-TT for SFADA
Require: Labeled source dataset S for pre-training, whole target dataset T, unlabeled target dataset Tu. labeled target dataset Ti, total training rounds R, total annotation budget B, per round annotation budget b, step number per adaptation stage Na. step number per diffusion stage Na. step number of source pre-training N,.
Ensure: Optimal model parameters {8, p. Ø, sbw)).
1: Initialize model parameters {p, and other parameters (0,0, v)
B, T =T
2: for i = 1 to Ng do
3: Update source model parameters p. o, via optimizing L..
% Source Pre-training
4: end for
5: Initialize teacher model parameters D' {p,w}
6: for = to do
7: for j = to Na do
8: Update parameters {p, vi, w/ via optimizing Ct + Ct. % Adaptation Stage
9: Update teacher model parameters O' with updated (p,w) based on EMA. end for
10:
for 1 Na do
12:
Update diffusion classifier parameters 0 via optimizing 23 + C. end for
% Diffusion Stage
14:
it S then
15:
For each x' E Tu, generate N predictions (7) [n Identify the two most predicted classes a, b each x². Conduct t-test between {3% [a]]-W> and {Ø7 [6]] m and obtain the p-value for each x² Selected + Select samples with top-ó p-values from T.. T, = Tv Selected, Ti Ti Selected.
% Selection Stage
17:
18:
19:
20:
end if
21:
end for
22:
return Final model parameters p.,p. o, shw. w).
C More Implementation Details
C.1 Network Architecture
Variational Autoencoder The architecture of the VAE and the deterministic classifier is presented in detail in Fig. The encoder comprises pre-trained ResNet-50 backbone and three initialized linear layers with a ReI.U activation following the first linear layer. We assume a Gaussian distribution for the latent embedding, and its mean and covariance are estimated by two separate linear layers based on the first linear layer. The decoder is a two-layer MLP that has the same output dimension as the backbone's 's output. This encourages the decoder reconstruct the feature generated by the backbone.
Deterministic Classifier The deterministic is simply a single layer linear classifier. We adopt the weight normalization technique the classifier to stablize the training.
Diffusion Classifier The diffusion classifier is conditioned on the latent embedding z, the ground- truth y, the guided information fn and the time step l. We adopt the same architecture as [19 for class variable diffusion, except for the dimension of the input variable. For clarity, we describe the detailed model structure in Fig. o (a).
18

---

D Deooder Φ (P) Liver
Encoder
236
512
2048
Linor
KN
ReLU
Backbone
inpriimteristton Z
Ree.U
Classifier O Lineer
256 Softilus
Figure 5: Architecture of the variational autoencoder and the deterministic classifier used this work. The numbers the data flow indicate the dimensions of the model output.
Liner
Letee
Liner
Lisee
Liaee
230
50.
338
Settfies
Lione
Clossnox
26
Enbediing
139
ST Eettrrrrrrr
Hulaner
Spxxi
(a) Diffusion Classifier
(b) Discriminator
Figure 6: Architecture (a) the diffusion classifier and (b) the domain discriminator.
Domain Discriminator. As shown in Fig. 6 (b). The domain discriminator we used is a three-layer MLP with a Dropout layer after the first and the second layers. And the output is one-dimensional value with Sigmoid activation, which indicates the domainness of the sample.
C.2 Training Details
Conventional Active Domain Adaptation. In the adaptation stage, we utilize the SGD optimizer with a learning rate of 0.01, momentum of 0.9, and weight decay of 0.001. We set the EMA rate for the teacher model to 0.99. In the VAE objective, we assume standard Gaussian distribution, ((O, I), for the prior distribution of the latent variable z =2²²). For Office-31 and VisDA, we use the features generated by pre-trained ResNet-50 and freeze the backbone parameters accelerate training and conserve memory. However, for Office-Home, which has more diverse categories, we jointly train the backbone with other modules to learn more specific category knowledge, and we set the learning rate to 0.001, which is 10 times lower than that other models. For Office-31 1 and Office-Homee we conduct adaptation for 5 epochs and train the diffusion classifier for 10 epochs in each training round. The total number of training rounds 20. For VisDA, we set the epoch number in each stage to and the total number of training rounds is 10. To train the diffusion classifier, use the Adam optimizer with a learning rate of 0.001 and epsilon 1e-8. The batch size is the same that in the adaptation stage, and parameters. All experiments are conducted on a single RTX 3090 GPU.
EMA strategy with rate of 0.9999 update the model
Source-Free Active Domain Adaptation. In SFADA, we use the SGD optimizer without momentum and weight decay for adaptation. The learning rate is set to 0.01 Office-31 and Office-Home, and 0.001 for VisDA. As with ADA, freeze the backbone for Office-31 and VisDA and open it for
19

---

pre-train Office-Home. We pre train the source model for 10 epochs for VisDA and 30 epochs for the other datasets. In each active learning round, we set the epoch numbers for the adaptation stage and the diffusion stage to 5 and 10, respectively, for Office-31 and Office-Home, and both to one for VisDA. The training details for the VAF, teacher model, and diffusion classifier are the same as in ADA.
C.3 Hyperparameter Choices the Diffusion Classifier
the hyperparameters of the diffusion classifier are set standard DDPM [7 manner. Specifically, the number of diffusion timesteps T is set to 1000, and a linear noise schedule with 31 0.0001 and 0.02 adopted for the forward diffusion process.
Following 19
C.4 Implementation of Compared Baseline Methods
Note that for conventional ADA, we cite the results of previous AL methods and ADA methods reproduced in [5] if the experimental settings are the same. For DUC (20) that does not report the result on Office-31 dataset, we report the resuls by our own based the code from the official gigggitt..b.... com/BIT-Dei DETT-DD We have tuned some hyperparameters to ensure
repository at littps: / the best resuls we can achieve.
For SFADA, we implement compared baseline algorithms on our DAPM baseline with following details:
Random. We abondon the use of any selection strategy and randomly select samples from the unlabeled target dataset Tv for annotation.
BySB. We compute the best-versus-seconee -ecddd--eooddsstt score based the output of the deterministic classifier for each unlabeled sample and select samples with the lowest scores for annotation.
Entropy. We use the conditional entropy based on the output of the deterministic classifier to measure the prediction confidence. And samples with highest entropy values are selected for annotation.
CoreSet. We regard the sample selection in each round as core-set cover problem and solve it with the code at /tttts::/ggiieiie com/ ozamseeerractirr___eemmiai
BADGE. We obtain the gradient vectors based on the pseudo labels generated by the deterministic classifier and utilize K-Means++ the gradient vectors for diverse sampling. The algorithm is implemented based on the repository at http:////gituub..oooooododd
badge
ELPT. We cite the resuls on Office-31 and Office-Home dataset from the original paper [47]. For
VisDA, we run this method and report the resuls on ResNet-50 backbone based on the official code at https://gitae thtbbb..tttutt./.// com TL- UESTC/ELPT
D Additional Experimental Results
D.1 Accuracies Confident Predictions under Different Thresholds
Fig. illustrates the accuracies of the teacher model's predictions for confident samples across different threshold settings. At each training step, the teacher model is updated with the student model, and we have computed the accuracy of the current batch and presented it as curve. As expected, increasing the threshold leads to an increase in the teacher model's accuracy. However, when the threshold relatively high, only small number of samples are considered confident at the beginning, leading to higher accuracy initially and a subsequent drop. It is worth noting that the teacher model provided relatively reliable predictions at a threshold value of 0.9. Raising the threshold further would result in too few confident samples, making 0.9 more appropriate choice.
20

---

Synthetic -> Real (ADA)
Synthetic -> Real (SFADA)
90
80-
Accuracy (%)
Accuracy (%)
80-
60-
60-
50
100
300
s00
rãc
13.00
1300
1500
100
300
sãc
1:00
sãc
1100
1500
1500
Step
Step
ADA
(b) SFADA
Figure 7: Accuracies of confident predictions made by the teacher model under different threshold values on VisDA dataset.
D.2 Prediction Visualization Different Classifiers
To investigate the contrasting behaviors of deterministic and diffusive classifiers, we randomly select two samples on task Ar - Cl, and visualize the predictions made by the deterministic classifier and the diffusion classifier (N 100). As shown in Fig. 8aa the deterministic classifier exhibits high confidence in predicting re, frigerator as mag. This verifies the overconfident issue in traditional softmax-basee deterministic model, making it challenging for the active learning methods detect the егrог and select such hard samples. In contrast, the diffusion classifier produces an uncertain prediction, indicating confusion its output with p- p-value of 0.873. As depicted in Fig. [8b] the deterministic classifier displays high uncertainty and misclassified the sample, whereas the diffusion classifier correctly classifies the sample with a p-value 0.024, which saves budget and resources that would have been wasted on correcting the misclassification.
p-value: 0.873
0.4
0.3
0.2
0.1
0.0
(a) Refrigerator
21

---

p-value: 0.024
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.0
(b) Drill
Figure 8: Visualization of predictions made by different classifiers for 2 randomly picked samples from re and drill, respectively. Red histograms represent the prediction of the determin- istic classifier and green boxes denote the predictions of the diffusion classifier.
D.3 Effect of the Modeling of the Latent Feature Distribution
In comparison CARD 19 which utilizes deterministic feature extraction network and diffusion classifier to evaluate uncertainty based on the original image, our method employs an additional VAE to model data uncertainty in www-iieesioonl latent space, and the diffusion classifier is based on latent variables. To investigate the benefits of this improvement for ADA tasks, we implement CARD in the ADA task and report the results of it Office-31 and VisDA. Specifically, deterministic ResNet-50 network as the feature extractor and train a deterministic classifier on top of guide the diffusion classifier. The diffusion classifier takes the original image æ as one of the inputs and uses the same independent two-sample t-test-ban based criterion for sample selection. We denote this implementation by CARD-TT. As shown in Table 5) DAPM-TT significantly outperforms CARD-TT on both datasets. It is exciting to see that although VAE is mainly designed for modeling the uncertainty of the data generation process, it results in a significant improvement with respect to accuracy. We conjecture that the reason for this improvement is two-fold: firstly, domain shift leads significant distribution shift the image space, and such case, CARD fails to work intended 19. This effect is mitigated to certain extent in the cow-dimensional and less noisy latent space. Secondly, VAE training, we use the same prior distribution, i.e., the standard Gaussian distribution, for the latent variables of data in both the source and target domains. This design draws the samples in both domains closer to the standard Gaussian distribution, thereby achieving an indirect distribution alignment.
D.4 Qualitative Analysis Selected Samples
We present in Fig. 9 a list of all the selected samples by our approach to gain insight into which samples are chosen. Intuitively, our method tends select samples that are challenging for the model, such as those with complex backgrounds or different styles from the other images in the dataset. Labeling these samples can help reduce the ambiguity the model and enable to better capture the semantic aspects of the category. Interestingly, we observe that our approach naturally selects a diverse range of sample classes, even though we did not explicitly impose diversity constraint. Furthermore, observe that the p- p-values of the selected samples gradually decrease with each
22

---

Table 5: Comparasion between probablistic and deterministic feature extractors, and between different t-test strategies on ADA task (ResNet-50). w/o and w/ are short for without and with. respectively.
Office- Home
VisDA
Category
Method
A-+
A-
D-+A
D-W
W-+A
W-D
Avg
Synthetic- Real
CARD-TT DAPM-TT
95.1
94.2
78.5
98.7
78.2
99.1
90.6
84.6
w/o aduptaion stage
96.1
95.9
79.5
79.2
91.4
86.3
DAPM-TT
96.8
97.8
83.3
99.8
81.7
100
93.2
88.6
w/ aduptaion stage
DAPM-TT
96.8
98.6
82.3
83.3
93.5
89.1
Table 6: Accuracy (%) of DAPM-TT combined with semi-supervised domain adaptation techniques on Office-Home with 5% annotation budget (ResNet-50).
Method
AC-CI
Ar-Pr
Al-RR
Cl-Ar
CI-Pr
C1-Rw
Pr-sAr
Pr-CC
Pr-RR
Rw-AAr
Rw-+CI
Rw-+Pr
Avg
DAPM-TT CDAN)
83.
69.1
86.0
DAPM-TT TT MIME
65.1
35.5 34.9
72.5
84.6
83.7
724
647
86.3
77.9
70.3
83.8
78.1
training round, and by the 5th round, the lowest p-value is 0.518. This indicates that selecting approximately 5% of the samples sufficient to mitigate much of the ambiguity in the model.
D.5 Comparison between Different T-test Strategies
Based on the scores of the two most probable classes predicted by the diffusion classifier, we can either paired two-sample t-test independent two-sample t-test for selection, which correspond to different assumptions for the generation of predictions. The former assumes that the scores of different classes are generated in pairs, while the latter assumes that they are generated independently. For a paired t-test, the t-value of a target sample x" is calculated as follows:
(26) where d= v dd is the mean of sample differences d; [a] V bb. pda is the difference of the null hypothesis (usually set as 0), and 88 = v (d, ( d)2/N is the standard deviation of the sample difference.
t= (d (sa/(sa//N))
We denote our method with paired based criterion by DAPM-TT** and report the resuls on Office-31 I and VisDA in Table 5 Empirically, find that independent two-sample t-test yields superior performance on both datasets. We conjecture the reason might be that the independent two- sample t-test considers the internal variance of each group of samples. Therefore, when evaluating uncertainty, it considers an additional dimension compared to the paired t-test. this work, we adopt independent two-sample t-test for all experiments.
D.6 Combine with other Semi-Supervised UDA methods
worth noting that our formulation provides certain flexibility for the implementation of the training objectives, which showcases the modular nature of the framework. For instance, we use teacher-student framework to implement the second term in Eq. (12) and adopt conditional adversarial learning as the main adaptation technique, which may limit the baseline DA performance and then affect the performance after active learning. For ADA, he DA component and AL component can be decoupled. We have tried to incorporate a SSDA method MME 662 to implement the adaptation stage, which is also practiced by previous ADA works, e.g.. [I] 4 Specifically, the adversarial learning loss (i.e.. Ludo) is replaced by the minimax entropy loss, and other losses remains unchanged. The results on Office-Home dataset can be found in Table G which shows the SSDA component further boosts the performance of our method.
D.7 Benefits of Data-level Uncertainty
We conducted additional experiments ablating the VAE component, which can simply implemented by replacing the variational encoder with a deterministic feature encoder. Through experiments, we found that the performance on VisDA-2017 is worse than modeling both the data- and prediction-layer uncertainty, as shown in Table
23

---

Table Comparison between the performance of DAPM-TT w/ and w/o data-level uncertainty on VisDA-2017 dataset with 5% annotation budget (Resnet-50),
Method
Synthetic -> Real
DAPM-TT (w/ VAE)
89.1
DAPM-TT (w/o VAE)
88.3
E
Further Discussion
Related Uncertainty Estimation Works. In machine learning, there are primarily two kinds of uncertainties that are studied, i.e., epistemic uncertainty which arises due to a lack of knowledge or data and can be reduced with more data or improved models, and aleatoric uncertainty that stems from the inherent randomness in the data [51]. To model these uncertainties, the community has proposed many Bayesian deep learning methods. From a Bayesian perspective, these two uncertainties can be modeled by the posterior of model parameters W and outputs y. respectively, using the following formulation:
( x,
( 2 W)
P(W
dW.
(27)
aleatoric uncertainty epistemiic uncertainty
The family of Bayesian neural networks (BNNs) 48 49 63
is specifically designed capture epistemic uncertainty by assuming probability distribution over the network parameters. This involves estimating the posterior distribution over the parameters of the neural network given the observed data. However, due to the intractable form of the posterior, BNNs are often trained using appropriate approximations like Markov Chain Monte Carlo (MCMC) or Variational Inference (VI). Another approximation for BNNs is Monte Carlo Dropout [64, which assumes Bernoulli distribution over network parameters. During inference, the output of the network averaged over multiple stochastic forward passes with dropout enabled, resulting in a distribution over the predictions.
Evidential deep learning (EDL) (50 20 is another method that models uncertainty associated with the output of the model based on evidential theory. EDL, this is typically achieved by using a distributional output based on the theory of Subjective Logic [5], such as a Dirichlet distribution over class probabilities for classification tasks, instead of a point estimate.
For non- non-Bayesian methods, ensemble- based methods 666 67 have been proposed to model predictive uncertainty by combining multiple deterministic neural networks with different initializations. How- ever, all these methods are designed to capture either epistemic uncertainty or aleatoric uncertainty alone by modeling probability distributions over the model parameters and outputs, respectively. Moreover, they still impose a restricted form of distributions, such as Gaussian or Dirichlet, which limits their applicability in practice.
To capture both sources of uncertainties a single model, Kendall et al. [51] propose modeling aleatoric uncertainty in the model outputs beyond model parameters by predicting the noise term for the output variable of each sample as part of the model output. However, the form the noise is still assumed to be Gaussian.
Recently, Han 19] proposed modeling the implicit output distribution by leveraging the generative capability of the diffusion model. However, they only model aleatoric uncertainty in their formulation since the model they use is still a deterministic neural network, and the proposed method, CARD, only enables in in-distribution generalization.
In addition modeling aleatoric uncertainty with the diffusion classifier, we also incorporate VAE to model the underlying data generation process. The VAE learns probabilistic distribution over the latent space, which represents the model's uncertainty about the true underlying distribution of the data, given the limited amount of training data. As more data is provided during training, the learned distribution should converge to the true underlying distribution, reducing epistemic uncertainty. Therefore, our DAPM also offers a way to measure epistemic uncertainty. Furthermore, our diffusion classifier is conditioned on the latent variables in rather than the ones in the original image space X. We argue that the latent space contains less noise and is more suitable for cross-domain tasks.
24

---

The choice of Diffusion-based model for probabilistic modeling. Diffusion models have been shown to be equivalent to reversing stochastic differential equations (SDEs). Running the reverse process along the SDE trajectory to recover the original data distribution provides principled way to recover the data distribution. Besides, compared to other generative models that complete generation in single step, the multi-step noise schedule smooths the posterior and improves the exploration of the probability space, which will also result in more stable training and generation. In addition, the forward-reverse diffusion process allows effective modeling of high-dimensional complex dis- tributions without parametric assumptions. Actually, the correlation between the covariates and the prediction variable is assumed to be high-dimensional and complex as well. Therefore, regard diffusion models as a better choice to model the underlying predictive distribution.
Limitations and Broader Impacts
Limitations. Our work presents way recover the predictive distribution of deep models by combining the power of diffusion models and variational autoencoders. However, like any research, our study may have some limitations that should be acknowledged. Firstly, the task we focus on is limited to image classification in this work. In our future study. we may extend the scope of research other areas like image segmentation and object detection, etc. Secondly, probabilistic models are often more difficult to interpret compared to deterministic models. is important to study insights in future research help interpret probabilistic models.
Broader Impacts. Indeed, the impact of active domain adaptation significant, especially in scenarios where labeled data scarce in the target domain. The ability adapt new domains with limited labeled data can potentially reduce the time and cost required to gather labeled data for each specific task, thus making the deployment of machine learning models more accessible and cost- effective. This can also facilitate the development of more robust and generalizable machine learning models that can used across multiple domains, which is particularly important for applications that operate in dynamic and diverse environments. Overall, our work contributes to advancing the field of machine learning and promoting the development of more efficient and adaptive technologies.
25

---

(a) Round
(b) Round
righe
Spentrr P
Prapppp
ORTAL
Tetggnner 8.11
VE VERAOO
(c) Round
81
(d) Round 4
26

---

Tele
FOR SRIT
(a) Round
Figure 9: All selected samples task CI Ar (ADA). For samples in each round, the priority (p-value) gradually decreases from top left to bottom right.
27


Reviews:
[{"review_id": "hDGarWK943", "reviewer": "Reviewer_3siL", "summary": "This paper concerns Active Domain Adaption leveraging a diffusion-based adversarial probabilistic model with T-statistics for uncertainty quantification. The paper combines many existing ideas such as variational auto-encoder, diffusion model, knowledge distillation, and T-statistics. Then it proposes a new framework to improve domain adaptation performance with active learning. It shows extensive experiments with superior performances compared to various benchmark methods.", "questions": "1. The paper shows a good combination of many existing methods. Because the framework also leverages the knowledge-distillation step, I wondered if the framework can be generalized to a common domain adaptation scenario WITHOUT active learning. If the framework works well without active learning, i.e., producing pseudo-labels, I think the proposed combination would be more valuable. Otherwise, we may still conclude that most of the contribution to performance improvement might come from the active learning step, even if it shows a better performance.\n2. Figure 3-(b) for the parameter sensitivity shows that ADA is highly sensitive (non-convex or non-monotone) to the choice of parameters. This implies that the combined loss might conflict with each other when the source data is available. This result somewhat surprises me because more information makes the proposed framework more unstable. Could the authors reasonably explain the root of instability under a source-available scenario ADA?\n3. Because it uses a diffusion classifier, I wondered how the computational cost would differ from other methods. Similar, cheaper, or expensive?\n4. In active learning, diversified selection is critical. I was wondering how p-value with T-statistics acquisition can mitigate the redundant selections. For example, I imagine produced T-statistics would be very similar if two images are similar (or the same), even if it's with a diffusion classifier. Then how can we avoid the redundant selection, or how can we get a diversified selection? ", "limitations": "The authors provided the source code in the supplementary material, but I didn't have a chance to look at the details yet.", "rating": 5, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. The paper shows a good combination of existing methods and proposes a novel framework of active domain adaptation.\n2. The conducted experiments are pretty extensive and provide useful information as much as possible. It shows superior performance compared to other existing methods.\n\nSo I value the contribution of 1) proposing a new framework to combine many ideas, 2) extensive experiments.", "weaknesses": "The proposed framework involves many existing ideas, so combining them is somewhat complex from another perspective. I have a generic question if this combination is ideal. I also have some concerns about the sensitivity of parameters, computational costs, and active learning. Please see Questions for more details.\n\nMinor Comments:\n- Algorithm 1 in Appendix (L44-45): Eq. (??) is missing", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Dear Reviewer 3siL:\n\nThank you very much for your detailed comments and insightful questions. We provide point-to-point responses and answers below.\n```\nQ1: Generalization to common domain adaptation scenarios.\n```\nResponse: Thanks for the comment. It is natural to employ our method to common DA scenarios by simply disabling the selection stage, i.e., only performing the adaptation stage and the diffusion stage, as shown in Fig. 1. We provide the results of our method without active learning for common UDA in Table R1 and R2. The domain adaptation baselines for SFDA have been reported in Table 1 and 2 in the manuscript.\n\nIn this case, we just aim to inference target labels in a variational Bayesian way by maximizing the ELBOs of all data points, resulting in a variational DA framework. Although the results are somewhat moderate compared to modern methods that are specifically designed for UDA, it shows that our method brings obvious improvements in the common UDA setting when compared with the baseline CDAN [22] (since we adopt conditional adversarial learning as the main adaptation technique), showing the availability of our method for common DA. In addition, it is worth noting that our framework provides flexibility for implementation. The domain adaptation baseline performance largely depends on the specific implementation for the training objectives. In this work, we leverage the knowledge-distillation to implement the second term in Eq. (12) and adopt conditional adversarial learning as the main adaptation technique, which can be improved by more elaborated pseudo labeling and adaptation techniques, as suggested by Reviewer Grmw (weakness 1). Please refer to Common Response 3 if it would be helpful.\n\nIn addition, we would like to clarify that in ADA, we study how to select informative unlabeled samples for annotation and harness these labeled samples to maximally boost the domain adaptation performance. Pursuing high DA performance without active learning is a little beyond the scope of ADA research. Our probabilistic framework is primarily designed to model uncertainty and is not tasked at accuracy as deterministic methods. The large performance gains from the active learning step exactly illustrate the strength of our designed selection criterion in domain adaptation scenarios.\n```\nQ2: Why the model is more unstable under a source-available scenario ADA.\n```\nResponse: Thanks for recognizing this point. We analyze some potential reasons for the non-convex or non-monotone surface of the model performance under the ADA setting as follows.\n\nFirstly, the source-available scenario involves more loss terms in the training objective, the additional source domain data and distribution alignment objectives like L_adv may make the optimization landscape more complex and susceptible to suboptimal solutions based on weighting hyperparameters. In contrast, in SFADA, the model solely relies on the target data and regularization losses like L_KL for alignment, reducing dependence on precise weighting.\n\nSecondly, the source data distribution itself introduces additional variability that must be accounted for, causing instability if hyperparameters are not set appropriately. In contrast, SFADA focuses more narrowly on adapting to target, with less emphasis on retaining source discriminability.\n\nNevertheless, we think the instability does not invalidate ADA, but highlights the importance of proper hyperparameter tuning.\n```\nQ3: Computational complexity of the proposed method.\n```\nResponse: Thanks for the comment. We have re-run our method to evaluate its computational complexity. Since other reviewers have also raised concerns about computational complexity, please refer to the Common Response 2 for more details.\n```\nQ4: How to mitigate the redundant selections with the t-test-based criterion.\n```\nResponse: Thanks for the comment. While our current approach mainly focuses on uncertainty estimation, we would like to emphasize that it has properties that help mitigate redundant selections to some extent. 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 visualization experiments (Appendix D.4 and D.6), we observe that our approach naturally selects a diverse range of sample classes, even though we did not explicitly impose a diversity constraint.\n\nThanks again for raising this point. We will look to further improve diversity in the future by incorporating explicit similarity-based metrics. But we believe the current approach already promotes diversity to a certain degree by design. We will discuss this in the limitations of the work in the revised Appendix.\n```\nMinor comments about the missing equation number.\n```\nResponse: Thanks for pointing out. The missing numbers in Algorithm 1 are 15 and 16. We have checked the Appendix carefully and supplemented all missing numbers in the revised version."}, {"review_id": "91cWXlwnI3", "reviewer": "Reviewer_fVMQ", "summary": "Authors propose a new model for active domain adaptation. They train a VAE with domain-invariant latents (using adversarial alignment) and a supervised+teacher/student classifier head on top of learned embeddings to obtain point estimates of class probabilities, and then train a denoising diffusion model on predicted class labels to more accurately predict uncertainty of predictions. More specifically, for each unlabeled target sample, authors use denoising diffusion to sample from the distribution of predicted softmax vectors, then compute t-test statistic for the null hypothesis that two most likely output classes have equal probabilities, and label examples that fail to reject this hypothesis the most. Authors evaluate this (and an analogous source-free algorithm) on VisDA and Office-Home and show that in most cases their method achieves best performance (except Active DA on Office-Home where it archives 2nd best) and is calibrated better then the runner up (DUC). Authors evaluate the effect of the number of diffusion samples, the annotation budget, they propose and check several alternative deterministic and diffusion-based selection criteria, hyperparameter sensitivity, and effect of different VAE losses (e.g. adversarial alignment).", "questions": "1. Diffusion sampling might be time-consuming. How does the runtime/training time compares to other methods? Or at least the deterministic backbone? (+10%? 2x? 10x?)\n\n2. Why is DUC not shown in Figure 3a?\n\n3. I wanted to ask, given how thin margins are in Table 3, and given that “your” best deterministic strategy seems to beat most of SotA deterministic baselines, whether improvement should be attributed mostly to the proposed “diffusion uncertainty estimation” or a more powerful backbone. But then I realized that I cannot find number 93.5 from Table 3 in other tables. Where can I find corresponding baseline performances?\n\n4. On ADA method beats competing methods in low-data regime, but on SFADA it does not - any thoughts on why this is the case?\n\n5. It might be possible to obtain nonparametric estimates of entropy from sampled predictions.\n\n", "limitations": "Authors did not explicitly address limitations and societal impact in the main paper.\n\n", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "The paper is well-written, technically sound, does a good job explaining the method, and the performance is good. I had several questions and ablation in mind while reading the paper, and most of them were addressed in the experiment section. The evaluation is thorough.\n\n", "weaknesses": "The method uses every trick from the book to beat state of the art (eg student/teacher training, etc.), and combined with the proposed novel approach (diffusion-based selection criterion), it indeed achieves a small improvement over sota. I appreciate that authors provide this detailed ablation, but it reveals that the novel component provides only ~1pp improvement over a very strong “deterministic backbone method”.\n\nI understand that authors attempted to squeeze as much content as possible into the paper, but currently the paper is at times difficult to read because the table / figure margins are so thin.\n\nIn several places authors use a(b) to mean \"a (or b)\" which is usually clear from context but might be confusing for some readers. \n\nWhy in Figure 1 both green (labeled source) and pink (all labeled) go to \\tau? Isn't green included in pink?\n\nAlso, see questions below.\n\n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Dear Reviewer fVMQ,\n\nThank you very much for your feedback and questions. We provide our responses below.\n```\nWeakness 1: Marginal improvements over a very strong deterministic backbone method.\n```\nThanks for recognizing this. While the gain may seem marginal, we believe formulating ADA in a probabilistic manner is an important direction to pursue. The results validate its benefits, and this also provides a strong basis for further extensions accounting for other kinds of uncertainties on this probabilistic framework. In addition, we believe that a 1pp gain over strong baselines is a reasonably good improvement in domain adaptation tasks where margins are often slim.\n```\nWeakness 2: Table/figure margins are so thin.\n```\nThanks for the comment. We will go through the paper and adjust the formatting to ensure tables/figures have adequate spacing and margins around them. We may have to consolidate or move some secondary tables/figures to the Appendix if needed.\n```\nWeakness 3: Using a(b) to mean \"a (or b)\".\n```\nThanks for pointing out. We have fixed this issue.\n```\nWeakness 4: Why in Figure 1 both green and pink go to \\tau?\n```\nThanks for recognizing this issue. The green flow should be replaced by a purple flow, because the adversarial learning is conducted between labeled and unlabeled data. We have corrected it.\n```\nQ1: Computational Complexity of the method.\n```\nThanks for the question. We have conducted experiments to evaluate the computational complexity of our method as well as other methods. Since other reviewers also raise this concern, we provide the results in the Common Response 2. Please refer to it for details.\n```\nQ2: Why is DUC not shown in Figure 3a?\n```\nThank you for catching this point. We did try to reproduce the DUC results to include them in the figure, however we were unable to replicate the accuracy reported in the original paper using their provided code. Since we could not reliably reproduce their results, we decided not to include the DUC accuracy curve to avoid any incorrect presentation. Nevertheless, we are happy to provide those results for reference in the attached pdf file in the Common Response. Please refer to it if it would be helpful.\n```\nQ3: The baseline domain adaptation performance.\n```\nThanks for catching this omission. We provide the baseline domain adaptation performance (i.e., DAPM without active learning) in Table R1 and Table R2 in the Common Response. It shows that without active selection and learning, our DAPM only achieves a moderate DA 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.\n```\nQ4: Why SFADA does not beat competing methods in low-data regime?\n```\nThanks for raising this observation. We think there are some potential reasons for this phenomenon. Firstly, in ADA, the adaptation stage has access to labeled source data. This extra supervision helps guide the model to achieve better alignments and uncertainty estimates, especially in low-data regime where target data is scarce. In contrast, for SFADA, the lack of any labeled source data removes this useful signal that facilitates adaptation when target data is scarce. Secondly, with limited data, uncertainty estimation becomes more challenging. The ADA framework is more suited to leverage our probabilistic diffusion model since it provides data with ground-truth labels to train the diffusion classifier. In the future, we will explore ways to improve SFADA performance in low-data regimes, such as using semi-supervised techniques, better leveraging unlabeled data.\n```\nQ5: Obtain non-parametric estimates of entropy.\n```\nThanks for your insightful question. That is an interesting idea we have not considered. Since our diffusion model allows sampling of multiple varied predictions, we could potentially estimate entropy in a nonparametric way directly from those samples. During the rebuttal, we made a simple attempt to leverage the nonparametric entropy estimation for selection. Specifically, for each unlabeled sample, we have N predictions from the diffusion classifier, we average the entropy across the N predictions to get the final nonparametric entropy estimate for that data point, and select the ones with highest averaged entropies for annotation. The results on Office-31 can be found in Table R4.\n\n**Table R4** Results of DAPM on Office-31 using averaged entropy of N predictions for selection (ResNet-50, 5% budget).\n\n| A-\\>D | A-\\>W | D-\\>A | D-\\>W | W-\\>A | W-\\>D | Mean |\n|-------|-------|-------|-------|-------|-------|------|\n| 95.6|86.5|82.1| 99.2  | 82.6  | 100.0 | 92.7 |\n\nIt shows that the averaged entropy on N sampled predictions does provide a good estimation of uncertainty, since the performance is better than DAPM-ENT (Table 3 in the paper), which only uses one prediction from the deterministic classifier. However, it is still below the performance of DAPM-TT. We think this only provides one approach to leveraging the samples for nonparametric entropy. We could also explore k-NN entropy, kernel density entropy or bootstrapping techniques, which also utilize the sampled predictions in a nonparametric way.\n\nLastly, we would like to reiterate that in this work, we choose to use a t-test-based criterion since it naturally encodes the prediction variability, sample number, and cross-category ambiguity, which nicely meets the requirement for active learning. However, we agree your suggestion is worth further investigation. In the revised paper, we will add a discussion of this idea and corresponding experiments.\n"}, {"review_id": "cSqmaZ5F8b", "reviewer": "Reviewer_Grmw", "summary": "This paper aims to tackle the uncertainty estimation problem in ADA with a probabilistic framework, which captures two levels of uncertainties by a variational autoencoder and a diffusion-based classifier, respectively. An adversarial adaptation strategy and a statistical test-based criterion are further introduced. The experiments are conducted on both ADA and source-free ADA tasks, which verify the effectiveness of the proposed DAPM. ", "questions": "1. The diffusion model involves numerous steps of forward and inverse diffusion. How different are the model size and running time compared to baseline methods?\n\n2. The diffusion-based classifier is conditioned on the output scores of the deterministic classifier, which acts as prior knowledge regarding the relationship between x and y_0. How would the model perform without this prior?", "limitations": "The authors have discussed the limitations and broader impacts in the appendix.", "rating": 7, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. This paper revolves around the fundamental question in ADA, i.e., uncertainty estimation. Specifically, the authors establish a probabilistic model to assess the full predictive distribution beyond a point estimate, which is accomplished by a conditional diffusion-based probabilistic model.\n\n2. To tackle the domain shift problem, the authors propose to explore an invariant latent space with an adversarial learning strategy. The diffusion-based classifier is conditioned on latent variables, and the data uncertainty in this latent space is also explicitly modeled.\n\n3. This paper is well organized and technically solid. Specifically, the motivation of this work is well established, and the proposed method is plausible to address the uncertainty estimation problem. Besides, the proposed method is compatible with both conventional ADA and source-free ADA settings as presented in the manuscript. \n\n4. The experiments on three ADA datasets demonstrate that the proposed method exhibits not only high accuracy for classification but also low ECE for uncertainty calibration. ", "weaknesses": "1. Despite the uncertainty estimation component (the second stage), the domain adaptation component (the first stage) is solely based on conditional domain adversarial networks (for ADA). This limited design could explain the marginal improvement observed when compared to other SOTA methods. I think the proposed method can benefit from incorporating other more advanced UDA or SSDA techniques for both ADA and SFADA.\n\n2. The proposed method differs from previous adversarial learning-based ADA methods by employing adversarial learning between labeled and unlabeled samples. However, the underlying motivation for this design choice is not explicitly stated, and the potential benefits of it are not adequately evaluated or demonstrated.\n\n3. Minor: The equation indexes in the appendix are missing.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Dear Reviewer Grmw,\n\nWe appreciate the comments and questions you post. Here are our point-to-point responses.\n```\nWeakness 1: Suboptimal domain adaptation component.\n```\nResponse: Thank you for the thoughtful feedback on improving the domain adaptation component of our approach. We totally agree that relying solely on adversarial alignment may limit the potential gains compared to state-of-the-art techniques. According to your suggestion, we have explored incorporating a more advanced SSDA method MME into the adaptation stage, and found this can provide further improvements. Please refer to the Common Response 3 for more details. These results align well with your insight about strengthening the adaptation component beyond adversarial learning. We will integrate a discussion of these experiments and analysis into the appendix to demonstrate the benefits of combining the uncertainty estimation approach with other domain adaptation techniques.\n```\nWeakness 2: Why conduct adversarial learning between labeled and unlabeled data?\n```\nResponse: Thanks for the comment. The key motivation for aligning labeled and unlabeled data is to create a shared feature space that allows the model to effectively discriminate on labeled source/target data and produce meaningful uncertainty estimates on unlabeled target data. By aligning labeled and unlabeled, we get an invariant space for both supervised classification and unsupervised uncertainty modeling. In contrast, aligning domains directly may retain some divergence between labeled and unlabeled data distributions, since the labeled target samples are incorporated into the supervised training objective with labeled source samples. We will explain the motivation more clearly in the revised paper.\n```\nMinor: Missing equation indexes.\n```\nResponse: Thanks for recognizing this. We have fixed this issue in the revised appendix.\n```\nQ1: Model size and running time compared to baseline methods.\n```\nResponse: Thanks for the question. Computational complexity is a problem that is widely concerned in diffusion models. We have re-run our method to check the running time and model size of our method as well as other baseline methods. Please refer to the Common Response 2 for more details.\n```\nQ2: How does the model perform without conditioning on the output scores of the deterministic classifier?\n```\nResponse: Thank you for raising this insightful question. In our early work, we did conduct experiments to evaluate the effect of this design choice, where the diffusion model is not conditioned on the deterministic classifier outputs, instead, a standard Gaussian distribution is used. However, we empirically found removing this prior knowledge resulted in 0.8% drop in mean accuracy on the Office-31 dataset, and 1.1% drop on the VisDA dataset. We conjecture the prior helps guide the diffusion model to produce higher quality uncertainty estimates and accelerate learning. This observation also aligns with the finding in [19], where the diffusion model is employed in an in-distribution scenario. Therefore, we also incorporate the prior knowledge as the condition of the diffusion model in this work."}, {"review_id": "X25nyckydY", "reviewer": "Reviewer_rDAp", "summary": "This paper introduces a probabilistic framework for ADA, which incorporates both data-level and prediction-level uncertainties using variational inference. It employs a VAE and a diffusion-based classifier to approximate the joint posterior distribution. Adversarial learning is used to ensure an invariant latent space, and a t-test-based criterion is applied to select informative target samples. Experimental results demonstrate the effectiveness of the method on ADA and SFADA tasks.", "questions": "1. I like the design of this work. However, it still remains unclear that why the diffusion-based classifier can accurately recover the predictive distribution. Is there any theoretical guarantee or intuitive justification that the diffusion-based classifier is a better choice to model the predictive distribution?\n\n2. Does the use of the diffusion model and the two-stage training strategy significantly increase the training and inference time?\n\n3. Due to the impracticability of conducting explicit adversarial learning within the SFADA setting, the term \"DAPM\" is unsuitable in this context, necessitating a more appropriate name specifically for SFADA.\n", "limitations": "The limitations have been discussed in the appendix. I do not find potential obvious negative social impact associated with this work.", "rating": 8, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. This paper introduces a novel probabilistic framework for ADA, which goes beyond traditional deterministic model-based uncertainty estimation by capturing both data-level and prediction-level uncertainties. This approach is based on variational inference and incorporates a variational autoencoder and a latent diffusion classifier to approximate the joint posterior distribution.\n\n2. This paper highlights that the proposed method provides more calibrated predictions compared to previous ADA methods. Calibrated predictions are desirable in ADA tasks to ensure reliable and well-calibrated confidence estimates for informativeness assessment.\n\n3. The incorporation of t-test-based criterion for sample selection is inspiring and reasonable, as the t-value considers various factors, such as prediction variability, cross-category ambiguity, and sample size, in a unified manner, making it a comprehensive criterion.\n\n4. The proposed method is naturally compatible with SFADA setting, since the diffusion-based classifier is built on top of a transferable task-specific model, which can be trained in a standard UDA manner or in a source-free UDA manner.\n", "weaknesses": "1. This paper presents a comprehensive framework that combines variational inference, adversarial learning, and knowledge distillation. While these techniques can enhance the capabilities of the model, they may introduce increased complexity and computational cost, which could limit the scalability and practicality of the method.\n\n2. The introduced improvements of the proposed method over other methods appear to be limited. In particular, the proposed DAPM does not achieve the best performance on the Office-Home dataset, which necessitates further analysis or justification.\n\n3. In the ablation study, the comparison primarily focuses on highlighting the improvements of the diffusion classifier over the deterministic classifier, specifically emphasizing the advantages of prediction-level probabilistic modeling. However, the benefits resulting from data-level probabilistic modeling brought by the VAE are not demonstrated in this analysis.\n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Dear Reviewer rDAp:\n\nThanks for your positive words and constructive comments. Below are our responses to the weaknesses and questions.\n```\nWeakness 1: Increased complexity and computational cost, limited scalability and practicality.\n```\nResponse: Thanks for your comments. The computational complexity is a widely concerned problem in the field of diffusion model-related research. To explore the complexity of our model, we have tested model size and inference speed. Please refer to the Common Response 2 for details.\n\nIn addition, in light of Reviewer Grmw, we further investigate the modular nature and flexibility of our method, which show certain scalability and practicality of the probabilistic framework. Please refer to the Common Response 3 for details.\n```\nWeakness 2: Limited improvements of the proposed method over other methods.\n```\nResponse: Thanks for your comments. As we illustrated in the Common Response 3, although the diffusion-based sample selection strategy is effective, since our framework mainly focuses on modeling uncertainty, therefore the DA baselines without active learning are not particularly impressive (see Tables R1 and R2), which is one of the main reasons why the final results are limited. Nevertheless, in order to demonstrate the effectiveness of our active learning approach in the DA scenario, we tried to combine a semi-supervised learning method (see Common Response 3), and the results do show that it can bring more performance improvements.\n```\nWeakness 3: The benefits of data-level uncertainty is not clear.\n```\nResponse: Thanks for raising this point. According to your suggestion, we conducted additional experiments ablating the VAE component, which can be simply implemented by replacing the variational encoder with a deterministic feature encoder. Through preliminary experiments, we found that the performance on VisDA-2017 is worse than modeling both the data-level and prediction-layer uncertainty, as shown in Table R5. Due to extensive experimental requirements and limited time available during rebuttal, we are still working to try the performance on other datasets, which contains multiple adaptation tasks. We will attach it as a separate ablation analysis in the revised appendix.\n\n**Table R5** Comparison between the performance of DAPM-TT w/ and w/o data-level uncertainty on VisDA-2017 dataset (Resnet-50, 5% budget).\n\n| Method            | Synthetic → Real |\n|-------------------|------------------|\n| DAPM-TT (w/ VAE)  | 89.1             |\n| DAPM-TT (w/o VAE) | 88.3             |\n```\nQ1: Why the diffusion-based model is a better choice?\n```\nResponse: Thank you for raising this excellent question. While it is difficult to have a full theoretical justification for this choice, we can justify diffusion models as a principled approach to implicitly recover predictive distributions in a flexible nonparametric manner through stochastic diffusion processes.\n\nDiffusion models have been shown to be equivalent to reversing stochastic differential equations (SDEs). Running the reverse process along the SDE trajectory to recover the original data distribution provides a principled way to recover the data distribution. Besides, compared to other generative models that complete generation in a single step, the multi-step noise schedule smooths the posterior and improves the exploration of the probability space, which will also result in more stable training and generation. In addition, the forward-reverse diffusion process allows effective modeling of high-dimensional complex distributions without parametric assumptions. Actually, the correlation between the covariates and the prediction variable is assumed to be high-dimensional and complex as well. Therefore, we regard diffusion models as a better choice to model the underlying predictive distribution.\n```\nQ2: How does the diffusion model increase the training and inference time?\n```\nResponse: Thanks for your comments. We have analyzed the model size and the inference time of our method by comparing it with other baselines in Common Response 2. For the training time, training the diffusion model does not introduce a significant increase in time duration. Because for each, we sample a time step, the specific form of the forward diffusion process enables an efficient sampling for arbitrary steps in a closed form. The model is then used to predict the noise. In other words, we do not need to go through a full sampling trajectory for each sample, as in the inference phase, and repeat the process multiple times for generating predictions. In addition, as we illustrated in Appendix C, we do not train the ResNet-50 backbone in most experiments. Therefore, the additional training time involved by the diffusion model is not obvious.\n```\nQ3: Inappropriate name of the method in SFADA.\n```\nResponse: Thanks for pointing out. We would like to rename our method as Diffusion-based Probabilistic Model (DPM) for SFADA in the revised paper."}, {"review_id": "NoTtiAwqqH", "reviewer": "Reviewer_1fQe", "summary": "This paper tackles active domain adaptation based on the diffusion probabilistic model to estimate the prediction uncertainty. The authors apply the variational inference to the joint distributions of input data, latent codes in feature and prediction spaces, and labels. To realize adaptation, KL loss, and adversarial training are employed. Based on the losses, the model is trained in a two-stage fashion. To select the informative samples, a t-test-based strategy is explored.", "questions": "* The motivation for the design of the t-test-based strategy is not clear. Why did the authors choose the two most predicted classes? How about three or even more? Why define the t-value as Eq. (17)? Does it follow a t-distribution? \n* With Eq. (17), how to obtain the p-value. Please provide more details.\n* It would be better to add more explanation on the last two losses in Eq. (13).\n* In Line 40, the paper aims to accurately estimate the posterior distribution. However, a large margin exists between the estimated uncertainty and the true one, as in Fig. 2(a).\n\n\n* Minor: How about the performance on modern backbones, such as transformer or CLIP?\n", "limitations": "It would be better to develop diffusion-based uncertainty estimation specified for DA with distribution shift.", "rating": 5, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "* Estimating the prediction uncertainty based on diffusion models seems to be more accurate as shown in experiments.\n* The results for active domain adaptation and source-free domain adaptation on three benchmarks are better than those of the baseline.\n* The paper is well-written and easy to follow.\n", "weaknesses": "* The main weakness is the combination nature. The proposed method seems to be a combination of VAE, diffusion-based uncertainty estimation [19], knowledge distillation, and adversarial training, which are common techniques in generative models and domain adaptation. Such a contribution is below the standard of NeurIPS. \n* The diffusion-based uncertainty estimation is borrowed from [19]. It would be better to develop it specified for DA with distribution shift.\n* Missing results on more challenging datasets such as DomainNet. From Table 1-2, DAPM-TT is marginally better or worse than DUC on VisDA and Office-Home. It would be better to evaluate DAPM-TT and DUC on more challenging datasets.\n* From Table 4, the results of the diffusion classifier and deterministic classifier are similar, so the effectiveness of the diffusion-based uncertainty estimation for ADA is limited.\n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Dear Reviewer 1fQe:\n\nThanks for your comments. Please kindly find below our responses and answers. Due to limited length, Table R6 and R7 are in the pdf file attached in the Common Response.\n```\nWeakness 1: The combination nature.\n```\nThanks for the comment. We hope to clarify that the contribution of this work goes beyond a trivial combination of existing techniques. While we integrate several components, the main contribution lies in the unified probabilistic framework specifically designed for ADA using variational inference and diffusion models to capture both data and prediction uncertainties. The uniqueness resides in the thoughtful integration of these tailored components within a principled probabilistic framework, as noted by Reviewer 3siL in the Strength 1. Besides, the t-test-based selection is a novel strategy designed for ADA, resulting in clear empirical gains that show component synergy. We believe formulating ADA in a probabilistic manner is an important direction, and our framework also provides certain flexibility for implementation (Common Response 3). This provides a strong basis for further extensions accounting for other uncertainties or techniques.\n```\nWeakness 2: It would be better to specifically develop methods for distribution shift.\n```\nThanks. In this work, our focus is exactly on developing diffusion-based uncertainty estimation under distribution shift. While the diffusion-based classification model draws inspiration from [19], we have innovatively tailored it for DA. First, the VAE aims to model the common generation process of both source and target data, which also captures data-level uncertainties in a latent space better suited for cross-domain tasks compared to the original input space used in [19]. Besides, the diffusion model is conditioned on this normalized latent space and enable effective domain transfer. In addition, the two-stage training first aligns domains before diffusion modeling for a shared embedding. We will highlight these key differences from prior work in the revised paper.\n```\nWeakness 3 & Minor: Performance on more challenging datasets and modern backbones.\n```\nThanks. This is an interesting suggestion. Unfortunately, we do not yet have comprehensive results using other datasets and networks due to the significant computational requirements and time needed during the rebuttal to evaluate baselines and our method. However, we have begun some initial experiments on a more challenging dataset miniDomainNet, and on a Swin-Transformer backbone, which we can share some preliminary results in Table R6 and R7, respectively. We believe these initial results help demonstrate the availability of our method on more challenging datasets and modern networks.\n```\nWeakness 4: The diffusion and deterministic classifiers perform similarly.\n```\nWe would like to clarify that there is a factual misinterpretation of the experimental result. The similarity between the deterministic and diffusion classifiers in Table 4 cannot imply the inefficacy of our uncertainty estimation method. Our method consists a deterministic and a diffusion classifier, either of which can be used for evaluation after training. Their accuracies on the target domain might be comparable, given that the diffusion classifier is generative and not trained with a discriminative objective. However, regardless of the evaluation classifier, diffusion-based uncertainty estimation is consistently used for sample selection during training.\n```\nQ1&Q2: Motivation of the t-test-based strategy and details of the p-value.\n```\nFocusing on the top 2 classes is a popular way to qualify prediction uncertainty. This approach, known as BvSB[36], is effective for uncertainty estimation in previous softmax-based deterministic models and AL. Considering more classes becomes less tractable for statistical analysis and insignificant. Our method employs the diffusion classifier to generate multiple stochastic predictions per instance. Therefore, rather than comparing the difference between two scalars, we need to compare differences between two groups of predictions. We think t-test is a good choice and have explained the merits of this design in Sec 3.4.\n\nOur t-value formulation aligns with the traditional two-sample t-test for comparing two independent groups. In our case the sample numbers N in two groups are equal, so the formulation comes to Eq. (17). With the calculated t-value, we treat it as coming from a t-distribution with degrees of freedom 2N–2. The CDF of the t-distribution yields the p-value, indicating the probability of observing a t-value at least as extreme as the one computed under the null hypothesis. Since this process is the same as traditional t-test, we omit the illustration. However, we would like to add more details.\n```\nQ3: More explanation on the two losses in Eq. (13).\n```\nThe last loss encourages individual predictions on the unlabeled target samples to be confident, by maximizing the KL divergence between the predicted class distribution and a uniform distribution, which avoids high entropy outputs. The second last loss aims to make the predictions diverse across the whole unlabeled set, by minimizing the divergence between the dataset-level class distribution and a uniform distribution. Together, these losses allow us to produce target predictions that are individually confident but holistically diverse.\n```\nQ4: Large gap in Fig. 2(a).\n```\nWhile we strive for accurate posterior estimation, we recognize it is an extremely challenging task, particularly under domain shift. Our method makes progress but does not claim to perfectly solve this problem. We agree the curves in Fig. 2(a) indicates there is room for improvement. However, our method makes notable progress towards this goal. As shown in Fig. 2(a), the ECE (in the legend) is significantly smaller than the deterministic classifier, and also smaller than DUC. Such an ECE is a reasonably good calibration error in general."}]

Author rebuttal:
**Common Response:**

We sincerely appreciate the time and effort the reviewers have dedicated to reviewing our paper and providing thoughtful and constructive feedback. Here we provide responses to some common concerns raised by multiple reviewers. The attached pdf file contains the revised Figure 3(a) which might be useful for Reviewer fVMQ, and Table R6 and R7 which are prepared for Reviewer 1fQe.
```
Common Concern 1: The domain adaptation baseline of DAPM (without active learning).
```
Reviewer 3siL and fVMQ have concerns about the baseline performance of our DAPM in common UDA scenarios (without active learning). We provide the corresponding results in Table R1 and R2.

**Table R1** Baseline domain adaptation results on Office-Home without active learning (ResNet-50).

| Task | Ar-\>Cl | Ar-Pr | Ar-\>Rw | Cl-\>Ar | Cl-\>Pr | Cl-\>Rw | Pr-\>Ar | Pr-\>Cl | Pr-\>Rw | Rw-\>Ar | Rw-\>Cl | Rw-\>Pr | Avg. |
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
|CDAN|50.7|70.6|76.0|57.6|70.0|70.0|57.4|50.9|77.3|70.9|56.7|81.6|65.8|
|DAPM|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|

**Table R2** Baseline domain adaptation results on VisDA and Office-31 without active learning (ResNet-50).

| Dataset | VisDA | Office-31 |       |       |       |       |       |      |
|-|-|-|-|-|-|-|-|-|
| Task    | S-\>R | A-\> D    | A-\>W | D-\>A | D-\>W | W-\>A | W-\>D | Avg. |
| CDAN    | 70.0  | 92.9      | 94.1  | 71.0  | 98.6  | 69.3  | 100.0 | 87.7 |
| DAPM    | 80.8  | 94.3      | 93.5  | 72.1  | 97.6  | 72.3  | 99.3  | 88.2 |
```
Common Concern 2: Model size and computational complexity.
```
We realize that computational complexity is a fair concern in the study of diffusion models. To evaluate the computational overload brought by the diffusion model, we conduct a comparison among DAPM (w/ deterministic classifier), DAPM (w/ diffusion classifier), and the baseline model ResNet-50 regarding the model size and inference speed (i.e., number of samples can be handled per second during inference), on a single Nvidia GeForce RTX 3090 GPU. The results can be found in Table R3. The number of generated samples N for each instance is set to 100 as it is in the main paper. Since inputs of different datasets have the same size and preprocessing process, we do not distinguish between different datasets.

**Table R3** Model size and computational complexity of DAPM compared with baseline methods.

| Model                              | Parameters  | Inference speed |
|------------------------------------|-------------|-----------------|
| ResNet-50                          | 24.04 M     | 689             |
| DAPM (w/ deterministic classifier) | 27.20 M     | 546             |
| DAPM (w/ diffusion classifier)     | 28.68 M     | 103             |

It reveals that the inference speed of DAPM lags behind that of ResNet-50, primarily due to the additional computational overhead introduced by the calculation and sampling processes within the VAE. In comparison to DAPM equipped with a deterministic classifier, the integration of the diffusion classifier leads to a nearly 5x reduction in inference speed. This outcome is foreseeable since the diffusion model generates multiple predictions through a Markov chain with a long-time span. However, we think the compromise in inference speed is justifiable, given the enhanced capability of the diffusion classifier to capture prediction uncertainty effectively. Selecting samples based on the diffusion classifier (rather than the deterministic classifier) leads to more substantial enhancements in overall performance, as shown in Table 3. We will also include this evaluation and corresponding discussion in the revised Appendix.
```
Common Concern 3: Improved performance by incorporating other SSDA techniques.
```
Although the improvements are marginal over other strong methods at the current stage, it is worth noting that our formulation provides certain flexibility for the implementation of the training objectives, which showcases the modular nature of the framework. For instance, we use a teacher-student framework to implement the second term in Eq. (12) and adopt conditional adversarial learning as the main adaptation technique, which may limit the baseline DA performance and then affect the performance after active learning. As suggested by Reviewer Grmw, the DA component and AL component can be decoupled. We have tried to incorporate a SSDA method MME [Ref1] to implement the adaptation stage, which is also practiced by previous ADA works, e.g., [Ref2, Ref3]. Specifically, the adversarial learning loss (i.e., L_adv) is replaced by the minimax entropy loss, and other losses remains unchanged. The preliminary results on Office-Home dataset can be found in Table R4. We are still doing our best to explore the possibility of improving performance and evaluate performance on other datasets.

**Table R4** Accuracy (%) of DAPM-TT (combined with semi-supervised domain adaptation techniques) on Office-Home with 5% annotation budget (ResNet-50).

| Task              | Ar-\>Cl | Ar-Pr | Ar-\>Rw | Cl-\>Ar | Cl-\>Pr | Cl-\>Rw | Pr-\>Ar | Pr-\>Cl | Pr-\>Rw | Rw-\>Ar | Rw-\>Cl | Rw-\>Pr | Avg. |
|-------------------|---------|-------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|------|
| DAPM-TT (w/ CDAN) | 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 |
| DAPM-TT (w/ MME)  | 65.1    | 85.5  | 84.9    | 72.5    | 84.6    | 83.7    | 72.4    | 64.7    | 86.3    | 77.9    | 70.3    | 88.8    | 78.1 |

[Ref1] Semi-supervised Domain Adaptation via Minimax Entropy. CVPR 2019.

[Ref2] Active Domain Adaptation via Clustering Uncertainty-weighted Embeddings. ICCV 2021.

[Ref3] Transferable query selection for active domain adaptation. CVPR 2021.

We thank you all again for your helpful guidance in revising this work.

Meta-review: All reviewers recommended acceptance of this work (split between borderline, weak and strong accept). Reviewers generally found the work to be well written and technically sound. They appreciated the new method for modeling uncertainty and it's strong performance when used to help active domain adaptation solutions.
Decision: Accept (poster)