Introduction
Given two independent populations, a central question is whether some of the underlying distributional or structural characteristics are identical, or sufficiently close to each other. Classical two-sample procedures typically focus on comparisons of means, covariance matrices, distributions, or other finite-dimensional parameters. In many modern applications, however, the object of interest is a regression relationship, and the goal is to determine whether the relationships between a response and a set of covariates are sufficiently similar across two populations. Such problems arise naturally in many areas, including transfer learning with one source dataset, where one seeks to determine whether information from a source population can be appropriately used for a target population.
For parametric regression models, a natural way to compare two populations is through the discrepancy between their regression functions. Rather than comparing parameter vectors directly, one may quantify the difference between the corresponding regression functions using a functional distance, such as the squared L 2 L_2 L 2 -distance. Distance-based comparisons of regression functions have been extensively studied in the literature; see, among others, Munk and Dette [1998], Dette and Neumeyer [2001], Dette et al. [2018], Möllenhoff et al. [2020]. Depending on the scientific objective, the distance may be used to formulate either an exact comparison or a threshold-based testing problem. The latter formulation is particularly relevant to the present paper. Instead of requiring the functional distance to be exactly zero, a prespecified threshold can be introduced to distinguish practically negligible differences from relevant departures. In particular, Dette et al. [2020] considered two-sample functional problems in which an L 2 L_2 L 2 -distance is compared with a relevance threshold. Motivated by this perspective, we consider a tolerance testing problem for two regression functions, where the null hypothesis allows a certain degree of discrepancy as long as it remains within a prespecified acceptable range.
Distance-based similarity testing, however, addresses only one aspect of the two-sample regression problem. Its validity depends on the adequacy of the regression models used to construct the functional distance. If the working regression model is misspecified in either population, the estimated discrepancy may partly reflect model approximation error rather than a genuine difference between the underlying regression relationships. As a result, a comparison based solely on the functional distance may lead to misleading conclusions. This issue is particularly relevant in transfer learning, where a small estimated source-target discrepancy is not sufficient to support information sharing if the regression model in either domain is itself misspecified.
To this end, we extend the distance-based inequality testing problem by simultaneously incorporating model misspecification assessment for the two populations. The overall testing problem requires not only that the functional discrepancy remain below the prespecified tolerance level, but also that the working regression models provide adequate representations of the corresponding conditional mean functions. To achieve this goal, we construct an adaptive-to-model testing procedure that combines the adaptive similarity statistic with model-checking statistics for the two samples through a gating mechanism. Under correct model specification, the model-checking components are asymptotically inactive, whereas under model misspecification the corresponding components can be adaptively activated. The resulting procedure is therefore able to respond to excessive functional discrepancy, model misspecification in either population, or combinations of these departures. Moreover, the proposed framework is developed for sparse high-dimensional regression settings, allowing the predictor dimension to be comparable to or substantially larger than the sample sizes.
Transfer learning may be one of the potential application scenarios of this joint testing framework. In a single-source transfer problem, the two samples naturally correspond to a target domain and a source domain. Successful transfer generally requires a certain degree of compatibility between the two domains, whereas substantial heterogeneity can lead to negative transfer [22 , 29 , 25 ] (Li et al. 2022). Existing high-dimensional transfer learning methods typically impose some notion of source-target similarity when deciding whether source information should be incorporated into the target analysis. From the perspective of the present paper, such compatibility can be examined through a two-sample regression test: the regression functions should be sufficiently close, while the working models used to describe them should also be correctly specified.
The main contributions of this paper are threefold. First, we develop an adaptive boundary-proxy test for distance-based tolerance testing that alleviates the over-conservatism of the conventional inequality testing procedure based on the least favorable configuration (LFC) in the interior of the null region while retaining its favorable locally asymptotically uniformly most powerful (LAUMP) property near the boundary. Second, we go beyond functional similarity testing by explicitly incorporating model misspecification assessment into the two-sample comparison, thereby yielding an adaptive-to-model joint testing framework. Third, the proposed methodology is developed for sparse high-dimensional regression models, allowing both functional similarity and model adequacy to be assessed when the predictor dimension may substantially exceed the sample size. We establish the asymptotic properties of the proposed test statistics and investigate their power under various global and local alternatives.
The remainder of this paper is organized as follows. § 2 introduces the problem setup and formulates the joint hypotheses for functional similarity and model specification. § 3 develops the adaptive boundary-proxy test for functional similarity and establishes its asymptotic properties. § 4 constructs the adaptive-to-model joint test, introduces the model specification components, and analyzes the behavior of the proposed statistic under various global and local alternatives. § 5 discusses the application to transfer learning. § 6 presents the simulation studies and the real-data application, and § 7 discusses extensions to multi-source transfer learning and other directions for future research. All technical proofs are provided in the supplementary material.
Notation. Bold capital letters (e.g., A) represent matrices, and for a matrix A we write ∥ A ∥ \lVert A\rVert ∥ A ∥ for its Frobenius norm. For a vector v v v and q ≥ 1 q \ge1 q ≥ 1 , ∥ v ∥ q \lVert v\rVert_q ∥ v ∥ q denotes its ℓ q \ell_q ℓ q -norm and ∥ v ∥ 0 \lVert v\rVert_0 ∥ v ∥ 0 denotes the number of its nonzero components. Let S p − 1 = { α ∈ R p : ∥ α ∥ 2 = 1 } \mathbb{S}^{p-1} = \{\alpha\in\mathbb{R}^p : \lVert\alpha\rVert_2 = 1\} S p − 1 = { α ∈ R p : ∥ α ∥ 2 = 1 } denote the unit sphere in R p \mathbb{R}^p R p . We use I ( ⋅ ) \mathbb{I}(\cdot) I ( ⋅ ) to denote the indicator function and P ( ⋅ ) \mathbb{P}(\cdot) P ( ⋅ ) the probability measure. For any function g ( x ) g(x) g ( x ) , let g ˙ ( x ) = d g ( x ) d x \dot{g}(x) = \frac{dg(x)}{dx} g ˙ ( x ) = d x d g ( x ) and g ¨ ( x ) = d g ˙ ( x ) d x \ddot{g}(x) = \frac{d\dot{g}(x)}{dx} g ¨ ( x ) = d x d g ˙ ( x ) . We write → P \xrightarrow{P} P and → D \xrightarrow{D} D to denote convergence in probability and convergence in distribution, respectively. The notation X ∼ F X \sim F X ∼ F indicates that X X X follows the distribution F F F . We use s ≪ p s \ll p s ≪ p to denote s / p → 0 s/p \to0 s / p → 0 . Moreover, a ∨ b = max ( a , b ) a \vee b = \max(a,b) a ∨ b = max ( a , b ) , a ∧ b = min ( a , b ) a \wedge b = \min(a,b) a ∧ b = min ( a , b ) , a ∨ b ∨ c = max { a , b , c } a \vee b \vee c = \max\{a,b,c\} a ∨ b ∨ c = max { a , b , c } , and a ∧ b ∧ c = min { a , b , c } a \wedge b \wedge c = \min\{a,b,c\} a ∧ b ∧ c = min { a , b , c } . Throughout this paper, C C C represents a generic constant independent of the sample size n n n , and its value may change across appearances.
Problem Setup and Preliminary Definitions
In this paper, we consider a two-sample regression problem. Suppose that we have two independent datasets { ( X i ( 0 ) , Y i ( 0 ) ) } i = 1 n 0 \{(X_i^{(0)},Y_i^{(0)})\}_{i=1}^{n_0} {( X i ( 0 ) , Y i ( 0 ) ) } i = 1 n 0 and { ( X i ( 1 ) , Y i ( 1 ) ) } i = 1 n 1 \{(X_i^{(1)},Y_i^{(1)})\}_{i=1}^{n_1} {( X i ( 1 ) , Y i ( 1 ) ) } i = 1 n 1 , where ( X i ( l ) , Y i ( l ) ) ∈ R p + 1 (X_i^{(l)},Y_i^{(l)}) \in\mathbb{R}^{p+1} ( X i ( l ) , Y i ( l ) ) ∈ R p + 1 for l = 0 , 1 l = 0, 1 l = 0 , 1 are independent and identically distributed within each dataset. underlying regression model is
Y ( l ) = m l ( X ( l ) ) + ϵ ( l ) , l = 0 , 1 , Y^{(l)} = m_l(X^{(l)}) + \epsilon^{(l)}, \qquad l = 0,1, Y ( l ) = m l ( X ( l ) ) + ϵ ( l ) , l = 0 , 1 ,
where m l ( x ) = E ( Y ( l ) ∣ X ( l ) = x ) m_l(x) = \mathbb{E}(Y^{(l)} \mid X^{(l)} = x) m l ( x ) = E ( Y ( l ) ∣ X ( l ) = x ) denotes the unknown regression function and ϵ ( l ) \epsilon^{(l)} ϵ ( l ) denotes the random error with zero mean and finite variance. Given a parametric family of functions { g l ( ⋅ , θ ( l ) ) : θ ( l ) ∈ Θ l ⊂ R q l } \{g_l(\cdot,\theta^{(l)}):\theta^{(l)}\in\Theta_l\subset\mathbb{R}^{q_l}\} { g l ( ⋅ , θ ( l ) ) : θ ( l ) ∈ Θ l ⊂ R q l } , our objective is two-fold. The first is model checking, which is used to determine whether each parametric model g l ( X ( l ) , θ ( l ) ) g_l(X^{(l)},\theta^{(l)}) g l ( X ( l ) , θ ( l ) ) accurately represents its respective data-generating process. The other is similarity evaluation. The issue is to assess whether the discrepancies between models are negligible. If the models are sufficiently similar, the data from different groups may be pooled. This also serves as the core motivation for transfer learning, where structural commonalities allow knowledge to be adapted from source to target domains. When applied to single-source transfer learning, the two populations 0 and 1 can be interpreted as the target and source domains, respectively.
We now formulate the hypothesis testing problem to simultaneously assess the model adequacy and similarity between two regression models in high-dimensional settings, where the predictor dimension may substantially exceed the sample size. Recall that for the model checking problem, our objective is to test whether the mean function m l ( ⋅ ) m_l(\cdot) m l ( ⋅ ) belongs to a given parametric class of functions { g l ( ⋅ , θ ( l ) ) : θ ( l ) ∈ Θ l ⊂ R q l } \{g_l(\cdot,\theta^{(l)}):\theta^{(l)}\in\Theta_l\subset\mathbb{R}^{q_l}\} { g l ( ⋅ , θ ( l ) ) : θ ( l ) ∈ Θ l ⊂ R q l } for l = 0 , 1 l=0,1 l = 0 , 1 . In this paper, we focus on testing for model misspecification for generalized linear models (GLMs). Extensions to more general model checking problems are straightforward. The null and alternative hypotheses for model checking for the populations 0 and 1 are
H 0 ( 0 ) : P { E ( Y ( 0 ) ∣ X ( 0 ) ) = g 0 ( ( θ 0 ( 0 ) ) ⊤ X ( 0 ) ) } = 1 , for some θ 0 ( 0 ) ∈ Θ 0 , versus H 1 ( 0 ) : P { E ( Y ( 0 ) ∣ X ( 0 ) ) ≠ g 0 ( θ ⊤ X ( 0 ) ) } > 0 , for any θ ∈ Θ 0 , (1) \begin{aligned}
H_0^{(0)} &: \mathbb{P}\{\mathbb{E}(Y^{(0)}\mid X^{(0)})=g_0((\theta_0^{(0)})^\top X^{(0)})\}=1,\text{ for some }\theta_0^{(0)}\in\Theta_0,\quad\text{versus}\\
H_1^{(0)} &: \mathbb{P}\{\mathbb{E}(Y^{(0)}\mid X^{(0)})\ne g_0(\theta^\top X^{(0)})\}>0,\text{ for any }\theta\in\Theta_0, \tag*{(1)}
\end{aligned} H 0 ( 0 ) H 1 ( 0 ) : P { E ( Y ( 0 ) ∣ X ( 0 ) ) = g 0 (( θ 0 ( 0 ) ) ⊤ X ( 0 ) )} = 1 , for some θ 0 ( 0 ) ∈ Θ 0 , versus : P { E ( Y ( 0 ) ∣ X ( 0 ) ) = g 0 ( θ ⊤ X ( 0 ) )} > 0 , for any θ ∈ Θ 0 , (1)
and
H 0 ( 1 ) : P { E ( Y ( 1 ) ∣ X ( 1 ) ) = g 1 ( ( θ 0 ( 1 ) ) ⊤ X ( 1 ) ) } = 1 , for some θ 0 ( 1 ) ∈ Θ 1 , versus H 1 ( 1 ) : P { E ( Y ( 1 ) ∣ X ( 1 ) ) ≠ g 1 ( θ ⊤ X ( 1 ) ) } > 0 , for any θ ∈ Θ 1 , (2) \begin{aligned}
H_0^{(1)} &: \mathbb{P}\{\mathbb{E}(Y^{(1)}\mid X^{(1)})=g_1((\theta_0^{(1)})^\top X^{(1)})\}=1,\text{ for some }\theta_0^{(1)}\in\Theta_1,\quad\text{versus}\\
H_1^{(1)} &: \mathbb{P}\{\mathbb{E}(Y^{(1)}\mid X^{(1)})\ne g_1(\theta^\top X^{(1)})\}>0,\text{ for any }\theta\in\Theta_1, \tag*{(2)}
\end{aligned} H 0 ( 1 ) H 1 ( 1 ) : P { E ( Y ( 1 ) ∣ X ( 1 ) ) = g 1 (( θ 0 ( 1 ) ) ⊤ X ( 1 ) )} = 1 , for some θ 0 ( 1 ) ∈ Θ 1 , versus : P { E ( Y ( 1 ) ∣ X ( 1 ) ) = g 1 ( θ ⊤ X ( 1 ) )} > 0 , for any θ ∈ Θ 1 , (2)
respectively, where Θ l ⊂ R p \Theta_l\subset\mathbb{R}^{p} Θ l ⊂ R p is a compact set and g l ( ⋅ ) g_l(\cdot) g l ( ⋅ ) is a known inverse link function. To ensure the model checking problem is well-defined in high-dimensional settings when the predictor dimension is larger than the sample size, we follow the framework from Janková et al. [ [13 ] and Tan et al. [ [23 ] and impose sparsity under both the null and alternatives. Therefore, under the null H 0 ( l ) H_0^{(l)} H 0 ( l ) , we assume ∥ θ 0 ( l ) ∥ 0 = s l ≪ p \lVert\theta_0^{(l)}\rVert_0=s_l\ll p ∥ θ 0 ( l ) ∥ 0 = s l ≪ p for l = 0 , 1 l=0,1 l = 0 , 1 . Let S ( l ) ⊂ { 1 , … , p } S^{(l)} \subset\{1,\ldots,p\} S ( l ) ⊂ { 1 , … , p } be the active set, i.e., the set of indices of the components of X ( l ) X^{(l)} X ( l ) truly related to the response Y ( l ) Y^{(l)} Y ( l ) . Under H 0 ( l ) H_0^{(l)} H 0 ( l ) , the true regression parameter θ 0 ( l ) \theta_0^{(l)} θ 0 ( l ) is sparse, and the active set becomes S ( l ) = { 1 ≤ j ≤ p : θ 0 j ( l ) ≠ 0 } S^{(l)} = \{1 \le j \le p : \theta_{0j}^{(l)} \ne0\} S ( l ) = { 1 ≤ j ≤ p : θ 0 j ( l ) = 0 } , where θ 0 j ( l ) \theta_{0j}^{(l)} θ 0 j ( l ) denotes the j j j -th component of θ 0 ( l ) \theta_0^{(l)} θ 0 ( l ) .
The parameters θ 0 ( 0 ) \theta_0^{(0)} θ 0 ( 0 ) and θ 0 ( 1 ) \theta_0^{(1)} θ 0 ( 1 ) are unknown, and we estimate them under the high-dimensional GLM setting. For l = 0 , 1 l = 0, 1 l = 0 , 1 , let θ ^ ( l ) \hat{\theta}^{(l)} θ ^ ( l ) be a penalized estimator of θ 0 ( l ) \theta_0^{(l)} θ 0 ( l ) under the GLM setting, that is,
θ ^ ( l ) = arg min θ ∈ Θ l { L n ( l ) ( θ ) + ∑ j = 1 p p λ ( ∣ θ j ∣ ) } (3) \hat{\theta}^{(l)} = \mathop{\arg\min}_{\theta\in\Theta_l} \left\{L_n^{(l)}(\theta) + \sum_{j=1}^{p} p_\lambda(|\theta_j|)\right\} \tag*{(3)} θ ^ ( l ) = arg min θ ∈ Θ l { L n ( l ) ( θ ) + j = 1 ∑ p p λ ( ∣ θ j ∣ ) } (3)
where L n ( l ) ( θ ) = n l − 1 ∑ i = 1 n l ρ ( Y i ( l ) , θ ⊤ X i ( l ) ) L_n^{(l)}(\theta) = n_l^{-1}\sum_{i=1}^{n_l} \rho(Y_i^{(l)}, \theta^\top X_i^{(l)}) L n ( l ) ( θ ) = n l − 1 ∑ i = 1 n l ρ ( Y i ( l ) , θ ⊤ X i ( l ) ) with a general loss function ρ ( ⋅ , ⋅ ) \rho(\cdot,\cdot) ρ ( ⋅ , ⋅ ) , p λ ( ⋅ ) p_\lambda(\cdot) p λ ( ⋅ ) is a penalty function, and λ ≥ 0 \lambda\ge0 λ ≥ 0 is the regularization parameter. Depending on the penalty function, the minimizer in (3) yields many popular sparse estimators, such as the GLM Lasso estimator, the GLM SCAD estimator, and the GLM MCP estimator. Under the alternative H 1 ( l ) H_1^{(l)} H 1 ( l ) , the GLMs are misspecified. Therefore, to investigate the asymptotic properties of θ ^ ( l ) \hat{\theta}^{(l)} θ ^ ( l ) and the corresponding test statistics under the alternatives (misspecified GLMs), we define the pseudo-true parameters:
θ ~ ( l ) = arg min θ ∈ Θ l E [ ρ ( Y ( l ) , θ ⊤ X ( l ) ) ] , (4) \tilde{\theta}^{(l)} = \mathop{\arg\min}_{\theta\in\Theta_l} \mathbb{E}[\rho(Y^{(l)},\theta^\top X^{(l)})], \tag*{(4)} θ ~ ( l ) = arg min θ ∈ Θ l E [ ρ ( Y ( l ) , θ ⊤ X ( l ) )] , (4)
where l = 0 , 1 l = 0, 1 l = 0 , 1 . Let S ~ ( l ) = { 1 ≤ j ≤ p : θ ~ j ( l ) ≠ 0 } \tilde{S}^{(l)} = \{1 \le j \le p : \tilde{\theta}_j^{(l)} \ne0\} S ~ ( l ) = { 1 ≤ j ≤ p : θ ~ j ( l ) = 0 } be the support of θ ~ ( l ) \tilde{\theta}^{(l)} θ ~ ( l ) and s ~ ( l ) = ∣ S ~ ( l ) ∣ \tilde{s}^{(l)} = |\tilde{S}^{(l)}| s ~ ( l ) = ∣ S ~ ( l ) ∣ , where θ ~ j ( l ) \tilde{\theta}_j^{(l)} θ ~ j ( l ) denotes the j j j -th component of θ ~ ( l ) \tilde{\theta}^{(l)} θ ~ ( l ) .
Remark 1. Under the null hypothesis H 0 ( l ) H_0^{(l)} H 0 ( l ) and certain regularity conditions, the pseudo-true parameter θ ~ ( l ) \tilde{\theta}^{(l)} θ ~ ( l ) generally coincides with the true parameter θ 0 ( l ) \theta_0^{(l)} θ 0 ( l ) , that is, θ ~ ( l ) = θ 0 ( l ) \tilde{\theta}^{(l)} = \theta_0^{(l)} θ ~ ( l ) = θ 0 ( l ) for l = 0 , 1 l = 0, 1 l = 0 , 1 . Under the alternative hypothesis H 1 ( l ) H_1^{(l)} H 1 ( l ) , θ ~ ( l ) \tilde{\theta}^{(l)} θ ~ ( l ) typically depends on the cumulative distribution functions of Y ( l ) Y^{(l)} Y ( l ) and X ( l ) X^{(l)} X ( l ) . Bühlmann and van de Geer [ [4 ] investigated the asymptotic properties of the lasso estimator θ ^ ( l ) \hat{\theta}^{(l)} θ ^ ( l ) under high-dimensional misspecified linear models. They showed that the support S ~ ( l ) \tilde{S}^{(l)} S ~ ( l ) of θ ~ ( l ) \tilde{\theta}^{(l)} θ ~ ( l ) satisfies S ~ ( l ) ⊂ S ( l ) \tilde{S}^{(l)} \subset S^{(l)} S ~ ( l ) ⊂ S ( l ) when the predictor X ( l ) X^{(l)} X ( l ) follows a Gaussian distribution with a positive definite covariance matrix. Lu et al. [2012] established the oracle property of the adaptive lasso estimator θ ^ ( l ) \hat{\theta}^{(l)} θ ^ ( l ) under the misspecified GLM when the predictor dimension p p p is fixed. They showed that S ~ ( l ) = S ( l ) \tilde{S}^{(l)} = S^{(l)} S ~ ( l ) = S ( l ) if the true model is also a GLM with a misspecified link function and the linearity condition is satisfied for the predictor X ( l ) X^{(l)} X ( l ) , that is, E ( θ ⊤ X ( l ) ∣ θ 0 ⊤ X ( l ) = θ 0 ⊤ x ) \mathbb{E}(\theta^\top X^{(l)} \mid\theta_0^\top X^{(l)} = \theta_0^\top x) E ( θ ⊤ X ( l ) ∣ θ 0 ⊤ X ( l ) = θ 0 ⊤ x ) exists and is linear in θ 0 ⊤ x \theta_0^\top x θ 0 ⊤ x for all θ ∈ R p \theta\in\mathbb{R}^p θ ∈ R p .
For functional similarity, a conventional formulation is to test the exact equality of two regression functions. However, in practical applications, requiring exact equality of two regression functions is often unnecessarily restrictive and statistically unrealistic. By contrast, we propose an inequality-based testing framework which is more flexible and allows for minor and acceptable differences between the regression models. Specifically, let ( M , ϱ ) (\mathcal{M},\varrho) ( M , ϱ ) be a semi-metric space of real-valued functions g : R p → R g:\mathbb{R}^{p}\to\mathbb{R} g : R p → R equipped with a semi-metric ϱ \varrho ϱ . We assume g l ( x T θ ) ∈ M g_l(x^{\mathsf{T}}\theta)\in\mathcal{M} g l ( x T θ ) ∈ M for all θ ∈ Θ l \theta\in\Theta_l θ ∈ Θ l and l = 0 , 1 l=0,1 l = 0 , 1 . In this paper, we are particularly interested in the semi-metric space of all continuous functions with L 2 L_2 L 2 -distances
ϱ { g 0 ( x T θ ( 0 ) ) , g 1 ( x T θ ( 1 ) ) } = ∫ X ∣ g 0 ( x T θ ( 0 ) ) − g 1 ( x T θ ( 1 ) ) ∣ 2 d F ( x ) , \varrho\{g_0(x^{\mathsf{T}}\theta^{(0)}),g_1(x^{\mathsf{T}}\theta^{(1)})\}=\int_{\mathcal{X}}\left|g_0(x^{\mathsf{T}}\theta^{(0)})-g_1(x^{\mathsf{T}}\theta^{(1)})\right|^2dF(x), ϱ { g 0 ( x T θ ( 0 ) ) , g 1 ( x T θ ( 1 ) )} = ∫ X g 0 ( x T θ ( 0 ) ) − g 1 ( x T θ ( 1 ) ) 2 d F ( x ) ,
where F ( x ) = ζ F 0 ( x ) + ( 1 − ζ ) F 1 ( x ) F(x)=\zeta F_0(x)+(1-\zeta)F_1(x) F ( x ) = ζ F 0 ( x ) + ( 1 − ζ ) F 1 ( x ) is a weighted mixture distribution of X ( 0 ) X^{(0)} X ( 0 ) and X ( 1 ) X^{(1)} X ( 1 ) , F l ( x ) F_l(x) F l ( x ) is the cumulative distribution function of X ( l ) X^{(l)} X ( l ) , and ζ ∈ ( 0 , 1 ) \zeta\in(0,1) ζ ∈ ( 0 , 1 ) is the limit of the ratio n 0 / ( n 0 + n 1 ) n_0/(n_0+n_1) n 0 / ( n 0 + n 1 ) , and X \mathcal{X} X is the common compact support of F 0 F_0 F 0 and F 1 F_1 F 1 . For notational simplicity, we write
d = ∫ X ∣ g 0 ( x T θ ~ ( 0 ) ) − g 1 ( x T θ ~ ( 1 ) ) ∣ 2 d F ( x ) , (5) d=\int_{\mathcal{X}}\left|g_0(x^{\mathsf{T}}\widetilde{\theta}^{(0)})-g_1(x^{\mathsf{T}}\widetilde{\theta}^{(1)})\right|^2dF(x), \tag*{(5)} d = ∫ X g 0 ( x T θ ( 0 ) ) − g 1 ( x T θ ( 1 ) ) 2 d F ( x ) , (5)
where θ ~ ( l ) \widetilde{\theta}^{(l)} θ ( l ) is the pseudo-true parameter defined in (4). Therefore, the null and alternative hypotheses for the similarity of the regression functions of two populations are
H 0 ( Δ ) : 0 < d ≤ Δ , versus H 1 ( Δ ) : d > Δ , (6) H_0^{(\Delta)}:0<d\leq\Delta,\qquad\text{versus}\qquad H_1^{(\Delta)}:d>\Delta, \tag*{(6)} H 0 ( Δ ) : 0 < d ≤ Δ , versus H 1 ( Δ ) : d > Δ , (6)
where Δ > 0 \Delta>0 Δ > 0 is a tolerance threshold determined by the specific practical requirement of the application.
We now combine the model checking and functional similarity components into a joint testing problem. We restrict our attention to data-generating processes for which d > 0 d>0 d > 0 . Within this restricted class, the joint hypotheses are
H 0 : H 0 ( 0 ) ∩ H 0 ( 1 ) ∩ H 0 ( Δ ) , versus H 1 : H 1 ( 0 ) ∪ H 1 ( 1 ) ∪ H 1 ( Δ ) . (7) H_0:H_0^{(0)}\cap H_0^{(1)}\cap H_0^{(\Delta)},\qquad\text{versus}\qquad H_1:H_1^{(0)}\cup H_1^{(1)}\cup H_1^{(\Delta)}. \tag*{(7)} H 0 : H 0 ( 0 ) ∩ H 0 ( 1 ) ∩ H 0 ( Δ ) , versus H 1 : H 1 ( 0 ) ∪ H 1 ( 1 ) ∪ H 1 ( Δ ) . (7)
Thus, the null hypothesis H 0 H_0 H 0 holds if and only if the component null hypotheses H 0 ( 0 ) H_0^{(0)} H 0 ( 0 ) , H 0 ( 1 ) H_0^{(1)} H 0 ( 1 ) , and H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) hold simultaneously, whereas the alternative hypothesis H 1 H_1 H 1 corresponds to the case in which at least one of H 1 ( 0 ) H_1^{(0)} H 1 ( 0 ) , H 1 ( 1 ) H_1^{(1)} H 1 ( 1 ) , and H 1 ( Δ ) H_1^{(\Delta)} H 1 ( Δ ) holds. Recall the discrepancy measure d = ∫ X ∣ g 0 ( x T θ ~ ( 0 ) ) − g 1 ( x T θ ~ ( 1 ) ) ∣ 2 d F ( x ) d=\int_{\mathcal{X}}|g_0(x^{\mathsf{T}}\widetilde{\theta}^{(0)})-g_1(x^{\mathsf{T}}\widetilde{\theta}^{(1)})|^2dF(x) d = ∫ X ∣ g 0 ( x T θ ( 0 ) ) − g 1 ( x T θ ( 1 ) ) ∣ 2 d F ( x ) , which is defined in terms of the pseudo-true parameters θ ~ ( l ) \widetilde{\theta}^{(l)} θ ( l ) . Under the joint null hypothesis H 0 ( 0 ) ∩ H 0 ( 1 ) H_0^{(0)}\cap H_0^{(1)} H 0 ( 0 ) ∩ H 0 ( 1 ) , this quantity reduces to the L 2 L_2 L 2 -distance between the two regression functions, g 0 ( x ⊤ θ ( 0 ) ) g_0(x^\top\theta^{(0)}) g 0 ( x ⊤ θ ( 0 ) ) and g 1 ( x ⊤ θ ( 1 ) ) g_1(x^\top\theta^{(1)}) g 1 ( x ⊤ θ ( 1 ) ) . Conversely, if a component null hypothesis H 0 ( l ) H_0^{(l)} H 0 ( l ) is false, the true parameter θ 0 ( l ) \theta_0^{(l)} θ 0 ( l ) does not exist due to model misspecification. In such cases, θ ~ ( l ) \tilde{\theta}^{(l)} θ ~ ( l ) represents the best-fitting parameter for the regression function g l ( x ⊤ θ ( l ) ) g_l(x^\top\theta^{(l)}) g l ( x ⊤ θ ( l ) ) within the specified class, thereby ensuring d d d remains well defined.
Remark 2. We explicitly exclude the case d = 0 d=0 d = 0 from the joint hypotheses (7). If d = 0 d=0 d = 0 and g l ( ⋅ ) g_l(\cdot) g l ( ⋅ ) is smooth for l = 0 , 1 l=0,1 l = 0 , 1 , then g 0 ( x ⊤ θ ~ ( 0 ) ) = g 1 ( x ⊤ θ ~ ( 1 ) ) g_0(x^\top\tilde{\theta}^{(0)})=g_1(x^\top\tilde{\theta}^{(1)}) g 0 ( x ⊤ θ ~ ( 0 ) ) = g 1 ( x ⊤ θ ~ ( 1 ) ) almost surely and the problem reduces to the case considered in Wang et al. [ [27 ] . As detailed in the test construction, the asymptotic normality of d ^ \hat{d} d ^ (to be defined later) is valid only when d > 0 d>0 d > 0 . In the degenerate case d = 0 d=0 d = 0 , the limiting distribution depends on the asymptotic properties of the estimated parameters θ ^ ( 0 ) \hat{\theta}^{(0)} θ ^ ( 0 ) and θ ^ ( 1 ) \hat{\theta}^{(1)} θ ^ ( 1 ) , resulting in a convergence rate faster than 1 / n 1/\sqrt{n} 1/ n ; see Remark S1 in the Supplementary Material. Consequently, the components of our final tests (defined in § 3 and § 4 ) related to d d d become asymptotically negligible in this scenario.
Similarity Testing
Discrepancy estimation
We first construct an estimator of the functional discrepancy and establish its asymptotic properties. Recall that the null and alternative hypotheses for functional similarity are
H 0 ( Δ ) : 0 < d ≤ Δ versus H 1 ( Δ ) : d > Δ , H_0^{(\Delta)}: 0 < d \leq\Delta\qquad\text{versus} \qquad H_1^{(\Delta)}: d > \Delta, H 0 ( Δ ) : 0 < d ≤ Δ versus H 1 ( Δ ) : d > Δ ,
where d = ∫ X [ g 0 ( x ⊤ θ ~ ( 0 ) ) − g 1 ( x ⊤ θ ~ ( 1 ) ) ] 2 d F ( x ) d=\int_{\mathcal{X}} [g_0(x^\top\tilde{\theta}^{(0)})-g_1(x^\top\tilde{\theta}^{(1)})]^2dF(x) d = ∫ X [ g 0 ( x ⊤ θ ~ ( 0 ) ) − g 1 ( x ⊤ θ ~ ( 1 ) ) ] 2 d F ( x ) . Throughout the paper, we restrict attention to fixed interior points of H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) and do not consider local sequences of d d d drifting toward the boundary of the null region. By substituting the population-specific estimator θ ^ ( l ) \hat{\theta}^{(l)} θ ^ ( l ) of θ ~ ( l ) \tilde{\theta}^{(l)} θ ~ ( l ) , a plug-in estimator of the discrepancy measure d d d is
d ^ = ∫ X [ g 0 ( x ⊤ θ ^ ( 0 ) ) − g 1 ( x ⊤ θ ^ ( 1 ) ) ] 2 d F ^ ( x ) = 1 n ∑ i = 1 n 0 [ g 0 ( ( θ ^ ( 0 ) ) ⊤ X i ( 0 ) ) − g 1 ( ( θ ^ ( 1 ) ) ⊤ X i ( 0 ) ) ] 2 + 1 n ∑ j = 1 n 1 [ g 0 ( ( θ ^ ( 0 ) ) ⊤ X j ( 1 ) ) − g 1 ( ( θ ^ ( 1 ) ) ⊤ X j ( 1 ) ) ] 2 , \begin{aligned}
\hat{d}
&=\int_{\mathcal{X}} [g_0(x^\top\hat{\theta}^{(0)})-g_1(x^\top\hat{\theta}^{(1)})]^2d\hat{F}(x)\\
&=\frac{1}{n}\sum_{i=1}^{n_0}\left[g_0\left((\hat{\theta}^{(0)})^\top X_i^{(0)}\right)-g_1\left((\hat{\theta}^{(1)})^\top X_i^{(0)}\right)\right]^2
+\frac{1}{n}\sum_{j=1}^{n_1}\left[g_0\left((\hat{\theta}^{(0)})^\top X_j^{(1)}\right)-g_1\left((\hat{\theta}^{(1)})^\top X_j^{(1)}\right)\right]^2,
\end{aligned} d ^ = ∫ X [ g 0 ( x ⊤ θ ^ ( 0 ) ) − g 1 ( x ⊤ θ ^ ( 1 ) ) ] 2 d F ^ ( x ) = n 1 i = 1 ∑ n 0 [ g 0 ( ( θ ^ ( 0 ) ) ⊤ X i ( 0 ) ) − g 1 ( ( θ ^ ( 1 ) ) ⊤ X i ( 0 ) ) ] 2 + n 1 j = 1 ∑ n 1 [ g 0 ( ( θ ^ ( 0 ) ) ⊤ X j ( 1 ) ) − g 1 ( ( θ ^ ( 1 ) ) ⊤ X j ( 1 ) ) ] 2 ,
where n = n 0 + n 1 n=n_0+n_1 n = n 0 + n 1 and F ^ ( x ) = n 0 n F ^ 0 ( x ) + n 1 n F ^ 1 ( x ) \hat{F}(x)=\frac{n_0}{n}\hat{F}_0(x)+\frac{n_1}{n}\hat{F}_1(x) F ^ ( x ) = n n 0 F ^ 0 ( x ) + n n 1 F ^ 1 ( x ) with F ^ l ( x ) \hat{F}_l(x) F ^ l ( x ) being the empirical distribution functions of { X i ( l ) } i = 1 n l \{X_i^{(l)}\}_{i=1}^{n_l} { X i ( l ) } i = 1 n l for l = 0 , 1 l=0,1 l = 0 , 1 .
We first investigate the asymptotic properties of d ^ \hat{d} d ^ in high-dimensional settings, which provide the basis for the similarity testing. For this, we introduce some notions and regularity conditions. A random variable W ∈ R W \in\mathbb{R} W ∈ R is called sub-Weibull of order τ > 0 \tau> 0 τ > 0 , if ∥ W ∥ ψ τ : = inf { η > 0 : E [ ψ τ ( ∣ W ∣ / η ) ] ≤ 1 } < ∞ \|W\|_{\psi_\tau}:=\inf\{\eta> 0 : E[\psi_\tau(|W|/\eta)] \le1\} < \infty ∥ W ∥ ψ τ := inf { η > 0 : E [ ψ τ ( ∣ W ∣/ η )] ≤ 1 } < ∞ , where ψ τ ( x ) = exp ( x τ ) − 1 \psi_\tau(x)=\exp(x^\tau)-1 ψ τ ( x ) = exp ( x τ ) − 1 for x ≥ 0 x \ge0 x ≥ 0 . According to the Markov inequality, if W W W is sub-Weibull of order τ \tau τ , then P ( ∣ W ∣ > t ) ≤ 2 exp ( − t τ / ∥ W ∥ ψ τ τ ) \mathbb{P}(|W| > t) \le2\exp(-t^\tau/\|W\|_{\psi_\tau}^\tau) P ( ∣ W ∣ > t ) ≤ 2 exp ( − t τ /∥ W ∥ ψ τ τ ) for all t ≥ 0 t \ge0 t ≥ 0 . It is readily seen that sub-Gaussian and sub-exponential random variables are the special cases of sub-Weibull distributions with τ = 2 \tau=2 τ = 2 and τ = 1 \tau=1 τ = 1 , respectively. More details on sub-Weibull distributions can be found in Vladimirova et al. [ [26 ] and Kuchibhotla and Chakrabortty [ [15 ] . Let S ^ ( l ) = { 1 ≤ j ≤ p : θ ^ j ( l ) ≠ 0 } \hat{S}^{(l)}=\{1 \le j \le p : \hat{\theta}^{(l)}_j \ne0\} S ^ ( l ) = { 1 ≤ j ≤ p : θ ^ j ( l ) = 0 } be the support of θ ^ ( l ) \hat{\theta}^{(l)} θ ^ ( l ) and s ^ ( l ) = ∣ S ^ ( l ) ∣ \hat{s}^{(l)}=|\hat{S}^{(l)}| s ^ ( l ) = ∣ S ^ ( l ) ∣ .
Condition 1. (i) The estimator θ ^ ( l ) \hat{\theta}^{(l)} θ ^ ( l ) satisfies ∥ θ ^ ( l ) − θ ~ ( l ) ∥ 2 = O p ( s ~ ( l ) log p n l ) \|\hat{\theta}^{(l)}-\tilde{\theta}^{(l)}\|_2=O_p\left(\sqrt{\frac{\tilde{s}^{(l)}\log p}{n_l}}\right) ∥ θ ^ ( l ) − θ ~ ( l ) ∥ 2 = O p ( n l s ~ ( l ) l o g p ) and ∥ θ ^ ( l ) − θ ~ ( l ) ∥ 1 = O p ( s ~ ( l ) log p n l ) \|\hat{\theta}^{(l)}-\tilde{\theta}^{(l)}\|_1=O_p\left(\tilde{s}^{(l)}\sqrt{\frac{\log p}{n_l}}\right) ∥ θ ^ ( l ) − θ ~ ( l ) ∥ 1 = O p ( s ~ ( l ) n l l o g p ) , where l = 0 , 1 l=0,1 l = 0 , 1 ; (ii) There exists a zero-mean random vector L l ( X i ( l ) , Y i ( l ) , θ ~ ( l ) ) L_l(X_i^{(l)},Y_i^{(l)},\tilde{\theta}^{(l)}) L l ( X i ( l ) , Y i ( l ) , θ ~ ( l ) ) such that
n l ( θ ^ ( l ) − θ ~ ( l ) ) = 1 n l ∑ i = 1 n l L l ( X i ( l ) , Y i ( l ) , θ ~ ( l ) ) + o p ( 1 ) . (8) \sqrt{n_l}(\hat{\theta}^{(l)}-\tilde{\theta}^{(l)})=\frac{1}{\sqrt{n_l}}\sum_{i=1}^{n_l}L_l(X_i^{(l)},Y_i^{(l)},\tilde{\theta}^{(l)})+o_p(1). \tag*{(8)} n l ( θ ^ ( l ) − θ ~ ( l ) ) = n l 1 i = 1 ∑ n l L l ( X i ( l ) , Y i ( l ) , θ ~ ( l ) ) + o p ( 1 ) . (8)
Condition 2. The function g l ( ⋅ ) g_l(\cdot) g l ( ⋅ ) is twice differentiable and ∣ g l ( θ ⊤ x ) ∣ ∨ ∣ g ˙ l ( θ ⊤ x ) ∣ ∨ ∣ g ¨ l ( θ ⊤ x ) ∣ ≤ B ( x ) |g_l(\theta^\top x)|\vee|\dot{g}_l(\theta^\top x)|\vee|\ddot{g}_l(\theta^\top x)|\le B(x) ∣ g l ( θ ⊤ x ) ∣ ∨ ∣ g ˙ l ( θ ⊤ x ) ∣ ∨ ∣ g ¨ l ( θ ⊤ x ) ∣ ≤ B ( x ) for all θ ∈ Θ l \theta\in\Theta_l θ ∈ Θ l , where l = 0 , 1 l=0,1 l = 0 , 1 and B ( X ( l ) ) B(X^{(l)}) B ( X ( l ) ) is sub-Weibull of order τ 0 \tau_0 τ 0 with ∥ B ( X ( l ) ) ∥ ψ τ 0 ≤ C < ∞ \|B(X^{(l)})\|_{\psi_{\tau_0}}\le C<\infty ∥ B ( X ( l ) ) ∥ ψ τ 0 ≤ C < ∞ . Moreover, the random variables ϵ ( l ) \epsilon^{(l)} ϵ ( l ) and α ⊤ X ( l ) \alpha^\top X^{(l)} α ⊤ X ( l ) are sub-Weibull of order 2 2 2 with ∥ ϵ ( l ) ∥ ψ 2 ∨ ∥ α ⊤ X ( l ) ∥ ψ 2 ≤ C < ∞ \|\epsilon^{(l)}\|_{\psi_2}\vee\|\alpha^\top X^{(l)}\|_{\psi_2}\le C<\infty ∥ ϵ ( l ) ∥ ψ 2 ∨ ∥ α ⊤ X ( l ) ∥ ψ 2 ≤ C < ∞ for all α ∈ S p − 1 \alpha\in\mathbb{S}^{p-1} α ∈ S p − 1 .
Condition 3. E { ∣ g l ( ( θ ~ ( l ) ) ⊤ X ( l ) ) ∣ 2 } ≤ C < ∞ E\{|g_l((\tilde{\theta}^{(l)})^\top X^{(l)})|^2\}\le C<\infty E { ∣ g l (( θ ~ ( l ) ) ⊤ X ( l ) ) ∣ 2 } ≤ C < ∞ for l = 0 , 1 l=0,1 l = 0 , 1 , E { ∣ g 1 ( ( θ ~ ( 1 ) ) ⊤ X ( 0 ) ) ∣ 2 } ≤ C < ∞ E\{|g_1((\tilde{\theta}^{(1)})^\top X^{(0)})|^2\}\le C<\infty E { ∣ g 1 (( θ ~ ( 1 ) ) ⊤ X ( 0 ) ) ∣ 2 } ≤ C < ∞ , and E { ∣ g 0 ( ( θ ~ ( 0 ) ) ⊤ X ( 1 ) ) ∣ 2 } ≤ C < ∞ E\{|g_0((\tilde{\theta}^{(0)})^\top X^{(1)})|^2\}\le C<\infty E { ∣ g 0 (( θ ~ ( 0 ) ) ⊤ X ( 1 ) ) ∣ 2 } ≤ C < ∞ .
When the underlying regression models are correctly specified, Condition 1(i) is satisfied by many penalized estimators, including the SCAD and MCP estimators, under suitable regularity conditions in high-dimensional settings. Tan et al. [ [24 ] further showed that similar rates hold for many penalized estimators under model misspecification. Lemma 6 of Fan and Peng [ [10 ] showed that Condition 1 (ii) holds for the SCAD estimator. Conditions 2 and 3 are standard regularity assumptions in high-dimensional data analysis; see, for example, Bühlmann and Van De Geer [ [3 ] and Tan et al. [ [23 ] .
The following theorem provides the asymptotic properties of d ^ \hat{d} d ^ building on these conditions. We write ψ ( x , θ ( 0 ) , θ ( 1 ) ) = g 0 ( x ⊤ θ ( 0 ) ) − g 1 ( x ⊤ θ ( 1 ) ) \psi(x,\theta^{(0)},\theta^{(1)})=g_0(x^\top\theta^{(0)})-g_1(x^\top\theta^{(1)}) ψ ( x , θ ( 0 ) , θ ( 1 ) ) = g 0 ( x ⊤ θ ( 0 ) ) − g 1 ( x ⊤ θ ( 1 ) ) .
Theorem 1. Suppose that Conditions 1, 2, and 3 hold. If n ( n 0 / n − ζ ) = o ( 1 ) \sqrt{n}(n_0/n-\zeta)=o(1) n ( n 0 / n − ζ ) = o ( 1 ) , and ( s ~ ( 0 ) ∨ s ~ ( 1 ) ) 2 ( log p ) 2 ∨ ( 4 / 3 + 2 / τ 0 ) = o ( n ) (\tilde{s}^{(0)}\vee\tilde{s}^{(1)})^2(\log p)^{2\vee(4/3+2/\tau_0)}=o(n) ( s ~ ( 0 ) ∨ s ~ ( 1 ) ) 2 ( log p ) 2 ∨ ( 4/3 + 2/ τ 0 ) = o ( n ) , then
n ( d ^ − d ) σ d → D N ( 0 , 1 ) , \frac{\sqrt{n}(\hat{d}-d)}{\sigma_d}\xrightarrow{D}\mathcal{N}(0,1), σ d n ( d ^ − d ) D N ( 0 , 1 ) , where the asymptotic variance σ d 2 > 0 \sigma_d^2>0 σ d 2 > 0 is
σ d 2 = ζ E { ψ 2 ( X ( 0 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) − E { ψ 2 ( X ( 0 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) } + 2 [ M 00 + ( ζ − 1 − 1 ) M 10 ] T L 0 ( X ( 0 ) , Y ( 0 ) , θ ~ ( 0 ) ) } 2 + ( 1 − ζ ) E { ψ 2 ( X ( 1 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) − E { ψ 2 ( X ( 1 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) } − 2 [ M 01 / ( ζ − 1 − 1 ) + M 11 ] T L 1 ( X ( 1 ) , Y ( 1 ) , θ ~ ( 1 ) ) } 2 , \begin{aligned}
\sigma_d^2={}&\zeta\mathbb{E}\left\{\psi^2(X^{(0)},\tilde{\theta}^{(0)},\tilde{\theta}^{(1)})-\mathbb{E}\{\psi^2(X^{(0)},\tilde{\theta}^{(0)},\tilde{\theta}^{(1)})\}\right.\\
&\left.+2\left[M_{00}+(\zeta^{-1}-1)M_{10}\right]^{\mathsf{T}}L_0(X^{(0)},Y^{(0)},\tilde{\theta}^{(0)})\right\}^2\\
&+(1-\zeta)\mathbb{E}\left\{\psi^2(X^{(1)},\tilde{\theta}^{(0)},\tilde{\theta}^{(1)})-\mathbb{E}\{\psi^2(X^{(1)},\tilde{\theta}^{(0)},\tilde{\theta}^{(1)})\}\right.\\
&\left.-2\left[M_{01}/(\zeta^{-1}-1)+M_{11}\right]^{\mathsf{T}}L_1(X^{(1)},Y^{(1)},\tilde{\theta}^{(1)})\right\}^2,
\end{aligned} σ d 2 = ζ E { ψ 2 ( X ( 0 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) − E { ψ 2 ( X ( 0 ) , θ ~ ( 0 ) , θ ~ ( 1 ) )} + 2 [ M 00 + ( ζ − 1 − 1 ) M 10 ] T L 0 ( X ( 0 ) , Y ( 0 ) , θ ~ ( 0 ) ) } 2 + ( 1 − ζ ) E { ψ 2 ( X ( 1 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) − E { ψ 2 ( X ( 1 ) , θ ~ ( 0 ) , θ ~ ( 1 ) )} − 2 [ M 01 / ( ζ − 1 − 1 ) + M 11 ] T L 1 ( X ( 1 ) , Y ( 1 ) , θ ~ ( 1 ) ) } 2 , with
M 00 = E [ ψ ( X ( 0 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) X ( 0 ) g ˙ 0 ( ( X ( 0 ) ) T θ ~ ( 0 ) ) ] M_{00}=\mathbb{E}\left[\psi(X^{(0)},\tilde{\theta}^{(0)},\tilde{\theta}^{(1)})X^{(0)}\dot{g}_0((X^{(0)})^{\mathsf{T}}\tilde{\theta}^{(0)})\right] M 00 = E [ ψ ( X ( 0 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) X ( 0 ) g ˙ 0 (( X ( 0 ) ) T θ ~ ( 0 ) ) ] M 01 = E [ ψ ( X ( 0 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) X ( 0 ) g ˙ 1 ( ( X ( 0 ) ) T θ ~ ( 1 ) ) ] M_{01}=\mathbb{E}\left[\psi(X^{(0)},\tilde{\theta}^{(0)},\tilde{\theta}^{(1)})X^{(0)}\dot{g}_1((X^{(0)})^{\mathsf{T}}\tilde{\theta}^{(1)})\right] M 01 = E [ ψ ( X ( 0 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) X ( 0 ) g ˙ 1 (( X ( 0 ) ) T θ ~ ( 1 ) ) ] M 10 = E [ ψ ( X ( 1 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) X ( 1 ) g ˙ 0 ( ( X ( 1 ) ) T θ ~ ( 0 ) ) ] M_{10}=\mathbb{E}\left[\psi(X^{(1)},\tilde{\theta}^{(0)},\tilde{\theta}^{(1)})X^{(1)}\dot{g}_0((X^{(1)})^{\mathsf{T}}\tilde{\theta}^{(0)})\right] M 10 = E [ ψ ( X ( 1 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) X ( 1 ) g ˙ 0 (( X ( 1 ) ) T θ ~ ( 0 ) ) ] M 11 = E [ ψ ( X ( 1 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) X ( 1 ) g ˙ 1 ( ( X ( 1 ) ) T θ ~ ( 1 ) ) ] . M_{11}=\mathbb{E}\left[\psi(X^{(1)},\tilde{\theta}^{(0)},\tilde{\theta}^{(1)})X^{(1)}\dot{g}_1((X^{(1)})^{\mathsf{T}}\tilde{\theta}^{(1)})\right]. M 11 = E [ ψ ( X ( 1 ) , θ ~ ( 0 ) , θ ~ ( 1 ) ) X ( 1 ) g ˙ 1 (( X ( 1 ) ) T θ ~ ( 1 ) ) ] . Since the asymptotic variance lies in the denominator in Theorem 1, we require σ d 2 > 0 \sigma_d^2>0 σ d 2 > 0 and exclude the degenerate case σ d 2 = 0 \sigma_d^2=0 σ d 2 = 0 . Let σ ^ d 2 \hat{\sigma}_d^2 σ ^ d 2 be a consistent estimator of σ d 2 \sigma_d^2 σ d 2 . We then obtain the limiting distribution of n ( d ^ − d ) / σ ^ d \sqrt{n}(\hat{d}-d)/\hat{\sigma}_d n ( d ^ − d ) / σ ^ d .
Corollary 1. Suppose that the conditions of Theorem 1 hold. Then n ( d ^ − d ) / σ ^ d → D N ( 0 , 1 ) \sqrt{n}(\hat{d}-d)/\hat{\sigma}_d\xrightarrow{D}\mathcal{N}(0,1) n ( d ^ − d ) / σ ^ d D N ( 0 , 1 ) .
Motivation from the LFC-based approach
For testing H 0 ( Δ ) : 0 < d ≤ Δ H_0^{(\Delta)}:0<d\le\Delta H 0 ( Δ ) : 0 < d ≤ Δ , a traditional and widely adopted construction in the literature is to define the test statistic under the least favorable configuration (LFC). This strategy relies exclusively on the boundary value d = Δ d=\Delta d = Δ to define the statistic, ensuring asymptotic type I error control for every fixed null parameter value d ≤ Δ d\le\Delta d ≤ Δ . Specifically, the LFC-based test statistic for H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) is defined as
T ^ L F C = n ( d ^ − Δ ) σ ^ d . (9) \hat{T}^{\mathrm{LFC}}=\frac{\sqrt{n}(\hat{d}-\Delta)}{\hat{\sigma}_d}. \tag*{(9)} T ^ LFC = σ ^ d n ( d ^ − Δ ) . (9)
By Theorem 1, when d = Δ d = \Delta d = Δ , T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC is asymptotically standard normal. Accordingly, we reject H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) whenever T ^ L F C ≥ z 1 − α \widehat{T}^{\mathrm{LFC}} \ge z_{1-\alpha} T LFC ≥ z 1 − α , where z 1 − α z_{1-\alpha} z 1 − α denotes the 1 − α 1-\alpha 1 − α -quantile of the standard normal distribution. However, the LFC approach suffers from the limitations of over-conservatism. Since the LFC method accounts for the so-called “worst case” to ensure Type I error control under H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) , it rigidly anchors the test to the boundary Δ \Delta Δ , disregarding the actual position of the true discrepancy d d d under the null H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) . The asymptotic rejection probability is
lim n → ∞ P ( n ( d ^ − Δ ) σ ^ d ≥ z 1 − α ) = lim n → ∞ P ( n ( d ^ − d ) σ ^ d ≥ z 1 − α + n ( Δ − d ) σ ^ d ) . \lim_{n\to\infty} \mathbb{P}\left(\frac{\sqrt{n}(\widehat{d}-\Delta)}{\widehat{\sigma}_d} \ge z_{1-\alpha}\right) = \lim_{n\to\infty} \mathbb{P}\left(\frac{\sqrt{n}(\widehat{d}-d)}{\widehat{\sigma}_d} \ge z_{1-\alpha} + \frac{\sqrt{n}(\Delta-d)}{\widehat{\sigma}_d}\right). n → ∞ lim P ( σ d n ( d − Δ ) ≥ z 1 − α ) = n → ∞ lim P ( σ d n ( d − d ) ≥ z 1 − α + σ d n ( Δ − d ) ) .
If d < Δ d < \Delta d < Δ , the discrepancy term n ( Δ − d ) / σ ^ d \sqrt{n}(\Delta-d)/\widehat{\sigma}_d n ( Δ − d ) / σ d diverges to infinity, causing the Type I error to approach zero. The supremum of the limiting probabilities over all d ≤ Δ d \le\Delta d ≤ Δ equals the significance level α \alpha α . In other words, while this strategy ensures the test is “safe”, it may be overly conservative at any fixed interior point of the null H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) .
From the perspective of power, the LFC-based test T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC has a natural locally asymptotically uniformly most powerful (LAUMP) interpretation. Consider local alternatives of the form d = Δ + h n d = \Delta+ \frac{h}{\sqrt{n}} d = Δ + n h with h > 0 h > 0 h > 0 . The asymptotic normality of d ^ \widehat{d} d implies that
T ^ L F C = n ( d ^ − Δ ) σ ^ d → D N ( h σ d , 1 ) . \widehat{T}^{\mathrm{LFC}} = \frac{\sqrt{n}(\widehat{d}-\Delta)}{\widehat{\sigma}_d} \xrightarrow{D} N\left(\frac{h}{\sigma_d},1\right). T LFC = σ d n ( d − Δ ) D N ( σ d h , 1 ) .
Thus, the limiting testing problem for similarity becomes the Gaussian shift experiment
H 0 S : h ≤ 0 versus H 1 S : h > 0. H_0^S : h \le0 \qquad\text{versus} \qquad H_1^S : h > 0. H 0 S : h ≤ 0 versus H 1 S : h > 0.
In this limiting experiment, the rejection rule of the LFC-based test is Z ≥ z 1 − α Z \ge z_{1-\alpha} Z ≥ z 1 − α , where Z ∼ N ( h / σ d , 1 ) Z \sim N(h/\sigma_d,1) Z ∼ N ( h / σ d , 1 ) . For this Gaussian location family, the likelihood ratio of N ( h / σ d , 1 ) N(h/\sigma_d,1) N ( h / σ d , 1 ) relative to N ( 0 , 1 ) N(0,1) N ( 0 , 1 ) is
ϕ ( z − h / σ d ) ϕ ( z ) = exp ( h σ d z − h 2 2 σ d 2 ) , h > 0 , \frac{\phi(z-h/\sigma_d)}{\phi(z)} = \exp\left(\frac{h}{\sigma_d}z-\frac{h^2}{2\sigma_d^2}\right), \qquad h>0, ϕ ( z ) ϕ ( z − h / σ d ) = exp ( σ d h z − 2 σ d 2 h 2 ) , h > 0 ,
where ϕ ( ⋅ ) \phi(\cdot) ϕ ( ⋅ ) denotes the density function of the standard normal distribution. Since this likelihood ratio is monotone increasing in z z z , it follows from the Neyman-Pearson lemma or the Karlin–Rubin theorem [14 ] that the rejection rule Z ≥ z 1 − α Z \ge z_{1-\alpha} Z ≥ z 1 − α is uniformly most powerful (UMP) in the limiting testing problem. Consequently, the LFC-based test T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC attains the local asymptotic power envelope
1 − Φ ( z 1 − α − h σ d ) , h > 0 , 1-\Phi\left(z_{1-\alpha}-\frac{h}{\sigma_d}\right), \qquad h>0, 1 − Φ ( z 1 − α − σ d h ) , h > 0 ,
where Φ ( ⋅ ) \Phi(\cdot) Φ ( ⋅ ) denotes the cumulative distribution function of the standard normal distribution. Thus, although the LFC-based test T ^ L F C \hat{T}^{\mathrm{LFC}} T ^ LFC is conservative for fixed interior null points d < Δ d < \Delta d < Δ , its local asymptotic power near the boundary d = Δ d = \Delta d = Δ cannot be improved by any level-α \alpha α test whose statistic has the same limiting distribution N ( h / σ d , 1 ) N(h/\sigma_d,1) N ( h / σ d , 1 ) . We refer to this as the locally asymptotically uniformly most powerful (LAUMP) property of the LFC-based test. We therefore propose an adaptive boundary-proxy test that avoids the over-conservatism of LFC-based methods and simultaneously retains the LAUMP property.
Adaptive boundary-proxy test for similarity
In this subsection, we propose an adaptive boundary-proxy test designed to attain the nominal significance level at every fixed configuration of H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) while retaining the LAUMP property of the LFC-based test. Our approach is motivated by the decomposition:
d ^ − Δ = d ^ − d ⏟ Estimation Error + d − Δ ⏟ Boundary Offset , (10) \hat{d} - \Delta= \underbrace{\hat{d} - d}_{\text{Estimation Error}} + \underbrace{d - \Delta}_{\text{Boundary Offset}}, \tag*{(10)} d ^ − Δ = Estimation Error d ^ − d + Boundary Offset d − Δ , (10)
where d − Δ d-\Delta d − Δ acts as a positive shift under the alternative H 1 ( Δ ) H_1^{(\Delta)} H 1 ( Δ ) . Because d d d is unknown, we employ a sample-splitting technique, partitioning the data into two independent subsamples, D 1 \mathcal{D}_1 D 1 and D 2 \mathcal{D}_2 D 2 , of equal size to compute estimators d ^ 1 \hat{d}_1 d ^ 1 and d ^ 2 \hat{d}_2 d ^ 2 of the discrepancy d d d . It follows from Theorem 1 that
n / 2 ( d ^ k − d ) / σ ^ d → D N ( 0 , 1 ) , for k = 1 , 2. \sqrt{n/2}(\hat{d}_k-d)/\hat{\sigma}_d \xrightarrow{D} N(0,1), \qquad\text{for } k=1,2. n /2 ( d ^ k − d ) / σ ^ d D N ( 0 , 1 ) , for k = 1 , 2.
According to the decomposition (10) , we find that the estimation error d ^ − d \hat{d}-d d ^ − d is asymptotically normal under both the null and the alternative and the shift term d − Δ d-\Delta d − Δ is used to achieve high power under the alternatives. Thus, our purpose is to construct an adaptive test that retains only the estimation error term d ^ − d \hat{d}-d d ^ − d under the null and retains only the shift term d − Δ d-\Delta d − Δ under the alternative. To achieve this, we first define the Error Proxy (T ^ c \hat{T}_c T ^ c ) that captures the centered estimation error d ^ − d \hat{d}-d d ^ − d :
T ^ c = n ( d ^ 1 − d ^ 2 ) 2 σ ^ d = n / 2 ( d ^ 1 − d ) 2 σ ^ d − n / 2 ( d ^ 2 − d ) 2 σ ^ d . \hat{T}_c = \frac{\sqrt{n}(\hat{d}_1-\hat{d}_2)}{2\hat{\sigma}_d} = \frac{\sqrt{n/2}(\hat{d}_1-d)}{\sqrt{2}\hat{\sigma}_d} - \frac{\sqrt{n/2}(\hat{d}_2-d)}{\sqrt{2}\hat{\sigma}_d}. T ^ c = 2 σ ^ d n ( d ^ 1 − d ^ 2 ) = 2 σ ^ d n /2 ( d ^ 1 − d ) − 2 σ ^ d n /2 ( d ^ 2 − d ) .
By Theorem 1 and the independence between d ^ 1 \hat{d}_1 d ^ 1 and d ^ 2 \hat{d}_2 d ^ 2 , T ^ c \hat{T}_c T ^ c converges to N ( 0 , 1 ) N(0,1) N ( 0 , 1 ) in distribution under both the null and alternative, and this proxy provides a stable distribution for the critical value. To inherit the LAUMP property of the LFC-based test, we employ the test statistic T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC defined in (9) as the second part of the adaptive boundary-proxy test that captures the shift term d − Δ d-\Delta d − Δ . Therefore, the adaptive boundary-proxy test is defined as
T ^ a d a = T ^ c I ( T ^ L F C ≤ − a n ) + T ^ L F C I ( T ^ L F C > − a n ) , (11) \widehat{T}^{\mathrm{ada}}=\widehat{T}_{c}\mathbb{I}(\widehat{T}^{\mathrm{LFC}}\leq-a_n)+\widehat{T}^{\mathrm{LFC}}\mathbb{I}(\widehat{T}^{\mathrm{LFC}}>-a_n), \tag*{(11)} T ada = T c I ( T LFC ≤ − a n ) + T LFC I ( T LFC > − a n ) , (11)
where a n a_n a n is a positive sequence satisfying a n → ∞ a_n\to\infty a n → ∞ and a n / n → 0 a_n/\sqrt{n}\to0 a n / n → 0 .
Under H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) , T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC diverges to negative infinity at the rate n \sqrt{n} n if d < Δ d<\Delta d < Δ , and converges in distribution to N ( 0 , 1 ) \mathcal{N}(0,1) N ( 0 , 1 ) if d = Δ d=\Delta d = Δ . Under H 1 ( Δ ) H_1^{(\Delta)} H 1 ( Δ ) (d > Δ d>\Delta d > Δ ), it diverges to infinity at the rate n \sqrt{n} n . Since a n / n → 0 a_n/\sqrt{n}\to0 a n / n → 0 , under H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) with d < Δ d<\Delta d < Δ , we have T ^ c I ( T ^ L F C > − a n ) = o p ( 1 ) \widehat{T}_{c}\mathbb{I}(\widehat{T}^{\mathrm{LFC}}>-a_n)=o_p(1) T c I ( T LFC > − a n ) = o p ( 1 ) and T ^ L F C I ( T ^ L F C > − a n ) = o p ( 1 ) \widehat{T}^{\mathrm{LFC}}\mathbb{I}(\widehat{T}^{\mathrm{LFC}}>-a_n)=o_p(1) T LFC I ( T LFC > − a n ) = o p ( 1 ) , which yields
T ^ a d a = T ^ c + o p ( 1 ) → D N ( 0 , 1 ) . \widehat{T}^{\mathrm{ada}}=\widehat{T}_{c}+o_p(1)\ \xrightarrow{D}\ \mathcal{N}(0,1). T ada = T c + o p ( 1 ) D N ( 0 , 1 ) .
Under H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) with d = Δ d=\Delta d = Δ or under H 1 ( Δ ) H_1^{(\Delta)} H 1 ( Δ ) with d > Δ d>\Delta d > Δ , since a n → ∞ a_n\to\infty a n → ∞ , we have T ^ c I ( T ^ L F C ≤ − a n ) = o p ( 1 ) \widehat{T}_{c}\mathbb{I}(\widehat{T}^{\mathrm{LFC}}\leq-a_n)=o_p(1) T c I ( T LFC ≤ − a n ) = o p ( 1 ) and T ^ L F C I ( T ^ L F C ≤ − a n ) = o p ( 1 ) \widehat{T}^{\mathrm{LFC}}\mathbb{I}(\widehat{T}^{\mathrm{LFC}}\leq-a_n)=o_p(1) T LFC I ( T LFC ≤ − a n ) = o p ( 1 ) . Consequently, under H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) with d = Δ d=\Delta d = Δ ,
T ^ a d a = T ^ L F C + o p ( 1 ) → D N ( 0 , 1 ) . \widehat{T}^{\mathrm{ada}}=\widehat{T}^{\mathrm{LFC}}+o_p(1)\ \xrightarrow{D}\ \mathcal{N}(0,1). T ada = T LFC + o p ( 1 ) D N ( 0 , 1 ) .
Under H 1 ( Δ ) H_1^{(\Delta)} H 1 ( Δ ) with d > Δ d>\Delta d > Δ , T ^ a d a = T ^ L F C + o p ( 1 ) \widehat{T}^{\mathrm{ada}}=\widehat{T}^{\mathrm{LFC}}+o_p(1) T ada = T LFC + o p ( 1 ) , which diverges to infinity at rate n \sqrt{n} n .
We further consider the local alternatives for the similarity-testing problem:
H 1 n ( Δ ) : d = Δ + δ n 2 , H_{1n}^{(\Delta)}:d=\Delta+\delta_{n2}, H 1 n ( Δ ) : d = Δ + δ n 2 ,
where δ n 2 \delta_{n2} δ n 2 is a positive sequence tending to zero. The following theorem summarizes the asymptotic properties of T ^ a d a \widehat{T}^{\mathrm{ada}} T ada under the null and various alternative hypotheses.
Theorem 2. Assume that σ d 2 > 0 \sigma_d^2>0 σ d 2 > 0 , a n → ∞ a_n\to\infty a n → ∞ , a n / n → 0 a_n/\sqrt{n}\to0 a n / n → 0 , and that Conditions 1, 2, and 3 hold.
(i) Under the null H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) , T ^ a d a → D N ( 0 , 1 ) \widehat{T}^{\mathrm{ada}}\xrightarrow{D}\mathcal{N}(0,1) T ada D N ( 0 , 1 ) .
(ii) Under the local alternative H 1 n ( Δ ) H_{1n}^{(\Delta)} H 1 n ( Δ ) with δ n 2 = C / n \delta_{n2}=C/\sqrt{n} δ n 2 = C / n for some constant C > 0 C>0 C > 0 , T ^ a d a → D N ( C / σ d , 1 ) \widehat{T}^{\mathrm{ada}}\xrightarrow{D}\mathcal{N}(C/\sigma_d,1) T ada D N ( C / σ d , 1 ) .
(iii) Under the local alternative H 1 n ( Δ ) H_{1n}^{(\Delta)} H 1 n ( Δ ) with n δ n 2 → ∞ \sqrt{n}\delta_{n2}\to\infty n δ n 2 → ∞ , 1 n δ n 2 T ^ a d a → P 1 σ d \frac{1}{\sqrt{n}\delta_{n2}}\widehat{T}^{\mathrm{ada}}\xrightarrow{P}\frac{1}{\sigma_d} n δ n 2 1 T ada P σ d 1 .
(iv) Under the global alternative H 1 ( Δ ) H_1^{(\Delta)} H 1 ( Δ ) , 1 n T ^ a d a → P d − Δ σ d \frac{1}{\sqrt{n}}\widehat{T}^{\mathrm{ada}}\xrightarrow{P}\frac{d-\Delta}{\sigma_d} n 1 T ada P σ d d − Δ .
By Theorem 2, under each fixed null hypothesis H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) , we have P ( T ^ a d a > z 1 − α ) → α \mathbb{P}(\widehat{T}^{\mathrm{ada}}>z_{1-\alpha})\to\alpha P ( T ada > z 1 − α ) → α . This implies that the proposed adaptive test T ^ a d a \widehat{T}^{\mathrm{ada}} T ada can maintain the nominal significance level at each fixed point in H 0 ( Δ ) H_{0}^{(\Delta)} H 0 ( Δ ) , thereby addressing the conservatism of the traditional LFC-based test T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC . Under H 1 ( Δ ) H_{1}^{(\Delta)} H 1 ( Δ ) , the proposed adaptive test is asymptotically equivalent to the LFC-based test T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC . Thus, our proposed test inherits the LAUMP property of the LFC-based test. Furthermore, we can show that, under the alternative H 1 ( Δ ) H_{1}^{(\Delta)} H 1 ( Δ ) , the proposed adaptive test T ^ a d a \widehat{T}^{\mathrm{ada}} T ada is at least as powerful as the LFC-based test T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC in finite samples. Indeed, for a nominal significance level 0 < α < 0.5 0 < \alpha< 0.5 0 < α < 0.5 ,
P ( T ^ a d a > z 1 − α ) = P ( T ^ a d a > z 1 − α , T ^ L F C ≤ − a n ) + P ( T ^ a d a > z 1 − α , T ^ L F C > − a n ) = P ( T ^ c > z 1 − α , T ^ L F C ≤ − a n ) + P ( T ^ L F C > z 1 − α , T ^ L F C > − a n ) = P ( T ^ c > z 1 − α , T ^ L F C ≤ − a n ) + P ( T ^ L F C > z 1 − α ) ≥ P ( T ^ L F C > z 1 − α ) , \begin{aligned}
\mathbb{P}(\widehat{T}^{\mathrm{ada}} > z_{1-\alpha}) &= \mathbb{P}(\widehat{T}^{\mathrm{ada}} > z_{1-\alpha}, \widehat{T}^{\mathrm{LFC}} \le-a_n) + \mathbb{P}(\widehat{T}^{\mathrm{ada}} > z_{1-\alpha}, \widehat{T}^{\mathrm{LFC}} > -a_n) \\
&= \mathbb{P}(\widehat{T}^{c} > z_{1-\alpha}, \widehat{T}^{\mathrm{LFC}} \le-a_n) + \mathbb{P}(\widehat{T}^{\mathrm{LFC}} > z_{1-\alpha}, \widehat{T}^{\mathrm{LFC}} > -a_n) \\
&= \mathbb{P}(\widehat{T}^{c} > z_{1-\alpha}, \widehat{T}^{\mathrm{LFC}} \le-a_n) + \mathbb{P}(\widehat{T}^{\mathrm{LFC}} > z_{1-\alpha}) \\
&\ge\mathbb{P}(\widehat{T}^{\mathrm{LFC}} > z_{1-\alpha}),
\end{aligned} P ( T ada > z 1 − α ) = P ( T ada > z 1 − α , T LFC ≤ − a n ) + P ( T ada > z 1 − α , T LFC > − a n ) = P ( T c > z 1 − α , T LFC ≤ − a n ) + P ( T LFC > z 1 − α , T LFC > − a n ) = P ( T c > z 1 − α , T LFC ≤ − a n ) + P ( T LFC > z 1 − α ) ≥ P ( T LFC > z 1 − α ) ,
where the third equation follows from z 1 − α > 0 z_{1-\alpha} > 0 z 1 − α > 0 . This implies that our proposed test is at least as powerful as the LFC-based test T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC for every finite sample size.
Remark 3. Another approach in the literature seeking to mitigate the limitation of the least favorable configuration in inequality-constrained testing is the recentering method, which was first proposed by Hansen [2005] in the context of testing for superior predictive ability; see also Linton et al. [2010], Andrews and Soares [2010], Donald and Hsu [2011], and Donald and Hsu [2016]. However, by using a truncated critical value, such methods can maintain the significance level only on the boundary of the composite null hypothesis; see, for example, Theorem 2 of Linton et al. [2010] or Theorem 4.1 of Donald and Hsu [2016]. In contrast, the proposed adaptive boundary-proxy test attains the nominal level at every fixed null configuration.
Adaptive-to-Model Test for Similarity and Model Misspecification
Test construction and null distribution
We construct an adaptive-to-model test to simultaneously assess functional similarity and model specification for the two populations. Recall that the joint null hypothesis H 0 H_0 H 0 is equivalent to the intersection H 0 ( 0 ) ∩ H 0 ( 1 ) ∩ H 0 ( Δ ) H_0^{(0)} \cap H_0^{(1)} \cap H_0^{(\Delta)} H 0 ( 0 ) ∩ H 0 ( 1 ) ∩ H 0 ( Δ ) , where
H 0 ( 0 ) : P { E [ Y ( 0 ) ∣ X ( 0 ) ] = g 0 ( ( θ 0 ( 0 ) ) ⊤ X ( 0 ) ) } = 1 , for some θ 0 ( 0 ) ∈ Θ 0 , H_0^{(0)}:\ \mathbb{P}\{\mathbb{E}[Y^{(0)}\mid X^{(0)}]=g_0((\theta_0^{(0)})^\top X^{(0)})\}=1,\quad\text{for some }\theta_0^{(0)}\in\Theta_0, H 0 ( 0 ) : P { E [ Y ( 0 ) ∣ X ( 0 ) ] = g 0 (( θ 0 ( 0 ) ) ⊤ X ( 0 ) )} = 1 , for some θ 0 ( 0 ) ∈ Θ 0 ,
H 0 ( 1 ) : P { E [ Y ( 1 ) ∣ X ( 1 ) ] = g 1 ( ( θ 0 ( 1 ) ) ⊤ X ( 1 ) ) } = 1 , for some θ 0 ( 1 ) ∈ Θ 1 , H_0^{(1)}:\ \mathbb{P}\{\mathbb{E}[Y^{(1)}\mid X^{(1)}]=g_1((\theta_0^{(1)})^\top X^{(1)})\}=1,\quad\text{for some }\theta_0^{(1)}\in\Theta_1, H 0 ( 1 ) : P { E [ Y ( 1 ) ∣ X ( 1 ) ] = g 1 (( θ 0 ( 1 ) ) ⊤ X ( 1 ) )} = 1 , for some θ 0 ( 1 ) ∈ Θ 1 ,
H 0 ( Δ ) : 0 < d ≤ Δ . H_0^{(\Delta)}: 0<d\leq\Delta. H 0 ( Δ ) : 0 < d ≤ Δ.
The principle of the adaptive-to-model testing framework for assessing H 0 H_0 H 0 is similar to that of the adaptive test T ^ a d a \widehat{T}^{\mathrm{ada}} T ada for testing the similarity of two populations. Specifically, we first construct test statistics for three component null hypotheses H 0 ( 0 ) H_0^{(0)} H 0 ( 0 ) , H 0 ( 1 ) H_0^{(1)} H 0 ( 1 ) , and H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) . Let T ^ l m o d \widehat{T}^{\mathrm{mod}}_l T l mod be the test statistic for assessing the component null hypothesis H 0 ( l ) H_0^{(l)} H 0 ( l ) , where l = 0 , 1 l=0,1 l = 0 , 1 . Suppose that the test statistic T ^ l m o d \widehat{T}^{\mathrm{mod}}_l T l mod converges in distribution to a fixed, nondegenerate limiting distribution under H 0 ( l ) H_0^{(l)} H 0 ( l ) and diverges to infinity in probability at rate r n l r_{nl} r n l under H 1 ( l ) H_1^{(l)} H 1 ( l ) . We then propose the following adaptive-to-model test for H 0 H_0 H 0 :
T ^ a d a m = T ^ a d a + ∣ T ^ 0 m o d ∣ I ( ∣ T ^ 0 m o d ∣ > b n 0 ) + ∣ T ^ 1 m o d ∣ I ( ∣ T ^ 1 m o d ∣ > b n 1 ) , (12) \widehat{T}^{\mathrm{adam}}=\widehat{T}^{\mathrm{ada}}+\left|\widehat{T}^{\mathrm{mod}}_0\right|\mathbb{I}(\left|\widehat{T}^{\mathrm{mod}}_0\right|>b_{n0})+\left|\widehat{T}^{\mathrm{mod}}_1\right|\mathbb{I}(\left|\widehat{T}^{\mathrm{mod}}_1\right|>b_{n1}), \tag*{(12)} T adam = T ada + T 0 mod I ( T 0 mod > b n 0 ) + T 1 mod I ( T 1 mod > b n 1 ) , (12)
where T ^ a d a \widehat{T}^{\mathrm{ada}} T ada is given in (11) and b n l b_{nl} b n l is a positive sequence satisfying that b n l → ∞ b_{nl}\to\infty b n l → ∞ and b n l / r n l → 0 b_{nl}/r_{nl}\to0 b n l / r n l → 0 , where l = 0 , 1 l=0,1 l = 0 , 1 .
As with the tuning parameter a n a_n a n used in the construction of T ^ a d a \widehat{T}^{\mathrm{ada}} T ada , the tuning parameters b n l b_{nl} b n l are introduced to ensure that the test T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam satisfies the following adaptive-to-model properties. Note that the joint null hypothesis H 0 H_0 H 0 is equivalent to H 0 ( 0 ) H_0^{(0)} H 0 ( 0 ) , H 0 ( 1 ) H_0^{(1)} H 0 ( 1 ) and H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) holding simultaneously. Since b n l → ∞ b_{nl}\to\infty b n l → ∞ and T ^ l m o d \widehat{T}^{\mathrm{mod}}_l T l mod converges in distribution to a nondegenerate distribution under H 0 ( l ) H_0^{(l)} H 0 ( l ) , ∣ T ^ l m o d ∣ I ( ∣ T ^ l m o d ∣ > b n l ) = o p ( 1 ) \left|\widehat{T}^{\mathrm{mod}}_l\right|\mathbb{I}(\left|\widehat{T}^{\mathrm{mod}}_l\right|>b_{nl})=o_p(1) T l mod I ( T l mod > b n l ) = o p ( 1 ) for l = 0 , 1 l=0,1 l = 0 , 1 . Consequently, under H 0 H_0 H 0 , we obtain T ^ a d a m = T ^ a d a + o p ( 1 ) \widehat{T}^{\mathrm{adam}}=\widehat{T}^{\mathrm{ada}}+o_p(1) T adam = T ada + o p ( 1 ) . This implies that the test T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam is asymptotically equivalent to T ^ a d a \widehat{T}^{\mathrm{ada}} T ada under H 0 H_0 H 0 . Let 0 < α < 0.5 0<\alpha<0.5 0 < α < 0.5 be the nominal significance level.
Theorem 3. Assume that Conditions 1, 2, and 3 hold. If σ d 2 > 0 \sigma_d^2>0 σ d 2 > 0 , a n → ∞ a_n\to\infty a n → ∞ , a n / n → 0 a_n/\sqrt{n}\to0 a n / n → 0 , and b n l → ∞ b_{nl}\to\infty b n l → ∞ for l = 0 , 1 l=0,1 l = 0 , 1 , then, under H 0 H_0 H 0 , T ^ a d a m → D N ( 0 , 1 ) \widehat{T}^{\mathrm{adam}}\xrightarrow{D}\mathcal{N}(0,1) T adam D N ( 0 , 1 ) . Consequently, lim n → ∞ P ( T ^ a d a m > z 1 − α ) = α \lim_{n\to\infty}\mathbb{P}(\widehat{T}^{\mathrm{adam}}>z_{1-\alpha})=\alpha lim n → ∞ P ( T adam > z 1 − α ) = α .
Theorem 3 implies that the adaptive-to-model test T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam can asymptotically maintain the significance level at every fixed null configuration in H 0 H_0 H 0 , and thus avoids the over-conservatism of the LFC-based tests.
For practical use, we need to specify the tests for the component null hypotheses H 0 ( 0 ) H_0^{(0)} H 0 ( 0 ) and H 0 ( 1 ) H_0^{(1)} H 0 ( 1 ) . There are limited studies in the literature for model checking that are applicable in high-dimensional settings in which the predictor dimension p p p may far exceed the sample size n n n . In this paper, we adopt the Fisher-combination-based test proposed by Tan et al. [ [23 ] which assesses the goodness-of-fit of sparse parametric regression models in high-dimensional settings. Their test statistic is defined as
T ^ F i s h e r ( l ) = − 2 ∑ k = 1 d 0 ln ( p ^ α l k ( l ) ) , (13) \widehat{T}_{\mathrm{Fisher}}^{(l)}=-2\sum_{k=1}^{d_0}\ln\left(\widehat{p}_{\alpha_{lk}}^{(l)}\right), \tag*{(13)} T Fisher ( l ) = − 2 k = 1 ∑ d 0 ln ( p α l k ( l ) ) , (13)
where l = 0 , 1 l=0,1 l = 0 , 1 and p ^ α l k ( l ) = 1 − Φ ( T ^ α l k ( l ) ) \widehat{p}_{\alpha_{lk}}^{(l)}=1-\Phi\left(\widehat{T}_{\alpha_{lk}}^{(l)}\right) p α l k ( l ) = 1 − Φ ( T α l k ( l ) ) . Here, the projections α l 1 , … , α l d 0 \alpha_{l1},\ldots,\alpha_{ld_0} α l 1 , … , α l d 0 belong to the unit sphere S p − 1 S^{p-1} S p − 1 , and
T ^ α l k ( l ) = ∑ 1 ≤ i ≠ j ≤ n l ε i ( l ) ( θ ^ ( l ) ) ε j ( l ) ( θ ^ ( l ) ) K ( α l k T X i ( l ) − α l k T X j ( l ) h ) ( 2 ∑ 1 ≤ i ≠ j ≤ n l [ ε i ( l ) ( θ ^ ( l ) ) ε j ( l ) ( θ ^ ( l ) ) K ( α l k T X i ( l ) − α l k T X j ( l ) h ) ] 2 ) 1 / 2 . \widehat{T}_{\alpha_{lk}}^{(l)}=
\frac{\sum_{1\leq i\ne j\leq n_l}\varepsilon_i^{(l)}\left(\widehat{\theta}^{(l)}\right)\varepsilon_j^{(l)}\left(\widehat{\theta}^{(l)}\right)K\left(\frac{\alpha_{lk}^{\mathsf T}X_i^{(l)}-\alpha_{lk}^{\mathsf T}X_j^{(l)}}{h}\right)}
{\left(2\sum_{1\leq i\ne j\leq n_l}\left[\varepsilon_i^{(l)}\left(\widehat{\theta}^{(l)}\right)\varepsilon_j^{(l)}\left(\widehat{\theta}^{(l)}\right)K\left(\frac{\alpha_{lk}^{\mathsf T}X_i^{(l)}-\alpha_{lk}^{\mathsf T}X_j^{(l)}}{h}\right)\right]^2\right)^{1/2}}. T α l k ( l ) = ( 2 ∑ 1 ≤ i = j ≤ n l [ ε i ( l ) ( θ ( l ) ) ε j ( l ) ( θ ( l ) ) K ( h α l k T X i ( l ) − α l k T X j ( l ) ) ] 2 ) 1/2 ∑ 1 ≤ i = j ≤ n l ε i ( l ) ( θ ( l ) ) ε j ( l ) ( θ ( l ) ) K ( h α l k T X i ( l ) − α l k T X j ( l ) ) .
where ε i ( l ) ( θ ^ ( l ) ) = Y i ( l ) − g l ( θ ^ ( l ) T X i ( l ) ) \varepsilon_i^{(l)}\left(\widehat{\theta}^{(l)}\right)=Y_i^{(l)}-g_l\left(\widehat{\theta}^{(l)\mathsf T}X_i^{(l)}\right) ε i ( l ) ( θ ( l ) ) = Y i ( l ) − g l ( θ ( l ) T X i ( l ) ) denotes the residual for observation i i i in population l l l , K ( ⋅ ) K(\cdot) K ( ⋅ ) is the kernel function, and h h h is the bandwidth. For the choice of the projections α l 1 , … , α l d 0 \alpha_{l1},\ldots,\alpha_{ld_0} α l 1 , … , α l d 0 , we refer the readers to § 4 of Tan et al. [ [23 ] .
Power analysis of the adaptive-to-model test T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam
In this subsection, we investigate the asymptotic properties of T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam under various alternative hypotheses. Recall that the alternative hypothesis H 1 H_1 H 1 is equivalent to the case where at least one of the component null hypotheses H 0 ( 0 ) H_0^{(0)} H 0 ( 0 ) , H 0 ( 1 ) H_0^{(1)} H 0 ( 1 ) , and H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) fails to hold. Elementary calculations show that H 1 H_1 H 1 can be partitioned into 7 mutually exclusive sub-alternative hypotheses:
H 11 = H 1 ( 0 ) ∩ H 0 ( 1 ) ∩ H 0 ( Δ ) , H 12 = H 0 ( 0 ) ∩ H 1 ( 1 ) ∩ H 0 ( Δ ) , H 13 = H 1 ( 0 ) ∩ H 1 ( 1 ) ∩ H 0 ( Δ ) , H 14 = H 0 ( 0 ) ∩ H 0 ( 1 ) ∩ H 1 ( Δ ) , H 15 = H 1 ( 0 ) ∩ H 0 ( 1 ) ∩ H 1 ( Δ ) , H 16 = H 0 ( 0 ) ∩ H 1 ( 1 ) ∩ H 1 ( Δ ) , H 17 = H 1 ( 0 ) ∩ H 1 ( 1 ) ∩ H 1 ( Δ ) . (14) \begin{aligned}
H_{11}&=H_1^{(0)}\cap H_0^{(1)}\cap H_0^{(\Delta)}, &\quad H_{12}&=H_0^{(0)}\cap H_1^{(1)}\cap H_0^{(\Delta)},\\
H_{13}&=H_1^{(0)}\cap H_1^{(1)}\cap H_0^{(\Delta)}, &\quad H_{14}&=H_0^{(0)}\cap H_0^{(1)}\cap H_1^{(\Delta)},\\
H_{15}&=H_1^{(0)}\cap H_0^{(1)}\cap H_1^{(\Delta)}, &\quad H_{16}&=H_0^{(0)}\cap H_1^{(1)}\cap H_1^{(\Delta)},\\
H_{17}&=H_1^{(0)}\cap H_1^{(1)}\cap H_1^{(\Delta)}. \tag*{(14)}
\end{aligned} H 11 H 13 H 15 H 17 = H 1 ( 0 ) ∩ H 0 ( 1 ) ∩ H 0 ( Δ ) , = H 1 ( 0 ) ∩ H 1 ( 1 ) ∩ H 0 ( Δ ) , = H 1 ( 0 ) ∩ H 0 ( 1 ) ∩ H 1 ( Δ ) , = H 1 ( 0 ) ∩ H 1 ( 1 ) ∩ H 1 ( Δ ) . H 12 H 14 H 16 = H 0 ( 0 ) ∩ H 1 ( 1 ) ∩ H 0 ( Δ ) , = H 0 ( 0 ) ∩ H 0 ( 1 ) ∩ H 1 ( Δ ) , = H 0 ( 0 ) ∩ H 1 ( 1 ) ∩ H 1 ( Δ ) , (14)
Next, we formulate the local alternative hypothesis H 1 n H_{1n} H 1 n that converges to the joint null hypothesis H 0 H_0 H 0 . To this end, define
H 1 n ( 0 ) : E [ Y ( 0 ) ∣ X ( 0 ) ] = g 0 ( ( θ 0 ( 0 ) ) T X ( 0 ) ) + δ n 0 w 0 ( X ( 0 ) ) , a.s. , H_{1n}^{(0)}:\mathbb{E}[Y^{(0)}\mid X^{(0)}]=g_0\left(\left(\theta_0^{(0)}\right)^{\mathsf T}X^{(0)}\right)+\delta_{n0}w_0\left(X^{(0)}\right),\quad\text{a.s.}, H 1 n ( 0 ) : E [ Y ( 0 ) ∣ X ( 0 ) ] = g 0 ( ( θ 0 ( 0 ) ) T X ( 0 ) ) + δ n 0 w 0 ( X ( 0 ) ) , a.s. ,
H 1 n ( 1 ) : E [ Y ( 1 ) ∣ X ( 1 ) ] = g 1 ( ( θ 0 ( 1 ) ) T X ( 1 ) ) + δ n 1 w 1 ( X ( 1 ) ) , a.s. , H_{1n}^{(1)}:\mathbb{E}[Y^{(1)}\mid X^{(1)}]=g_1\left(\left(\theta_0^{(1)}\right)^{\mathsf T}X^{(1)}\right)+\delta_{n1}w_1\left(X^{(1)}\right),\quad\text{a.s.}, H 1 n ( 1 ) : E [ Y ( 1 ) ∣ X ( 1 ) ] = g 1 ( ( θ 0 ( 1 ) ) T X ( 1 ) ) + δ n 1 w 1 ( X ( 1 ) ) , a.s. ,
H 1 n ( Δ ) : d = Δ + δ n 2 , H_{1n}^{(\Delta)}:d=\Delta+\delta_{n2}, H 1 n ( Δ ) : d = Δ + δ n 2 ,
where { δ n l } l = 0 , 1 , 2 \{\delta_{n_l}\}_{l=0,1,2} { δ n l } l = 0 , 1 , 2 are positive sequences tending to zero. Analogously to the global alternative H 1 H_1 H 1 , the local alternative hypothesis H 1 n H_{1n} H 1 n can also be partitioned into the following 7 mutually exclusive local sub-alternatives:
H 11 n = H 1 n ( 0 ) ∩ H 0 ( 1 ) ∩ H 0 ( Δ ) , H 12 n = H 0 ( 0 ) ∩ H 1 n ( 1 ) ∩ H 0 ( Δ ) , H 13 n = H 1 n ( 0 ) ∩ H 1 n ( 1 ) ∩ H 0 ( Δ ) , H 14 n = H 0 ( 0 ) ∩ H 0 ( 1 ) ∩ H 1 n ( Δ ) , H 15 n = H 1 n ( 0 ) ∩ H 0 ( 1 ) ∩ H 1 n ( Δ ) , H 16 n = H 0 ( 0 ) ∩ H 1 n ( 1 ) ∩ H 1 n ( Δ ) , H 17 n = H 1 n ( 0 ) ∩ H 1 n ( 1 ) ∩ H 1 n ( Δ ) . (15) \begin{aligned}
H_{11n} &= H_{1n}^{(0)} \cap H_0^{(1)} \cap H_0^{(\Delta)}, \qquad H_{12n} = H_0^{(0)} \cap H_{1n}^{(1)} \cap H_0^{(\Delta)},\\
H_{13n} &= H_{1n}^{(0)} \cap H_{1n}^{(1)} \cap H_0^{(\Delta)}, \qquad H_{14n} = H_0^{(0)} \cap H_0^{(1)} \cap H_{1n}^{(\Delta)},\\
H_{15n} &= H_{1n}^{(0)} \cap H_0^{(1)} \cap H_{1n}^{(\Delta)}, \qquad H_{16n} = H_0^{(0)} \cap H_{1n}^{(1)} \cap H_{1n}^{(\Delta)},\\
H_{17n} &= H_{1n}^{(0)} \cap H_{1n}^{(1)} \cap H_{1n}^{(\Delta)}. \tag*{(15)}
\end{aligned} H 11 n H 13 n H 15 n H 17 n = H 1 n ( 0 ) ∩ H 0 ( 1 ) ∩ H 0 ( Δ ) , H 12 n = H 0 ( 0 ) ∩ H 1 n ( 1 ) ∩ H 0 ( Δ ) , = H 1 n ( 0 ) ∩ H 1 n ( 1 ) ∩ H 0 ( Δ ) , H 14 n = H 0 ( 0 ) ∩ H 0 ( 1 ) ∩ H 1 n ( Δ ) , = H 1 n ( 0 ) ∩ H 0 ( 1 ) ∩ H 1 n ( Δ ) , H 16 n = H 0 ( 0 ) ∩ H 1 n ( 1 ) ∩ H 1 n ( Δ ) , = H 1 n ( 0 ) ∩ H 1 n ( 1 ) ∩ H 1 n ( Δ ) . (15)
To derive the asymptotic properties of the adaptive-to-model test T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam under the various alternative hypotheses, we further impose the following regularity condition.
Condition 4. (i) Under H 1 n ( l ) H_{1n}^{(l)} H 1 n ( l ) , r n l − 1 T ^ l m o d ⟶ P μ 1 ( l ) r_{n_l}^{-1}\widehat{T}^{\mathrm{mod}}_l \mathrel{\mathop{\longrightarrow}\limits^{P}} \mu_1^{(l)} r n l − 1 T l mod ⟶ P μ 1 ( l ) for l = 0 , 1 l=0,1 l = 0 , 1 , where μ 1 ( l ) \mu_1^{(l)} μ 1 ( l ) is a nonzero constant. (ii) Under H 1 n ( l ) H_{1n}^{(l)} H 1 n ( l ) with δ n l → 0 \delta_{n_l} \to0 δ n l → 0 and r n l δ n l 4 → ∞ r_{n_l}\delta_{n_l}^4 \to\infty r n l δ n l 4 → ∞ , r n l − 1 δ n l − 4 T ^ l m o d ⟶ P μ Δ ( l ) r_{n_l}^{-1}\delta_{n_l}^{-4}\widehat{T}^{\mathrm{mod}}_l \mathrel{\mathop{\longrightarrow}\limits^{P}} \mu_{\Delta}^{(l)} r n l − 1 δ n l − 4 T l mod ⟶ P μ Δ ( l ) for l = 0 , 1 l=0,1 l = 0 , 1 , where μ Δ ( l ) \mu_{\Delta}^{(l)} μ Δ ( l ) is a nonzero constant. (iii) Under H 1 n ( l ) H_{1n}^{(l)} H 1 n ( l ) with δ n l = r n l − 1 / 4 \delta_{n_l}=r_{n_l}^{-1/4} δ n l = r n l − 1/4 as n → ∞ n\to\infty n → ∞ , T ^ l m o d ⟶ D T l \widehat{T}^{\mathrm{mod}}_l \mathrel{\mathop{\longrightarrow}\limits^{D}} T_l T l mod ⟶ D T l for l = 0 , 1 l=0,1 l = 0 , 1 , where T l T_l T l follows a fixed, nondegenerate distribution which differs from the limiting distribution of T ^ l m o d \widehat{T}^{\mathrm{mod}}_l T l mod under H 0 ( l ) H_0^{(l)} H 0 ( l ) .
It follows from Tan et al. [2025] that the Fisher-combination-based test T ^ F i s h e r ( l ) \widehat{T}_{\mathrm{Fisher}}^{(l)} T Fisher ( l ) given in (13) satisfies Condition 4 with r n l = n l 2 h r_{n_l}=n_l^2h r n l = n l 2 h , where h → 0 h\to0 h → 0 is the bandwidth used in the test statistic T ^ α l k ( l ) \widehat{T}_{\alpha_lk}^{(l)} T α l k ( l ) . The following proposition summarizes the adaptive property of the model checking component for the test T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam .
Proposition 1. Suppose that b n l → ∞ b_{n_l}\to\infty b n l → ∞ , b n l / r n l = o ( 1 ) b_{n_l}/r_{n_l}=o(1) b n l / r n l = o ( 1 ) , and Condition 4 holds. Then the following results hold.
(1) Under H 1 ( l ) H_1^{(l)} H 1 ( l ) , ∣ T ^ l m o d ∣ I ( ∣ T ^ l m o d ∣ ≤ b n l ) = o p ( 1 ) |\widehat{T}^{\mathrm{mod}}_l|\mathbb{I}(|\widehat{T}^{\mathrm{mod}}_l|\le b_{n_l})=o_p(1) ∣ T l mod ∣ I ( ∣ T l mod ∣ ≤ b n l ) = o p ( 1 ) and thus, ∣ T ^ l m o d ∣ I ( ∣ T ^ l m o d ∣ > b n l ) = ∣ T ^ l m o d ∣ + o p ( 1 ) |\widehat{T}^{\mathrm{mod}}_l|\mathbb{I}(|\widehat{T}^{\mathrm{mod}}_l|>b_{n_l})=|\widehat{T}^{\mathrm{mod}}_l|+o_p(1) ∣ T l mod ∣ I ( ∣ T l mod ∣ > b n l ) = ∣ T l mod ∣ + o p ( 1 ) .
(2) Under H 1 n ( l ) H_{1n}^{(l)} H 1 n ( l ) with r n l δ n l 4 ∣ μ Δ ( l ) ∣ / b n l ≥ C > 1 r_{n_l}\delta_{n_l}^4|\mu_{\Delta}^{(l)}|/b_{n_l}\ge C>1 r n l δ n l 4 ∣ μ Δ ( l ) ∣/ b n l ≥ C > 1 for n n n large enough, ∣ T ^ l m o d ∣ I ( ∣ T ^ l m o d ∣ ≤ b n l ) = o p ( 1 ) |\widehat{T}^{\mathrm{mod}}_l|\mathbb{I}(|\widehat{T}^{\mathrm{mod}}_l|\le b_{n_l})=o_p(1) ∣ T l mod ∣ I ( ∣ T l mod ∣ ≤ b n l ) = o p ( 1 ) and thus, ∣ T ^ l m o d ∣ I ( ∣ T ^ l m o d ∣ > b n l ) = ∣ T ^ l m o d ∣ + o p ( 1 ) |\widehat{T}^{\mathrm{mod}}_l|\mathbb{I}(|\widehat{T}^{\mathrm{mod}}_l|>b_{n_l})=|\widehat{T}^{\mathrm{mod}}_l|+o_p(1) ∣ T l mod ∣ I ( ∣ T l mod ∣ > b n l ) = ∣ T l mod ∣ + o p ( 1 ) .
(3) Under H 1 n ( l ) H_{1n}^{(l)} H 1 n ( l ) with r n l δ n l 4 ∣ μ Δ ( l ) ∣ / b n l ≤ C < 1 r_{n_l}\delta_{n_l}^4|\mu_{\Delta}^{(l)}|/b_{n_l}\le C<1 r n l δ n l 4 ∣ μ Δ ( l ) ∣/ b n l ≤ C < 1 for n n n large enough, ∣ T ^ l m o d ∣ I ( ∣ T ^ l m o d ∣ > b n l ) = o p ( 1 ) |\widehat{T}^{\mathrm{mod}}_l|\mathbb{I}(|\widehat{T}^{\mathrm{mod}}_l|>b_{n_l})=o_p(1) ∣ T l mod ∣ I ( ∣ T l mod ∣ > b n l ) = o p ( 1 ) .
Under H 1 n ( l ) H_{1n}^{(l)} H 1 n ( l ) with δ n l = r n l − 1 / 4 \delta_{n_l}=r_{n_l}^{-1/4} δ n l = r n l − 1/4 , since b n l → ∞ b_{n_l}\to\infty b n l → ∞ , it follows that r n l δ n l 4 ∣ μ Δ ( l ) ∣ / b n l ≤ C < 1 r_{n_l}\delta_{n_l}^4|\mu_{\Delta}^{(l)}|/b_{n_l}\le C<1 r n l δ n l 4 ∣ μ Δ ( l ) ∣/ b n l ≤ C < 1 for n l n_l n l large enough. Consequently, under H 1 n ( l ) H_{1n}^{(l)} H 1 n ( l ) with δ n l = r n l − 1 / 4 \delta_{n_l}=r_{n_l}^{-1/4} δ n l = r n l − 1/4 , ∣ T ^ l m o d ∣ I ( ∣ T ^ l m o d ∣ > b n l ) = o p ( 1 ) |\widehat{T}^{\mathrm{mod}}_l|\mathbb{I}(|\widehat{T}^{\mathrm{mod}}_l|>b_{n_l})=o_p(1) ∣ T l mod ∣ I ( ∣ T l mod ∣ > b n l ) = o p ( 1 ) .
Under the alternative H 1 H_1 H 1 , at least one of the component null hypotheses H 0 ( 0 ) H_0^{(0)} H 0 ( 0 ) , H 0 ( 1 ) H_0^{(1)} H 0 ( 1 ) and H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) is false. We then show that our test statistic T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam can adaptively retain the test statistic corresponding to each component null hypothesis that fails to hold. For example, suppose that H 11 H_{11} H 11 holds. Then H 0 ( 0 ) H_{0}^{(0)} H 0 ( 0 ) is false, whereas both H 0 ( 1 ) H_{0}^{(1)} H 0 ( 1 ) and H 0 ( Δ ) H_{0}^{(\Delta)} H 0 ( Δ ) hold. Consequently, T ^ 0 a d a ⟶ D N ( 0 , 1 ) \widehat{T}_{0}^{\mathrm{ada}} \mathrel{\mathop{\longrightarrow}^{D}} \mathcal{N}(0,1) T 0 ada ⟶ D N ( 0 , 1 ) , ∣ T ^ 0 m o d ∣ I ( ∣ T ^ 0 m o d ∣ > b n 0 ) = ∣ T ^ 0 m o d ∣ + o p ( 1 ) |\widehat{T}_{0}^{\mathrm{mod}}|\mathbb{I}(|\widehat{T}_{0}^{\mathrm{mod}}|>b_{n0})=|\widehat{T}_{0}^{\mathrm{mod}}|+o_p(1) ∣ T 0 mod ∣ I ( ∣ T 0 mod ∣ > b n 0 ) = ∣ T 0 mod ∣ + o p ( 1 ) , and ∣ T ^ 1 m o d ∣ I ( ∣ T ^ 1 m o d ∣ > b n 1 ) = o p ( 1 ) |\widehat{T}_{1}^{\mathrm{mod}}|\mathbb{I}(|\widehat{T}_{1}^{\mathrm{mod}}|>b_{n1})=o_p(1) ∣ T 1 mod ∣ I ( ∣ T 1 mod ∣ > b n 1 ) = o p ( 1 ) . This yields T ^ a d a m = ∣ T ^ 0 m o d ∣ + O p ( 1 ) \widehat{T}^{\mathrm{adam}}=|\widehat{T}_{0}^{\mathrm{mod}}|+O_p(1) T adam = ∣ T 0 mod ∣ + O p ( 1 ) . Thus, T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam adaptively retains T ^ 0 m o d \widehat{T}_{0}^{\mathrm{mod}} T 0 mod when the corresponding component null hypothesis H 0 ( 0 ) H_{0}^{(0)} H 0 ( 0 ) fails. Since T ^ 0 m o d \widehat{T}_{0}^{\mathrm{mod}} T 0 mod diverges to infinity in probability at the rate r n 0 r_{n0} r n 0 under H 1 ( 0 ) H_{1}^{(0)} H 1 ( 0 ) , T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam also diverges to infinity in probability at the same rate. Consequently, the proposed test T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam is consistent and has asymptotic power one. Analogous arguments apply to the other configurations under H 1 H_{1} H 1 . The more specific asymptotic properties of T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam under various alternative hypotheses are summarized in the following theorem.
Theorem 4. Suppose that σ d 2 > 0 \sigma_d^2>0 σ d 2 > 0 , a n → ∞ a_n\to\infty a n → ∞ , a n / n → 0 a_n/\sqrt{n}\to0 a n / n → 0 , b n l → ∞ b_{nl}\to\infty b n l → ∞ and b n l / r n l → 0 b_{nl}/r_{nl}\to0 b n l / r n l → 0 for l = 0 , 1 l=0,1 l = 0 , 1 , and that Conditions 1, 2, 3 and 4 hold.
Under H 11 H_{11} H 11 , H 12 H_{12} H 12 , H 13 H_{13} H 13 , H 14 H_{14} H 14 , H 15 H_{15} H 15 , H 16 H_{16} H 16 , and H 17 H_{17} H 17 , T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam diverges to infinity in probability at the rates r n 0 r_{n0} r n 0 , r n 1 r_{n1} r n 1 , r n 0 ∨ r n 1 r_{n0}\vee r_{n1} r n 0 ∨ r n 1 , n \sqrt{n} n , r n 0 ∨ n r_{n0}\vee\sqrt{n} r n 0 ∨ n , r n 1 ∨ n r_{n1}\vee\sqrt{n} r n 1 ∨ n , r n 0 ∨ r n 1 ∨ n r_{n0}\vee r_{n1}\vee\sqrt{n} r n 0 ∨ r n 1 ∨ n , respectively.
Under H 11 n H_{11n} H 11 n with r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣ / b n 0 ≥ C > 1 r_{n0}\delta_{n0}^{4}|\mu_{\Delta}^{(0)}|/b_{n0}\ge C>1 r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣/ b n 0 ≥ C > 1 for n n n large enough, T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam diverges to infinity in probability at rate r n 0 δ n 0 4 r_{n0}\delta_{n0}^{4} r n 0 δ n 0 4 ; under H 11 n H_{11n} H 11 n with r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣ / b n 0 ≤ C < 1 r_{n0}\delta_{n0}^{4}|\mu_{\Delta}^{(0)}|/b_{n0}\le C<1 r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣/ b n 0 ≤ C < 1 for n n n large enough, T ^ a d a m ⟶ D N ( 0 , 1 ) \widehat{T}^{\mathrm{adam}}\mathrel{\mathop{\longrightarrow}^{D}}\mathcal{N}(0,1) T adam ⟶ D N ( 0 , 1 ) .
Under H 12 n H_{12n} H 12 n with r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣ / b n 1 ≥ C > 1 r_{n1}\delta_{n1}^{4}|\mu_{\Delta}^{(1)}|/b_{n1}\ge C>1 r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣/ b n 1 ≥ C > 1 for n n n large enough, T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam diverges to infinity in probability at rate r n 1 δ n 1 4 r_{n1}\delta_{n1}^{4} r n 1 δ n 1 4 ; under H 12 n H_{12n} H 12 n with r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣ / b n 1 ≤ C < 1 r_{n1}\delta_{n1}^{4}|\mu_{\Delta}^{(1)}|/b_{n1}\le C<1 r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣/ b n 1 ≤ C < 1 for n n n large enough, T ^ a d a m ⟶ D N ( 0 , 1 ) \widehat{T}^{\mathrm{adam}}\mathrel{\mathop{\longrightarrow}^{D}}\mathcal{N}(0,1) T adam ⟶ D N ( 0 , 1 ) .
Under H 13 n H_{13n} H 13 n with r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣ / b n 0 ≥ C > 1 r_{n0}\delta_{n0}^{4}|\mu_{\Delta}^{(0)}|/b_{n0}\ge C>1 r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣/ b n 0 ≥ C > 1 or r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣ / b n 1 ≥ C > 1 r_{n1}\delta_{n1}^{4}|\mu_{\Delta}^{(1)}|/b_{n1}\ge C>1 r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣/ b n 1 ≥ C > 1 for n n n large enough, T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam diverges to infinity in probability at least at rate r n 0 δ n 0 4 ∧ r n 1 δ n 1 4 r_{n0}\delta_{n0}^{4}\wedge r_{n1}\delta_{n1}^{4} r n 0 δ n 0 4 ∧ r n 1 δ n 1 4 ; under H 13 n H_{13n} H 13 n with r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣ / b n 0 ≤ C < 1 r_{n0}\delta_{n0}^{4}|\mu_{\Delta}^{(0)}|/b_{n0}\le C<1 r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣/ b n 0 ≤ C < 1 and r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣ / b n 1 ≤ C < 1 r_{n1}\delta_{n1}^{4}|\mu_{\Delta}^{(1)}|/b_{n1}\le C<1 r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣/ b n 1 ≤ C < 1 for n n n large enough, T ^ a d a m ⟶ D N ( 0 , 1 ) \widehat{T}^{\mathrm{adam}}\mathrel{\mathop{\longrightarrow}^{D}}\mathcal{N}(0,1) T adam ⟶ D N ( 0 , 1 ) .
Under H 14 n H_{14n} H 14 n with n δ n 2 → ∞ \sqrt{n}\delta_{n2}\to\infty n δ n 2 → ∞ , T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam diverges to infinity in probability at rate n δ n 2 \sqrt{n}\delta_{n2} n δ n 2 ; under H 14 n H_{14n} H 14 n with δ n 2 = C / n \delta_{n2}=C/\sqrt{n} δ n 2 = C / n for some constant C > 0 C>0 C > 0 , T ^ a d a m ⟶ D N ( C / σ d , 1 ) \widehat{T}^{\mathrm{adam}}\mathrel{\mathop{\longrightarrow}^{D}}\mathcal{N}(C/\sigma_d,1) T adam ⟶ D N ( C / σ d , 1 ) .
Under H 15 n H_{15n} H 15 n with r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣ / b n 0 ≥ C > 1 r_{n0}\delta_{n0}^{4}|\mu_{\Delta}^{(0)}|/b_{n0}\ge C>1 r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣/ b n 0 ≥ C > 1 for n n n large enough or n δ n 2 → ∞ \sqrt{n}\delta_{n2}\to\infty n δ n 2 → ∞ , T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam diverges to infinity in probability at least at rate r n 0 δ n 0 4 ∧ n δ n 2 r_{n0}\delta_{n0}^{4}\wedge\sqrt{n}\delta_{n2} r n 0 δ n 0 4 ∧ n δ n 2 ; under H 15 n H_{15n} H 15 n with r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣ / b n 0 ≤ C < 1 r_{n0}\delta_{n0}^{4}|\mu_{\Delta}^{(0)}|/b_{n0}\le C<1 r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣/ b n 0 ≤ C < 1 for n n n large enough and δ n 2 = C / n \delta_{n2}=C/\sqrt{n} δ n 2 = C / n , T ^ a d a m ⟶ D N ( C / σ d , 1 ) \widehat{T}^{\mathrm{adam}}\mathrel{\mathop{\longrightarrow}^{D}}\mathcal{N}(C/\sigma_d,1) T adam ⟶ D N ( C / σ d , 1 ) .
Under H 16 n H_{16n} H 16 n with r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣ / b n 1 ≥ C > 1 r_{n1}\delta_{n1}^{4}|\mu_{\Delta}^{(1)}|/b_{n1}\ge C>1 r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣/ b n 1 ≥ C > 1 for n n n large enough or n δ n 2 → ∞ \sqrt{n}\delta_{n2}\to\infty n δ n 2 → ∞ , T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam diverges to infinity in probability at least at rate r n 1 δ n 1 4 ∧ n δ n 2 r_{n1}\delta_{n1}^{4}\wedge\sqrt{n}\delta_{n2} r n 1 δ n 1 4 ∧ n δ n 2 ; under H 16 n H_{16n} H 16 n with r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣ / b n 1 ≤ C < 1 r_{n1}\delta_{n1}^{4}|\mu_{\Delta}^{(1)}|/b_{n1}\le C<1 r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣/ b n 1 ≤ C < 1 for n n n large enough and δ n 2 = C / n \delta_{n2}=C/\sqrt{n} δ n 2 = C / n , T ^ a d a m ⟶ D N ( C / σ d , 1 ) \widehat{T}^{\mathrm{adam}}\mathrel{\mathop{\longrightarrow}^{D}}\mathcal{N}(C/\sigma_d,1) T adam ⟶ D N ( C / σ d , 1 ) .
Under H 17 n H_{17n} H 17 n with r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣ / b n 0 ≥ C > 1 r_{n0}\delta_{n0}^{4}|\mu_{\Delta}^{(0)}|/b_{n0}\ge C>1 r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣/ b n 0 ≥ C > 1 , or r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣ / b n 1 ≥ C > 1 r_{n1}\delta_{n1}^{4}|\mu_{\Delta}^{(1)}|/b_{n1}\ge C>1 r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣/ b n 1 ≥ C > 1 for $n
large enough, or n δ n 2 → ∞ \sqrt{n}\delta_{n2} \to\infty n δ n 2 → ∞ , T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam diverges to infinity in probability at least at rate r n 0 δ n 0 4 ∧ r n 1 δ n 1 4 ∧ n δ n 2 r_{n0}\delta_{n0}^{4} \wedge r_{n1}\delta_{n1}^{4} \wedge\sqrt{n}\delta_{n2} r n 0 δ n 0 4 ∧ r n 1 δ n 1 4 ∧ n δ n 2 ; under H 17 n H_{17n} H 17 n with r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣ / b n 0 ≤ C < 1 r_{n0}\delta_{n0}^{4}|\mu_{\Delta}^{(0)}|/b_{n0} \le C < 1 r n 0 δ n 0 4 ∣ μ Δ ( 0 ) ∣/ b n 0 ≤ C < 1 , r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣ / b n 1 ≤ C < 1 r_{n1}\delta_{n1}^{4}|\mu_{\Delta}^{(1)}|/b_{n1} \le C < 1 r n 1 δ n 1 4 ∣ μ Δ ( 1 ) ∣/ b n 1 ≤ C < 1 for n n n large enough, and δ n 2 = C / n \delta_{n2}=C/\sqrt{n} δ n 2 = C / n , T ^ a d a m → D N ( C / σ d , 1 ) \widehat{T}^{\mathrm{adam}} \xrightarrow{D} \mathcal{N}(C/\sigma_d,1) T adam D N ( C / σ d , 1 ) .
Application to Transfer Learning
The proposed two-sample testing framework can be readily applied to assess the reliability of transfer learning, which aims to improve learning performance on a target task by leveraging information from one or more related source domains. Effective knowledge transfer requires sufficient structural similarity between the source and target domains, although the two domains need not be identical [22 , 29 , 25 ] (Li et al. 2022). With population 0 as the target domain and population 1 as the source domain, our testing framework provides a joint statistical diagnostic for two conditions: (i) correct model specification in both domains, and (ii) sufficient similarity between the two domains.
Much of the transfer learning literature characterizes or mitigates domain discrepancies through divergence metrics [2 ] , adversarial training [11 ] , or representation alignment [28 ] , but implicitly assumes that the employed model is correctly specified. This assumption, however, requires verification in practice. Ignoring model misspecification can invalidate transferability assessments. First, it threatens reliability: even when the two domains are closely related, a misspecified model (e.g., incorrect functional form or omitted variables) can yield biased parameter estimates, leading to flawed inferences in the target domain. Second, it threatens validity: model misspecification may artificially inflate estimated domain discrepancy, so that a test for domain similarity may reject the null due to model misfit rather than a genuine difference between the underlying regression relationships, leading to the premature exclusion of potentially informative source data. As shown by Long et al. [ [18 ] , transfer performance is highly sensitive to representation quality and model conditions, which underscores the need for joint diagnostics. Consequently, reliable transfer learning demands a dual validation of correct model specification and domain similarity.
In our framework, the hypotheses H 0 ( 0 ) H_{0}^{(0)} H 0 ( 0 ) and H 0 ( 1 ) H_{0}^{(1)} H 0 ( 1 ) assess whether the regression models are correctly specified in the target and source domains, respectively. The functional similarity hypothesis is formulated as
H 0 ( Δ ) : 0 < d ≤ Δ versus H 1 ( Δ ) : d > Δ , H_{0}^{(\Delta)}: 0 < d \le\Delta\qquad\text{versus} \qquad H_{1}^{(\Delta)}: d > \Delta, H 0 ( Δ ) : 0 < d ≤ Δ versus H 1 ( Δ ) : d > Δ ,
where d d d is the L 2 L_{2} L 2 -discrepancy defined in (5) and Δ \Delta Δ is a prespecified tolerance. Similarity therefore does not require exact equality: the two regression functions may differ, provided that their discrepancy stays within a practically acceptable range. When d = 0 d = 0 d = 0 , that is, when the two regression functions coincide, the similarity component in the test statistic T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam becomes degenerate and is not used for inference (Remark 2); the restriction 0 < d 0 < d 0 < d only excludes this degenerate case.
An alternative formulation is the one-sided equivalence test
H 0 ( Δ ) : d ≥ Δ versus H 1 ( Δ ) : d < Δ , H_{0}^{(\Delta)}: d \ge\Delta\qquad\text{versus} \qquad H_{1}^{(\Delta)}: d < \Delta, H 0 ( Δ ) : d ≥ Δ versus H 1 ( Δ ) : d < Δ ,
in which transferability is supported only after the null hypothesis is rejected; this suits the aim of certifying similarity of the source and target domains at a prespecified level before transfer is undertaken.
Our objective is different. We view the test procedure primarily as a diagnostic for detecting discrepancy between the source and target domains. Under the widely adopted pretraining-fine-tuning paradigm, transferring information from a pretrained model is often a natural starting point for a downstream task, rather than an action taken only after exact source-target equivalence has been established. For example, pretrained language models are routinely adapted to downstream natural language processing tasks, while pretrained models in computer vision are commonly used as initialization for subsequent tasks. In such settings, the relevant inferential question is whether there is sufficient evidence to conclude that the source and target domains are too different for the intended transfer to be appropriate. This perspective provides a natural interpretation for placing d ≤ Δ d \le\Delta d ≤ Δ in the null hypothesis. Under the null H 0 ( Δ ) H_{0}^{(\Delta)} H 0 ( Δ ) , the source and target regression functions are allowed to differ, but their discrepancy does not exceed the prespecified tolerance. The alternative H 1 ( Δ ) H_{1}^{(\Delta)} H 1 ( Δ ) represents a relevant departure in which the functional discrepancy is larger than the acceptable level. Thus, rather than requiring statistical evidence of similarity before transfer is considered, the proposed test asks whether the data provide sufficient evidence of a practically meaningful source-target discrepancy that may indicate a risk of negative transfer.
The adaptive-to-model statistic developed in § 4 can therefore be used as a pre-transfer diagnostic. Its similarity component T ^ a d a \widehat{T}^{\mathrm{ada}} T ada assesses whether the functional discrepancy between the source and target domains exceeds the tolerance level, while the model checking components T ^ 0 m o d \widehat{T}_0^{\mathrm{mod}} T 0 mod and T ^ 1 m o d \widehat{T}_1^{\mathrm{mod}} T 1 mod assess the model adequacy in the target and source domains, respectively. Through the adaptive gating mechanism, the model checking components remain asymptotically inactive when the corresponding models are correctly specified and become active when sufficiently strong evidence of misspecification is present. The resulting joint procedure can therefore respond adaptively to different departures that may undermine reliable knowledge transfer.
It is important to distinguish the proposed diagnostic from a direct evaluation of the performance of a particular transfer learning algorithm. Failure to reject H 0 H_0 H 0 does not imply that transferring source information will necessarily improve target prediction or estimation. Rather, it indicates that the observed data provide insufficient evidence against the model-specification and functional-similarity conditions considered in the proposed framework. Conversely, rejection of H 0 H_0 H 0 provides evidence that at least one of these conditions is violated and therefore signals a potential risk of unreliable or negative transfer.
Numerical studies
Simulation studies
In this subsection, we evaluate the finite-sample performance of the proposed tests through simulations under different model settings. All simulation results are based on 1,000 Monte Carlo replications at a nominal significance level of α = 0.05 \alpha= 0.05 α = 0.05 . Across all scenarios, we use the tuning sequences a n = log log ( n 0 ∧ n 1 ) a_n = \sqrt{\log\log(n_0 \wedge n_1)} a n = log log ( n 0 ∧ n 1 ) and b n l = 2 log ( n l ) b_{n_l} = 2\log(n_l) b n l = 2 log ( n l ) for l = 0 , 1 l = 0,1 l = 0 , 1 . The form of a n a_n a n is also used in the simulations of Donald and Hsu [2011].
To implement the proposed tests T ^ a d a \widehat{T}^{\mathrm{ada}} T ada and T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam , we need to estimate the unknown parameter θ 0 ( l ) \theta_0^{(l)} θ 0 ( l ) and the asymptotic variance σ d 2 \sigma_d^2 σ d 2 . In all simulation settings, the parameters θ 0 ( l ) \theta_0^{(l)} θ 0 ( l ) are estimated using the SCAD penalized likelihood estimator. Specifically, the penalized likelihood estimator θ ^ ( l ) \widehat{\theta}^{(l)} θ ( l ) maximizes
1 n l ∑ i = 1 n l J l ( X i ( l ) , Y i ( l ) , θ ( l ) ) − ∑ j = 1 p ρ λ n ( ∣ θ j ( l ) ∣ ) \frac{1}{n_l}\sum_{i=1}^{n_l}J_l\left(X_i^{(l)},Y_i^{(l)},\theta^{(l)}\right)-\sum_{j=1}^{p}\rho_{\lambda_n}\left(\left|\theta_j^{(l)}\right|\right) n l 1 i = 1 ∑ n l J l ( X i ( l ) , Y i ( l ) , θ ( l ) ) − j = 1 ∑ p ρ λ n ( θ j ( l ) )
where ρ λ n \rho_{\lambda_n} ρ λ n denotes the SCAD penalty. In the following simulation studies, the criterion function is taken to be J l ( X , Y , θ ) ∝ − 1 2 ( Y − g l ( X ⊤ θ ) ) 2 J_l(X,Y,\theta)\propto-\frac{1}{2}\left(Y-g_l(X^\top\theta)\right)^2 J l ( X , Y , θ ) ∝ − 2 1 ( Y − g l ( X ⊤ θ ) ) 2 , where g l ( t ) = t g_l(t)=t g l ( t ) = t for Gaussian linear models considered in Studies 1 and 2, and g l ( t ) = exp ( t ) g_l(t)=\exp(t) g l ( t ) = exp ( t ) in Study 3.
We estimate the asymptotic variance σ d 2 \sigma_d^2 σ d 2 by a plug-in estimator. First, we describe the variance decomposition used for its numerical implementation. Define
G 0 = ζ M 00 + ( 1 − ζ ) M 10 , G 1 = ζ M 01 + ( 1 − ζ ) M 11 . G_0=\zeta M_{00}+(1-\zeta)M_{10}, \qquad G_1=\zeta M_{01}+(1-\zeta)M_{11}. G 0 = ζ M 00 + ( 1 − ζ ) M 10 , G 1 = ζ M 01 + ( 1 − ζ ) M 11 .
where { M k l : k , l = 0 , 1 } \{M_{kl}: k,l=0,1\} { M k l : k , l = 0 , 1 } are the quantities defined in Theorem 1. Under the model-specification null H 0 ( l ) H_0^{(l)} H 0 ( l ) , we write
Y ( l ) = g l ( ( X ( l ) ) T θ 0 ( l ) ) + ϵ ( l ) , E [ ϵ ( l ) ∣ X ( l ) ] = 0. Y^{(l)}=g_l\left((X^{(l)})^\mathsf{T}\theta_0^{(l)}\right)+\epsilon^{(l)}, \qquad E[\epsilon^{(l)}\mid X^{(l)}]=0. Y ( l ) = g l ( ( X ( l ) ) T θ 0 ( l ) ) + ϵ ( l ) , E [ ϵ ( l ) ∣ X ( l ) ] = 0.
For the criterion function J l J_l J l , the score evaluated at the true parameter is
∇ θ ( l ) J l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) = X ( l ) g ˙ l ( ( X ( l ) ) T θ 0 ( l ) ) ϵ ( l ) . \nabla_{\theta^{(l)}}J_l\left(X^{(l)},Y^{(l)},\theta_0^{(l)}\right)=X^{(l)}\dot{g}_l\left((X^{(l)})^\mathsf{T}\theta_0^{(l)}\right)\epsilon^{(l)}. ∇ θ ( l ) J l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) = X ( l ) g ˙ l ( ( X ( l ) ) T θ 0 ( l ) ) ϵ ( l ) .
By the oracle property of the SCAD estimator under suitable regularity conditions, on the true active set S ( l ) S^{(l)} S ( l ) the function L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) L_l\left(X^{(l)},Y^{(l)},\theta_0^{(l)}\right) L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) in (8) has the score-type representation
L l , S ( l ) ( X ( l ) , Y ( l ) , θ 0 ( l ) ) = I l − 1 X S ( l ) ( l ) g ˙ l ( ( X ( l ) ) T θ 0 ( l ) ) ϵ ( l ) , L_{l,S^{(l)}}\left(X^{(l)},Y^{(l)},\theta_0^{(l)}\right)=I_l^{-1}X_{S^{(l)}}^{(l)}\dot{g}_l\left((X^{(l)})^\mathsf{T}\theta_0^{(l)}\right)\epsilon^{(l)}, L l , S ( l ) ( X ( l ) , Y ( l ) , θ 0 ( l ) ) = I l − 1 X S ( l ) ( l ) g ˙ l ( ( X ( l ) ) T θ 0 ( l ) ) ϵ ( l ) ,
with zero entries on the inactive coordinates, where I l I_l I l denotes the corresponding information matrix restricted to S ( l ) S^{(l)} S ( l ) . Consequently, E [ L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) ∣ X ( l ) ] = 0 E[L_l(X^{(l)},Y^{(l)},\theta_0^{(l)})\mid X^{(l)}]=0 E [ L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) ∣ X ( l ) ] = 0 . Recall that ψ ( x , θ ( 0 ) , θ ( 1 ) ) = g 0 ( x T θ ( 0 ) ) − g 1 ( x T θ ( 1 ) ) \psi(x,\theta^{(0)},\theta^{(1)})=g_0(x^\mathsf{T}\theta^{(0)})-g_1(x^\mathsf{T}\theta^{(1)}) ψ ( x , θ ( 0 ) , θ ( 1 ) ) = g 0 ( x T θ ( 0 ) ) − g 1 ( x T θ ( 1 ) ) . It follows that
Cov [ ψ 2 ( X ( l ) , θ 0 ( 0 ) , θ 0 ( 1 ) ) , G l T L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) ] = 0 , l = 0 , 1. \operatorname{Cov}\left[\psi^2\left(X^{(l)},\theta_0^{(0)},\theta_0^{(1)}\right),G_l^\mathsf{T}L_l\left(X^{(l)},Y^{(l)},\theta_0^{(l)}\right)\right]=0,\qquad l=0,1. Cov [ ψ 2 ( X ( l ) , θ 0 ( 0 ) , θ 0 ( 1 ) ) , G l T L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) ] = 0 , l = 0 , 1.
Therefore, under the joint model-specification null H 0 ( 0 ) ∩ H 0 ( 1 ) H_0^{(0)}\cap H_0^{(1)} H 0 ( 0 ) ∩ H 0 ( 1 ) , the asymptotic variance σ d 2 \sigma_d^2 σ d 2 defined in Theorem 1 admits the simplified decomposition
σ d 2 = ζ Var [ ψ 2 ( X ( 0 ) , θ 0 ( 0 ) , θ 0 ( 1 ) ) ] + ( 1 − ζ ) Var [ ψ 2 ( X ( 1 ) , θ 0 ( 0 ) , θ 0 ( 1 ) ) ] + 4 ζ G 0 T Σ 0 G 0 + 4 1 − ζ G 1 T Σ 1 G 1 . (16) \begin{aligned}
\sigma_d^2={}&\zeta\operatorname{Var}\left[\psi^2\left(X^{(0)},\theta_0^{(0)},\theta_0^{(1)}\right)\right]+(1-\zeta)\operatorname{Var}\left[\psi^2\left(X^{(1)},\theta_0^{(0)},\theta_0^{(1)}\right)\right]\\
&+\frac{4}{\zeta}G_0^\mathsf{T}\Sigma_0G_0+\frac{4}{1-\zeta}G_1^\mathsf{T}\Sigma_1G_1. \tag*{(16)}
\end{aligned} σ d 2 = ζ Var [ ψ 2 ( X ( 0 ) , θ 0 ( 0 ) , θ 0 ( 1 ) ) ] + ( 1 − ζ ) Var [ ψ 2 ( X ( 1 ) , θ 0 ( 0 ) , θ 0 ( 1 ) ) ] + ζ 4 G 0 T Σ 0 G 0 + 1 − ζ 4 G 1 T Σ 1 G 1 . (16)
where Σ l = E [ L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) T ] \Sigma_l=E[L_l(X^{(l)},Y^{(l)},\theta_0^{(l)})L_l(X^{(l)},Y^{(l)},\theta_0^{(l)})^\mathsf{T}] Σ l = E [ L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) T ] . We next construct the estimator of each component of σ d 2 \sigma_d^2 σ d 2 in (16) . Based on the oracle property of the SCAD estimator, the function L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) L_l(X^{(l)},Y^{(l)},\theta_0^{(l)}) L l ( X ( l ) , Y ( l ) , θ 0 ( l ) ) is estimated on the selected active set S ^ ( l ) \widehat{S}^{(l)} S ( l ) as
L ^ l ( X i ( l ) , Y i ( l ) , θ ^ ( l ) ) = ( I ^ l − 1 ∇ θ S ^ ( l ) J l ( X i ( l ) , Y i ( l ) , θ ^ S ^ ( l ) ( l ) ) 0 p − ∣ S ^ ( l ) ∣ ) , \widehat{L}_l(X_i^{(l)},Y_i^{(l)},\widehat{\theta}^{(l)})=
\begin{pmatrix}
\widehat{I}_l^{-1}\nabla_{\theta_{\widehat{S}^{(l)}}}J_l\left(X_i^{(l)},Y_i^{(l)},\widehat{\theta}_{\widehat{S}^{(l)}}^{(l)}\right)\\
\mathbf{0}_{p-\lvert\widehat{S}^{(l)}\rvert}
\end{pmatrix}, L l ( X i ( l ) , Y i ( l ) , θ ( l ) ) = ( I l − 1 ∇ θ S ( l ) J l ( X i ( l ) , Y i ( l ) , θ S ( l ) ( l ) ) 0 p − ∣ S ( l ) ∣ ) ,
where I ^ l = − n l − 1 ∑ i = 1 n l ∇ θ S ^ ( l ) 2 J l ( X i ( l ) , Y i ( l ) , θ ^ S ^ ( l ) ( l ) ) \widehat{I}_l=-n_l^{-1}\sum_{i=1}^{n_l}\nabla_{\theta_{\widehat{S}^{(l)}}}^{2}J_l(X_i^{(l)},Y_i^{(l)},\widehat{\theta}^{(l)}_{\widehat{S}^{(l)}}) I l = − n l − 1 ∑ i = 1 n l ∇ θ S ( l ) 2 J l ( X i ( l ) , Y i ( l ) , θ S ( l ) ( l ) ) is the empirical information matrix restricted to the selected active set and ∇ θ S ^ ( l ) J l ( X i ( l ) , Y i ( l ) , θ ^ S ^ ( l ) ( l ) ) \nabla_{\theta_{\widehat{S}^{(l)}}}J_l(X_i^{(l)},Y_i^{(l)},\widehat{\theta}^{(l)}_{\widehat{S}^{(l)}}) ∇ θ S ( l ) J l ( X i ( l ) , Y i ( l ) , θ S ( l ) ( l ) ) denotes the gradient of J l ( X i ( l ) , Y i ( l ) , θ ^ S ^ ( l ) ( l ) ) J_l(X_i^{(l)},Y_i^{(l)},\widehat{\theta}^{(l)}_{\widehat{S}^{(l)}}) J l ( X i ( l ) , Y i ( l ) , θ S ( l ) ( l ) ) with respect to θ S ^ ( l ) \theta_{\widehat{S}^{(l)}} θ S ( l ) . Thus, the covariance matrix Σ l \Sigma_l Σ l is estimated by
Σ ^ l = 1 n l ∑ i = 1 n l L ^ l ( X i ( l ) , Y i ( l ) , θ ^ ( l ) ) L ^ l ( X i ( l ) , Y i ( l ) , θ ^ ( l ) ) T , l = 0 , 1. \widehat{\Sigma}_l=\frac{1}{n_l}\sum_{i=1}^{n_l}\widehat{L}_l(X_i^{(l)},Y_i^{(l)},\widehat{\theta}^{(l)})\widehat{L}_l(X_i^{(l)},Y_i^{(l)},\widehat{\theta}^{(l)})^{\mathsf{T}},\qquad l=0,1. Σ l = n l 1 i = 1 ∑ n l L l ( X i ( l ) , Y i ( l ) , θ ( l ) ) L l ( X i ( l ) , Y i ( l ) , θ ( l ) ) T , l = 0 , 1.
Define ψ ^ ( x ) = ψ ( x , θ ^ ( 0 ) , θ ^ ( 1 ) ) = g 0 ( x T θ ^ ( 0 ) ) − g 1 ( x T θ ^ ( 1 ) ) \widehat{\psi}(x)=\psi(x,\widehat{\theta}^{(0)},\widehat{\theta}^{(1)})=g_0(x^{\mathsf{T}}\widehat{\theta}^{(0)})-g_1(x^{\mathsf{T}}\widehat{\theta}^{(1)}) ψ ( x ) = ψ ( x , θ ( 0 ) , θ ( 1 ) ) = g 0 ( x T θ ( 0 ) ) − g 1 ( x T θ ( 1 ) ) . The plug-in estimator of σ d 2 \sigma_d^2 σ d 2 is obtained by replacing all population quantities in (16) with their sample estimators,
σ ^ d 2 = n 0 n Var ^ [ ψ ^ 2 ( X ( 0 ) ) ] + n 1 n Var ^ [ ψ ^ 2 ( X ( 1 ) ) ] + 4 n n 0 G ^ 0 T Σ ^ 0 G ^ 0 + 4 n n 1 G ^ 1 T Σ ^ 1 G ^ 1 , (17) \widehat{\sigma}_d^2=\frac{n_0}{n}\widehat{\operatorname{Var}}\left[\widehat{\psi}^2(X^{(0)})\right]+\frac{n_1}{n}\widehat{\operatorname{Var}}\left[\widehat{\psi}^2(X^{(1)})\right]+\frac{4n}{n_0}\widehat{G}_0^{\mathsf{T}}\widehat{\Sigma}_0\widehat{G}_0+\frac{4n}{n_1}\widehat{G}_1^{\mathsf{T}}\widehat{\Sigma}_1\widehat{G}_1, \tag*{(17)} σ d 2 = n n 0 Var [ ψ 2 ( X ( 0 ) ) ] + n n 1 Var [ ψ 2 ( X ( 1 ) ) ] + n 0 4 n G 0 T Σ 0 G 0 + n 1 4 n G 1 T Σ 1 G 1 , (17)
where G ^ 0 \widehat{G}_0 G 0 and G ^ 1 \widehat{G}_1 G 1 are the corresponding empirical analogues of G 0 G_0 G 0 and G 1 G_1 G 1 , respectively. This plug-in estimator is used in the construction of T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC , T ^ a d a \widehat{T}^{\mathrm{ada}} T ada , and T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam throughout all simulation studies. Under correct model specification, this plug-in estimator is consistent for the asymptotic variance, since the cross-covariance term in Theorem 1 vanishes. Under model misspecification in Studies 2 and 3, it serves as an approximation, with rejection primarily driven by the activated model-specification component rather than the similarity component.
We first investigate the performance of the adaptive boundary-proxy test T ^ a d a \widehat{T}^{\mathrm{ada}} T ada for assessing functional similarity between the two populations. We also compare our test T ^ a d a \widehat{T}^{\mathrm{ada}} T ada with the classical LFC-based test T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC .
Study 1. The data are generated from the following Gaussian linear models for the two populations
Y ( 0 ) = ( X ( 0 ) ) T θ 0 ( 0 ) + ϵ ( 0 ) , Y ( 1 ) = ( X ( 1 ) ) T θ 0 ( 1 ) + ϵ ( 1 ) , (18) \begin{aligned}
Y^{(0)}&=(X^{(0)})^{\mathsf{T}}\theta_0^{(0)}+\epsilon^{(0)},\\
Y^{(1)}&=(X^{(1)})^{\mathsf{T}}\theta_0^{(1)}+\epsilon^{(1)}, \tag*{(18)}
\end{aligned} Y ( 0 ) Y ( 1 ) = ( X ( 0 ) ) T θ 0 ( 0 ) + ϵ ( 0 ) , = ( X ( 1 ) ) T θ 0 ( 1 ) + ϵ ( 1 ) , (18)
with X ( l ) ∼ N ( 0 , I p ) X^{(l)}\sim\mathcal{N}(0,I_p) X ( l ) ∼ N ( 0 , I p ) and ϵ ( l ) ∼ N ( 0 , 1 ) \epsilon^{(l)}\sim\mathcal{N}(0,1) ϵ ( l ) ∼ N ( 0 , 1 ) . The regression coefficient vectors for populations 0 and 1 are θ 0 ( 0 ) = ( 1 , 1 , 1 , 1 , 1 , 0 , … , 0 ) T \theta_0^{(0)}=(1,1,1,1,1,0,\ldots,0)^{\mathsf{T}} θ 0 ( 0 ) = ( 1 , 1 , 1 , 1 , 1 , 0 , … , 0 ) T and θ 0 ( 1 ) = ( 1.5 , 1.5 , 1.5 , 1.5 , 1.5 , 0 , … , 0 ) T \theta_0^{(1)}=(1.5,1.5,1.5,1.5,1.5,0,\ldots,0)^{\mathsf{T}} θ 0 ( 1 ) = ( 1.5 , 1.5 , 1.5 , 1.5 , 1.5 , 0 , … , 0 ) T , respectively. Elementary calculations show that d = ∫ X ∣ g 0 ( x T θ 0 ( 0 ) ) − g 1 ( x T θ 0 ( 1 ) ) ∣ 2 d F ( x ) = ∥ θ 0 ( 0 ) − θ 0 ( 1 ) ∥ 2 2 = 1.25 d=\int_{\mathcal{X}}|g_0(x^{\mathsf{T}}\theta_0^{(0)})-g_1(x^{\mathsf{T}}\theta_0^{(1)})|^2dF(x)=\lVert\theta_0^{(0)}-\theta_0^{(1)}\rVert_2^2=1.25 d = ∫ X ∣ g 0 ( x T θ 0 ( 0 ) ) − g 1 ( x T θ 0 ( 1 ) ) ∣ 2 d F ( x ) = ∥ θ 0 ( 0 ) − θ 0 ( 1 ) ∥ 2 2 = 1.25 . The predictor dimensions are p ∈ { 50 , 200 , 600 } p\in\{50,200,600\} p ∈ { 50 , 200 , 600 } and the sample sizes are set to n 0 ∈ { 200 , 300 } n_0\in\{200,300\} n 0 ∈ { 200 , 300 } and n 1 ∈ { 500 , 800 } n_1\in\{500,800\} n 1 ∈ { 500 , 800 } .
Table 1 compares the finite-sample performance of our adaptive test T ^ a d a \widehat{T}^{\mathrm{ada}} T ada and the classic LFC-based test T ^ L F C \widehat{T}^{\mathrm{LFC}} T LFC with d = 1.25 d=1.25 d = 1.25 . First, under the null H 0 ( Δ ) H_0^{(\Delta)} H 0 ( Δ ) , at the boundary Δ = 1.25 \Delta=1.25 Δ = 1.25 , the proposed test T ^ a d a \widehat{T}^{\mathrm{ada}} T ada exhibits a slightly higher rejection rate than the LFC-based test, while both remain close to the nominal level α \alpha α across all configurations. When
Table 1. Empirical size and power of the proposed and LFC tests in Study 1 (d = 1.25 d = 1.25 d = 1.25 ).
Δ \Delta Δ is only slightly larger than d d d (Δ = 1.3 , 1.5 \Delta= 1.3, 1.5 Δ = 1.3 , 1.5 ), the rejection rate of the proposed test T ^ a d a \widehat{T}^{\mathrm{ada}} T ada decreases but remains higher than that of the LFC test. When Δ \Delta Δ is substantially larger than d d d (Δ = 3 \Delta= 3 Δ = 3 ), the LFC test’s rejection rate quickly drops to zero, reflecting its increasingly conservative nature. In contrast, at Δ = 3 \Delta= 3 Δ = 3 , the rejection rate of the proposed test remains close to the nominal level of 0.05. Second, under the alternative (Δ = 0.8 , 1.0 , 1.1 , 1.2 \Delta= 0.8, 1.0, 1.1, 1.2 Δ = 0.8 , 1.0 , 1.1 , 1.2 ), the proposed test and the LFC test yield nearly identical rejection rates across all settings, and the power increases with larger sample sizes. This agreement is expected because, with a n = log log ( n 0 ∧ n 1 ) a_n = \sqrt{\log\log(n_0 \wedge n_1)} a n = log log ( n 0 ∧ n 1 ) , the adaptive statistic tends to select the LFC component by design under the alternative hypothesis. Moreover, the results remain stable as the dimension increases from p = 50 p = 50 p = 50 to p = 600 p = 600 p = 600 , indicating satisfactory performance in high-dimensional settings.
After demonstrating the adaptive property of our test through comparison with the LFC benchmark, we now systematically evaluate its performance in two-sample regression settings under distinct scenarios. These scenarios are designed to challenge different aspects of the testing procedure, including high dimensionality, feature correlation, and different model misspecification modes.
Study 2. The data are generated from the following regression models for the two populations
Y ( 0 ) = ( X ( 0 ) ) ⊤ θ 0 ( 0 ) + w 0 ( X ( 0 ) ) + ϵ ( 0 ) , Y ( 1 ) = ( X ( 1 ) ) ⊤ θ 0 ( 1 ) + w 1 ( X ( 1 ) ) + ϵ ( 1 ) , (19) \begin{aligned}
Y^{(0)} &= (X^{(0)})^{\top}\theta_0^{(0)} + w_0(X^{(0)}) + \epsilon^{(0)},\\
Y^{(1)} &= (X^{(1)})^{\top}\theta_0^{(1)} + w_1(X^{(1)}) + \epsilon^{(1)}, \tag*{(19)}
\end{aligned} Y ( 0 ) Y ( 1 ) = ( X ( 0 ) ) ⊤ θ 0 ( 0 ) + w 0 ( X ( 0 ) ) + ϵ ( 0 ) , = ( X ( 1 ) ) ⊤ θ 0 ( 1 ) + w 1 ( X ( 1 ) ) + ϵ ( 1 ) , (19)
with ϵ ( l ) ∼ N ( 0 , 1 ) \epsilon^{(l)} \sim\mathcal{N}(0,1) ϵ ( l ) ∼ N ( 0 , 1 ) and X ( l ) ∼ N ( 0 , Σ ) X^{(l)} \sim\mathcal{N}(0,\Sigma) X ( l ) ∼ N ( 0 , Σ ) . The function w l ( ⋅ ) w_l(\cdot) w l ( ⋅ ) captures potential model misspecification. The regression coefficient vectors for populations 0 and 1 are θ 0 ( 0 ) = ( 1 , 1 , 1 , 1 , 1 , 0 , … , 0 ) ⊤ \theta_0^{(0)} = (1,1,1,1,1,0,\ldots,0)^{\top} θ 0 ( 0 ) = ( 1 , 1 , 1 , 1 , 1 , 0 , … , 0 ) ⊤ and θ 0 ( 1 ) = ( 1.5 , 1.5 , 1.5 , 1.5 , 1.5 , 0 , … , 0 ) ⊤ \theta_0^{(1)} = (1.5,1.5,1.5,1.5,1.5,0,\ldots,0)^{\top} θ 0 ( 1 ) = ( 1.5 , 1.5 , 1.5 , 1.5 , 1.5 , 0 , … , 0 ) ⊤ , respectively. The predictor dimensions p ∈ { 50 , 200 , 600 } p \in\{50,200,600\} p ∈ { 50 , 200 , 600 } and the sample sizes are the same as in Study 1. For each setting, we consider two nonlinear model misspecification terms:
w l ( X ) = c ⋅ cos ( 0.6 π X ⊤ θ 0 ( l ) ) , w_l(X) = c \cdot\cos(0.6\pi X^{\top}\theta_0^{(l)}), w l ( X ) = c ⋅ cos ( 0.6 π X ⊤ θ 0 ( l ) ) ,
w l ( X ) = 0.1 c ⋅ ( X ⊤ θ 0 ( l ) ) 2 , w_l(X) = 0.1c \cdot(X^{\top}\theta_0^{(l)})^2, w l ( X ) = 0.1 c ⋅ ( X ⊤ θ 0 ( l ) ) 2 ,
where c ∈ { 0 , 0.5 , 1 } c \in\{0,0.5,1\} c ∈ { 0 , 0.5 , 1 } controls the magnitude of nonlinearity. The case c = 0 c = 0 c = 0 corresponds to the correctly specified linear model. Moreover, we consider two covariance structures for X ( l ) X^{(l)} X ( l ) , Σ = I p \Sigma= I_p Σ = I p and Σ = ( ρ ∣ i − j ∣ ) p × p \Sigma= (\rho^{|i-j|})_{p \times p} Σ = ( ρ ∣ i − j ∣ ) p × p with ρ = 0.4 \rho= 0.4 ρ = 0.4 . Under these two covariance structures, the corresponding true discrepancies under the joint null H 0 ( 0 ) ∩ H 0 ( 1 ) H_0^{(0)} \cap H_0^{(1)} H 0 ( 0 ) ∩ H 0 ( 1 ) are d = 1.25 d = 1.25 d = 1.25 and d ≈ 2.3668 d \approx2.3668 d ≈ 2.3668 , respectively.
Table 2 and Table 3 show the empirical size and power of our proposed test T ^ a d a m \widehat{T}^{\mathrm{adam}} T adam under independent and correlated covariate structures, respectively. Under the correctly specified models, the empirical rejection rates are generally well controlled across different values of dimension and sample sizes. At the boundary Δ = d \Delta= d Δ = d , the rejection rates are generally close to the nominal level, although some configurations exhibit modest size inflation. When Δ \Delta Δ is only slightly larger than d d d , conservative rejection rates are observed. As Δ − d \Delta- d Δ − d increases further, the rejection rates return closer to the nominal level. This pattern is consistent with the adaptive switching mechanism. Under the similarity alternatives with Δ < d \Delta< d Δ < d , as expected, power generally increases with larger sample sizes and a wider gap between d d d and Δ \Delta Δ . Under the misspecification alternatives, power against both cosine and quadratic misspecification generally increases with c c c and sample size, although it remains limited in some weak-signal, high-dimensional settings. Overall, the results demonstrate that the test can achieve satisfactory size control and power against both distance violations and model misspecification.
Table 2. Empirical size and power under independent covariates in Study 2 (d = 1.25 d=1.25 d = 1.25 ).
Table 3. Empirical size and power under correlated covariates in Study 2 (d ≈ 2.37 d \approx2.37 d ≈ 2.37 ).
Next, we consider a more challenging setting, where the conditional mean function follows a generalized linear model with an exponential link.
Study 3. The data are generated from the following regression models for the two populations
Y ( 0 ) ∣ X ( 0 ) ∼ N ( exp ( ( X ( 0 ) ) T θ 0 ( 0 ) + w ~ 0 ( X ( 0 ) ) ) , σ 2 ) , Y ( 1 ) ∣ X ( 1 ) ∼ N ( exp ( ( X ( 1 ) ) T θ 0 ( 1 ) + w ~ 1 ( X ( 1 ) ) ) , σ 2 ) , (20) \begin{aligned}
Y^{(0)} \mid X^{(0)} &\sim\mathcal{N}\left(\exp\left((X^{(0)})^{\mathsf{T}}\theta_0^{(0)}+\widetilde{w}_0(X^{(0)})\right),\sigma^2\right),\\
Y^{(1)} \mid X^{(1)} &\sim\mathcal{N}\left(\exp\left((X^{(1)})^{\mathsf{T}}\theta_0^{(1)}+\widetilde{w}_1(X^{(1)})\right),\sigma^2\right), \tag*{(20)}
\end{aligned} Y ( 0 ) ∣ X ( 0 ) Y ( 1 ) ∣ X ( 1 ) ∼ N ( exp ( ( X ( 0 ) ) T θ 0 ( 0 ) + w 0 ( X ( 0 ) ) ) , σ 2 ) , ∼ N ( exp ( ( X ( 1 ) ) T θ 0 ( 1 ) + w 1 ( X ( 1 ) ) ) , σ 2 ) , (20)
where X ( l ) ∼ N ( 0 , I p ) X^{(l)} \sim\mathcal{N}(0,I_p) X ( l ) ∼ N ( 0 , I p ) and the standard deviation σ = 0.5 \sigma= 0.5 σ = 0.5 is set to ensure numerical stability. The regression coefficient vectors for populations 0 and 1 are θ 0 ( 0 ) = ( 0.1 , 0.1 , 0.1 , 0.1 , 0.1 , 0 , … , 0 ) T \theta_0^{(0)} = (0.1,0.1,0.1,0.1,0.1,0,\ldots,0)^{\mathsf{T}} θ 0 ( 0 ) = ( 0.1 , 0.1 , 0.1 , 0.1 , 0.1 , 0 , … , 0 ) T and θ 0 ( 1 ) = ( 0.4 , 0.4 , 0.4 , 0.4 , 0.4 , 0 , … , 0 ) T \theta_0^{(1)} = (0.4,0.4,0.4,0.4,0.4,0,\ldots,0)^{\mathsf{T}} θ 0 ( 1 ) = ( 0.4 , 0.4 , 0.4 , 0.4 , 0.4 , 0 , … , 0 ) T , respectively. The misspecification term w ~ l ( X ) = 0.4 c ⋅ cos ( 0.6 π X T θ 0 ( l ) ) \widetilde{w}_l(X) = 0.4c\cdot\cos(0.6\pi X^{\mathsf{T}}\theta_0^{(l)}) w l ( X ) = 0.4 c ⋅ cos ( 0.6 π X T θ 0 ( l ) ) is added inside the exponential function, with c ∈ { 0 , 0.5 , 1 } c \in\{0,0.5,1\} c ∈ { 0 , 0.5 , 1 } . Under the correct model specification, the true functional discrepancy is analytically computed as d ≈ 2.3217 d \approx2.3217 d ≈ 2.3217 . The predictor dimensions p ∈ { 50 , 200 , 600 } p \in\{50,200,600\} p ∈ { 50 , 200 , 600 } and the sample sizes are set to n 0 ∈ { 200 , 300 } n_0 \in\{200,300\} n 0 ∈ { 200 , 300 } and n 1 ∈ { 500 , 800 } n_1 \in\{500,800\} n 1 ∈ { 500 , 800 } . Tolerance thresholds are set to Δ ∈ { d , 2.5 , 3 , 5 } \Delta\in\{d,2.5,3,5\} Δ ∈ { d , 2.5 , 3 , 5 } for size since d ≈ 2.32 d \approx2.32 d ≈ 2.32 , Δ ∈ { 1.5 , 2 } \Delta\in\{1.5,2\} Δ ∈ { 1.5 , 2 } for power against distance violation, and Δ = 5 \Delta= 5 Δ = 5 with c ∈ { 0.5 , 1 } c \in\{0.5,1\} c ∈ { 0.5 , 1 } for power against misspecification.
The results from Table 4 show that the proposed test exhibits good power against both distance violations and model misspecification under the challenging exponential GLM setting. At the boundary Δ = d \Delta= d Δ = d , we observe a moderate size inflation in some high-dimensional settings. This phenomenon may reflect the finite-sample bias in the parameter estimates under the exponential link.
Table 4. Empirical size and power in Study 3 (d ≈ 2.32 d \approx2.32 d ≈ 2.32 ).
Real Data Analysis
In this subsection, we illustrate the application of the proposed two-sample testing framework to transfer learning using a real-world housing price dataset. While the preceding simulations evaluate the finite-sample performance of the proposed test under controlled data-generating processes, this analysis demonstrates its practical utility in assessing model specification and source-target functional similarity when the underlying regression relationships and their discrepancy are unknown. We use the Ames Housing dataset, which records residential property sales in Ames, Iowa from 2006 to 2010. It includes detailed information on housing characteristics relevant to property value assessment. The data are available at https://www.kaggle.com/competitions/house-prices-advanced-regression-techniques . The response variable is the house sale price, and we use its log-transformed value as the response in the regression model. The original dataset contains 79 explanatory variables describing property characteristics, including lot size, neighborhood, overall quality, construction year, living area, garage information, sale condition and other housing-related attributes. After preprocessing categorical variables through dummy encoding, the resulting predictor dimension is p = 261 p = 261 p = 261 .
To construct a natural transfer learning setting, we split the data according to the year of sale. Houses sold during 2006-2008 are used as the source domain, while houses sold during 2009-2010 are used as the target domain. This setup represents a transfer problem: we aim to examine whether the housing price regression relationship learned from an earlier market period can be reliably transferred to a subsequent market period. This division gives source and target sample sizes of n 1 = 947 n_1 = 947 n 1 = 947 and n 0 = 513 n_0 = 513 n 0 = 513 , respectively.
We specify linear regression models for both the source and target domains. In practice, Δ \Delta Δ represents a substantive tolerance threshold, which ideally should be determined by expert or regulatory knowledge. In the absence of such external guidance, we address the scale of the response by specifying the similarity tolerance relative to the empirical variance of the log-transformed sale price. Specifically, we set Δ = ρ ⋅ var ^ ( Y ) \Delta= \rho\cdot\widehat{\operatorname{var}}(Y) Δ = ρ ⋅ var ( Y ) , where ρ \rho ρ is a proportion parameter and var ^ ( Y ) \widehat{\operatorname{var}}(Y) var ( Y ) is the sample variance of the response Y Y Y . This makes the tolerance level easier to interpret and avoids relying on an arbitrary fixed constant. In the following analysis, we consider four pre-specified tolerance levels ρ ∈ { 0.02 , 0.05 , 0.10 , 0.20 } \rho\in\{0.02, 0.05, 0.10, 0.20\} ρ ∈ { 0.02 , 0.05 , 0.10 , 0.20 } , which range from strict to liberal transferability criteria.
The estimated linear regression function distance between the source and target domains is d ^ = 0.0105 \hat{d} = 0.0105 d ^ = 0.0105 . The tuning parameter for the adaptive similarity test is a n = 1.3532 a_n = 1.3532 a n = 1.3532 , with the corresponding switching threshold − a n = − 1.3532 -a_n = -1.3532 − a n = − 1.3532 , and the Error-Proxy statistic is T ^ c = − 3.3989 \hat{T}_c = -3.3989 T ^ c = − 3.3989 . The model-specification statistics are T ^ 0 m o d = 2.0201 \hat{T}^{\mathrm{mod}}_0 = 2.0201 T ^ 0 mod = 2.0201 and T ^ 1 m o d = 3.3375 \hat{T}^{\mathrm{mod}}_1 = 3.3375 T ^ 1 mod = 3.3375 . Both statistics fall below their corresponding truncation thresholds, b n 0 = 12.4806 b_{n_0} = 12.4806 b n 0 = 12.4806 and b n 1 = 13.7066 b_{n_1} = 13.7066 b n 1 = 13.7066 , respectively. Therefore, the model misspecification terms are not activated. As Table 5 shows, the proposed test rejects the transferability null only under the most stringent tolerance level, ρ = 2 % \rho= 2\% ρ = 2% . For all tolerance levels ρ ≥ 5 % \rho\ge5\% ρ ≥ 5% , the adaptive test statistic T ^ a d a m \widehat{T}_{\mathrm{adam}} T adam remains below the critical value of 1.6449, and hence the null hypothesis is not rejected. This result suggests that the source and target housing price models are not adequately similar under an extremely strict similarity requirement. In contrast, under moderate and practically meaningful tolerance levels, the data do not provide sufficient evidence that the functional discrepancy exceeds the specified threshold.
Table 5. Test on the Ames Housing dataset under different tolerance levels. The last two columns are computed from one fixed sample split; see the text.
In summary, the Ames Housing analysis demonstrates the practical interpretation of the proposed test. Rather than testing for exact equality, the proposed procedure evaluates whether the discrepancy exceeds a user-specified tolerance level. In other words, it separates differences that are practically meaningful from those that are negligible relative to the specified margin. As noted in § 5 , however, non-rejection does not guarantee that transfer is safe.
Discussion
The methodology developed in this paper is formulated for the comparison of two populations. Several extensions are worth further investigation.
First, the framework could be extended beyond parametric regression models to more flexible semiparametric and nonparametric settings, such as regression functions represented in a reproducing kernel Hilbert space. Such extensions would require new tools for estimating the regression function discrepancy and deriving its asymptotic distribution. Second, the automated selection of the similarity threshold Δ \Delta Δ represents a critical practical challenge. While we adopted a variance-proportional approach in our empirical analysis, a purely data-driven method to determine the optimal Δ \Delta Δ remains elusive. In the transfer learning setting, one possible direction is to explore the trade-off between the risk of negative transfer and the potential gain from source knowledge to provide a more objective criterion for threshold setting. Finally, the transfer learning application discussed in § 5 naturally motivates an extension from a single source domain to multiple source domains. Although transfer learning provides an important application of the proposed framework, the testing methodology itself is not restricted to this setting. The same formulation can be used whenever the objective is to assess whether two regression relationships are sufficiently close while simultaneously assessing the specification of the corresponding models. Exploring other two-sample regression problems may therefore provide additional applications of the proposed methodology.