Generalization under distribution shift remains a core challenge in modern machine learning, yet existing learning bound theory is limited to narrow, idealized settings and is non-estimable from samples. In this paper, we bridge the gap between theory and practical applications. We first show that existing definition of concept shift breaks when the source and target supports mismatch. Leveraging entropic optimal transport, we propose a key notion: γ∗-concept shifts, and derive a general error bound unifying covariate and γ∗-concept shifts, which applies to broad loss functions, label spaces, and stochastic labeling. We further develop estimators for these shifts with concentration guarantees, and the DataShifts algorithm, which can quantify distribution shifts and estimate the error bound in most applications - a rigorous and general tool for analyzing learning error under distribution shift.
1. Introduction
With the growth of data and computing power, supervised learning has achieved remarkable success. Nonetheless, traditional supervised learning assumes that the training data (source domain) and the test or deployment data (target domain) share the same distribution. However, in many real-world applications, the test data distribution can differ substantially from the training distribution, and this discrepancy can significantly impact model performance in the target domain. To analyze such challenges, researchers theorized that the distributions between the source and target domains are shifted and developed methods to assess how learners trained in the source domain could perform on the target domain. Depending on whether the target domain data is accessible, the problems are further categorized into domain adaptation and domain generalization.
Theoretical results on distribution shift usually bound a model's target domain error by its source domain error plus a measure of the distribution shift. The shift is further dissected into X (covariate) and Y|X (concept) shifts (Moreno-Torres et al., 2012; Liu et al., 2021; Zhang et al., 2023). Early studies proposed using H-divergence to measure X shift and derived an error bound for binary classification (Ben-David et al., 2006; 2010). Later works improved X shift using the maximum mean discrepancy (Long et al., 2015) and the Wasserstein distance (Shen et al., 2018; Courty et al., 2017). Further studies proposed more complex metrics for the X shift to obtain bounds for multiclass classification (Zhang et al., 2020; 2019). These results focused only on X shift and additionally relied on a joint-error term between the source and target domains. Lately, Zhao et al. (2019) improved this loose joint-error term and proposed a bound that explicitly considers both X and Y|X shifts for binary classification, and Zhang et al. (2023) extended the theory to multiclass classification.
In this paper, we focus on two remaining key problems in the existing theoretical frameworks, which significantly hinder researchers from analyzing X and Y|X shifts in applications:
• Generalizability. Existing theories rely on restrictive assumptions: they require deterministic labeling, omitting label noise and latent confounders commonly seen in practice; moreover, they only apply to classification with absolute error, excluding broader tasks such as regression and loss families.
• Estimability. Although existing theories provide a preliminary definition of Y|X shift, this definition and the accompanying error bounds—are not estimable. As a result, one cannot rigorously quantify Y|X shift on real data, nor assess its impact on model performance.
We aim to provide a general theoretical framework unifying X and Y|X shifts that widely applies to stochastic labeling, most supervised tasks, and broader loss functions. Moreover, these two shifts can be accurately estimated from samples, thereby offering a rigorous, plug-and-play tool for quantifying and analyzing distribution shifts in real applications.
1Department of Statistics and Financial Mathematics, School of Mathematics, South China University of Technology, Guangzhou, China. First author: Hongbo Chen hongboc616@gmail.com. Correspondence to: Li Charlie Xia lcxia@scut.edu.cn.
Proceedings of the 43rd International Conference on Machine Learning, Seoul, South Korea. PMLR 306, 2026. Copyright 2026 by the author(s).
Specifically, our key observation is that if X shift occurs, the supports of the source and target covariate distributions may not overlap. Such a support mismatch renders the existing theories' Y|X shift ill-defined, fundamentally causing the error bounds non-estimable and loose. Our key innovation is to employ the entropic optimal transport to give a general definition for X and Y|X shift. The γ∗-Y|X shift we propose, which depends on the entropic optimal transport coupling of X shift, stays well-defined even when supports mismatch, and applies to the stochastic labeling and general label space. Based on that, we derived a new error bound that considers both the X and the γ∗-Y|X shifts. Our new bound relies only on the Lipschitz continuity of the hypothesis h and loss ℓ, and is agnostic to specific hypothesis space, label space, or loss function, which naturally generalizes to binary and multiclass classification, regression and other tasks.
Since our γ∗-Y|X shift is well-defined regardless of support mismatch, X and Y|X shifts, and our new error bound becomes estimable from samples. Nonetheless, for X shift, the traditional plug-in estimator for entropic optimal transport tends to overestimate due to the curse of dimensionality. We thus further developed a debiased estimator that remains accurate in high dimensions. For our γ∗-Y|X shift, we also proposed an estimator. We proved both estimators' concentration inequalities to their true values. Leveraging these two estimators, we presented the DataShifts algorithm, enabling quantification of X and Y|X shifts on general labeled data. Finally, we apply our theoretical framework and DataShifts to three distinct tasks: Novozymes enzyme prediction, ColoredMNIST, and PACS, clearly validating the general effectiveness of our theoretical results.
Contributions. In summary, our major contributions are:
• We show that support mismatch makes the existing Y|X shift ill-defined—hence loose and non-estimable. We introduce the γ∗-Y|X shift as a well-defined concept shift, which possesses many desirable properties.
• We derive a general error bound unifying covariate and γ∗-concept shifts. Our bound covers broader learning scenarios, far beyond traditional binary classification.
• For the X and γ∗-Y|X shifts in our theory, we propose two estimators and prove their concentration inequalities, ensuring that these shifts can be rigorously estimated from finite samples.
• We integrate our theoretical results into the DataShifts algorithm, which can estimate X and γ∗-Y|X shifts from real data, supplying a rigorous and general tool for quantifying and analyzing distribution shifts.
The paper is organized as follows: Section 2 covers the preliminaries, Section 3 presents the population-level theoretical results, Section 4 focuses on the statistical results, and Section 5 presents experiments validating our theory.
2. Preliminary
2.1. Problem Setup
Our problem is to bound the error of models under distribution shift. Let X and Y be the covariate space and the label space, respectively. Let DXYS and DXYT be the joint distributions of covariates and labels on X×Y for the source and target domains, respectively. DXS, DXT are their covariate marginals on X. For any x∈X, we let DY∣X=xS and DY∣X=xT be the conditional label distributions at x in the source and target domain. Let Y′ be the output space of the learner, ℓ:Y×Y′→R the loss, and H⊆{g:X→Y′} the hypothesis space. For a hypothesis h∈H, the learning errors for source and target domains are:
We hope to bound ϵT(h) by ϵS(h) and a measure of distribution shift, consistent with existing theoretical results (Ben-David et al., 2006; Zhao et al., 2019). Notably, the space X can be the raw input space or a representation space output by an upstream learner (Ben-David et al., 2006). Our theory treats them in the same way, so it applies to both raw data and learned representations.
Stochastic and deterministic labeling. Above, we assume that the label y follows the conditional distribution at point x: y∼DY∣X=x, namely the stochastic labeling setting (Zhao et al., 2019). It enables our theory to accommodate latent confounders and label noise, which are common in practice. In contrast, existing theories oversimplify by using deterministic labeling: a labeling function f:X→Y with y=f(x), a special case of stochastic labeling in which the conditional distribution collapses to a Dirac mass at f(x), i.e., DY∣X=x=δf(x).
2.2. Existing Theory and Ill-Defined Y|X Shift
We first demonstrate that support mismatch leads to an ill-defined Y|X shift, a key flaw in existing theory.
Definition 2.1 (Support). Let μ be a probability measure on the topological space (X,τ). Its support is defined as:
supp(μ)={x∈X∣∀U∈τ,x∈U,μ(U)>0}
supp( μ) is the closure of every region where μ has positive measure, or equivalently, the complement of the union of all μ-null open sets:
supp(μ)=X∖{⋃{U∈τ∣μ(U)=0}}
Lemma 2.2 (Ill-Defined Expectation of Conditional Probability). For probability measure PX, a PX-measurable function P(A∣X=x):X→[0,1] is the conditional probability of event A given X=x. For probability measure PX′ satisfying supp(PX′)∖supp(PX)=∅, the expectation EPX′[P(A∣X=x)] is arbitrary.
Remark This problem arises because the conditional probability P(A∣X=x) is unique almost everywhere with respect to PX (unique PX-a.e.), rather than to PX′. When supp(PX′)∖supp(PX)=∅, PX′ assigns positive mass to some PX-null sets. In this case, EPX′[P(A∣X=x)] depends on the values of P(A∣X=x) on sets where it is not uniquely determined. Hence, support mismatch leads to the ill-defined expectation of conditional probability. This issue directly impacts the definition and computation of Y|X shift in existing theories, since the Y|X shift is typically formulated as an expectation over conditional labeling distributions or its collapsed labeling functions.
With deterministic labeling, Zhao et al. (2019) used H-divergence (Ben-David et al., 2006) to derive an error bound for soft-label binary classification under X and Y|X shifts:
Theorem 2.3 (Existing Learning Bound on Distribution Shift). Let DXS,DXT be the covariate distributions and fS,fT:X→[0,1] be the labeling functions for the source and target domain. Using absolute error loss ∣⋅∣, for any hypothesis space H⊆[0,1]X define:
Here, dH~ measures X shift, and the two expectations Ex∼DXS[∣fS(x)−fT(x)∣], Ex∼DXT[∣fS(x)−fT(x)∣] are both Y|X shift but measured with the source or target covariate distribution, with the smaller one taken in the bound.
Remark* (Limitations of Theorem 2.3) First, it is highly specialized, applying only to deterministic labeling, binary classification, and absolute loss. Moreover, when X shift causes support mismatch: supp(DXT)∖supp(DXS)=∅, the conditional distribution DYS∣X=x (i.e., fS(x)) is only unique DXS-a.e. and arbitrary on the mismatched region, so the Y|X shift Ex∼DXT[∣fS(x)−fT(x)∣] is ill-defined. Similarly, if supp(DXS)∖supp(DXT)=∅, the other Y|X shift term is also ill-defined. This additionally causes two problems:
• Loose bound. The ill-defined Y|X shifts can take arbitrary values, making the bound in Eq. (1) loose.
• Non-estimable. When the real concept DY∣X=xS or fS(x) is unknown, we cannot sample it outside supp(DXS); hence, under support mismatch the expectations Ex∼DXT[∣fS(x)−fT(x)∣] is non-estimable, as well as Ex∼DXS[∣fS(x)−fT(x)∣].
2.3. Entropic Optimal Transport
We introduce entropic optimal transport, which we will employ to give the general definitions of X and Y|X shifts properly. It measures the distance between two probability distributions, augmenting conventional optimal transport with a relative-entropy regularizer. Given two probability distributions P and Q on the metric space (Ω,ρ) and a parameter β≥0, the order-1 entropic optimal transport is:
Wβ(P,Q)=γ∈Γ(P,Q)inf{∫ρdγ+βH(γ∣P⊗Q)}(2)
where H(γ∣P⊗Q)=∫log(dP(x1)dQ(x2)dγ(x1,x2))dγ(x1,x2). Here, ρ(x1,x2) is the cost of transporting mass between points, Γ(P,Q) is the set of joint distributions with marginals P and Q, and γ(x1,x2) is a transport coupling. Hence, Wβ(P,Q) is the minimum total transport cost between P and Q under an entropy regularizer. When β=0, this reduces to the Wasserstein-1 distance, denoted by W1(P,Q). Compared with other distribution distances, (entropic) optimal transport has a well-established geometric meaning (Gangbo & McCann, 1996), and we will consistently use it to measure distribution shifts.
3. Theoretical Results
In this section, we focus on population-level theoretical results. We assume that covariate X and label Y are distributed on the metric spaces (X,ρX) and (Y,ρY), respectively, and give the rigorous and general definitions of their distribution shifts and essential theorems below.
3.1. General X and Y|X Shifts
Definition 3.1 (X Shift). Using entropic optimal transport, the X (covariate) shift is defined as:
where the optimal coupling is denoted as γ∗, a joint distribution of DXS, DXT that gives the minimum transport cost.
With realistic stochastic labeling, the label follows a conditional distribution given the covariate; we give a general and rigorous definition of Y|X shift below:
Definition 3.2 ( γ∗−Y∣X Shift). Let γ∗ be the optimal transport coupling as in Definition 3.1, Spair(xS,xT)=
W1(DYS∣X=xS,DYT∣X=xT), then the γ∗−Y∣X shift is defined as the expectation of Spair(xS,xT) under γ∗:
This definition is based on the optimal transport coupling γ∗ for X shift. Spair(xS,xT) denotes the paired conditional distribution shift between the source domain at xS and the target domain at xT. Intuitively, since optimal transport coupling γ∗ places most of its mass on nearby pairs (xS,xT), SCptγ∗ is evaluated mainly on such neighboring points.
With deterministic labeling, this definition reduces to:
The following three lemmas guarantee the good properties of γ∗−Y∣X Shift.
Lemma 3.4 (Support of γ∗). For any γ∈Γ(DXS,DXT), supp(γ)⊆supp(DXS)×supp(DXT).
Lemma 3.5 (Uniqueness of γ∗). If β>0, then the entropic optimal transport coupling γ∗ in Definition 3.1 is unique.
Lemma 3.6 (Collapse of γ∗). If β=0 and DXS=DXT, γ∗ collapses to diagonal (identity) coupling γ∗=(Id,Id)#DXS, equivalently, for every measurable A⊆X×X, γ∗(A)=∫1{(x,x)∈A}dDXS(x), where 1{⋅} is the indicator function.
Combining Lemmas 3.4 and 3.5, the rigor of γ∗−Y∣X Shift is ensured:
Theorem 3.7 (Well-Definedness of γ∗−Y∣X Shift). For β>0, the γ∗−Y∣X shift SCptγ∗ in Definition 3.2 is unique even when supp(DXS)=supp(DXT).
Remark Such γ∗−Y∣X shift not only avoids the ill-definition encountered by existing theory, but also makes Y|X shift tight and estimable. On the other hand, combining Corollary 3.3 and Lemma 3.6, the relationship between γ∗−Y∣X shift and existing Y|X shift is shown as follows:
Proposition 3.8 (Relationship to existing Y|X shift). Assume deterministic labeling DYS∣X=x=δfS(x),DYT∣X=x=δfT(x) and Y⊂R with ρY=∣⋅∣, if β=0 and DXS=DXT, then:
Remark The above γ∗−Y∣X shift, defined via the entropic optimal transport coupling γ∗, applies to general settings including stochastic labeling. When DXS=DXT, it recovers the existing Y|X shift; and when the supports of DXS and DXT are mismatched, it still remains rigorous.
3.2. General Learning Bound
We now give a new cross-domain learning error bound based on X and γ∗−Y∣X shift. To be general, the output space of the learner is a metric space (Y′,ρy′), possibly different from the true label space (Y,ρy). For the loss function ℓ:Y×Y′→R, we require the following basic assumption from them:
Assumption 3.9 (Separately Lipschitz Continuity). For metric spaces (Y,ρY) and (Y′,ρY′), a function ℓ:Y×Y′→R satisfies separately (Lℓ,Lℓ′)-Lipschitz if there exist Lℓ,Lℓ′≥0 such that for any y1,y2∈Y and y1′,y2′∈Y′, there is:
Remark This is a mild assumption: most loss functions are differentiable, which already implies continuity. And their stable optimization usually needs bounded gradients in a region, further ensuring Lipschitz continuity (Boyd & Vandenberghe, 2004). Note that this assumption also covers asymmetric losses. For instance, for binary classification with label space [0,1], output space is typically [a,1−a] ( a∈(0,0.5)) by Sigmoid function and ρY=ρY′=∣⋅∣, the cross-entropy loss: ℓCE(y,y^)=−ylogy^−(1−y)log(1−y^) satisfies separately (Lℓ,Lℓ′)-Lipschitz with Lℓ=log(a1−a) and Lℓ′=a1.
Corollary 3.10 (Composition Preserves Separate Lipschitzness). Let h:X→Y′ be Lh-Lipschitz and let ℓ:Y×Y′→R be separately (Lℓ,Lℓ′)-Lipschitz. Then composite function ℓ(y,h(x)):Y×X→R is separately (Lℓ,LhLℓ′)-Lipschitz.
The following two lemmas characterize the transport coupling of joint distributions DXYS and DXYT:
Lemma 3.11 (Separately Weak Duality). Let G(y,x):Y×X→R is separately (LY,LX)-Lipschitz, for any coupling of joint distributions γXY∈Γ(DXYS,DXYT), there exists:
Lemma 3.12 (Gluing Construction for Joint Coupling). Let γ∗ be the optimal transport coupling of X shift in Definition 3.1, γY∗∣(xS,xT) be the optimal transport coupling of Spair(xS,xT) in Definition 3.2, construct the joint distribution of couplings: γXY(dxS,dxT,dyS,dyT)=γ∗(dxS,dxT)γY∗∣(xS,xT)(dyS,dyT), then γXY is the coupling of joint distributions: γXY∈Γ(DXYS,DXYT).
Combining Corollary 3.10, Lemmas 3.11 and 3.12, we obtain the general cross-domain error bound as follows:
Theorem 3.13 (General Learning Bound). Given the covariate space (X,ρX), the label space (Y,ρY), and the output space (Y′,ρY′), the source and target distributions are (DXS,DYS∣X=x) and (DXT,DYT∣X=x), respectively. If the loss ℓ:Y×Y′→R satisfies separately (Lℓ,Lℓ′)-Lipschitz, then for any hypothesis h:X→Y′ that satisfies Lh-Lipschitz, the following bound holds:
ϵT(h)≤ϵS(h)+LhLℓ′SCov+LℓSCptγ∗(7)
where SCov is the X shift in Definition 3.1 and SCptγ∗ is the γ∗−Y∣X shift in Definition 3.2.
Remark This elegant bound unifies the covariate shift SCov and the concept shift (γ∗−Y∣X shift)SCptγ∗'s effect on target error via the Lipschitz factors LhLℓ′ and Lℓ. Notably, it depends only on the Lipschitz continuity of the hypothesis h and the loss ℓ, without any other specific restriction on the label space Y or loss ℓ. It naturally covers binary classification or regression tasks when Y is one-dimensional, and multiclass classification or multi-label tasks when Y is multi-dimensional. Besides, since the bound holds under stochastic labeling, it applies to a wide range of supervised learning scenarios in practice. On the other hand, by using the well-defined γ∗−Y∣X shift, our bound can be tighter than the existing bound, and more crucially, both the covariate and concept shifts in our theory can be robustly estimated from the finite samples. Additionally, since the entropic optimal transport SCov increases with the hyperparameter β, we recommend choosing β as a small non-zero value to balance the tightness and the rigor of the theory.
4. Statistical Results
In practice, true domain distributions are all unknown. We wish to estimate the shifts from domain samples and analyze how these shifts will influence model performance. In this section, we focus on sample-level theoretical results. Suppose we have i.i.d. samples {(Xi(S),Yi(S))} and {(Xj(T),Yj(T))} drawn from DXYS and DXYT with sizes NS and NT, respectively. This section involves three parts: the estimation of X shift, the estimation of Y|X shift, and the DataShifts algorithm to estimate the overall bound.
4.1. Estimation of X Shift
By Definition 3.1, the X shift is the entropic optimal transport between DXS and DXT. The traditional estimation method uses the entropic optimal transport of empirical distributions—known as the plug-in estimator.
Traditional Plug-in Estimator Given i.i.d. samples {Xi(S)}∼DXS, {Xj(T)}∼DXT with sample sizes NS, NT respectively, set the empirical measures: DXS=NS1∑i=1NSδXi(S),DXT=NT1∑j=1NTδXj(T), their entropic optimal transport is:
where C∈R+NS×NT is the cost matrix with cij=ρX(Xi(S),Xj(T)), and γ^∈R+NS×NT represents any discretized transport coupling satisfying the given linear constraints. Such an optimization problem can be solved efficiently at a large scale by the Sinkhorn algorithm (Cuturi, 2013; Genevay et al., 2016).
Curse of Dimensionality. However, in modern applications, the covariate space X is often high-dimensional. Even when two distributions are very close, their samples' distance can be large. Such curse of dimensionality makes the plug-in estimator greatly overestimated (Verleysen & François, 2005; Panaretos & Zemel, 2019) (Fig.1(a)). When β is small, entropic optimal transport behaves similarly to Wasserstein distance (Carlier et al., 2017; 2023), and the upward bias decays only in O(N−1/d) order (Fournier & Guillin, 2015), which implies that increasing N has a very limited debiasing effect when d is high (Fig.1(b)).
To address the overestimation problem of the traditional plug-in estimator, we propose the following debiased estimator.
Definition 4.1 (Debiased Estimator). Given i.i.d. samples {Xi(S)}∼DXS, {Xj(T)}∼DXT with sample sizes NS,NT respectively, split the samples in half to obtain four independent empirical measures: DXS′=NS2∑i=1NS/2δXi(S), DXS′′=NS2∑i=NS/2+1NSδXi(S),DXT′=NT2∑j=1NT/2δXj(T), DXT′′=NT2∑j=NT/2+1NTδXj(T). The debiased estimator is:
Remark This debiased estimator uses four plug-in estimators. The first two terms, Wβ(DXS,DXT) and Wβ(DXS,DXT), estimate the distance between DXS and
(a) Empirical distance vs. dimension (d)
(b) Empirical distance vs. sample size (N)
(c) Empirical distance vs. true W1
Figure 1. (a)–(c) show the empirical distance from entropic optimal transport ( β=0.001) versus dimension d, sample size N, and true Wasserstein-1 distance. In (a)–(b), η^ and η^′ are independent empirical measures from high-dimensional standard normals, thus the true distance is zero. The traditional estimator Wβ(η^,η^′) greatly overestimates as d increases, as shown in (a), and even a much larger N only brings a small improvement, as shown in (b). In (c), with d=70, η^t is the empirical measure of shifted standard normal N(t,I), whose true Wasserstein-1 distance to the standard normal is ∥t∥. Our debiased estimator remains accurate in every case.
DXT, including the sample bias. And the last two terms, W_\beta\left(\widehat{\mathcal{D}_X^S}, \widehat{\mathcal{D}_X^S''}\right) and W_\beta\left(\widehat{\mathcal{D}_X^T}, \widehat{\mathcal{D}_X^T''}\right) estimate the distance arising from sample bias only. Subtracting the two parts reduces the sample bias, thus giving a better estimate of Wβ(DXS,DXT). Compared with the traditional plug-in estimator, our debiased estimator Wβdeb reduces the overestimation and remains accurate regardless of the true distribution distance (see Fig.1(a) and 1(c)).
Moreover, when the covariate space is Euclidean, we derived a concentration inequality guaranteeing that the debiased estimator converges to the true distance:
Theorem 4.2 (Concentration Inequality of Debiased Estimator). Let DXS, DXT be two distributions on (Rd,∥⋅∥) with finite squared-exponential moments. For i.i.d. samples {Xi(S)}∼DXS, {Xj(T)}∼DXT with sample sizes NS, NT respectively, when β=0, and for any ε>0, there exists N such that if NS, NT>N, then:
where λS,λT>0 depend only on squared-exponential moments of DXS,DXT, respectively, and Vε∈[2−3,2) depends only on Wβ(DXS,DXT)/ε.
Remark This theorem implies that the deviation probability of the debiased estimator decays exponentially with sample sizes, so with high probability, our debiased estimator can well approximate the true entropic optimal transport distance Wβ(DXS,DXT). Notably, it also shows the enlightening fact that our estimator's concentration depends not only on each distribution's scale characterized by λS,λT but also on the true distance between two distributions.
4.2. Estimation of Y|X Shift
As above, we defined the γ∗−Y∣X shift SCptγ∗ in Definition 3.2; we now estimate it from samples.
Definition 4.3 (Estimator for γ∗−Y∣X Shift). Given i.i.d. samples {(Xi(S),Yi(S))}∼DXYS, {(Xj(T),Yj(T))}∼DXYT with sample sizes NS, NT respectively, the estimator of γ∗−Y∣X shift is defined as:
where γ^∗∈R+NS×NT represents the discrete optimal transport coupling for Wβ(DXS,DXT).
Remark In Section 4.1, we use the debiased estimator Wβdeb(DXS,DXT) for X shift, whereas Definition 4.3 still estimates γ∗−Y∣X shift via the optimal transport coupling from the plug-in estimator Wβ(DXS,DXT). This is because the curse of dimensionality mainly affects the transport cost (i.e., inter-sample distances), rather than the transport coupling. Leveraging the stability of entropic optimal transport (Eckstein & Nutz, 2022), the following lemma establishes the convergence of the coupling for plug-in estimator:
Lemma 4.4 (Stability of Entropic Optimal Transport Coupling). Let DXS, DXT be two distributions on (X,ρX) with finite squared-exponential moments. γ∗ and γ^∗ are the optimal transport couplings of Wβ(DXS,DXT) and Wβ(DXS,DXT) respectively, then:
(12) where W1(γ∗,γ^∗) is computed on X×X with metric ρ((x1,x2),(x1′,x2′)):=ρX(x1,x1′)+ρX(x2,x2′), λγ∗>0 depend only on squared-exponential moments of DXS, DXT.
Remark This lemma shows that the Wasserstein-1 distance between the plug-in estimator coupling and the population optimal transport coupling, is bounded by the sum of the marginal Wasserstein-1 distance between each population and its empirical distribution, with the bound scaled by the parameter β. Such a uniform bound is guaranteed only when β>0, which further highlights the necessity of using entropic optimal transport.
By Lemma 4.4, when covariate space X is Euclidean and label space Y is a bounded set in an Euclidean space, we derive a concentration inequality guaranteeing estimator in Definition 4.3 approximates true value:
Theorem 4.5 (Concentration Inequality for Definition 4.3). Let DXS,DXT be two distributions on (Rd,∥⋅∥) with finite squared-exponential moments. Let the label space \mathcal{Y} \subset \mathbb{R}^d' be bounded by M=supy,y′∈Y∥y−y′∥, on which conditional distributions \mathcal{D}_Y^S_{|X=x_S}, \mathcal{D}_Y^T_{|X=x_T} satisfy LY∣X-Lipschitz respectively: dTV(DY∣X=x,DY∣X=x′)≤LY∣X∥x−x′∥. For i.i.d. samples {(Xi(S),Yi(S))}∼DXYS, {(Xj(T),Yj(T))}∼DXYT with sample sizes NS,NT, when β>0, and for any ε>0, there exists N such that if NS,NT>N, then:
where dTV is total-variation distance, λS,λT>0 depend only on the squared-exponential moments of DXS,DXT,Φ>0 depends on LY∣X,λS,λT,β, the bias Δ is a constant.
Remark This theorem implies that the deviation probability of the γ∗−Y∣X Shift estimator S^Cpt decays exponentially with sample sizes, so with high probability, the estimator can well approximate the SCptγ∗+Δ. The bias term Δ arises because Definition 4.3 uses ρY(Yi(S),Yj(T)) as a single-point estimate of Spair(Xi(S),Xj(T)) in Definition 3.2. The following two propositions show that the bias Δ is controlled.
Proposition 4.6 ( Δ in Deterministic Labeling). Assume deterministic labeling DY∣X=xS=δfS(x),DY∣X=xT=δfT(x), then the Δ in Theorem 4.5 satisfies:
Δ=0(14)
Remark This proposition shows that under deterministic labeling, the estimator S^Cpt accurately estimates the Y|X shift SCptγ∗ itself. For stochastic labeling, we show that Δ can be bounded by the irreducible error (James et al., 2013) (also known as the Bayes risk (Berger, 2013)) in traditional statistical learning.
Proposition 4.7 ( Δ in Stochastic Labeling). When (Y,ρY)=(Rd′∥⋅∥), the irreducible error of joint distribution DXY under squared loss ∥⋅∥2 is defined as: I(DXY)=infg:X→YE(x,y)∼DXY[∥y−g(x)∥2], then the Δ in Theorem 4.5 satisfies:
0≤Δ≤I(DXYS)+I(DXYT)(15)
Remark The irreducible error is the fundamental error inherent to stochastic labeling that no model can overcome. When the problem is learnable, covariate and label are often well correlated, and the irreducible error is small relative to the overall label variability. In this case, Proposition 4.7 guarantees that the estimator S^Cpt does not substantially overestimate the Y|X shift SCptγ∗.
4.3. DataShifts Algorithm
On the Lipschitz Constant of Learners. The Lipschitz constant of the learner have been well studied, such as logistic regression (Roux et al., 2012), multi-layer perceptron (MLP) (Fazlyab et al., 2019), convolutional neural networks (CNN) (Virmaux & Scaman, 2018; Zou et al., 2019) and attention mechanism (Kim et al., 2021; Castin et al., 2023). Although the Lipschitz constants of modern large-scale neural networks such as ResNet-50 or Transformers remain difficult to analyze, researchers are more concerned with whether these models learn distribution-robust representations (Hendrycks et al., 2020), rather than distribution shift in the raw input space. In this setting, the covariate space X is the representation space, and the downstream model (the hypothesis h in our theory) is often a simple learner—such as a linear classifier—whose Lipschitz constant is still easy to handle. We summarize the Lipschitz constants of various learners in Appendix D.
Do:
Estimate X shift by 4.1 as S^Cov
Estimate γ∗−Y∣X shift by 4.3 as S^Cpt
if Lℓ,Lℓ′,Lh, and ϵ^S are provided then
Estimate bound: B=ϵ^S+LhLℓ′S^Cov+LℓS^Cpt
end if
Return: S^Cov,S^Cpt and B (optional)
(a) Novozymes
(b) ColoredMNIST
(c) PACS
Figure 2. (a)–(c) show that the estimated error bounds track the test error well across three distinct tasks, corroborating the general effectiveness of our learning bound and estimators.
By leveraging the theoretical results above, we give the plug-and-play Algorithm 1 (DataShifts) for quantifying X and Y|X shifts from finite samples and estimating error bounds.
5. Experiments
In this section, we apply our estimable general theory to three distinct practical tasks: tabular regression, image binary classification, and image multi-class classification – to validate the general effectiveness of our bound and estimators. We also conduct experiments on synthetic tasks where existing theory apply, demonstrating our bound is tighter.
5.1. Novozymes Enzyme Stability Prediction
The Novozymes Enzyme Prediction Competition (Pultz et al., 2022) is a large-scale Kaggle contest. It is a tabular regression task, with 9,000 point-mutation samples spanning 180 enzyme families, aiming to predict transition temperatures for unseen families. Each enzyme family is treated as a separate domain; due to distribution shifts between them, thousands of participants found it difficult to develop any effective solution.
We select the 60 enzyme families with the smallest pre-training error as the source domain, and treat each of the remaining 120 enzyme families as a target domain. In this task, we focus on the distribution shift between the raw data of different enzyme families, taking the 20-dimensional input feature space as covariate space X. We train a 3-layer MLP on the source domain; an analysis of its Lipschitz constant is provided in the Appendix D.4. We use the absolute loss (separately (1, 1)-Lipschitz) to evaluate the source domain error and the test error on each target domain, and apply our DataShifts algorithm( β=0.2) to estimate an error bound for each target domain.
We plot the test error and the estimated error bound on each target domain in Fig. 2(a). In this figure, the overall trend of the test error and the error bound lies just above the diagonal, indicating that our bound is tight and effectively captures the test error under distribution shift. Meanwhile, it directly shows the contributions of X and Y|X shifts on the error bound. The large Y|X shift across enzyme families is what drives the generalization failure in this contest.
5.2. ColoredMNIST and PACS
ColoredMNIST and PACS are two standard tasks in the DomainBed benchmark(Gulrajani & Lopez-Paz, 2020). ColoredMNIST is a binary classification task with 70,000 handwritten digit images exhibiting color shift, while PACS is a multi-class object recognition task with 9,991 images exhibiting style shift. For both tasks, we treat the model's representation space as the covariate space X. Following the DomainBed setup, we use the simple CNN with a 128-dimensional representation for ColoredMNIST, and ResNet-50 with a 2048-dimensional representation for PACS. In this setting, the hypothesis h in our theory corresponds to the model's final layer (a linear classifier), whose Lipschitz constant is analyzed in the Appendix D.3.
We evaluate three methods: ERM, CORAL, and MMD. Adhering to DomainBed, we select the best hyperparameters via training-domain validation over 20 random hyperparameter trials for each method, domain, and trial. For ColoredMNIST, we train each best-hyperparameter run for 5,000 steps and save checkpoints every 100 steps. For PACS, since the model converges earlier, we train for 1,000 steps and save checkpoints every 20 steps. At each checkpoint, we regard the mixture distribution over training domains as the source domain and the test domain as the target domain. We still use the absolute loss to measure source and target errors,
(a) Error vs. X shift
(b) Error vs. Y|X shift ( θ)
(c) Error vs. Y|X shift (b)
Figure 3. (a)–(c) respectively show the relationship between the estimated learning bounds and the X or Y|X shift in synthetic binary classification tasks. As these shifts increase, our bound becomes significantly tighter than the existing bound.
and run our DataShifts algorithm ( β=0.2) using each domain’s representation-label pairs to estimate the test domain error bound at every checkpoint.
We plot the test error and the estimated error bound for both tasks in Fig. 2(b) and 2(c). In Fig. 2(b), the bound tracks the test error well across checkpoints. The MMD (purple) and CORAL (yellow) points lie closer to the lower-left region, indicating that these X shift-reducing methods indeed yield smaller bounds, and consequently lower error on ColoredM-NIST. In Fig. 2(c), although the bound becomes looser in magnitude when applied to PACS, a more complex image classification task, it still exhibits a consistent trend with the test error in each run.
5.3. Synthetic Binary Classification
We compare our theory with the existing bound in Zhao et al. (2019), which is shown to be tighter than previous learning bounds. As discussed in Remark*, the existing learning bound only applies to soft-label binary classification with deterministic labeling and absolute loss. Since its estimation requires sampling the true concepts fS and fT outside the supports of the covariate distributions DXS, DXT (oracle), it can only be estimated on synthetic tasks where the true concepts are known.
We construct a synthetic binary classification task using logistic regression. Let the covariate space be 10-dimensional, and the source inputs are sampled from standard normal distribution: DXS=N(0,I), with labels generated by fS(x)=σ(wS⊤x+bS), where wS=1/10, bS=0 and σ is the sigmoid function. The target inputs are generated by shifting DXS along a random direction, thereby controlling the X shift. And the target labels are generated by another logistic regression: fT(x)=σ(wT⊤x+bT), where wT is obtained by rotating wS by angle θ toward a random direction. θ and bT further control the Y|X shift. By varying the X shift, θ, and bT, we obtain a series of target domains. We also use logistic regression as the learner and train it on the source domain. Its Lipschitz constant is analyzed in Appendix D.2. For each target domain, we estimate the test error, the existing and our bounds under the absolute loss.
We plot the learning bounds with respect to the X shift and the Y|X shifts ( θ and bT) in Fig. 3. In Fig. 3(a), since both the source concept and the learner are logistic regression models, the learner can fit the source concept well, and the X shift in the target domain has only a minor effect on the test error. As the X shift increases, our bound becomes tighter than the existing bound. In Figs. 3(b) and 3(c), as the Y|X shift increases, the existing bound becomes looser than ours. This verifies our point in Remark*: the ill-defined Y|X shift in the existing bound is loose, whereas our γ∗−Y∣X shift and the accompanying learning bound can be tighter.
In addition to the above results, sensitivity experiments of the proposed estimators with respect to the parameter β are provided in Appendix E.1. Experiments on the bias of the γ∗−Y∣X shift estimator under stochastic labeling are presented in Appendix E.2.
6. Conclusion
In this paper, we focus on a general and estimable theoretical framework for learning under distribution shift. We first introduce a key notion, γ∗−Y∣X shift, via entropic optimal transport, which addresses the ill-definedness in existing theory. Then we derive a general learning bound unifying X shift and γ∗−Y∣X shift. We further develop concentration-guaranteed estimators for both shifts, and integrate our theory into the plug-and-play DataShifts algorithm, enabling researchers to quantify and analyze distribution shift in broad settings. Experiments on practical and synthetic tasks validate the general effectiveness and tightness of our theory. We believe our theoretical framework takes an important step toward learning under distribution shift and will spur further algorithmic advances.
Acknowledgements
We also thank Dr. Jie Ren for suggestions and feedback on this work. This study was funded by the National Natural Science Foundation of China (12571529) and Guangdong Basic and Applied Basic Research Foundation (2024A1515-010699) to LCX.
Impact Statement
This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here.
References
Arjovsky, M., Bottou, L., Gulrajani, I., and Lopez-Paz, D. Invariant risk minimization. arXiv preprint arXiv:1907.02893, 2019.
Ben-David, S., Blitzer, J., Crammer, K., and Pereira, F. Analysis of representations for domain adaptation. Advances in neural information processing systems, 19, 2006.
Ben-David, S., Blitzer, J., Crammer, K., Kulesza, A., Pereira, F., and Vaughan, J. W. A theory of learning from different domains. Machine learning, 79:151–175, 2010.
Berger, J. O. Statistical decision theory and Bayesian analysis. Springer Science & Business Media, 2013.
Bolley, F., Guillin, A., and Villani, C. Quantitative concentration inequalities for empirical measures on non-compact spaces. Probability Theory and Related Fields, 137(3–4):541–593, 2007. doi: 10.1007/s00440-006-0004-7. URL https://doi.org/10.1007/s00440-006-0004-7.
Bonet, C., Vauthier, C., and Korba, A. Flowing datasets with wasserstein over wasserstein gradient flows. arXiv preprint arXiv:2506.07534, 2025.
Boyd, S. P. and Vandenberghe, L. Convex optimization. Cambridge university press, 2004.
Carlier, G., Duval, V., Peyré, G., and Schmitzer, B. Convergence of entropic schemes for optimal transport and gradient flows. SIAM Journal on Mathematical Analysis, 49(2):1385–1418, 2017.
Carlier, G., Pegon, P., and Tamanini, L. Convergence rate of general entropic optimal transport costs. Calculus of Variations and Partial Differential Equations, 62(4):116, 2023.
Castin, V., Ablin, P., and Peyré, G. How smooth is attention? arXiv preprint arXiv:2312.14820, 2023.
Cole, S. R. and Frangakis, C. E. The consistency statement in causal inference: a definition or an assumption? Epidemiology, 20(1):3–5, 2009. doi: 10.1097/EDE.0b013e31818ef366. URL https://doi.org/10.1097/EDE.0b013e31818ef366.
Courty, N., Flamary, R., Habrard, A., and Rakotomamonjy, A. Joint distribution optimal transportation for domain adaptation. Advances in neural information processing systems, 30, 2017.
Cuturi, M. Sinkhorn distances: Lightspeed computation of optimal transport. Advances in neural information processing systems, 26, 2013.
Duncan, T. E. On the absolute continuity of measures. The Annals of Mathematical Statistics, 41(1):30–38, 1970.
Eckstein, S. and Nutz, M. Quantitative stability of regularized optimal transport and convergence of sinkhorn's algorithm. SIAM Journal on Mathematical Analysis, 54(6):5922–5948, 2022.
El Hamri, M., Bennani, Y., and Falih, I. Theoretical guarantees for domain adaptation with hierarchical optimal transport. Machine Learning, 114(5):119, 2025.
Fazlyab, M., Robey, A., Hassani, H., Morari, M., and Pappas, G. Efficient and accurate estimation of lipschitz constants for deep neural networks. Advances in neural information processing systems, 32, 2019.
Fazlyab, M., Morari, M., and Pappas, G. J. Safety verification and robustness analysis of neural networks via quadratic constraints and semidefinite programming. IEEE Transactions on Automatic Control, 67(1):1–15, 2020.
Fournier, N. and Guillin, A. On the rate of convergence in wasserstein distance of the empirical measure. Probability theory and related fields, 162(3):707–738, 2015.
Gangbo, W. and McCann, R. J. The geometry of optimal transportation. 1996.
Ganin, Y., Ustinova, E., Ajakan, H., Germain, P., Larochelle, H., Laviolette, F., March, M., and Lempitsky, V. Domain-adversarial training of neural networks. Journal of machine learning research, 17(59):1–35, 2016.
Gelman, A. and Meng, X.-L. Simulating normalizing constants: From importance sampling to bridge sampling to path sampling. Statistical science, pp. 163–185, 1998.
Genevay, A., Cuturi, M., Peyré, G., and Bach, F. Stochastic optimization for large-scale optimal transport. Advances in neural information processing systems, 29, 2016.
Glorot, X., Bordes, A., and Bengio, Y. Domain adaptation for large-scale sentiment classification: A deep learning approach. In Proceedings of the 28th international conference on machine learning (ICML-11), pp. 513–520, 2011.
Gulrajani, I. and Lopez-Paz, D. In search of lost domain generalization. arXiv preprint arXiv:2007.01434, 2020.
Hájek, A. What conditional probability could not be. Synthese, 137(3):273–323, 2003.
Hendrycks, D., Liu, X., Wallace, E., Dziedzic, A., Krishnan, R., and Song, D. Pretrained transformers improve out-of-distribution robustness. arXiv preprint arXiv:2004.06100, 2020.
James, G., Witten, D., Hastie, T., Tibshirani, R., et al. An introduction to statistical learning, volume 112. Springer, 2013.
Kallenberg, O. and Kallenberg, O. Foundations of modern probability, volume 2. Springer, 1997.
Kim, H., Papamakarios, G., and Mnih, A. The lipschitz constant of self-attention. In International Conference on Machine Learning, pp. 5562–5571. PMLR, 2021.
Krueger, D., Caballero, E., Jacobsen, J.-H., Zhang, A., Binas, J., Zhang, D., Le Priol, R., and Courville, A. Out-of-distribution generalization via risk extrapolation (rex). In International conference on machine learning, pp. 5815–5826. PMLR, 2021.
Liu, J., Shen, Z., He, Y., Zhang, X., Xu, R., Yu, H., and Cui, P. Towards out-of-distribution generalization: A survey. arXiv preprint arXiv:2108.13624, 2021.
Long, M., Cao, Y., Wang, J., and Jordan, M. Learning transferable features with deep adaptation networks. In International conference on machine learning, pp. 97–105. PMLR, 2015.
Moreno-Torres, J. G., Raeder, T., Alaiz-Rodríguez, R., Chawla, N. V., and Herrera, F. A unifying view on dataset shift in classification. Pattern recognition, 45(1):521–530, 2012.
Panaretos, V. M. and Zemel, Y. Statistical aspects of wasserstein distances. Annual review of statistics and its application, 6(1):405–431, 2019.
Pei, Z., Cao, Z., Long, M., and Wang, J. Multi-adversarial domain adaptation. In Proceedings of the AAAI conference on artificial intelligence, volume 32, 2018.
Rame, A., Dancette, C., and Cord, M. Fishr: Invariant gradient variances for out-of-distribution generalization. In International Conference on Machine Learning, pp. 18347–18377. PMLR, 2022.
Redko, I., Habrard, A., and Sebban, M. Theoretical analysis of domain adaptation with optimal transport. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 737–753. Springer, 2017.
Roux, N., Schmidt, M., and Bach, F. A stochastic gradient method with an exponential convergence rate for finite training sets. Advances in neural information processing systems, 25, 2012.
Shen, J., Qu, Y., Zhang, W., and Yu, Y. Wasserstein distance guided representation learning for domain adaptation. In Proceedings of the AAAI conference on artificial intelligence, volume 32, 2018.
Sugiyama, M., Krauledat, M., and Müller, K.-R. Covariate shift adaptation by importance weighted cross validation. Journal of Machine Learning Research, 8(5), 2007.
Sun, B. and Saenko, K. Deep coral: Correlation alignment for deep domain adaptation. In Computer vision–ECCV 2016 workshops: Amsterdam, the Netherlands, October 8-10 and 15-16, 2016, proceedings, part III 14, pp. 443–450. Springer, 2016.
Verleysen, M. and François, D. The curse of dimensionality in data mining and time series prediction. In International work-conference on artificial neural networks, pp. 758–770. Springer, 2005.
Virmaux, A. and Scaman, K. Lipschitz regularity of deep neural networks: analysis and efficient estimation. Advances in Neural Information Processing Systems, 31, 2018.
Zhang, X., He, Y., Xu, R., Yu, H., Shen, Z., and Cui, P. Nico++: Towards better benchmarking for domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16036–16047, 2023.
Zhang, Y., Liu, T., Long, M., and Jordan, M. Bridging theory and algorithm for domain adaptation. In International conference on machine learning, pp. 7404–7413. PMLR, 2019.
Zhang, Y., Deng, B., Tang, H., Zhang, L., and Jia, K. Unsupervised multi-class domain adaptation: Theory, algorithms, and practice. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(5):2775–2792, 2020.
Zhao, H., Des Combes, R. T., Zhang, K., and Gordon, G. On learning invariant representations for domain adaptation. In International conference on machine learning, pp. 7523–7532. PMLR, 2019.
Zou, D., Balan, R., and Singh, M. On lipschitz bounds of general convolutional neural networks. IEEE Transactions on Information Theory, 66(3):1738–1759, 2019.
A. Related Work
Generalization theory under distribution shift is an important and long-standing problem. Researchers usually seek to measure distribution shift using some distribution divergence and derive corresponding learning bounds. Early theoretical works mainly focused on the X (covariate) shift. Ben-David et al. (2006; 2010) used the H-divergence to measure X shift between the source and target domains for binary classification, thereby deriving learning bounds for domain adaptation. Subsequent studies characterized the X shift via maximum mean discrepancy (MMD), leading to new learning bounds and improved domain adaptation algorithms (Long et al., 2015). Redko et al. (2017); Courty et al. (2017); Shen et al. (2018) adopted optimal transport (OT) to characterize X shift and obtained similar bounds. Further studies proposed more complex metrics for the X shift to extend the theory to multiclass classification (Zhang et al., 2019; 2020; El Hamri et al., 2025).
Most of these theories focus only on the X shift and follow a similar proof strategy, resulting in a joint error term between the source and target domains, λ=minhϵS(h)+ϵT(h), which is widely recognized as loose and non-estimable. Our baseline, Zhao et al. (2019), showed that the Y|X (concept) shift is implicitly contained in this joint error term λ, and derived a tighter learning bound by explicitly introducing the Y|X shift instead. Zhang et al. (2023) extended this theory to multiclass classification. We follow this path of explicitly characterizing the Y|X shift, and point out that the existing definition of the Y|X shift becomes ill-defined when the supports of the covariate distributions are mismatched, which still makes the Y|X shift loose and non-estimable. Through entropic optimal transport, we introduce a well-defined γ∗−Y∣X shift and the corresponding learning bound, which can be rigorously estimated from samples. Our theory can be tighter than existing bounds and further generalizes to a broader tasks, losses, and stochastic labeling.
Table 1. Comparison of learning bounds for distribution shift.
Bound
Divergence
Terms
Properties
X shift
Y|X shift
Remaining Term
Tight
Estimable
General
Ben-David et al. (2006)
H-divergence
✓
joint-error λ
Ben-David et al. (2010)
H-divergence
✓
joint-error λ
Long et al. (2015)
MMD
✓
joint-error λ
Redko et al. (2017)
OT
✓
joint-error λ
Courty et al. (2017)
OT
estimated XY shift
joint-error λ, kMΦ
✓
Shen et al. (2018)
OT
✓
joint-error λ
Zhao et al. (2019)
H-divergence
✓
✓ (ill-defined)
✓
Zhang et al. (2023)
H-divergence
✓
✓ (ill-defined)
✓
✓
El Hamri et al. (2025)
hierarchical OT
✓
joint-error λ
Ours
entropic OT
✓
✓
✓✓
✓
✓✓
✓✓ indicates a stronger degree than ✓.
Distribution shift theory often serves as a theoretical framework for domain adaptation and domain generalization, where many algorithms have been developed (Sugiyama et al., 2007; Glorot et al., 2011; Sun & Saenko, 2016; Ganin et al., 2016; Pei et al., 2018; Arjovsky et al., 2019; Krueger et al., 2021; Rame et al., 2022). However, the DomainBed benchmark (Gulrajani & Lopez-Paz, 2020) shows that many algorithms do not outperform standard empirical risk minimization. This calls for tighter and more general theoretical frameworks to explain the generalization failures of these algorithms. In addition, the proposed γ∗−Y∣X shift takes a nested OT form, whose other mathematical properties have also been studied recently, such as the gradient flow of the Wasserstein-over-Wasserstein distance (Bonet et al., 2025).
B. Technical Tools
In this section, we introduce several existing mathematical tools to prove the propositions in Appendix C.
B.1. Conditional Probability
Definition B.1 (Conditional Probability). Let (Ω,F,P) be a probability space and X:Ω→X a random variable with distribution PX. For event A∈F, a PX-measurable function P(A∣X=x):X→[0,1] is the conditional probability of
A given X if:
∀B∈BX,P(A∩{X∈B})=∫BP(A∣X=x)dPX(x)
where BX denotes the Borel σ-algebra on X.
The conditional probability is unique almost everywhere with respect to PX (unique PX-a.e.) (Kallenberg & Kallenberg, 1997). That is, for any PX-null set Z with PX(Z)=0, ∫ZP(A∣X=x)dPX(x)=0, implying that P(A∣X=x) can be assigned arbitrarily on Z without affecting its overall properties. Intuitively, it means discussing conditional probabilities on a null set is meaningless (Hájek, 2003).
B.2. McDiarmid's Inequality
Lemma B.2 (McDiarmid's Inequality). Let Z1,…,Zn be independent random variables taking values in sets Z1,…,Zn, and let F:Z1×⋯×Zn→R. Assume F satisfies the bounded-differences property: there exist constants c1,…,cn≥0 such that for every i∈[n] and any two inputs (z1,…,zn) and (z1,…,zi′,…,zn) differing only at the i-th coordinate,
Lemma B.3 (Square-Exponential Moment Implies T1 (Bolley et al., 2007)). Let (X,ρ) be a Polish metric space and μ a Borel probability measure on X. Assume μ admits a square-exponential moment: there exist a>0 and x0∈X such that
∫Xexp(aρ(x,x0)2)dμ(x)<∞.
Then μ satisfies a T1(λ) transport-entropy inequality for some λ>0: for all probability measures ν on X,
W1(μ,ν)≤λ2H(ν∣μ).
Lemma B.4 (Bolley–Guillin Concentration for Empirical W1 (Bolley et al., 2007)). Let μ be a probability measure on (Rd,∥⋅∥) that satisfies the transport inequality T1(λ) for some λ>0, namely for all probability measures ν,
W1(μ,ν)≤λ2H(ν∣μ),
where H(ν∣μ) denotes the relative entropy. Let μ^=N1∑i=1NδXi be the empirical measure of i.i.d. samples X1,…,XN∼μ. Then for any d′>d and any λμ∈(0,λ), there exists a constant N0 depending only on λμ, d′, and the squared-exponential moments of μ such that for any ε>0 and any
N≥N0max(ε−(d′+2),1),
we have
P(W1(μ,μ^)>ε)≤exp(−2λμNε2).
C. Full proofs
C.1. Proof of Lemma 2.2
Proof. Since supp(PX′)∖supp(PX)=∅, pick x0∈supp(PX′)∖supp(PX). By Definition 2.1, x0∈/supp(PX) implies that there exists an open neighborhood U⊆X with x0∈U such that
PX(U)=0.
On the other hand, x0∈supp(PX′) implies PX′(V)>0 for every open neighborhood V∋x0, hence in particular PX′(U)>0. Let Z:=U. Then Z∈BX and
PX(Z)=0,PX′(Z)>0.
Let P(A∣X=x):X→[0,1] be a conditional probability in Definition B.1, i.e., for all B∈BX,
P(A∩{X∈B})=∫BP(A∣X=x)dPX(x).
For any constant c∈[0,1], define a modified function
Since PX′(Z)>0 and c∈[0,1] is arbitrary, the value of EPX′[P(A∣X=x)] can be changed by choosing different c while preserving the defining property of conditional probability under PX. Hence EPX′[P(A∣X=x)] is arbitrary.
Remark The above proof shows that support mismatch leads to arbitrariness. Broadly speaking, support mismatch commonly breaks the rigor of theoretical analyses. Some studies explicitly exclude it from analysis by extra assumptions, such as done in the absolute continuity in measure theory (Duncan, 1970), the positivity assumption in causal inference (Cole & Frangakis, 2009), or support overlap in importance sampling (Gelman & Meng, 1998).
Applying this with a=fS(xS) and b=fT(xT) yields Spair(xS,xT)=ρY(fS(xS),fT(xT)), and thus
SCptγ∗=E(xS,xT)∼γ∗[ρY(fS(xS),fT(xT))],
as claimed.
C.3. Proof of Lemma 3.4
Proof. Any γ∈Γ(DXS,DXT) is a coupling of DXS and DXT, hence its first marginal is DXS and its second marginal is DXT. Take any (xS,xT)∈/supp(DXS)×supp(DXT). Then either xS∈/supp(DXS) or xT∈/supp(DXT).
If xS∈/supp(DXS), by Definition 2.1 there exists an open neighborhood U⊆X of xS such that DXS(U)=0. Since the first marginal of γ is DXS,
γ(U×X)=DXS(U)=0.
In particular, for any open neighborhood V of xT we have γ(U×V)≤γ(U×X)=0, so γ(U×V)=0. Thus, taking the product open set U×V containing (xS,xT), we conclude that (xS,xT)∈/supp(γ) by Definition 2.1 applied on the product topology of X×X.
The case xT∈/supp(DXT) is symmetric: there exists an open V∋xT with DXT(V)=0, and using the second marginal of γ gives γ(X×V)=0, hence γ(U×V)=0 for any open U∋xS, implying (xS,xT)∈/supp(γ).
Therefore every point outside supp(DXS)×supp(DXT) is outside supp(γ), i.e.,
supp(γ)⊆supp(DXS)×supp(DXT).
C.4. Proof of Lemma 3.5
Proof. Let ν:=DXS⊗DXT and consider the entropic optimal transport objective
We claim that J is strictly convex over the convex set Γ(DXS,DXT). Indeed, the transport cost term γ↦∫ρXdγ is linear in γ. For the entropy term, write r=dνdγ; then
H(γ∣ν)=∫rlogrdν.
For any γ1,γ2∈Γ(DXS,DXT) with γ1=γ2, by Lemma 3.4,
Because φ(t)=tlogt is strictly convex on [0,∞), for and any λ∈(0,1),
H(λγ1+(1−λ)γ2∣ν)<λH(γ1∣ν)+(1−λ)H(γ2∣ν),
hence (multiplying by β>0) the whole objective satisfies
J(λγ1+(1−λ)γ2)<λJ(γ1)+(1−λ)J(γ2).
Now suppose, toward a contradiction, that there are two distinct optimal couplings γ1=γ2 minimizing J over Γ(DXS,DXT). By convexity of Γ(DXS,DXT), their mixture γλ:=λγ1+(1−λ)γ2 is feasible. Strict convexity then yields
J(γλ)<λJ(γ1)+(1−λ)J(γ2)=γ∈ΓinfJ(γ),
a contradiction. Therefore the optimizer γ∗ is unique.
C.5. Proof of Lemma 3.6
Proof. When β=0, Definition 3.1 reduces to the Wasserstein-1 problem
γ∈Γ(DXS,DXT)inf∫ρX(xS,xT)dγ(xS,xT),
where ρX is a metric, hence ρX≥0 and ρX(xS,xT)=0 if xS=xT.
Consider the diagonal (identity) coupling γˉ:=(Id,Id)#DXS, i.e.,
γˉ(A)=∫1{(x,x)∈A}dDXS(x).
It is immediate that γˉ∈Γ(DXS,DXS), and its transport cost is
∫ρX(xS,xT)dγˉ(xS,xT)=∫ρX(x,x)dDXS(x)=0.
Therefore the optimal value is at most 0, hence equals 0.
Let γ∗∈Γ(DXS,DXS) be any optimal coupling. Then
0=∫ρX(xS,xT)dγ∗(xS,xT).
Since the integrand is nonnegative, this implies ρX(xS,xT)=0 holds γ∗-almost surely, i.e., (xS,xT)∈ζ:={(x,x):x∈X}γ∗-a.s. Hence supp(γ∗)⊆ζ.
Finally, because γ∗ is supported on ζ and has first marginal DXS, for every measurable A⊆X×X we have
which proves γ∗=(Id,Id)#DXS and the stated equivalent form.
C.6. Proof of Theorem 3.7
Proof. For β>0, Lemma 3.5 ensures that the entropic optimal transport coupling γ∗ in Definition 3.1 is unique. Hence any potential ambiguity of SCptγ∗ can only come from the choice of versions of the conditional distributions.
Given any two versions of the source conditionals {DYS∣X=x}x∈X and {DYS∣X=x}x∈X, and any two versions of the target conditionals {DYT∣X=x}x∈X and {DYT∣X=x}x∈X, such that DYS∣X=x=DYS∣X=x holds DXS-a.e., and DYT∣X=x=DYT∣X=x holds DXT-a.e. Therefore, there exist measurable sets ES,ET⊆X with DXS(ES)=0 and DXT(ET)=0 such that the equalities hold for all x∈/ES and all x∈/ET, respectively.
By Lemma 3.4, supp(γ∗)⊆supp(DXS)×supp(DXT), so γ∗ never places mass outside the support product region. Furthermore, since γ∗∈Γ(DXS,DXT), hence
γ∗(ES×X)=DXS(ES)=0,γ∗(X×ET)=DXT(ET)=0,
and therefore γ∗(E)=0, and thus
SCptγ∗−SCptγ∗=0.
Therefore SCptγ∗ does not depend on the choice of versions of the conditional distributions. This proves that SCptγ∗ is unique, regardless of whether supp(DXS)=supp(DXT).
C.7. Proof of Proposition 3.8
Proof. Since β=0 and DXS=DXT, Lemma 3.6 gives that the optimal coupling collapses to the diagonal:
γ∗=(Id,Id)#DXS.
Under deterministic labeling and ρy=∣⋅∣, Corollary 3.3 yields
SCptγ∗=E(xS,xT)∼γ∗[∣fS(xS)−fT(xT)∣].
Substituting γ∗=(Id,Id)#DXS implies (xS,xT)=(x,x) with x∼DXS, hence
Let γXY∈Γ(DXYS,DXYT) be any coupling on (X×Y)×(X×Y), i.e., its first marginal is DXYS and second marginal is DXYT. Hence, for any integrable functions φ,ψ,
Step 1: construct a specific joint coupling. Let γ∗∈Γ(DXS,DXT) be the optimal coupling in Definition 3.1. For each (xS,xT), let γY∣(xS,xT)∗∈Γ(DY∣X=xSS,DY∣X=xTT) be an optimal coupling of Spair(xS,xT) in Definition 3.2, define the joint distribution of couplings
Substituting this into the earlier inequality for ϵT(h) gives
ϵT(h)≤ϵS(h)+(LhLℓ′)SCov+LℓSCptγ∗,
which proves the theorem.
C.12. Proof of Theorem 4.2
Proof. We work with β=0, hence Wβ=W1. For brevity, denote
μ:=DXS,ν:=DXT,c:=W1(μ,ν).
Let μ^′, μ^′′ (resp. ν^′, ν^′′) be the two half-sample empirical measures constructed in Definition 4.1. They are independent within each domain because they are built from disjoint halves of i.i.d. samples.
A useful inequality. We will use the elementary fact: for any a,b≥0,
∣a−b∣≤∣a−b∣.
Indeed, if a≥b then a−b=a+ba−b≤a−ba−b=a−b, and the case b≥a is symmetric.
Step 1: rewrite the debiased estimator and introduce an auxiliary statistic. Define
Step 2: reduce {∣W1deb−c∣>ε} to an event on T. First note the deterministic inequality
∣S∣−c2≤∣S−c2∣=T,
which holds because c2≥0. Hence, using the inequality in the first paragraph,
∣W1deb−c∣=∣S∣−c2≤∣∣S∣−c2∣≤T.
Therefore, for any ε>0,
P(∣W1deb−c∣>ε)≤P(T>ε)=P(T>ε2).
This bound is always valid and is particularly useful when c is small.
When c≥ε, we can obtain a complementary reduction by squaring the deviation event. Indeed, ∣W1deb−c∣>ε implies either W1deb>c+ε or W1deb<c−ε. In both cases,
Step 4: apply traditional concentration inequality. By assumption, μ and ν have finite squared-exponential moments on Rd. Lemma B.3 and B.4 implies that there exist constants λS,λT>0, depending only on the squared-exponential moments of μ and ν respectively, such that for any ε0>0 there exists N with the following property: whenever NS/2≥N and NT/2≥N,
Since s(a)>a−2 for a≥1 (indeed s(a)=a2+4a−2>a), we have a+2+s(a)>2a, hence a+2+s(a)6a<3, which implies 2−V2(a)>0 and thus V2(a)<2 for every finite a. Moreover, as a→∞, one has a+2+s(a)∼2a, hence a+2+s(a)6a→3 and therefore V2(a)→2.
Conclusion. Combining (i)–(iii), the global minimum is attained at a=1 with
a≥0minV(a)=2−3,
and the supremum equals 2 but is not attained:
V(a)∈[2−3,2),a≥0.
□
C.13. Proof of Lemma 4.4
Proof. We follow (Eckstein & Nutz, 2022). Recall that the entropically regularized OT problem is
Sentε(μ,ν,c):=π∈Π(μ,ν)inf∫cdπ+εKL(π∥μ⊗ν),
and for fixed ε>0 one may assume ε=1 by dividing the objective by ε and using the cost c/ε.
Step 1 (Reduction to ε=1 and identification of L=1/β). Let c(x1,x2):=ρX(x1,x2). The β-entropic OT objective
∫cdπ+βKL(π∥μ⊗ν
has the same optimizer as
∫β1cdπ+KL(π∥μ⊗ν),
since the two objectives differ only by a multiplicative factor β. Hence the optimal coupling for Wβ(μ,ν) equals the optimizer of Sent1(μ,ν,cβ) with cβ:=c/β.
so c is 1-Lipschitz w.r.t. ρ, and therefore cβ=c/β satisfies the Lipschitz condition (AL) of Eckstein & Nutz (2022) with constant
L=Lip(cβ)=β1.
Step 2 (Apply Theorem 3.11). Let μ:=DXS, ν:=DXT, and similarly μ^:=DXS, ν^:=DXT. Let γ∗ and γ^∗ be the optimizers of Sent1(μ,ν,cβ) and Sent1(μ^,ν^,cβ), respectively.
Assume μ and ν have finite squared-exponential moments. Then by Lemma 3.10(ii) in Eckstein & Nutz (2022), the pair of marginals satisfies the inequality (I1) with some finite constant C1>0 depending only on these squared-exponential moments.
Now apply Theorem 3.11 of Eckstein & Nutz (2022) with N=2 and p=q=1. Since N1/q−1/p=1, we obtain
Step 3 (Upper bound Δ by Λ). Let πS be an optimal coupling between μ and μ^, and πT an optimal coupling between ν and ν^. Then πS⊗πT is a coupling between (μ,ν) and (μ^,ν^) on X×X, and its expected ρ-cost equals
Taking the infimum over all couplings yields Δ≤Λ. Therefore,
W1(γ∗,γ^∗)≤Λ+C12LΛ=Λ+C1β2Λ.
Step 4 (Definition of λγ∗ and the factor 22). Define
λγ∗:=C124⟺C1=λγ∗2.
Then
C1β2Λ=λγ∗2β2Λ=2βλγ∗2Λ,
which yields the claimed bound. Finally, λγ∗>0 depends only on the squared-exponential moments of μ and ν because C1 does via Lemma 3.10(ii) (Eckstein & Nutz, 2022).
Let γ∗ be the population entropic OT coupling between μ and ν (with β>0), and let γ^∗=(γ^ij∗)∈R+NS×NT be the discrete optimal coupling solving Wβ(μ^,ν^). It satisfies the marginal constraints
Because f(xS,xT) is the transport cost under the independent coupling DYS∣xS⊗DYT∣xT, while Spair(xS,xT) is the infimum over all couplings, we have
f(xS,xT)−Spair(xS,xT)≥0.
Define the (constant) bias term
Δ:=E(xS,xT)∼γ∗[f(xS,xT)−Spair(xS,xT)].
Then
SCptγ∗+Δ=Eγ∗[f(xS,xT)].
Hence it suffices to prove concentration of S^Cpt around Eγ∗[f].
Step 2: decompose the error into a Y-noise term and a coupling-stability term. By Definition 4.3,
We will bound A by McDiarmid's inequality and B by Lipschitzness of f and stability of entropic OT.
Step 3: concentration of A via McDiarmid inequality B.2. Condition on all covariates {Xi(S)}i=1NS and {Xj(T)}j=1NT. Under this conditioning, γ^∗ is fixed (it depends only on the covariates), and the labels {Yi(S)} are independent with Yi(S)∼DY∣X=Xi(S), and similarly {Yj(T)} are independent with Yj(T)∼DY∣X=Xj(T).
Bounded differences for changing one source label. Fix an index i and replace Yi(S) by another value Y_i^{(S)}' in Y, keeping all other labels the same. Then, by the triangle inequality,
Therefore A=∣F−E[F∣{X}]∣ is exactly the deviation term we bounded.
Step 4: bound B using Lipschitzness of f and stability of entropic OT.
Step 4.1: show f is (MLY∣X)-Lipschitz on Rd×Rd. We prove Lipschitzness in the first coordinate; the second is symmetric. Fix xT and let xS,xS′∈Rd. Write πxSS:=DY∣X=xS and πxTT:=DY∣X=xT. Then
Step 4.2: convert B to a Wasserstein distance on couplings. By the Kantorovich–Rubinstein duality for W1 on (Rd×Rd,ρ), for any K-Lipschitz function φ,
Eπ[φ]−Eπ′[φ]≤KW1(π,π′).
Apply this with φ=f and K=MLY∣X,π=γˉ∗,π′=γ∗:
B=Eγˉ∗[f]−Eγ∗[f]≤MLY∣XW1(γ∗,γˉ∗).
Step 4.3: apply entropic OT stability and then concentration of marginals. By Lemma 4.4,
Since μ,ν have finite squared-exponential moments on Rd, by Lemma B.3 and B.4, there exist constants λS,λT>0 depending only on these moments such that for any ε2>0 there exists N with, whenever NS,NT>N,
Under deterministic labeling, DY∣X=xSS=δfS(xS) and DY∣X=xTT=δfT(xT). Hence the random variables yS,yT are almost surely equal to fS(xS),fT(xT), and thus
f(xS,xT)=E[ρy(yS,yT)]=ρy(fS(xS),fT(xT)).
On the other hand, the Wasserstein-1 distance between two Dirac measures is exactly the ground metric:
Lower bound Δ≥0. For each fixed (xS,xT), the product measure DY∣X=xSS⊗DY∣X=xTT belongs to Γ(DY∣X=xSS,DY∣X=xTT). Since Spair(xS,xT) is the infimum of E[∥yS−yT∥] over all such couplings,
Next we lower bound Spair(xS,xT)=W1(P,Q) by the distance between the means. Let π∈Γ(P,Q) be any coupling, and denote mP:=Ey∼P[y],mQ:=Ey∼Q[y]. Since ∥⋅∥ is convex, Jensen's inequality yields
E(y,y′)∼π[∥y−y′∥]≥E(y,y′)∼π[y−y′].
By the marginal constraints of π, we have E(y,y′)∼π[y]=mP and E(y,y′)∼π[y′]=mQ, hence
Finally, under squared loss on Rd, the minimizer of E[∥Y−g(x)∥2∣X=x] is g(x)=E[Y∣X=x]. Therefore the functions mS(x)=E[Y(S)∣X(S)=x] and mT(x)=E[Y(T)∣X(T)=x] achieve the infima of I(DXYS) and I(DXYT), i.e.,
D. Analysis of Lipschitz Constants: Results and Proofs
D.1. Lipschitz Constant of the Sigmoid Function
Proposition D.1 (Lipschitz constant of the sigmoid). Let σ:R→R be the sigmoid function
\sigma(x)\= {\frac{1}{1+e^{-x}}}.
Then σ is globally 41-Lipschitz on R.
Proof. We first compute the derivative:
σ′(x)=dxd(1+e−x)−1=(1+e−x)2e−x.
Using σ(x)=1+e−x1 and 1−σ(x)=1+e−xe−x, we can rewrite
σ′(x)=σ(x)(1−σ(x)).
Let u=σ(x)∈(0,1). Then σ′(x)=u(1−u), and for all u∈[0,1],
u(1−u)=u−u2≤t∈[0,1]max(t−t2)=41,
where the maximum is attained at t=21. Hence 0<σ′(x)≤41 for all x.
Now fix any x,y∈R. Since σ is differentiable on R (hence continuous), by the mean value theorem, there exists c between x and y such that
σ(x)−σ(y)=σ′(c)(x−y).
Taking absolute values and using σ′(c)≤41 yields
∣σ(x)−σ(y)∣=∣σ′(c)∣∣x−y∣≤41∣x−y∣,
so σ is 41-Lipschitz.
D.2. Lipschitz Constant of the Logistic Regression
Proposition D.2 (Lipschitz constant of logistic regression under ℓp/ℓq). Fix w∈Rd and b∈R. Define
hw,b(x)=σ(w⊤x+b),σ(t)=1+e−t1.
Let p∈[1,∞] and let q∈[1,∞] be its Hölder conjugate, i.e., p1+q1=1. Then hw,b is globally 4∥w∥q-Lipschitz with respect to ∥⋅∥p, namely for all x,x′∈Rd,
hw,b(x)−hw,b(x′)≤4∥w∥q∥x−x′∥p.
In particular, under ∥⋅∥2, the Lipschitz constant equals ∥w∥2/4.
Proof. For any x,x′∈Rd, apply the mean value theorem to σ to obtain some ξ between w⊤x+b and w⊤x′+b such that
hw,b(x)−hw,b(x′)=σ′(ξ)w⊤(x−x′).
Thus
hw,b(x)−hw,b(x′)≤∣σ′(ξ)∣w⊤(x−x′).
By Proposition D.1, we have ∣σ′(ξ)∣≤41. By Hölder's inequality with conjugate exponents (p,q),
w⊤(x−x′)≤∥w∥q∥x−x′∥p.
Combining the two inequalities yields
hw,b(x)−hw,b(x′)≤41∥w∥q∥x−x′∥p,
which proves the claim.
D.3. Lipschitz Constant of the Linear Multi-class Classifier
Proposition D.3.1 (Lipschitz constant of the linear classifier under ∥⋅∥2). Let W∈RN×d and b∈RN. Define
f(x)=softmax(Wx+b)∈ΔN−1,x∈Rd.
Here ΔN−1:={p∈RN:pi≥0,∀i,∑i=1Npi=1} denotes the probability simplex. Let wi⊤ denote the i-th row of W and define
D(W):=i,j∈[N]max∥wi−wj∥2.
Then f is Lipschitz from (Rd,∥⋅∥2) to (RN,∥⋅∥2) and its optimal Lipschitz constant equals
x∈Rdsup∥∇f(x)∥2=221D(W),
where ∥⋅∥2 denotes the matrix operator norm induced by the vector ∥⋅∥2 norm.
Proof. For z∈RN, write p=softmax(z)∈ΔN−1. The Jacobian of softmax is
J(p)=∇zsoftmax(z)=Diag(p)−pp⊤,
where Diag(p) is the diagonal matrix with diagonal entries p1,…,pN. By the chain rule, for p=softmax(Wx+b),
∇f(x)=J(p)W.
Therefore,
x∈Rdsup∥∇f(x)∥2=p∈ΔN−1sup∥J(p)W∥2.(16)
Fix p∈ΔN−1 and a unit vector u∈Rd with ∥u∥2=1. Let
v:=Wu∈RN,μ:=p⊤v.
and μ represents the mean of v under the probability distribution p. We have
where Varp(v):=∑ipi(vi−μ)2, which represents the variance of v under the probability distribution p. If p is supported on two values m:=minivi and M:=maxivi with masses α and 1−α, let r:=M−m, then
i=1∑Npi2(vi−μ)2=2α2(1−α)2r2≤8r2,
with equality at α=21. Since any mass placed at intermediate values of v cannot increase the range-based extremum, we obtain Φ(v)=r2/8, and the optimal p is supported on indices attaining M and m.
Let H⋆ be the optimal value and define LSDP:=H⋆. Then LSDP is a global ∥⋅∥2-Lipschitz constant of f, i.e.,
∥f(x)−f(y)∥2≤LSDP∥x−y∥2,∀x,y∈Rn0.
E. Additional Experiments
E.1. Experiments on Estimator Sensitivity
In this section, we conduct a sensitivity analysis of the proposed estimators S^Cov and S^Cpt with respect to the parameter β. We take the "-90%" domain of ColoredMNIST as the target domain and regard the mixture of the other two domains as the source domain. We train the model on the source domain using ERM with the best hyperparameters in DomainBed. At the last checkpoint, we store all representation-label pairs from both the source and target domains. For each β, we randomly sample 10,000 pairs from each domain, run the DataShifts algorithm to obtain the estimated results, repeat this procedure 50 times, and report the average. The results are shown below:
Table 2. Sensitivity analysis with respect to β.
β
0.001
0.002
0.005
0.01
0.02
0.05
0.1
0.2
S^Cov
0.5081
0.5080
0.5078
0.5074
0.5066
0.5041
0.4995
0.4916
S^Cpt
1.4456
1.4458
1.4467
1.4478
1.4501
1.4567
1.4674
1.4895
Time (s)
15.12
14.09
12.62
11.60
10.54
9.09
8.03
6.83
Across magnitude changes in β, the coefficients of variation of S^Cov and S^Cpt are 1.076% and 0.990%, so both estimators are stable for small β. Since entropic OT gets faster as β grows, we use β=0.2 in the main experiments to balance speed and accuracy.
E.2. Experiments on the Bias under Stochastic Labeling
We test the bias of our γ∗−Y∣X shift estimator S^Cpt on the following stochastic-labeling synthetic data. In both source and target domains, covariates are drawn from a 10-dim standard normal distributions. At each x, scalar labels are sampled from normal distribution N(∥x∥2,σ2) in the source and N(∥x∥2+1.0,σ2) in the target. Thus, the true Y|X shift SCptγ∗=1.0, and standard deviation σ controls the noise. By Proposition 4.7, the irreducible errors of both domains are σ2, and the bias Δ≥0 of our estimator should be bounded by 2σ. Δ^=S^Cpt−SCptγ∗ is an estimate of the bias Δ. For each σ, we randomly sample 10,000 points from each domain, and run DataShifts algorithm with β=0.2, repeat this procedure 50 times, and report the average Δ^. The results are shown below:
Table 3. Bias of S^Cpt under different noise levels σ.
σ
0.01
0.1
0.3
0.5
1.0
2.0
5.0
10.0
Irreducible error bound (2σ)
0.02
0.2
0.6
1.0
2.0
4.0
10.0
20.0
Bias (Δ^)
0.0036
0.0389
0.0702
0.1440
0.4865
1.4524
4.7314
10.3467
When the noise σ is small, the bias Δ^ is also very small, which means our estimator S^Cpt stays close to the true Y|X shift SCptγ∗=1.0. Even when the noise in both domains reaches half of the true Y|X shift (σ=0.5), the bias Δ^ remains small, and the S^Cpt still does not notably overestimate. As σ grows far beyond 1.0, Y|X shift becomes less identifiable. The bias increases and overestimation appears, but it stays below the bound set by irreducible error, as proved in Proposition 4.7.