October 03, 2022
This paper uses information-theoretic tools to analyze the generalization error in unsupervised domain adaptation (UDA). We present novel upper bounds for two notions of generalization errors. The first notion measures the gap between the population risk in the target domain and that in the source domain, and the second measures the gap between the population risk in the target domain and the empirical risk in the source domain. While our bounds for the first kind of error are in line with the traditional analysis and give similar insights, our bounds on the second kind of error are algorithm-dependent, which also provide insights into algorithm designs. Specifically, we present two simple techniques for improving generalization in UDA and validate them experimentally.
This paper focuses on the unsupervised domain adaptation (UDA) task, where the learner is confronted with a source domain and a target domain and the algorithm is allowed to access to a labeled training sample from the source domain and an unlabeled training sample from the target domain. The goal is to find a predictor that performs well on the target domain.
A main obstacle in such a task is the discrepancy between the two domains. Some recent works [1]–[9] have proposed various measures to quantify such discrepancy, either for the UDA setting or for the more general domain generalization tasks, and many learning algorithms are proposed. For example, [9] uses a (reverse) KL divergence to measure the misalignment of the two domain distributions, and motivated by their generalization bound, they design an algorithm that penalizes the KL divergence between the marginal distributions of two domains in the representation space. Despite that this “KL guided domain adaptation” algorithm is demonstrated to outperform many existing marginal alignment algorithms [6], [10]–[12], it is not clear whether KL-based alignment of marginal distributions is adequate for UDA, and more fundamentally, what role the unlabelled target-domain sample should play in cross-domain generalization. Notably, most UDA algorithms are heuristically designed and intuitively justified. Moreover, most existing generalization bounds are algorithm-independent. Then there appears significant room for both deeper theoretical understanding and more principled algorithm design.
In this paper, we analyze the generalization ability of hypotheses and learning algorithms for UDA tasks using an information-theoretic framework developed in [13], [14]. The foundation of our technique is the Donsker-Varadhan representation of KL divergence (see Lemma 1). We present novel upper bounds for two notions of generalization errors. The first notion (“population-to-population (PP) generalization error”) measures the gap between the population risk in the target domain and that in the source domain for a hypothesis, and the second (“expected empirical-to-population (EP) generalization error”) measures the gap between the population risk in the target domain and the empirical risk in the source domain for a learning algorithm. We show that the PP generalization error for all hypotheses are uniformly bounded by a quantity governed by the KL divergence between the two domain distributions, which, under bounded losses, recovers the the bound in [9]. We then show that this KL term upper-bounds some other measures including Total-Variation distance [1], Wasserstein distance [6] and domain disagreement [7]. Thus, minimizing KL-divergence forces the minimization of other discrepancy measures as well. This, together with the ease of minimizing KL [9], explains the effectiveness of the KL-guided alignment approach. For expected EP generalization error, we develop several algorithm-dependent generalization bounds. These algorithm-dependent bounds further inspire the design of two new and yet simple strategies that can further boost the performance of the KL guided marginal alignment algorithms. Experiments are performed to verify the effectiveness of these strategies.
Many domain adaptation generalization bounds have been developed [1]–[3], [5]–[8], [15], and various discrepancy measures are introduced to derive these bounds including total variation [1]–[3], [15], Wasserstein distance [6], domain disagreement [7] and so on. In particular, bounds based on \({\cal H}\Delta {\cal H}\) in [2] are restricted to a binary classification setting and assume a deterministic labeling function. Furthermore, [2] also assumes the loss is the \(L_1\) distance between the predicted label and true label (which is bounded). Our bounds work for the general supervised learning problems with any labelling mechanism (e.g., stochastic labelling), and we do not require the specific choice of the loss (even unbounded). Recently, [16] proposed generalization bounds using Jensen-Shannon (JS) divergence, which bear a relation to our Corollary 2. While other algorithm-dependent bounds have been proposed for different transfer learning settings (e.g., [17]), they are not directly comparable to our own bounds. For more details about the domain adaptation theory, we refer readers to [18] for a comprehensive survey. In addition, the most common methods for domain adaptation involve aligning the marginal distributions of the representations between the source and target domains, for example, using an adversarial training mechanism [6], [8], [10] or aligning the first two moments of the representation distribution [11]. There are numerous other domain adaptation algorithms, and we refer readers to [19]–[21] for recent advances.
Information-theoretic analysis is usually used to bound the expected generalization error of supervised learning, where the training and testing data come from the same distribution [13], [14], [22]–[26]. Exploiting the chain rule of mutual information, these bounds are successfully applied to characterize the generalization ability of stochastic gradient based optimization algorithms [24], [27]–[32]. Recently, this framework has also been used in other learning settings including meta-learning [33]–[36], semi-supervised learning [37], [38] and transfer learning [33], [39]–[42]. In particular, [39], [40] consider a different problem setup with ours. Specifically, their expected generalization error is the gap between the target population risk and a weighted empirical risk combining both the source and the target empirical risks, while our “EP” error is the gap between the target population risk and the source empirical risk. That is, we focus on the role of the unlabelled target data in cross-domain generalization when the source empirical risk is taken as a training objective, whereas their works assume the existence of labelled target data and study their role in domain adaptation.
Unless otherwise noted, a random variable will be denoted by a capitalized letter, and its realization is denoted by the corresponding lower-case letter. Consider a prediction task with instance space \(\mathcal{Z}=\mathcal{X}\times\mathcal{Y}\), where \(\mathcal{X}\) and \(\mathcal{Y}\) are the input space and the label (or output) space, respectively. Let \(\mathcal{F}\) be the hypothesis space of interest, in which each \(f\in \mathcal{F}\) is a function or predictor mapping \(\mathcal{X}\) to \({\cal Y}\). We assume that each hypothesis \(f\in \mathcal{F}\) is parameterized by some weight parameter \(w\) in some space \({\cal W}\) and may write \(f\) as \(f_w\) as needed.
Let \(\mu\) and \(\mu'\) be two distributions on \(\mathcal{Z}\), unknown to the learner, where \(\mu\) characterizes the source domain and \(\mu'\) characterizes the target domain. We may also write \(\mu\) as \(P_Z\) or \(P_{XY}\) and \(\mu'\) as \(P_{Z'}\) or \(P_{X'Y'}\), which defines random variables \(Z=(X, Y)\) and \(Z'=(X', Y')\), respectively. Let \(S=\{Z_i\}_{i=1}^n \sim \mu^{\otimes n}\) be a labeled source-domain sample and \(S'_{X'} = \{X'_j\}_{j=1}^m \sim P_{X'}^{\otimes m}\) be an unlabelled target-domain sample. The objective of UDA is to design an algorithm \(\mathcal{A}\) that takes \(S\) and \(S'_{X'}\) as the input and outputs a weight \(W\in\mathcal{W}\), giving rise to a predictor \(f_W\in \mathcal{F}\) that “works well” on the target domain. Note that the algorithm \(\mathcal{A}\) is characterized by a conditional distribution \(P_{W|S,S'_{X'}}\).
Let \(\ell:\mathcal{Y}\times \mathcal{Y} \rightarrow \mathbb{R}_0^+\) be a loss function. The population risk for each \(w\in \mathcal{W}\) in the target domain is defined as \[R_{\mu'}(w)\triangleq \mathbb{E}_{Z'}{[\ell(f_w(X'),Y')]}\] and a good UDA algorithm hopes to return a weight \(w\) that minimizes this risk. Since \(\mu'\) is unknown, one often uses recourse to the empirical risk in the source domain, defined as \[R_S(w) \triangleq {\frac{1}{n}\sum_{i=1}^n\ell(f_w(X_i),Y_i)}.\] Generalization error in this setting measures how well the hypothesis returned from the algorithm generalizes from the source-domain training sample to the target-domain unknown distribution \(\mu'\). Taking into account the stochastic nature of the algorithm \(\mathcal{A}\), a natural notion of generalization error for UDA can be defined by \[\begin{align} \label{eq:expect-error} {\mathrm{Err}}\triangleq {\ifx&W,S& \mathbb{E} \else {\mathbb{E}_{W,S}} \fi \left[R_{\mu'}(W)-R_S(W)\right]}={\ifx&W,S,S'_{X'}& \mathbb{E} \else {\mathbb{E}_{W,S,S'_{X'}}} \fi \left[R_{\mu'}(W)-R_S(W)\right]}, \end{align}\tag{1}\] where the expectation in the first expression is taken over the joint distribution of \((W,S)\sim P_{W|S}\times\mu^{\otimes n}\), and the expectation of the second expression is taken over the joint distribution of \((W,S,S'_{X'})\sim P_{W|S,S'_{X'}}\times\mu^{\otimes n}\times P_{X'}^{\otimes m}\).
There is another notion of generalization error, more traditional in the domain adaptation literature, defined as the gap between the population risk in the target domain and that in the source domain: \[\begin{align} \widetilde{\mathrm{Err}}(w)\triangleq R_{\mu'}(w)-R_{\mu}(w). \label{eq:unexpect-error} \end{align}\tag{2}\] where \(R_{\mu}(w)\triangleq \mathbb{E}_Z{[\ell(f_w(X),Y)]}\). It is apparent that \(\widetilde{\mathrm{Err}}(w)\) and \(\mathrm{Err}\) are related by the following triangle inequality: \[|R_{\mu'}(w) - R_S(w)|\le |R_{\mu'}(w) - R_{\mu}(w)| + |R_{\mu}(w)-R_{S}(w)|.\] where the second term on the right hand side is the standard generalization error in the source domain, which can be bounded by classical learning-theoretic tools, e.g., Rademacher complexity [43]. Thus, bounding \(\widetilde{\mathrm{Err}}(w)\) helps bounding \(\mathrm{Err}\).
This paper studies both notions of generalization error for UDA. Specifically, starting from Section 0.0.5, we will mainly use information-theoretic tools to bound \(\mathrm{Err}\) directly, without going through \(\widetilde{\mathrm{Err}}(w)\). For the ease of reference, we refer to \(\widetilde{\mathrm{Err}}(w)\) as the population-to-population (PP) generalization error for \(w\) and \(\mathrm{Err}\) as the expected empirical-to-population (EP) generalization error.
The following definitions are useful.
Definition 1 (Disintegrated Mutual Information). Let \(X\), \(Y\) and \(Z\) be random variables and \(z\) be a realization of \(Z\). The disintegrated mutual information of \(X\) and \(Y\) given \(Z=z\) is \(I^z(X;Y)\triangleq \mathrm{D_{KL}}(P_{X,Y|Z=z}||P_{X|Z=z}P_{Y|Z=z})\).
Note that the conditional mutual information \(I(X;Y|Z)=\mathbb{E}_{Z}{I^Z(X;Y)}\).
Definition 2 (Lautum Information [44]). The lautum information between \(X\) and \(Y\) is defined as \(L(X;Y)\triangleq\mathrm{D_{KL}}(P_XP_Y||P_{XY})\).
We now present some upper bounds for \(\widetilde{\mathrm{Err}}(w)\). The key techniques used in developing these bounds are the information-theoretic tools in the style of Lemma 1. These bounds adopt certain KL divergence to measure the discrepancy between the source and target domains. Notably, some previously established bounds are recovered under weaker conditions. Additionally, we demonstrate that under certain conditions, the KL-based bound is an upper bound of several other discrepancy measures and hence minimizing the KL divergence forces the minimization of these other measures.
We first list some common assumptions on the loss function, which we consider in this paper.
Assumption 1 (Boundedness). \(\ell(\cdot,\cdot)\) is bounded in \([0,M]\).
Assumption 2 (Subgaussianity). \(\ell(f_w(X),Y)\) is \(R\)-subgaussian1 under \(\mu\) for any \(w\in \mathcal{W}\).
Remark 1. Note that Assumption 1 implies Assumption 2, i.e., if \(\ell(f_w(X),Y)\) is bounded in \([0,M]\), then it is also \(M/2\)-subgaussian. Thus, Assumption 2 is weaker than Assumption 1.
Assumption 3 (Lipschitzness). \(\ell(f_w(X),Y)\) is \(\beta\)-Lipschitz continuous in \(\mathcal{Z}\) with respect to a metric \(d\) on \(\mathcal{Z}\) for any \(w\in \mathcal{W}\), i.e., \(|\ell(f_w(x_1),y_1)-\ell(f_w(x_2),y_2)|\leq \beta d(z_1,z_2)\) for some metric \(d\) on \({\mathcal{Z}}\).
Remark 2. Note that Assumption 1 implies Assumption 3 when \(d(z_1,z_2)=\mathbb{1}_{z_1\neq z_2}\), i.e., if \(\ell(f_w(X),Y)\) is bounded in \([0,M]\), then it is also \(M\)-Lipschitz under the discrete metric.
Assumption 4 (Triangle and Symmetric). \(\ell(\cdot,\cdot)\) satisfies the following: \(\ell(y_1,y_2)=\ell(y_2,y_1)\) and \(\ell(y_1,y_2)\leq\ell(y_1,y_3)+\ell(y_3,y_2)~\textit{for any}~y_1,y_2,y_3\in\mathcal{Y}\).
The following generalization bound is established by combining Lemma 1 and Assumption 2, and its corresponding sample complexity bound is discussed in Appendix 1.0.2.8.
Theorem 1. If Assumption 2 holds, then for any \(w\in\mathcal{W}\), \(\left|\widetilde{\mathrm{Err}}(w)\right| \leq \sqrt{2R^2\mathrm{D_{KL}}(\mu'||\mu)}\).
Notably this result can be turned into a generalization upper bound providing guidance to algorithm design, and at the same time it provides a lower bound of the generalization error, highlighting some fundamental difficulty of the learning task. To illustrate this, we present a corollary while noting that similar development can also be applied to other bounds presented later in this paper.
Consider that each \(f_w\) is expressed as the composition \(g\circ h\), where \(h\) is a function mapping \({\cal X}\) to a representation space \({\cal T}\) and \(g\) is a function mapping \({\cal T}\) to \({\cal Y}\). For any given \(h:{\cal X} \rightarrow {\cal T}\), denote by \(\mu_{h}\) the distribution on \({\cal T}\times {\cal Y}\) obtained by pushing forward \(\mu\) via \(h\), that is, \(\mu_{h} (t, y)= \int \delta(t-h(x)) d\mu(x, y)\), where \(\delta\) is the Dirac measure on \({\cal T}\). Similarly, let \(\mu'_{h}\) denote the distribution on \({\cal T}\times {\cal Y}\) obtained by pushing forward \(\mu'\) via \(h\).
Corollary 1. Suppose that \(f_w=g\circ h\) and that Assumption 2 holds, then for any \(w\in\mathcal{W}\), \[\begin{align} R_\mu(w)- \sqrt{2R^2\mathrm{D_{KL}(\mu'||\mu)}} \le R_{\mu'}(w) \leq R_\mu(w) + \sqrt{2R^2\mathrm{D_{KL}(\mu'_h||\mu_h)}}. \end{align}\]
In this result, the lower bound of \(R_{\mu'}(w)\) indicates a fundamental difficulty in UDA learning in that, using the same predictor mapping \(f_w\), there is no way for the population risk in the target domain to be lower than that of the source domain less than a constant which depends only on the domain difference. On the other hand, the upper bound suggests that it is possible to squeeze the gap between the two population risks by choosing an appropriate representation map \(h\) - evidently such a map should be attempting to align \(\mu'_h\) with \(\mu_h\) or to align their respective proxies.
It is also noteworthy that under Assumption 1 and due to Remark 1, Theorem 1 implies \[\begin{align} \label{ineq:cor-bound-subgaussian-bounded} \left|\widetilde{\mathrm{Err}}(w)\right| \leq {\frac{M}{\sqrt{2}}}\sqrt{\mathrm{D_{KL}}(P_{X'}||P_{X})+\mathrm{D_{KL}}(P_{Y'|X'}||P_{Y|X})}. \end{align}\tag{3}\] Similarly applying this result in the representation space \(\mathcal{T}\), we see that Eq. (3 ) recovers the bound in Proposition 1 of [9]. Notice that unlike [9], Theorem 1 ( or Eq. (3 )) does not require the loss to be the cross-entropy loss.
Theorem 1 and [9] both use the KL divergence from source domain to target domain, \(\mathrm{D_{KL}}(\mu'||\mu)\), and in fact, \(\left|\widetilde{\mathrm{Err}}(w)\right|\) can also be upper bounded by \(\mathrm{D_{KL}}(\mu||\mu')\). This can be done by invoking the subgaussianality of \(\ell(f_w(X'),Y')\) (rather than \(\ell(f_w(X),Y)\)); for bounded loss, the subgaussianality of \(\ell(f_w(X'),Y')\) is also satisfied. Then we obtain the following corollary.
Corollary 2. If Assumption 1 holds, \(\left|\widetilde{\mathrm{Err}}(w)\right| \leq \frac{M}{\sqrt{2}}\sqrt{\min\{\mathrm{D_{KL}}(\mu||\mu'),\mathrm{D_{KL}}(\mu'||\mu)\}} \leq \frac{M}{2}\sqrt{{\mathrm{D_{KL}}(\mu||\mu')+\mathrm{D_{KL}}(\mu'||\mu)}}.\)
Remark 3. In the second inequality of Corollary 2, \(\mathrm{D_{KL}}(\mu||\mu')+\mathrm{D_{KL}}(\mu'||\mu)\) is known as the symmetrized KL divergence, or Jeffrey’s divergence [45], and in fact, [9] penalizes this measure between the source and target distributions in the representation space. Notice that bounds in [16] are based on the JS divergence. Since there is a sharp upper bound of the JS divergence based on Jeffrey’s divergence [46], minimizing Jeffrey’s divergence (in the representation space) will simultaneously penalize the JS divergence.
In UDA, since \(Y'\) is completely unavailable to the algorithm \(\mathcal{A}\), it is impossible to minimize the misalignment of conditional distributions, i.e. \(\mathrm{D_{KL}}(P_{Y'|T'}||P_{Y|T})\) where \(T\) and \(T'\) are representations of source domain and target domain, respectively. A common method is to assign pseudo labels to target data based on a learned source classifier [47]. However, it may also cause additional issues [48]. For concreteness, suppose the trained model \(Q\) can well approximate the real mapping between \(X\) and \(Y\) on source domain (i.e. \(Q_{Y|T}=P_{Y|T}\)), which is usually the training objective. Let \(\hat{Y'}\) be the pseudo label of \(T'\) generated by the trained model, i.e., \(Q_{\hat{Y'}|T'}=Q_{Y|T}\). Let \(Q_{T',\hat{Y'}}=P_{T'}Q_{\hat{Y'}|T'}\), then the following holds, \[\begin{align} \mathrm{D_{KL}}(P_{T',Y'}||P_{T,Y})=\mathbb{E}_{P_{T',Y'}}\log\frac{P_{T',Y'}Q_{T',\hat{Y'}}}{Q_{T',\hat{Y'}}P_{T,Y}}=\mathrm{D_{KL}}(P_{T'}||P_{T})+\mathrm{D_{KL}}(P_{Y'|T'}||Q_{\hat{Y'}|T'}). \label{eq:pseudo-label} \end{align}\tag{4}\] For a specific \(t'\), if \(P(Y'=y'|T'=t')\neq 0\) and \(Q(\hat{Y'}=y'|T'=t')= 0\), then the second term in RHS of Eq. (4 ), \(\mathrm{D_{KL}}(P_{Y'|T'}||Q_{\hat{Y'}|T'})\rightarrow\infty\). In this case, even when the marginal distributions are perfectly aligned, the overall value of the upper bound is large. Thus, incorrect pseudo labels may even have negative impact on the target domain performance.
In fact, the misalignment of the conditional distributions appears to be the main difficulty of UDA [1], [8]. The next corollary suggests that this difficulty may be alleviated when the loss function satisfies the triangle property, namely, Assumption 4. It can be verified that this assumption is satisfied by the 0-1 loss 2; this assumption has also been considered in previous works [3], [6].
Theorem 2. If Assumption 4 holds and let \(\ell(f_{w'}(X),f_{w}(X))\) be \(R\)-subgaussian for any \(w,w'\in \mathcal{W}\). Then for any \(w\), \(\widetilde{\mathrm{Err}}(w) \leq \sqrt{2R^2\mathrm{D_{KL}}(P_{X'}||P_{X})}+\lambda^*\), where \(\lambda^*=\min_{w\in\mathcal{W}}R_{\mu'}(w)+R_\mu(w)\).
Here \(\lambda^*\) measures the possibility of whether the domain adaptation algorithm will succeed under the oracle knowledge of \(\mu\) and \(\mu'\). In particular, if the hypothesis space is large enough, the minimizer \(w^*\) for the “joint population risk” \(R_{\mu'}(w)+R_\mu(w)\) may give rise to \(R_{\mu'}(w^*)=R_\mu(w^*)=0\), then we’re likely to generalize well on the target domain. Then the KL divergence \(\mathrm{D_{KL}}(P_{X'}||P_{X})\) between the two \(\mathcal{X}\)-marginals alone bounds the PP generalization error uniformly for all \(w\in \mathcal{W}\).
This theorem motivates the strategy of penalizing \(\mathrm{D_{KL}}(P_{T'}||P_{T})\) in the representation space for UDA. The next theorem suggests that such an approach also penalizes other notions of domain discrepancy, for example, the key quantity in the PAC-Bayes type of domain adaptation generalization bounds [7], that is defined as \[\begin{align} \mathrm{dis}(P_X,P_{X'})\triangleq\left|{\ifx&W,W'& \mathbb{E} \else {\mathbb{E}_{W,W'}} \fi \left[{\ifx&X'& \mathbb{E} \else {\mathbb{E}_{X'}} \fi \left[\ell(f_{W}(X'),f_{W'}(X'))\right]}\right]}-{\ifx&W,W'& \mathbb{E} \else {\mathbb{E}_{W,W'}} \fi \left[{\ifx&X& \mathbb{E} \else {\mathbb{E}_{X}} \fi \left[\ell(f_{W}(X),f_{W'}(X))\right]}\right]}\right|. \label{eq:domain-agree} \end{align}\tag{5}\]
Theorem 3. If \(\ell(f_{w'}(X),f_w(X))\) is \(R\)-subgaussian for any \(f_w,f_w'\in \mathcal{F}\), then \(\mathrm{dis}(P_X,P_{X'})\leq\sqrt{2R^2\mathrm{D_{KL}}(P_{X'}||P_{X})}.\)
Note that unlike [7], here we do not require the loss function to be the 0-1 loss.
We now present such generalization bound for UDA under the Lipschitz continuity assumption of the loss function, where \({\mathbb{W}}(\cdot, \cdot)\) denotes the Wasserstein distance.
Theorem 4. If Assumption 3 holds, then \(\left|\widetilde{\mathrm{Err}}(w)\right| \leq \beta\mathbb{W}(\mu',\mu).\)
Theorem 4 can be related to the KL-based bounds in the previous section when the Wasserstein distance is defined with respect to the discrete metric \(d\). In this case and under bounded loss function, which is also Liptschitz continuous, Theorem 4 follows. On the other hand, Wasserstein distance is also equivalent to the total variation in this case, while the latter is connected to the KL divergence via Pinsker’s inequality [49] and the Bretagnolle-Huber inequality [50]. Thus, we arrive at the following result.
Corollary 3. If Assumption 1 holds holds and let \(d\) be the discrete metric, then \[\left|\widetilde{\mathrm{Err}}(w)\right| \leq M\mathrm{TV}(\mu',\mu)\leq M\sqrt{\min\left\{\frac{1}{2}\mathrm{D_{KL}}(\mu'||\mu),1-e^{-\mathrm{D_{KL}}(\mu'||\mu)}\right\}}.\]
Note that results here are inspired by the work of [26]. Corollary 3 provides a tighter bound than the one in Eq. (3 ), as can be directly verified.
Parallel to Theorem 2, if the loss function satisfies the triangle property, we may establish the bound below, which recovers a similar result in [6] but without restricting the task to be binary classification or requiring the loss to be the \(L_1\) distance.
Theorem 5. If Assumption 4 holds and \(\ell(f_w(X),f_{w'}(X))\) is \(\beta\)-Lipschitz in \(\mathcal{X}\) for any \(w,w'\in \mathcal{W}\), then for any \(w\in\mathcal{W}\), \(\widetilde{\mathrm{Err}}(w) \leq \beta\mathbb{W}(P_{X'},P_X)+\lambda^*\), where \(\lambda^*=\min_{w\in\mathcal{W}}R_{\mu'}(w)+R_\mu(w)\).
These results justify the strategy of minimizing domain discrepancy in the representation space. Since the KL-based bounds upper-bound those based on other measures of domain differences, penalizing the KL divergence will also penalize those other measures. This is practically advantageous since it is usually easier and more stable to minimize the KL divergence [9].
There are two limitations in the bounds on the PP generalization error developed so far and in the traditional analysis of UDA. First, such bounds are independent of \(w\) and hence algorithm-independent. Second, although these bounds may inspire strategies to exploit the unlabelled target sample, e.g., aligning the source and target distributions in the representation space, they only provide very limited knowledge on the role that the unlabelled target sample plays. Inspired by the works of [24] and [51], we derive upper bounds for the EP generalization error that take better advantage of the dependence of the algorithm’s output on the unlabelled target data. Applications of these bounds in designing the learning algorithms are also presented.
Theorem 6. Assume \(\ell(f_W(X'),Y')\) is \(R\)-subgaussian under \(P_{W,Z'|X_j'=x_j'}\) for any \(x_j'\in\mathcal{X}\), then \[\left|{\mathrm{Err}}\right| \leq \frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\sqrt{2R^2I^{X_j'}(W;Z_i)}+\sqrt{2R^2\mathrm{D_{KL}}(\mu||\mu')}.\]
Remark 4. It is worth noting that the unlabelled target data contributes to the first term of the bound. Increasing the amount of source and target data will result in a reduction of the first term in the bound. Specifically, moving the expectation inside the square root function by Jensen’s inequality and since \(Z_i \perp\!\!\!\perp X_j'\), the equations \(I(W;Z_i|X_j')=I(W;Z_i|X_j')+I(Z_i;X_j')=I(W;Z_i)+I(X_j';Z_i|W)\) hold by the chain rule. The term \(I(W;Z_i)\) will vanish as \(n\rightarrow\infty\) and the term \(I(X_j';Z_i|W)\) will also vanish as \(n,m\rightarrow\infty\).
The theorem can be turned into a version that is more practically relevant, in which the KL term is replaced with their representation-space counter-part (following a similar argument used for deriving Corollary 1). In addition, note that although larger sample sizes allow better estimation of that KL term, utilizing pseudo-labels for estimation may have a negative impact (as discussed in Section 0.0.4), which can be amplified by the larger sample size.
Corollary 4. Let Assumption 1 hold. Then \[\left|{\mathrm{Err}}\right| \leq \frac{M}{\sqrt{2}nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\sqrt{\min\left\{I^{X_j'}(W;Z_i),L^{X_j'}(W;Z_i)\right\}}+\frac{M}{\sqrt{2}}\sqrt{\min\left\{\mathrm{D_{KL}}(\mu||\mu'),\mathrm{D_{KL}}(\mu'||\mu)\right\}}.\]
Theorem 7. Assume \(\ell\) is Lipschitz for both \(w\in\mathcal{W}\) and \(z\in\mathcal{Z}\), i.e., \(|\ell(f_w(x),y)-\ell(f_w(x'),y')|\leq \beta d_1(z,z')\) for all \(z,z'\in\mathcal{Z}\) and \(|\ell(f_w(x),y)-\ell(f_{w'}(x),y)|\leq \beta'd_2(w,w')\) for all \(w,w'\in\mathcal{W}\), then \[\left|{\mathrm{Err}}\right| \leq \frac{\beta'}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j',Z_i}{\mathbb{W}(P_{W|Z_i,X_j'},P_{W|X_j'})}+\beta\mathbb{W}(\mu,\mu').\]
This bound is tighter than the bound in Theorem 6, as can be indicated by the following corollary.
Corollary 5. Let Assumption 1 hold. Then \[\begin{align} \left|\widetilde{\mathrm{Err}}\right|&\leq \frac{M}{nm}\sum_{j=1}^{m}\sum_{i=1}^n{\ifx&X_j',Z_i& \mathbb{E} \else {\mathbb{E}_{X_j',Z_i}} \fi \left[\mathrm{TV}(P_{W|Z_i,X_j'},P_{W|X_j'})\right]}+M\mathrm{TV}(\mu,\mu')\\ &\leq \frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j',Z_i}\sqrt{\frac{M^2}{2}\mathrm{D_{KL}}(P_{W|Z_i,X_j'}||P_{W|X_j'})}+\sqrt{\frac{M^2}{2}\mathrm{D_{KL}}(\mu||\mu')}. \end{align}\]
Notice that to recover Theorem 6 from Corollary 5 (under Assumption 1), we can use Jensen’s inequality to move the expectation over \(Z_i\) to inside the square root function.
The algorithm-dependent bound in Theorem 6 tells us that one can reduce the EP error by limiting the disintegrated mutual information \(I^{X_j'}(W;Z_i)\). In the stochastic gradient based optimization algorithms, this term can be controlled by penalizing the gradient norm. To see this, we now consider a “noisy” iterative algorithm for updating \(W\), e.g., SGLD. At each time step \(t\), let the labelled mini-batch from the source domain be \(Z_{B_t}\), let the unlabelled mini-batch from the target domain be \(X'_{B_t}\), and let \(g(W_{t-1},Z_{B_t},X'_{B_t})\) be the gradient at time \(t\). Thus, the updating rule of \(W\) is \(W_t=W_{t-1}-\eta_t g(W_{t-1},Z_{B_t},X'_{B_t})+N_t\) where \(\eta_t\) is the learning rate and \(N_t\sim\mathcal{N}(0,\sigma^2\mathrm{I}_d)\) is an isotropic Gaussian noise. Inspired by [27], we have the following bound.
Theorem 8. Let the total iteration number be \(T\) and let \(G_t=g(W_{t-1},Z_{B_t},X'_{B_t})\), then \[\left|{\mathrm{Err}}\right|\leq\sqrt{\frac{R^2}{n}\sum_{t=1}^T\frac{\eta_t^2}{\sigma^2_t}{\ifx&S'_{X'},W_{t-1},S& \mathbb{E} \else {\mathbb{E}_{S'_{X'},W_{t-1},S}} \fi \left[\left|\left|G_t-{\ifx&Z_{B_t}& \mathbb{E} \else {\mathbb{E}_{Z_{B_t}}} \fi \left[G_t\right]}\right|\right|^2\right]}}+\sqrt{2R^2\mathrm{D_{KL}}(\mu||\mu')}.\]
Remark 5. Considering a noisy iterative algorithm here is merely for simplifying analysis. In fact, it is also possible to analyze the original iterative gradient optimization method without noise injected. For example, one can follow the same development in [30], [31] to analyze vanilla SGD. In that case, there will be some residual terms in the bound.
Theorem 8 hints that to reduce the generalization error, one can simply restrict the gradient norm at each step (so that \(||G_t-{\ifx&Z_{B_t}& \mathbb{E} \else {\mathbb{E}_{Z_{B_t}}} \fi \left[G_t\right]}||^2\) is reduced). This strategy will also restrict the distance between the final output \(W_T\) and the initialization \(W_0\), effectively shrinking the hypothesis space accessible by the algorithm. We also note that the importance of gradient penalty has been theoretically justified in the supervised learning setting [24], [28], [30]–[32], [51], [52].
Indeed, adding gradient penalty can be applied to any existing UDA algorithm and it is simple but effective in practice. Later on we will show that even when the algorithm \(\mathcal{A}\) does not access to any target data, in which case \(I(W;Z_i|X_j')\) reduces to \(I(W;Z_i)\) and \(g(W_{t-1},Z_{B_t},X_{B_t}')\) becomes \(g(W_{t-1},Z_{B_t})\), minimizing the empirical loss of source domain sample while penalizing gradient norm will still improve the performance. Notice that gradient penalty has been used in standard supervised learning as a regularization technique [53], [54]. It is also used in Wasserstein distance based adversarial adaptation [6], [55], and their motivation is to stabilize the training to avoid gradient vanishing problem. Here we suggest, with strong theoretical justification, that gradient penalty is a universal technique for improving the generalization performance in UDA for any gradient-based learning method.
Notably the bound in Theorem 8 only depends on the size \(n\) of labelled source sample and does not explicitly depend on \(m\), the size of unlabelled target sample. With a more careful design, if we consider the mutual information as the expected KL divergence of a posterior and a prior, based on \(I^{X_j'}(W;Z_i)\) in Theorem 6, it is possible to create a target-data-dependent prior and derive a tighter bound based on some quantity similar to "gradient incoherence" in [24].
Consider instances in the representation space, \(Z=(T,Y)\) and \(Z'=(T',Y)\). Theorem 6 also encourages us to align the distributions of two domains in the representation space, as argued earlier. Then the KL guided marginal alignment algorithm proposed in [9] can be invoked here. One may notice that Theorem 6 uses \(\mathrm{D_{KL}}(\mu||\mu')\) while [9] uses \(\mathrm{D_{KL}}(\mu'||\mu)\). As already discussed in Section 0.0.4, this inconsistency can be ignored when the loss is bounded (see Corollary 4).
Most domain adaptation algorithms aim to align the marginal distributions of two domains in the representation space. However, without accessing to \(Y'\), it remains unknown if an UDA algorithm will work well since we cannot guarantee that discrepancy between conditional distribution \(P_{Y|T}\) and \(P_{Y'|T'}\) won’t become too large when we align the marginals. In [9], the authors show that \(\mathrm{D_{KL}}(P_{Y'|T'}||P_{Y|T})\) can be upper-bounded by \(\mathrm{D_{KL}}(P_{Y'|X'}||P_{Y|X})\), if \(I(X;Y)=I(T;Y)\). The authors then argue that penalizing the KL divergence of the marginals is safe.
We now argue that in practice the condition \(I(X;Y)=I(T;Y)\) can be difficult to satisfy if the cross-entropy loss is used to define the source-domain empirical risk.
By data processing inequality on \(Y-X-T\), we know that \(I(X;Y)\geq I(T;Y)=H(Y)-H(Y|T)\). Thus, to let \(I(T;Y)\) reach its maximum, one must minimize \(H(Y|T)\). On the other hand, let \(Q_{Y|T,W}\) be the predictive distribution of labels in the source domain generated by the classifier. The expected cross-entropy loss for each \(Z_i\) in the representation space is then \[{\ifx&W,Z_i& \mathbb{E} \else {\mathbb{E}_{W,Z_i}} \fi \left[\ell(f_W(T_i),Y_i)\right]} = {\ifx&Z_i& \mathbb{E} \else {\mathbb{E}_{Z_i}} \fi \left[{\ifx&W|Z_i& \mathbb{E} \else {\mathbb{E}_{W|Z_i}} \fi \left[-\log{Q_{Y_i|T_i,W}}\right]}\right]},\] which also decomposes as [56], [57] \[\begin{align} \label{eq:cross-entropy32decomposition} {\ifx&W,Z_i& \mathbb{E} \else {\mathbb{E}_{W,Z_i}} \fi \left[\ell(f_W(T_i),Y_i)\right]} = H(Y_i|T_i)+{\ifx&T_i,W& \mathbb{E} \else {\mathbb{E}_{T_i,W}} \fi \left[\mathrm{D_{KL}}(P_{Y_i|T_i,W}||Q_{Y_i|T_i,W})\right]}-I(W;Y_i|T_i). \end{align}\tag{6}\] Then minimizing the expected cross-entropy loss may not adequately reduce \(H(Y_i|T_i)\) but rather cause \(I(W;Y_i|T_i)\) to significantly increase, particularly when the model capacity is large. This may have two negative effects. First, the condition \(I(X;Y)=I(T;Y)\) is significantly violated, and \(\mathrm{D_{KL}}(P_{Y'|T'}||P_{Y|T})\) is no longer upper bounded by \(\mathrm{D_{KL}}(P_{Y'|X'}||P_{Y|X})\). Hence, aligning the two marginals alone may not be adequate. Second, large \(I(W;Y_i|T_i)\) indicates \(W\) just simply memorizes the label \(Y_i\), resulting a form of overfitting and hurting the generalization performance.
The key take-away from the above analysis is that when aligning the marginals in UDA, controlling the source label information in the weights can be important to achieve good cross-domain generalization. A similar message can also be deduced from Theorem 6, when it is viewed in the representation space and noting \(I^{T_j'}(W;Z_i)=I^{T_j'}(W;T_i)+I^{T_j'}(W;Y_i|T_i)\).
To control label information, [57] proposed an approach called LIMIT. However, this method is rather complicated and arguably hard to train in domain adaptation (see Appendix 1.0.3.8). We now derive a simple alternative strategy for this purpose.
Notice that \(I^{T_j'}(W;Y_i|T_i) \leq\inf_Q{\ifx&T_i& \mathbb{E} \else {\mathbb{E}_{T_i}} \fi \left[\mathrm{D_{KL}}(P_{W|Y_i,T_i,T_j'=t_j'}||Q_{W|T_i,T_j'=t_j'})\right]},\) which is a simple extension of variational representation of mutual information [49]. Here \(Q\) could be any distribution. By assuming \(P=\mathcal{N}(W,\sigma^2\mathrm{I}_d|Y_i,T_i,T_j'=t_j')\) and taking \(Q=\mathcal{N}(\widetilde{W},\tilde{\sigma}^2\mathrm{I}_d|T_i,T_j'=t_j')\), we have \[I^{T_j'}(W;Y_i|T_i)\leq\inf_Q{\ifx&T_i& \mathbb{E} \else {\mathbb{E}_{T_i}} \fi \left[\mathrm{D_{KL}}(P_{W|Y_i,T_i,T_j'=t_j'}||Q_{\tilde{W}|T_i,T_j'=t_j'})\right]}\propto ||W-\widetilde{W}||^2.\] Thus, we may create an auxiliary classifier \(f_{\widetilde{w}}\) that is not allowed to access to the real source label \(Y\). In each iteration, we use the pseudo labels of target data (and source data) assigned by \(f_{{w}}\) to train \(f_{\widetilde{w}}\) and adding \(||W-\widetilde{W}||^2\) as a regularizer in the training of \(W\). The algorithm is given in the Appendix. Remarkably the regularizer here resembles “Projection Norm” designed in [58] for out-of-distribution generalization.
We perform experiments to verify the proposed techniques inspired by our theory.
| RotatedMNIST (\(\mathbf{0^{\circ}}\) as source domain) | Digits | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 2-7 (r)8-11 Method | \(\mathbf{15^{\circ}}\) | \(\mathbf{30^{\circ}}\) | \(\mathbf{45^{\circ}}\) | \(\mathbf{60^{\circ}}\) | \(\mathbf{75^{\circ}}\) | Ave | M \(\rightarrow\) U | U \(\rightarrow\) M | S \(\rightarrow\) M | Ave |
| ERM | 97.5±0.2 | 84.1±0.8 | 53.9±0.7 | 34.2±0.4 | 22.3±0.5 | 58.4 | 73.1±4.2 | 54.8±6.2 | 65.9±1.4 | 64.6 |
| DANN | 97.3±0.4 | 90.6±1.1 | 68.7±4.2 | 30.8±0.6 | 19.0±0.6 | 61.3 | 90.7±0.4 | 91.2±0.8 | 71.1±0.5 | 84.3 |
| MMD | 97.5±0.1 | 95.3±0.4 | 73.6±2.1 | 44.2±1.8 | 32.1±2.1 | 68.6 | 91.8±0.3 | 94.4±0.5 | 82.8±0.3 | 89.7 |
| CORAL | 97.1±0.3 | 82.3±0.3 | 56.0±2.4 | 30.8±0.2 | 27.1±1.7 | 58.7 | 88.0±1.9 | 83.3±0.1 | 69.3±0.6 | 80.2 |
| WD | 96.7±0.3 | 93.1±1.2 | 64.1±3.3 | 41.4±7.6 | 27.6±2.0 | 64.6 | 88.2±0.6 | 60.2±1.8 | 68.4±2.5 | 72.3 |
| KL | 97.8±0.1 | 97.1±0.2 | 93.4±0.8 | 75.5±2.4 | 68.1±1.8 | 86.4 | 98.2±0.2 | 97.3±0.5 | 92.5±0.9 | 96.0 |
| ERM-GP | 97.5±0.1 | 86.2±0.5 | 62.0±1.9 | 34.8±2.1 | 26.1±1.2 | 61.2 | 91.3±1.6 | 72.7±4.2 | 68.4±0.2 | 77.5 |
| KL-GP | 98.2±0.2 | 96.9±0.1 | 95.0±0.6 | 88.0±8.1 | 78.1±2.5 | 91.2 | 98.8±0.1 | 97.8±0.1 | 93.8±1.1 | 96.8 |
| KL-CL | 98.4±0.2 | 97.3±0.2 | 95.6±0.1 | 83.0±8.2 | 73.6±4.0 | 89.6 | 98.9±0.1 | 97.7±0.1 | 93.0±0.3 | 96.5 |
We select two popular small datasets, RotatedMNIST and Digits, to compare the different methods. RotatedMNIST is built based on the MNIST dataset [59] and consists of six domains, each containing \(11,666\) images. These six domains are rotated MNIST images with rotation angle \(0^{\circ},15^{\circ},30^{\circ},45^{\circ},60^{\circ}\) and \(75^{\circ}\), respectively. We will take the original MNIST dataset (\(0^{\circ}\)) as the source domain and take other five domains as target domains. Hence, there are five domain adaptation tasks on RotatedMNIST. Digits consists of three sub-datasets, namely MNIST, USPS [60] and SVHN [61], and the corresponding domain adaptation tasks are MNIST\(\rightarrow\)USPS (M\(\rightarrow\)U), USPS\(\rightarrow\)MNIST (U\(\rightarrow\)M), SVHN\(\rightarrow\)MNIST (S\(\rightarrow\)M).
Baseline methods are some popular marginal alignment UDA methods including DANN [10], MMD [12], CORAL [11], WD [6] and KL [9]. We also choose ERM as another baseline, in which only the source-domain sample is accessible during training. To verify the strategies inspired by our theory, we first add the gradient penalty to the ERM algorithm (ERM-GP), and we then combine gradient penalty (GP) and controlling label information (CL) with the recent proposed KL guided marginal alignment method, which are denoted by KL-GP and KL-CL, respectively.
Most of our implementation is based on the DomainBed suite [62]. Other settings exactly follow [9] and the results of baseline methods are taken from [9]. Specifically, each algorithm is run three times and we show the average performance with the error bar. Every dataset has a validation set, and the model selection scheme is based on the best performance achieved on the validation set of target domain during training (oracle). The hype-parameter searching process is also built upon the implementation in the DomainBed suite. Other details and additional experiments can be found in Appendix.
From Table 1, we first notice that gradient penalty allows ERM to perform more comparably to other marginal alignment methods. For example, on RotatedMNIST, ERM-GP outperforms CORAL and performs nearly the same with DANN. On Digits, ERM-GP outperforms WD. When GP and CL combined with KL guided algorithm, we can see that the performance can be further boosted. This justifies the discussion in Section 0.0.5.2 and Section 0.0.5.3.
Despite that the numerous learning techniques have been developed for domain adaptation, significant room exists for more in-depth theoretical understanding and more principled design of learning algorithms. This paper presents the information-theoretic analysis for unsupervised domain adaptation, where we query two notions of the generalization errors in this context and present novel learning bounds. Some of these bounds recover the previous KL-based bounds under different conditions and confirm the insights in the learning algorithms that align the source and target distributions in the representation space. Our other bounds are algorithm-dependent, better exploiting the unlabelled target data, which have inspired novel and yet simple schemes for the design of learning algorithms. We demonstrate the effectiveness of these schemes on standard benchmark datasets.
This work is supported partly by an NSERC Discovery grant and a National Research Council of Canada (NRC) Collaborative R&D grant (AI4D-CORE-07). Ziqiao Wang is also supported in part by the NSERC CREATE program through the Interdisciplinary Math and Artificial Intelligence (INTER-MATH-AI) project. The authors would like to thank the anonymous reviewers for their careful reading and valuable suggestions.
Definition 3 (Wasserstein Distance). Let \(d(\cdot,\cdot)\) be a metric and let \(P\) and \(Q\) be probability measures on \(\mathcal{X}\). Denote \(\Gamma(P,Q)\) as the set of all couplings of \(P\) and \(Q\) (i.e. the set of all joint distributions on \(\mathcal{X} \times \mathcal{X}\) with two marginals being \(P\) and \(Q\)), then the Wasserstein Distance of order one between \(P\) and \(Q\) is defined as \(\mathbb{W}(P,Q)\triangleq\inf_{\gamma\in\Gamma(P,Q)}\int_{\mathcal{X}\times\mathcal{X}} d(x,x')d\gamma(x,x')\).
Remark 6. Similar to [26], here we mainly focus on \(1\)-Wasserstein distance but all the upper bounds based on \(1\)-Wasserstein distance also holds for higher order Wasserstein distance by Hölder’s inequality [63].
Definition 4 (Total Variation). The total variation between two probability measures \(P\) and \(Q\) is \(\mathrm{TV}(P,Q)\triangleq\sup_E\left|P(E)-Q(E)\right|\), where the supremum is over all measurable set \(E\).
Remark 7. Note that the total variation equals to the Wasserstein distance under the discrete metric (or Hamming distortion) \(d(x,x')=\mathbb{1}_{x\neq x'}\) where \(\mathbb{1}\) is the indicator function [63].
The key quantity in the most information-theoretic generalization bounds is the mutual information between algorithm’s input and output. Specifically, the core technique behind these bounds is the well-known Donsker-Varadhan representation of KL divergence [49].
Lemma 1 (Donsker and Varadhan’s variational formula). Let \(Q\), \(P\) be probability measures on \(\Theta\), for any bounded measurable function \(f:\Theta\rightarrow \mathbb{R}\), we have \(\mathrm{D_{KL}}(Q||P) = \sup_{f} {\ifx&\theta\sim Q& \mathbb{E} \else {\mathbb{E}_{\theta\sim Q}} \fi \left[f(\theta)\right]}-\log{\ifx&\theta\sim P& \mathbb{E} \else {\mathbb{E}_{\theta\sim P}} \fi \left[\exp{f(\theta)}\right]}.\)
Remark 8. Motivated by the classic \(f\)-divergence, [8] proposed a discrepancy measure called \(\mathrm{D}_{\mathcal{H}}^\phi\)-discrepancy (or \(\mathrm{D}_{h,\mathcal{H}}^\phi\)-discrepancy). As KL divergence belongs to the family of \(f\)-divergences and both [8] and our work use the variational representation of divergence, there appears to be a connection between our work (in Section 0.0.4) and theirs. However, it’s important to note that the variational characterization of \(f\)-divergence used in [8] is based on the results of [64], while the Donsker-Varadhan representation of KL divergence (see Lemma 1) used in our paper cannot be directly obtained from their variational characterization [65], [66]. In fact, simply choosing \(x\log x\) as the conjugate function would result in a weaker bound than Lemma 1. Therefore, while there is some similarity between our results and those of [8], our results in Section 0.0.4 cannot be directly derived from theirs.
Similar to [14], we need the following lemma as a main tool.
Lemma 2. Let \(Q\) and \(P\) be probability measures on \(\Theta\). Let \(\theta'\sim Q\) and \(\theta\sim P\). If \(g(\theta)\) is \(R\)-subgaussian, then, \[\left|{\ifx&\theta'\sim Q& \mathbb{E} \else {\mathbb{E}_{\theta'\sim Q}} \fi \left[g(\theta')\right]}-{\ifx&\theta\sim P& \mathbb{E} \else {\mathbb{E}_{\theta\sim P}} \fi \left[g(\theta)\right]}\right|\leq \sqrt{2R^2\mathrm{D_{KL}}(Q||P)}.\]
Proof. Let \(f=t\cdot g\) for any \(t\in \mathbb{R}\), by Lemma 1, we have \[\begin{align} \mathrm{D_{KL}}(Q||P) \geq& \sup_t{\ifx&\theta'\sim Q& \mathbb{E} \else {\mathbb{E}_{\theta'\sim Q}} \fi \left[t g(\theta')\right]}-\log{{\ifx&\theta\sim P& \mathbb{E} \else {\mathbb{E}_{\theta\sim P}} \fi \left[\exp{t\cdot g(\theta)}\right]}}\\ =&\sup_t{\ifx&\theta'\sim Q& \mathbb{E} \else {\mathbb{E}_{\theta'\sim Q}} \fi \left[t g(\theta')\right]}-\log{{\ifx&\theta\sim P& \mathbb{E} \else {\mathbb{E}_{\theta\sim P}} \fi \left[\exp{t (g(\theta)-{\ifx&\theta\sim P& \mathbb{E} \else {\mathbb{E}_{\theta\sim P}} \fi \left[g(\theta)\right]}+{\ifx&\theta\sim P& \mathbb{E} \else {\mathbb{E}_{\theta\sim P}} \fi \left[g(\theta)\right]})}\right]}}\\ =&\sup_t {\ifx&\theta'\sim Q& \mathbb{E} \else {\mathbb{E}_{\theta'\sim Q}} \fi \left[t g(\theta')\right]}-{\ifx&\theta\sim P& \mathbb{E} \else {\mathbb{E}_{\theta\sim P}} \fi \left[t g(\theta)\right]}-\log{{\ifx&\theta\sim P& \mathbb{E} \else {\mathbb{E}_{\theta\sim P}} \fi \left[\exp{t (g(\theta)-{\ifx&\theta\sim P& \mathbb{E} \else {\mathbb{E}_{\theta\sim P}} \fi \left[g(\theta)\right]})}\right]}}\\ \geq&\sup_t t\left({\ifx&\theta'\sim Q& \mathbb{E} \else {\mathbb{E}_{\theta'\sim Q}} \fi \left[ g(\theta')\right]}-{\ifx&\theta\sim P& \mathbb{E} \else {\mathbb{E}_{\theta\sim P}} \fi \left[ g(\theta)\right]}\right)-t^2R^2/2, \end{align}\] where the last inequality is by the subgaussianity of \(g(\theta)\).
Then consider the case of \(t>0\) and \(t<0\) (\(t=0\) is trivial), by AM–GM inequality (i.e. the arithmetic mean is greater than or equal to the geometric mean), the following is straightforward, \[\left|{\ifx&\theta'\sim Q& \mathbb{E} \else {\mathbb{E}_{\theta'\sim Q}} \fi \left[g(\theta')\right]}-{\ifx&\theta\sim P& \mathbb{E} \else {\mathbb{E}_{\theta\sim P}} \fi \left[g(\theta)\right]}\right|\leq \sqrt{2R^2\mathrm{D_{KL}}(Q||P)}.\] This completes the proof. ◻
The following lemma is the Kantorovich–Rubinstein duality of Wasserstein distance [63].
Lemma 3 (KR duality). For any two distributions \(P\) and \(Q\), we have \[\mathbb{W}(P,Q)=\sup_{f\in\mathrm{1-Lip(\rho)}}\int_\mathcal{X} f dP - \int_\mathcal{X} f dQ,\] where the supremum is taken over all \(1\)-Lipschitz functions in the metric \(d\), i.e. \(|f(x)-f(x')|\leq d(x,x')\) for any \(x,x'\in\mathcal{X}\).
To connect total variation with KL divergence , we will use Pinsker’s inequality [49] and Bretagnolle-Huber inequality [50] in this paper, for more discussion about these two inequalities, we refer readers to [67].
Lemma 4 (Pinsker’s inequality). \(\mathrm{TV}(P,Q)\leq\sqrt{\frac{1}{2}\mathrm{D_{KL}}(P||Q)}\).
Lemma 5 (Bretagnolle-Huber inequality). \(\mathrm{TV}(P,Q)\leq\sqrt{1-e^{-\mathrm{D_{KL}}(P||Q)}}\).
Below is the variational formula (or golden formula) of mutual information.
Lemma 6 ([49]). For two random variables \(X\) and \(Y\), we have \[I(X;Y) = \inf_{P} {\ifx&X& \mathbb{E} \else {\mathbb{E}_{X}} \fi \left[\mathrm{D_{KL}}(Q_{Y|X}||P)\right]},\] where the infimum is achieved at \(P=Q_Y\).
Proof. As discussed in Remark 1, when the loss is bounded in \([0,M]\), it is guaranteed to be \(\frac{M}{2}\)-subgaussian for any \(w\in\mathcal{W}\). Then, similar to the proof of Theorem 1, let \(Q=\mu\), \(P=\mu'\) and \(g=\ell\) and \(R=\frac{M}{2}\), then the following bound holds by Lemma 2, \[\left|\widetilde{\mathrm{Err}}(w)\right| \leq \sqrt{\frac{M^2}{2}\mathrm{D_{KL}(\mu||\mu')}}.\] Then, by \(\min\{A,B\}\leq\frac{1}{2}(A+B)\), the remaining part is straightforward, \[\left|\widetilde{\mathrm{Err}}(w)\right| \leq \frac{M}{\sqrt{2}}\sqrt{\min\{\mathrm{D_{KL}}(\mu||\mu'),\mathrm{D_{KL}}(\mu'||\mu)\}} \leq \frac{M}{2}\sqrt{{\mathrm{D_{KL}}(\mu||\mu')+\mathrm{D_{KL}}(\mu'||\mu)}}.\] This completes the proof. ◻
Proof. Let \(w^*=\arg\min_{w\in\mathcal{W}}{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_w(X'),Y')\right]}+{\ifx&Z& \mathbb{E} \else {\mathbb{E}_{Z}} \fi \left[\ell(f_w(X),Y)\right]}\). By Lemma 1, \[\begin{align} \mathrm{D_{KL}}(P_{X'}||P_{X})&\geq\sup_{t\in\mathbb{R},w\in\mathcal{W}}{\ifx&X'& \mathbb{E} \else {\mathbb{E}_{X'}} \fi \left[t\ell(f_w(X'),f_{w^*}(X'))\right]}-\log{{\ifx&X& \mathbb{E} \else {\mathbb{E}_{X}} \fi \left[e^{t\ell(f_w(X),f_{w^*}(X))}\right]}}. \end{align}\] Recall that \(\ell(f_{w'}(X),f_w(X))\) is \(R\)-subgaussian, by using Lemma 2 (let \(Q=P_{X'}\), \(P=P_{X}\) and \(g(\cdot)=\ell(f_{w'}(\cdot),f_{w}(\cdot))\)), we have \[\begin{align} \left|{\ifx&X'& \mathbb{E} \else {\mathbb{E}_{X'}} \fi \left[\ell(f_{w}(X'),f_{w^*}(X'))\right]}-{\ifx&X& \mathbb{E} \else {\mathbb{E}_{X}} \fi \left[\ell(f_{w}(X),f_{w^*}(X))\right]}\right|\leq\sqrt{2R^2\mathrm{D_{KL}}(P_{X'}||P_{X})}. \label{ineq:dis-optimal} \end{align}\tag{7}\]
For any \(f_w\in\mathcal{F}\), by the symmetric and triangle property of the loss, we have \[\begin{align} &{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_{w}(X'),Y')\right]}\notag\\ \leq&{\ifx&X'& \mathbb{E} \else {\mathbb{E}_{X'}} \fi \left[\ell(f_{w}(X'),f_{w^*}(X'))\right]}+{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_{w^*}(X'),Y')\right]}\notag\\ \leq&{\ifx&X& \mathbb{E} \else {\mathbb{E}_{X}} \fi \left[\ell(f_{w}(X),f_{w^*}(X))\right]}+\sqrt{2R^2\mathrm{D_{KL}}(P_{X'}||P_{X})}+{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_{w^*}(X'),Y')\right]}\tag{8}\\ =&\int_x \ell(f_{w}(x),f_{w^*}(x)) dP_X(x)+\sqrt{2R^2\mathrm{D_{KL}}(P_{X'}||P_{X})}+{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_{w^*}(X'),Y')\right]}\notag\\ =&\int_x\int_y \ell(f_{w}(x),f_{w^*}(x))dP_{Y|X=x}(y) dP_X(x)+\sqrt{2R^2\mathrm{D_{KL}}(P_{X'}||P_{X})}+{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_{w^*}(X'),Y')\right]}\notag\\ \leq&\int_x\int_y \ell(f_{w}(x),y)+\ell(y,f_{w^*}(x)) dP_{Y|X=x}(y) dP_X(x)+\sqrt{2R^2\mathrm{D_{KL}}(P_{X'}||P_{X})}+{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_{w^*}(X'),Y')\right]}\tag{9}\\ =&{\ifx&Z& \mathbb{E} \else {\mathbb{E}_{Z}} \fi \left[\ell(f_{w}(X),Y)\right]}+{\ifx&Z& \mathbb{E} \else {\mathbb{E}_{Z}} \fi \left[\ell(Y,f_{w^*}(X))\right]}+\sqrt{2R^2\mathrm{D_{KL}}(P_{X'}||P_{X})}+{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_{w^*}(X'),Y')\right]},\notag \end{align}\] where Eq. (8 ) is by Eq. (7 ) and Eq. (9 ) is again by the triangle property of the loss function.
Thus, \(\widetilde{\mathrm{Err}}(w) \leq \sqrt{2R^2\mathrm{D_{KL}(P_{X'}||P_{X})}}+\lambda^*\), which completes the proof. ◻
Proof. By Lemma 1, \[\begin{align} \mathrm{D_{KL}}(P_{X'}||P_{X})&\geq\sup_{t\in\mathbb{R},w,w'\in\mathcal{W}^2}{\ifx&X'& \mathbb{E} \else {\mathbb{E}_{X'}} \fi \left[t\ell(f_{w}(X'),f_{w'}(X'))\right]}-\log{{\ifx&X& \mathbb{E} \else {\mathbb{E}_{X}} \fi \left[e^{t\ell(f_{w}(X),f_{w'}(X))}\right]}}\\ &\geq\sup_{t\in\mathbb{R}}{\ifx&W,W'& \mathbb{E} \else {\mathbb{E}_{W,W'}} \fi \left[{\ifx&X'& \mathbb{E} \else {\mathbb{E}_{X'}} \fi \left[t\ell(f_{W}(X'),f_{W'}(X'))\right]}-\log{{\ifx&X& \mathbb{E} \else {\mathbb{E}_{X}} \fi \left[e^{t\ell(f_{W}(X),f_{W'}(X))}\right]}}\right]}\\ &\geq\sup_{t\in\mathbb{R}}{{\ifx&W,W'& \mathbb{E} \else {\mathbb{E}_{W,W'}} \fi \left[{\ifx&X'& \mathbb{E} \else {\mathbb{E}_{X'}} \fi \left[t\ell(f_{W}(X'),f_{W'}(X'))\right]}\right]}-\log{{\ifx&W,W'& \mathbb{E} \else {\mathbb{E}_{W,W'}} \fi \left[{\ifx&X& \mathbb{E} \else {\mathbb{E}_{X}} \fi \left[e^{t\ell(f_{W}(X),f_{W'}(X))}\right]}\right]}}}, \end{align}\] where the last inequality is by applying Jensen’s inequality to the logarithm function, which is concave.
By the subgaussian assumption, \[\left|{\ifx&W,W'& \mathbb{E} \else {\mathbb{E}_{W,W'}} \fi \left[{\ifx&X'& \mathbb{E} \else {\mathbb{E}_{X'}} \fi \left[\ell(f_W(X'),f_{W'}(X'))\right]}\right]}-{\ifx&W,W'& \mathbb{E} \else {\mathbb{E}_{W,W'}} \fi \left[{\ifx&X& \mathbb{E} \else {\mathbb{E}_{X}} \fi \left[\ell(f_W(X),f_{W'}(X))\right]}\right]}\right|\leq\sqrt{2R^2\mathrm{D_{KL}}(P_{X'}||P_{X})}.\] This concludes the proof. ◻
Proof. From the definition, we have \[\begin{align} \left|\widetilde{\mathrm{Err}}(w)\right|=&\left|{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_w(X'),Y')\right]}-{\ifx&Z& \mathbb{E} \else {\mathbb{E}_{Z}} \fi \left[\ell(f_w(X),Y)\right]}\right|\\ \leq& \beta\mathbb{W}(\mu,\mu'). \end{align}\] where the last inequality is by the KR duality of Wasserstein distance (see Lemma 3). ◻
Proof. When \(d\) is the discrete metric, Wasserstein distance is equal to the total variation, then by Theorem 4, \[\left|\widetilde{\mathrm{Err}}(w)\right| \leq \beta\mathrm{TV}(\mu',\mu),\] The remaining part is by using Lemma 4 and Lemma 5: \[\beta\mathrm{TV}(\mu',\mu)\leq \beta\sqrt{\min\left\{\frac{1}{2}\mathrm{D_{KL}}(\mu'||\mu),1-e^{-\mathrm{D_{KL}}(\mu'||\mu)}\right\}}.\]
Then, if \(\ell\) is bounded by \(M\), we can replace \(\beta\) by \(M\) above, which completes the proof. ◻
Proof. Let \(w^*=\arg\min_{w\in\mathcal{W}}{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_w(X'),Y')\right]}+{\ifx&Z& \mathbb{E} \else {\mathbb{E}_{Z}} \fi \left[\ell(f_w(X),Y)\right]}\).
If \(\ell(f_w(X),f_{w'}(X))\) is \(\beta\)-Lipschitz in \(\mathcal{X}\) for any \(w,w'\in \mathcal{W}\), then similar to Theorem 4, it’s easy to show that \[\begin{align} \label{ineq:dis-optimal-3} {\ifx&X'& \mathbb{E} \else {\mathbb{E}_{X'}} \fi \left[\ell(f_w(X'),f^*(X'))\right]}-{\ifx&X& \mathbb{E} \else {\mathbb{E}_{X}} \fi \left[\ell(f_w(X),f^*(X))\right]}\leq \beta \mathbb{W}(P_X',P_X) \end{align}\tag{10}\]
For any \(f_w\in\mathcal{F}\), by the symmetric and triangle property of the loss, we have \[\begin{align} &{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_{w}(X'),Y')\right]}\notag\\ \leq&{\ifx&X'& \mathbb{E} \else {\mathbb{E}_{X'}} \fi \left[\ell(f_{w}(X'),f_{w^*}(X'))\right]}+{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_{w^*}(X'),Y')\right]}\notag\\ \leq&{\ifx&X& \mathbb{E} \else {\mathbb{E}_{X}} \fi \left[\ell(f_{w}(X),f_{w^*}(X))\right]}+\beta \mathbb{W}(P_X',P_X)+{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_{w^*}(X'),Y')\right]}\label{ineq:dis-optimal-4}\\ \leq&{\ifx&Z& \mathbb{E} \else {\mathbb{E}_{Z}} \fi \left[\ell(f_{w}(X),Y)\right]}+{\ifx&Z& \mathbb{E} \else {\mathbb{E}_{Z}} \fi \left[\ell(Y,f_{w^*}(X))\right]}+\beta \mathbb{W}(P_X',P_X)+{\ifx&Z'& \mathbb{E} \else {\mathbb{E}_{Z'}} \fi \left[\ell(f_{w^*}(X'),Y')\right]},\notag \end{align}\tag{11}\] where Eq. (11 ) is by Eq. (10 ) and the last inequality is again by the triangle property of the loss function. This completes the proof. ◻
One of the main ingredients to derive our sample complexity bound is the following lemma, where a concentration bound for a class of unbounded functions is given.
Lemma 7 ([68]). Let \(\kappa>2\) and \(\mathcal{G}=\{g:\mathcal{Z}\rightarrow\mathbb{R} \text{ s.t. } {\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}< +\infty\}\). Assume \({\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[g(Z)^\kappa\right]}< +\infty\) for all \(g\in \mathcal{G}\). Let \(\hat{\mu}\) be the empirical distributions consist of \(n\) data points sampled i.i.d. from \(\mu\). If \(\mathcal{G}\) has the finite pseudo-dimension \(d\), then for \(\forall \delta\in(0,1)\), the following inequality holds for all \(g\in \mathcal{G}\) with probability at least \(1-\delta\), \[\begin{align} {\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[g(Z)\right]} \leq {\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[g(Z)\right]} + 2\Lambda(\kappa)\sqrt[\kappa]{{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[g(Z)^\kappa\right]}}\sqrt{\frac{1}{n}\left(d\log{\frac{2en}{d}}+\log{\frac{4}{\delta}}\right)}, \end{align}\] where \(\Lambda(\kappa)=\left(\frac{1}{2}\right)^\frac{2}{\kappa}\left(\frac{\kappa}{\kappa-2}\right)^\frac{\kappa-1}{\kappa}\).
Below is another useful lemma for the bounded case, which comes from [69] with a slight modification (by invoking a different VC-dimension based generalization bound from [70]).
Lemma 8. Let \(\mathcal{F}=\{f:\mathcal{Z}\rightarrow\mathbb{R}^+\}\). Assume \({\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[f(Z)\right]}< M\) for all \(f\in\mathcal{F}\) for some constant \(M>0\). Let \(\hat{\mu}\) be the empirical distributions consist of \(n\) data points sampled i.i.d. from \(\mu\). If \(\mathcal{F}\) has the finite pseudo-dimension \(d\), then for \(\forall \delta\in(0,1)\), the following inequality holds for all \(f\in \mathcal{F}\) with probability at least \(1-\delta\), \[\begin{align} {\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[f(Z)\right]} \leq {\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[f(Z)\right]} + 2M\sqrt{\frac{1}{n}\left(d\log{\frac{2en}{d}}+\log{\frac{4}{\delta}}\right)}. \end{align}\]
We are now in a position to state our sample complexity bound.
Theorem 9. Let \(\hat{\mu}\) and \(\hat{\mu}'\) be the empirical distributions consist of \(n\) source data and \(m\) target data sampled i.i.d. from \(\mu\) and \(\mu'\), respectively. Let \(\mathcal{G}=\{g:\mathcal{Z}\rightarrow\mathbb{R} \text{ s.t. } {\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}< \infty\}\) with finite pseudo-dimension \(d_1\), and let the pseudo-dimension of \(\{\exp{}\circ g | g\in\mathcal{G}\}\) be \(d_2\). Let \(\kappa>2\) and assume that \({\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[g(Z)^\kappa\right]}< +\infty\) for all \(g\in \mathcal{G}\). Assume there exists a constant \(\alpha\le \min_{g\in\mathcal{G}}\{{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]},{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}\}\). Then for \(\forall \delta\in(0,1)\) the following bound holds with probability at least \(1-\delta\), \[\mathrm{D_{KL}}(\mu'||\mu)-\mathrm{D_{KL}}(\hat{\mu}'||\hat{\mu})\leq C_1(\kappa)\sqrt{\frac{1}{n}\left(d_1\log{\frac{2en}{d_1}}+\log{\frac{4}{\delta}}\right)}+C_2(\alpha) \sqrt{\frac{1}{m}\left(d_2\log{\frac{2em}{d_2}}+\log{\frac{4}{\delta}}\right)},\] where \(C_1(\kappa)=\left(\frac{1}{2}\right)^\frac{2-\kappa}{\kappa}\left(\frac{\kappa}{\kappa-2}\right)^\frac{\kappa-1}{\kappa}\sup_{g\in\mathcal{G}}\sqrt[\kappa]{{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[g(Z)^\kappa\right]}}\) and \(C_2(\alpha)=\frac{2}{\alpha}\sup_{g\in\mathcal{G}}{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}\).
Proof. Recall Lemma 1, we have \[\mathrm{D_{KL}}(\mu'||\mu)=\sup_{g\in\mathcal{G}} {\ifx&\mu'& \mathbb{E} \else {\mathbb{E}_{\mu'}} \fi \left[g(Z')\right]} - \log{{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}},\] and \[\mathrm{D_{KL}}(\hat{\mu}'||\hat{\mu})=\sup_{g\in\mathcal{G}} {\ifx&\hat{\mu}'& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}'}} \fi \left[g(Z')\right]} - \log{{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}}.\]
Then, with the probability at least \(1-\delta\), \[\begin{align} &\mathrm{D_{KL}}(\mu'||\mu)-\mathrm{D_{KL}}(\hat{\mu}'||\hat{\mu})\notag\\ =&\sup_{g\in\mathcal{G}} {\ifx&\mu'& \mathbb{E} \else {\mathbb{E}_{\mu'}} \fi \left[g(Z')\right]} - \log{{\ifx&{\mu}& \mathbb{E} \else {\mathbb{E}_{{\mu}}} \fi \left[e^{g(Z)}\right]}} - \left(\sup_{g\in\mathcal{G}} {\ifx&\hat{\mu}'& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}'}} \fi \left[g(Z')\right]} - \log{{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}}\right)\notag\\ \leq& \sup_{g\in\mathcal{G}} {\ifx&\mu'& \mathbb{E} \else {\mathbb{E}_{\mu'}} \fi \left[g(Z')\right]} - \log{{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}} - \left({\ifx&\hat{\mu}'& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}'}} \fi \left[g(Z')\right]} - \log{{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}}\right)\notag\\ =& \sup_{g\in\mathcal{G}} {\ifx&\mu'& \mathbb{E} \else {\mathbb{E}_{\mu'}} \fi \left[g(Z')\right]}- {\ifx&\hat{\mu}'& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}'}} \fi \left[g(Z')\right]}+ \log{{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}} - \log{{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}} \notag\\ \leq& \sup_{g\in\mathcal{G}} \left|{\ifx&\mu'& \mathbb{E} \else {\mathbb{E}_{\mu'}} \fi \left[g(Z')\right]}- {\ifx&\hat{\mu}'& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}'}} \fi \left[g(Z')\right]}\right|+ \sup_{g\in\mathcal{G}}\left|\log{{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}} - \log{{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}}\right| \notag\\ \leq& \sup_{g\in\mathcal{G}} \left|{\ifx&\mu'& \mathbb{E} \else {\mathbb{E}_{\mu'}} \fi \left[g(Z')\right]}- {\ifx&\hat{\mu}'& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}'}} \fi \left[g(Z')\right]}\right|+ \sup_{g\in\mathcal{G}}\frac{1}{\alpha}\left|{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]} - {\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}\right|\tag{12}\\ \leq& C_1(\kappa)\sqrt{\frac{1}{n}\left(d_1\log{\frac{2en}{d_1}}+\log{\frac{4}{\delta}}\right)}+C_2(\alpha) \sqrt{\frac{1}{m}\left(d_2\log{\frac{2em}{d_2}}+\log{\frac{4}{\delta}}\right)},\tag{13} \end{align}\] where Eq. (12 ) is derived below.
W.L.O.G. assume that \({\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}\leq{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}\) (and Eq. (12 ) still holds when \({\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}\geq{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}\)), then \[\begin{align} \left|\log {\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]} - \log {\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}\right| = \left|\log\frac{{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}}{{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}}\right| =& \left|\log\left(1+\frac{{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}}{{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}}-1\right)\right|\\ \leq& \left|\frac{{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}}{{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}}-1\right| \\ =& \left|\frac{1}{{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}}\left({\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}-{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}\right)\right|\\ \leq& \frac{1}{\alpha}\left|{\ifx&\mu& \mathbb{E} \else {\mathbb{E}_{\mu}} \fi \left[e^{g(Z)}\right]}-{\ifx&\hat{\mu}& \mathbb{E} \else {\mathbb{E}_{\hat{\mu}}} \fi \left[e^{g(Z)}\right]}\right|. \end{align}\] Eq. (13 ) is by Lemma 7 and Lemma 8. This concludes the proof. ◻
With Theorem 9 and Theorem 1, we immediately have the following corollary.
Corollary 6. Let the conditions in Theorem 9 and Theorem 1 hold, then for any \(w\in\mathcal{W}\), \[\left|\widetilde{\mathrm{Err}}(w)\right| \leq \sqrt{2}R\sqrt{\mathrm{D_{KL}}(\hat{\mu}'||\hat{\mu})+C_1(\kappa)\sqrt{\frac{1}{n}\left(d_1\log{\frac{2en}{d_1}}+\log{\frac{4}{\delta}}\right)}+C_2(\alpha) \sqrt{\frac{1}{m}\left(d_2\log{\frac{2em}{d_2}}+\log{\frac{4}{\delta}}\right)}} ,\] where \(C_1(\kappa)\) and \(C_2(\alpha)\) are the same as in Theorem 9.
Characterizing the convergence of the empirical KL divergence to the real KL is a challenging task that often requires several additional assumptions, as demonstrated in Theorem 9. However, it is worth noting that the convergence rate of the empirical distribution to the real distribution in the KL sense is already established in the discrete space. This fact is supported by a classic result in [71], which we state in the following theorem:
Theorem 10. Let \(\hat{\mu}\) and \(\hat{\mu}'\) be defined as in Theorem 9. Assume the space of \(\mathcal{Z}\) is finite (i.e. \(|\mathcal{Z}|\leq\infty\)), then for \(\forall \delta\in(0,1)\), with probability at least \(1-\delta\), \[\mathrm{D_{KL}}(\hat{\mu}||\mu)\leq \frac{|\mathcal{Z}|}{n}\log{(n+1)}+\frac{1}{n}\log{\frac{1}{\delta}},\qquad \mathrm{D_{KL}}(\hat{\mu}'||\mu')\leq \frac{|\mathcal{Z}|}{m}\log{(m+1)}+\frac{1}{m}\log{\frac{1}{\delta}}.\]
Thus, it suffices to ensure that the empirical KL converge to the real KL with the similar rate, although we do not know if there might exist a faster convergence rate.
In Section 0.0.4, some results require that the loss obeys the triangle inequality (i.e. Assumption 4), such as Theorem 2 and Theorem 5. While the \(0-1\) loss satisfies Assumption 4, some other loss may not. Thus, to generalize Theorem 2 and Theorem 5, we invoke an approximate triangle inequality, which is originally defined in [72].
Assumption 5 (\(\alpha\)-Triangle). \(\ell(\cdot,\cdot)\) is symmetric and satisfies the following \(\alpha\)-triangle inequality: \(\ell(y_1,y_2)\leq\alpha\left(\ell(y_1,y_3)+\ell(y_3,y_2)\right)~\textit{for any}~y_1,y_2,y_3\in\mathcal{Y}\), where \(\alpha\geq 1\) is a constant that may depend on the hypothesis space \(\mathcal{W}\) and the loss \(\ell\).
Remark 9. We note that the squared loss satisfies \(2\)-triangle inequality.
Thus, Theorem 2 can be easily generalized below.
Theorem 11. If Assumption 5 holds and let \(\ell(f_{w'}(X),f_{w}(X))\) be \(R\)-subgaussian for any \(w,w'\in \mathcal{W}\). Then for any \(w\), \[\widetilde{\mathrm{Err}}(w) \leq (\alpha^2-1)R_\mu+ \alpha\sqrt{2R^2\mathrm{D_{KL}}(P_{X'}||P_{X})}+\alpha^2\lambda^*,\] where \(\lambda^*=\min_{w\in\mathcal{W}}R_{\mu'}(w)+R_\mu(w)\).
Theorem 5 can be generalized in the similar way. While Theorem 11 strictly speaking is not a generalization bound, as it includes \(R_\mu\) in the bound, it shares the same underlying concept as Theorem 2. Namely, to minimize the population risk in the target domain, it is essential for the source domain and target domain to be similar, and for both \(R_\mu\) and \(\lambda^*\) to be kept small.
To derive the bound in Theorem 6, we need to make use of the second equality in Eq. (1 ). In fact, by the definition of \(\mathrm{Err}\) (the first equality in Eq. (1 )), the unlabelled sample \(S'_{X_j'}\) does not explicitly appear, so one can easily apply the similar information-theoretic analysis starting from the first equality in Eq. (1 ), and obtain an upper bound that consists of \(I(W;Z_i)\) and \(\mathrm{D_{KL}}(\mu||\mu')\). Precisely, the following bound holds,
Theorem 12. Assume \(\ell(f_w(X'),Y')\) is \(R\)-subgaussian for any \(w\in\mathcal{W}\). Then \[\left|{\mathrm{Err}}\right| \leq \frac{1}{n}\sum_{i=1}^n\mathbb{E}\sqrt{2R^2I(W;Z_i)}+\sqrt{2R^2\mathrm{D_{KL}}(\mu||\mu')}.\]
The proof of Theorem 12 is nearly the same to the proof of [39] and [41] Corollary 1.
It’s important to note that although \[I(W;Z_i)\leq I(W;Z_i|X_j')={\ifx&X_j'& \mathbb{E} \else {\mathbb{E}_{X_j'}} \fi \left[I^{X_j'}(W;Z_i)\right]},\] the bound in Theorem 6 is incomparable to the bound based on \(I(W;Z_i)\). This is mainly due to the fact that we use the disintegrated version of mutual information, \(I^{X_j'}(W;Z_i)\), and the expectation over \(X_j'\) is outside of the square root, which is a convex function. Using \(I^{X_j'}(W;Z_i)\) instead of \(I(W;Z_i)\) allows us to figure out more details about the role of unlabelled target data in the algorithm. Additionally, one can also prove a bound based on \(I(W;Z_i|X_j')\) (e.g., simply applying Jensen’s inequality to Theorem 6), which is close to an individual and UDA version of [42].
Furthermore, the first term in Theorem 6 characterize the expected generalization gap on the source domain (i.e. \({\ifx&W,S& \mathbb{E} \else {\mathbb{E}_{W,S}} \fi \left[R_\mu(W)-R_S(W)\right]}\)), then the bound suggests us that it’s possible to invoke the unlabelled target data to further improve the performance on source domain, and the simplest case is the semi-supervised learning (when \(\mu=\mu'\)).
Notably, bounds in [39], [40] fail to characterize the dependence between \(W\) and \(S'_{X'}\). More precisely, the algorithm-dependent term in their bounds is \(I(W;Z_i)\) or \(I(W;S)\), while our algorithm-dependent term is \(I^{X_j'}(W;Z_i)\) that directly depends on the unlabelled target data. Moreover, while the disintegrated mutual information \(I^{X_j'}(W;Z_i)\) and the unconditional mutual information \(I(W;Z_i)\) cannot be directly compared, recent work by [73] provides empirical evidence comparing similar terms in the supervised learning setting. Specifically, they demonstrate that when the empirical risk is small, such as in a realizable case, the disintegrated mutual information is smaller than the unconditional mutual information. Conversely, when the empirical risk is large, the unconditional mutual information is the smaller of the two.
Note that \(S\) depends on \(S_{X'}'\) given \(W\), so intuitively the dependence between each individual instance \(Z_i\) and \(X_j'\) is weaker when \(n\) and \(m\) become larger. More precisely, W.L.O.G let \(i=j=1\), and recall that \(W=\mathcal{A}(S_{X'}',S)\), when \(n,m\rightarrow \infty\), taking \(S\) and \(S_{X'}'\) as the input of the algorithm is nearly equivalent to computing \(W\) based on the source distribution \(\mu\) and the target distribution \(P_{X'}\), thus, \(W\) will only depend on the two distributions, without depending on the realizations \(Z_1\) and \(X'_1\) drawn respectively from the two distributions, that is, \(I(Z_1;X_1'|W)=I(Z_1;X_1'|\mathcal{A}(\mu,P_{X'}))=I(Z_1;X_1')=0\). In addition, one may argue that what if \(W=constant\) that does not really depend on the input data. In this case, \(I(Z_1;X_1'|W)=I(Z_1;X_1')=0\) will hold trivially. In the other extreme, if \(n=1\) and \(m=1\), then \(W=\mathcal{A}(X_1',Z_1)\), and the quantity \(I(Z_1;X_1'|\mathcal{A}(X_1',Z_1))\) should be large. When \(n\) and \(m\) increase, it becomes \(I(Z_1;X_1'|\mathcal{A}(X_{1:m}',Z_{1:n}))\). Now we want to guess \(Z_1\) from \(X_1'\), this should be easier when having the knowledge of \(\mathcal{A}(X_1';Z_1)\) compared with when having the knowledge of \(\mathcal{A}(X_{1:m}';Z_{1:n})\).
Proof. By Lemma 1, \[\begin{align} &\mathrm{D_{KL}}\left(P_{W,Z_i|X_j'=x_j'}||P_{W,Z'|X_j'=x_j'}\right)\notag\\ =&\mathrm{D_{KL}}\left(P_{W,Z_i|X_j'=x_j'}||P_{W|X_j'=x_j'}P_{Z'}\right)\label{eq:independence-1}\\ \geq& \sup_t {\ifx&P_{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W,Z_i|X_j'=x_j'}}} \fi \left[t\ell(f_W(X_i),Y_i)\right]}-\log{{\ifx&P_{W|X_j'=x_j'}P_{Z'}& \mathbb{E} \else {\mathbb{E}_{P_{W|X_j'=x_j'}P_{Z'}}} \fi \left[\exp{\left(t\ell(f_W(X'),Y')\right)}\right]}}\notag\\ \geq&\sup_t {\ifx&P_{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W,Z_i|X_j'=x_j'}}} \fi \left[t\ell(f_W(X_i),Y_i)\right]}-{\ifx&P_{W|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W|X_j'=x_j'}}} \fi \left[tR_{\mu'}(W)\right]}-R^2t^2/2,\notag \end{align}\tag{14}\] where Eq. (14 ) is by the independence between algorithm output \(W\) and unseen target domain data \(Z'\), and the last inequality is by the subgaussian assumption.
Thus, \[\begin{align} \left\lvert{\ifx&P_{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W,Z_i|X_j'=x_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]}-{\ifx&P_{W|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W|X_j'=x_j'}}} \fi \left[R_{\mu'}(W)\right]}\right\rvert\leq\sqrt{2R^2 \mathrm{D_{KL}}\left(P_{W,Z_i|X_j'=x_j'}||P_{W|X_j'=x_j'}P_{Z'}\right)}.\label{ineq:single-kl} \end{align}\tag{15}\]
Exploiting the fact that \[\begin{align} \left|{\mathrm{Err}}\right|=&\left|{\frac{1}{n}\sum_{i=1}^{n}{\ifx&{W,Z_i}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i}}} \fi \left[\ell(f_W(X_i),Y_i)\right]} - {\ifx&{W,Z'}& \mathbb{E} \else {\mathbb{E}_{{W,Z'}}} \fi \left[\ell(f_W(X'),Y')\right]}}\right|\\ =&\left|\frac{1}{m}\sum_{j=1}^{m}{\ifx&X'_j& \mathbb{E} \else {\mathbb{E}_{X'_j}} \fi \left[\frac{1}{n}\sum_{i=1}^{n}{\ifx&{W,Z_i|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]} - {\ifx&{W,Z'|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z'|X_j'}}} \fi \left[\ell(f_W(X'),Y')\right]}\right]}\right|\\ \leq&\frac{1}{m}\sum_{j=1}^{m}\mathbb{E}_{X_j'}\left|{\frac{1}{n}\sum_{i=1}^{n}{\ifx&{W,Z_i|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]} - {\ifx&{W,Z'|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z'|X_j'}}} \fi \left[\ell(f_W(X'),Y')\right]}}\right|\\ \leq& \frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\left|{{\ifx&{W,Z_i|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]} - {\ifx&{W|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'}}} \fi \left[R_{\mu'}(W)\right]}}\right|, \end{align}\] where the last two inequalities are by the Jensen’s inequality for the absolute function.
Notice that \[\begin{align} \mathrm{D_{KL}}\left(P_{W,Z_i|X_j'=x_j'}||P_{W|X_j'=x_j'}P_{Z'}\right) =&{\ifx&P_{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W,Z_i|X_j'=x_j'}}} \fi \left[\log{\frac{P_{W,Z_i|X_j'=x_j'}}{P_{W|X_j'=x_j'}P_{Z'}}}\right]}\\ =&{\ifx&P_{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W,Z_i|X_j'=x_j'}}} \fi \left[\log{\frac{P_{W|Z_i,X_j'=x_j'}P_{Z_i}}{P_{W|X_j'=x_j'}P_{Z'}}}\right]}\\ =&{\ifx&P_{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W,Z_i|X_j'=x_j'}}} \fi \left[\log{\frac{P_{W|Z_i,X_j'=x_j'}}{P_{W|X_j'=x_j'}}}\right]}+{\ifx&P_{Z_i}& \mathbb{E} \else {\mathbb{E}_{P_{Z_i}}} \fi \left[\log{\frac{P_{Z_i}}{P_{Z'}}}\right]}\\ =&I(W;Z_i|X_j'=x_j')+\mathrm{D_{KL}}(\mu||\mu'). \end{align}\]
Recall Eq. (15 ), we then have \[\begin{align} \left|{\mathrm{Err}}\right|\leq& \frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\left|{{\ifx&{W,Z_i|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]} - {\ifx&{W|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'}}} \fi \left[R_{\mu'}(W)\right]}}\right|\\ \leq&\frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\sqrt{2R^2 \mathrm{D_{KL}}\left(P_{W,Z_i|X_j'}||P_{W|X_j'}P_{Z'}\right)}\\ =&\frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\sqrt{2R^2(I^{X_j'}(W;Z_i)+\mathrm{D_{KL}}(\mu||\mu'))}\\ \leq&\frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\sqrt{2R^2I^{X_j'}(W;Z_i)}+\sqrt{2R^2\mathrm{D_{KL}}(\mu||\mu')}. \end{align}\] This completes the proof. ◻
Proof. We now modify the proof in Theorem 6.
Recall that \[\begin{align} \left|{\mathrm{Err}}\right|\leq& \frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\left|{{\ifx&{W,Z_i|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]} - {\ifx&{W|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'}}} \fi \left[R_{\mu'}(W)\right]}}\right|. \end{align}\]
We first decompose the right hand side, \[\begin{align} &\left|{{\ifx&{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'=x_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]} - {\ifx&{W|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'=x_j'}}} \fi \left[R_{\mu'}(W)\right]}}\right|\\ =& \left|{{\ifx&{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'=x_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]}-{\ifx&{W|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'=x_j'}}} \fi \left[R_{\mu}(W)\right]} +{\ifx&{W|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'=x_j'}}} \fi \left[R_{\mu}(W)\right]} - {\ifx&{W|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'=x_j'}}} \fi \left[R_{\mu'}(W)\right]}}\right|\\ \leq& \left|{\ifx&{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'=x_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]}-{\ifx&{W|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'=x_j'}}} \fi \left[R_{\mu}(W)\right]}\right| +\left|{\ifx&{W|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'=x_j'}}} \fi \left[R_{\mu}(W)-R_{\mu'}(W)\right]}\right|\\ \leq& \left|{\ifx&{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'=x_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]}-{\ifx&{W|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'=x_j'}}} \fi \left[R_{\mu}(W)\right]}\right| +\frac{M}{\sqrt{2}}\sqrt{\min\{\mathrm{D_{KL}}(\mu||\mu'),\mathrm{D_{KL}}(\mu'||\mu)\}}, \end{align}\] where the last inequality is by Corollary 2.
Then for the first term in RHS, notice that \[\begin{align} &\mathrm{D_{KL}}\left(P_{W,Z|X_j'=x_j'}||P_{W,Z_i|X_j'=x_j'}\right)\\ =&\mathrm{D_{KL}}\left(P_{W|X_j'=x_j'}P_{Z}||P_{W,Z_i|X_j'=x_j'}\right)\\ \geq& \sup_t {\ifx&P_{W|X_j'=x_j'}P_{Z}& \mathbb{E} \else {\mathbb{E}_{P_{W|X_j'=x_j'}P_{Z}}} \fi \left[t\ell(f_W(X),Y)\right]}-\log{{\ifx&P_{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W,Z_i|X_j'=x_j'}}} \fi \left[\exp{t\ell(f_W(X_i),Y_i)}\right]}}\\ \geq&\sup_t {\ifx&P_{W|X_j'=x_j'}P_{Z}& \mathbb{E} \else {\mathbb{E}_{P_{W|X_j'=x_j'}P_{Z}}} \fi \left[t\ell(f_W(X),Y)\right]}-{\ifx&P_{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W,Z_i|X_j'=x_j'}}} \fi \left[t\ell(f_W(X_i),Y_i)\right]}\\&-\log{{\ifx&P_{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W,Z_i|X_j'=x_j'}}} \fi \left[e^{t(\ell(f_W(X_i),Y_i)-{\ifx&P_{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W,Z_i|X_j'=x_j'}}} \fi \left[\ell(f_W(X_i),Y_)\right]})}\right]}}\\ \geq&\sup_t {\ifx&P_{W|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W|X_j'=x_j'}}} \fi \left[tR_{\mu}(W)\right]}-{\ifx&P_{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{P_{W,Z_i|X_j'=x_j'}}} \fi \left[t\ell(f_W(X_i),Y_i)\right]}-M^2t^2/8, \end{align}\] where the last inequality is due to the fact that \(\ell\) is bounded by \(M\) and \(\ell(f_W(X_i),Y_i)\) is \(M/2\)-subgaussian.
Thus, \[\begin{align} \left|{\ifx&{W,Z_i|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'=x_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]}-{\ifx&{W|X_j'=x_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'=x_j'}}} \fi \left[R_{\mu}(W)\right]}\right|\leq& \sqrt{\frac{M^2}{2}\mathrm{D_{KL}}\left(P_{W|X_j'=x_j'}P_{Z}||P_{W,Z_i|X_j'=x_j'}\right)}\\ =& \sqrt{\frac{M^2}{2}L\left(W,Z_i|X_j'=x_j'\right)}.\\ \end{align}\] Plugging this inequality with the decomposition into the inequality at the beginning of the proof, we have \[\begin{align} \left|{\mathrm{Err}}\right|\leq& \frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\sqrt{\frac{M^2}{2}L^{X_j'}\left(W,Z_i\right)}+\frac{M}{\sqrt{2}}\sqrt{\min\{\mathrm{D_{KL}}(\mu||\mu'),\mathrm{D_{KL}}(\mu'||\mu)\}}. \end{align}\] Similar development also holds for \(\mathrm{D_{KL}}\left(P_{W,Z_i|X_j'=x_j'}||P_{W|X_j'=x_j'}P_{Z}\right)\) as in the proof of Theorem 6, thus \[\left|{\mathrm{Err}}\right| \leq \frac{M}{\sqrt{2}nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\sqrt{\min\left\{I^{X_j'}(W;Z_i),L^{X_j'}(W;Z_i)\right\}}+\frac{M}{\sqrt{2}}\sqrt{\min\left\{\mathrm{D_{KL}}(\mu||\mu'),\mathrm{D_{KL}}(\mu'||\mu)\right\}}.\] This completes the proof. ◻
Proof. Similar to the proof of Corollary 4, recall Theorem 4, \[\begin{align} &\left|{\mathrm{Err}}\right|\\ \leq& \frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\left|{{\ifx&{W,Z_i|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]} - {\ifx&{W|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'}}} \fi \left[R_\mu(W)\right]} + {\ifx&{W|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'}}} \fi \left[R_\mu(W)\right]}- {\ifx&{W|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'}}} \fi \left[R_{\mu'}(W)\right]}}\right|\\ \leq& \frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\left|{{\ifx&{W,Z_i|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W,Z_i|X_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]} - {\ifx&{W|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'}}} \fi \left[R_\mu(W)\right]} }\right|+\beta\mathbb{W}(\mu,\mu')\\ \leq& \frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j',Z_i}\left|{{\ifx&{W|Z_i,X_j'}& \mathbb{E} \else {\mathbb{E}_{{W|Z_i,X_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]} - {\ifx&{W|X_j'}& \mathbb{E} \else {\mathbb{E}_{{W|X_j'}}} \fi \left[\ell(f_W(X_i),Y_i)\right]} }\right|+\beta \mathbb{W}(\mu,\mu')\\ \leq& \frac{\beta'}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j',Z_i}\mathbb{W}(P_{W|X_j',Z_i},P_{W|X_j'})+\beta \mathbb{W}(\mu,\mu'), \end{align}\] where the last inequality is by Lemma 3. This concludes the proof. ◻
Proof. Similar to the proof of Corollary 3, replacing Wasserstein distance by the total variation and replacing \(\beta\) and \(\beta'\) by \(M\), will give us the first inequality, \[\begin{align} \left|\widetilde{\mathrm{Err}}\right|&\leq \frac{M}{nm}\sum_{j=1}^{m}\sum_{i=1}^n{\ifx&X_j',Z_i& \mathbb{E} \else {\mathbb{E}_{X_j',Z_i}} \fi \left[\mathrm{TV}(P_{W|Z_i,X_j'},P_{W|X_j'})\right]}+M\mathrm{TV}(\mu,\mu'). \end{align}\] The second inequality is by Lemma 4, \[\left|\widetilde{\mathrm{Err}}\right|\leq \frac{M}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j',Z_i}\sqrt{\frac{1}{2}\mathrm{D_{KL}}(P_{W|Z_i,X_j'}||P_{W|X_j'})}+\sqrt{\frac{M^2}{2}\mathrm{D_{KL}}(\mu||\mu')}.\] Again, one can also apply Lemma 5 here. This concludes the proof. ◻
Proof. Recall Theorem 6 and by Jensen’s inequality we have \[\begin{align} \left|{\mathrm{Err}}\right| \leq& \frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^n\mathbb{E}_{X_j'}\sqrt{2R^2I^{X_j'}(W;Z_i)}+\sqrt{2R^2\mathrm{D_{KL}}(\mu||\mu')}\\ \leq&\sqrt{\frac{2R^2}{nm}\sum_{j=1}^{m}\sum_{i=1}^nI(W;Z_i|X_j')}+\sqrt{2R^2\mathrm{D_{KL}}(\mu||\mu')}. \end{align}\]
Let \(X'_{1,\dots,j-1,j+1,\dots,m}=S'_{X'}\setminus X_j'\). Notice that \[\begin{align} I(W;Z_i|S'_{X'})=& I(W;Z_i|S'_{X'})+I(X'_{1,\dots,j-1,j+1,\dots,m};Z_i|X_j')\\ =& I(W;Z_i|X_j')+I(X'_{1,\dots,j-1,j+1,\dots,m};Z_i|X_j',W)\\ \geq& I(W;Z_i|X_j'). \end{align}\]
Thus, \(I(W;Z_i|X_j')\leq I(W;Z_i|S'_{X'})\). Then \[\frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^nI(W;Z_i|X_j')\leq\frac{1}{nm}\sum_{j=1}^{m}\sum_{i=1}^nI(W;Z_i|S'_{X'})=\frac{1}{n}\sum_{i=1}^nI(W;Z_i|S'_{X'}).\]
Then, since \(S \perp\!\!\!\perp S'_{X'}\) and \(Z_i\perp\!\!\!\perp Z_{1:i-1}\) for any \(i\in [n]\), by the chain rule of mutual information, we have \[\begin{align} I(W;S|S'_{X'})=\sum_{i=1}^nI(W;Z_i|S'_{X'},Z_{1:i-1})=&\sum_{i=1}^nI(W;Z_i|S'_{X'},Z_{1:i-1})+I(Z_i;Z_{1:i-1})\\ =&\sum_{i=1}^nI(W,Z_{1:i-1};Z_i|S'_{X'})\\ =&\sum_{i=1}^nI(W;Z_i|S'_{X'})+I(Z_i;Z_{1:i-1}|S'_{X'},W)\\ \geq&\sum_{i=1}^nI(W;Z_i|S'_{X'}). \end{align}\]
Thus, the generalization error bound becomes \[\left|{\mathrm{Err}}\right|\leq\sqrt{\frac{2R^2}{n}I(W;S|S'_{X'})}+\sqrt{2R^2\mathrm{D_{KL}}(\mu||\mu')}.\]
Recall the updating rule of \(W\) and notice that \(W_0\) is independent of \(S\) and \(S'_{X'}\), the following process is by using the chain rule of mutual information and data processing inequality recurrently, \[\begin{align} I(W_T;S|S'_{X'})=& I(W_{T-1}-\eta_T g(W_{T-1},Z_{B_T},X'_{B_T})+N_T;S|S'_{X'})\\ \leq& I(W_{T-1},-\eta_T g(W_{T-1},Z_{B_T},X'_{B_T})+N_T;S|S'_{X'})\\ =& I(W_{T-1};S|S'_{X'})+I(\eta_T g(W_{T-1},Z_{B_T},X'_{B_T})+N_T;S|S'_{X'},W_{T-1})\\ \vdots&\\ =&\sum_{t=1}^T I(\eta_t g(W_{t-1},Z_{B_t},X'_{B_t})+N_t;S|S'_{X'},W_{t-1}). \end{align}\]
For each \(t\in [T]\), denote \(g(W_{t-1},Z_{B_t},X'_{B_t})\) as \(G_t\), then
\[\begin{align} I(\eta_t g(W_{t-1},Z_{B_t},X'_{B_t})+N_t;S|S'_{X'},W_{t-1})=&{\ifx&S'_{X'},W_{t-1},S& \mathbb{E} \else {\mathbb{E}_{S'_{X'},W_{t-1},S}} \fi \left[\mathrm{D_{KL}}(P_{G_t+\frac{N_t}{\eta_t}|S,S'_{X'},W_{t-1}}||P_{G_t+\frac{N_t}{\eta_t}|S'_{X'},W_{t-1}})\right]}\\ \leq& {\ifx&S'_{X'},W_{t-1},S& \mathbb{E} \else {\mathbb{E}_{S'_{X'},W_{t-1},S}} \fi \left[\mathrm{D_{KL}}(P_{G_t+\frac{N_t}{\eta_t}|S,S'_{X'},W_{t-1}}||P_{{\ifx&S& \mathbb{E} \else {\mathbb{E}_{S}} \fi \left[G_t\right]}+\frac{N_t}{\eta_t}|S'_{X'},W_{t-1}})\right]}\\ =&\frac{\eta_t^2}{2\sigma^2_t}{\ifx&S'_{X'},W_{t-1},S& \mathbb{E} \else {\mathbb{E}_{S'_{X'},W_{t-1},S}} \fi \left[\left|\left|G_t-{\ifx&S& \mathbb{E} \else {\mathbb{E}_{S}} \fi \left[G_t\right]}\right|\right|^2\right]}, \end{align}\] where the inequality is by Lemma 6 and the last equality is by the KL divergence between two Gaussian distributions.
Finally, putting everything together, \[\left|{\mathrm{Err}}\right|\leq\sqrt{\frac{R^2}{n}\sum_{t=1}^T\frac{\eta_t^2}{\sigma^2_t}{\ifx&S'_{X'},W_{t-1},S& \mathbb{E} \else {\mathbb{E}_{S'_{X'},W_{t-1},S}} \fi \left[\left|\left|G_t-{\ifx&S& \mathbb{E} \else {\mathbb{E}_{S}} \fi \left[G_t\right]}\right|\right|^2\right]}}+\sqrt{2R^2\mathrm{D_{KL}}(\mu||\mu')},\] which concludes the proof. ◻
Recall the expected cross-entropy loss, we have \[\begin{align} {\ifx&W,Z_i& \mathbb{E} \else {\mathbb{E}_{W,Z_i}} \fi \left[\ell(f_W(T_i),Y_i)\right]} &= {\ifx&Z_i,W& \mathbb{E} \else {\mathbb{E}_{Z_i,W}} \fi \left[-\log{Q_{Y_i|T_i,W}}\right]}\\ &={\ifx&Z_i,W& \mathbb{E} \else {\mathbb{E}_{Z_i,W}} \fi \left[\log{\frac{P_{Y_i|T_i,W}}{Q_{Y_i|T_i,W}P_{Y_i|T_i,W}}}\right]}\\ &=H(Y_i|T_i,W) +{\ifx&X_i,W& \mathbb{E} \else {\mathbb{E}_{X_i,W}} \fi \left[\mathrm{D_{KL}}(P_{Y_i|T_i,W}||Q_{Y_i|T_i,W})\right]}\\ &={\ifx&Z_i,W& \mathbb{E} \else {\mathbb{E}_{Z_i,W}} \fi \left[\log{\frac{P_{Y_i|T_i}P_{W|T_i}}{P_{Y_i|T_i,W}P_{Y_i|T_i}P_{W|T_i}}}\right]} +{\ifx&T_i,W& \mathbb{E} \else {\mathbb{E}_{T_i,W}} \fi \left[\mathrm{D_{KL}}(P_{Y_i|T_i,W}||Q_{Y_i|T_i,W})\right]}\\ &={\ifx&Z_i,W& \mathbb{E} \else {\mathbb{E}_{Z_i,W}} \fi \left[\log{\frac{P_{Y_i|T_i}P_{W|T_i}}{P_{Y_i,W|T_i}P_{Y_i|T_i}}}\right]} +{\ifx&T_i,W& \mathbb{E} \else {\mathbb{E}_{T_i,W}} \fi \left[\mathrm{D_{KL}}(P_{Y_i|T_i,W}||Q_{Y_i|T_i,W})\right]}\\ &=H(Y_i|T_i)-I(W;Y_i|T_i)+{\ifx&T_i,W& \mathbb{E} \else {\mathbb{E}_{T_i,W}} \fi \left[\mathrm{D_{KL}}(P_{Y_i|T_i,W}||Q_{Y_i|T_i,W})\right]} \end{align}\]
In Section 0.0.5, we discussed the LIMIT approach proposed by [57] as a means of controlling label information memorization during training. Roughly speaking, to update the classifier parameters, LIMIT constructs an auxiliary network that predicts gradients instead of using the true gradients, which avoids direct use of the true labels for training. To obtain accurate gradients, the auxiliary network needs to be trained using the true labels. We found that the training of LIMIT is unstable and difficult to tune the hyperparameters when used under UDA settings. Therefore, we opted to use the pseudo label strategy proposed in Section 0.0.5 instead of the pseudo gradient strategy.
We implemented our approach using PyTorch [74] and conducted all experiments on NVIDIA Tesla V100 GPUs with 32 GB of memory. Our code builds largely on the implementation from [62]3 and [9]4.
For every iteration, the objective function after adding the gradient penalty becomes \[\min_{W} \hat{L}(W,Z_{B_t},X'_{B_t})+\lambda_1||g(W,Z_{B_t},X'_{B_t})||^2,\] where \(\hat{L}(W,Z_{B_t},X'_{B_t})\) is some loss function for the source and target domain data in the current mini-batch and \(\lambda_1\) is the trade-off coefficient. For example, if we combine ERM with gradient penalty then \(\hat{L}(W,Z_{B_t},X'_{B_t})=\frac{1}{|B_t|}\sum_{k\in B_t}\ell(f_W(X_k),Y_k)\) and \(\ell\) could be the cross-entropy loss. Moreover, if we combine KL guided marginal alignment algorithm [9] with gradient penalty then the objective function is \[\min_{W,\theta} \frac{1}{|B_t|}\sum_{k\in B_t}\ell(f_W(T_k),Y_k)+\beta_1\mathrm{D_{KL}}(P_{T'}||P_T)+\beta_2\mathrm{D_{KL}}(P_T||P_{T'})+\lambda_1||g(W,Z_{B_t},X'_{B_t})||^2,\] where \(\theta\) is the parameters of the representation network and the gradient is \[g(W,Z_{B_t},X'_{B_t})= \frac{1}{|B_t|}\sum_{k\in B_t}\nabla_{W,\theta}\ell(f_W(T_k),Y_k)+\beta_1\nabla_\theta\mathrm{D_{KL}}(P_{T'}||P_T)+\beta_2\nabla_\theta\mathrm{D_{KL}}(P_T||P_{T'}).\]
In [9], the representation distribution is modelled as an Gaussian distribution, i.e., \(T\sim \mathcal{N}(\mu_\theta, \sigma^2_\theta \mathrm{I}_d|X)\) and \(T'\sim \mathcal{N}(\mu_\theta, \sigma^2_\theta \mathrm{I}_d|X')\). Additionally, let the batch size be \(b=|B_t|\), the empirical KL divergence is estimated by the mini-batch data, as given in [9], \[\begin{align} &\beta_1\mathrm{D_{KL}}(P_{T'}||P_T)+\beta_2\mathrm{D_{KL}}(P_T||P_{T'}) \\ \approx& \beta_1\frac{1}{b}\sum_{k\in B_t} [\log{P_{T_k'}}-\log{P_{T_k}}]+\beta_2\frac{1}{b}\sum_{k\in B_t} [\log{P_{T_k}}-\log{P_{T'_k}}]\\ \approx& \beta_1\frac{1}{b}\sum_{k\in B_t} \left[\log{\frac{1}{b}\sum_{k\in B_t} P_{T'_k|X'_k}}-\log{\frac{1}{b}\sum_{k\in B_t} P_{T_k|X_k}}\right]+\beta_2\frac{1}{b}\sum_{k\in B_t} \left[\log{{\frac{1}{b}\sum_{k\in B_t} P_{T_k|X_k}}}-\log{\frac{1}{b}\sum_{k\in B_t} P_{T'_k|X'_k}}\right], \end{align}\] where \(P_{T_k|X_k}=\mathcal{N}(\mu_\theta, \sigma^2_\theta \mathrm{I}_d|X_k)\) and \(P_{T'_k|X'_k}=\mathcal{N}(\mu_\theta, \sigma^2_\theta \mathrm{I}_d|X'_k)\). To be more precise, \(\mu_\theta\) and \(\sigma_\theta\) are the outputs of the representation network. Since the forward pass requires the sampling of \(T_k\) and \(T_k'\), we need to use the reparameterization trick [75] for the backward pass.
When we train the model with controlling label information, the objective function becomes \[\min_{W} \hat{L}(W,Z_{B_t},X'_{B_t})+\lambda_2||W-\widetilde{W}||^2,\] where \(\widetilde{W}\) is the auxiliary classifier and \(\lambda_2\) is the trade-off hyperparameter.
Similarly, when we combine KL guided marginal alignment algorithm with controlling label information, then the objective function in every iteration is \[\min_{W,\theta} \frac{1}{|B_t|}\sum_{k\in B_t}\ell(f_W(T_k),Y_k)+\beta_1\mathrm{D_{KL}}(P_{T'}||P_T)+\beta_2\mathrm{D_{KL}}(P_T||P_{T'})+\lambda_2||W-\widetilde{W}||^2.\] In addition, the training objective for the auxiliary classifier is \[\begin{align} \label{eq:cl-obj} \min_{\widetilde{W}} \frac{1}{|B_t|}\sum_{k\in B_t}\ell(f_{\widetilde{W}}(T'_k), f_W(T'_k))+\frac{1}{|B_t|}\sum_{k\in B_t}\ell(f_{\widetilde{W}}(T_k), f_W(T_k)). \end{align}\tag{16}\] In practice, removing the second term would not affect the performance. Note that we need to disenable the automatic differentiation of \(T\), \(T'\) and \(W\) when executing the backward pass for the auxiliary classifier. The detailed algorithm of controlling label information is given in the next section.
If we only provide the pseudo labels for the target domain data to the auxiliary classifier, i.e. removing the second term in Eq (16 ), the Algorithm 2 is the algorithm for combining any marginal alignment algorithm with controlling label information.
Even without incorporating with the marginal alignment algorithm, e.g., ERM, in which case \(L_r\) is removed, Algorithm 2 still boosts the performance in practice.
| RotatedMNIST (\(\mathbf{0^{\circ}}\) as source domain) | Digits | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 2-7 (r)8-11 Method | \(\mathbf{15^{\circ}}\) | \(\mathbf{30^{\circ}}\) | \(\mathbf{45^{\circ}}\) | \(\mathbf{60^{\circ}}\) | \(\mathbf{75^{\circ}}\) | Ave | M \(\rightarrow\) U | U \(\rightarrow\) M | S \(\rightarrow\) M | Ave |
| ERM | 97.5±0.2 | 84.1±0.8 | 53.9±0.7 | 34.2±0.4 | 22.3±0.5 | 58.4 | 73.1±4.2 | 54.8±6.2 | 65.9±1.4 | 64.6 |
| ERM-GP | 97.5±0.1 | 86.2±0.5 | 62.0±1.9 | 34.8±2.1 | 26.1±1.2 | 61.2 | 91.3±1.6 | 72.7±4.2 | 68.4±0.2 | 77.5 |
| ERM-CL | 97.3±0.1 | 84.1±0.1 | 56.9±2.5 | 34.2±1.9 | 25.5±1.6 | 59.6 | 88.9±0.4 | 71.2±3.6 | 73.5±1.4 | 77.9 |
Table 2 shows that ERM-CL can overall outperform the basic ERM and is close to the performance of ERM-GP.
The network architecture in this work is the same as in [62] and [9], where a simple CNN is used.
Other settings are also the same as [62] and [9], for example, each algorithm is trained for \(100\) epochs. To select the hyperparameters (\(\lambda_1\) and \(\lambda_2\)) for ERM-GP, ERM-KL, KL-GP and KL-CL, we perform random search. Specifically, \(\lambda_1\) is searched between \([0.1, 0.9]\) and \(\lambda_2\) is searched between \([10^{-6}, 0.8]\). Other hyperparameters searching range could be found in the source code of [9].
Our study includes an ablation analysis to investigate the impact of the hyperparameter \(\lambda_1\) in the context of KL-GP. Specifically, we conduct experiments on both RotatedMNIST and Digits datasets, where the source and target domains are set to 0°/60° and SVHN/MNIST, respectively. Table 3 summarizes the results. It is worth noting that setting \(\lambda_1\) to zero effectively reduces KL-GP to KL, and our results confirm the efficacy of including the gradient penalty term in KL-GP.
| \(\lambda_1\) | 0 | 0.1 | 0.3 | 0.5 |
|---|---|---|---|---|
| \(\mathbf{0^{\circ}}\rightarrow\mathbf{60^{\circ}}\) | 75.5±2.4 | 88.0±8.1 | 82.8±5.8 | 80.1±3.7 |
| \(\textbf{S $\rightarrow$ M}\) | 92.5±0.9 | 93.6±1.2 | 93.8±1.1 | 93.1±1.7 |
Figure 3: Visualization results of representations obtained by using t-SNE. The source domain (blue points) is SVHN and the target domain (red points) is MNIST.. a — Visualization of KL, b — Visualization of KL-GP, c — Visualization of KL-CL
To visualize the representations of models trained using KL, KL-GP, and KL-CL, we employ t-SNE [76]. Figure 3 displays the visualization results when SVHN is used as the source domain and MNIST as the target domain. Our findings indicate that the incorporation of additional regularizers yields a slight improvement in representation alignment. However, it is essential to note that these regularization terms are primarily designed to enhance the performance of the classifier network, rather than the representation network.
| Method | Synthetic \(\rightarrow\) Real |
|---|---|
| ERM | 39.1±0.5 |
| DANN | 57.7±1.3 |
| MMD | 62.8±1.1 |
| CORAL | 39.5±4.5 |
| WD | 38.9±4.8 |
| KL | 70.6±0.5 |
| KL-GP | 71.9±0.7 |
| KL-CL | 71.3±0.4 |
We also conduct experiments on the VisDA17 dataset [77], which is a real-world classification task with \(280K\) images from \(12\) classes. Particularly, the source domain contains synthetic images and the target domain contains real images. Table 4 presents our experimental results. Notably, our regularization techniques, namely KL-GP and KL-CL are still capable of improving the performance of the KL guided marginal alignment algorithm to some extent.
The representation space version of Corollary 2 suggests that a small Jeffrey’s divergence can lead to a low testing error. Figure [fig:svhn-mnist] demonstrates that the dynamic of Jeffrey’s divergence, as computed in the representation space, can effectively characterize the evolution of the testing error throughout the training phase. Additionally, Figure [fig:sample] reveals that the number of target data used has an impact on testing performance. Specifically, when less than half of the available unlabelled target data is used, performance increases with the number of data. However, when more than half of the unlabelled target data is used, there is only marginal improvement on performance.
A random variable \(X\) is \(R\)-subgaussian if for any \(\rho\), \(\log {\mathbb{E}} \exp\left( \rho \left( X- {\mathbb{E}}X \right) \right) \le \rho^2R^2/2\).↩︎
Some losses that only satisfy a general version of Assumption 4 are discussed in Appendix 1.0.2.10↩︎
Available at: https://github.com/facebookresearch/DomainBed.↩︎
Available at: https://github.com/atuannguyen/kl.↩︎