\section{Introduction}
Integrative analysis from multiple studies is commonly confronted in applications, such as health record data from multiple hospitals \citep{singh2021generalizability,rasmy2018study} and genetic data collected from multiple populations \citep{keys2020cross,sirugo2019missing,kraft2009replication} or under different environments \citep{bloom2013finding}. The availability of multi-source data helps enhance the generalizability and transferability of the constructed model. For example, synthesizing information from multiple health record data helps build a generalizable prediction model \citep{cai2021individual}. Such a model might be safer to transfer to a target population. 
 However, multi-source data often exhibits a high degree of heterogeneity and creates significant statistical analysis challenges. There is a pressing need to develop methods and theories to construct generalizable models with multi-source data. 

The objective of the current paper is to leverage $L$ training data sets $\{(Y^{(l)}, X^{(l)})\}_{1\leq l\leq L}$ and build a robust and generalizable model for a target population (denoted as $\mathbb{Q}$). This problem is also referred to as the multi-source transfer learning in the literature \citep[e.g.]{yao2010boosting,ding2016incomplete}. In transfer learning, due to the labeling cost, there are often no or very limited outcome labels for the target population \citep{pan2009survey, zhuang2020comprehensive}. Throughout this paper, we focus on the challenging setting that the target population only has covariate observations but no outcome observations. We introduce the covariate shift maximin effect as the robust and generalizable model.
 



 Our proposed maximin effect satisfies the critical group distributional robustness property: it has a robust predictive performance even if the target population is adversarially generated as any mixture of the multiple source populations. Particularly, for the $l$-th group with $1\leq l\leq L,$ we consider a high-dimensional regression model for the i.i.d. data $\{Y_i^{(l)}, X_i^{(l)}\}_{1\leq i\leq n_l},$ 
\begin{equation}
Y_i^{(l)}=[X^{(l)}_{i}]^{\intercal}b^{(l)}+\epsilon^{(l)}_i \quad \text{with}\quad b^{(l)}\in \mathbb{R}^{p}\quad \text{and}\quad \mathbf{E}(\epsilon^{(l)}_i\mid X^{(l)}_{i})=0.
\label{eq: multi-group model}
\end{equation}
We allow the distribution of $X^{(l)}_{i}$ to change with the group label $l$ and do not impose any similarity condition on the regression vectors $\{b^{(l)}\}_{1\leq l\leq L}.$ For any prediction model $\beta\in \mathbb{R}^{p}$, we define its adversarial reward concerning all observed groups in \eqref{eq: multi-group model} and the covariate distribution of the target population. This adversarial reward measures a model's worst predictive performance if the conditional outcome distribution of the target population follows any of the $L$ outcome models in \eqref{eq: multi-group model}. Our proposed covariate shift maximin effect $\beta^{*}(\mathbb{Q})\in \mathbb{R}^{p}$ is defined to optimize this adversarial reward; see its definition in \eqref{eq: maximin general shift}. 

When there are no outcome observations for the target population, most transfer learning methods rely on the assumption that the source and target populations share a similar conditional outcome distribution \citep{zhuang2020comprehensive,pan2009survey}. In contrast, our transfer learning framework does not require such stringent model assumptions but leverages the multi-source data to construct a robust model. 

The covariate shift maximin effect generalizes the maximin effect \citep{meinshausen2015maximin} by allowing for covariate shift between the target and multiple source populations. The allowance for covariate shift is important for constructing group distributionally robust models in multi-source transfer learning \citep{sagawa2019distributionally, hu2018does}; see Section \ref{sec: DRO Perspective} for details. In addition, it accommodates the applications to minimax group fairness \citep{martinez2020minimax,diana2021minimax} and maximin projection \citep{shi2018maximin}; see the detailed discussions in Sections \ref{sec: minimax fairness} and \ref{sec: maximin proj} in the supplement. 



The maximin effect captures the homogeneous components of $\{b^{(l)}\}_{1\leq l\leq L}$ \citep{meinshausen2015maximin}. Particularly, for $1\leq j\leq p$, if the regression coefficients $\{b^{(l)}_j\}_{1\leq l\leq L}$ are non-zero and share the same sign, then the maximin effect of the $j$-th variable is significant with $\beta^{*}_j(\mathbb{Q})\neq 0$. If the signs of $\{b^{(l)}_j\}_{1\leq l\leq L}$ vary or some of $\{b^{(l)}_j\}_{1\leq l\leq L}$ are close to zero, the maximin effect $\beta^{*}_j(\mathbb{Q})$ is generally not significant. The maximin effect is instrumental in identifying important variables whose effects are of the homogeneous sign under different environments. In Section \ref{sec: real data}, we demonstrate this important interpretation in the yeast genomic data and provide the evidence for the ``KRE33" gene being a vital gene, which has stable effects on the colony growth across different media \citep{sharma2015yeast,cherry2012saccharomyces}. As observed in Figure \ref{fig: real-data}, even though certain SNP has a significant effect in a single medium, the maximin effect of this SNP can be insignificant, which happens if this SNP has an opposite effect or near null effect in other media. 

Despite its importance, there is a lack of inference methods for covariate shift maximin effects, including the construction of confidence interval (CI) and hypothesis testing. In this paper, we point out that inference for the maximin effect is a non-standard inference problem and devise a novel sampling inference method effective for non-standard problems. 

\subsection{Our Results and Contribution}

There are distinct inference challenges for maximin effects, which appear in low and high dimensions. The covariate shift maximin effect belongs to the convex cone of the regression vectors $\{b^{(l)}\}_{1\leq l\leq L}$. The convex combination weights are simultaneously determined by $\{b^{(l)}\}_{1\leq l\leq L}$ and the covariance matrix of the target covariate distribution. As shown in the following Section \ref{sec: maximin challenge}, the limiting distribution of the weight estimator is non-standard in settings with non-regularity and instability. Consequently, the limiting distribution of the maximin effect estimator is not necessarily normal, and we cannot construct CIs for the maximin effects directly based on the asymptotic normality.


To address this, we propose a DenseNet sampling procedure to construct CIs for the linear combination of the coefficients of the high-dimensional maximin effect. The main novelty is to use the sampling method to quantify the uncertainty of the weight estimation. The intuition of our proposed DenseNet sampling is as follows: if we carefully sample a large number of weight vectors near the estimated weight, there exists at least one sampled weight vector approaching the true weight vector at a rate faster than $1/\sqrt{n}.$ 
We provide a rigorous statement of this sampling property in Theorem \ref{thm: sampling accuracy}. 
 Our proposed CI is shown to achieve the desired coverage level and attain the $1/\sqrt{n}$ length.  


We conduct a large-scale simulation to evaluate the finite-sample performance. In the challenging scenarios with non-regularity and instability, our proposed CI achieves the desired coverage while the CI assuming asymptotic normality is under-coverage; see Section \ref{sec: instability simulation}. In Section \ref{sec: non-regularity challenge} in the supplement, simulation results show that neither subsampling nor bootstrap provides valid inference for the maximin effect in the presence of non-regularity or instability. 


To summarize, the contributions of the current paper are three-fold, 
\vspace{-2mm}
\begin{enumerate}
\item We introduce the covariate shift maximin effect as a general robust model with applications to group distributional robustness, minimax fairness, and maximin projections. 
\vspace{-9mm}
\item We propose a novel sampling approach to make inferences for the maximin effect in high dimensions. 
The DenseNet sampling method is useful for addressing other non-regular or non-standard inference problems. 
\vspace{-2mm}
\item We establish the sampling property in Theorem \ref{thm: sampling accuracy} and characterize the dependence of sampling accuracy on the sampling size. The theoretical argument is new and can be of independent interest for studying other sampling methods.
\end{enumerate}


\subsection{Related Works}

The construction of group distributionally robust models has been investigated in \citet{meinshausen2015maximin, buhlmann2015magging, sagawa2019distributionally, hu2018does}. The focus of these works was on estimation instead of the CI construction. Furthermore, \cite{rothenhausler2016confidence} constructed CIs for the maximin effect in low dimensions, relying on asymptotic normality of the maximin effect estimator. In contrast, we point out in Section \ref{sec: maximin challenge} that the maximin effect estimators are not necessarily asymptotically normal in the presence of non-regularity or instability. The simulation results in Section \ref{sec: instability simulation} illustrate that CIs based on asymptotic normality are under-coverage.


Inference for the shared component of regression functions was considered under multiple high-dimensional linear models \citep{liu2020integrative} and partially linear models \citep{zhao2016partially}. As a significant difference, our proposed method does not require $\{b^{(l)}\}_{1\leq l\leq L}$ in \eqref{eq: multi-group model} to share any similarity, and our model is more flexible in modeling the heterogeneity of multi-source data. \cite{peters2016causal,rothenhausler2018anchor,arjovsky2019invariant} constructed models satisfying certain invariance principles by analyzing the heterogeneous data. Distributional robustness without the pre-specified group structure has been studied in \cite{gao2017wasserstein,sinha2017certifying} by minimizing a worst-case over a class of distributions. 


Inference for the regression coefficients in a single high-dimensional linear model was actively investigated in the recent decade
\citep{zhang2014confidence,van2014asymptotically,javanmard2014confidence,belloni2014inference,chernozhukov2015valid,farrell2015robust,chernozhukov2018double}. Inference for linear functionals of the high-dimensional regression vector was studied in \cite{cai2015regci,athey2018approximate,zhu2018linear,cai2019individualized}. Inference for the maximin effect creates additional challenges as discussed in Section \ref{sec: maximin challenge} and requires novel methods and theories to address these challenges.

Sampling methods have a long history in statistics, such as, bootstrap \citep{efron1979bootstrap,efron1994introduction}, subsampling \citep{politis1999subsampling}, generalized fiducial inference \citep{Zabell1992,Xie2013,Hannig2016} and repro sampling \citep{wang2020repro}. 
In contrast, instead of directly sampling from the original data, we sample the estimator of the regression covariance matrix, which makes our proposed sampling method computationally efficient; see Remark \ref{rem: computational efficiency}. 

\noindent{\bf Paper Organization.} In Section \ref{sec: definition}, we introduce the covariate shift maximin effect and the inference challenges. Our proposed method is detailed in Section \ref{sec: method} and the theoretical justification is provided in Section \ref{sec: theory}. In Section \ref{sec: ridge-type}, we discuss the stability issue. In Sections \ref{sec: sim} and \ref{sec: real data}, we investigate the numerical performance of our proposed method on simulated and genomic data sets, respectively. We provide conclusion and discussion in Section \ref{sec: discussion}.



\noindent {\bf Notations.} Define $n=\min_{1\leq l\leq L}\{n_{l}\}.$ 
Let $[p]=\{1,2,\ldots,p\}$. For a set $S$, $\left|S\right|$ denotes the cardinality of $S$ and $S^{c}$ denotes its complement. For a vector $x\in \mathbb{R}^{p}$ and a subset $S\subset[p]$, $x_{S}$ is the sub-vector of $x$ with indices in $S$ and $x_{-S}$ is the sub-vector with indices in $S^{c}$. The $\ell_q$ norm of a vector $x$ is defined as $\|x\|_{q}=\left(\sum_{l=1}^{p}|x_l|^q\right)^{\frac{1}{q}}$ for $q \geq 0$ with $\|x\|_0=\left|\{1\leq l\leq p: x_l \neq 0\}\right|$ and $\|x\|_{\infty}=\max_{1\leq l \leq p}|x_l|$. For a matrix $X$, $X_{i}$ and $X_{\cdot, j}$ are used to denote its $i$-th row and $j$-th column, respectively; for index sets $S_1$ and $S_2$, $X_{S_1,S_2}$ denotes the sub-matrix of $X$ with row and column indices belonging to $S_1$ and $S_2,$ respectively; $X_{S_1}$ denotes the sub-matrix of $X$ with row indices belonging to $S_1.$ Let $X_{i}\widesim{\rm i.i.d.}\mathbb{Q}$ for $1\leq i\leq n$ denote that the sequence random vectors $\{X_{i}\}_{1\leq i\leq n}$ are i.i.d. following the distribution $\mathbb{Q}.$ 
 We use $c$ and $C$ to denote generic positive constants that may vary from place to place.
For two positive sequences $a_n$ and $b_n$, $a_n \lesssim b_n$ means that $\exists C > 0$ such that $a_n \leq C b_n$ for all $n$;
$a_n \asymp b_n $ if $a_n \lesssim b_n$ and $b_n \lesssim a_n$, and $a_n \ll b_n$ if $\limsup_{n\rightarrow\infty} {a_n}/{b_n}=0$. For a matrix $A$, we use $\|A\|_{F}$, $\|A\|_2$ and $\|A\|_{\infty}$ to denote its Frobenius norm, spectral norm and element-wise maximum norm, respectively. For a symmetric matrix $A\in \mathbb{R}^{L\times L}$ with eigen-decomposition $A=U\Lambda U^{\intercal}$, we use $\lambda_{\max}(A)$ and $\lambda_{\min}(A)$ to denote its maximum and minimum eigenvalues, respectively; define $A_{+}=U\Lambda_{+} U^{\intercal}$ and $A^{1/2}=U\Lambda^{1/2} U^{\intercal}$ with $(\Lambda_{+})_{l,l}=\max\{\Lambda_{l,l},0\}$ and $(\Lambda^{1/2})_{l,l}=\sqrt{\Lambda_{l,l}}$ for $1\leq l\leq L.$ We use $A^{-1/2}$ to denote the inverse of $A^{1/2}.$
For a matrix $B$, we use $\lambda_{j}(B)$ to denote its $j$-th largest singular value. For a symmetric matrix $D\in \mathbb{R}^{L\times L}$, we use ${\rm vecl}(D)\in \mathbb{R}^{L(L+1)/2}$ to denote the long vector which stacks the columns of the lower triangle part of $D$. Define $\mathcal{I}_{L}=\{(l,k): 1\leq k\leq l\leq L\}$ as the index set of the lower triangular part of $D$ and $[L(L+1)/2]$ as the index set of ${\rm vecl}(D).$ We define the one-to-one index mapping $\pi$ from $\mathcal{I}_{L}$ to $[L(L+1)/2]$ as 
\begin{equation}
\pi(l,k)=\frac{(2L-k)(k-1)}{2}+l \quad \text{for} \quad (l,k)\in \mathcal{I}_{L}\coloneqq\{(l,k): 1\leq k\leq l\leq L\}. 
\label{eq: index map}
\end{equation}
For $(l,k)\in \mathcal{I}_{L},$ we have
$[{\rm vecl}(D)]_{\pi(l,k)}=D_{l,k}.$ 

\section{Maximin Effects: Definition, Identification and Challenges} 
\label{sec: definition}

In Section \ref{sec: DRO Perspective}, we motivate the covariate shift maximin effect in the multi-source transfer learning framework. In Section \ref{sec: identification}, we present the identification and interpretation of the maximin effect. In Section \ref{sec: maximin challenge}, we discuss the inference challenges for the maximin effect.
\subsection{Multi-source Transfer Learning: Group Distributional Robustness}
\label{sec: DRO Perspective}
We consider $L$ groups of training data $\{(Y^{(l)}, X^{(l)})\}_{1\leq l\leq L}$, which are generated from multiple source populations. The heterogeneity among these training data sets may occur if they are collected under different environments, e.g., the data sets from different healthcare centers. We aim to build a robust prediction model for a target population (e.g., a new healthcare center) by leveraging the multi-source training data sets. 

We first introduce the setup for the multi-source transfer learning problem. For the $l$-th group of data $\{X^{(l)}_{i}, Y^{(l)}_{i}\}_{1\leq i\leq n_l}$ with $1\leq l\leq L$, let $\mathbb{P}^{(l)}_{X}$ denote the distribution of $X^{(l)}_{i}\in \mathbb{R}^{p}$ and $\mathbb{P}^{(l)}_{Y|X}$ denote the conditional distribution of the outcome $Y^{(l)}_{i}$ given $X^{(l)}_{i}.$ We write 
\begin{equation}
X^{(l)}_{i}{\widesim{\rm i.i.d.}} \mathbb{P}^{(l)}_{X}, \quad Y^{(l)}_{i}\mid X^{(l)}_{i}{\widesim{\rm i.i.d.}} \mathbb{P}^{(l)}_{Y|X}\quad \text{for} \quad 1\leq i\leq n_l.
\label{eq: source data no shift}
\end{equation}
For the test data $\{X^{\mathbb{Q}}_{i},Y^{\mathbb{Q}}_{i}\}_{1\leq i\leq N_{\mathbb{Q}}},$ we consider the target population, 
\begin{equation}
X^{\mathbb{Q}}_{i}{\widesim{\rm i.i.d.}} \mathbb{Q}_{X}, \quad Y^{\mathbb{Q}}_{i}\mid X^{\mathbb{Q}}_{i}{\widesim{\rm i.i.d.}} \mathbb{Q}_{Y|X}\quad \text{for} \quad 1\leq i\leq N_{\mathbb{Q}},
\label{eq: target data no shift}
\end{equation}
with $\mathbb{Q}_{X}$ and $\mathbb{Q}_{Y|X}$ denoting the covariate distribution and the conditional outcome model of the target population, respectively. We focus on the setting without any labelled test data, that is, only $\{X^{\mathbb{Q}}_{i}\}_{1\leq i\leq N_{\mathbb{Q}}}$ are observed but $\{Y^{\mathbb{Q}}_{i}\}_{1\leq i\leq N_{\mathbb{Q}}}$ are missing. This is commonly encountered in transfer learning applications, where the labels for the target population are hard to obtain \citep{zhuang2020comprehensive,pan2009survey}. 

In transfer learning, the covariate shift between the source and target populations commonly exists \citep{zhuang2020comprehensive,pan2009survey}. For example, the new healthcare center is likely to have a different covariate distribution from existing healthcare centers, where the training data sets were collected. To better accommodate this, we allow the target covariate distribution $\mathbb{Q}_{X}$ to be different from any of $\{\mathbb{P}^{(l)}_{X}\}_{1\leq l\leq L}.$
In addition, the target conditional outcome model $\mathbb{Q}_{Y|X}$ might also be different from any of $\{\mathbb{P}^{(l)}_{Y|X}\}_{1\leq l\leq L}$. We assume that the conditional outcome model $\mathbb{Q}_{Y|X}$ is a mixture of $\{\mathbb{P}^{(l)}_{Y|X}\}_{1\leq l\leq L},$
\begin{equation}
\mathbb{Q}_{Y|X}=\sum_{l=1}^{L} q^*_l \cdot \mathbb{P}^{(l)}_{Y|X}, \quad \text{with}\quad q^*\in \Delta_{L}:=\left\{q\in \mathbb{R}^{L}:\sum_{l=1}^{L}q_{l}=1, \min_{1\leq l\leq L}q_l\geq 0\right\}. 
\label{eq: mixture distribution}
\end{equation}
As a special case, if $q^*_l=1$ and $q^{*}_j=0$ for $j\neq l$, the conditional outcome model $\mathbb{Q}_{Y|X}$ for the target population is the same as the outcome model $\mathbb{P}^{(l)}_{Y|X}$ for the $l$-th source population.  

We motivate the maximin effect concept from the construction of a group distributionally robust model \citep{sagawa2019distributionally,hu2018does}. Since the weight vector $q^{*}\in \mathbb{R}^{L}$ in \eqref{eq: mixture distribution} is not identifiable with the unlabelled test data, the target distribution can be any mixture of the $L$ source populations. We shall fit a model such that it has a reasonable predictive performance for any such target population. We define a class of joint distributions on $(X_{i}^{\mathbb{Q}},Y_i^{\mathbb{Q}})$ as,
\begin{equation}
\mathcal{C}(\mathbb{Q}_{X})=\left\{\mathbb{T}=(\mathbb{Q}_{X}, \mathbb{T}_{Y|X}): \mathbb{T}_{Y|X}=\sum_{l=1}^{L} q_l \cdot \mathbb{P}^{(l)}_{Y|X} \;\;\; \text{with}\;\;\; q\in \Delta_{L} \right\},
\label{eq: distribution class shift}
\end{equation}
where $\Delta_{L}$ is defined in \eqref{eq: mixture distribution}. The distribution class $\mathcal{C}(\mathbb{Q}_{X})$ contains the true distribution $\mathbb{Q}=(\mathbb{Q}_{X}, \mathbb{Q}_{Y|X})$ of the target population, which is not identifiable with the unlabelled test data. In the definition \eqref{eq: distribution class shift}, the covariate distribution of the class $\mathcal{C}(\mathbb{Q}_{X})$ is fixed at $\mathbb{Q}_{X}$ since $\mathbb{Q}_{X}$ is identifiable with the covariate data $\{X^{\mathbb{Q}}_{i}\}_{1\leq i\leq N_{\mathbb{Q}}};$ the conditional outcome model of the class $\mathcal{C}(\mathbb{Q}_{X})$ contains any mixture of $\{\mathbb{P}^{(l)}_{Y|X}\}_{1\leq l\leq L}$, including the true conditional outcome model $\mathbb{Q}_{Y|X}$ for the target population and $\{\mathbb{P}^{(l)}_{Y|X}\}_{1\leq l\leq L}$ for $L$ source populations. 



We propose to optimize the worst-case reward defined with respect to the class $\mathcal{C}(\mathbb{Q}_{X})$ and introduce a group distributionally robust optimization problem as  
 \begin{equation}
\beta^{*}(\mathbb{Q}):=\argmax_{\beta\in \mathbb{R}^{p}}R_{\mathbb{Q}}(\beta) \quad \text{with}\quad R_{\mathbb{Q}}(\beta)=\min_{\mathbb{T}\in \mathcal{C}(\mathbb{Q}_{X})} \left\{\mathbf{E}_{\mathbb{T}} Y_i^2-\mathbf{E}_{\mathbb{T}}(Y_i-X_i^{\intercal}\beta)^2\right\},
\label{eq: maximin general shift}
\end{equation}
where $\mathcal{C}(\mathbb{Q}_{X})$ is defined in \eqref{eq: distribution class shift} and $\mathbf{E}_{\mathbb{T}}$ denotes the expectation taken with respect to the distribution $\mathbb{T}$ belonging to $\mathcal{C}(\mathbb{Q}_{X}).$ For any model $\beta \in \mathbb{R}^{p}$, the reward function $\mathbf{E}_{\mathbb{T}} Y_i^2-\mathbf{E}_{\mathbb{T}}(Y_i-X_i^{\intercal}\beta)^2$ measures the variance explained by $\beta$ for the test data $\{X_i, Y_i\} \sim \mathbb{T}$. By taking the minimum with respect to the distribution $\mathbb{T}$, $\min_{\mathbb{T}\in \mathcal{C}(\mathbb{Q}_{X})} \left\{\mathbf{E}_{\mathbb{T}} Y_i^2-\mathbf{E}_{\mathbb{T}}(Y_i-X_i^{\intercal}\beta)^2\right\}$ denotes the adversarial reward among the class $\mathcal{C}(\mathbb{Q}_{X})$. The optimizer $\beta^{*}(\mathbb{Q})$ defined in \eqref{eq: maximin general shift} optimizes this adversarial reward. We refer to $\beta^{*}(\mathbb{Q})$ as the covariate shift maximin effect. 

The covariate shift maximin effect $\beta^{*}(\mathbb{Q})$ can be interpreted as the robust linear model guaranteeing an excellent predictive performance even when the target population is adversarially generated from the class $\mathcal{C}(\mathbb{Q}_{X}).$ We further interpret its robustness from the perspective of a two-side game: we select a model $\beta$, and the counter agent generates the adversarial target population by taking a mixture of $L$ conditional outcome models in \eqref{eq: multi-group model}. $\beta^{*}(\mathbb{Q})$ guarantees the optimal prediction accuracy for such an adversarial target population. An equivalent definition of $\beta^{*}(\mathbb{Q})$ is presented in Section \ref{sec: equi} in the supplement.


As a special case, we consider the no covariate shift setting with $\mathbb{P}_{X}$ denoting the shared covariate distribution, that is $\mathbb{P}^{(l)}_{X}=\mathbb{P}_{X}$ for $1\leq l\leq L$ and $\mathbb{Q}_{X}=\mathbb{P}_{X}$. We simplify $\beta^{*}(\mathbb{Q})$ in \eqref{eq: maximin general shift} as 
$
\beta^{*}:=\argmax_{\beta\in \mathbb{R}^{p}}\min_{\mathbb{T}\in \mathcal{C}(\mathbb{P}_{X})} \left\{\mathbf{E}_{\mathbb{T}} Y_i^2-\mathbf{E}_{\mathbb{T}}(Y_i-X_i^{\intercal}\beta)^2\right\},
$
where $\mathcal{C}(\mathbb{P}_{X})$ is defined in \eqref{eq: distribution class shift} with $\mathbb{Q}_{X}=\mathbb{P}_{X.}$
The no covariate shift maximin effect $\beta^{*}$ is equivalent to the maximin effect introduced in \citet{meinshausen2015maximin}, 
\begin{equation*}
\beta^{*}\coloneqq\argmax_{\beta\in \mathbb{R}^{p}} R(\beta) \quad \text{with} \quad R(\beta)=\min_{1\leq l\leq L} \left\{\mathbf{E} (Y^{(l)}_i)^2-\mathbf{E}(Y^{(l)}_i-[X^{(l)}_i]^{\intercal}\beta)^2\right\}.
\label{eq: def of maximin}
\end{equation*}
See its proof in Section \ref{sec: maximin discussion} in the supplement. The maximin effect in \eqref{eq: maximin general shift} can be expressed as an equivalent minimax estimator $\beta^{*}(\mathbb{Q}):=\arg\min_{\beta\in \mathbb{R}^{p}}\max_{\mathbb{T}\in \mathcal{C}(\mathbb{Q}_{X})} \left\{\mathbf{E}_{\mathbb{T}} \ell(Y_i, X_i^{\intercal}\beta)\right\}$ with $\ell(Y_i, X_i^{\intercal} \beta)=(Y_i-X_i^{\intercal}\beta)^2- Y_i^2$,
which is in the form of the group distributionally robust optimization \citep{sagawa2019distributionally, hu2018does}. 

\begin{Remark}\rm
\citet{li2020transfer,tian2021transfer} focused on multi-source transfer learning with access to outcome labels for the target population. Our current paper focuses on a fundamentally different setting. Since the target population has no outcome labels, we cannot identify its outcome model but focus on the group distributional robust model. 
\end{Remark}

\begin{Remark}\rm
The definition of $\beta^{*}(\mathbb{Q})$ incorporates two types of heterogeneity: covariate shift between the source and target populations. The conditional outcome distribution for the target population is a mixture of those for the source populations. Under our framework, the target conditional distribution $\mathbb{Q}_{Y|X}$ in \eqref{eq: target data no shift} is allowed to be different from any of $\{\mathbb{P}^{(l)}_{Y|X}\}_{1\leq l\leq L}.$ 
\end{Remark} 
\subsection{Identification and Interpretation of $\beta^{*}(\mathbb{Q})$}
\label{sec: identification}
We now present the identification of $\beta^{*}(\mathbb{Q})$ in \eqref{eq: maximin general shift} and focus on linear conditional expectation models for the source populations,  
\begin{equation}
\mathbf{E}(Y_i^{(l)}\mid X^{(l)}_{i})=[X^{(l)}_{i}]^{\intercal}b^{(l)},\quad \text{for}\quad 1\leq l\leq L, \; 1\leq i\leq n_l.
\label{eq: conditional mean linear}
\end{equation}
The model \eqref{eq: conditional mean linear} can be extended to handle non-linear conditional expectation if $X^{(l)}_{i}$ contains the basis transformation of the observed covariates.  
Under \eqref{eq: conditional mean linear}, we simplify \eqref{eq: maximin general shift} as
\begin{equation}
\begin{aligned}
\beta^{*}(\mathbb{Q})=\argmax_{\beta\in \mathbb{R}^{p}} R_{\mathbb{Q}}(\beta) \quad \text{with} \quad R_{\mathbb{Q}}(\beta)=\min_{b\in {\mathbb{B}}} \left[2 b^{\intercal}\Sigma^{\mathbb{Q}}\beta- \beta^{\intercal}\Sigma^{\mathbb{Q}} \beta\right],
\end{aligned}
\label{eq: general maximin}
\end{equation}
where $\mathbb{B}=\{b^{(1)},\ldots, b^{(L)}\}$ denotes the set of $L$ regression vectors and $\Sigma^{\mathbb{Q}}=\mathbf{E} X_{1}^{\mathbb{Q}} (X_{1}^{\mathbb{Q}})^{\intercal}.$ See its proof in Section \ref{sec: maximin discussion} in the supplement. 

The following proposition shows how to identify the maximin effect $\beta^{*}(\mathbb{Q}).$ 
\begin{Proposition} If
$\lambda_{\min}(\Sigma^{\mathbb{Q}})>0$, then $\beta^{*}(\mathbb{Q})$ defined in \eqref{eq: general maximin} is identified as
\begin{equation}
\beta^{*}(\mathbb{Q})=\sum_{l=1}^{L}[\gamma^{*}(\mathbb{Q})]_{l} b^{(l)} \quad \text{with}\quad \gamma^{*}(\mathbb{Q})\coloneqq \arg\min_{\gamma \in \Delta^{L}} \gamma^{\intercal}\Gamma^{\mathbb{Q}} \gamma
\label{eq: optimal weight}
\end{equation}
where $\Gamma_{lk}^{\mathbb{Q}}=(b^{(l)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k)}$ for $1\leq l,k \leq L$ and $\Delta^{L}=\{\gamma\in \mathbb{R}^{L}: \gamma_j\geq0,\; \sum_{j=1}^{L}\gamma_j=1\}$ is the simplex over $\mathbb{R}^{L}$. Furthermore, $\max_{\beta \in \mathbb{R}^{p}} \min_{b\in {\mathbb{B}}} \left[2 b^{\intercal}\Sigma^{\mathbb{Q}}\beta-\beta^{\intercal}\Sigma^{\mathbb{Q}}\beta\right]= [\beta^{*}(\mathbb{Q})]^{\intercal}\Sigma^{\mathbb{Q}}\beta^{*}(\mathbb{Q}).
$
\label{prop: identification}
\end{Proposition}
Proposition \ref{prop: identification} provides an explicit way of computing $\beta^{*}(\mathbb{Q})$ by firstly identifying $\{b^{(l)}\}_{1\leq l\leq L}$ and $\Gamma^{\mathbb{Q}}\in \mathbb{R}^{L\times L}$. 
Proposition \ref{prop: identification} generalizes Theorem 1 in \cite{meinshausen2015maximin}, which was focused on the no covariate shift setting. The covariate shift maximin effect $\beta^{*}(\mathbb{Q})$ is a convex combination of $\{b^{(l)}\}_{1\leq l\leq L}$ which is closest to the origin. Here, the distance measure depends on the covariance matrix $\Sigma^{\mathbb{Q}}$ for the target population. 


The maximin effect $\beta^{*}(\mathbb{Q})$ is not only a group distributionally robust model but is interpreted as the model capturing the shared effects of the heterogeneous vectors $\{b^{(l)}\}_{1\leq l\leq L}$; see Figure 1 and the related discussion in \citet{meinshausen2015maximin}. Particularly, for some $1\leq j\leq p,$ if the signs of $\{b^{(l)}_j\}_{1\leq l\leq L}$ are heterogeneous or some of $\{b^{(l)}_j\}_{1\leq l\leq L}$ are scattered around zero, the maximin effect $\beta^{*}_j(\mathbb{Q})$ is shrunken towards zero. If $\{b^{(l)}_j\}_{1\leq l\leq L}$ are non-zero and of the same sign, the maximin effect is significant with $\beta^{*}_j(\mathbb{Q})\neq 0$. We further demonstrate this interpretation in our real data analysis in Section \ref{sec: real data}; see Figure \ref{fig: real-data}.

The maximin significance test $H_{0,j}:\beta^{*}_j(\mathbb{Q})= 0$ for $1\leq j\leq p$ is of great importance for both scientific discovery and the construction of robust prediction model. The maximin significance indicates that the effect of the $j$-th covariate is homogeneously positive or negative across different environments. This indicates that the $j$-th covariate is likely to have a similar effect for a new environment, and the effect of the $j$-th variable might have some causal interpretation. In addition, the non-zero maximin effect suggests that it would be helpful to include the $j$-th covariate in the prediction model for the target population. 


Statistical inference for a linear combination of the maximin effect is well motivated from constructing optimal treatment regime with heterogeneous training data \citep{shi2018maximin}. With $x_{\rm new}$ denoting a future covariate observation, the sign of $x_{\rm new}^{\intercal}\beta^{*}(\mathbb{Q})$ is instrumental in designing the optimal treatment regime, which motivates the hypothesis testing problem $H_0: x_{\rm new}^{\intercal}\beta^{*}(\mathbb{Q})<0$ for any $x_{\rm new}\in \mathbb{R}^{p}.$ See more details in Section \ref{sec: maximin proj} in the supplement.

\begin{Remark} \rm
In the covariate shift setting, a collection of works \citep[e.g.]{tsuboi2009direct, shimodaira2000improving,sugiyama2007covariate} were focused on the misspecified conditional outcome models. In contrast, we focus on the correctly specified conditional outcome model \eqref{eq: conditional mean linear}. Consequently, the best linear approximation $\{b^{(l)}\}_{1\leq l\leq L}$ does not change with the target population $\mathbb{Q}_{X}$. However, the maximin effect $\beta^{*}(\mathbb{Q})$ changes with the target population since the weight $\gamma^{*}(\mathbb{Q})$ is determined by the target covariate distribution $\mathbb{Q}_{X}$. \end{Remark}

\subsection{Statistical Inference Challenges: Non-regularity and Instability}
\label{sec: maximin challenge}
The inference challenges arise from the fact that estimators of $\gamma^{*}(\mathbb{Q})$ and $\beta^{*}(\mathbb{Q})$ may have a non-standard limiting distribution. To demonstrate the challenges, we consider the special case $L=2$ and $n_1=n_2=n$. The optimal weight is $\gamma^{*}(\mathbb{Q})=(\gamma^{*}_1,1-\gamma^{*}_1)^{\intercal}$ with
 \begin{equation}
\gamma^{*}_1=\min\left\{\max\left\{\frac{\Gamma^{\mathbb{Q}}_{22}-\Gamma^{\mathbb{Q}}_{12}}{\Gamma^{\mathbb{Q}}_{11}+\Gamma^{\mathbb{Q}}_{22}-2\Gamma^{\mathbb{Q}}_{12}},0\right\},1\right\}.
\label{eq: true value}
\end{equation}
With $\widehat{\Gamma}^{\mathbb{Q}}$ defined in the following equation \eqref{eq: cov est general}, we estimate $\gamma^{*}_1$ by 
$
\widehat{\gamma}_1=\min\left\{\max\left\{\bar{\gamma}_1,0\right\},1\right\}$ where $\bar{\gamma}_1=\frac{\widehat{\Gamma}^{\mathbb{Q}}_{22}-\widehat{\Gamma}^{\mathbb{Q}}_{12}}{\widehat{\Gamma}^{\mathbb{Q}}_{11}+\widehat{\Gamma}^{\mathbb{Q}}_{22}-2\widehat{\Gamma}^{\mathbb{Q}}_{12}}$. We illustrate two settings where $\widehat{\gamma}_1$ may not have a standard limiting distribution even if $\widehat{\Gamma}^{\mathbb{Q}}$ is unbiased and asymptotically normal. 

The first is the non-regularity setting due to the boundary effect. Specifically, the estimation error $\widehat{\gamma}_1-\gamma^{*}_1$ is decomposed as a mixture distribution,
\begin{equation*}
\sqrt{n}(\bar{\gamma}_1-{\gamma}^{*}_1)\cdot {\bf 1}\{0<\bar{\gamma}_1<1\}+ (-\sqrt{n}{\gamma}^{*}_1)\cdot {\bf 1}\{\bar{\gamma}_1\leq 0\}+ \sqrt{n}(1-{\gamma}^{*}_1)\cdot {\bf 1}\{\bar{\gamma}_1\geq 1\},
\end{equation*}
where the last two terms appear due to the boundary constraint $0\leq \gamma^*_1\leq 1.$ When $\left|(b^{(1)}-b^{(2)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(2)}\right| = c/{\sqrt{n}}$
 for some $c>0,$ then ${\gamma}^{*}_1={\gamma}^{*}_1(n,p)\asymp 1/\sqrt{n}$ and $\sqrt{n}(\widehat{\gamma}_1-{\gamma}^{*}_1)$ is likely a mixture of $\sqrt{n}(\bar{\gamma}_1-{\gamma}^{*}_1)$ and the point mass $-\sqrt{n}{\gamma}^{*}_1.$ 
 It is well known that boundary constraints lead to estimators with non-standard limiting distributions; see \cite{self1987asymptotic,andrews1999estimation,drton2009likelihood} and the references therein. Similarly, the boundary effect for the maximin effect leads to a non-standard distribution for the corresponding maximin effect estimator. Another challenge is the instability, which occurs when some of $\{b^{(l)}\}_{1\leq l\leq L}$ are similar to each other. For $L=2,$ if $b^{(1)}\approx b^{(2)}$, then $\Gamma^{\mathbb{Q}}_{11}+\Gamma^{\mathbb{Q}}_{22}-2\Gamma^{\mathbb{Q}}_{12}$ in \eqref{eq: true value} is close to zero. It is hard to accurately estimate $\gamma^*_1$ since a small error in estimating $\Gamma^{\mathbb{Q}}_{11}+\Gamma^{\mathbb{Q}}_{22}-2\Gamma^{\mathbb{Q}}_{12}$ may lead to a large error of estimating $\gamma^*_1.$ 
As illustrated in Figure \ref{fig: hist oracle}, both non-regularity and instability lead to a non-standard limiting distribution of the maximin estimator, which results in the under-coverage of CIs assuming the asymptotic normality; see the numerical illustration in Section \ref{sec: instability simulation}.


For non-regular settings due to the boundary effect, inference methods based on asymptotic normality or bootstrap fail to work \citep[e.g.]{andrews2000inconsistency}. In Section \ref{sec: non-regularity challenge} in the supplement, we illustrate that even for the low-dimensional setting, neither $m$ out of $n$ bootstrap nor subsampling provides valid inference for the maximin effect in the presence of non-regularity or instability.



To address the inference challenges, we shall devise a novel sampling approach in Section \ref{sec: method}, which is a valid inference procedure even in the presence of non-regularity or instability. 
 


\section{The DenseNet Sampling Method}
\label{sec: method}
In Section \ref{sec: estimation}, we discuss the estimation of $x_{\rm new}^{\intercal}\beta^{*}(\mathbb{Q})$ for any $x_{\rm new}\in \mathbb{R}^{p}$. In Section \ref{sec: sampling method}, we devise a sampling method and construct the CI for $x_{\rm new}^{\intercal}\beta^{*}(\mathbb{Q})$.  
When there is no confusion, we will omit the dependence on $\mathbb{Q}$ and write $\Gamma^{\mathbb{Q}}, \widehat{\Gamma}^{\mathbb{Q}}, \beta^{*}(\mathbb{Q}),\gamma^{*}(\mathbb{Q})$ as $\Gamma, \widehat{\Gamma}, \beta^{*},\gamma^{*}$, respectively.


\subsection{Estimation of $x_{\rm new}^{\intercal}\beta^{*}$}
\label{sec: estimation}

To estimate $x_{\rm new}^{\intercal}\beta^{*}$, we construct debiased estimators of $\{x_{\rm new}^{\intercal}b^{(l)}\}_{1\leq l\leq L}$ and estimate the aggregation weight $\gamma^{*}$ based on a debiased estimator of $\Gamma^{\mathbb{Q}}.$  
Specifically, for $1\leq l\leq L$, we follow \cite{cai2019individualized} and construct the debiased estimator of $x_{\rm new}^{\intercal}b^{(l)}$ as
\begin{equation}
\widehat{x_{\rm new}^{\intercal}b^{(l)}}=x_{\rm new}^{\intercal}\widehat{b}^{(l)}+[\widehat{v}^{(l)}]^{\intercal}\frac{1}{n_l}(X^{(l)})^{\intercal}(Y^{(l)}-X^{(l)}\widehat{b}^{(l)}),
\label{eq: linear separate}
\end{equation}
where $\widehat{b}^{(l)}$ is the Lasso estimator based on $(X^{(l)},Y^{(l)})$ and $\widehat{v}^{(l)}\in \mathbb{R}^{p}$ is constructed as 
\begin{equation}
\begin{aligned}
\widehat{v}^{(l)}=\arg\min_{v\in \mathbb{R}^{p}} v^{\intercal}\frac{1}{n_l}(X^{(l)})^{\intercal}X^{(l)} v \quad \text{s.t.} \quad \max_{w\in \mathcal{F}(x_{\rm new})}\left|\langle w, \frac{1}{n_l}(X^{(l)})^{\intercal}X^{(l)} v-x_{\rm new}\rangle\right|\leq \eta_{l}& \\
\quad \|X^{(l)} v\|_{\infty}\leq \|x_{\rm new}\|_2\tau_l&
\end{aligned}
\label{eq: projection}
\end{equation}
with $\mathcal{F}(x_{\rm new})=\{e_1,\cdots, e_{p}, x_{\rm new}/\|x_{\rm new}\|_2\}$, $\eta_{l} \asymp \|x_{\rm new}\|_2\sqrt{{\log p}/{n_l}}$, and $\tau_l\asymp \sqrt{\log n_l}.$
If $x_{\rm new}$ is taken as the j-th Euclidean basis, $\widehat{x_{\rm new}^{\intercal}b^{(l)}}$ is reduced to the debiased estimator proposed in \cite{zhang2014confidence,javanmard2014confidence}. $\widehat{x_{\rm new}^{\intercal}b^{(l)}}$ is shown to be asymptotically unbiased and normal in Corollary 5 in \cite{cai2019individualized}. 







In Section \ref{sec: Gamma method}, we propose a bias-corrected estimator $\widehat{\Gamma}^{\mathbb{Q}}$ in \eqref{eq: cov est general}, which is shown to satisfy \begin{equation}
{\rm vecl}(\widehat{\Gamma}^{\mathbb{Q}}-\Gamma^{\mathbb{Q}})\stackrel{d}{\approx}\mathcal{N}({\bf 0},\widehat{\bf V}),
\label{eq: theory dist}
\end{equation}
where ${\rm vecl}(\widehat{\Gamma}^{\mathbb{Q}}-\Gamma^{\mathbb{Q}})$ is the long vector which stacks the columns of the lower triangular part of $\widehat{\Gamma}^{\mathbb{Q}}-\Gamma^{\mathbb{Q}}$, $\stackrel{d}{\approx}$ stands for approximately equal in distribution and $\widehat{\bf V}$ is the estimated covariance matrix defined in the following equation \eqref{eq: cov est}. Then we estimate $\gamma^*$ by replacing $\Gamma^{\mathbb{Q}}$ in the definition $\gamma^*:=\arg\min_{\gamma\in \Delta^{L}}\gamma^{\intercal}\Gamma^{\mathbb{Q}}\gamma$ with $\widehat{\Gamma}^{\mathbb{Q}}.$ We construct the point estimator of $x_{\rm new}^{\intercal}\beta^{*}$ as \begin{equation}
\widehat{x_{\rm new}^{\intercal}\beta^{*}}=\sum_{l=1}^{L} \widehat{\gamma}_{l}\cdot \widehat{x_{\rm new}^{\intercal}b^{(l)}} \quad \text{with}\quad \widehat{\gamma}:=\arg\min_{\gamma\in \Delta^{L}} 
\gamma^{\intercal}\widehat{\Gamma}^{\mathbb{Q}} \gamma,
\label{eq: point estimator}
\end{equation}
where $\Delta^{L}$ is defined in \eqref{eq: mixture distribution}. 



To construct the CI for $x_{\rm new}^{\intercal}\beta^{*}$, we need to quantify the uncertainty of the estimators $\{\widehat{x_{\rm new}^{\intercal}b^{(l)}}\}_{1\leq l\leq L}$ and $\widehat{\gamma}$. The main challenge is on the uncertainty quantification of $\widehat{\gamma}$, which might not have a standard limiting distribution. We propose the DenseNet sampling to quantify the weight estimation uncertainty in the following subsection. 

\subsection{Inference for $x_{\rm new}^{\intercal}\beta^{*}$: The DenseNet Sampling}
\label{sec: sampling method}





The key idea of the DenseNet sampling is as follows: we carefully construct many sampled weight vectors near the point estimator $\widehat{\gamma}$ defined in \eqref{eq: point estimator}; our construction guarantees that at least one of these sampled weight vectors is nearly the same as the true weight vector $\gamma^{*}.$ Then, with this particular sampled weight vector, we only need to quantify the uncertainty due to the debiased Lasso estimators $\{\widehat{x_{\rm new}^{\intercal}b^{(l)}}\}_{1\leq l\leq L}$. The DenseNet sampling is instrumental in quantifying the uncertainty of $\widehat{\gamma},$ which might have a non-standard limiting distribution. 

We refer to our proposed method as DenseNet by its analogy to fishing with a dense net: if the net is dense enough and cast over a small area known to contain fish, there are high chances to catch at least one fish. We propose an efficient sampling method to build the dense fishing net, and the caught fish is $\gamma^*$.

We describe the DenseNet sampling via two steps: sampling and aggregation.





\vspace{-3mm}
\paragraph{Step 1: Sampling the weight vectors $\{\widehat{\gamma}^{[m]}\}_{1\leq m\leq M}.$} We sample $\{\widehat{\Gamma}^{[m]}\}_{1\leq m\leq M}$ such that $\widehat{\Gamma}^{[m]}-\widehat{\Gamma}^{\mathbb{Q}}$ approximately follows the asymptotic distribution $\mathcal{N}({\bf 0},\widehat{\bf V})$ in \eqref{eq: theory dist} and then construct the sampled weight vectors $\{\widehat{\gamma}^{[m]}\}_{1\leq m\leq M}$ by solving the optimization problem, 
\begin{equation}
\widehat{\gamma}^{[m]}=\arg\min_{\gamma\in \Delta^{L}} \gamma^{\intercal} \widehat{\Gamma}^{[m]}_{+} \gamma.
\label{eq: sample weight} 
\end{equation}
In the following, we provide the details on how to sample $\{\widehat{\Gamma}^{[m]}\}_{1\leq m\leq M}$. Conditioning on the observed data, we generate i.i.d. samples $\{S^{[m]}\}_{1\leq m\leq M}$ as
\begin{equation}
{S}^{[m]}\sim \mathcal{N}\left({\bf 0}, \widehat{{\bf V}}+{d_0}/{{n}}\cdot {\bf I}\right) \quad \text{with}\quad d_0=\max\left\{\tau_0\cdot \max_{(l,k)\in \mathcal{I}_{L}}\left\{n\cdot \widehat{{\bf V}}_{\pi(l,k),\pi(l,k)}\right\},1 \right\},
\label{eq: resampling}
\end{equation}
where $M$ is the sampling size (default set as $500$), $\tau_0>0$ is a positive tuning parameter (default set as $0.2$), and ${\bf I}$ is the identity matrix of the same dimension as $\widehat{{\bf V}}$ defined in \eqref{eq: cov est}. We construct the symmetric matrix $\widehat{\Gamma}^{[m]}\in \mathbb{R}^{L\times L}$ by specifying its lower triangular part as
\begin{equation}
\widehat{\Gamma}^{[m]}_{l,k}=\widehat{\Gamma}^{\mathbb{Q}}_{l,k}-S^{[m]}_{\pi(l,k)} \quad \text{for} \quad 1\leq k\leq l\leq L,
\label{eq: resampling Gamma}
\end{equation}
where the mapping $\pi$ is defined in \eqref{eq: index map}. 
The above construction guarantees that ${\rm vecl}(\widehat{\Gamma}^{[m]}-\widehat{\Gamma}^{\mathbb{Q}})$ follows the distribution $\mathcal{N}({\bf 0},\widehat{{\bf V}}+{d_0}/{{n}}\cdot {\bf I}).$


\vspace{-5mm}

\paragraph{Step 2: Aggregation.} We construct the CI by aggregating intervals constructed with the sampled weight vectors $\{\widehat{\gamma}^{[m]}\}_{1\leq m\leq M}$. For each $\widehat{\gamma}^{[m]}$, we first treat it as being fixed and construct an interval for $x_{\rm new}^{\intercal}\beta^{*}$ by only quantifying the uncertainty due to the debiased estimators $\{\widehat{x_{\rm new}^{\intercal}b^{(l)}}\}_{1\leq l\leq L}$ in \eqref{eq: linear separate}. We refer to such an interval as the sampled interval. We take a union of a collection of sampled intervals as our constructed CI.

 
In the following, we state the details for the aggregation step. 
 For $1\leq m\leq M$, we compute $
\widehat{x_{\rm new}^{\intercal}\beta}^{[m]}=\sum_{l=1}^{L} \widehat{\gamma}^{[m]}_{l}\cdot \widehat{x_{\rm new}^{\intercal}b^{(l)}},
$
and construct the sampled interval as,
\begin{equation}
{\rm Int}_{\alpha}^{[m]}(x_{\rm new})=\left(\widehat{x_{\rm new}^{\intercal}\beta}^{[m]}-(1+\eta_0)z_{\alpha/2} \widehat{{\rm se}}^{[m]}(x_{\rm new}), \widehat{x_{\rm new}^{\intercal}\beta}^{[m]}+(1+\eta_0)z_{\alpha/2} \widehat{{\rm se}}^{[m]}(x_{\rm new})\right),
\label{eq: sampled interval}
\end{equation}
where $\eta_0$ is any positive constant (with default value $0.01$), $z_{\alpha/2}$ is the upper $\alpha/2$ quantile of the standard normal distribution, and
$$
\widehat{\rm se}^{[m]}(x_{\rm new})=\sqrt{\sum_{l=1}^{L}({\widehat{\sigma}_{l}^2}/{n_l^2})\cdot [\widehat{\gamma}^{[m]}_{l}]^{2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}} \quad \text{with}\; \widehat{v}^{(l)} \;\text{defined in} \; \eqref{eq: projection}.
$$
The positive constant 
$\eta_0$ in \eqref{eq: sampled interval} is used to offset the finite-sample bias in high dimensions.



To aggregate the sampled intervals in \eqref{eq: sampled interval}, we introduce an index set $\mathbb{M}$ to exclude the samples near the boundary of the sampling distribution. Define
 \begin{equation}
\mathbb{M}=\left\{1\leq m\leq M: \max_{1\leq \pi(l,k)\leq L(L+1)/2}\left|\frac{{S}^{[m]}_{\pi(l,k)}}{\sqrt{\widehat{{\bf V}}_{\pi(l,k),\pi(l,k)}+d_0/n}}\right|\leq 1.1\cdot z_{\alpha_0/[L(L+1)]}\right\}
\label{eq: generating condition}
\end{equation}
where $z_{\alpha_0/[L(L+1)]}$ is the upper $\alpha_0/[L(L+1)]$ quantile of the standard normal distribution (default value $\alpha_0=0.01$). The index set $\mathbb{M}$ excludes the generated $S^{[m]}$ if any entry of $S^{[m]}$ is above certain threshold. We construct the CI for $x_{\rm new}^{\intercal}\beta^{*}$ by aggregating the sampled intervals with the index $m\in {\mathbb{M}}$,
\begin{equation}
{\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}\right)=\cup_{m\in \mathbb{M}} {\rm Int}_{\alpha}^{[m]}(x_{\rm new}),
\label{eq: aggregation 1}
\end{equation} 
where $\mathbb{M}$ is defined in \eqref{eq: generating condition} and ${\rm Int}_{\alpha}^{[m]}(x_{\rm new})$ is defined in \eqref{eq: sampled interval}. Regarding the null hypothesis $H_0: x_{\rm new}^{\intercal}\beta^{*}=0$, we propose the test $\phi_{\alpha}={\bf 1}\left(0\not\in {\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}\right)\right).$ If $x_{\rm new}$ is taken as the $j$-th Euclidean basis, we are testing the maximin significance of the $j$-th variable. 

Our proposed DenseNet sampling is also adequate for the low-dimensional setting; see the extension in Section \ref{sec: low-dim method} in the supplement.

As illustrated in Figure \ref{fig: sampling CI}, the red interval represents ${\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}\right)$, which takes a union of sampled intervals with indexes belonging to $\mathbb{M}$. Not all of $\{{\rm Int}_{\alpha}^{[m]}(x_{\rm new})\}_{m\in {\mathbb{M}}}$ cover $x_{\rm new}^{\intercal}\beta^{*}$ since the uncertainty of $\widehat{\gamma}^{[m]}$ is not quantified in the construction of ${\rm Int}_{\alpha}^{[m]}(x_{\rm new})$.
\begin{figure}[htp!]
\centering
\includegraphics[scale=0.55]{intervals-setting2}
\caption{Illustration of ${\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}\right)$ with $M=100$ (in red) for setting 2 in Section \ref{sec: additional simulation setting} in the supplement. The intervals in black denote ${\rm Int}_{\alpha}^{[m]}(x_{\rm new})$ for $m\in {\mathbb{M}}.$ The interval in blue is the normality CI in \eqref{eq: normality CI} with an oracle standard error computed by 500 simulations. The horizontal black dashed line represents the value of $x_{\rm new}^{\intercal}\beta^{*}.$}
\label{fig: sampling CI}
\end{figure}



We provide intuition for the DenseNet sampling method.
By \eqref{eq: resampling Gamma}, we write
\begin{equation*}
{\rm vecl}(\widehat{\Gamma}^{[m]})\stackrel{d}{\approx}{\rm vecl}({\Gamma}^{\mathbb{Q}})+{\rm vecl}(\widehat{\Gamma}^{\mathbb{Q}}-{\Gamma}^{\mathbb{Q}})-S^{[m]} \quad \text{for}\; 1\leq m\leq M.
\end{equation*} 
For a large $M$, there exists $m^*\in \mathbb{M}$ such that $S^{[m^*]}\approx{\rm vecl}(\widehat{\Gamma}^{\mathbb{Q}}-{\Gamma}^{\mathbb{Q}})$ and then $\widehat{\Gamma}^{[m^*]}$ is almost the same as $\Gamma^{\mathbb{Q}}$; see Theorem \ref{thm: sampling accuracy} for the exact argument. Consequently, the estimation error of $\widehat{\gamma}^{[m^{*}]}$ is smaller than the parametric rate and the sampled interval ${\rm Int}_{\alpha}^{[m^*]}(x_{\rm new})$ in \eqref{eq: sampled interval} is nearly a $1-\alpha$ confidence interval. The aggregation step in \eqref{eq: aggregation 1} is needed since we only know such $m^*$ exists with a high probability but cannot locate the exact $m^*.$  


We provide a few important remarks on our proposed sampling method.  
\begin{Remark}[Construction Details.] \rm 
In \eqref{eq: resampling}, we generate $S^{[m]}$ with the covariance matrix $\widehat{{\bf V}}+{d_0}/{{n}}\cdot {\bf I}$, which is slightly larger than $\widehat{{\bf V}}$. This enlargement ensures that $\widehat{{\bf V}}+{d_0}/{{n}}\cdot {\bf I}$ is positive definite even for a nearly singular $\widehat{{\bf V}}$ and the square-root of the enlarged variance dominates the bias of $\widehat{\Gamma}^{\mathbb{Q}}_{l,k}.$ In addition, we may replace the construction of $\mathbb{M}$ in \eqref{eq: generating condition} by
\begin{equation}
\mathbb{M}'=\left\{1\leq m\leq M: \|(\widehat{{\bf V}}+d_0/n\cdot {\bf I})^{-1/2}S^{[m]}\|_2^2 \leq 1.1\cdot \chi^2_{L(L+1)/2,\alpha_0}\right\}, 
\label{eq: generating condition prime}
\end{equation}
where $\chi^2_{L(L+1)/2,\alpha_0}$ is the upper $\alpha_0$ (default value 0.01) quantile of the $\chi^2$ distribution with $L(L+1)/2$ degrees of freedom. We then modify \eqref{eq: aggregation 1} by replacing $\mathbb{M}$ with $\mathbb{M}'$. In Section \ref{sec: thresholding comparison} in the supplement, we compare different ways of constructing the index sets. 
\end{Remark} 

\begin{Remark}[Computational Efficiency] \rm 
The proposed method is computationally efficient even though we generate many samples $\{S^{[m]}\}_{1\leq m\leq M}$. For each $S^{[m]}$, we solve the $L$-dimensional optimization problem in \eqref{eq: sample weight}, instead of solving a $p$-dimensional optimization problem. When the group number $L$ is much smaller than $p$, this significantly reduces the computation cost compared to non-parametric bootstrap, which directly samples the data and requires the implementation of high-dimensional optimization for each sampled data. 
\label{rem: computational efficiency}
\end{Remark}

\begin{Remark}[Non-regular Inference Problems] \rm
The DenseNet sampling relies on a different idea from bootstrap and subsampling, which construct the CIs by computing quantiles of the sampled estimates. Our proposed DenseNet sampling takes a union of sampled intervals, where each interval quantifies the uncertainty of $\{\widehat{x_{\rm new}^{\intercal}b^{(l)}}\}_{1\leq l\leq L}$ and the union step accounts for the uncertainty of $\widehat{\gamma}.$ In Section \ref{sec: non-regularity challenge} in the supplement, we show that neither subsampling nor bootstrap provides valid inference in the presence of non-regularity or instability. The proposed DenseNet sampling helps address other non-regular problems. 
\end{Remark} 



\subsection{Estimation of $\Gamma^{\mathbb{Q}}$ in High Dimensions}
\label{sec: Gamma method}
Now we present a debiased estimator of the matrix $\Gamma^{\mathbb{Q}}$ by generalizing the high-dimensional inference methods for quadratic forms \citep{verzelen2018adaptive, cai2020semisupervised, guo2019group} and inner products \citep{guo2019optimal}. 
For $1\leq l\leq L$, we randomly split the data $(X^{(l)},Y^{(l)})$ into two approximate equal-size subsamples $(X^{(l)}_{A_l},Y^{(l)}_{A_l})$ and $(X^{(l)}_{B_l},Y^{(l)}_{B_l})$, where the index sets $A_{l}$ and $B_{l}$ satisfy $A_l\cap B_l=\emptyset$, $|A_l|=\lfloor n_l/2\rfloor$ and $|B_l|=n_l-\lfloor n_l/2\rfloor$. 
 We randomly split the data $\{X^{\mathbb{Q}}_{i}\}_{1\leq i\leq N_{\mathbb{Q}}}$ into $X_{A}^{\mathbb{Q}}$ and $X_{B}^{\mathbb{Q}}$, where the index sets $A$ and $B$ satisfy $A\cap B=\emptyset$, $|A|=\lfloor N_{\mathbb{Q}}/2\rfloor$ and $|B|=N_{\mathbb{Q}}-\lfloor N_{\mathbb{Q}}/2\rfloor$.

 For $1\leq l\leq L,$ we construct the Lasso estimator $\widehat{b}_{init}^{(l)}$ \citep{tibshirani1996regression} using the subsample $(Y^{(l)}_{A_l},X^{(l)}_{A_l})$; see its exact definition in \eqref{eq: Lasso splitting} in the supplement.  

We define $\widehat{\Sigma}^{\mathbb{Q}}=\frac{1}{|B|}\sum_{i\in B} X^{\mathbb{Q}}_{i} (X^{\mathbb{Q}}_{i})^{\intercal}$ and construct the plug-in estimator $[\widehat{b}_{init}^{(l)}]^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}.$
We estimate $\Gamma_{l,k}^{\mathbb{Q}}$ by correcting the bias of this plug-in estimator,
{\small
\begin{equation}
{\widehat{\Gamma}_{l,k}}^{\mathbb{Q}}=(\widehat{b}_{init}^{(l)})^{\intercal} \widehat{\Sigma}^{\mathbb{Q}} \widehat{b}_{init}^{(k)}+[\widehat{u}^{(l,k)}]^{\intercal}\frac{1}{|B_l|}[X^{(l)}_{B_l}]^{\intercal}(Y^{(l)}_{B_l}-X^{(l)}_{B_l}\widehat{b}_{init}^{(l)})+[\widehat{u}^{(k,l)}]^{\intercal}\frac{1}{|B_k|}[X^{(k)}_{B_k,\cdot}]^{\intercal}(Y^{(k)}_{B_k}-X^{(k)}_{B_k,\cdot}\widehat{b}_{init}^{(k)})
\label{eq: cov est general}
\end{equation}}
where $\widehat{u}^{(l,k)}\in \mathbb{R}^{p}$ and $\widehat{u}^{(k,l)}\in \mathbb{R}^{p}$ are the projection directions constructed in equations \eqref{eq: constraint 1}, \eqref{eq: constraint 2} and \eqref{eq: constraint 3} in the supplement.
More details about constructing ${\widehat{\Gamma}_{l,k}}^{\mathbb{Q}}$ in \eqref{eq: cov est general} are postponed to Section \ref{sec: high-dim Gamma} in the supplement.  

For $1\leq l_1\leq k_1\leq L$ and $1\leq l_2\leq k_2\leq L$, we estimate the covariance between $\widehat{\Gamma}^{\mathbb{Q}}_{l_1,k_1}-{\Gamma}^{\mathbb{Q}}_{l_1,k_1}$ and $\widehat{\Gamma}^{\mathbb{Q}}_{l_2,k_2}-{\Gamma}^{\mathbb{Q}}_{l_2,k_2}$ by 
\begin{equation}
\begin{aligned}
&\widehat{\bf V}_{\pi(l_1,k_1),\pi(l_2,k_2)}\coloneqq\frac{\widehat{\sigma}_{l_1}^2}{|B_{l_1}|}(\widehat{u}^{(l_1,k_1)})^{\intercal}\widehat{\Sigma}^{(l_1)} \left[\widehat{u}^{(l_2,k_2)} {\bf 1}(l_2=l_1)+\widehat{u}^{(k_2,l_2)} {\bf 1}(k_2=l_1)\right]+\\
&\frac{\widehat{\sigma}_{k_1}^2}{|B_{k_1}|}(\widehat{u}^{(k_1,l_1)})^{\intercal}\widehat{\Sigma}^{(k_1)} \left[\widehat{u}^{(l_2,k_2)} {\bf 1}(l_2=k_1)+\widehat{u}^{(k_2,l_2)} {\bf 1}(k_2=k_1)\right]+\\
&{\frac{1}{|B|N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left((\widehat{b}_{init}^{(l_1)})^{\intercal} X_{i}^{\mathbb{Q}} (\widehat{b}_{init}^{(k_1)})^{\intercal}X_{i}^{\mathbb{Q}}(\widehat{b}_{init}^{(l_2)})^{\intercal} X_{i}^{\mathbb{Q}} (\widehat{b}_{init}^{(k_2)})^{\intercal}X_{i}^{\mathbb{Q}} -(\widehat{b}_{init}^{(l_1)})^{\intercal}\bar{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k_1)}(\widehat{b}_{init}^{(l_2)})^{\intercal}\bar{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k_2)}\right)},
\end{aligned}
\label{eq: cov est}
\end{equation}
where $\bar{\Sigma}^{\mathbb{Q}}=\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}X_{i}^{\mathbb{Q}}(X_{i}^{\mathbb{Q}})^{\intercal},$ $\widehat{\Sigma}^{(l)}=\frac{1}{|B_l|}\sum_{i\in B_l} X^{(l)}_{i} [X^{(l)}_{i}]^{\intercal},$ and $\widehat{\sigma}_l^2=\|Y^{(l)}-X^{(l)}\widehat{b}^{(l)}\|_2^2/n_l$ for $1\leq l\leq L.$






\begin{Remark}[\rm Sample splitting] \rm Sample splitting is introduced for estimating $\Gamma^{\mathbb{Q}}$ and the main reason is to create certain independence structure between the random errors $\{\epsilon^{(l)}_{B_l},\epsilon^{(k)}_{B_k}, \widehat{\Sigma}^{\mathbb{Q}}-\Gamma^{\mathbb{Q}}\},$ and the projection directions $\widehat{u}^{(k,l)}, \widehat{u}^{(l,k)}$, which are constructed by solving an optimization problem using the data $X^{(l)}, Y^{(l)}_{A_l},X^{(k)}, Y^{(k)}_{A_k}$ and $X^{\mathbb{Q}}_{A}.$ We believe that the sample splitting is only needed for technical analysis. In simulations, we observe that the procedure without sample splitting performs well and improves the efficiency in comparison to that with sample splitting; see Table \ref{tab: splitting comparison} in the supplement for details. We shall also remark that sample splitting is not needed for constructing $\widehat{x_{\rm new}^{\intercal}b^{(l)}}$ in \eqref{eq: linear separate}. Furthermore, when there is no covariate shift, we construct the estimator of $\Gamma^{\mathbb{Q}}$ without sample splitting; see more details in Section \ref{sec: high-dim Gamma noshift} in the supplement.
\label{rem: tech comparison}
\end{Remark}


\subsection{Algorithm: Construction of ${\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}\right)$}


Algorithm \ref{algo: SAR} summarizes our proposed CI with the DenseNet sampling method. Regarding the tuning parameter selection, the Lasso estimators $\{\widehat{b}^{(l)}\}_{1\leq l\leq L}$ are implemented by the R-package \texttt{glmnet} \citep{friedman2010regularization} with tuning parameters $\{\lambda_{l}\}_{1\leq l\leq L}$ chosen by cross validation; the estimator 
$\widehat{x_{\rm new}^{\intercal}b^{(l)}}$ in \eqref{eq: linear separate} is implemented using the R-package \texttt{SIHR} \citep{rakshit2021sihr} with the built-in selection of the tuning parameters $\eta_l$ and $\tau_l;$ the tuning parameter selection for constructing $\widehat{\Gamma}^{\mathbb{Q}}_{l,k}$ in \eqref{eq: cov est general} is presented in \eqref{eq: dual problem} in the supplement. The code with the built-in tuning parameter selection is submitted together with the current paper.
\begin{algorithm}[htp!]
\caption{DenseNet Sampling Methods}
\begin{flushleft}
\textbf{Input:} $\{X^{(l)},Y^{(l)}\}_{1\leq l\leq L}$, $X^{\mathbb{Q}}$; loading $x_{\rm new}\in \mathbb{R}^{p}$; $\alpha\in (0,1/2)$; sampling size $M$; $\tau_0>0$. \\%$\mu_{l}>0$, $\lambda_{l}>0$ and $\eta_l>0$ for $1\leq l\leq L.$ \\
\textbf{Output:} Confidence interval ${\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}\right)
\vspace{-5mm}
\end{flushleft}
\begin{algorithmic}[1]
\For{$l \gets 1$ to $L$}      

 \State Compute $\widehat{x_{\rm new}^{\intercal}b^{(l)}}$ in \eqref{eq: linear separate};
 \EndFor \Comment{Estimation of $\{x_{\rm new}^{\intercal}b^{(l)}\}_{1\leq l\leq L}$
 \vspace{2mm}
\For{$(l,k) \gets \mathcal{I}_{L}=\{(l,k): 1\leq k\leq l\leq L\}$}      


 \State Compute $\widehat{\Gamma}^{\mathbb{Q}}_{l,k}$ in \eqref{eq: cov est general};
 \EndFor \Comment{Estimation of $\Gamma^{\mathbb{Q}}$}
 \vspace{2mm}
\For{{$(l_1,k_1)\gets \mathcal{I}_{L},$ and $(l_2,k_2) \gets \mathcal{I}_{L}$}}
\State Compute $\widehat{\bf V}_{\pi(l_1,k_1),\pi(l_2,k_2)}$ in \eqref{eq: cov est};\EndFor \Comment{Uncertainty quantification of $\widehat{\Gamma}^{\mathbb{Q}}$}
 \vspace{2mm}
\For{{$m \gets 1,2,\ldots,M$}}
 \State Sample $\widehat{\Gamma}^{[m]}$ in \eqref{eq: resampling} and \eqref{eq: resampling Gamma} with $\widehat{\Gamma}^{\mathbb{Q}}, \widehat{{\bf V}}$ and $\tau_0>0$;
 \State Compute $\widehat{\gamma}^{[m]}$ in \eqref{eq: sample weight};
 \State Construct ${\rm Int}_{\alpha}^{[m]}(x_{\rm new})$ in \eqref{eq: sampled interval} with $\widehat{\gamma}^{[m]}$ and $\widehat{x_{\rm new}^{\intercal}b^{(l)}}$;
 \EndFor \Comment{Sampling}
 \vspace{2mm}
 \State Construct the index set ${\mathbb{M}}$ in \eqref{eq: generating condition};
 \State Construct ${\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}\right)$ in \eqref{eq: aggregation 1}. \Comment{Aggregation}
\end{algorithmic}
\label{algo: SAR}
\end{algorithm}

\section{Theoretical Justification}
\label{sec: theory}
Before presenting the main theorems, we introduce the assumptions for the model \eqref{eq: multi-group model}. Define $s=\max_{1\leq l\leq L}\|b^{(l)}\|_0$ and $n=\min_{1\leq l\leq L} n_{l}.$ 
\begin{enumerate}
\item[(A1)] For $1\leq l\leq L$, $\{X^{(l)}_{i}, Y^{(l)}_{i}\}_{1\leq i\leq n_l}$ are i.i.d. random variables, where $X^{(l)}_{i}\in \mathbb{R}^{p} $ is sub-gaussian with $\Sigma^{(l)}=\mathbf{E} X^{(l)}_{i}[X^{(l)}_{i}]^{\intercal}$ satisfying $c_0\leq \lambda_{\min}\left(\Sigma^{(l)}\right)\leq \lambda_{\max}\left(\Sigma^{(l)}\right)\leq C_0$ for positive constants $C_0>c_0>0$; the error $\epsilon^{(l)}_i$ is sub-gaussian with $\mathbf{E}(\epsilon^{(l)}_i\mid X^{(l)}_{i})=0,$ $\mathbf{E}([\epsilon^{(l)}_i]^2\mid X^{(l)}_{i})=\sigma_{l}^2,$ and $\mathbf{E}([\epsilon^{(l)}_i]^{2+c}\mid X^{(l)}_{i})\leq C$ for some positive constants $c>0$ and $C>0$. $\{X^{\mathbb{Q}}_{i}\}_{1\leq i\leq N_{\mathbb{Q}}}$ are i.i.d. sub-gaussian with $\Sigma^{\mathbb{Q}}=\mathbf{E} X^{\mathbb{Q}}_{i}[X^{\mathbb{Q}}_{i}]^{\intercal}$ satisfying $c_1\leq \lambda_{\min}\left(\Sigma^{\mathbb{Q}}\right)\leq \lambda_{\max}\left(\Sigma^{\mathbb{Q}}\right)\leq C_1$ for positive constants $C_1>c_1>0.$ 
\item[(A2)] $L$ is finite, $\max_{1\leq l\leq L}\|b^{(l)}\|_2\leq C$ for a positive constant $C>0,$ $n\asymp \max_{1\leq l\leq L} n_{l},$ and the model complexity parameters $(s,n,p, N_{\mathbb{Q}})$ satisfy $n\gg {(s \log p)^2}$ and $ N_{\mathbb{Q}}\gg n^{3/4}[\log \max\{N_{\mathbb{Q}},p\}]^{2}.$
\end{enumerate}

We always consider asymptotic expressions in the limit where both $n,p \to \infty.$ 
Assumption (A1) is commonly assumed for the theoretical analysis of high-dimensional linear models; c.f. \cite{buhlmann2011statistics}. 
The positive definite $\Sigma^{(l)}$ and the sub-gaussianity of $X^{(l)}_{i}$ guarantee the restricted eigenvalue condition with a high probability \citep{bickel2009simultaneous,zhou2009restricted}. The sub-gaussian errors are generally required for the theoretical analysis of the Lasso estimator in high dimensions \cite[e.g.]{bickel2009simultaneous,buhlmann2011statistics}. The moment conditions on $\epsilon^{(l)}_i$ are needed to establish the asymptotic normality of the debiased estimators of single regression coefficients \citep{javanmard2014confidence}. Similarly, they are imposed here to establish the asymptotic normality of $\widehat{\Gamma}^{\mathbb{Q}}$ and $\widehat{x_{\rm new}^{\intercal}b^{(l)}}.$ The model complexity condition $n\gg (s \log p)^2$ in (A2) is assumed in the CI construction for high-dimensional linear models \citep{zhang2014confidence,van2014asymptotically,javanmard2014confidence} and has been shown in \cite{cai2015regci} as the minimum sample size for constructing adaptive CIs. The condition on $N_{\mathbb{Q}}$ is mild as there is typically a large amount of unlabelled data for the target population. The boundedness assumptions on $L$ and $\|b^{(l)}\|_2$ are mainly imposed to simplify the presentation, so is the assumption $n\asymp \max_{1\leq l\leq L} n_{l}$.



\subsection{The Sampling Property}
\label{sec: resampling accuracy}

We justify the sampling step proposed in Section \ref{sec: sampling method} and show that there exists at least one sampled weight vector converging to $\gamma^{*}$ at a rate faster than $1/\sqrt{n}.$ To characterize the sample accuracy, we introduce the sampling error ratio $ {\rm err}_n(M)$ as a function of the sampling size $M$:
\begin{equation}
 {\rm err}_n(M)=\left[\frac{4 \log n}{C^{*}(L,\alpha_0)\cdot M}\right]^{\frac{2}{L(L+1)}}, 
\label{eq: sampling ratio}
\end{equation}
where $L$ is the total number of groups, $\alpha_0\in(0,0.01]$ is the pre-specified constant used in the construction of $\mathbb{M}$ in \eqref{eq: generating condition}, and $C^{*}(L,\alpha_0)$ is a constant defined in \eqref{eq: sampling constants} in the supplement. 

The following theorem establishes the rate of convergence for $\min_{m\in \mathbb{M}}\|\widehat{\gamma}^{[m]}-\gamma^{*}\|_2,$ which represents the best approximation accuracy among all sampled vectors $\{\widehat{\gamma}^{[m]}\}_{m\in \mathbb{M}}.$


\begin{Theorem} Consider the model \eqref{eq: multi-group model}. Suppose Conditions {\rm (A1)} and {\rm (A2)} hold. If $ {\rm err}_n(M)$ defined in \eqref{eq: sampling ratio} satisfies $ {\rm err}_n(M) \ll \min\{1,c^{*}(\alpha_0),\lambda_{\min}(\Gamma^{\mathbb{Q}})\}$ where $c^{*}(\alpha_0)$ is a constant defined in \eqref{eq: sampling constants} in the supplement, then 
 \begin{equation*}
\liminf_{n,p \rightarrow \infty} {\mathbf{P}}\left(\min_{m\in \mathbb{M}}\|\widehat{\gamma}^{[m]}-\gamma^{*}\|_2 \leq \frac{\sqrt{2}  {\rm err}_n(M)}{\lambda_{\min}(\Gamma^{\mathbb{Q}})} \cdot \frac{1}{\sqrt{n}}\right)\geq 1-\alpha_0,
 \label{eq: resampling weight accuracy}
 \end{equation*}
 where $\alpha_0\in(0,0.01]$ is the pre-specified constant used in the construction of $\mathbb{M}$ in \eqref{eq: generating condition}.
\label{thm: sampling accuracy}
\end{Theorem}
Let $m^*$ denote one index belonging to $\mathbb{M}$ such that $\|\widehat{\gamma}^{[m^{*}]}-\gamma^{*}\|_2=\min_{m\in \mathbb{M}}\|\widehat{\gamma}^{[m]}-\gamma^{*}\|_2.$ Since $ {\rm err}_n(M) \ll \lambda_{\min}(\Gamma^{\mathbb{Q}}),$ Theorem \ref{thm: sampling accuracy} states that $\|\widehat{\gamma}^{[m^{*}]}-\gamma^{*}\|_2$ converges to zero at a faster rate than $1/\sqrt{n}$. Corollary \ref{cor: lower bounded constant} in the supplement shows that $c^{*}(\alpha_0)$ and $C^{*}(L,\alpha_0)$ are at least of constant orders under regularity conditions. Together with $\lambda_{\min}(\Gamma^{\mathbb{Q}})\geq c$ for some positive constant $c>0$, any choice of $M\gg \log n$ guarantees the condition $ {\rm err}_n(M) \ll \min\{1,c^{*}(\alpha_0),\lambda_{\min}(\Gamma^{\mathbb{Q}})\}.$ In practice, we set $M=500$ as the default value and observe reliable inference results. 

Theorem \ref{thm: sampling accuracy} covers the important setting with a nearly singular $\Gamma^{\mathbb{Q}}$, that is, $\lambda_{\min}(\Gamma^{\mathbb{Q}})>0$ for any given $p$ but $ \liminf_{p\rightarrow \infty}\lambda_{\min}(\Gamma^{\mathbb{Q}})= 0.$ This setting will appear if some of $\{b^{(l)}\}_{1\leq l\leq L}$ are similar to each other but not exactly the same. Theorem \ref{thm: sampling accuracy} can be applied to this nearly singular setting if we choose a sufficiently large sampling number $M>0$ such that $ {\rm err}_n(M)\ll \min\{1, c^{*}(\alpha_0), \lambda_{\min}(\Gamma^{\mathbb{Q}})\}.$ Theorem \ref{thm: sampling accuracy} is not applied to the exactly singular setting $\lambda_{\min}(\Gamma^{\mathbb{Q}})=0$ since the condition $\lambda_{\min}(\Gamma^{\mathbb{Q}})\gg  {\rm err}_{n}(M)$ is violated. The ridge-type maximin effect introduced in Section \ref{sec: ridge-type} is helpful for the exactly singular setting. 


\subsection{Statistical Inference for Maximin Effects}
\label{sec: inference guarantee}
The following decomposition reveals why the DenseNet sampling method works, 
\begin{equation}
\begin{aligned}
\widehat{x_{\rm new}^{\intercal}\beta}^{[m]}-x_{\rm new}^{\intercal}\beta
=\sum_{l=1}^{L} (\widehat{\gamma}^{[m]}_{l}-{\gamma}^{*}_{l})\cdot\widehat{x_{\rm new}^{\intercal}b^{(l)}}+\sum_{l=1}^{L} {\gamma}^{*}_{l} \cdot (\widehat{x_{\rm new}^{\intercal}b^{(l)}}-{x_{\rm new}^{\intercal}b^{(l)}}).
\end{aligned}
\label{eq: maximin inference decomp}
\end{equation}
With $m=m^*$ defined after Theorem \ref{thm: sampling accuracy}, the uncertainty of $\sum_{l=1}^{L} (\widehat{\gamma}^{[m]}_{l}-{\gamma}^{*}_{l})\cdot\widehat{x_{\rm new}^{\intercal}b^{(l)}}$ is negligible and we just need to quantify the uncertainty of $\sum_{l=1}^{L} {\gamma}^{*}_{l} \cdot (\widehat{x_{\rm new}^{\intercal}b^{(l)}}-{x_{\rm new}^{\intercal}b^{(l)}})$. The following theorem establishes the properties of ${\rm CI}_{\alpha}(x_{\rm new}^{\intercal}\beta^{*})$ defined in \eqref{eq: aggregation 1}.


\begin{Theorem} Suppose that the conditions of Theorem \ref{thm: sampling accuracy} hold. Then for any positive constant $\eta_0>0$, the confidence interval ${\rm CI}_{\alpha}(x_{\rm new}^{\intercal}\beta^{*})$ defined in 
\eqref{eq: aggregation 1} satisfies 
\begin{equation}
\lim_{n,p\rightarrow \infty}{\mathbf{P}}\left(x_{\rm new}^{\intercal} \beta^{*}\in {\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}\right)\right)\geq 1-\alpha-\alpha_0,
\label{eq: coverage}
\end{equation}
where $\alpha\in (0,1/2)$ is the pre-specified significance level and $\alpha_0\in(0,0.01]$ is the pre-specified constant used in the construction of $\mathbb{M}$ in \eqref{eq: generating condition}. By further assuming $N_{\mathbb{Q}}\gtrsim\max\{n,p\}$ and $\lambda_{\min}(\Gamma^{\mathbb{Q}})\gtrsim \sqrt{\log p/\min\{n,N_{\mathbb{Q}}\}}$, then there exists some positive constant $C>0$ such that
\begin{equation}
\liminf_{n,p \rightarrow \infty} {\mathbf{P}}\left(\mathbf{Leng}\left({\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}\right)\right)\leq C \max\left\{ 1,\frac{z_{\alpha_0/[L(L+1)]}}{\lambda_{\min}(\Gamma^{\mathbb{Q}})}\right\}\cdot \frac{\|x_{\rm new}\|_2}{\sqrt{n}}\right)=1,
\label{eq: length bound}
\end{equation}
where $\mathbf{Leng}\left({\rm CI}\left(x_{\rm new}^{\intercal}\beta^{*}\right)\right)$ denotes the interval length and $z_{\alpha_0/[L(L+1)]}$ is the upper $\alpha_0/[L(L+1)]$ quantile of the standard normal distribution. 
\label{thm: inference for linear}
\end{Theorem}

A few remarks are in order for Theorem \ref{thm: inference for linear}. Firstly, the coverage property uniformly holds for any $x_{\rm new}\in \mathbb{R}^{p}$, and the validity of the constructed CI does not require the asymptotic normality of $\widehat{x_{\rm new}^{\intercal}\beta^{*}}.$ Due to the non-regularity and instability detailed in Section \ref{sec: maximin challenge}, the asymptotic distribution of the maximin effect estimator $\widehat{x_{\rm new}^{\intercal}\beta^{*}}$ is not necessarily normal. In Sections \ref{sec: instability simulation} and \ref{sec: low-dim method} in the supplement, we illustrate that the CIs assuming asymptotic normality are under-coverage in both low and high dimensions.

Secondly, in \eqref{eq: coverage}, the coverage is only guaranteed to be above $1-\alpha-\alpha_0$, instead of converging to $1-\alpha$. This one-sided coverage guarantee comes with our proposed sampling method. 
For $m^*$ defined after Theorem \ref{thm: sampling accuracy} and ${\rm Int}_{\alpha}^{[m^*]}(x_{\rm new})$ defined in \eqref{eq: sampled interval} with ${ {\rm err}_n(M)}/{\lambda_{\min}(\Gamma^{\mathbb{Q}})}\lesssim \eta_0\ll 1$, we have a more precise coverage statement, 
\begin{equation}
\lim_{n,p\rightarrow \infty}{\mathbf{P}}(x_{\rm new}^{\intercal} \beta^{*}\in {\rm Int}_{\alpha}^{[m^*]}(x_{\rm new}))\in (1-\alpha-\alpha_0,1-\alpha+\alpha_0).
\label{eq: more precise coverage}
\end{equation}
See its proof in Section \ref{sec: more precise coverage} in the supplement.
 However, since we cannot locate $m^*$, we take a union over ${\mathbb{M}}$ to guarantee the coverage property, but this will lead to the one-sided bound for the coverage in \eqref{eq: coverage}. We examine the tightness of the coverage inequality \eqref{eq: coverage} throughout the simulation studies; see Table \ref{tab: summary} in Section \ref{sec: sim} for a summary.

Thirdly, if $\lambda_{\min}(\Gamma^{\mathbb{Q}})\geq c$ for a positive constant $c>0$, then the CI length is of the rate $\|x_{\rm new}\|_2/\sqrt{n}$. In consideration of a single high-dimensional linear model, \citet{cai2019individualized} showed that, without the knowledge of the sparsity level $s$ of $b^{(l)}$, the optimal length of CIs for $x_{\rm new}^{\intercal} b^{(l)}$ is $\|x_{\rm new}\|_2/\sqrt{n}$ if 
$\sqrt{\|x_{\rm new}\|_0}\lesssim \sqrt{n}/\log p$ and $s \lesssim \sqrt{n}/\log p;$ see Corollary 4 in \citet{cai2019individualized} for the exact details. In Section \ref{sec: sim}, we evaluate the precision properties of our proposed CI in finite samples; see Table \ref{tab: summary} in Section \ref{sec: sim} for a summary. 

\section{Stability: Ridge-type Maximin Effect}
\label{sec: ridge-type}

We generalize the maximin effect $\beta^{*}(\mathbb{Q})$ in \eqref{eq: optimal weight} and propose the following ridge-type maximin effect for $\delta\geq 0,$ 
\begin{equation}
\beta^{*}_{\delta}(\mathbb{Q})=\sum_{l=1}^{L}[\gamma^{*}_{\delta}(\mathbb{Q})]_l \cdot b^{(l)} \quad \text{with} \quad 
\gamma^{*}_{\delta}(\mathbb{Q})=\arg\min_{\gamma \in \Delta^{L}}\left[\gamma^{\intercal}\Gamma^{\mathbb{Q}} \gamma+{\delta}\|\gamma\|_2^2\right],
\label{eq: optimal weight ridge}
\end{equation}
which adds the ridge penalty in constructing the weight vector. When there is no confusion, we omit the dependence on $\mathbb{Q}$ and write $\beta^{*}_{\delta}(\mathbb{Q})$ and $\gamma^{*}_{\delta}(\mathbb{Q})$ as $\beta^{*}_{\delta}$ and $\gamma^{*}_{\delta}$, respectively. The ridge-type maximin effect $\beta^{*}_{\delta}(\mathbb{Q})$ generalizes $\beta^{*}(\mathbb{Q})$ but $\beta^{*}_{\delta}(\mathbb{Q})$ with a positive $\delta>0$ has a  different interpretation from $\beta^{*}(\mathbb{Q})$. In Section \ref{sec: ridge additional} in the supplement, we express $\beta^{*}_{\delta}$ as the solution to a distributionally robust optimization problem, where adding the ridge penalty is equivalent to perturbing the covariate distribution for the target population. 

Section \ref{sec: maximin challenge} pointed out that the maximin effect might not be a stable aggregation, especially when some $\{b^{(l)}\}$ are similar to each other. The ridge-type maximin effect $\beta^{*}_{\delta}$ is proposed to address this instability issue. 
When $\beta^{*}$ is not unique, $\beta^{*}_{\delta}$ is uniquely defined for any positive $\delta>0$, which is implied by Lemma \ref{lemma: gamma accuracy} in the supplement. For $L=2,$ the solution of \eqref{eq: optimal weight ridge} is $\gamma^{*}_{\delta}=([\gamma^{*}_{\delta}]_1,1-[\gamma^{*}_{\delta}]_1)^{\intercal},$ with
$
[\gamma^{*}_{\delta}]_1=\min\left\{\max\left\{\tfrac{\Gamma_{22}+\delta-\Gamma_{12}}{\Gamma_{11}+\Gamma_{22}+2\delta-2\Gamma_{12}},0\right\},1\right\}.  
$
Even if $\Gamma_{11}+\Gamma_{22}-2\Gamma_{12}$ is near zero, the instability issue is addressed with $\delta>0$ since $1/[\Gamma_{11}+\Gamma_{22}+2\delta-2\Gamma_{12}]$ can be accurately estimated. 

The estimation and inference methods detailed in Sections \ref{sec: estimation} and \ref{sec: sampling method} can be extended to dealing with $x_{\rm new}^{\intercal}\beta^{*}_{\delta}$ for any $\delta\geq 0.$ Specifically, we generalize the point estimator \eqref{eq: point estimator} as  
\begin{equation}
\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}=\sum_{l=1}^{L} [\widehat{\gamma}_{\delta}]_{l}\cdot \widehat{x_{\rm new}^{\intercal}b^{(l)}} \quad \text{with}\quad \widehat{\gamma}_{\delta}:=\arg\min_{\gamma\in \Delta^{L}} 
\left[\gamma^{\intercal}\widehat{\Gamma}^{\mathbb{Q}} \gamma+{\delta}\|\gamma\|_2^2\right].
\label{eq: point estimator ridge}
\end{equation}

Regarding the CI construction for $x_{\rm new}^{\intercal}\beta^{*}_{\delta},$ we replace $\widehat{\gamma}^{[m]}$ in \eqref{eq: sample weight} by
\begin{equation}
\widehat{\gamma}^{[m]}_{\delta}=\arg\min_{\gamma\in \Delta^{L}} \gamma^{\intercal}(\widehat{\Gamma}^{[m]}+\delta \cdot {\rm I})_{+} \gamma \quad \text{for}\quad \delta\geq 0.
\label{eq: sample weight ridge} 
\end{equation}
The detailed inference procedure is presented in Section \ref{sec: inference results} in the supplement. 

For a general $L\geq 2,$ we propose a stability measure (depending on $\delta$) as 
\begin{equation}
\mathbb{I}(\delta)=\frac{\sum_{m=1}^{M}\|\widehat{\gamma}^{[m]}_{\delta}-\widehat{\gamma}_{\delta}\|^2_2}{\sum_{m=1}^{M} \|\widehat{\Gamma}^{[m]}-\widehat{\Gamma}^{\mathbb{Q}}\|^2_2},\label{eq: instability measure}
\end{equation}
where $\{\widehat{\Gamma}^{[m]}\}_{1\leq m\leq M}$ and $\{\widehat{\gamma}^{[m]}_{\delta}\}_{1\leq m\leq M}$ are the resampled estimates defined in \eqref{eq: resampling Gamma} and \eqref{eq: sample weight ridge}, respectively. A large value of $\mathbb{I}(\delta)$ indicates that a small error in estimating $\Gamma^{\mathbb{Q}}$ may lead to a much larger error in estimating the weight vector. We claim the weight optimization problem to be stable if $\mathbb{I}(\delta)<t_0$ (default value $t_0=0.5$) and unstable otherwise. 

\begin{table}[htp!]
\centering
\resizebox{0.7\linewidth}{!}{
\begin{tabular}[t]{|c|c|c|c|c|c|c|}
\hline
& \multicolumn{5}{c|}{$\mathbb{I}(\delta)$}&\\ 
\hline
Setting & $\delta=0$ & $\delta=0.1$ & $\delta=0.5$ & $\delta=1$ & $\delta=2$ & $\Gamma^{\mathbb{Q}}_{11}+\Gamma^{\mathbb{Q}}_{22}-2\Gamma^{\mathbb{Q}}_{12}$\\
\hline
1 & 5.464 & 1.966 & 0.264 & 0.072 & 0.019 & 0.026\\
\hline
4(a) & 0.108 & 0.087 & 0.044 & 0.024 & 0.011 & 2.007\\
\hline
6(a) & 3.305 & 1.449 & 0.221 & 0.065 & 0.018 & 0.160\\
\hline
\end{tabular}}
\caption{The instability measure $\mathbb{I}(\delta)$ for simulation settings detailed in Section \ref{sec: results} and Section \ref{sec: additional simulation setting} in the supplement. The reported values are averaged over 100 repeated simulations.}
\label{tab: stable}
\end{table}


In Table \ref{tab: stable}, we report $\mathbb{I}(\delta)$ for several simulation settings detailed in Section \ref{sec: results} and Section \ref{sec: additional simulation setting} in the supplement. For $\delta=0,$ the weight optimization is unstable for settings 1 and 6(a) but stable for 4(a). A larger $\delta$ value is effective in stabilizing the optimization problem. 












The following proposition controls the worse-off amount $R_{\mathbb{Q}}[\beta^{*}_{\delta}]-R_{\mathbb{Q}}[\beta^{*}]$. 


\begin{Proposition}
Suppose $\lambda_{L}(\mathcal{B})>0$ with $\mathcal{B}=\begin{pmatrix}b^{(1)},\ldots,b^{(L)}\end{pmatrix}\in \mathbb{R}^{p\times L}$, then the ridge-type minimizer $\beta^{*}_{\delta}$ defined in \eqref{eq: optimal weight ridge} satisfies
$R_{\mathbb{Q}}[\beta^{*}_{\delta}]\geq R_{\mathbb{Q}}[\beta^{*}]-2\delta(\|\gamma^{*}_{\delta}\|_\infty-\|\gamma^{*}_{\delta}\|_2^2),$
where $R_{\mathbb{Q}}[\cdot]$ and $\beta^{*}$ are defined in \eqref{eq: general maximin} and $\gamma^{*}_{\delta}$ is defined in \eqref{eq: optimal weight ridge}. 
\label{prop: delta-optimal}
\end{Proposition}
A data-dependent way of choosing $\delta$ is presented in Section \ref{sec: ridge additional} in the supplement, which balances the stability measure $\mathbb{I}(\delta)$ and the reward ratio $R_{\mathbb{Q}}[\beta^{*}_{\delta}]/R_{\mathbb{Q}}[\beta^{*}].$













\section{Simulation Results}
\label{sec: sim}






 








We generate $\{X^{(l)},Y^{(l)}\}_{1\leq l\leq L}$ by \eqref{eq: multi-group model}, where, for the $l$-th group, $\{X^{(l)}_{i}\}_{1\leq i\leq n_l}\stackrel{\rm i.i.d.}{\sim} \mathcal{N}({\bf 0},\Sigma^{(l)})$ and $\{\epsilon^{(l)}_{i} \}_{1\leq i\leq n_l}\stackrel{\rm i.i.d.}{\sim} \mathcal{N}({0},\sigma^2_l).$ For $1\leq l\leq L,$ we take $n_l=n$, $\sigma_{l}=1$ and $\Sigma^{(l)}=\Sigma,$ with $\Sigma_{j,k}=0.6^{|j-k|}$ for $1\leq j,k \leq p$. In the covariate shift setting, we have access to $\{X^{\mathbb{Q}}_{i}\}_{1\leq i\leq N_{\mathbb{Q}}}\stackrel{\rm i.i.d.}{\sim} N({\bf 0},\Sigma^{\mathbb{Q}})$. $p$ is set as $500$ and $N_{\mathbb{Q}}$ is set as $2000$ by default. We construct $\widehat{\Gamma}^{\mathbb{Q}}$ without the sample splitting in the simulation and real data analysis. A numerical comparison between our proposed methods with and without sample splitting is reported in Table \ref{tab: splitting comparison} in the supplement. Throughout the simulation, we report the average measures over 500 simulations. 




We compare our proposed CI with a normality CI of the form \begin{equation}
(\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}-1.96\cdot \widehat{\rm SE},\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}+1.96\cdot \widehat{\rm SE}),
\label{eq: normality CI}
\end{equation} where $\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}$ is defined in \eqref{eq: point estimator ridge} and $\widehat{\rm SE}$ denotes the sample standard deviation of $\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}$ calculated based on $500$ simulations. Since $\widehat{\rm SE}$ is calculated in an oracle way, this normality CI is not a practical procedure but a favorable implementation of the CI constructed by assuming the asymptotic normality of the point estimator $\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}$. Since $\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}$ might have a non-standard limiting distribution, the normality CI in \eqref{eq: normality CI} might not be valid. 




\subsection{Simulations for Non-regularity and Instability Settings}
\label{sec: instability simulation


We show that the normality CI in \eqref{eq: normality CI} suffers from under-coverage in the presence of non-regularity and instability. We generate ten simulation settings, where (I-1) to (I-6) correspond to settings with both non-regularity and instability, (I-7) to (I-9) correspond to the non-regularity settings, and (I-10) corresponds to an easier setting without non-regularity and instability. The detailed settings are reported in Section \ref{sec: I settings} in the supplement.

We focus on inference for the maximin effect without the ridge penalty. In Table \ref{tab: i-settings result}, except for (I-10), the empirical coverages of the normality CI in \eqref{eq: normality CI} are between 70\% and 85\%. 
Our proposed CI achieves the desired coverage at the expense of a wider interval. The ratio of the average length of our proposed CI to the normality CI is between 1.35 and 2.02. 
\begin{table}[htp!]
\centering
\resizebox{0.75\linewidth}{!}{
\begin{tabular}[t]{|c|c|c|c|c|c|c|}
\hline
\multicolumn{1}{|c|}{} & \multicolumn{1}{c|}{} &\multicolumn{2}{c|}{Coverage} & \multicolumn{2}{c|}{Length} & \multicolumn{1}{c|}{} \\
\cline{3-4} \cline{5-7}
Setting & $\mathbb{I}(\delta)$ & normality & Proposed & normality & Proposed & Length Ratio\\
\hline
(I-1) & 3.368 & 0.700 & 0.960 & 0.352 & 0.597 & 1.693\\
\hline
(I-2) & 3.707 & 0.818 & 0.978 & 0.320 & 0.543 & 1.699\\
\hline
(I-3) & 3.182 & 0.748 & 0.970 & 0.352 & 0.588 & 1.673\\
\hline
(I-4) & 1.732 & 0.770 & 0.956 & 0.520 & 0.796 & 1.532\\
\hline
(I-5) & 1.857 & 0.796 & 0.978 & 0.445 & 0.710 & 1.594\\
\hline
(I-6) & 1.987 & 0.710 & 0.980 & 0.480 & 0.832 & 1.732\\
\hline
(I-7) & 0.029 & 0.848 & 0.985 & 0.250 & 0.507 & 2.028\\
\hline
(I-8) & 0.031 & 0.758 & 0.981 & 0.262 & 0.530 & 2.020 \\
\hline
(I-9) & 0.010 & 0.830 & 0.988 & 0.690 & 1.264 & 1.832 \\
\hline
(I-10) & 0.030 & 0.940 & 0.988 & 0.232 & 0.315 & 1.354\\
\hline
\end{tabular}
}
\caption{\small Coverage and length of our proposed CI in Algorithm \ref{algo: SAR} and the normality CI in \eqref{eq: normality CI} (with $\delta=0$). The column indexed with ``Coverage" and ``Length" represent the empirical coverage and average length for CIs, respectively; the columns indexed with ``normality " and ``Proposed" represent the normality CI and our proposed CI, respectively. The column indexed with ``Length Ratio" represents the ratio of the average length of our proposed CI to that of the normality CI. The column indexed with ``$\mathbb{I}(\delta)$" reports the instability measure defined in \eqref{eq: instability measure}.}
\label{tab: i-settings result}
\end{table}

To further investigate the under-coverage of the normality CI, we plot in Figure \ref{fig: hist oracle} the histogram of $\widehat{x_{\rm new}^{\intercal}\beta^{*}}$ 
and $\widehat{\gamma}$ in \eqref{eq: point estimator} over 500 simulations. The leftmost panel of Figure \ref{fig: hist oracle} corresponds to the setting (I-1) with non-regularity and instability. Due to the instability, the histogram of the weight estimates has some concentrations near both 0 and 1, which results in the bias component of $\widehat{x_{\rm new}^{\intercal}\beta^{*}}$ being comparable to its standard error. Consequently, the empirical coverage of the corresponding normality CI is only 70\%. The middle panel of Figure \ref{fig: hist oracle} corresponds to the setting (I-8) with non-regularity, where the weight for the first group is left-censored at zero. This censoring at zero leads to the bias of $\widehat{x_{\rm new}^{\intercal}\beta^{*}}$ being comparable to its standard error and under-coverage of the normality CI. The rightmost panel corresponds to the favorable setting (I-10) without non-regularity and instability. The weight distributions and the maximin effect estimator are nearly normal, and the corresponding normality CI in \eqref{eq: normality CI} achieves the 95\% coverage level.

\begin{figure}[htp!]
 \centering

 \includegraphics[scale=0.53]{hist-2by3-highd.png}
 \caption{The histogram of the maximin estimator $\widehat{x_{\rm new}^{\intercal}\beta^{*}}$ (top) and one coordinate of the weight estimator (bottom) over 500 simulations. The figures from the leftmost to the rightmost correspond to settings (I-1), (I-8) and (I-10). The red solid line denotes the true value $x_{\rm new}^{\intercal}\beta^{*}$ while the blue dashed line denotes the sample average over 500 simulations.}
\label{fig: hist oracle}
\end{figure}



\subsection{Other Simulation Studies}
\label{sec: results}

We investigate our proposed method over seven additional settings. Settings 1, 3, and 4 are described in the following, and other settings are described in Section \ref{sec: additional simulation setting} in the supplement.

\noindent {\it \underline{Setting 1} ($L=2$ with no covariate shift)}. $b^{(1)}_j=j/40$ for $1\leq j\leq 10$, $b^{(1)}_j=1$ for $j=22,23$, $b^{(1)}_{j}=0.1$ for $j=499,500$, and $b^{(1)}_j=0$ otherwise;
$b^{(2)}_{j}=b^{(1)}_{j}$ for $1\leq j \leq 499$ and $b^{(2)}_{500}=0.3$; $[{x_{\rm new}}]_j=1$ for $j=500$ and $[{x_{\rm new}}]_{j}=0$ otherwise.




\noindent {\it \underline{Setting 3} ($L=2$ with/without covariate shift)}. 
$b^{(1)}$ and $b^{(2)}$ are the same as setting 1, except for $b^{(1)}_{498}=0.5$, $b^{(1)}_j = -0.5$ for $j=499, 500,$ and $b^{(2)}_{500}=1$; $[x_{\rm new}]_{j}=1$ for $j=499,500,$ and $[{x_{\rm new}}]_{j}=0$ otherwise.
Setting 3(a) is the covariate shift setting with $\Sigma^{\mathbb{Q}}_{i,i}=1.5$ for $1\leq i\leq 500$, $\Sigma^{\mathbb{Q}}_{i,j}=0.6$ for $1\leq i\neq j\leq 5,$ $\Sigma^{\mathbb{Q}}_{i,j}=-0.9$ for $499\leq i\neq j\leq 500$ and $\Sigma^{\mathbb{Q}}_{i,j}=\Sigma_{i,j}$ otherwise; Setting 3(b) is the no covariate shift setting.

\noindent {\it \underline{Setting 4} (varying $L$)}. Vary $L$ across $\{2,5,10\}$, denoted as (4a), (4b) and (4c), respectively. $b^{(1)}_j = j/40$ for $1\leq j \leq 10$, $b^{(1)}_{498} = 0.5$, $b^{(1)}_j=-0.5$ for $j=499,500$, and $b^{(1)}_j=0$ otherwise.
For $2\leq l \leq L$, $b^{(l)}_{10\cdot l+j}=b^{(1)}_j$ for $1\leq j \leq 10$ and $b^{(l)}_j = b^{(1)}_j/2^{l-1}$ for $j=498\leq j \leq 500$, and $b^{(l)}_j=0$ otherwise. 
$[{x_{\rm new}}]_{j}=1$ for $498\leq j\leq 500$, and $[{x_{\rm new}}]_{j}=0$ otherwise; 
$\Sigma^{\mathbb{Q}}_{i,i}=1.5$ for $1\leq i\leq 500$, $\Sigma^{\mathbb{Q}}_{i,j}=0.9$ for $1\leq i\neq j\leq 5$ and $499\leq i\neq j\leq 500,$ and $\Sigma^{\mathbb{Q}}_{i,j}=\Sigma_{i,j}$ otherwise.


We compute
$
\text{Coverage Error}=|\text{Empirical Coverage} - 95\%|,
$
with the empirical coverage computed based on 500 simulations. We report the ratio of the average length of our proposed CI to that of the normality CI in \eqref{eq: normality CI}. For each simulation setting, we average the coverage error and the length ratio over different combinations of $\delta\in \{0,0.1,0.5,1,2\}$ and $n\in \{200,300,500\}$. \footnote{For setting 5, instead of averaging over $\delta\in \{0,0.1,0.5,1,2\}$, we take an average with respect to the {\rm perb} parameter; see more details in Section \ref{sec: additional simulation setting} in the supplement. } 

In Table \ref{tab: summary}, we summarize the average coverage error and length ratio over different settings. Since our proposed CIs generally achieve 95\% for $n\geq 200$, the coverage errors mainly result from over-coverage instead of under-coverage. For settings 3(a), 4(a), and 5, the empirical coverage of our proposed CI is nearly 95\%, and the corresponding length ratios for settings 4(a) and 5 are near 1. For settings 3(b), 6, and 7, our proposed CIs are over-coverage, but the average length ratios are at most $1.864.$ More detailed results for these settings are presented in the following and Section \ref{sec: additional simulation} in the supplement.
\begin{table}[H]
\centering
\resizebox{\linewidth}{!}{
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}
 \hline
 Setting & 1 & 2 & 3(a) & 3(b) & 4(a) & 4(b) & 4(c) & 5 & 6 & 7 \\
 \hline
 Coverage Error & 2.60\% & 3.45\% & 0.95\% & 4.51\% & 1.64\% & 2.71\% & 3.57\% & 0.75\% & 4.25\% & 4.68\% \\
 \hline
 Length Ratio & 1.322 & 1.607 & 1.516 &1.864 & 1.047 & 1.356 & 1.587 & 1.268 & 1.554 & 1.579\\
 \hline
\end{tabular}}
\caption{Average coverage error and length ratio across different settings.}
\label{tab: summary}
\end{table}

\vspace{-5mm}

{\bf \noindent Dependence on $n$ and $\delta$.} 
For setting 1, we plot in Figure \ref{fig: setting 1} the empirical coverage and CI length over $\delta \in \{0,0.1,0.5,1,2\}.$ Our proposed CIs achieve the desired coverage level for $n\geq 200.$ The CIs get shorter with increasing $n$ or $\delta$: the lengths of CIs for $\delta=2$ are around half of those for $\delta=0$. This shows that a positive $\delta$ is effective in reducing the length of the CI in setting 1, which is unstable and has a large instability measure as shown in Table \ref{tab: stable}. 

\begin{figure}[htp!]
\centering
\includegraphics[width=0.9\linewidth]{Setting1.png}
\caption{Dependence on $\delta$ and $n$ (setting 1). ``Coverage" and ``CI Length" stand for the empirical coverage and the average length of our proposed CI, respectively; ``Length Ratio" represents the ratio of the average length of our proposed CI to the normality CI in \eqref{eq: normality CI}.}
\label{fig: setting 1}
\end{figure}


{\noindent \bf Covariate shift.} We compare Algorithm \ref{algo: SAR} with and without covariate shift. For the covariate shift setting, if $\Sigma^{\mathbb{Q}}$ is known, we present the modification of Algorithm 1 in Section \ref{sec: high-dim Gamma} in the supplement. The top of Figure \ref{fig: method comparison} corresponds to the simulation settings with covariate shift and $n=500$. The no covariate shift algorithm does not achieve the 95\% coverage due to the bias of assuming no covariate shift. In contrast, the covariate shift algorithms (with or without knowing $\Sigma^{\mathbb{Q}}$) achieve the 95\% coverage level, and the CI constructed with known $\Sigma^{\mathbb{Q}}$ is shorter as it does not need to quantify the uncertainty of estimating $\Sigma^{\mathbb{Q}}.$ 
The bottom of Figure \ref{fig: method comparison} corresponds to the setting with no covariate shift. All algorithms achieve the desired coverage level. The results for $n=200$ is reported in Figure \ref{fig: method comparison n=200} in the supplement. 
 

\begin{figure}[htp!]
\centering
\begin{subfigure}[b]{\textwidth}
\centering
 \includegraphics[width=0.9\linewidth]{Setting3a-Comparison-CS-n500.png}
 \caption{Setting 3(a) with covariate shift}
\end{subfigure}

\begin{subfigure}[b]{\textwidth}
\centering
 \includegraphics[width=0.9\linewidth]{Setting3b-Comparison-NoCS-n500.png}
 \caption{Setting 3(b) with no covariate shift}
\end{subfigure}
\caption{Comparison of covariate shift and no covariate shift algorithms ($n=500$). {``CS Known", ``CS" and ``No CS" represent Algorithm \ref{algo: SAR} with known $\Sigma^{\mathbb{Q}}$, with covariate shift but unknown $\Sigma^{\mathbb{Q}}$, and with no covariate shift, respectively.} ``Coverage" and ``CI Length" stand for the empirical coverage and the average length of our proposed CI, respectively; ``Length Ratio" represents the ratio of the average length of our proposed CI to the normality CI.}
\label{fig: method comparison}
\end{figure}
 

{\noindent \bf Varying $L$ with covariate shift.} For setting 4(b) with $L=5,$ we plot in Figure \ref{fig: setting 4b} the empirical coverage and CI length over $\delta \in \{0,0.1,0.5,1,2\}.$ The results are similar to those in Figure \ref{fig: setting 1}. The results for settings 4(a) and 4(b) are presented in Figure \ref{fig: setting 4} in the supplement. 

\begin{figure}[htp!]
\centering
\includegraphics[width=0.8\linewidth]{Setting4-L=5.png}
\caption{Setting 4(b) with $L=5$. ``Coverage" and ``CI Length" stand for the empirical coverage and the average length of our proposed CI, respectively; ``Length Ratio" represents the ratio of the average length of our proposed CI to the normality CI in \eqref{eq: normality CI}. }
\label{fig: setting 4b}
\end{figure}

{\noindent \bf Additional simulation studies.} In Section \ref{sec: additional simulation} in the supplement, we conduct additional simulation studies, including settings with opposite effects, a larger $p$, and different choices of the index set ${\mathbb{M}}.$ We also investigate the effect of sample splitting on our proposed CI. 


\section{Real Data Applications}
\label{sec: real data}
We apply the DenseNet sampling method to a genome-wide association study \citep{bloom2013finding} on the yeast colony growth under 46 different media. The study is based on $n=1008$ Saccharomyces cerevisiae segregants crossbred from a laboratory and a wine strain. A set of $p=4410$ Single Nucleotide Polymorphisms (SNPs) have been selected out of the total 11623 SNPs \citep{bloom2013finding}. The outcome variables of interest are the end-point colony sizes under different growth media. To demonstrate our method, we consider the colony sizes under five growth media: ``Ethanol", ``Lactate", ``Lactose", ``Sorbitol" and ``Trehalose". Our model \eqref{eq: multi-group model} can be applied here with $L=5$ and each $1\leq l\leq 5$ corresponds to one growth medium (environment). These outcome variables are normalized to have variance $1$, with the corresponding variance explained by the genetic markers $0.60, 0.69, 0.68, 0.51$, and $0.66.$ We focus on an index set $\mathcal{S}\subset[p]$ consisting of 10 pre-selected SNPs, which are relabeled with the indexes $\{1,2,\cdots, 10\}.$
In Table \ref{tab: location}, we report the genes where these SNPs occur. For example, the SNP with index 1 occurs in the KRE33 gene.
\begin{table}[H]
\centering
\resizebox{0.9\linewidth}{!}{
\begin{tabular}[t]{|c|c|c|c|c|c|c|c|c|c|c|}
\hline
Index of SNP& 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10\\
\hline
Gene Name & KRE33 & PUF3 & CIR2 & WHI2 & BUD3 & YOR019W & IRA2 & HSP78 & MKT1 & PHM7\\
\hline
\end{tabular}}
\caption{The corresponding gene where the SNP occurs. The SNP with index 6 occurs at a region near the gene ``YOR019W", but not inside the gene.}
\label{tab: location}
\end{table}



On the top panel of Figure \ref{fig: real-data}, we report the CIs for the regression coefficients $\{b^{(l)}_j\}_{1\leq l\leq 5, j\in \mathcal{S}}$. On the middle and bottom panels of Figure \ref{fig: real-data}, we plot our proposed CIs for the maximin effect $[\beta^{*}_{\delta}(\mathbb{Q})]_{j}$ for $j\in \mathcal{S}$ and $\delta\in \{0,0.1,0.5,1\}$. The middle panel corresponds to the no covariate shift setting and the bottom panel to the covariate shift setting with $\Sigma^{\mathbb{Q}}={\rm I}.$ In Figure \ref{fig: real-data}, we observe the three patterns, which are summarized in the following.  

\begin{figure}[htp!]
\centering
\includegraphics[width=0.755\linewidth]{real-data-interpretation}
\caption{ The top panel plots the debiased estimators of $\{b^{(l)}_j\}_{1\leq l\leq 5, j\in \mathcal{S}}$ and the corresponding CIs for $\{b^{(l)}_j\}_{1\leq l\leq 5, j\in \mathcal{S}}$, where $\mathcal{S}$ is the index set of ten pre-selected SNPs in Table \ref{tab: location}. The middle and bottom panels plot respectively the CIs for $\{[\beta^{*}_{\delta}(\mathbb{Q})]_j\}_{j\in \mathcal{S}}$ in the no covariate shift setting and the covariance-shift setting, with $\delta$ varied across $\{0,0.1,0.5,1\}$.}
\label{fig: real-data}
\end{figure}


\begin{enumerate}
\vspace{-2mm}
\item {\it Homogeneous effects.} The effects of SNPs with indexes $1$ to $4$ have (nearly) homogeneous signs across different media. The maximin effects are significant to certain extents, matching with our interpretation that the maximin effect captures the homogeneous effects. The SNP with index 1 is the most significant. The corresponding gene KRE33 is an essential gene for yeast \citep{cherry2012saccharomyces}, which is a gene absolutely required to maintain life provided that all nutrients are available \citep{zhang2009deg}. For SNPs with indexes $2,3,4$, $[\beta^{*}_{\delta}(\mathbb{Q})]_{j}$ are significant for a larger $\delta.$  

\vspace{-3mm}
\item {\it Heterogeneous effects.} For SNPs with $j=5, 6, 7$, the SNPs have significant effects for one or two growth media but have opposite effects or near null effects in other media. The maximin effects are not significant, matching with the interpretation that the maximin effect tends to shrink the effects with heterogeneous signs towards zero. The corresponding genes for index $j=5, 6, 7$ are non-essential genes or genes of unknown function \citep{cherry2012saccharomyces}.
\vspace{-3mm}
\item {\it Near-null Effects.} For $j=8, 9, 10$, the SNPs do not have any significant effect across different growth media. The corresponding maximin effect is not significant. \end{enumerate}

To conclude, our multi-source data analysis demonstrates that the maximin effect captures the homogeneous effects across different environments. Since the SNPs with indexes 1 to 4 have stable and sign-consistent effects across different growth media, the corresponding genes might have some causal interpretation and warrant further investigation.



\section{Conclusion and Discussions}
\label{sec: discussion}
Our proposed covariate shift maximin effect transfers the information from multiple source populations to the unlabelled target population and guarantees excellent predictive performance even for the  adversarially generated target population. This unique way of constructing robust models with heterogenous data creates additional statistical inference challenges. Our proposed sampling approach effectively addresses these challenges and is helpful for addressing other non-regular inference problems. An interesting direction is to study the maximin effects when the linear models in \eqref{eq: multi-group model} are possibly misspecified \citep{wasserman2014discussion,buhlmann2015high}, which is left for future research.

\section*{Supplement}
The supplement contains all proofs and additional methods, theories, and simulation results.
\section*{Acknowledgement}
Z. Guo acknowledges Dr. Peter B{\"u}hlmann, Dr. Tianxi Cai, Dr. Tony Cai, and Dr. Nicolai Meinshausen for their helpful discussions about the definitions and interpretations of the maximin effect and Dr. Minge Xie for the thought-provoking discussion on the sampling method. Z. Guo is grateful to Mr. Zhenyu Wang for the help with simulation studies, to Mr. Molei Liu, Dr. Hou Jue, and Dr. Rong Ma for their helpful comments about an earlier draft.








 \setstretch{0.9}


 \bibliographystyle{chicago}
 
\section{Additional Discussions}
\label{sec: additional discussion}
\begin{itemize}
\item In Section \ref{sec: maximin discussion}, we provide the  proof of \eqref{eq: general maximin} in the main paper.
\item In Section \ref{sec: equi}, we introduce an equivalent definition of the covariate-shift maximin effect from the hypothetical outcome perspective. 
\item In Section \ref{sec: ridge additional}, we show that the ridge-type maximin effect is the solution to a distributional robustness optimization problem.
\item In Section \ref{sec: delta choice}, we present a data-dependent way of choosing $\delta.$
\item In Section \ref{sec: minimax fairness}, we discuss the connection to minimax group fairness.
\item In Section \ref{sec: maximin proj}, we formulate the maximin projection as a form of the covariate-shift maximin effect.
\item In Section \ref{sec: high-dim Gamma}, we provide the details on inference for $\Gamma^{\mathbb{Q}}$ in high dimensions.
\item In Section \ref{sec: high-dim Gamma noshift}, we consider the setting with no covariate shift and present the inference method for $\Gamma^{\mathbb{Q}}$ in high dimensions.

\end{itemize} 

\subsection{Proof of \eqref{eq: general maximin} in the main paper}
\label{sec: maximin discussion}
We start with the proof of \eqref{eq: general maximin} in the main paper. For any $\mathbb{T} \in \mathcal{C}(\mathbb{Q}_{X}),$ we express its conditional outcome model as $\mathbb{T}_{Y|X}=\sum_{l=1}^{L} q_l \cdot \mathbb{P}_{Y|X}^{(l)}$ for some weight vector $q\in \Delta^{L}.$  Then we have \begin{equation}
\begin{aligned}
\mathbf{E}_{\mathbb{T}} Y_i^2-\mathbf{E}_{\mathbb{T}}(Y_i-X_i^{\intercal}\beta)^2=&\mathbf{E}_{\mathbb{T}} \left[2Y_i X_i^{\intercal}\beta-\beta^{\intercal}X_i X_i^{\intercal}\beta \right]\\
=&\mathbf{E}_{X_i\sim \mathbb{Q}_{X}}  \left[\sum_{l=1}^{L} q_l \cdot \mathbf{E}_{Y_i\mid X_i\sim \mathbb{P}^{(l)}_{Y|X}}\left[2Y_i X_i^{\intercal}\beta-\beta^{\intercal}X_i X_i^{\intercal}\beta \right]\right]\\
=&\sum_{l=1}^{L} q_l \cdot \mathbf{E}_{X_i\sim \mathbb{Q}_{X}}  \mathbf{E}_{Y_i\mid X_i\sim \mathbb{P}^{(l)}_{Y|X}}\left[2Y_i X_i^{\intercal}\beta-\beta^{\intercal}X_i X_i^{\intercal}\beta \right].
\end{aligned}
\label{eq: expression mixture}
\end{equation}
By the outcome model \eqref{eq: multi-group model}, we have 
$$\mathbf{E}_{X_i\sim \mathbb{Q}_{X}} \mathbf{E}_{Y_i\mid X_i\sim \mathcal{P}^{(l)}_{Y|X}}\left[2Y_i X_i^{\intercal}\beta-\beta^{\intercal}X_i X_i^{\intercal}\beta \right]=2 b^{(l)}\Sigma^{\mathbb{Q}}\beta-\beta^{\intercal}\Sigma^{\mathbb{Q}}\beta,$$
where $\Sigma^{\mathbb{Q}}=\mathbf{E} X_{1}^{\mathbb{Q}} (X_{1}^{\mathbb{Q}})^{\intercal}.$ 
Together with \eqref{eq: expression mixture} and the definition $\mathbb{B}=\{b^{(1)},\ldots, b^{(L)}\}$, we have 
\begin{equation}
\begin{aligned}
R_{\mathbb{Q}}(\beta)
=\min_{q\in \Delta^{L}}\sum_{l=1}^{L} q_l \cdot \left[2 b^{(l)}\Sigma^{\mathbb{Q}}\beta-\beta^{\intercal}\Sigma^{\mathbb{Q}}\beta\right]=\min_{b\in {\mathbb{B}}} \left[2 b^{\intercal}\Sigma^{\mathbb{Q}}\beta- \beta^{\intercal}\Sigma^{\mathbb{Q}} \beta\right],
\end{aligned}
\label{eq: equivalience}
\end{equation}
where the last equality follows from the fact that the extreme value of the linear function in $q$ is achieved at the boundary points of $\Delta^{L}$. Hence, we show that the covariate-shift maximin effect definitions in \eqref{eq: maximin general shift} and  \eqref{eq: general maximin} in the main paper are equivalent.

For the no-covariate shift setting, we write $\Sigma^{\mathbb{Q}}=\Sigma$ and $\Sigma^{(l)}=\Sigma$ for $1\leq l\leq L.$
Then we have 
$$\min_{1\leq l\leq L}\left\{\mathbf{E} (Y^{(l)}_i)^2-\mathbf{E}(Y^{(l)}_i-[X^{(l)}_i]^{\intercal}\beta)^2\right\}= \min_{1\leq l\leq L}\left[2 [b^{(l)}]^{\intercal}\Sigma \beta- \beta^{\intercal}\Sigma \beta\right].$$
Together with \eqref{eq: equivalience}, in the no covariate-shift setting, we establish the equivalence between the maximin effect in \citet{meinshausen2015maximin},
\begin{equation*}
\beta^{*}\coloneqq\argmax_{\beta\in \mathbb{R}^{p}} R(\beta) \quad \text{with} \quad R(\beta)=\min_{1\leq l\leq L} \left\{\mathbf{E} (Y^{(l)}_i)^2-\mathbf{E}(Y^{(l)}_i-[X^{(l)}_i]^{\intercal}\beta)^2\right\},
\label{eq: def of maximin}
\end{equation*}
and the group distributionally robust definition of the maximin effect, 
\begin{equation*}
\begin{aligned}
\beta^{*}:=\argmax_{\beta\in \mathbb{R}^{p}}\min_{\mathbb{T}\in \mathcal{C}(\mathbb{P}_{X})} \left\{\mathbf{E}_{\mathbb{T}} Y_i^2-\mathbf{E}_{\mathbb{T}}(Y_i-X_i^{\intercal}\beta)^2\right\}.
\end{aligned}
\end{equation*}
\subsection{Covariate-shift Maximin Effect: Definition by Hypothetical Outcome}
\label{sec: equi}
We now introduce another equivalent definition of the covariate-shift maximin effect defined in \eqref{eq: maximin general shift}. 
Consider the hypothetical data generation mechanism, 
\begin{equation}
Y^{*,(l)}_{1}= [X^{\mathbb{Q}}_{1}]^{\intercal}b^{(l)}+ \epsilon^{(l)}_{1} \quad \text{for} \quad 1\leq l\leq L,
\label{eq: hypothetical} 
\end{equation}
where $b^{(l)}$ and $\epsilon^{(l)}_1$ are the same as those in \eqref{eq: multi-group model} and $X^{\mathbb{Q}}_{1}\sim \mathbb{Q}_{X}$. 
We use the super-index $^*$ in $Y^{*,(l)}_{1}$ to denote that the outcome variable is hypothetical instead of being observed. $Y^{*,(l)}_{1}$ stands for the hypothetical outcome that we will observe for a subject with $X^{\mathbb{Q}}_{1}$ being generated from the $l$-th source population. 
Under \eqref{eq: hypothetical}, we define the maximin effect with respect to the covariate distribution $\mathbb{Q}$ as 
\begin{equation}
\beta^{*}(\mathbb{Q})=\argmax_{\beta \in \mathbb{R}^{p}} R_{\mathbb{Q}}(\beta) \quad \text{with}\quad R_{\mathbb{Q}}(\beta)=\min_{1\leq l\leq L} {\left[\mathbf{E}^{*}(Y^{*(l)}_{1})^2-\mathbf{E}^{*}(Y^{*(l)}_{1}-(X_{1}^{\mathbb{Q}})^{\intercal} \beta)^2\right]},
\label{eq: maximin equi}
\end{equation}
where $\mathbf{E}^{*}$ is the expectation taken over the joint distribution of $(Y^{*(l)}_{1},X^{\mathbb{Q}}_{1})$ defined in \eqref{eq: hypothetical}.  
Note that 
$$\min_{1\leq l\leq L} {\left[\mathbf{E}^{*}(Y^{*(l)}_{1})^2-\mathbf{E}^{*}(Y^{*(l)}_{1}-(X_{1}^{\mathbb{Q}})^{\intercal} \beta)^2\right]}=\min_{b\in {\mathbb{B}}} \left[2 b^{\intercal}\Sigma^{\mathbb{Q}}\beta- \beta^{\intercal}\Sigma^{\mathbb{Q}} \beta\right]
.$$
Hence, it follows from \eqref{eq: general maximin} in the main paper that the definition in \eqref{eq: maximin equi} is equivalent to that in \eqref{eq: maximin general shift} in the main paper. 

\subsection{Additional Discussion on Ridge-type Maximin Effect}
\label{sec: ridge additional}

Consider the setting $p\geq L$ and  $\lambda_{L}(\mathcal{B})>0$ with $\mathcal{B}=\begin{pmatrix}b^{(1)},\ldots,b^{(L)}\end{pmatrix}\in \mathbb{R}^{p\times L}$. We conduct the singular value decomposition $\mathcal{B}=U_{p\times L} \Lambda_{L\times L} V^{\intercal}_{L \times L}.$ For $1\leq i\leq N_{\mathbb{Q}}$, the noise vector $W_i\in \mathbb{R}^{p}$ is generated as $W_i=\sqrt{\delta} \cdot U W_i^{0}$ with $W_i^{0}\sim \mathcal{N}({\bf 0}, \Lambda^{-2})$ and $W_i^{0}\in \mathbb{R}^{L}$ being independent of $X^{\mathbb{Q}}_i$. Note that the distribution of $W_i$ depends on the penalty level $\delta$ and the coefficient matrix $\mathcal{B}$. Then we show that the ridge-type maximin effect in \eqref{eq: optimal weight ridge}  in the main paper is the solution to a distributional robust optimization problem,
\begin{equation}
\beta^{*}_{\delta}(\mathbb{Q}):=\argmax_{\beta\in \mathbb{R}^{p}}\min_{\mathbb{T}\in \mathcal{C}(\mathbb{Q}^{\delta}_{X})} \left\{\mathbf{E}_{\mathbb{T}} Y_i^2-\mathbf{E}_{\mathbb{T}}(Y_i-X_i^{\intercal}\beta)^2\right\},
\label{eq: maximin general shift ridge}
\end{equation}
where $\mathbb{Q}^{\delta}_{X}$ denotes the distribution of $X^{\mathbb{Q}}_i+W_i$ and $\mathcal{C}(\mathbb{Q}^{\delta}_{X})$ is defined in \eqref{eq: distribution class shift} with $\mathbb{Q}_{X}$ replaced by $\mathbb{Q}^{\delta}_{X}.$  We now show that the distributional robustness definition of $\beta^{*}_{\delta}(\mathbb{Q})$ in \eqref{eq: maximin general shift ridge} is the same as the definition in \eqref{eq: optimal weight ridge}. By applying Proposition \ref{prop: identification}, we have 
\begin{equation}
\beta^{*}_{\delta}(\mathbb{Q})=\sum_{l=1}^{L}[\gamma_{\delta}^{*}(\mathbb{Q})]_{l} b^{(l)} \quad \text{with}\quad \gamma_{\delta}^{*}(\mathbb{Q})=\arg\min_{\gamma \in \Delta^{L}} \gamma^{\intercal}\Gamma^{\mathbb{Q}^{\delta}} \gamma,
\label{eq: optimal weight ridge explicit}
\end{equation}
where $\Gamma^{\mathbb{Q}^{\delta}}=[\mathcal{B}]^{\intercal}\mathbf{E}(X_i+W_i)(X_i+W_i)^{\intercal}\mathcal{B}.$ Since $W_i\in \mathbb{R}^{p}$ is generated as $W_i=\sqrt{\delta} \cdot U W_i^{0}$ with $W_i^{0}\sim N({\bf 0}, \Lambda^{-2})$ and $W_i^{0}\in \mathbb{R}^{L}$ being independent of $X_i$, we further have 
\begin{equation*}
\begin{aligned}
\Gamma^{\mathbb{Q}^{\delta}}&=[\mathcal{B}]^{\intercal}\mathbf{E}(X_i+W_i)(X_i+W_i)^{\intercal}\mathcal{B}\\
&=[\mathcal{B}]^{\intercal} \Sigma^{\mathbb{Q}}\mathcal{B}+\delta\cdot [\mathcal{B}]^{\intercal}U\Lambda^{-2} U^{\intercal}\mathcal{B}\\
&=[\mathcal{B}]^{\intercal} \Sigma^{\mathbb{Q}}\mathcal{B}+\delta \cdot {\rm I}.
\end{aligned}
\end{equation*}
Combined with \eqref{eq: optimal weight ridge explicit}, we show that the definitions \eqref{eq: maximin general shift ridge} and \eqref{eq: optimal weight ridge} in the main paper are equal.


\subsection{Choice of $\delta$ in the Ridge-type Maximin Effect}
\label{sec: delta choice}
Recall the stability measure (depending on $\delta$) introduced in Section \ref{sec: ridge-type} in the main paper, 
$$
\mathbb{I}(\delta)=\frac{\sum_{m=1}^{M}\|\widehat{\gamma}^{[m]}_{\delta}-\widehat{\gamma}_{\delta}\|^2_2}{\sum_{m=1}^{M} \|\widehat{\Gamma}^{[m]}-\widehat{\Gamma}^{\mathbb{Q}}\|^2_2},$$
where $\{\widehat{\Gamma}^{[m]}\}_{1\leq m\leq M}$ and $\{\widehat{\gamma}^{[m]}_{\delta}\}_{1\leq m\leq M}$ are the resampled estimates defined in \eqref{eq: resampling Gamma} and \eqref{eq: point estimator ridge} in the main paper, respectively. A large value of $\mathbb{I}(\delta)$ indicates that a small error in estimating $\Gamma^{\mathbb{Q}}$ may lead to a much larger error in estimating the weight vector. 

If ${\mathbb{I}}(0)<0.5,$ the maximin effect without the ridge penalty is a stable aggregation and we simply apply the maximin effect without the ridge penalty. If ${\mathbb{I}}(0)>0.5,$ our proposed ridge-type effect with  $\delta>0$ leads to a more stable aggregation. We shall choose $\delta>0$ to balance the stability and the prediction accuracy, which is measured by the reward $R_{\mathbb{Q}}(\beta)$ defined in \eqref{eq: general maximin}. For the aggregation weight $\widehat{\gamma}_{\delta}$ defined in \eqref{eq: point estimator}, we estimate its reward by $\widehat{R}(\widehat{\gamma}_{\delta})=\min_{\gamma\in \Delta^{L}}[2\gamma^{\intercal}\widehat{\Gamma}^{\mathbb{Q}}\widehat{\gamma}_{\delta}-\widehat{\gamma}_{\delta}^{\intercal}\widehat{\Gamma}^{\mathbb{Q}}\widehat{\gamma}_{\delta}],$ and recommend the largest $\delta\in [0,2]$ such that $\widehat{R}(\widehat{\gamma}_{\delta})/\widehat{R}(\widehat{\gamma}_{\delta=0})\geq 0.95.$ See the detailed simulation results in Section \ref{sec: delta choice} in the supplement. 


\subsection{Minimax Group Fairness and Rawlsian Max-min Principle}
\label{sec: minimax fairness}
Fairness is an important consideration for designing the machine learning algorithm. In particular, the algorithm trained to maximize average performance on the training data set might under-serve or even cause harm to a sub-population of individuals \citep{dwork2012fairness}. The goal of the {\it group fairness} is to build a model satisfying a certain fairness notation (e.g. statistical parity) across predefined sub-populations. However, such fairness notation can be typically achieved by downgrading the performance on the benefitted groups without improving the disadvantaged ones \citep{martinez2020minimax,diana2021minimax}.  To address this, \cite{martinez2020minimax,diana2021minimax} proposed the \text{minimax group fairness} algorithm which ensures certain fairness principle and also maximizes the utility for each sub-population.   

We assume that we have access to the i.i.d data $\{Y_i, X_i, A_i\}_{1\leq i\leq n}$, where for the $i$-th observation, $Y_i$ and $X_i\in \mathbb{R}^{p}$ denote the outcome and the covariates, respectively, and $A_i$ denotes the sensitive variable (e.g. age or sex). The training data can be separated into different sub-groups depending on the value of the sensitive variable $A_i.$ For a discrete $A_i$, we use $\mathcal{A}$ to denote the set of all possible values that $A_i$ can take. Then the minimax group fairness can be defined as 
\begin{equation*}
\beta^{\rm mm-fair}:=\arg\min_{\beta} \max_{a\in \mathcal{A}} \mathbf{E}_{Y_i, X_i\mid A_i=a}\ell(Y_i, X_i^{\intercal}\beta)=\argmax_{\beta} \min_{a\in \mathcal{A}} \mathbf{E}_{Y_i, X_i\mid A_i=a}[-\ell(Y_i, X_i^{\intercal}\beta)]
\end{equation*} 
where $\ell(Y_i, X_i^{\intercal}\beta)$ denotes a loss function and $-\ell(Y_i, X_i^{\intercal}\beta)$ can be viewed as a reward/utility function. In terms of utility maximization, the idea of minimax group fairness estimator dates at least back to Rawlsian max-min fairness \citep{rawls2001justice}. 

When the distribution of $X_i$ does not change with the value of $A_i$, then minimax group fairness estimator $\beta^{\rm mm-fair}$ is equivalent to the minimax or the maximin estimator, where the group label is determined by the value of $A_i.$

\subsection{Individualized Treatment Effect: Maximin Projection}
\label{sec: maximin proj}
\citet{shi2018maximin} proposed the maximin projection algorithm to construct the optimal treatment regime for new patients by leveraging training data from different groups with heterogeneity in optimal treatment decision. As explained in \citet{shi2018maximin}, the heterogeneity in optimal treatment decision might come from patients' different enrollment periods and/or the treatment quality from different healthcare centers. 
Particularly, \cite{shi2018maximin} considered that the data is collected from $L$ heterogeneous groups. For the $l$-th group with   $1\leq l\leq L$, let $Y^{(l)}_i\in \mathbb{R}$, $A^{(l)}_{i}$ and $X^{(l)}_{i}\in \mathbb{R}^{p}$ denote the outcome, the treatment and the baseline covariates, respectively. \cite{shi2018maximin} considered the following model for the data in group $l$, 
$$
Y^{(l)}_i=h_{l}(X^{(l)}_{i})+A^{(l)}_{i} \cdot [(b^{(l)})^{\intercal}X^{(l)}_{i}+c]+e^{(l)}_i \quad \text{with}\quad \mathbf{E}(e^{(l)}_i\mid X^{(l)}_{i}, A^{(l)}_{i})=0,
$$
where $h_l: \mathbb{R}^{p}\rightarrow \mathbb{R}$ denotes the unknown baseline function for the group $l$ and the vector $b^{(l)}\in \mathbb{R}^{p}$ describes the individualized treatment effect. 
To address the heterogeneity in optimal treatment regimes, \cite{shi2018maximin} has proposed the maximum projection 
\begin{equation}
\beta^{*,{\rm MP}}=\argmax_{\|\beta\|_2\leq 1} \min_{1\leq l\leq L} \beta^{\intercal}b^{(l)}.
\label{eq: maximin proj}
\end{equation}
After identifying $\beta^{*,{\rm MP}},$ we may construct the treatment regime for a new patient with covariates $x_{\rm new}$ by testing
\begin{equation}
H_0: x_{\rm new}^{\intercal}\beta^{*,{\rm MP}}+c< 0.
\label{eq: DTR maximin test}
\end{equation}
The following Proposition \ref{prop: maximin proj} identifies the maximin projection $\beta^{*,{\rm MP}}.$ Through comparing it with Proposition \ref{prop: identification}, we note that the maximin projection is proportional to the general maximin effect defined in \eqref{eq: general maximin} with $\Sigma^{\mathbb{Q}}={\rm I}$ and hence the identification of $\beta^{*}(\mathbb{I})$ is instrumental in identifying $\beta^{*,{\rm MP}}$, which provides the strong motivation for statistical inference for  $x_{\rm new}^{\intercal}\beta^{*}(\mathbb{I}).$


\begin{Proposition}
The maximum projection $\beta^{*,{\rm MP}}$ in \eqref{eq: maximin proj} satisfies
\begin{equation*}
\beta^{*,{\rm MP}}= \frac{1}{\|\beta^{*}({\mathbb I})\|_2} \beta^{*}({\mathbb I}) \quad \text{with}  \quad \beta^{*}({\mathbb I})=\sum_{l=1}^{L}[\gamma^{*}({\rm I})]_{l} b^{(l)
\end{equation*}
where 
$\gamma^{*}({\mathbb I})=\arg\min_{\gamma \in \Delta^{L}} \gamma^{\intercal} \Gamma^{\mathbb I}\gamma$ and $\Gamma_{lk}^{\mathbb I}=(b^{(l)})^{\intercal}b^{(k)}$ for $1\leq l,k \leq L.$

\label{prop: maximin proj}
\end{Proposition}
We refer to \cite{shi2018maximin} for more details on the maximin projection in the low-dimensional setting.
Our proposed DenseNet sampling method is useful in devising statistical inference methods for $\beta^{*,{\rm MP}}$ in high dimensions.












\subsection{Debiased Estimators of $\Gamma^{\mathbb{Q}}$: Covariate Shift setting}
\label{sec: high-dim Gamma}

We present the details about constructing the debiased estimator ${\widehat{\Gamma}_{l,k}}^{\mathbb{Q}}$ in \eqref{eq: cov est general}.  We use the same notations as in Section \ref{sec: Gamma method}.


We estimate $\{b^{(l)}\}_{1\leq l\leq L}$ by applying Lasso \citep{tibshirani1996regression} to the sub-sample with the index set $A_l$: 
\begin{equation}
\widehat{b}_{init}^{(l)}=\arg\min_{b \in \mathbb{R}^{p}}\frac{\|Y^{(l)}_{A_l}-X^{(l)}_{A_l}b\|_2^2}{2|A_l|}+ {\lambda_l} \sum_{j=1}^{p} \frac{\|X^{(l)}_{A_l, j}\|_2}{\sqrt{|A_l|}} |b_j|, \; \text{with}\; \lambda_l=\sqrt{\frac{(2+c)\log p}{|A_l|}}\sigma_{l}
\label{eq: Lasso splitting
\end{equation}
for some constant $c>0.$ The Lasso estimators $\{\widehat{b}^{(l)}_{init}\}_{1\leq l\leq L}$ are implemented by the R-package \texttt{glmnet} \citep{friedman2010regularization} with tuning parameters $\{\lambda_{l}\}_{1\leq l\leq L}$ chosen by cross validation. We may also construct the initial estimator $\widehat{b}_{init}^{(l)}$ by tuning-free penalized estimators \citep{sun2012scaled, belloni2011square}. Define $$\widehat{\Sigma}^{\mathbb{Q}}=\frac{1}{|B|}\sum_{i\in B} X^{\mathbb{Q}}_{i} (X^{\mathbb{Q}}_{i})^{\intercal},\quad \widehat{\Sigma}^{(l)}=\frac{1}{|B_l|}\sum_{i\in B_l} X^{(l)}_{i} [X^{(l)}_{i}]^{\intercal}, \quad \widetilde{\Sigma}^{\mathbb{Q}}=\frac{1}{|A|}\sum_{i\in A} X^{\mathbb{Q}}_{i}
(X^{\mathbb{Q}}_{i})^{\intercal}.$$
For $1\leq l,k\leq L$, the plug-in estimator $[\widehat{b}_{init}^{(l)}]^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}$ has the error decomposition:
\begin{equation*}
\begin{aligned}
(\widehat{b}_{init}^{(l)})^{\intercal} \widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}-(b^{(l)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k)}&=(\widehat{b}_{init}^{(k)})^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}(\widehat{b}_{init}^{(l)}-b^{(l)})+(\widehat{b}_{init}^{(l)})^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}(\widehat{b}_{init}^{(k)}-b^{(k)})\\
&-(\widehat{b}_{init}^{(l)}-b^{(l)})^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}(\widehat{b}_{init}^{(k)}-b^{(k)})+(b^{(l)})^{\intercal}(\widehat{\Sigma}^{\mathbb{Q}}-\Sigma^{\mathbb{Q}})b^{(k)}.
\end{aligned}
\end{equation*}

Our proposed estimator in \eqref{eq: cov est general} is to correct the plug-in estimator by accurately estimating $(\widehat{b}_{init}^{(k)})^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}(\widehat{b}_{init}^{(l)}-b^{(l)})$ with 
$-\frac{1}{|B_l|}[\widehat{u}^{(l,k)}]^{\intercal}[X^{(l)}_{B_l}]^{\intercal}(Y^{(l)}_{B_l}-X^{(l)}_{B_l}\widehat{b}_{init}^{(l)}),$ where the projection direction $\widehat{u}^{(l,k)}$ is constructed as follows,
\begin{align}
\widehat{u}^{(l,k)}=\;\arg\min_{u\in \mathbb{R}^{p}} u^{\intercal} \widehat{\Sigma}^{(l)} u \quad \text{subject to}&\; \|\widehat{\Sigma}^{(l)} u-\omega^{(k)}\|_{\infty} \leq  \|\omega^{(k)}\|_{2} \mu_{l} \label{eq: constraint 1}\\
&\; \left|[\omega^{(k)}]^{\intercal}\widehat{\Sigma}^{(l)} u-\|\omega^{(k)}\|_2^2\right|\leq \|\omega^{(k)}\|_2^2\mu_{l} \label{eq: constraint 2}\\
&\; \left\|X_{B_l} u\right\|_{\infty}\leq \|\omega^{(k)}\|_2 \tau_l \label{eq: constraint 3}
\end{align}
with $\mu_{l}\asymp \sqrt{\log p/|B_l|}$, $\tau_l\asymp \sqrt{\log n_l},$ and 
\begin{equation}
\omega^{(k)}=\widetilde{\Sigma}^{\mathbb{Q}} \widehat{b}_{init}^{(k)}\in \mathbb{R}^{p}.
\label{eq: omega k}
\end{equation}
Similarly, we approximate the bias $(\widehat{b}_{init}^{(l)})^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}(\widehat{b}_{init}^{(k)}-b^{(k)})$  by 
$-\frac{1}{|B_k|}[\widehat{u}^{(k,l)}]^{\intercal}[X^{(k)}_{B_k}]^{\intercal}(Y^{(k)}_{B_k}-X^{(k)}_{B_k}\widehat{b}_{init}^{(k)}).$


In the following, we detail why the bias component $(\widehat{b}_{init}^{(k)})^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}(\widehat{b}_{init}^{(l)}-b^{(l)})$ can be accurately approximated by $-\frac{1}{|B_l|}[\widehat{u}^{(l,k)}]^{\intercal}[X^{(l)}_{B_l}]^{\intercal}(Y^{(l)}_{B_l}-X^{(l)}_{B_l}\widehat{b}_{init}^{(l)}).$ The corresponding  approximation error is
\begin{equation}
-\frac{1}{|B_l|}[\widehat{u}^{(l,k)}]^{\intercal}[X^{(l)}_{B_l}]^{\intercal}\epsilon^{(l)}_{B_l}+ [\widehat{\Sigma}^{(l)}\widehat{u}^{(l,k)}-\widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}]^{\intercal}(\widehat{b}_{init}^{(l)}-b^{(l)}).
\label{eq: appro illustration}
\end{equation}





In the following, we provide intuitions on why the projection direction $\widehat{u}^{(l,k)}$ proposed in \eqref{eq: constraint 1}, \eqref{eq: constraint 2} and \eqref{eq: constraint 3} ensures a small approximation error in \eqref{eq: appro illustration}. The objective $u^{\intercal} \widehat{\Sigma}^{(l)} u$ in \eqref{eq: constraint 1} is proportional to the variance of the first term in \eqref{eq: appro illustration}. The constraint set in \eqref{eq: constraint 1} implies $
\widehat{\Sigma}^{(l)}\widehat{u}^{(l,k)}-\widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}\approx \widehat{\Sigma}^{(l)}\widehat{u}^{(l,k)}-\omega^{(k)}\approx {\bf 0},$ which guarantees the second term of \eqref{eq: appro illustration} to be small. 
The additional constraint \eqref{eq: constraint 2} is seemingly useless to control the approximation error in \eqref{eq: appro illustration}. However, this additional constraint ensures that the first term in \eqref{eq: appro illustration} dominates the second term in \eqref{eq: appro illustration}, which is critical in constructing an asymptotically normal estimator of $\Gamma^{\mathbb{Q}}_{l,k}.$ The additional constraint \eqref{eq: constraint 2} is particularly useful in the covariate shift setting, that is, $\Sigma^{(l)}\neq \Sigma^{\mathbb{Q}}$ for some $1\leq l\leq L.$ The last constraint \eqref{eq: constraint 3} is useful in establishing the asymptotic normality of the debiased estimator for non-Gaussian errors. We believe that the constraint \eqref{eq: constraint 3} is only needed for technical reasons. 


To construct $\widehat{u}^{(l,k)}$ in \eqref{eq: cov est general}, we solve the dual problem of \eqref{eq: constraint 1} and \eqref{eq: constraint 2}, 
\begin{equation}
\widehat{h}=\arg\min_{h \in \mathbb{R}^{p+1}} h^{\intercal} H^{\intercal}\widehat{\Sigma}^{(l)}H h/4+(\omega^{(k)})^{\intercal} H h/{\|\omega^{(k)}\|_2}+\lambda \|h\|_1\;\text{with}\; H=\left[\begin{matrix} {\omega^{(k)}}/{\|\omega^{(k)}\|_2}  , \mathbf{I}_{p\times p} \end{matrix} \right], 
\label{eq: dual problem}
\end{equation}
where we adopt the notation $0/0=0$. The objective value of this dual problem is unbounded from below when $H^{\intercal}\widehat{\Sigma}^{(l)}H$ is singular and $\lambda$ is near zero. We choose the smallest $\lambda>0$ such that the dual problem is bounded from below and construct $\widehat{u}^{(l,k)}=-\tfrac{1}{2}(\widehat{h}_{-1}+\widehat{h}_1 {\omega^{(k)}}/{\|\omega^{(k)}\|_2}).$ 



\begin{Remark}[Known $\Sigma^{\mathbb{Q}}$]\rm
If $\Sigma^{\mathbb{Q}}$ is known, we modify ${\widehat{\Gamma}_{l,k}}^{\mathbb{Q}}$ in \eqref{eq: cov est general} by replacing $\widehat{\Sigma}^{\mathbb{Q}}$ by $\Sigma^{\mathbb{Q}}$  and $\omega^{(k)}$ in \eqref{eq: omega k} by $\omega^{(k)}=\Sigma^{\mathbb{Q}}\widehat{b}_{init}^{(k)}.$ This estimator (with known $\Sigma^{\mathbb{Q}}$) is of a smaller variance as there is no uncertainty of estimating $\Sigma^{\mathbb{Q}};$ see Figure \ref{fig: method comparison} in the main paper for numerical comparisons. 
\label{rem: known SigmaQ}
\end{Remark}



In the following, we provide the theoretical guarantee of our proposed estimator $\widehat{\Gamma}^{\mathbb{Q}}_{l,k}.$
Define \begin{equation}
{\bf V}_{\pi(l_1,k_1),\pi(l_2,k_2)}={\bf V}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}+{\bf V}^{(b)}_{\pi(l_1,k_1),\pi(l_2,k_2)},
\label{eq: cov def}
\end{equation}
with 
\begin{equation}
\begin{aligned}
{\bf V}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}&=\frac{\sigma_{l_1}^2}{|B_{l_1}|}(\widehat{u}^{(l_1,k_1)})^{\intercal}\widehat{\Sigma}^{(l_1)} \left[\widehat{u}^{(l_2,k_2)} {\bf 1}(l_2=l_1)+\widehat{u}^{(k_2,l_2)} {\bf 1}(k_2=l_1)\right]\\
&+\frac{\sigma_{k_1}^2}{|B_{k_1}|}(\widehat{u}^{(k_1,l_1)})^{\intercal}\widehat{\Sigma}^{(k_1)} \left[\widehat{u}^{(l_2,k_2)} {\bf 1}(l_2=k_1)+\widehat{u}^{(k_2,l_2)} {\bf 1}(k_2=k_1)\right],
\end{aligned}
\label{eq: cov def a}
\end{equation}
and
\begin{equation}
{\bf V}^{(b)}_{\pi(l_1,k_1),\pi(l_2,k_2)}=\frac{1}{|B|}(\mathbf{E} [b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(k_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(l_2)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(k_2)}]^{\intercal}X_{i}^{\mathbb{Q}}-(b^{(l_1)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k_1)}(b^{(l_2)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k_2)}).
\label{eq: cov def b}
\end{equation}

We introduce some extra notations. For random objects $X_1$ and $X_2$, we use $X_1\stackrel{d}{=}X_2$ to denote that they are equal in distribution. 
For a sequence of random variables $X_n$ indexed by $n$, we use $X_n \overset{p}{\to} X$ and $X_{n} \overset{d}{\to} X$ to represent that $X_n$ converges to $X$ in probability and in distribution, respectively. 

The following proposition shows that the entry-wise estimation error $\widehat{\Gamma}^{\mathbb{Q}}_{l,k}-\Gamma^{\mathbb{Q}}_{l,k}$ can be approximated by a normal random variable. The proof of the following proposition can be found in Section \ref{sec: covariate shift proof 1}. 

\begin{Proposition} Consider the model \eqref{eq: multi-group model}. Suppose Condition {\rm (A1)} holds, $\tfrac{s \log p}{\min\{n,N_{\mathbb{Q}}\}} \rightarrow 0$ with $n=\min_{1\leq l\leq L} n_{l}$ and $s=\max_{1\leq l\leq L}\|b^{(l)}\|_0$. Then the proposed estimator $\widehat{\Gamma}^{\mathbb{Q}}_{l,k}\in \mathbb{R}^{L\times L}$ in \eqref{eq: cov est general} in the main paper satisfies 
$
\widehat{\Gamma}^{\mathbb{Q}}_{l,k}-\Gamma^{\mathbb{Q}}_{l,k}=D_{l,k}+{\rm Rem}_{l,k}, 
$ where
\begin{equation}
\frac{D_{l,k}}{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}\overset{d}{\to} \mathcal{N}(0,1),
\label{eq: limiting univariate}
\end{equation} 
with ${\bf V}$ defined in \eqref{eq: cov def}; for $1\leq l,k\leq L,$ with probability larger than $1-\min\{n,p\}^{-c}$ for a constant $c>0,$  the reminder term ${\rm Rem}_{l,k}$ satisfies \begin{equation}
\left|{\rm Rem}_{l,k}\right|\lesssim (1+\|\omega^{(k)}\|_2+\|\omega^{(l)}\|_2)\frac{s\log p}{n} +(\|b^{(k)}\|_2+\|b^{(l)}\|_2)\sqrt{\frac{s (\log p)^2}{n N_{\mathbb{Q}}}},
\label{eq: bias}
\end{equation}
where  $c>0$ is a positive constant and $\omega^{(k)}$ and $\omega^{(l)}$ are defined in \eqref{eq: omega k}. 
\label{prop: limiting Gamma univariate}
\end{Proposition}


We control the diagonal of the covariance matrix ${\bf V}$ in the following proposition, whose proof can be found in Section \ref{sec: variance bound}.

\begin{Proposition}
Suppose that the assumptions of Proposition \ref{prop: limiting Gamma univariate} hold. Then with probability larger than $1-\min\{n,p\}^{-c}$, the diagonal element ${{\bf V}}_{\pi(l,k),\pi(l,k)}$ in \eqref{eq: cov def} for $(l,k)\in \mathcal{I}_{L}$ satisfies,
\begin{equation}
\frac{\|\omega^{(l)}\|^2_2}{n_k} +\frac{\|\omega^{(k)}\|^2_2}{n_l} \lesssim{{\bf V}}^{(a)}_{\pi(l,k),\pi(l,k)}\lesssim \frac{\|\omega^{(l)}\|^2_2}{n_k} +\frac{\|\omega^{(k)}\|^2_2}{n_l},\quad {{\bf V}}^{(b)}_{\pi(l,k),\pi(l,k)}\lesssim {\frac{\|b^{(l)}\|^2_2\|b^{(k)}\|^2_2}{{N_{\mathbb{Q}}}}},
\label{eq: diagonal order}
\end{equation}
where $c>0$ is a positive constant and $\omega^{(l)}$ and $\omega^{(k)}$ are defined in \eqref{eq: omega k}.
\begin{itemize} 
\item If $\Sigma^{\mathbb{Q}}$ is known, then with probability larger than $1-\min\{n,p\}^{-c},$
$$
n\cdot {{\bf V}}_{\pi(l,k),\pi(l,k)} \lesssim \|b^{(k)}\|_2^2+\|b^{(l)}\|_2^2+s\log p/n.
$$
\item If $\Sigma^{\mathbb{Q}}$ is unknown, then with probability larger than $1-\min\{n,p\}^{-c},$ {\small
\begin{equation}
n\cdot {{\bf V}}_{\pi(l,k),\pi(l,k)}\lesssim \left(1+{\frac{p}{N_{\mathbb{Q}}}}\right)^2\left(\|b^{(k)}\|_2^2+\|b^{(l)}\|_2^2+s\frac{\log p}{n}\right)+\frac{n}{N_{\mathbb{Q}}}\|b^{(l)}\|^2_2\|b^{(k)}\|^2_2.
\label{eq: variance 1}
\end{equation}}
\end{itemize}
\label{prop: general variance}
\end{Proposition}

The above proposition controls the variance ${{\bf V}}_{\pi(l,k),\pi(l,k)}$ of $\widehat{\Gamma}^{\mathbb{Q}}_{l,k}$ for the covariate shift setting. For known $\Sigma^{\mathbb{Q}}$, we show that the diagonal elements of ${\bf V}$ is of order $1/n$ if $\max_{1\leq l\leq L}\|b^{(l)}\|_2$ is bounded and $s\lesssim n/\log p$. If the matrix $\Sigma^{\mathbb{Q}}$ is estimated from the data, then \eqref{eq: variance 1} shows that the diagonal elements of ${\bf V}$ is of order $1/{n}$ under the additional assumption $N_{\mathbb{Q}}\gtrsim \max\{p,n\}$. This requires a relatively large sample size $N_{\mathbb{Q}}$ of the unlabelled covariate data for the target population while $\{n_{l}\}_{1\leq l\leq L}$ are allowed to be much smaller than $p.$ 
\begin{Remark}[Related literature]\rm
We shall discuss briefly a few related works on quadratic functional inference in high dimensions. \cite{verzelen2018adaptive, cai2020semisupervised,guo2019group} considered inference for quadratic functionals in a single high-dimensional linear model while  \cite{guo2019optimal} proposed debiased estimators of $[b^{(j)}]^{\intercal}b^{(k)}$ for $1\leq j,k\leq L.$ The main challenge in the covariate shift setting is that $\Sigma^{(l)}\neq \Sigma^{\mathbb{Q}}$ for some $1\leq l\leq L$ and $\omega^{(k)}=\widetilde{\Sigma}^{\mathbb{Q}} \widehat{b}_{init}^{(k)}\in \mathbb{R}^{p}$ can be an arbitrarily dense vector. To address this, the additional constraint \eqref{eq: constraint 2} is proposed to construct a valid projection direction in \eqref{eq: constraint 1}.
\end{Remark} 


\subsection{Debiased Estimators of $\Gamma^{\mathbb{Q}}$ : No Covariate Shift setting}
\label{sec: high-dim Gamma noshift}
A few simplifications can be made when there is no covariate shift. For $1\leq l\leq L$, we estimate $b^{(l)}$ by applying Lasso to the whole data set $(X^{(l)},Y^{(l)})$: 
\begin{equation}
\widehat{b}^{(l)}=\arg\min_{b \in \mathbb{R}^{p}} \|Y^{(l)}-X^{(l)}b\|_2^2/(2n_l)+\lambda_{l}\sum_{j=1}^{p} {\|X^{(l)}_{\cdot,j}\|_2}/{\sqrt{n_l}} \cdot |b_j|
\label{eq: Lasso}
\end{equation}
with $\lambda=\sqrt{(2+c)\log p/n_l} \sigma_l$ for some constant $c>0.$
Since $\Sigma^{(l)}=\Sigma^{\mathbb{Q}}$ for $1\leq l\leq L$, we define $$
\widehat{\Sigma}=\frac{1}{\sum_{l=1}^{L} n_l+N_{\mathbb{Q}}}\left(\sum_{l=1}^{L}
\sum_{i=1}^{n_l} X^{(l)}_{i}[X^{(l)}_{i}]^{\intercal} +\sum_{i=1}^{N_{\mathbb{Q}}} X^{(l)}_{i}[X^{(l)}_{i}]^{\intercal}\right)
$$
and estimate $\Gamma_{l,k}$ by \begin{equation}
{\widehat{\Gamma}_{l,k}}^{\mathbb{Q}}=(\widehat{b}^{(l)})^{\intercal} \widehat{\Sigma}\widehat{b}^{(k)}+(\widehat{b}^{(l)})^{\intercal}\frac{1}{n_k}[X^{(k)}]^{\intercal}(Y^{(k)}-X^{(k)}\widehat{b}^{(k)})+(\widehat{b}^{(k)})^{\intercal}\frac{1}{n_l}[X^{(l)}]^{\intercal}(Y^{(l)}-X^{(l)}\widehat{b}^{(l)}).
\label{eq: inner est}
\end{equation} 
This estimator can be viewed as a special case of \eqref{eq: cov est general} by taking $\widehat{u}^{(l,k)}$ and $\widehat{u}^{(k,l)}$ as $\widehat{b}^{(k)}$ and $\widehat{b}^{(l)}$, respectively. Neither the optimization in \eqref{eq: constraint 1} and \eqref{eq: constraint 2} nor the sample splitting is needed for constructing the debiased estimator in the no covariate shift setting. 


Define $N=\sum_{l=1}^{L}n_l+N_{\mathbb{Q}}$ 
and the covariance matrices ${\bf V}=({\bf V}_{\pi(l_1,k_1),\pi(l_2,k_2)})_{(l_1,k_1)\in \mathcal{I}_{L},(l_2,k_2)\in \mathcal{I}_{L}}\in \mathbb{R}^{L(L+1)/2\times L(L+1)/2}$ for $j=1,2$ as
\begin{equation}
{\bf V}_{\pi(l_1,k_1),\pi(l_2,k_2)}={\bf V}^{(1)}_{\pi(l_1,k_1),\pi(l_2,k_2)}+{\bf V}^{(2)}_{\pi(l_1,k_1),\pi(l_2,k_2)},
\label{eq: cov def no shift}
\end{equation}
with 
\begin{equation}
\begin{aligned}
{\bf V}^{(1)}_{\pi(l_1,k_1),\pi(l_2,k_2)}&=\frac{\sigma_{l_1}^2}{n_{l_1}^2}[b^{(k_1)}]^{\intercal}\mathbf{E} \left([X^{(l_1)}]^{\intercal}  \left[X^{(l_2)}b^{(k_2)} {\bf 1}(l_2=l_1)+X^{(k_2)}b^{(l_2)} {\bf 1}(k_2=l_1)\right]\right)\\
&+\frac{\sigma_{k_1}^2}{n_{l_1}^2}[b^{(l_1)}]^{\intercal}\mathbf{E} \left([X^{(k_1)}]^{\intercal} \left[X^{(l_2)} b^{(k_2)} {\bf 1}(l_2=k_1)+X^{(k_2)}b^{(l_2)} {\bf 1}(k_2=k_1)\right]\right),
\end{aligned}
\label{eq: cov def 1}
\end{equation}
{\small
\begin{equation}
{\bf V}^{(2)}_{\pi(l_1,k_1),\pi(l_2,k_2)}=\frac{\mathbf{E} [b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(k_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(l_2)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(k_2)}]^{\intercal}X_{i}^{\mathbb{Q}}-(b^{(l_1)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k_1)}(b^{(l_2)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k_2)}}{N}.
\label{eq: cov def 2}
\end{equation}}
In the following proposition, we establish the properties of the estimator $\widehat{\Gamma}_{l,k}^{\mathbb{Q}}$ in \eqref{eq: inner est} for no covariate shift setting, whose proof is presented in Section \ref{sec: prop 8 proof}. 
\begin{Proposition}
Consider the model \eqref{eq: multi-group model}. Suppose Condition {\rm (A1)} holds and ${s \log p}/{{n}} \rightarrow 0$ with $n=\min_{1\leq l\leq L} n_{l}$ and $s=\max_{1\leq l\leq L}\|b^{(l)}\|_0$. If  $\{X^{(l)}_{i}\}_{1\leq i\leq n_l} \stackrel{i.i.d.}{\sim}{\mathbb{Q}_{X}}$ for $1\leq l\leq L,$ then the estimator $\widehat{\Gamma}_{l,k}^{\mathbb{Q}}$ defined in \eqref{eq: inner est} satisfies $$\widehat{\Gamma}_{l,k}^{\mathbb{Q}}-{\Gamma}_{l,k}^{\mathbb{Q}}=D_{l,k}+{\rm Rem}_{l,k},$$ where
$
\frac{D_{l,k}}{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}\overset{d}{\to} \mathcal{N}(0,1);
$ for $1\leq l,k\leq L,$ with probability larger than $1-\min\{n,p\}^{-c}$ for a constant $c>0,$  the reminder term ${\rm Rem}_{l,k}$ satisfies 
\begin{equation}
\left|{\rm Rem}_{l,k}\right|\lesssim (1+\|b^{(k)}\|_2+\|b^{(l)}\|_2)\cdot \frac{s\log p}{n}.
\label{eq: bias no shift}
\end{equation}
With probability larger than $1-p^{-c}$ for a positive constant $c>0,$ for any $(l,k)\in \mathcal{I}_{L},$
\begin{equation} 
{{\bf V}}^{(1)}_{\pi(l,k),\pi(l,k)} \asymp \frac{\|{b}^{(k)}\|_2^2+\|{b}^{(k)}\|_2^2}{n} \quad \text{and}\quad {{\bf V}}^{(2)}_{\pi(l,k),\pi(l,k)}\lesssim \frac{\|b^{(l)}\|^2_2\|b^{(k)}\|^2_2}{\sum_{l=1}^{L}n_{l}+N_{\mathbb{Q}}}.
\label{eq: variance no shift}
\end{equation}
\label{prop: limiting Gamma no shift}
\end{Proposition}


We estimate the covariance between $\widehat{\Gamma}^{\mathbb{Q}}_{l_1,k_1}-{\Gamma}^{\mathbb{Q}}_{l_1,k_1}$ and $\widehat{\Gamma}^{\mathbb{Q}}_{l_2,k_2}-{\Gamma}^{\mathbb{Q}}_{l_2,k_2}$ by 
\begin{equation}
\widehat{{\bf V}}_{\pi(l_1,k_1),\pi(l_2,k_2)}=\widehat{{\bf V}}^{(1)}_{\pi(l_1,k_1),\pi(l_2,k_2)}+\widehat{{\bf V}}^{(2)}_{\pi(l_1,k_1),\pi(l_2,k_2)}
\label{eq: cov def no shift estimation}
\end{equation} 
where {\begin{equation*}
\begin{aligned}
\widehat{{\bf V}}^{(1)}_{\pi(l_1,k_1),\pi(l_2,k_2)}&=\frac{\widehat{\sigma}_{l_1}^2}{n_{l_1}^2}[b^{(l_1)}]^{\intercal}[X^{(l_1)}]^{\intercal} X^{(l_1)} \left[b^{(l_2)} {\bf 1}(l_2=l_1)+b^{(k_2)} {\bf 1}(k_2=l_1)\right]\\
&+\frac{\widehat{\sigma}_{k_1}^2}{n_{k_1}^2}[b^{(k_1)}]^{\intercal}[X^{(k_1)}]^{\intercal} X^{(k_1)}\left[b^{(l_2)} {\bf 1}(l_2=k_1)+b^{(k_2)} {\bf 1}(k_2=k_1)\right]
\end{aligned}
\label{eq: cov def 1 est}
\end{equation*}
{\small
\begin{equation*}
\begin{aligned}
&\widehat{{\bf V}}^{(2)}_{\pi(l_1,k_1),\pi(l_2,k_2)}={\frac{\sum_{i=1}^{N_{\mathbb{Q}}} \left((\widehat{b}^{(l_1)})^{\intercal} X_{i}^{\mathbb{Q}} (\widehat{b}^{(k_1)})^{\intercal}X_{i}^{\mathbb{Q}}(\widehat{b}^{(l_2)})^{\intercal} X_{i}^{\mathbb{Q}} (\widehat{b}^{(k_2)})^{\intercal}X_{i}^{\mathbb{Q}} -(\widehat{b}^{(l_1)})^{\intercal}\widehat{\Sigma}\widehat{b}^{(k_1)}(\widehat{b}^{(l_2)})^{\intercal}\widehat{\Sigma}\widehat{b}^{(k_2)}\right)}{(\sum_{l=1}^{L}n_{l}+N_{\mathbb{Q}})^2}}\\
&+{\frac{\sum_{l=1}^{L}\sum_{i=1}^{n_l} \left((\widehat{b}^{(l_1)})^{\intercal} X^{(l)}_{i} (\widehat{b}^{(k_1)})^{\intercal}X^{(l)}_{i}(\widehat{b}^{(l_2)})^{\intercal} X^{(l)}_{i} (\widehat{b}^{(k_2)})^{\intercal}X^{(l)}_{i} -(\widehat{b}^{(l_1)})^{\intercal}\widehat{\Sigma}\widehat{b}^{(k_1)}(\widehat{b}^{(l_2)})^{\intercal}\widehat{\Sigma}\widehat{b}^{(k_2)}\right)}{(\sum_{l=1}^{L}n_{l}+N_{\mathbb{Q}})^2}}
\end{aligned}
\label{eq: cov def 2 est}
\end{equation*}}
}
with $$
\widehat{\Sigma}=\frac{1}{\sum_{l=1}^{L}n_{l}+N_{\mathbb{Q}}}\left(\sum_{l=1}^{L}
\sum_{i=1}^{n_l} X^{(l)}_{i}[X^{(l)}_{i}]^{\intercal} +\sum_{i=1}^{N_{\mathbb{Q}}} X^{(l)}_{i}[X^{(l)}_{i}]^{\intercal}\right).$$






\section{Inference Challenges with Bootstrap and Subsampling}
\label{sec: non-regularity challenge}
We demonstrate the challenges of confidence interval construction for the maximin effects with bootstrap and subsampling methods. 
\subsection{Simulation Settings (I-1) to (I-10)} 
\label{sec: I settings}
We focus on the no covariate shift setting with $\Sigma^{(l)} = {\bf I}_p$ for $1\leq l\leq L$ and $\Sigma^{\mathbb{Q}}={\bf I}_p$. In the following, we describe how to generate the settings (I-1) to (I-6) with non-regularity and instability. We set $L=4$. For $1\leq l \leq L$, we generate $b^{(l)}$ as $b^{(l)}_j = j/20+ \kappa^{(l)}_j$  for $1\leq j \leq 5$  with  $\{\kappa^{(l)}_j\}_{1\leq j\leq 5} \stackrel{i.i.d.}{\sim} \mathcal{N}(0, \sigma_{\rm irr}^2)$, $b^{(l)}_j = j/20$ for $6\leq j \leq 10$, and $b^{(l)}_j=0$ for $11\leq j\leq p$. Set $[x_{\rm new}]_{j}=1$ for $1\leq j\leq 5$ and zero otherwise.  
We choose the following six combinations of $\sigma_{\rm irr}$ and the random seed for generating $\kappa^{(l)}_j,$
\begin{enumerate}
\item[] (I-1) $\sigma_{\rm irr}=0.05$, ${\rm seed}=42$; (I-2) $\sigma_{\rm irr}=0.05$, ${\rm seed}=20$; (I-3) $\sigma_{\rm irr}=0.10$, ${\rm seed}=36$;
\item[](I-4) $\sigma_{\rm irr}=0.15$, ${\rm seed}=17$; (I-5) $\sigma_{\rm irr}=0.20$, ${\rm seed}=12$; (I-6) $\sigma_{\rm irr}=0.25$, ${\rm seed}=31$.
\end{enumerate}
In addition, we generate the following non-regular settings:  \begin{enumerate}
\item[(I-7)] $L=2$; $b^{(1)}_1=2$, $b^{(1)}_j=j/40$ for $2\leq j \leq 10$ and $b^{(1)}_j=0$ otherwise; $b^{(2)}_1=-0.03$, $b^{(2)}_j=j/40$ for $2\leq j\leq 10$ and $b^{(1)}_j=0$ otherwise; ${x_{\rm new}}=e_1.$
\item[(I-8)] Same as (I-7) except for $b^{(l)}_j=(10-j)/40$ for $11\leq j\leq 20$ and $l=1,2$;
\item [(I-9)] Same as (I-7) except for $b^{(l)}_j=1 $ for $2\leq j\leq 30$ and $l=1,2$.
\end{enumerate}
Finally, we generate (I-10) as a favorable setting without non-regularity or instability.
\begin{enumerate}
\item[(I-10)] $L=2$; $b^{(1)}_j=j/20$ for $1\leq j\leq 10$, $b^{(2)}_j=-j/20$ for $1\leq j \leq10$; $[{x_{\rm new}}]_{j}=j/5$ for $1\leq j\leq 5$ and $[{x_{\rm new}}]_{j}=0$ otherwise.
\end{enumerate}











\subsection{Challenges for Bootstrap and Subsampling: Numerical Evidence}
\label{sec: low-dim method}

In Section \ref{sec: instability simulation}, we have reported the under-coverage of the normality CIs in high dimensions.  In the following, we explore a low dimensional setting with $p=30$ and $n_1=\cdots=n_{L}=n=1000$. We shall compare our proposed CI, the CI assuming asymptotic normality \citep{rothenhausler2016confidence}, and CIs by the subsampling or bootstrap methods. We describe these methods in the following. 

\paragraph{DenseNet sampling for low dimensions.}
Our proposed methods can be extended to the low dimensional setting by replacing the projection defined in $\widehat{u}^{(l,k)}$ defined in \eqref{eq: constraint 1} to \eqref{eq: constraint 3} by $\widehat{u}^{(l,k)}=[\widehat{\Sigma}^{(l)} ]^{-1}\omega^{(k)}.$ In low dimensions, we can also simplify the point estimator in \eqref{eq: point estimator} by 
\begin{equation}
\widehat{x_{\rm new}^{\intercal}\beta^{*}}=\sum_{l=1}^{L} \widehat{\gamma}_{l}\cdot x_{\rm new}^{\intercal}\widehat{b}^{(l)}_{\rm OLS},
\label{eq: point estimator low}
\end{equation}
where $\widehat{\gamma}$ is {defined in} \eqref{eq: point estimator} and $\widehat{b}^{(l)}_{\rm OLS}$ is the ordinary least square estimator computed by $(X^{(l)},Y^{(l)}).$ 



\paragraph{Magging estimator and CI assuming asymptotic normality.}
In low-dimensional setting, the Magging estimator has been proposed in \citet{buhlmann2015magging} to estimate the maximin effect. 
In low dimensions, the regression vector $b^{(l)}$ is estimated by the ordinary least square estimator $\widehat{b}^{(l)}_{\rm OLS}$ for $1\leq l\leq L$ and the covariance matrix $\Sigma$ is estimated by the sample covariance matrix 
$$\widehat{\Sigma}=\frac{1}{\sum_{l=1}^{L}n_l} \sum_{l=1}^{L}\sum_{i=1}^{n} X^{(l)}_i [X^{(l)}_i]^{\intercal}.$$ 
Then the Magging estimator in low dimension is of the form,
\begin{equation}
\widehat{\beta}^{\rm magging}=\sum_{l=1}^{L}\widehat{\gamma}_{l} \widehat{b}_{\rm OLS}^{(l)} \quad \text{with}\quad \widehat{\gamma}\coloneqq \arg\min_{\gamma \in \Delta^{L}} \gamma^{\intercal}\widehat{\Gamma}\gamma
\label{eq: optimal weight low}
\end{equation}
where $\widehat{\Gamma}_{lk}=(\widehat{b}_{\rm OLS}^{(l)})^{\intercal}\widehat{\Sigma} \widehat{b}_{\rm OLS}^{(k)}$ for $1\leq l,k \leq L$ and $\Delta^{L}=\{\gamma\in \mathbb{R}^{L}: \gamma_j\geq0,\; \sum_{j=1}^{L}\gamma_j=1\}$ is the simplex over $\mathbb{R}^{L}$.  Implied by Proposition \ref{prop: identification}, if $\lambda_{\min}(\widehat{\Sigma})>0,$ then the Magging estimator can be expressed in the equivalent form,
\begin{equation}
\begin{aligned}
\widehat{\beta}^{\rm magging}=\argmax_{\beta\in \mathbb{R}^{p}} \widehat{R}(\beta) \quad \text{with} \quad \widehat{R}(\beta)=\min_{b\in \widehat{{\mathbb{B}}}} \left[2 b^{\intercal}\widehat{\Sigma}\beta- \beta^{\intercal}\widehat{\Sigma} \beta\right],
\end{aligned}
\label{eq: general maximin low}
\end{equation}
where $\widehat{{\mathbb{B}}}=\{\widehat{b}_{\rm OLS}^{(1)},\ldots, \widehat{b}_{\rm OLS}^{(L)}\}.$ In the expression \eqref{eq: general maximin low}, the Magging estimator can be viewed as optimizing a plug-in estimator of the reward $R(\beta)$, where $\Sigma$ is estimated by $\widehat{\Sigma}$ and $b^{(l)}$ is estimated by $\widehat{b}^{(l)}_{\rm OLS}$ for $1\leq l\leq L.$






\citet{rothenhausler2016confidence} have established the asymptotic normality of the magging estimator under certain conditions, which essentially ruled out the non-regularity and instability settings. In the following, we shall show that the CI assuming asymptotic normality fails to provide valid inference for the low-dimensional maximin effects in the presence of non-regularity or instability. In particular, we construct a normality CI of the form 
\begin{equation}
(x_{\rm new}^{\intercal}\widehat{\beta}^{\rm magging}-1.96\cdot \widehat{\rm SE},x_{\rm new}^{\intercal}\widehat{\beta}^{\rm magging}+1.96\cdot \widehat{\rm SE}),
\label{eq: normality CI low}
\end{equation}
 where  $\widehat{\rm SE}$ denotes the sample standard deviation of $x_{\rm new}^{\intercal}\widehat{\beta}^{\rm magging}$ calculated based on $500$ simulations. Since $\widehat{\rm SE}$ is calculated in an oracle way, this normality CI is a favorable implementation of the CI construction in \citet{rothenhausler2016confidence}. 

\paragraph{Bootstrap and subsampling.} We briefly describe the implementation of the bootstrap and subsampling methods. We compute the point estimator for the original data as in \eqref{eq: optimal weight low}, denoted as $\hat{\theta}$. For $1\leq l\leq L,$ we randomly sample $m$ observations (with/without replacement) from $(X^{(l)},Y^{(l)})$ and use this generated sample to compute the point estimator $\hat{\theta}^{m,j}$ as in \eqref{eq: optimal weight low}. We conduct the random sampling $500$ times to obtain $\{\hat{\theta}^{m,j}\}_{1\leq j\leq 500}$ and define the empirical CDF as,
\begin{equation*}
    L_n(t) = \frac{1}{500} \sum_{j=1}^{500} {\bf 1}\left(\sqrt{m}(\hat{\theta}^{m,j} - \hat{\theta}) \leq t \right),
\end{equation*}
where ${\bf 1}$ denotes the indicator function. Define $\hat{t}_{\alpha/2}$ as the minimum $t$ value such that $L_n(t)\geq \alpha/2$ and $\hat{t}_{1-\alpha/2}$ as the minimum $t$ value such that $L_n(t)\geq 1-\alpha/2.$ 
We construct the bootstrap/subsampling confidence interval as
\begin{equation*}
\left[ \hat{\theta} - \frac{\hat{t}_{1-\alpha/2}}{\sqrt{n}}, \hat{\theta} - \frac{\hat{t}_{\alpha/2}}{\sqrt{n}}\right].
\end{equation*}



In Table \ref{tab: subsampling}, we report the empirical coverage of the normality CI in \eqref{eq: normality CI low}, the CI by subsampling, the CI by $m$ out of $n$ bootstrap,  and our proposed CI. The normality CI in \eqref{eq: normality CI low} and the CIs by subsampling and bootstrap methods are in general under-coverage for settings (I-1) to (I-9). Our proposed CI achieves the desired coverage level at the expense of a wider interval. For the favorable setting (I-10), bootstrap methods achieve the desired coverage level while subsampling methods only work for a small $m,$ which is an important requirement for the validity of subsampling methods \citep{politis1999subsampling}. 





\begin{table}[H]
\centering
\resizebox{\linewidth}{!}{
\begin{tabular}[t]{|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\multicolumn{1}{|c|}{Setting} & \multicolumn{1}{c|}{ } & \multicolumn{4}{c|}{m-out-of-n subsampling} & \multicolumn{5}{c|}{m-out-of-n bootstrap} &
\multicolumn{2}{c|}{Proposed}\\
\cline{3-6} \cline{7-11} \cline{12-13}
$p=30$ & normality & $m=200$  & $m=300$ & $m=400$ & $m=500$ & $m=200$ & $m=300$ & $m=400$ & $m=500$ & $m=1000$ & Cov & L-ratio\\
\hline
(I-1) & 0.686 & 0.380  & 0.390 & 0.380 & 0.408 & 0.432 & 0.460 & 0.502 & 0.490 & 0.536 & 0.956 & 1.678\\
\hline
(I-2) & 0.808 & 0.418 & 0.456 & 0.474 & 0.446 & 0.456 & 0.510 & 0.532 & 0.546 & 0.602 & 0.990 & 1.723\\
\hline
(I-3) & 0.770 & 0.392  & 0.494 & 0.464 & 0.440 & 0.482 & 0.480 & 0.516 & 0.544 & 0.634 & 0.984 & 1.766\\
\hline
(I-4) & 0.816 & 0.620 & 0.668 & 0.670 & 0.668 & 0.672 & 0.694 & 0.710 & 0.700 & 0.794 & 0.990 & 1.686\\
\hline
(I-5) & 0.790 & 0.612 & 0.626 & 0.626 & 0.594 & 0.628 & 0.664 & 0.702 & 0.732 & 0.732 & 1.000 & 1.843\\
\hline
(I-6) & 0.806 & 0.590 & 0.636 & 0.654 & 0.632 & 0.626 & 0.682 & 0.698 & 0.712 & 0.760 & 0.994 & 1.833\\
\hline
(I-7) & 0.824 & 0.914 & 0.932 & 0.908 & 0.888 & 0.890 & 0.950 & 0.934 & 0.950 & 0.952 & 0.996 & 5.078\\
\hline
(I-8) & 0.888 & 0.912 & 0.934 & 0.884 & 0.856 & 0.914 & 0.916 & 0.932 & 0.932 & 0.958 & 0.996 & 4.017\\
\hline
(I-9) & 0.900 & 0.834 & 0.822 & 0.788 & 0.778 & 0.914 & 0.914 & 0.916 & 0.862 & 0.914 & 0.996 & 2.061\\
\hline
(I-10) & 0.954 & 0.956 & 0.904 & 0.866 & 0.836 & 0.956 & 0.948 & 0.962 & 0.964 & 0.942 & 1.000 & 1.725\\
\hline
\end{tabular}}
\caption{Empirical coverage of the normality CI in \eqref{eq: normality CI low}, the CI by subsampling, the CI by $m$ out of $n$ bootstrap and our proposed CI, where the column indexed with L-ratio denoting the ratio of the average length of our proposed CI to that of the normality CI.}
\label{tab: subsampling}
\end{table}
In Section \ref{sec: challenge subsampling}, we discuss why subsampling methods fail to provide valid inference for the maximin effect in the presence of non-regularity. 




\subsection{Challenges for Bootstrap and Subsampling Methods: A Theoretical View}
\label{sec: challenge subsampling}
We illustrate the challenge of bootstrap and subsampling methods for the maximin effects in non-regular settings. As a remark, the following argument is not a rigorous proof but of a similar style to the discussion of \cite{andrews2000inconsistency}, explaining why the subsampling methods do not completely solve the non-regular inference problems. The main difficulty appears in a  near boundary setting with  
\begin{equation}
\gamma_1=\frac{{\mu}_1}{\sqrt{n}} \quad \text{for a positive constant}\quad \mu_1>0,
\label{eq: setting}
\end{equation}
where $\gamma_1$ denotes the weight of the first group.


To illustrate the problem, we consider the special setting $L=2$, $n_1=n_2=n$ and $b^{(1)}$ and $b^{(2)}$ are known. The first coefficient of the maximin effect $\beta^{*}$ can be expressed as
\begin{equation*}
\beta^{*}_1=b^{(1)}_1\cdot\gamma_1+b^{(2)}_1\cdot(1-\gamma_1)=(b^{(1)}_1-b^{(2)}_1)\cdot \gamma_1+b^{(2)}_1.
\end{equation*} 
For this special scenario, the only uncertainty is from estimating $\gamma_1$ since $\Sigma^{\mathbb{Q}}$ is unknown. 
We estimate $\gamma_1$ by $$\widehat{\gamma}_1=\max\{\bar{\gamma}_1,0\} \quad\text{with}\quad \bar{\gamma}_1=\frac{\widehat{\Gamma}_{22}-\widehat{\Gamma}_{12}}{\widehat{\Gamma}_{11}+\widehat{\Gamma}_{22}-2\widehat{\Gamma}_{12}},$$
where $\widehat{\Gamma}_{12}=[b^{(1)}]^{\intercal}\widehat{\Gamma}^{\mathbb{Q}}b^{(2)},$ $\widehat{\Gamma}_{11}=[b^{(1)}]^{\intercal}\widehat{\Gamma}^{\mathbb{Q}}b^{(1)},$ and $\widehat{\Gamma}_{22}=[b^{(2)}]^{\intercal}\widehat{\Gamma}^{\mathbb{Q}}b^{(2)}.$ In the definition of $\widehat{\gamma}_1$, we do not restrict it to be smaller than 1 as this happens with a high probability under our current setting \eqref{eq: setting}.
We then estimate $\beta^{*}_1$ by 
\begin{equation*}
\widehat{\beta}_1=(b^{(1)}_1-b^{(2)}_1)\cdot \widehat{\gamma}_1+b^{(2)}_1. 
\end{equation*}


We separately subsample $\{X^{(1)}_{i},Y^{(1)}_{i}\}_{1\leq i\leq n}$ and $\{X^{(2)}_{i},Y^{(2)}_{i}\}_{1\leq i\leq n}$ and use $m$ to denote the subsample size. For $1\leq t\leq T$ with a positive integer $T>0$, denote the $t$-th subsampled data as $\{X^{(*,t,1)}_{i},Y^{(*,t,1)}_{i}\}_{1\leq i\leq m}$ and $\{X^{(*,t,2)}_{i},Y^{(*,t,2)}_{i}\}_{1\leq i\leq m}$. We apply these subsampled data sets to compute the sample covariance matrix  $\widehat{\Sigma}^{(*,t)}$. Then we compute $\bar{\gamma}^{(*,t)}_1$ as 
$$\widehat{\gamma}^{(*,t)}_1=\max\{\bar{\gamma}^{(*,t)}_1,0\} \quad\text{with}\quad \bar{\gamma}^{(*,t)}_1=\frac{\widehat{\Gamma}^{(*,t)}_{22}-\widehat{\Gamma}^{(*,t)}_{12}}{\widehat{\Gamma}^{(*,t)}_{11}+\widehat{\Gamma}^{(*,t)}_{22}-2\widehat{\Gamma}^{(*,t)}_{12}},$$
with $\widehat{\Gamma}^{(*,t)}_{12}=[b^{(1)}]^{\intercal}\widehat{\Sigma}^{(*,t)}b^{(2)},$ $\widehat{\Gamma}^{(*,t)}_{11}=[b^{(1)}]^{\intercal}\widehat{\Sigma}^{(*,t)} b^{(1)},$ and $\widehat{\Gamma}^{(*,t)}_{22}=[b^{(2)}]^{\intercal}\widehat{\Sigma}^{(*,t)} b^{(2)}.$ Then we construct the subsampling estimator 
$$\widehat{\beta}^{(*,t)}_1=(b^{(1)}_1-b^{(2)}_1)\cdot \widehat{\gamma}^{(*,t)}_1+b^{(2)}_1.$$


We assume $\sqrt{n}(\bar{\gamma}_1-\gamma_1)$ and $\sqrt{n}(\bar{\gamma}^{(*,t)}_1-\bar{\gamma}_1)$ share the same limiting normal distribution. Specifically, we assume $\sqrt{n}(\bar{\gamma}_1-\gamma_1)\overset{d}{\to} Z$ with $Z\sim N(0,V_{\gamma})$ and conditioning on the observed data, $\sqrt{n}(\bar{\gamma}^{(*,t)}_1-\bar{\gamma}_1)\overset{d}{\to} Z.$ Then for the setting \eqref{eq: setting}, we have 
\begin{equation}
\sqrt{n}\left(\widehat{\gamma}_1-\gamma_1\right)\overset{d}{\to} \max\{Z,-\mu_1\}. 
\label{eq: limiting dist}
\end{equation}


In the following, we will show that $\sqrt{m}(\widehat{\gamma}^{(*,t)}_1-\widehat{\gamma}_1)$ does not approximate the limiting distribution of $\sqrt{n}(\widehat{\gamma}_1-\gamma_1)$ in \eqref{eq: limiting dist} if $\gamma_1=\frac{{\mu}_1}{\sqrt{n}}$. Note that
\begin{equation*}
\begin{aligned}
\sqrt{m}(\widehat{\gamma}^{(*,t)}_1-\widehat{\gamma}_1)=&\max\{\sqrt{m}[\bar{\gamma}^{(*,t)}_1-\widehat{\gamma}_1],-\sqrt{m}\widehat{\gamma}_1\}\\
=&\max\{\sqrt{m}[\bar{\gamma}^{(*,t)}_1-\bar{\gamma}_1]+\sqrt{m}[\bar{\gamma}_1-\gamma_1],-\sqrt{m}{\gamma}_1\}-\sqrt{m}(\widehat{\gamma}_1-\gamma_1).\\
\end{aligned}
\end{equation*}
When $m\ll n$ and $\gamma_1\asymp 1/\sqrt{n},$ then the following event happens with a probability larger than $1-n^{-c}$ for a small positive constant $c>0$, 
$$
\mathcal{A}_0=\left\{\max\{\sqrt{m}[\bar{\gamma}_1-\gamma_1],\sqrt{m}{\gamma}_1,\sqrt{m}(\widehat{\gamma}_1-\gamma_1)\}\lesssim \sqrt{\frac{m\log n}{n}}\right\}.
$$
Then conditioning on the event $\mathcal{A}_0,$
\begin{equation*}
\sqrt{m}(\widehat{\gamma}^{(*,t)}_1-\widehat{\gamma}_1) \overset{d}{\to} \max\{Z,0\},
\end{equation*}
which is different from the limiting distribution of $\sqrt{n}(\widehat{\gamma}_1-\gamma_1)$  in \eqref{eq: limiting dist}.



\section{Proof of Theorem \ref{thm: sampling accuracy}}
\label{sec: sampling proof}

We first introduce some notations. For $L>0$ and $\alpha_0\in(0,0.01],$ define 
\begin{equation}
C^{*}(L,\alpha_0)=c^{*}(\alpha_0)\cdot{\rm Vol}\left[\frac{L(L+1)}{2}\right]  \quad \text{with}\quad c^{*}(\alpha_0)=\frac{\exp\left(-\frac{L(L+1)}{3}\frac{z^2_{{\alpha_0}/[L(L+1)]}(n\cdot \lambda_{\max}({\bf V})+\frac{4}{3}d_0)}{n\cdot \lambda_{\min}({\bf V})+\frac{2}{3}d_0}\right)}{\sqrt{2\pi}\prod_{i=1}^{\frac{L(L+1)}{2}} \left[n \cdot \lambda_i({\bf V})+{4d_0}/{3}\right]^{1/2}}
\label{eq: sampling constants}
\end{equation}
where ${\rm Vol}\left[\frac{L(L+1)}{2}\right]$ denotes the volume of a unit ball in $L(L+1)/2$ dimensions.




As a corollary of Proposition \ref{prop: general variance}, we prove in Section \ref{sec: lower bounded constant} that $C^{*}(L,\alpha_0)$ and $c^{*}(\alpha_0)$ are lower bounded by a positive constant with a high probability. 
\begin{Corollary} Consider the model \eqref{eq: multi-group model}. Suppose Condition {\rm (A1)} holds, $\tfrac{s \log p}{\min\{n,N_{\mathbb{Q}}\}} \rightarrow 0$ with $n=\min_{1\leq l\leq L} n_{l}$ and $s=\max_{1\leq l\leq L}\|b^{(l)}\|_0$. 
If $N_{\mathbb{Q}}\gtrsim\max\{n,p\}$, then with probability larger than $1-\min\{n,p\}^{-c}$ for some positive constant $c>0,$ then $\min\{C^*(L,\alpha_0),c^*(\alpha_0)\}\geq c'$ for a positive constant $c'>0.$
\label{cor: lower bounded constant}
\end{Corollary}

The following theorem is a generalization of Theorem \ref{thm: sampling accuracy} in the main paper, which implies Theorem \ref{thm: sampling accuracy} by setting $\delta=0.$ 
\begin{Theorem} Consider the model \eqref{eq: multi-group model}. Suppose Conditions {\rm (A1)} and {\rm (A2)} hold.  If $ {\rm err}_n(M)$ defined in \eqref{eq: sampling ratio} satisfies $ {\rm err}_n(M) \ll \min\{1,c^{*}(\alpha_0), \lambda_{\min}(\Gamma^{\mathbb{Q}})+\delta\}$ where $c^{*}(\alpha_0)$ is defined in \eqref{eq: sampling constants}, then 
 \begin{equation}
\liminf_{n,p\rightarrow \infty} {\mathbf{P}}\left(\min_{m\in \mathbb{M}}\|\widehat{\gamma}^{[m]}_{\delta}-\gamma^{*}_{\delta}\|_
\leq \frac{\sqrt{2}  {\rm err}_n(M)}{\lambda_{\min}(\Gamma^{\mathbb{Q}})+\delta} \cdot \frac{1}{\sqrt{n}}\right)\geq 1-\alpha_0,
 \label{eq: resampling weight accuracy}
 \end{equation}
where $\alpha_0\in(0,0.01]$ is the pre-specified constant used in the construction of $\mathbb{M}$ in \eqref{eq: generating condition}.
\label{thm: sampling accuracy ridge}
\end{Theorem}

In the following, we prove the more general Theorem \ref{thm: sampling accuracy ridge}.






\subsection{The Proof Plan of Theorem \ref{thm: sampling accuracy ridge}}
The proof of Theorem \ref{thm: sampling accuracy ridge} relies on Lemma \ref{lem: verification of A3}, whose proof can be found in Section \ref{sec: covariate shift}.

\begin{Lemma} Consider the model \eqref{eq: multi-group model}. Suppose that Conditions {\rm (A1)} and {\rm (A2)} hold, then 
the estimator $\widehat{\Gamma}^{\mathbb{Q}}$ in \eqref{eq: cov est general} satisfies 
\begin{equation}
\liminf_{n,p\rightarrow \infty}{\mathbf{P}}\left(\max_{1\leq l,k\leq L}\frac{\left|\widehat{\Gamma}_{l,k}^{\mathbb{Q}}-\Gamma_{l,k}^{\mathbb{Q}}\right|}{\sqrt{\widehat{{\bf V}}_{\pi(l,k),\pi(l,k)}+d_0/n}}\leq 1.05\cdot z_{{\alpha_0}/[L(L+1)]}\right)\geq 1-\alpha_0,
\label{eq: condition for sampling 2}
\end{equation}
for any $\alpha_0\in(0,0.01].$
\label{lem: verification of A3} 
\end{Lemma}








The proof of Theorem \ref{thm: sampling accuracy ridge} consists of the following three steps.
\begin{enumerate}
\item In Section \ref{sec: covariate shift}, we establish that our proposed estimator $\widehat{\Gamma}^{\mathbb{Q}}$ satisfies \eqref{eq: condition for sampling 2} with a high probability.
\item In Section \ref{sec: resampling approximation}, we prove that, if  $\widehat{\Gamma}^{\mathbb{Q}}$ satisfies \eqref{eq: condition for sampling 2}, then the following inequality holds,
\begin{equation}
\liminf_{n,p\rightarrow \infty}{\mathbf{P}}\left(\min_{m\in {\mathbb{M}}}\|\widehat{\Gamma}^{[m]}-{\Gamma}^{\mathbb{Q}}\|_F\leq \sqrt{2}  {\rm err}_n(M)/{\sqrt{n}}\right)\geq 1-\alpha_0,
 \label{eq: resampling approximation}
\end{equation}
where $\mathbb{M}$ is defined in \eqref{eq: generating condition}.  
\item In Section \ref{sec: resampling weight accuracy}, we apply \eqref{eq: resampling approximation} to establish Theorem \ref{thm: sampling accuracy ridge}. 
\end{enumerate}



\subsection{Proof of \eqref{eq: resampling approximation}}
\label{sec: resampling approximation}  
Define the feasible set 
\begin{equation}
{\mathcal{F}}'=\left\{S\in \mathbb{R}^{L(L+1)/2}: \max_{1\leq \pi(l,k)\leq L(L+1)/2}\left|\frac{{S}_{\pi(l,k)}}{\sqrt{\widehat{{\bf V}}_{\pi(l,k),\pi(l,k)}+d_0/n}}\right|\leq 1.1\cdot z_{\alpha_0/[L(L+1)]}\right\},
\label{eq: feasible set}
\end{equation}
and we have the equivalent expression of $\mathbb{M}$ defined in \eqref{eq: generating condition} as $$\mathbb{M}=\{1\leq m\leq M: S^{[m]}\in {\mathcal{F}}\}.$$

Denote the data by $ \mathcal{O}$, that is, $ \mathcal{O}=\{X^{(l)},Y^{(l)}\}_{1\leq l\leq L}\cup \{X^{\mathbb{Q}}\}.$
Recall $n=\min_{1\leq l\leq L} n_l$ and write $\widehat{\Gamma}=\widehat{\Gamma}^{\mathbb{Q}}.$  Define $\widehat{S}={\rm vecl}(\widehat{\Gamma})-{\rm vecl}(\Gamma),$ the rescaled difference $\widehat{Z}=\sqrt{n}\widehat{S},$ and $Z^{[m]}=\sqrt{n}S^{[m]}=\sqrt{n}[{\rm vecl}(\widehat{\Gamma})-{\rm vecl}(\widehat{\Gamma}^{[m]})]$ for $1\leq m \leq M.$ Note that 
\begin{equation}
\widehat{Z}-Z^{[m]}=\sqrt{n}[{\rm vecl}(\widehat{\Gamma}^{[m]})-{\rm vecl}(\Gamma)],
\label{eq: rescaling expression}
\end{equation}
and for the given data $ \mathcal{O}$, $\widehat{Z}$ is fixed. 
We define the rescaled covariance matrices as
\begin{equation}
{\bf Cov}=n {\bf V}\quad \text{and} \quad \widehat{{\bf Cov}}=n \widehat{\bf V},
\label{eq: covariance rescaled}
\end{equation}
 with ${\bf V}$ and $\widehat{\bf V}$ defined in \eqref{eq: cov def} and \eqref{eq: cov est}, respectively.  

 The density of the rescaled variable $Z^{[m]}=\sqrt{n}S^{[m]}$ is
\begin{equation*}
f(Z^{[m]}=Z\mid  { \mathcal{O}})=\frac{\exp\left(-\frac{1}{2}Z^{\intercal}(\widehat{{\bf Cov}}+d_0 {\bf I})^{-1}{Z}\right) }{\sqrt{2\pi {\rm det}(\widehat{{\bf Cov}}+d_0 {\bf I}) }}.
\end{equation*}
We define the following function to facilitate the proof,
\begin{equation}
g({Z})=\frac{1}{\sqrt{2\pi {\rm det}({\bf Cov}+\frac{4}{3} d_0 {\bf I}) }} \exp\left(-\frac{1}{2}{Z}^{\intercal}({{\bf Cov}}+\frac{2}{3}d_0 {\bf I})^{-1}{Z}\right).
\label{eq: expression density}
\end{equation}
We define the following events for the data $ \mathcal{O}$,
\begin{equation}
\begin{aligned}
\mathcal{E}_1&=\left\{\|\widehat{{\bf Cov}}-{\bf Cov}\|_2<d_0/3\right\},\\
\mathcal{E}_2&=\left\{\max_{1\leq l,k\leq L}\frac{\left|\widehat{Z}_{\pi(l,k)}\right|}{\sqrt{\widehat{{\bf Cov}}_{\pi(l,k),\pi(l,k)}+d_0}}\leq 1.05\cdot z_{{\alpha_0}/[L(L+1)]}\right\}
\end{aligned}
\label{eq: event}
\end{equation}
where $\|\widehat{{\bf Cov}}-{\bf Cov}\|_2$ denotes the spectral norm of the matrix  $\widehat{{\bf Cov}}-{\bf Cov}.$ 
The following lemma shows that the event $\mathcal{E}_1$ holds with a high probability, whose proof is presented in Section \ref{sec: event lemma 1}.

\begin{Lemma} Suppose that the conditions of Theorem \ref{thm: sampling accuracy} hold, then we have
\begin{equation}
{\mathbf{P}}\left(\mathcal{E}_1\right)\geq 1-\min\{N_{\mathbb{Q}},n,p\}^{-c}
\label{eq: high prob general}
\end{equation}
\label{lem: event lemma 1}
for some positive constant $c>0.$
\end{Lemma}

Together with \eqref{eq: condition for sampling 2}, we establish 
\begin{equation}
\liminf_{n\rightarrow\infty}{\mathbf{P}}\left(\mathcal{E}_1\cap \mathcal{E}_2\right)\geq 1-\alpha_0.
\label{eq: high event for sampling}
\end{equation}
On the event $ \mathcal{O}\in \mathcal{E}_1$, we have 
\begin{equation}
 2({\bf Cov}+\frac{2}{3} d_0 {\bf I})\succeq {\bf Cov}+\frac{4}{3} d_0 {\bf I}\succ \widehat{{\bf Cov}}+d_0 {\bf I}
\succ {\bf Cov}+\frac{2}{3} d_0 {\bf I},
\label{eq: loos bound}
\end{equation}
where $A\succeq B$ and $A\succ B$ denotes that the matrix $A-B$ is positive semi-definite and positive definite, respectively. 
By \eqref{eq: loos bound}, we have \begin{equation}
f(Z^{[m]}=Z\mid { \mathcal{O}}) \cdot {\bf 1}_{\{ \mathcal{O}\in \mathcal{E}_1\}}  \geq g(Z) \cdot{\bf 1}_{ \{ \mathcal{O}\in \mathcal{E}_1\}}.
\label{eq: simplified lower bound}
\end{equation} 
for any $Z\in \mathbb{R}^{L(L+1)/2}.$ Furthermore, on the event $\mathcal{E}_1\cap \mathcal{E}_2,$ we have 
\begin{equation*}
\begin{aligned}
\frac{1}{2}\widehat{Z}^{\intercal}({\bf Cov}+\frac{2}{3} d_0 {\bf I})^{-1}\widehat{Z}&\leq \frac{L(L+1)}{4}\frac{\max_{1\leq l,k\leq L}(\widehat{{\bf Cov}}_{\pi(l,k),\pi(l,k)}+d_0)\cdot (1.05\cdot z_{{\alpha_0}/[L(L+1)]})^2}{\lambda_{\min}({\bf Cov})+\frac{2}{3}d_0}\\
&\leq  \frac{L(L+1)}{3}\frac{z^2_{{\alpha_0}/[L(L+1)]}(\lambda_{\max}({\bf Cov})+\frac{4}{3}d_0)}{\lambda_{\min}({\bf Cov})+\frac{2}{3}d_0}.
\end{aligned}
\end{equation*}
Hence, on the event $\mathcal{E}_1\cap \mathcal{E}_2,$ we have   
\begin{equation}
g(\widehat{Z})\geq c^{*}(\alpha_0)
\label{eq: key constant 2}
\end{equation}

We further lower bound the targeted probability in \eqref{eq: resampling approximation} as
\begin{equation}
\begin{aligned}
&{\mathbf{P}}\left(\min_{m\in {\mathbb{M}}}\|\widehat{\Gamma}^{[m]}-{\Gamma}^{\mathbb{Q}}\|_F\leq \sqrt{2}  {\rm err}_n(M)/{\sqrt{n}}\right)\\
&\geq {\mathbf{P}}\left(\min_{m\in {\mathbb{M}}}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right)\\
&\geq \mathbf{E}_{ \mathcal{O}}\left[{\mathbf{P}}\left(\min_{m\in {\mathbb{M}}}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\right],
\end{aligned}
\label{eq: lower 1}
\end{equation}
where ${\mathbf{P}}(\cdot \mid  \mathcal{O})$ denotes the conditional probability given the observed data $ \mathcal{O}$ and $\mathbf{E}_{ \mathcal{O}}$ denotes the expectation taken with respect to the observed data $ \mathcal{O}.$ 

For $m\not \in {\mathbb{M}},$ the definition of ${\mathbb{M}}$ implies that there exists $1\leq k_0\leq l_0\leq L$ such that 
$$
\frac{\left|{Z}^{[m]}_{\pi(l_0,k_0)}\right|}{\sqrt{\widehat{{\bf Cov}}_{\pi(l_0,k_0),\pi(l_0,k_0)}+d_0}}\geq 1.1\cdot z_{{\alpha_0}/[L(L+1)]}.$$
Hence, on the event $\mathcal{E}_1\cap \mathcal{E}_2,$
\begin{equation*}
\|Z^{[m]}-\widehat{Z}\|_2\geq \left|{Z}^{[m]}_{\pi(l_0,k_0)}-\widehat{Z}_{\pi(l_0,k_0)}\right|\geq \sqrt{\frac{2d_0}{3}}\cdot 0.05\cdot z_{{\alpha_0}/[L(L+1)]}.
\end{equation*}
If $ {\rm err}_n(M)\leq \sqrt{\frac{2d_0}{3}}\cdot 0.05\cdot z_{{\alpha_0}/[L(L+1)]},$ then we have 
$$\min_{m\not\in {\mathbb{M}}}\|Z^{[m]}-\widehat{Z}\|_2\geq  {\rm err}_n(M).$$ As a consequence, for $ \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2,$
\begin{equation}
{\mathbf{P}}\left(\min_{m\in {\mathbb{M}}}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)={\mathbf{P}}\left(\min_{1\leq m\leq M}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right).
\label{eq: key equivalience}
\end{equation}
Together with \eqref{eq: lower 1}, we have
\begin{equation}
\begin{aligned}
&{\mathbf{P}}\left(\min_{m\in {\mathbb{M}}}\|\widehat{\Gamma}^{[m]}-{\Gamma}^{\mathbb{Q}}\|_F\leq \sqrt{2}  {\rm err}_n(M)/{\sqrt{n}}\right)\\
&\geq \mathbf{E}_{ \mathcal{O}}\left[{\mathbf{P}}\left(\min_{1\leq m\leq M}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\right].
\end{aligned}
\label{eq: lower 2}
\end{equation}



Note that
\begin{equation*}
\begin{aligned}
&{\mathbf{P}}\left(\min_{1\leq m\leq M}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\\
&=1-{\mathbf{P}}\left(\min_{1\leq m\leq M}\|Z^{[m]}-\widehat{Z}\|_2 \geq  {\rm err}_n(M)\mid  \mathcal{O}\right)\\
&=1-\prod_{1\leq m\leq M}\left[1-{\mathbf{P}}\left(\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\right]\\
\end{aligned}
\label{eq: exp lower}
\end{equation*}
where the second equality follows from the conditional independence of $\{Z^{[m]}\}_{1\leq m\leq M}$ given the data $\mathcal{O}.$ 

Since $1-x\leq e^{-x}$, we further lower bound the above expression as 
\begin{equation*}
\begin{aligned}
&{\mathbf{P}}\left(\min_{1\leq m\leq M}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\\
&\geq 1-\prod_{1\leq m\leq M}\exp\left[-{\mathbf{P}}\left(\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\right]\\
&= 1-\exp\left[-M\cdot {\mathbf{P}}\left(\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\right].
\end{aligned}
\end{equation*} 
Hence, we have 
\begin{equation}
\begin{aligned}
&{\mathbf{P}}\left(\min_{1\leq m\leq M}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\\
&\geq \left(1-\exp\left[-M\cdot {\mathbf{P}}\left(\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\right]\right)\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\\
&=1-\exp\left[-M\cdot{\mathbf{P}}\left(\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\right].
\end{aligned}
\label{eq: connection}
\end{equation}
Together with \eqref{eq: lower 2}, it is sufficient to establish an lower bound for 
\begin{equation}
{\mathbf{P}}\left(\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}.
\label{eq: target}
\end{equation}

We apply the inequality \eqref{eq: simplified lower bound} and further lower bound the targeted probability in \eqref{eq: target} as
\begin{equation}
\begin{aligned}
&{\mathbf{P}}\left(\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}
\\
=& \int f(Z^{[m]}=Z\mid  \mathcal{O}) \cdot {\bf 1}_{\left\{\|Z-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right\}}d Z \cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\\
\geq &\left[\int g(Z) \cdot{\bf 1}_{\left\{\|Z-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right\}} d Z \right]\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\\
=& \left[\int g(\widehat{Z}) \cdot{\bf 1}_{\left\{\|Z-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right\}} d Z \right] \cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\\
&+\left[\int [g(Z)-g(\widehat{Z})] \cdot{\bf 1}_{\left\{\|Z-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right\}} d Z \right]\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}.\end{aligned}
\label{eq: decomposition density}
\end{equation}


By \eqref{eq: key constant 2}, we have 
\begin{equation}
\begin{aligned}
&\int g(\widehat{Z}) \cdot {\bf 1}_{\left\{\|Z-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right\}}d Z \cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\\
&\geq c^{*}(\alpha_0) \cdot \int {\bf 1}_{\left\{\|Z-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right\}}d Z \cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\\
&\geq c^{*}(\alpha_0)\cdot {\rm Vol}(L(L+1)/2)\cdot [ {\rm err}_n(M)]^{L(L+1)/2} \cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2},
\end{aligned}
\label{eq: main density}
\end{equation}
where ${\rm Vol}(L(L+1)/2)$ denotes the volume of the unit ball in $\frac{L(L+1)}{2}$-dimension.


Note that there exists $t\in (0,1)$ such that
$$g(Z)-g(\widehat{Z})=[\triangledown g(\widehat{Z}+t(Z-\widehat{Z}))]^{\intercal} (Z-\widehat{Z}),$$
with $\triangledown g(w)=\frac{\exp\left(-\frac{1}{2}{w}^{\intercal}({{\bf Cov}}+\frac{2}{3}d_0 {\bf I})^{-1}{w}\right)}{\sqrt{2\pi {\rm det}({\bf Cov}+\frac{4}{3} d_0 {\bf I}) }} w^{\intercal}({{\bf Cov}}+\frac{2}{3}d_0 {\bf I})^{-1}{w}.$ Since $\lambda_{\min}({{\bf Cov}}+\frac{2}{3}d_0 {\bf I})\geq \frac{2}{3}d_0$, then $\triangledown g$ is bounded from the above and $\left|g(Z)-g(\widehat{Z})\right|\leq C \|Z-\widehat{Z}\|_2$ for a positive constant $C>0$. Then we establish  
\begin{equation}
\begin{aligned}
&\left|\int [g(Z)-g(\widehat{Z})] \cdot{\bf 1}_{\left\{\|Z-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right\}} d Z \cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}
\right|\\
&\leq C \cdot  {\rm err}_n(M)\cdot \int {\bf 1}_{\left\{\|Z-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right\}}d Z \cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\\
&= C \cdot  {\rm err}_n(M)\cdot {\rm Vol}(L(L+1)/2)\cdot [ {\rm err}_n(M)]^{L(L+1)/2} \cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}.
\end{aligned}
\label{eq: approx density}
\end{equation}
By assuming $C \cdot  {\rm err}_n(M) \leq \frac{1}{2}c^{*}(\alpha_0),$ we combine \eqref{eq: decomposition density}, \eqref{eq: main density} and \eqref{eq: approx density} and obtain 
\begin{equation*}
\begin{aligned}
&{\mathbf{P}}\left(\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\\
&\geq \frac{1}{2}c^{*}(\alpha_0)\cdot{\rm Vol}(L(L+1)/2)\cdot [ {\rm err}_n(M)]^{L(L+1)/2} \cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}.
\end{aligned}
\end{equation*}
Together with \eqref{eq: connection}, we establish
\begin{equation}
\begin{aligned}
&{\mathbf{P}}\left(\min_{1\leq m\leq M}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\mid  \mathcal{O}\right)\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\\
&\geq 1-\exp\left[-M\cdot\frac{1}{2}c^{*}(\alpha_0)\cdot {\rm Vol}(L(L+1)/2)\cdot[ {\rm err}_n(M)]^{L(L+1)/2} \cdot {\bf 1}_{ \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}\right]\\
&=\left(1-\exp\left[-M\cdot\frac{1}{2}c^{*}(\alpha_0)\cdot {\rm Vol}(L(L+1)/2)\cdot[ {\rm err}_n(M)]^{L(L+1)/2} \right]\right)
\cdot {\bf 1}_{  \mathcal{O}\in \mathcal{E}_1\cap \mathcal{E}_2}.
\end{aligned}
\label{eq: connection 2}
\end{equation}
Together with \eqref{eq: lower 2}, we have
\begin{equation*}
\begin{aligned}
&{\mathbf{P}}\left(\min_{m\in {\mathbb{M}}}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right)\\
\geq &\left(1-\exp\left[-M\cdot \frac{1}{2}c^*(\alpha_0)\cdot {\rm Vol}(L(L+1)/2)\cdot[ {\rm err}_n(M)]^{L(L+1)/2} \right]\right)
{\mathbf{P}}\left(\mathcal{E}_1\cap \mathcal{E}_2\right).
\end{aligned}
\end{equation*}
We choose $$ {\rm err}_n(M) =\left[\frac{4 \log n}{C^*(L,\alpha_0) M}\right]^{\frac{2}{L(L+1)}}$$ with $C^*(L,\alpha_0)$ defined in \eqref{eq: sampling constants} and establish 
$${\mathbf{P}}\left(\min_{m\in {\mathbb{M}}}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right)\geq (1-n^{-1})\cdot {\mathbf{P}}\left(\mathcal{E}_1\cap \mathcal{E}_2\right).$$
We further apply \eqref{eq: high event for sampling} and establish
$$
\liminf_{n,p\rightarrow \infty} {\mathbf{P}}\left(\min_{M\in {\mathbb{M}}}\|Z^{[m]}-\widehat{Z}\|_2 \leq  {\rm err}_n(M)\right)\geq 1-\alpha_0.
$$
By the rescaling in \eqref{eq: rescaling expression}, we establish \eqref{eq: resampling approximation}.


\subsection{Proof of Theorem \ref{thm: sampling accuracy ridge}}
\label{sec: resampling weight accuracy}
The proof of Theorem \ref{thm: sampling accuracy ridge} relies on \eqref{eq: resampling approximation} together with the following two lemmas, whose proofs are presented in Section \ref{sec: gamma accuracy} and Section \ref{sec: positive inequality}.
\begin{Lemma} Define 
\begin{equation}
\widehat{\gamma}=\arg\min_{\gamma\in \Delta^{L}}\gamma^{\intercal}\widehat{\Gamma}\gamma\quad \text{and}\quad {\gamma}^*=\arg\min_{\gamma\in \Delta^{L}}\gamma^{\intercal}{\Gamma}\gamma.
\label{eq: temp def}
\end{equation}
 If $\lambda_{\min}(\Gamma)>0,$ then \begin{equation}
\|\widehat{\gamma}-\gamma^*\|_2 \leq \frac{\|\widehat{\Gamma}-\Gamma\|_2}{\lambda_{\min}({\Gamma})} \|\widehat{\gamma}\|_2 \leq \frac{\|\widehat{\Gamma}-\Gamma\|_F}{\lambda_{\min}({\Gamma})} .
\label{eq: key conclusion}
\end{equation}
\label{lemma: gamma accuracy}
\end{Lemma}


\begin{Lemma}
Suppose that $\Gamma$ is positive semi-definite, then we have 
\begin{equation*}
\|\widehat{\Gamma}_{+}-{\Gamma}\|_{F}\leq \|\widehat{\Gamma}-{\Gamma}\|_{F}.
\end{equation*}
\label{lem: positive inequality}
\end{Lemma}

We use $m^*\in {\mathbb{M}}$ to denote one index such that 
$\|\widehat{\Gamma}^{[m^*]}-\Gamma^{\mathbb{Q}}\|_{F}=\min_{m\in {\mathbb{M}}}\|\widehat{\Gamma}^{[m]}-{\Gamma}^{\mathbb{Q}}\|_F.$
By \eqref{eq: resampling approximation}, with probability larger than $1-\alpha_0,$
$$\|\widehat{\Gamma}^{[m^*]}-\Gamma^{\mathbb{Q}}\|_{F}\leq \sqrt{2} {\rm err}(M)/\sqrt{n}.$$ 
Then we apply Lemma \ref{lemma: gamma accuracy} with $\widehat{\Gamma}=(\widehat{\Gamma}^{[m^*]}+\delta \cdot {\rm I})_{+}$ and $\Gamma=\Gamma^{\mathbb{Q}}+\delta \cdot {\rm I}$ and establish 
\begin{equation}
\|\widehat{\gamma}^{[m^*]}_{\delta}-\gamma^*_{\delta}\|_2 \leq \frac{\|(\widehat{\Gamma}^{[m^*]}+\delta \cdot {\rm I})_{+}-(\Gamma^{\mathbb{Q}}+\delta \cdot {\rm I})\|_{F}}{\lambda_{\min}({\Gamma}^{\mathbb{Q}})+\delta}\leq \frac{\|\widehat{\Gamma}^{[m^*]}-\Gamma^{\mathbb{Q}}\|_{F}}{\lambda_{\min}({\Gamma}^{\mathbb{Q}})+\delta},
\label{eq: key connection}
\end{equation}
where the second inequality follows from Lemma \ref{lem: positive inequality}. 
Together with \eqref{eq: resampling approximation}, we establish \eqref{eq: resampling weight accuracy}.











\subsection{Proof of Lemma \ref{lemma: gamma accuracy}}
\label{sec: gamma accuracy}
By the definition of $\gamma^{*}$ in \eqref{eq: temp def}, for any $t\in (0,1)$, we have 
\begin{equation*}
({\gamma}^{*})^{\intercal}{\Gamma}{\gamma}^{*} \leq \left[{\gamma}^{*}+t(\widehat{\gamma}-{\gamma}^{*})\right]^{\intercal}{\Gamma} \left[{\gamma}^{*}+t(\widehat{\gamma}-{\gamma}^{*})\right],
\end{equation*}
and hence
\begin{equation*}
0 \leq 2t({\gamma}^{*})^{\intercal}{\Gamma} (\widehat{\gamma}-{\gamma}^{*})+t^2(\widehat{\gamma}-{\gamma}^{*})^{\intercal}{\Gamma}(\widehat{\gamma}-{\gamma}^{*}).
\end{equation*}
By taking $t\rightarrow 0+,$ we have
\begin{equation}
({\gamma}^{*})^{\intercal}{\Gamma}(\widehat{\gamma}-\gamma^{*})\geq 0.
\label{eq: key optimal}
\end{equation}
By the definition of $\widehat{\gamma}$ in \eqref{eq: temp def}, for any $t\in (0,1)$, we have 
\begin{equation*}
(\widehat{\gamma})^{\intercal}\widehat{\Gamma} \widehat{\gamma} \leq \left[\widehat{\gamma}+t(\gamma^{*}-\widehat{\gamma})\right]^{\intercal}\widehat{\Gamma} \left[\widehat{\gamma}+t(\gamma^{*}-\widehat{\gamma})\right].
\end{equation*}
This gives us 
$$
2(\gamma^{*})^{\intercal}\widehat{\Gamma}(\gamma^{*}-\widehat{\gamma})+(t-2)(\gamma^{*}-\widehat{\gamma})^{\intercal}\widehat{\Gamma}(\gamma^{*}-\widehat{\gamma})\geq 0.
$$
Since $2-t>0,$ we have 
\begin{equation}
(\gamma^{*}-\widehat{\gamma})^{\intercal}\widehat{\Gamma}(\gamma^{*}-\widehat{\gamma})\leq \frac{2}{2-t}(\gamma^{*})^{\intercal}\widehat{\Gamma}(\gamma^{*}-\widehat{\gamma}).
\label{eq: basic}
\end{equation}
It follows from \eqref{eq: key optimal} that
\begin{equation*}
\begin{aligned}
(\gamma^{*})^{\intercal}\widehat{\Gamma}(\gamma^{*}-\widehat{\gamma})=(\gamma^{*})^{\intercal}{\Gamma}(\gamma^{*}-\widehat{\gamma})+(\gamma^{*})^{\intercal}(\widehat{\Gamma}-\Gamma)(\gamma^{*}-\widehat{\gamma})\leq (\gamma^{*})^{\intercal}(\widehat{\Gamma}-\Gamma)(\gamma^{*}-\widehat{\gamma}).
\end{aligned}
\end{equation*}
Combined with \eqref{eq: basic}, we have 
\begin{equation}
\begin{aligned}
(\gamma^{*}-\widehat{\gamma})^{\intercal}\widehat{\Gamma}(\gamma^{*}-\widehat{\gamma})
\leq \frac{2}{2-t} (\gamma^{*})^{\intercal}(\widehat{\Gamma}-\Gamma)(\gamma^{*}-\widehat{\gamma}
\leq \frac{2\|\gamma^{*}\|_2}{2-t} \|\widehat{\Gamma}-\Gamma\|_2\|\gamma^{*}-\widehat{\gamma}\|_2.
\end{aligned}
\label{eq: intermediate result}
\end{equation}

Note that the definitions of $\widehat{\gamma}$ and $\gamma$ are symmetric. Specifically,  $\widehat{\gamma}$ is defined as minimizing a quadratic form of $\widehat{\Gamma}$ while ${\gamma}^*$ is defined with ${\Gamma}.$ We switch the roles of $\{\widehat{\Gamma},\widehat{\gamma}\}$ and $\{\Gamma,\gamma^{*}\}$ in \eqref{eq: intermediate result} and establish 
\begin{equation}
(\gamma^{*}-\widehat{\gamma})^{\intercal}{\Gamma}(\gamma^{*}-\widehat{\gamma}) \leq \frac{2\|\widehat{\gamma}\|_2}{2-t} \|\widehat{\Gamma}-\Gamma\|_2\|\gamma^{*}-\widehat{\gamma}\|_2.
\label{eq: regular bound}
\end{equation}





If $\lambda_{\min}({\Gamma})>0,$ we apply the above bound by taking $t \rightarrow 0+$ and  establish \eqref{eq: key conclusion}. 
\subsection{Proof of Lemma \ref{lem: positive inequality}}
\label{sec: positive inequality}
Write the eigenvalue decomposition of $\widehat{\Gamma}$ as $\widehat{\Gamma}=\sum_{l=1}^{L}\widehat{A}_{ll}u_l u_l^{\intercal}$. Define 
$$\widehat{\Gamma}_{+}=\sum_{l=1}^{L}\max\{\widehat{A}_{ll},0\}u_l u_l^{\intercal}\quad \text{and}\quad \widehat{\Gamma}_{-}=\sum_{l=1}^{L}-\min\{\widehat{A}_{ll},0\}u_l u_l^{\intercal}.$$
We have
\begin{equation}
\widehat{\Gamma}=\widehat{\Gamma}_{+}-\widehat{\Gamma}_{-} \quad \text{with}\quad {\rm Tr}(\widehat{\Gamma}_{+}^{\intercal}\widehat{\Gamma}_{-})=0.
\label{eq: inter step 1}
\end{equation}
Since $\Gamma$ is positive semi-definite, we have
\begin{equation}
 {\rm Tr}({\Gamma}^{\intercal}\widehat{\Gamma}_{-})=\sum_{l=1}^{L}-\min\{\widehat{A}_{ll},0\}{\rm Tr}({\Gamma}^{\intercal} u_l u_l^{\intercal})\geq 0.
 \label{eq: inter step 2}
 \end{equation}
We apply \eqref{eq: inter step 1} and \eqref{eq: inter step 2} and establish  
\begin{equation*}
\|\widehat{\Gamma}-{\Gamma}\|_{F}^2=\|\widehat{\Gamma}_{+}-{\Gamma}-\widehat{\Gamma}_{-}\|_{F}^2=\|\widehat{\Gamma}_{+}-{\Gamma}\|_{F}^2+\|\widehat{\Gamma}_{-}\|_{F}^2-2 {\rm Tr}(\widehat{\Gamma}_{+}^{\intercal}\widehat{\Gamma}_{-})+2 {\rm Tr}({\Gamma}^{\intercal}\widehat{\Gamma}_{-})
\geq \|\widehat{\Gamma}_{+}-{\Gamma}\|_{F}^2.
\end{equation*}



\section{Proofs of Lemma \ref{lem: verification of A3}, Corollary \ref{cor: lower bounded constant} and Propositions
\ref{prop: general variance}, \ref{prop: limiting Gamma univariate}, and \ref{prop: limiting Gamma no shift}
}
\label{sec: property Gamma est}





\subsection{Proof of Lemma \ref{lem: verification of A3}}
\label{sec: covariate shift}
We start with the proof of Lemma \ref{lem: verification of A3} for the covariate shift setting, which relies on Propositions \ref{prop: limiting Gamma univariate} and \ref{prop: general variance}.  On the event $\mathcal{E}_1$ defined in \eqref{eq: event}, we apply the definitions in \eqref{eq: covariance rescaled} and have 
\begin{equation}
\|\widehat{{\bf V}}-{\bf V}\|_2\leq \frac{d_0}{3n}.
\label{eq: variance bound}
\end{equation}
Note that 
\begin{equation}
\begin{aligned}
\frac{\left|\widehat{\Gamma}_{l,k}^{\mathbb{Q}}-\Gamma_{l,k}^{\mathbb{Q}}\right|}{\sqrt{\widehat{{\bf V}}_{\pi(l,k),\pi(l,k)}+d_0/n}}&\leq \frac{\left|\widehat{\Gamma}_{l,k}^{\mathbb{Q}}-\Gamma_{l,k}^{\mathbb{Q}}\right|}{\sqrt{{{\bf V}}_{\pi(l,k),\pi(l,k)}+2d_0/3n}}\\
&\leq \frac{\left|D_{l,k}\right|}{\sqrt{{{\bf V}}_{\pi(l,k),\pi(l,k)}+2d_0/3n}}+\frac{\left|{\rm Rem}_{l,k}\right|}{\sqrt{{{\bf V}}_{\pi(l,k),\pi(l,k)}+2d_0/3n}},
\end{aligned}
\label{eq: decomposition}
\end{equation}
where $D_{l,k}$ and ${\rm Rem}_{l,k}$ are defined in Proposition \ref{prop: limiting Gamma univariate}. 

It follows from \eqref{eq: limiting univariate} that
\begin{equation}
\liminf_{n,p\rightarrow \infty}{\mathbf{P}}\left(\max_{1\leq l,k\leq L}\frac{\left|D_{l,k}\right|}{\sqrt{{{\bf V}}_{\pi(l,k),\pi(l,k)}+(2d_0/3n)}}\leq  z_{{\alpha_0}/[L(L+1)]}\right)\geq 1-\alpha_0.
\label{eq: bound A3-1}
\end{equation}
Combining \eqref{eq: bias} and \eqref{eq: diagonal order}, we apply the boundedness on $\max_{1\leq l\leq L}\|b^{(l)}\|_2$ and establish that, with probability larger than $1-\min\{n,p\}^{-c},$
$$\frac{\left|{\rm Rem}_{l,k}\right|}{\sqrt{{{\bf V}}_{\pi(l,k),\pi(l,k)}+2d_0/(3n)}}\lesssim \frac{s\log p}{\sqrt{n}}+\sqrt{\frac{s (\log p)^2}{N_{\mathbb{Q}}}}.$$
By the condition $\sqrt{n}\gg s\log p$ and $N_{\mathbb{Q}}\gg s (\log p)^2,$ we then establish that, with probability larger than $1-\min\{n,p\}^{-c},$ 
$$\max_{1\leq l,k\leq L}\frac{\left|{\rm Rem}_{l,k}\right|}{\sqrt{{{\bf V}}_{\pi(l,k),\pi(l,k)}+3d_0/(3n)}}\leq  0.05\cdot z_{{\alpha_0}/[L(L+1)]}$$
Combined with \eqref{eq: decomposition} and \eqref{eq: bound A3-1}, we establish \eqref{eq: condition for sampling 2}.


The proof of Lemma \ref{lem: verification of A3} for the no covariate shift setting relies on Proposition \ref{prop: limiting Gamma no shift}. The specific argument is the same as that for the covariate shift setting.







\subsection{Proof of Corollary \ref{cor: lower bounded constant}}
\label{sec: lower bounded constant}

By Proposition \ref{prop: general variance}, under Condition (A1), $s \log p\ll n$ and $N_{\mathbb{Q}}\gtrsim\max\{n,p\},$ we show that $\|n {\bf V}\|_{\infty}$ and $d_0$ are bounded from above with probability larger than $1-\min\{n,p\}^{-c}$ for some positive constant $c>0.$ Furthermore, since $L$ is finite, $n \lambda_{\max}(V)\lesssim \|n {\bf V}\|_{\infty}.$  As a consequence, $c^*(\alpha_0)\geq c'$ for a positive constant $c'>0.$ The lower bound for $C^*(L,\alpha_0)$ follows from the boundedness on $L$ and the lower bound for $c^*(\alpha_0).$





\subsection{High probability events}
We introduce the following events to facilitate the proofs of Propositions \ref{prop: limiting Gamma univariate},\ref{prop: general variance} and \ref{prop: limiting Gamma no shift}.
\begin{equation}
\begin{aligned}
\mathcal{G}_0&=\left\{\left\|\frac{1}{n_l}[X^{(l)}]^{\intercal}\epsilon^{(l)}\right\|_{\infty}\lesssim \sqrt{\frac{\log p}{n_l}}\quad \text{for} \; 1\leq l\leq L\right\},\\
\mathcal{G}_1&=\left\{\max\left\{\|\widehat{b}^{(l)}_{init}-b^{(l)}\|_2,\frac{1}{\sqrt{n_{l}}}\|X^{(l)}(\widehat{b}^{(l)}_{init}-b^{(l)})\|_2\right\}\lesssim \sqrt{\|{b}^{(l)}\|_0\frac{\log p}{n_l}}\sigma_{l} \quad \text{for} \; 1\leq l\leq L\right\},\\
\mathcal{G}_2&=\left\{ \|\widehat{b}^{(l)}_{init}-b^{(l)}\|_1\lesssim \|{b}^{(l)}\|_0\sqrt{\frac{\log p}{n_l}}\sigma_{l}, \|[\widehat{b}_{init}^{(l)}-b^{(l)}]_{\mathcal{S}_{l}^c}\|_1\leq C \|[\widehat{b}_{init}^{(l)}-b^{(l)}]_{\mathcal{S}_{l}}\|_1\quad \text{for} \; 1\leq l\leq L\right\},\\
\mathcal{G}_3&=\left\{|\widehat{\sigma}_{l}^2-\sigma_{l}^2|\lesssim {\|{b}^{(l)}\|_0\frac{\log p}{n_l}}+\sqrt{\frac{\log p}{{n_l}}} \quad \text{for} \; 1\leq l\leq L\right\},
\end{aligned}
\label{eq: high prob event 1}
\end{equation}
where $\mathcal{S}_l\subset[p]$ denotes the support of $b^{(l)}$ for $1\leq l\leq L$ and $C>0$ is a positive constant. Recall that, for $1\leq l\leq L$, $\widehat{b}_{init}^{(l)}$ is the Lasso estimator defined in \eqref{eq: Lasso splitting} with  $\lambda_l=\sqrt{{(2+c)\log p}/{|A_l|}}\sigma_{l}$ for some constant $c>0$; $\widehat{\sigma}_l^2=\|Y^{(l)}-X^{(l)}\widehat{b}^{(l)}\|_2^2/n_l$ for $1\leq l\leq L$ with $\widehat{b}^{(l)}$ denoting  the Lasso estimator based on the non-split data. 

We further define the following events,
\begin{equation}
\begin{aligned}
\mathcal{G}_4&=\left\{\|\widetilde{\Sigma}^{\mathbb{Q}}-{\Sigma}^{\mathbb{Q}}\|_2\lesssim \sqrt{\frac{p}{N_{\mathbb{Q}}}}+\frac{p}{N_{\mathbb{Q}}}\right\},\\
\mathcal{G}_5&=\left\{ \max_{\mathcal{S}\subset[p], |\mathcal{S}|\leq s}\max_{\|w_{\mathcal{S}^c}\|_1\leq C\|w_{\mathcal{S}}\|_1}\left|\frac{w^{\intercal}\left(\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}X^{\mathbb{Q}}_{i}[X^{\mathbb{Q}}_{i}]^{\intercal}\right)w}{w^{\intercal}E(X^{\mathbb{Q}}_{i}[X^{\mathbb{Q}}_{i}])w}-1\right| \lesssim {\frac{s\log p}{N_{\mathbb{Q}}}}\right\},\\
\mathcal{G}_6(w,v,t)&=\left\{\left|{w^{\intercal}\left(\widehat{\Sigma}^{\mathbb{Q}}-\Sigma^{\mathbb{Q}}\right)v}\right|+\left|{w^{\intercal}\left(\widetilde{\Sigma}^{\mathbb{Q}}-\Sigma^{\mathbb{Q}}\right)v}\right|\lesssim t\frac{\|(\Sigma^{\mathbb{Q}})^{1/2} w\|_2\|(\Sigma^{\mathbb{Q}})^{1/2} v\|_2}{\sqrt{N_{\mathbb{Q}}}}\right\},
\label{eq: high prob event 2}
\end{aligned}
\end{equation}
where $\widetilde{\Sigma}^{\mathbb{Q}}=\frac{1}{|A|}\sum_{i\in A} X^{\mathbb{Q}}_{i, \cdot}
(X^{\mathbb{Q}}_{i, \cdot})^{\intercal}$, $\widehat{\Sigma}^{\mathbb{Q}}=\frac{1}{|B|}\sum_{i\in B} X^{\mathbb{Q}}_{i, \cdot}
(X^{\mathbb{Q}}_{i, \cdot})^{\intercal}$ and  $t>0$ is any positive constant and $w,v\in \mathbb{R}^{p}$ are pre-specified vectors. 

\begin{Lemma}
Suppose that Condition {\rm (A1)} holds and $s\lesssim n/\log p$, then 
\begin{equation}
{\mathbf{P}}\left(\cap_{j=0}^{3}\mathcal{G}_j\right)\geq 1-\min\{n,p\}^{-c},
\label{eq: control of event 1}
\end{equation} 
\begin{equation}
{\mathbf{P}}\left(\mathcal{G}_4\cap\mathcal{G}_5\right)\geq 1-p^{-c},
\label{eq: control of event 2}
\end{equation}
\begin{equation}
{\mathbf{P}}\left(\mathcal{G}_6(w,v,t)\right)\geq 1-2\exp(-ct^2), 
\label{eq: control of event 3}
\end{equation}
for some positive constant $c>0.$
\label{lem: high prob literature}
\end{Lemma}
The above high-probability statement \eqref{eq: control of event 1} follows from the existing literature results on the analysis of Lasso estimators and we shall point to the exact literature results. Specifically, the control of the probability of $\mathcal{G}_0$ follows from Lemma 6.2 of \cite{buhlmann2011statistics}. Regarding the events $\mathcal{G}_1$ and $\mathcal{G}_2$, the control of  $\|\widehat{b}^{(l)}_{init}-b^{(l)}\|_1,$ $\|\widehat{b}^{(l)}_{init}-b^{(l)}\|_2$ and $\frac{1}{\sqrt{n_{l}}}\|X^{(l)}(\widehat{b}^{(l)}_{init}-b^{(l)})\|_2$ can be found in Theorem 3 of \cite{ye2010rate}, Theorem 7.2 of \cite{bickel2009simultaneous} or Theorem 6.1 of \cite{buhlmann2011statistics}; the control of  $\|[\widehat{b}_{init}^{(l)}-b^{(l)}]_{\mathcal{S}_{l}^c}\|_1\leq C \|[\widehat{b}_{init}^{(l)}-b^{(l)}]_{\mathcal{S}_{l}}\|_1$ can be found in Corollary B.2 of \cite{bickel2009simultaneous} or Lemma 6.3 of \cite{buhlmann2011statistics}. For the event $\mathcal{G}_3$, its probability can be controlled as Theorem 2 or (20) in \cite{sun2012scaled}.


If $X^{\mathbb{Q}}_{i}$ is sub-gaussian, it follows from equation (5.26) of \cite{vershynin2010introduction} that the event $\mathcal{G}_4$ holds with a probability larger than $1-\exp(-cp)$ for some positive constant $c>0.$; it follows from Theorem 1.6 of \cite{zhou2009restricted} that the event $\mathcal{G}_5$ holds with a probability larger than $1-p^{-c}$ for some positive constant $c>0$. The proof of \eqref{eq: control of event 3} follows from Lemma 10 in the supplement of \cite{cai2020semisupervised}. 






\subsection{Proof of Proposition \ref{prop: general variance}}
\label{sec: variance bound}
We have the expression for the diagonal element of ${\bf V}$ as
\begin{equation*}
\begin{aligned}
{\bf V}_{\pi(l,k),\pi(l,k)}&=\frac{\sigma_{l}^2}{|B_{l}|}(\widehat{u}^{(l,k)})^{\intercal}\widehat{\Sigma}^{(l)} \left[\widehat{u}^{(l,k)}+\widehat{u}^{(k,l)} {\bf 1}(k=l)\right]+\frac{\sigma_{k}^2}{|B_{k}|}(\widehat{u}^{(k,l)})^{\intercal}\widehat{\Sigma}^{(k)} \left[\widehat{u}^{(l,k)} {\bf 1}(l=k)+\widehat{u}^{(k,l)}\right]\\
&+\frac{1}{|B|}(\mathbf{E} [b^{(l)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(k)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(l)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(k)}]^{\intercal}X_{i}^{\mathbb{Q}}-(b^{(l)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k)}(b^{(l)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k)}).
\end{aligned}
\end{equation*}
We introduce the following lemma, which restates Lemma 1 of \cite{cai2019individualized} in the current paper's terminology.
\begin{Lemma} Suppose that Condition {\rm (A1)} holds, then with probability larger than $1-p^{-c}$,
\begin{equation*}
c \frac{\|\omega^{(k)}\|^2_2}{n_l} \leq \frac{1}{|B_l|}(\widehat{u}^{(l,k)})^{\intercal}\widehat{\Sigma}^{(l)} \widehat{u}^{(l,k)}\leq C \frac{\|\omega^{(k)}\|^2_2}{n_l}, \quad \text{for} \quad 1\leq l,k\leq L,
\end{equation*}
\begin{equation*}
c \frac{\|\omega^{(l)}\|^2_2}{n_k} \leq  \frac{1}{|B_k|}(\widehat{u}^{(k,l)})^{\intercal}\widehat{\Sigma}^{(k)} \widehat{u}^{(l,k)}\leq C \frac{\|\omega^{(l)}\|^2_2}{n_k},  \quad \text{for} \quad 1\leq l,k\leq L,
\end{equation*}
for some positive constants $C>c>0$.
\label{lem: enhanced variance}
\end{Lemma}
The bounds for ${\bf V}^{(a)}_{\pi(l,k),\pi(l,k)}$ in \eqref{eq: diagonal order} follow from Lemma \ref{lem: enhanced variance}. 
Since $X_{i}^{\mathbb{Q}}$ is sub-gaussian, we have
\begin{equation}
\left|\mathbf{E} [b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(k_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(l_2)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(k_2)}]^{\intercal}X_{i}^{\mathbb{Q}}\right|\lesssim \|b^{(l_1)}\|_2 \|b^{(k_1)}\|_2\|b^{(l_2)}\|_2\|b^{(k_2)}\|_2,
\label{eq: var 2a}
\end{equation}
and
\begin{equation}
(b^{(l_1)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k_1)}(b^{(l_2)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k_2)}\lesssim\|b^{(l_1)}\|_2 \|b^{(k_1)}\|_2\|b^{(l_2)}\|_2\|b^{(k_2)}\|_2.
\label{eq: var 2b}
\end{equation}
We establish the upper bound for ${\bf V}^{(b)}_{\pi(l,k),\pi(l,k)}$ in \eqref{eq: diagonal order} by taking $l_1=l_2=l$ and $k_1=k_2=k.$

For the setting of known ${\Sigma}^{\mathbb{Q}}$, on the event $\mathcal{G}_2$ defined in \eqref{eq: high prob event 1}, we establish
$$\|\omega^{(k)}\|_2=\|{\Sigma}^{\mathbb{Q}} \widehat{b}_{init}^{(k)}\|_2\lesssim\lambda_{\max}(\Sigma^{\mathbb{Q}})\|\widehat{b}_{init}^{(k)}\|_2\lesssim \lambda_{\max}(\Sigma^{\mathbb{Q}})\left(\|{b}^{(k)}\|_2+\sqrt{s\log p/n}\right).$$



To establish \eqref{eq: variance 1}, we control $\|\omega^{(k)}\|_2=\|\widetilde{\Sigma}^{\mathbb{Q}} \widehat{b}_{init}^{(k)}\|_2$ as follows, 
\begin{equation*}
\begin{aligned}
\|\widetilde{\Sigma}^{\mathbb{Q}} \widehat{b}_{init}^{(k)}\|_2\leq \|{\Sigma}^{\mathbb{Q}} \widehat{b}_{init}^{(k)}\|_2+\|(\widetilde{\Sigma}^{\mathbb{Q}}-{\Sigma}^{\mathbb{Q}}) \widehat{b}_{init}^{(k)}\|_2\leq \lambda_{\max}(\Sigma^{\mathbb{Q}})\|\widehat{b}_{init}^{(k)}\|_2+\|\widetilde{\Sigma}^{\mathbb{Q}}-{\Sigma}^{\mathbb{Q}}\|_2\|\widehat{b}_{init}^{(k)}\|_2.
\end{aligned}
\end{equation*}
{On the event $\mathcal{G}_4$, we establish
\begin{equation*}
\|\omega^{(k)}\|_2\lesssim \lambda_{\max}(\Sigma^{\mathbb{Q}})\left(1+\sqrt{\frac{p}{N_{\mathbb{Q}}}}+\frac{p}{N_{\mathbb{Q}}}\right)\left(\|{b}^{(k)}\|_2+\sqrt{s\log p/n}\right).
\end{equation*}}
With a similar bound for $\|\omega^{(l)}\|_2$, we establish \eqref{eq: variance 1}. 





 \subsection{Proof of Proposition \ref{prop: limiting Gamma univariate}}
 \label{sec: covariate shift proof 1}

We decompose the error ${\widehat{\Gamma}_{l,k}}^{\mathbb{Q}}-{\Gamma}_{l,k}^{\mathbb{Q}}$ as
 \begin{equation}
\begin{aligned}
{\widehat{\Gamma}_{l,k}}^{\mathbb{Q}}-{\Gamma}_{l,k}^{\mathbb{Q}}&=\frac{1}{|B_l|}(\widehat{u}^{(l,k)})^{\intercal}[X^{(l)}_{B_{l}}]^{\intercal}\epsilon^{(l)}_{B_l}+\frac{1}{|B_k|}(\widehat{u}^{(k,l)})^{\intercal}[X^{(k)}_{B_{k}}]^{\intercal}\epsilon^{(k)}_{B_k}\\
&+(b^{(l)})^{\intercal}(\widehat{\Sigma}^{\mathbb{Q}}-\Sigma^{\mathbb{Q}})b^{(k)}-(\widehat{b}_{init}^{(l)}-b^{(l)})^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}(\widehat{b}_{init}^{(k)}-b^{(k)})\\
&+(\widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}-\widehat{\Sigma}^{(l)} \widehat{u}^{(l,k)})^{\intercal}(\widehat{b}_{init}^{(l)}-b^{(l)})+(\widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(l)}-\widehat{\Sigma}^{(l)} \widehat{u}^{(k,l)})^{\intercal}(\widehat{b}_{init}^{(k)}-b^{(k)}).
\end{aligned}
\label{eq: decomposition general}
\end{equation}

We define $D_{l,k}=D^{(a)}_{l,k}+D^{(b)}_{l,k}$ with 
$$D^{(a)}_{l,k}=\frac{1}{|B_l|}(\widehat{u}^{(l,k)})^{\intercal}[X^{(l)}_{B_{l}}]^{\intercal}\epsilon^{(l)}_{B_l}+\frac{1}{|B_k|}(\widehat{u}^{(k,l)})^{\intercal}[X^{(k)}_{B_{k}}]^{\intercal}\epsilon^{(k)}_{B_k},$$
and 
$$D^{(b)}_{l,k}=(b^{(l)})^{\intercal}(\widehat{\Sigma}^{\mathbb{Q}}-\Sigma^{\mathbb{Q}})b^{(k)}.$$
Define ${\rm Rem}_{l,k}$ as
\begin{equation*}
\begin{aligned}
{\rm Rem}_{l,k}=&-(\widehat{b}_{init}^{(l)}-b^{(l)})^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}(\widehat{b}_{init}^{(k)}-b^{(k)})+(\widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}-\widehat{\Sigma}^{(l)} \widehat{u}^{(l,k)})^{\intercal}(\widehat{b}_{init}^{(l)}-b^{(l)})\\
&+(\widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(l)}-\widehat{\Sigma}^{(l)} \widehat{u}^{(k,l)})^{\intercal}(\widehat{b}_{init}^{(k)}-b^{(k)}).
\end{aligned}
\label{eq: reminder term}
\end{equation*}
By \eqref{eq: decomposition general}, we have $${\widehat{\Gamma}_{l,k}}^{\mathbb{Q}}-{\Gamma}_{l,k}^{\mathbb{Q}}=D_{l,k}+{\rm Rem}_{l,k}.$$
Note that $D^{(a)}_{l,k}$ is a function of $X^{\mathbb{Q}}_{A}$, $\{X^{(l)}\}_{1\leq l\leq L}$ and $\{\epsilon^{(k)}\}_{1\leq l\leq L}$ and $D^{(b)}_{l,k}$ is a function of the sub-sample $X^{\mathbb{Q}}_{B}$ and hence $D^{(a)}_{l,k}$ is independent of $D^{(b)}_{l,k}.$

\paragraph{Limiting distribution of $D_{l,k}.$}
We check the Lindeberg's condition and establish the asymptotic normality of $D_{l,k}$. 
In the following, we focus on the setting $l\neq k$ and the proof can be extended to the setting $l=k.$
We write \begin{align*}
\frac{D^{(a)}_{l,k}}{{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}} }&=\frac{1}{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}} \left((\widehat{u}^{(l,k)})^{\intercal} \frac{1}{|B_l|}\sum_{i\in B_l} {X^{(l)}_{i}}\epsilon^{(l)}_{i}+(\widehat{u}^{(k,l)})^{\intercal} \frac{1}{|B_k|}\sum_{i\in B_k} {X^{(k)}_{i}}\epsilon^{(k)}_{i}\right),\\
\frac{D^{(b)}_{l,k}}{{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}} }&=\frac{1}{{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}}\frac{1}{|B|}\sum_{i\in B}[b^{(l)}]^{\intercal} \left(X^{\mathbb{Q}}_{i} (X^{\mathbb{Q}}_{i})^{\intercal}-\Sigma^{\mathbb{Q}}\right)b^{(k)}.
\end{align*} 
Define 
\begin{equation*}
W_{l,i}=\frac{1}{|B_l|\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}(\widehat{u}^{(l,k)})^{\intercal}{X^{(l)}_{i}}\epsilon^{(l)}_{i} \quad \text{for}\quad i\in B_l,
\end{equation*}
\begin{equation*}
W_{k,i}=\frac{1}{|B_k|\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}(\widehat{u}^{(k,l)})^{\intercal}{X^{(k)}_{i}}\epsilon^{(k)}_{i} \quad \text{for}\quad i\in B_k
\end{equation*}
and 
$$W_{\mathbb{Q},i}=\frac{1}{|B|{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}}[b^{(l)}]^{\intercal} \left(X^{\mathbb{Q}}_{i} (X^{\mathbb{Q}}_{i})^{\intercal}-\Sigma^{\mathbb{Q}}\right)b^{(k)} \quad \text{for}\quad i \in B.
$$
Then we have 
$$\frac{D_{l,k}}{{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}}=\sum_{i\in B_l} W_{l,i}+\sum_{i\in B_k} W_{k,i}+\sum_{i\in B} W_{\mathbb{Q},i}.$$


We use $\mathcal{O}_1=\{X^{\mathbb{Q}}_{i}\}_{i\in A}\cup\{X^{(l)},Y^{(l)}_{A_l}\}_{1\leq l\leq L}$  to denote the subset of data used for computing $\widehat{u}^{(l,k)}$ and $\widehat{u}^{(k,l)}$. 
Conditioning on $\mathcal{O}_1,$  then $\{W_{l,i}\}_{i\in B_l}$, $\{W_{k,i}\}_{i\in B_k}$ and $\{W_{\mathbb{Q},i}\}_{i\in B}$ are independent random variables. 
Note that $\mathbf{E}(W_{l,i}\mid \mathcal{O}_1)=0$ for $i\in B_l$, $\mathbf{E}(W_{k,i}\mid \mathcal{O}_1)=0$ for $i\in B_k$ and $\mathbf{E}(W_{\mathbb{Q},i}\mid \mathcal{O}_1)=0$ for $i\in B.$ Furthermore, we have 
\begin{equation}
\sum_{i\in B_l}\mathbf{E}(W^2_{l,i}\mid \mathcal{O}_1)+\sum_{i\in B_k}\mathbf{E}(W^2_{k,i}\mid \mathcal{O}_1)+\sum_{i\in B}\mathbf{E}(W^2_{\mathbb{Q},i}\mid \mathcal{O}_1)=1.
\label{eq: var constraint}
\end{equation}
Define the event $$\mathcal{E}_3=\left\{\frac{\|\omega^{(l)}\|^2_2}{n_k} +\frac{\|\omega^{(k)}\|^2_2}{n_l} \lesssim{{\bf V}}^{(a)}_{\pi(l,k),\pi(l,k)} \right\},$$
and it follows from Proposition \ref{prop: general variance} that 
\begin{equation}
{\mathbf{P}}\left(\mathcal{O}_1\in \mathcal{E}_3\right)\geq 1-\min\{n,p\}^{-c}.
\label{eq: inter prob control}
\end{equation}
Let ${o}_1$ denote one element of the event $\mathcal{E}_3.$
To establish the asymptotic normality, it is sufficient to check the following Lindeberg's condition: for any constant $c>0$,
\begin{equation}
\begin{aligned}
&\sum_{i\in B_l}\mathbf{E}\left(W_{l,i}^2 \mathbf{1}{\left\{\left|W_{l,i}\right|\geq c\right\}}\mid \mathcal{O}_1={o}_1\right)+\sum_{i\in B_k}\mathbf{E}\left(W_{k,i}^2 \mathbf{1}{\left\{\left|W_{k,i}\right|\geq c\right\}}\mid \mathcal{O}_1={o}_1\right)\\
&+\sum_{i\in B}\mathbf{E}\left(W_{\mathbb{Q},i}^2 \mathbf{1}{\left\{\left|W_{\mathbb{Q},i}\right|\geq c\right\}}\mid \mathcal{O}_1={o}_1\right)\rightarrow 0.
\end{aligned}
\label{eq: lin condition}
\end{equation}
We apply the optimization constraint 
in \eqref{eq: constraint 3} and establish
\begin{equation*}
\begin{aligned}
&\sum_{i\in B_l}\mathbf{E}\left(W_{l,i}^2 \mathbf{1}{\left\{\left|W_{l,i}\right|\geq c\right\}}\mid \mathcal{O}_1\right)+\sum_{i\in B_k}\mathbf{E}\left(W_{k,i}^2 \mathbf{1}{\left\{\left|W_{k,i}\right|\geq c\right\}}\mid \mathcal{O}_1\right)\\
&\leq \sum_{i\in B_l}\frac{[\sigma_l^2(\widehat{u}^{(l,k)})^{\intercal}X^{(l)}_{i}]^2}{|B_l|^2{{\bf V}_{\pi(l,k),\pi(l,k)}}}\mathbf{E}\left(\frac{(\epsilon^{(l)}_{i})^2}{\sigma_l^2} \mathbf{1}{\left\{\left|\epsilon^{(l)}_{i}\right|\geq \frac{c |B_l|\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}{\|\omega^{(k)}\|_2\sqrt{\log |B_l|}}\right\}}\mid \mathcal{O}_1 \right)\\
&+\sum_{i\in B_k}\frac{[\sigma_k^2(\widehat{u}^{(k,l)})^{\intercal}X^{(k)}_{i}]^2}{|B_k|^2{{\bf V}_{\pi(l,k),\pi(l,k)}}}\mathbf{E}\left(\frac{(\epsilon^{(k)}_{i})^2}{\sigma_k^2} \mathbf{1}{\left\{\left|\epsilon^{(k)}_{i}\right|\geq \frac{c |B_k|\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}{\|\omega^{(l)}\|_2\sqrt{\log |B_k|}}\right\}}\mid \mathcal{O}_1 \right)\\
&\leq \sum_{i\in B_l}\frac{[\sigma_l^2(\widehat{u}^{(l,k)})^{\intercal}X^{(l)}_{i}]^2}{|B_l|^2{{\bf V}_{\pi(l,k),\pi(l,k)}}}\mathbf{E}\left(\frac{(\epsilon^{(l)}_{i})^2}{\sigma_l^2} \mathbf{1}{\left\{\left|\epsilon^{(l)}_{i}\right|\geq \frac{c |B_l|\sqrt{{\bf V}^{(a)}_{\pi(l,k),\pi(l,k)}}}{\|\omega^{(k)}\|_2\sqrt{\log |B_l|}}\right\}}\mid \mathcal{O}_1 \right)\\
&+\sum_{i\in B_k}\frac{[\sigma_k^2(\widehat{u}^{(k,l)})^{\intercal}X^{(k)}_{i}]^2}{|B_k|^2{{\bf V}_{\pi(l,k),\pi(l,k)}}}\mathbf{E}\left(\frac{(\epsilon^{(k)}_{i})^2}{\sigma_k^2} \mathbf{1}{\left\{\left|\epsilon^{(k)}_{i}\right|\geq \frac{c |B_k|\sqrt{{\bf V}^{(a)}_{\pi(l,k),\pi(l,k)}}}{\|\omega^{(l)}\|_2\sqrt{\log |B_k|}}\right\}}\mid \mathcal{O}_1 \right)
\end{aligned}
\end{equation*}
where the last inequality follows from ${\bf V}_{\pi(l,k),\pi(l,k)}\geq {\bf V}^{(a)}_{\pi(l,k),\pi(l,k)}.$


By the definition of $\mathcal{E}_3$, we condition on $\mathcal{O}_1={o}_1$ with ${o}_1\in \mathcal{E}_3$ and further upper bound  the right hand side of the above inequality by 
\begin{equation}
\begin{aligned}
&\max_{1\leq i\leq n_l}\mathbf{E}\left(\frac{(\epsilon^{(l)}_{i})^2}{\sigma_l^2} \mathbf{1}{\left\{\left|\epsilon^{(l)}_{i}\right|\geq \frac{c |B_l|\sqrt{{\bf V}^{(a)}_{\pi(l,k),\pi(l,k)}}}{\|\omega^{(k)}\|_2\sqrt{\log |B_l|}}\right\}}\mid \mathcal{O}_1={o}_1\right)\\
&+\max_{1\leq i\leq n_k}\mathbf{E}\left(\frac{(\epsilon^{(k)}_{i})^2}{\sigma_l^2} \mathbf{1}{\left\{\left|\epsilon^{(k)}_{i}\right|\geq \frac{c |B_k|\sqrt{{\bf V}^{(a)}_{\pi(l,k),\pi(l,k)}}}{\|\omega^{(l)}\|_2\sqrt{\log |B_k|}}\right\}}\mid \mathcal{O}_1={o}_1 \right)\\ 
&\leq \max_{1\leq i\leq n_l}\mathbf{E}\left(\frac{(\epsilon^{(l)}_{i})^2}{\sigma_l^2} \mathbf{1}{\left\{\left|\epsilon^{(l)}_{i}\right|\geq \frac{c |B_l|\sqrt{\frac{\|\omega^{(l)}\|^2_2}{n_k} +\frac{\|\omega^{(k)}\|^2_2}{n_l}}}{\|\omega^{(k)}\|_2\sqrt{\log |B_l|}}\right\}}\mid \mathcal{O}_1={o}_1 \right)\\
&+\max_{1\leq i\leq n_k}\mathbf{E}\left(\frac{(\epsilon^{(k)}_{i})^2}{\sigma_l^2} \mathbf{1}{\left\{\left|\epsilon^{(k)}_{i}\right|\geq \frac{c |B_k|\sqrt{\frac{\|\omega^{(l)}\|^2_2}{n_k} +\frac{\|\omega^{(k)}\|^2_2}{n_l}}}{\|\omega^{(l)}\|_2\sqrt{\log |B_k|}}\right\}}\mid \mathcal{O}_1={o}_1 \right)

\lesssim \left(\frac{\log n}{n}\right)^{\frac{c}{2}},
\end{aligned}
\label{eq: lin condition 2}
\end{equation}
where the last inequality follows from $\mathbf{E}([\epsilon^{(l)}_i]^{2+c}_i\mid X^{(l)}_{i})\leq C$ in Condition (A1).

Define $$J_i=[b^{(l)}]^{\intercal} \left(X^{\mathbb{Q}}_{i} (X^{\mathbb{Q}}_{i})^{\intercal}-\Sigma^{\mathbb{Q}}\right)b^{(k)},$$ and 
\begin{align*}
\bar{W}_{\mathbb{Q},i}=\frac{1}{|B|{\sqrt{{\bf V}^{(b)}_{\pi(l,k),\pi(l,k)}}}}[b^{(l)}]^{\intercal} \left(X^{\mathbb{Q}}_{i} (X^{\mathbb{Q}}_{i})^{\intercal}-\Sigma^{\mathbb{Q}}\right)b^{(k)} =\frac{J_i}{{\sqrt{|B| {\rm Var}(J_i)}}}\quad \text{for}\quad i \in B.
\end{align*} 
Note that $|{W}_{\mathbb{Q},i}|\leq |\bar{W}_{\mathbb{Q},i}|,$ and then we have 
\begin{equation*}
\begin{aligned}
\sum_{i\in B}\mathbf{E}\left(W_{\mathbb{Q},i}^2 \mathbf{1}{\left\{\left|W_{\mathbb{Q},i}\right|\geq c\right\}}\mid \mathcal{O}_1\right)&=\sum_{i\in B}\mathbf{E}\left(W_{\mathbb{Q},i}^2 \mathbf{1}{\left\{\left|W_{\mathbb{Q},i}\right|\geq c\right\}}\right)\\
 &\leq \sum_{i\in B}\mathbf{E}\left(\bar{W}_{\mathbb{Q},i}^2 \mathbf{1}{\left\{\left|\bar{W}_{\mathbb{Q},i}\right|\geq c\right\}}\right)\\
 &\leq \mathbf{E} \left({J_i^2}/{{\rm Var}(J_i)}\right) \cdot \mathbf{1}\left({|J_i|}/\sqrt{{\rm Var}(J_i)}\geq c\sqrt{|B|}\right).
\end{aligned}
\end{equation*}
Together with the dominated convergence theorem, we have  $$\sum_{i\in B}\mathbf{E}\left(W_{\mathbb{Q},i}^2 \mathbf{1}{\left\{\left|W_{\mathbb{Q},i}\right|\geq c\right\}}\mid \mathcal{O}_1\right)\rightarrow 0.$$
Combined with \eqref{eq: lin condition 2}, we establish \eqref{eq: lin condition}. Hence, for ${o}_1\in \mathcal{E}_3$, we establish $$\frac{D_{l,k}}{{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}}\mid \mathcal{O}_1={o}_1 \overset{d}{\to} \mathcal{N}(0,1).$$ We calculate its characteristic function
\begin{equation*}
\begin{aligned}
&\mathbf{E} \exp\left(it \cdot \frac{D_{l,k}}{{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}}\right)-e^{-t^2/2}\\
&=\int \mathbf{E} \left(\left[\exp\left(it \cdot \frac{D_{l,k}}{{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}}\right)\mid \mathcal{O}_1={o}_1\right]-e^{-t^2/2}\right)\cdot {\bf 1}_{o_1\in \mathcal{E}_3} \cdot \mu(o_1)\\
&+\int \mathbf{E} \left[\exp\left(it \cdot \frac{D_{l,k}}{{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}}\right)\mid \mathcal{O}_1={o}_1\right]\cdot {\bf 1}_{o_1\not \in \mathcal{E}_3}\cdot \mu(o_1)-e^{-t^2/2}\cdot {\mathbf{P}}(\mathcal{E}^c_3).
\end{aligned}
\end{equation*}
Combined with \eqref{eq: inter prob control} and the bounded convergence theorem, we establish 
$$\frac{D_{l,k}}{{\sqrt{{\bf V}_{\pi(l,k),\pi(l,k)}}}}\overset{d}{\rightarrow} \mathcal{N}(0,1).$$


\paragraph{Control of ${\rm Rem}_{l,k}$ in \eqref{eq: bias}.}
We introduce the following lemma, whose proof is presented in Section \ref{sec: bias general}.
{
\begin{Lemma} Suppose that Condition {\rm (A1)} holds, then with probability larger than $1-\min\{n,p\}^{-c},$ we have
\begin{equation}
\small
\left|(\widehat{b}_{init}^{(l)}-b^{(l)})^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}(\widehat{b}_{init}^{(k)}-b^{(k)})\right| \lesssim \sqrt{\frac{\|b^{(l)}\|_0 \|b^{(k)}\|_0(\log p)^2}{{n_l n_k}}},
\label{eq: error bound 1}
\end{equation}
\begin{equation}
\small
\left|(\widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}-\widehat{\Sigma}^{(l)} \widehat{u}^{(l,k)})^{\intercal}(\widehat{b}_{init}^{(l)}-b^{(l)})\right| \lesssim \|\omega^{(k)}\|_2 {\frac{\|b^{(l)}\|_0 \log p}{n_l}}+ \|\widehat{b}^{(k)}_{init}\|_2\sqrt{\frac{\|b^{(l)}\|_0 (\log p)^2}{n_l N_{\mathbb{Q}}}},
\label{eq: error bound 2}
\end{equation}
\begin{equation}
\small
\left|(\widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(l)}-\widehat{\Sigma}^{(l)} \widehat{u}^{(k,l)})^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}(\widehat{b}_{init}^{(k)}-b^{(k)})\right| \lesssim \|\omega^{(l)}\|_2 {\frac{\|b^{(k)}\|_0 \log p}{n_k}}+ \|\widehat{b}^{(l)}_{init}\|_2\sqrt{\frac{\|b^{(k)}\|_0 (\log p)^2}{n_k N_{\mathbb{Q}}}}.
\label{eq: error bound 3}
\end{equation}
\label{lem: bias general}	
\end{Lemma}
}
On the event $\mathcal{G}_1,$ we have $$\|\widehat{b}^{(l)}_{init}\|_2\leq \|{b}^{(l)}\|_2+\sqrt{{\frac{\|b^{(k)}\|_0 \log p}{n_k}}}.$$ Combining this inequality with Lemma \ref{lem: bias general}, we establish the upper bound for	${\rm Rem}_{l,k}$ in \eqref{eq: bias}. 









\subsection{Proof of Proposition \ref{prop: limiting Gamma no shift}}
\label{sec: prop 8 proof}
Define $N=\sum_{l=1}^{L}n_l+N_{\mathbb{Q}},$ $\widetilde{\Sigma}^{(l)}=\frac{1}{n_l}\sum_{i=1}^{n_l} X^{(l)}_{i} [X^{(l)}_{i}]^{\intercal}$ for $1\leq l\leq L$ and 
$$
\widehat{\Sigma}=\frac{1}{\sum_{l=1}^{L} n_l+N_{\mathbb{Q}}}\left(\sum_{l=1}^{L}
\sum_{i=1}^{n_l} X^{(l)}_{i}[X^{(l)}_{i}]^{\intercal} +\sum_{i=1}^{N_{\mathbb{Q}}} X^{(l)}_{i}[X^{(l)}_{i}]^{\intercal}\right).$$  The difference between the proposed estimator $\widehat{\Gamma}_{l,k}$ and ${\Gamma}_{l,k}$ is $$\widehat{\Gamma}_{l,k}-{\Gamma}_{l,k}=D^{(1)}_{l,k}+D^{(2)}_{l,k}+{\rm Rem}_{l,k},$$ where 
\begin{equation*}
\begin{aligned}
D^{(1)}_{l,k}=\frac{1}{n_k}(b^{(l)})^{\intercal}[X^{(k)}]^{\intercal} \epsilon^{(k)}+\frac{n_k}{N}(b^{(l)})^{\intercal}\left(\widetilde{\Sigma}^{(k)}-\Sigma\right)b^{(k)}\\
+\frac{1}{n_l}(b^{(k)})^{\intercal}[X^{(l)}]^{\intercal}\epsilon^{(l)}+\frac{n_l}{N}(b^{(l)})^{\intercal}\left(\widetilde{\Sigma}^{(l)}-\Sigma\right)b^{(k)},
\end{aligned}
\end{equation*}
$$D^{(2)}_{l,k}=(b^{(l)})^{\intercal}\left(\widehat{\Sigma}-\frac{n_l}{N}\widetilde{\Sigma}^{(l)}-\frac{n_k}{N}\widetilde{\Sigma}^{(k)}-\frac{N-n_l-n_k}{N}\Sigma\right)b^{(k)},$$
and
\begin{equation}
\begin{aligned}
&{\rm Rem}_{l,k}=\frac{1}{n_l}(\widehat{b}_{init}^{(k)}-b^{(k)})^{\intercal}[X^{(l)}]^{\intercal}\epsilon^{(l)}+\frac{1}{n_k}(\widehat{b}_{init}^{(l)}-b^{(l)})^{\intercal}[X^{(k)}]^{\intercal}\epsilon^{(k)}\\
&-(\widehat{b}_{init}^{(l)}-b^{(l)})^{\intercal}\widehat{\Sigma}(\widehat{b}_{init}^{(k)}-b^{(k)})+[\widehat{b}_{init}^{(l)}]^{\intercal}(\widehat{\Sigma}-\widetilde{\Sigma}^{(k)})(\widehat{b}_{init}^{(k)}-b^{(k)})+[\widehat{b}_{init}^{(k)}]^{\intercal}(\widehat{\Sigma}-\widetilde{\Sigma}^{(l)})(\widehat{b}_{init}^{(l)}-b^{(l)}).
\end{aligned}
\label{eq: key decomposition 1}
\end{equation}
In the following, we shall control $D^{(1)},D^{(2)}$ and ${\rm Rem}_{l,k}$ separately. Note that $D^{(1)}_{l,k}$ and $D^{(2)}_{l,k}$ are independent.  We write $$
D^{(1)}_{l,k}=\sum_{i=1}^{n_k} W^{(1)}_{k,i}+\sum_{i=1}^{n_l} W^{(1)}_{l,i}$$
with 
$$W^{(1)}_{k,i}=\frac{1}{n_k}\left[(b^{(l)})^{\intercal}X^{(k)}_{i} \epsilon^{(k)}_i+\frac{n_k}{N}(b^{(l)})^{\intercal}\left(X^{(k)}_{i}(X^{(k)}_{i})^{\intercal}-\Sigma\right)b^{(k)}\right] \quad \text{for}\quad 1\leq i\leq n_k,$$
and 
$$W^{(1)}_{l,i}=\frac{1}{n_l}\left[(b^{(k)})^{\intercal}X^{(l)}_{i} \epsilon^{(l)}_i+\frac{n_l}{N}(b^{(l)})^{\intercal}\left(X^{(l)}_{i}(X^{(l)}_{i})^{\intercal}-\Sigma\right)b^{(k)}\right] \quad \text{for}\quad 1\leq i\leq n_l.$$

We write 
$$
D^{(2)}_{l,k}=\sum_{j\neq k,l} \sum_{i=1}^{n_j} W^{(2)}_{j,i}+\sum_{i=1}^{n_{\mathbb{Q}}} W^{(2)}_{\mathbb{Q},i},$$
where for $1\leq j\leq L$ and  $j\neq l,k,$
$$W^{(2)}_{j,i}=\frac{1}{N}X^{(j)}_{i}[X^{(j)}_{i}]^{\intercal} \quad \text{for}\quad 1\leq i\leq n_j, \quad \text{and} \quad W^{(2)}_{\mathbb{Q},i}=\frac{1}{N}X^{\mathbb{Q}}_{i}[X^{\mathbb{Q}}_{i}]^{\intercal}\quad \text{for}\quad 1\leq i\leq N_{\mathbb{Q}}.$$

Since $\{W^{(1)}_{l,i}\}_{1\leq i\leq n_l}$ are i.i.d. random variables, $\{W^{(1)}_{k,i}\}_{1\leq i\leq n_k}$ are i.i.d. random variables, $\{W^{(2)}_{j,i}\}_{n\neq l,k, 1\leq i\leq n_j}$ and $\{W^{(2)}_{\mathbb{Q},i}\}_{1\leq i\leq N_{\mathbb{Q}}}$ are i.i.d. random variables and all of these random variables are independent, we apply central limit theorem and establish that  
\begin{equation}
\frac{D_{l,k}}{\sqrt{{\bf V}^{(1)}_{\pi(l,k),\pi(l,k)}+{\bf V}^{(2)}_{\pi(l,k),\pi(l,k)}}}\overset{d}{\to} \mathcal{N}(0,1),
\end{equation}
with ${\bf V}^{(1)}$ and ${\bf V}^{(2)}$ defined in \eqref{eq: cov def 1} and \eqref{eq: cov def 2}, respectively. 





We control ${\rm Rem}_{l,k}$ by the definition of ${\rm Rem}_{l,k}$ in \eqref{eq: key decomposition 1} and the following Lemma.
{
\begin{Lemma}
With probability larger than $1-\min\{n,p\}^{-c}$, we have
\begin{equation*}
\begin{aligned}
&\left|\frac{1}{n_l}(\widehat{b}_{init}^{(k)}-b^{(k)})^{\intercal}[X^{(l)}]^{\intercal}\epsilon^{(l)}\right|\lesssim \frac{s \log p}{n};\; \left|\frac{1}{n_k}(\widehat{b}_{init}^{(l)}-b^{(l)})^{\intercal}[X^{(k)}]^{\intercal}\epsilon^{(k)}\right| \lesssim \frac{s \log p}{n};\\
&\left|(\widehat{b}_{init}^{(l)}-b^{(l)})^{\intercal}\widehat{\Sigma}(\widehat{b}_{init}^{(k)}-b^{(k)})\right| \lesssim \frac{s \log p}{n};\\
&\left|[\widehat{b}_{init}^{(l)}]^{\intercal}(\widehat{\Sigma}-\widetilde{\Sigma}^{(k)})(\widehat{b}_{init}^{(k)}-b^{(k)})\right|\lesssim \left(\|b^{(l)}\|_2+1\right)\frac{s\log p}{n}; \\
&\left|[\widehat{b}_{init}^{(k)}]^{\intercal}(\widehat{\Sigma}-\widetilde{\Sigma}^{(l)})(\widehat{b}_{init}^{(l)}-b^{(l)})\right|\lesssim \left(\|b^{(k)}\|_2+1\right)\frac{s\log p}{n}.\\
\end{aligned}
\end{equation*}
\label{lem: bias 1}	
\end{Lemma}
}
\noindent{\bf Proof of \eqref{eq: variance no shift}.} The control of ${{\bf V}}^{(1)}_{\pi(l,k),\pi(l,k)}$ follows from the definition \eqref{eq: cov def 1}. The control of ${{\bf V}}^{(2)}_{\pi(l,k),\pi(l,k)}$ follows from \eqref{eq: var 2a} and \eqref{eq: var 2b}.


\section{Proof of Theorem \ref{thm: inference for linear} and \eqref{eq: more precise coverage}}
\label{sec: inference results}
We will prove the properties of the CI for the ridge-type maximin effect, which includes Theorem \ref{thm: inference for linear} as a special case.  We first detail the generalized inference procedure in the following, which is a generalization of the inference method in Section \ref{sec: inference guarantee}. We construct the sampled weight as 
\begin{equation*}
\widehat{\gamma}^{[m]}_{\delta}=\arg\min_{\gamma\in \Delta^{L}} \gamma^{\intercal}(\widehat{\Gamma}^{[m]}+\delta \cdot {\rm I})_{+} \gamma \quad \text{for}\quad \delta\geq 0.
\end{equation*}
For $1\leq m\leq M$, we compute $
\widehat{x_{\rm new}^{\intercal}\beta}^{[m]}=\sum_{l=1}^{L} [\widehat{\gamma}^{[m]}_{\delta}]_{l}\cdot \widehat{x_{\rm new}^{\intercal}b^{(l)}},
$
and construct the sampled interval as,
\begin{equation}
{\rm Int}_{\alpha}^{[m]}(x_{\rm new})=\left(\widehat{x_{\rm new}^{\intercal}\beta}^{[m]}-(1+\eta_0)z_{\alpha/2} \widehat{{\rm se}}^{[m]}(x_{\rm new}), \widehat{x_{\rm new}^{\intercal}\beta}^{[m]}+(1+\eta_0)z_{\alpha/2} \widehat{{\rm se}}^{[m]}(x_{\rm new})\right),
\label{eq: sampled interval ridge}
\end{equation}
where $\eta_0$ is any positive constant (with default value $0.01$) and
$$
\widehat{\rm se}^{[m]}(x_{\rm new})=\sqrt{\sum_{l=1}^{L}({\widehat{\sigma}_{l}^2}/{n_l^2})\cdot [\widehat{\gamma}^{[m]}_{\delta}]_{l}^{2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}} \quad \text{with}\; \widehat{v}^{(l)} \;\text{defined in} \; \eqref{eq: projection}.
$$
We slightly abuse the notation by using ${\rm Int}_{\alpha}^{[m]}(x_{\rm new})$ to denote the sampled interval for both $x_{\rm new}^{\intercal}\beta^{*}_{\delta}$  and $x_{\rm new}^{\intercal}\beta^{*}.$ 
We construct the CI for $x_{\rm new}^{\intercal}\beta^{*}_{\delta}$ by aggregating the sampled intervals with $m\in {\mathbb{M}}$,
\begin{equation}
{\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)=\cup_{m\in \mathbb{M}} {\rm Int}_{\alpha}^{[m]}(x_{\rm new}),
\label{eq: aggregation 1 ridge}
\end{equation} 
where $\mathbb{M}$ is defined in \eqref{eq: generating condition} and ${\rm Int}_{\alpha}^{[m]}(x_{\rm new})$ is defined in \eqref{eq: sampled interval ridge}.

In the following Theorem \ref{thm: inference for linear ridge}, we establish the coverage and precision properties of ${\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)$ defined in \eqref{eq: aggregation 1 ridge}.  We apply Theorem \ref{thm: inference for linear ridge} with $\delta=0$ and establish Theorem \ref{thm: inference for linear}.  


\begin{Theorem}
Suppose that the conditions of Theorem \ref{thm: sampling accuracy ridge} hold. Then for any positive constant $\eta_0>0$ used in \eqref{eq: sampled interval ridge}, the confidence interval ${\rm CI}_{\alpha}(x_{\rm new}^{\intercal}\beta^{*}_{\delta})$ defined in 
\eqref{eq: aggregation 1 ridge} satisfies 
\begin{equation}
\lim_{n,p\rightarrow \infty}{\mathbf{P}}\left(x_{\rm new}^{\intercal} \beta^{*}_{\delta}\in {\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)\right)\geq 1-\alpha-\alpha_0,
\label{eq: coverage ridge}
\end{equation}
where $\alpha\in (0,1/2)$ is the pre-specified significance level and $\alpha_0\in(0,0.01]$ is defined in \eqref{eq: generating condition}. By further assuming $N_{\mathbb{Q}}\gtrsim\max\{n,p\}$ and $\lambda_{\min}(\Gamma^{\mathbb{Q}})+\delta\gg \sqrt{\log p/\min\{n,N_{\mathbb{Q}}\}}$, then there exists some positive constant $C>0$ such that
\begin{equation}
\liminf_{n,p\rightarrow \infty} {\mathbf{P}}\left(\mathbf{Leng}\left({\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)\right)\leq C\max\left\{ 1,\frac{z_{\alpha_0/[L(L+1)]}}{\lambda_{\min}(\Gamma^{\mathbb{Q}})+\delta}\right\}\cdot \frac{\|x_{\rm new}\|_2}{\sqrt{n}}\right)=1,
\label{eq: length bound ridge}
\end{equation}
where $\mathbf{Leng}\left({\rm CI}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)\right)$ denotes the interval length and $z_{\alpha_0/[L(L+1)]}$ is the upper $\alpha_0/[L(L+1)]$ quantile of the standard normal distribution.
\label{thm: inference for linear ridge}
\end{Theorem}

In the following, we introduce the definitions of events, which are used to facilitate the proof of Theorem \ref{thm: inference for linear ridge}. 
We shall take $m^*$ as any index such that $\|\widehat{\gamma}^{[m^{*}]}_{\delta}-\gamma^{*}_{\delta}\|_2=\min_{m\in {\mathbb{M}}}\|\widehat{\gamma}^{[m]}_{\delta}-\gamma^{*}_{\delta}\|_2$.
We introduce the following high-probability events to facilitate the discussion. 
\begin{equation}
\begin{aligned}
\mathcal{E}_4&=\left\{\frac{1}{n_l}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}\asymp \|x_{\rm new}\|_2 \quad \text{for}\; 1\leq l\leq L\right\},\\
\mathcal{E}_5&=\left\{\frac{\left|\sum_{l=1}^{L} \left([\widehat{\gamma}_{\delta}^{[m]}]_{l}-[\gamma_{\delta}^{*}]_{l}\right)\widehat{x_{\rm new}^{\intercal}b^{(l)}}\right|}{\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\lesssim \sqrt{n}\|\widehat{\gamma}^{[m]}_{\delta}-\gamma^{*}_{\delta}\|_2,\; \text{for}\; 1\leq m\leq M\right\},\\
\mathcal{E}_6&=\left\{\|\widehat{\gamma}^{[m^{*}]}_{\delta}-\gamma^{*}_{\delta}\|_2\leq \frac{\sqrt{2}  {\rm err}_n(M)}{\lambda_{\min}(\Gamma^{\mathbb{Q}})+\delta} \cdot \frac{1}{\sqrt{n}}\right\},\\
\mathcal{E}_7&=\left\{\|\widehat{\Gamma}^{\mathbb{Q}}-\Gamma^{\mathbb{Q}}\|_2\lesssim \sqrt{\frac{\log p}{\min\{n,N_{\mathbb{Q}}\}}}+\frac{p\sqrt{\log p}}{\sqrt{n}N_{\mathbb{Q}}}\right\},\\
\mathcal{E}_8&=\left\{\max_{1\leq l\leq L}\frac{|\widehat{x_{\rm new}^{\intercal}b^{(l)}}-{x_{\rm new}^{\intercal}b^{(l)}}|}{\|x_{\rm new}\|_2}\lesssim \sqrt{\frac{\log n}{n}}\right\},\\

\mathcal{E}_9&=\left\{\frac{|\sum_{l=1}^{L} (\widehat{\gamma}^{[m^*]}_{\delta}]_{l}-[{\gamma}^{*}_{\delta}]_{l})\cdot\widehat{x_{\rm new}^{\intercal}b^{(l)}}|}{\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\leq \eta_0\cdot z_{\alpha/2}\sqrt{\frac{{\sum_{l=1}^{L}[\widehat{\gamma}^{[m^*]}_{\delta}]_{l}^{2}\frac{\widehat{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}{{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}}\right\}.
\end{aligned}
\label{eq: high prob inference}
 \end{equation}

We apply Lemma 1 of \cite{cai2019individualized} and establish that
$
{\mathbf{P}}\left(\mathcal{E}_4\right)\geq 1-p^{-c},
$ for some positive constant $c>0.$ 
On the event $\mathcal{E}_4$, we have 
\begin{equation}
\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}\asymp \frac{\|\gamma^{*}_{\delta}\|_2\|x_{\rm new}\|_2}{\sqrt{n}}\asymp \frac{\|x_{\rm new}\|_2}{\sqrt{n}},
\label{eq: lower variance}
\end{equation}
where the last asymptotic equivalence holds since $\frac{1}{\sqrt{L}}\leq \|\gamma^{*}_{\delta}\|_2 \leq 1.$ Similarly,  on the event $\mathcal{E}_4,$ 
\begin{equation}
\sqrt{\sum_{l=1}^{L}[\widehat{\gamma}^{[m]}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}\asymp \frac{\|\widehat{\gamma}^{[m]}_{\delta}\|_2\|x_{\rm new}\|_2}{\sqrt{n}}\asymp \frac{\|x_{\rm new}\|_2}{\sqrt{n}}.
\label{eq: first upper bound}
\end{equation}
 
 We introduce the following lemma to justify the asymptotic normality of $\widehat{x_{\rm new}^{\intercal}b^{(l)}}$, which follows the same proof as that of Proposition 1 in \cite{cai2019individualized}.
 \begin{Lemma} Consider the model \eqref{eq: multi-group model}. Suppose Conditions {\rm (A1)} and {\rm (A2)} hold, then 
\begin{equation}
\frac{\sum_{l=1}^{L} c_{l} [\widehat{x_{\rm new}^{\intercal}b^{(l)}}-{x_{\rm new}^{\intercal}b^{(l)}}]}{\sqrt{\sum_{l=1}^{L}c_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\overset{d}{\to} N(0,1).
\label{eq: limit distribution general}
\end{equation}
where $|c_l|\leq 1$ for any $1\leq l\leq L$, and $\sum_{l=1}^{L}c_l=1.$ 
 \label{lem: linear functional}
\end{Lemma}

Note that 
\begin{equation}
\begin{aligned}
\left|\sum_{l=1}^{L} \left([\widehat{\gamma}_{\delta}^{[m]}]_{l}-[\gamma_{\delta}^{*}]_{l}\right)\widehat{x_{\rm new}^{\intercal}b^{(l)}}\right|
&\leq \|\widehat{\gamma}^{[m]}_{\delta}-\gamma^{*}_{\delta}\|_2\sqrt{\sum_{l=1}^{L}[\widehat{x_{\rm new}^{\intercal}b^{(l)}}]^2}\\
&\lesssim\|\widehat{\gamma}^{[m]}_{\delta}-\gamma^{*}_{\delta}\|_2\sqrt{\sum_{l=1}^{L}[\widehat{x_{\rm new}^{\intercal}b^{(l)}}-{x_{\rm new}^{\intercal}b^{(l)}}]^2+\sum_{l=1}^{L}[{x_{\rm new}^{\intercal}b^{(l)}}]^2}.
\end{aligned}
\label{eq: error upper}
\end{equation}
By Lemma \ref{lem: linear functional} and \eqref{eq: lower variance}, with probability larger than $1-\min\{n,p\}^{-c}$ for some positive constant $c>0,$
\begin{equation}
\begin{aligned}
&\frac{\left|\sum_{l=1}^{L} \left([\widehat{\gamma}_{\delta}^{[m]}]_{l}-[\gamma_{\delta}^{*}]_{l}\right)\widehat{x_{\rm new}^{\intercal}b^{(l)}}\right|}{\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\\
&\lesssim \|\widehat{\gamma}^{[m]}_{\delta}-\gamma^{*}_{\delta}\|_2\cdot\frac{\sqrt{L}\cdot(\log n\cdot\frac{\|x_{\rm new}\|_2}{\sqrt{n}}+\max_{1\leq l\leq L}|x_{\rm new}^{\intercal}b^{(l)}|)}{\frac{1}{\sqrt{L}}\cdot \frac{\|x_{\rm new}\|_2}{\sqrt{n}}}\lesssim \sqrt{n}\|\widehat{\gamma}^{[m]}_{\delta}-\gamma^{*}_{\delta}\|_2,
 \end{aligned}
 \label{eq: error upper 2}
\end{equation}
where the last inequality follows from bounded $\|b^{(l)}\|_2$ and finite $L.$ This implies that ${\mathbf{P}}(\mathcal{E}_5)\geq 1-\min\{n,p\}^{-c}$ for some positive constant $c>0.$ It follows from \eqref{eq: resampling weight accuracy} of Theorem \ref{thm: sampling accuracy ridge} that $\liminf_{n\rightarrow\infty}{\mathbf{P}}(\mathcal{E}_6)\geq1-\alpha_0$. It follows from Propositions \ref{prop: limiting Gamma univariate} and \ref{prop: general variance} that $\liminf_{n\rightarrow\infty}{\mathbf{P}}(\mathcal{E}_7)=1.$ We apply Lemma \ref{lem: linear functional} with  $c_l=1$ and $c_j=0$ for $j\neq l$ and show that 
$${\mathbf{P}}(\mathcal{E}_8\cap \mathcal{E}_4)\geq 1-\min\{n,p\}^{-c},$$ for some positive constant $c>0.$ On the event $\mathcal{E}_5\cap \mathcal{E}_6,$ we have  
$$\frac{|\sum_{l=1}^{L} (\widehat{\gamma}^{[m^*]}_{\delta}]_{l}-[{\gamma}^{*}_{\delta}]_{l})\cdot\widehat{x_{\rm new}^{\intercal}b^{(l)}}|}{\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\lesssim \frac{\sqrt{2}  {\rm err}_n(M)}{\lambda_{\min}(\Gamma^{\mathbb{Q}})+\delta}.$$
On the event $\mathcal{G}_3\cap  \mathcal{E}_4 \cap  \mathcal{E}_6$  with $\mathcal{G}_3$ defined in \eqref{eq: high prob event 1} and $\mathcal{E}_4$ and $\mathcal{E}_6$ defined in \eqref{eq: high prob inference}, 
we apply \eqref{eq: lower variance} and \eqref{eq: first upper bound} to establish $ z_{\alpha/2}\sqrt{\frac{{\sum_{l=1}^{L}[\widehat{\gamma}^{[m^*]}_{\delta}]_{l}^{2}\frac{\widehat{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}{{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}}\geq c$ 
for some small constant $c>0.$ If $\eta_0$ used in \eqref{eq: sampled interval ridge} satisfies
\begin{equation}
\eta_0\geq C \frac{\sqrt{2}  {\rm err}_n(M)}{\lambda_{\min}(\Gamma^{\mathbb{Q}})+\delta},
\label{eq: eta_0 choice}
\end{equation} for some positive constant $C>0$, we establish $\mathcal{E}_9,$ which implies  
\begin{equation}
\begin{aligned}
\liminf_{n,p\rightarrow \infty}{\mathbf{P}}\left(\mathcal{E}_9\right)\geq \liminf_{n,p\rightarrow \infty}{\mathbf{P}}\left(\mathcal{G}_3\cap  \mathcal{E}_4\cap  \mathcal{E}_5\cap \mathcal{E}_6\right)\geq1-\alpha_0.
\end{aligned}
\label{eq: bias control prob}
\end{equation}
Since $ {\rm err}_n(M)\ll {\lambda_{\min}(\Gamma^{\mathbb{Q}})+\delta},$ then any positive constant $\eta_0>0$ will guarantee \eqref{eq: bias control prob}. 

\subsection{Coverage Property: Proof of \eqref{eq: coverage ridge}} 
It follows from Lemma \ref{lem: linear functional} that 
\begin{equation}
\frac{\sum_{l=1}^{L} [{\gamma}^{*}_{\delta}]_{l} [\widehat{x_{\rm new}^{\intercal}b^{(l)}}-{x_{\rm new}^{\intercal}b^{(l)}}]}{\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\overset{d}{\to} N(0,1).
\label{eq: limit distribution}
\end{equation}

By the definition in \eqref{eq: aggregation 1 ridge}, we have 
{\footnotesize
\begin{equation*}
\begin{aligned}
&{\mathbf{P}}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\not\in {\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)\right)\leq {\mathbf{P}}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\not\in {\rm Int}_{\alpha}^{[m^*]}(x_{\rm new})\right)\\
&={\mathbf{P}}\left(\frac{|\widehat{x_{\rm new}^{\intercal}\beta}^{[m^*]}-x_{\rm new}^{\intercal}\beta^{*}_{\delta}|}{\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\geq (1+\eta_0)\cdot z_{\alpha/2}\sqrt{\frac{{\sum_{l=1}^{L}[\widehat{\gamma}^{[m^*]}_{\delta}]_{l}^{2}\frac{\widehat{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}{{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}}\right).
\end{aligned}
\end{equation*}
}
By applying \eqref{eq: maximin inference decomp} with $m=m^{*},$ we further upper bound the above inequality as
{\footnotesize
\begin{equation}
\begin{aligned}
&{\mathbf{P}}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\not\in {\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)\right)\leq {\mathbf{P}}(\mathcal{E}_9^c)+\\
&{\mathbf{P}}\left(\frac{|\sum_{l=1}^{L} [{\gamma}^{*}_{\delta}]_{l} \cdot (\widehat{x_{\rm new}^{\intercal}b^{(l)}}-{x_{\rm new}^{\intercal}b^{(l)}})|}{\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\geq z_{\alpha/2}\sqrt{\frac{{\sum_{l=1}^{L}[\widehat{\gamma}^{[m^*]}_{\delta}]_{l}^{2}\frac{\widehat{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}{{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}}\right).
\end{aligned}
\label{eq: decomp upper prob}
\end{equation}
}

Since $\mathcal{E}_4\cap\mathcal{E}_6$ holds with a high probability, we have 
$$\sqrt{\frac{{\sum_{l=1}^{L}[\widehat{\gamma}^{[m^*]}_{\delta}]_{l}^{2}\frac{\widehat{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}{{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}}\overset{p}{\to} 1.$$
Together with \eqref{eq: limit distribution}, we establish 
\begin{equation}
{\mathbf{P}}\left(\frac{|\sum_{l=1}^{L} [{\gamma}^{*}_{\delta}]_{l} \cdot (\widehat{x_{\rm new}^{\intercal}b^{(l)}}-{x_{\rm new}^{\intercal}b^{(l)}})|}{\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\geq z_{\alpha/2}\sqrt{\frac{{\sum_{l=1}^{L}[\widehat{\gamma}^{[m^*]}_{\delta}]_{l}^{2}\frac{\widehat{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}{{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}}\right)\rightarrow \alpha.
\label{eq: exact coverage}
\end{equation}
Combined with  \eqref{eq: decomp upper prob} and \eqref{eq: bias control prob}, we have 
\begin{equation}
\limsup_{n,p\rightarrow\infty} {\mathbf{P}}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\not\in {\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)\right)\leq \limsup_{n,p\rightarrow\infty}{\mathbf{P}}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\not\in {\rm Int}_{\alpha}^{[m^*]}(x_{\rm new})\right)\leq \alpha+\alpha_0.
\label{eq: stronger coverage}
\end{equation}
\subsection{Precision Property: Proof of \eqref{eq: length bound ridge}}  
Regarding the length of the confidence interval, we notice that 
\begin{equation}
\mathbf{Leng}\left({\rm CI}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)\right)\leq 2\max_{m\in {\mathbb{M}}}\left(\left|\widehat{x_{\rm new}^{\intercal}\beta}^{[m]}-\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}\right|+\widehat{{\rm se}}^{[m]}(x_{\rm new})\right),
\label{eq: length decomp}
\end{equation}
where $\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}=\sum_{l=1}^{L} [\widehat{\gamma}_{\delta}]_{l}\cdot \widehat{x_{\rm new}^{\intercal}b^{(l)}}$ is defined in \eqref{eq: point estimator ridge} and $\widehat{x_{\rm new}^{\intercal}\beta}^{[m]}=\sum_{l=1}^{L} [\widehat{\gamma}^{[m]}_{\delta}]_{l}\cdot \widehat{x_{\rm new}^{\intercal}b^{(l)}}.$
Note that 
\begin{equation}
\begin{aligned}
\max_{m\in {\mathbb{M}}}\left|\widehat{x_{\rm new}^{\intercal}\beta}^{[m]}-\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}\right|&=\max_{m\in {\mathbb{M}}}\left|\sum_{l=1}^{L}\left([\widehat{\gamma}_{\delta}]_{l}-[\widehat{\gamma}^{[m]}_{\delta}]_{l}\right)\cdot \widehat{x_{\rm new}^{\intercal}b^{(l)}}\right|\\
&\leq \max_{m\in {\mathbb{M}}}\|\widehat{\gamma}_{\delta}-\widehat{\gamma}^{[m]}_{\delta}\|_2 \cdot \sqrt{\sum_{l=1}^{L} (\widehat{x_{\rm new}^{\intercal}b^{(l)}})^2}.
\end{aligned}
\label{eq: length key bound}
\end{equation}
We apply  $N_{\mathbb{Q}}\gtrsim\max\{n,p\}$ and $\lambda_{\min}(\Gamma^{\mathbb{Q}})+\delta\gg \sqrt{\log p/\min\{n,N_{\mathbb{Q}}\}}$ and establish 
$$\lambda_{\min}(\Gamma^{\mathbb{Q}})+\delta \gg \sqrt{\frac{\log p}{\min\{n,N_{\mathbb{Q}}\}}}+\frac{p\sqrt{\log p}}{\sqrt{n}N_{\mathbb{Q}}}.$$
On the event $\mathcal{E}_7,$ we establish \begin{equation}
\lambda_{\min}(\widehat{\Gamma})+\delta\geq \frac{1}{2}\left(\lambda_{\min}({\Gamma}^{\mathbb{Q}})+\delta\right).
\label{eq: lambda minimum bound}
\end{equation}

We now apply Lemma \ref{lemma: gamma accuracy} with $\widehat{\Gamma}=(\widehat{\Gamma}^{[m]}+\delta\cdot {\rm I})_{+}$ and $\Gamma=\widehat{\Gamma}+\delta\cdot {\rm I}$ and establish that
\begin{equation*}
\|\widehat{\gamma}_{\delta}-\widehat{\gamma}^{[m]}_{\delta}\|_2\leq \frac{\|(\widehat{\Gamma}^{[m]}+\delta\cdot {\rm I})_{+}-(\widehat{\Gamma}+\delta\cdot {\rm I})\|_F}{\lambda_{\min}(\widehat{\Gamma})+\delta}\leq \frac{\|\widehat{\Gamma}^{[m]}-\widehat{\Gamma}\|_F}{\lambda_{\min}(\widehat{\Gamma})+\delta},
\end{equation*}
where the last inequality follows from Lemma \ref{lem: positive inequality} together with $\lambda_{\min}(\widehat{\Gamma})+\delta>0$ on the event $\mathcal{E}_7.$ 
Together with \eqref{eq: length key bound}, we establish 
\begin{equation}
\max_{m\in {\mathbb{M}}}\left|\widehat{x_{\rm new}^{\intercal}\beta}^{[m]}-\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}\right|\leq \max_{m\in {\mathbb{M}}}\frac{\|\widehat{\Gamma}^{[m]}-\widehat{\Gamma}\|_F}{\lambda_{\min}(\widehat{\Gamma})+\delta} \cdot \sqrt{\sum_{l=1}^{L} (\widehat{x_{\rm new}^{\intercal}b^{(l)}})^2}.
\label{eq: length key bound 2}
\end{equation}
By the definition of ${\mathbb{M}}$ in \eqref{eq: generating condition} and the definition of $d_0$ in \eqref{eq: resampling}, we have
$$\max_{m\in {\mathbb{M}}}\|\widehat{\Gamma}^{[m]}-\widehat{\Gamma}\|_F\lesssim  L\cdot\sqrt{{d_0}/n}\cdot  1.1 \cdot z_{\alpha_0/[L(L+1)]}.$$ Together with \eqref{eq: length key bound 2}, we establish 
\begin{equation}
\max_{m\in {\mathbb{M}}}\left|\widehat{x_{\rm new}^{\intercal}\beta}^{[m]}-\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}\right|\lesssim \frac{1.1 L\cdot \sqrt{{d_0}}}{\sqrt{n}[\lambda_{\min}(\widehat{\Gamma})+\delta]} \cdot \sqrt{\sum_{l=1}^{L} (\widehat{x_{\rm new}^{\intercal}b^{(l)}})^2}\cdot  z_{\alpha_0/[L(L+1)]}.
\label{eq: length decomp a}
\end{equation}

On the event $\mathcal{E}_4$, we apply \eqref{eq: first upper bound} and establish 
\begin{equation}
\max_{m\in {\mathbb{M}}}\widehat{\rm se}^{[m]}(x_{\rm new})\lesssim \frac{\|x_{\rm new}\|_2}{\sqrt{n}}.
\label{eq: length decomp b}
\end{equation}
We combine \eqref{eq: length decomp}, \eqref{eq: length decomp a}, \eqref{eq: lambda minimum bound} and \eqref{eq: length decomp b} and establish that, on the event $\mathcal{E}_4\cap \mathcal{E}_7,$ we have 
\begin{equation}
\mathbf{Leng}\left({\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)\right)\lesssim \frac{L\cdot \sqrt{{d_0}}}{\sqrt{n}[\lambda_{\min}({\Gamma}^{\mathbb{Q}})+\delta]} \cdot \sqrt{\sum_{l=1}^{L} (\widehat{x_{\rm new}^{\intercal}b^{(l)}})^2}\cdot  z_{\alpha_0/[L(L+1)]}+\frac{\|x_{\rm new}\|_2}{\sqrt{n}}.
\label{eq: inter length}
\end{equation}




On the event $\mathcal{E}_8,$ we apply the Condition (A2) and establish that
\begin{equation}
\frac{1}{\|x_{\rm new}\|_2}\sqrt{\sum_{l=1}^{L} (\widehat{x_{\rm new}^{\intercal}b^{(l)}})^2}\lesssim \sqrt{L}\left(\sqrt{\frac{\log n}{n}}+\frac{\left|x_{\rm new}^{\intercal}b^{(l)}\right|}{\|x_{\rm new}\|_2}\right)\leq C,
\label{eq: constant upper bound}
\end{equation} 
for some positive constant $C>0.$ 
For a finite $L$, ${\rm Vol}(L(L+1)/2)$ and $z_{\alpha_0/[L(L+1)]}$ are bounded from above. If $N_{\mathbb{Q}}\gtrsim\max\{n,p\}$, $s\log p/n\rightarrow 0$ and Condition (A2) holds, we apply \eqref{eq: variance 1} and show that 
\begin{equation}
n \cdot \lambda_i({\bf V}) \lesssim n \cdot \|{\bf V}\|_{\infty}\lesssim 1, \quad \text{and}\quad d_0\lesssim 1.
\label{eq: constant upper bound 2}
\end{equation}
 Hence, if $N_{\mathbb{Q}}\gtrsim\max\{n,p\}$ and $\lambda_{\min}(\Gamma^{\mathbb{Q}})+\delta\gg \sqrt{\log p/\min\{n,N_{\mathbb{Q}}\}}$, we establish \eqref{eq: length bound ridge} by combining \eqref{eq: inter length} with \eqref{eq: lambda minimum bound}, \eqref{eq: constant upper bound} and \eqref{eq: constant upper bound 2}.


\subsection{Proof of \eqref{eq: more precise coverage}}
\label{sec: more precise coverage}
By \eqref{eq: stronger coverage}, it is sufficient to establish 
\begin{equation}
\liminf_{n,p\rightarrow \infty}{\mathbf{P}}\left(x_{\rm new}^{\intercal} \beta^{*}_{\delta}\not\in {\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)\right)\geq \alpha-\alpha_0.
\label{eq: coverage lower}
\end{equation}


By applying \eqref{eq: maximin inference decomp} with $m=m^{*}$, we establish that, on the event $\mathcal{E}_9,$
{\footnotesize
\begin{equation*}
\begin{aligned}
&{\mathbf{P}}\left(x_{\rm new}^{\intercal} \beta^{*}_{\delta}\not\in {\rm Int}_{\alpha}^{[m^*]}(x_{\rm new})\right)
\geq {\mathbf{P}}\left(\{x_{\rm new}^{\intercal} \beta^{*}_{\delta}\not\in {\rm Int}_{\alpha}^{[m^*]}(x_{\rm new})\}\cap \mathcal{E}_9\right)\\
\geq &{\mathbf{P}}\left(\left\{\frac{|\sum_{l=1}^{L} [{\gamma}^{*}_{\delta}]_{l} \cdot (\widehat{x_{\rm new}^{\intercal}b^{(l)}}-{x_{\rm new}^{\intercal}b^{(l)}})|}{\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\geq (1+2\eta_0)z_{\alpha/2}\sqrt{\frac{{\sum_{l=1}^{L}[\widehat{\gamma}^{[m^*]}_{\delta}]_{l}^{2}\frac{\widehat{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}{{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}}\right\}\cap \mathcal{E}_9\right)\\
\geq &{\mathbf{P}}\left(\frac{|\sum_{l=1}^{L} [{\gamma}^{*}_{\delta}]_{l} \cdot (\widehat{x_{\rm new}^{\intercal}b^{(l)}}-{x_{\rm new}^{\intercal}b^{(l)}})|}{\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\geq (1+2\eta_0)z_{\alpha/2}\sqrt{\frac{{\sum_{l=1}^{L}[\widehat{\gamma}^{[m^*]}_{\delta}]_{l}^{2}\frac{\widehat{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}{{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}}\right)-{\mathbf{P}}\left(\mathcal{E}_9^c\right),
\end{aligned}
\end{equation*}
}
where the last inequality follows from the union bound. If $\eta_0\rightarrow 0,$ we apply the similar argument of \eqref{eq: exact coverage}  and establish 
{\small
\begin{equation*}
{\mathbf{P}}\left(\frac{|\sum_{l=1}^{L} [{\gamma}^{*}_{\delta}]_{l} \cdot (\widehat{x_{\rm new}^{\intercal}b^{(l)}}-{x_{\rm new}^{\intercal}b^{(l)}})|}{\sqrt{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}\geq (1+2\eta_0)z_{\alpha/2}\sqrt{\frac{{\sum_{l=1}^{L}[\widehat{\gamma}^{[m^*]}_{\delta}]_{l}^{2}\frac{\widehat{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}{{\sum_{l=1}^{L}[{\gamma}^{*}_{\delta}]_{l}^{2}\frac{{\sigma}_{l}^2}{n_l^2}[\widehat{v}^{(l)}]^{\intercal}(X^{(l)})^{\intercal}X^{(l)}\widehat{v}^{(l)}}}}\right)\rightarrow \alpha.
\end{equation*}
}
Combined with \eqref{eq: bias control prob}, we establish \eqref{eq: coverage lower}.





\section{Proofs of Propositions \ref{prop: identification}, \ref{prop: delta-optimal}, and \ref{prop: maximin proj}}
\label{sec: other important proofs}

\subsection{Proofs of Proposition \ref{prop: delta-optimal}}
For ${\mathbb{B}}=\begin{pmatrix} b^{(1)}&b^{(2)}&\ldots&b^{(L)} \end{pmatrix}\in \mathbb{R}^{p\times L}$, we define its SVD as 
\begin{equation*}
{\mathbb{B}}=U\Lambda V^{\intercal} \quad \text{with} \quad U\in \mathbb{R}^{p\times L}, \Lambda\in \mathbb{R}^{L\times L}, \; \text{and} \; V\in \mathbb{R}^{L\times L}
\end{equation*}
where $\Lambda_{1,1}\geq \ldots\geq \Lambda_{L,L}>0$.
We define $\Delta=\delta\cdot U \Lambda^{-2} U^{\intercal}\in \mathbb{R}^{p\times p}.$ 
Then
\begin{equation}
[{\mathbb{B}}]^{\intercal}\Delta{\mathbb{B}}=\delta {\rm I} \quad \text{and}\quad {\mathbb{B}}^{\intercal}(\Sigma^{\mathbb{Q}}+\Delta){\mathbb{B}}=\Gamma^{\mathbb{Q}}+\delta\cdot{\rm I}.
\label{eq: key identity}
\end{equation}
It follows from Proposition \ref{prop: identification} and the definition of $\beta^{*}_{\delta}$ in \eqref{eq: optimal weight ridge} that
\begin{equation*}
\beta^{*}_{\delta}=\max_{\beta\in \mathbb{R}^{p}}\min_{b\in {\mathbb{B}}}  \left[2 b^{\intercal}(\Sigma^{\mathbb{Q}}+\Delta)\beta- \beta^{\intercal}(\Sigma^{\mathbb{Q}}+\Delta)\beta\right] 
\end{equation*}
and
\begin{equation}
\min_{b\in {\mathbb{B}}}  \left[2 b^{\intercal}(\Sigma^{\mathbb{Q}}+\Delta)\beta^{*}_{\delta}- [\beta^{*}_{\delta}]^{\intercal}(\Sigma^{\mathbb{Q}}+\Delta)\beta^{*}_{\delta}\right]=[\beta^{*}_{\delta}]^{\intercal}(\Sigma^{\mathbb{Q}}+\Delta)\beta^{*}_{\delta}=[\gamma^{*}_{\delta}]^{\intercal}\left(\Gamma^{\mathbb{Q}}+\delta\cdot{\rm I}\right)\gamma^{*}_{\delta}
\label{eq: delta optimality}
\end{equation}
Now we compute the lower bound for $R_{\mathbb{Q}}(\beta^{*}_{\delta}) =\min_{b\in {\mathbb{B}}}  \left[2 b^{\intercal}\Sigma^{\mathbb{Q}}\beta^{*}_{\delta}- [\beta^{*}_{\delta}]^{\intercal}\Sigma^{\mathbb{Q}} \beta^{*}_{\delta}\right].$

We apply \eqref{eq: key identity} and $\beta^{*}_{\delta}={\mathbb{B}} \gamma^{*}_{\delta}$ and establish 
\begin{equation}
\begin{aligned}
&\min_{b\in {\mathbb{B}}}  \left[2 b^{\intercal}(\Sigma^{\mathbb{Q}}+\Delta)\beta^{*}_{\delta}- [\beta^{*}_{\delta}]^{\intercal}(\Sigma^{\mathbb{Q}}+\Delta)\beta^{*}_{\delta}\right]\\
&=\min_{b\in {\mathbb{B}}}  \left[2 b^{\intercal}(\Sigma^{\mathbb{Q}}+\Delta)\beta^{*}_{\delta}- [\beta^{*}_{\delta}]^{\intercal}\Sigma^{\mathbb{Q}}\beta^{*}_{\delta}\right]-\delta \|\gamma^{*}_{\delta}\|_2^2\\
&\leq \min_{b\in {\mathbb{B}}}  \left[2 b^{\intercal}\Sigma^{\mathbb{Q}}\beta^{*}_{\delta}- [\beta^{*}_{\delta}]^{\intercal}\Sigma^{\mathbb{Q}}\beta^{*}_{\delta}\right]+2 \max_{b\in {\mathbb{B}}} b^{\intercal}\Delta\beta^{*}_{\delta}-\delta \|\gamma^{*}_{\delta}\|_2^2\\
&=R_{\mathbb{Q}}(\beta^{*}_{\delta})+2\delta \max_{\gamma\in \Delta^{L}} \gamma^{\intercal}\gamma^{*}_{\delta}-\delta \|\gamma^{*}_{\delta}\|_2^2
\end{aligned}
\label{eq: key upper}
\end{equation}
where the last inequality follows from Proposition \ref{prop: identification} and the function $b^{\intercal}\Delta\beta^{*}_{\delta}$ is linear in $b$, $\beta^{*}_{\delta}={\mathbb{B}} \gamma^{*}_{\delta}$ and \eqref{eq: key identity}.
We combine \eqref{eq: delta optimality} and \eqref{eq: key upper} and establish 
\begin{equation}
\begin{aligned}
R_{\mathbb{Q}}(\beta^{*}_{\delta})&\geq [\gamma^{*}_{\delta}]^{\intercal}\left(\Gamma^{\mathbb{Q}}+\delta\cdot{\rm I}\right)\gamma^{*}_{\delta}-2\delta \max_{\gamma\in \Delta^{L}} \gamma^{\intercal}\gamma^{*}_{\delta}+\delta \|\gamma^{*}_{\delta}\|_2^2\\
&\geq [\gamma^{*}]^{\intercal}\Gamma^{\mathbb{Q}}\gamma^{*}+2\delta \|\gamma^{*}_{\delta}\|_2^2-2\delta \max_{\gamma\in \Delta^{L}} \gamma^{\intercal}\gamma^{*}_{\delta}\\
&=R_{\mathbb{Q}}(\beta^{*})-2\delta \left(\max_{\gamma\in \Delta^{L}} \gamma^{\intercal}\gamma^{*}_{\delta}-\|\gamma^{*}_{\delta}\|_2^2\right)
\end{aligned}
\label{eq: important lower}
\end{equation}
where the second inequality follows from the definition of $\gamma^{*}.$
Note that $\max_{\gamma\in \Delta^{L}} \gamma^{\intercal}\gamma^{*}_{\delta}-\|\gamma^{*}_{\delta}\|_2^2\geq 0$ and 
$\max_{\gamma\in \Delta^{L}} \gamma^{\intercal}\gamma^{*}_{\delta}-\|\gamma^{*}_{\delta}\|_2^2=\|\gamma^{*}_{\delta}\|_{\infty}-\|\gamma^{*}_{\delta}\|_{2}^2.$
We use $j^{*}\in[L]$ to denote the index such that $[\gamma^{*}_{\delta}]_{j^{*}}=\|\gamma^{*}_{\delta}\|_{\infty}.$ Then we have 
\begin{equation}
\begin{aligned}
\|\gamma^{*}_{\delta}\|_{\infty}-\|\gamma^{*}_{\delta}\|_{2}^2&=[\gamma^{*}_{\delta}]_{j^{*}}-[\gamma^{*}_{\delta}]_{j^{*}}^2-\sum_{l\neq j^{*}}[\gamma^{*}_{\delta}]_{l}^2\\
&\leq [\gamma^{*}_{\delta}]_{j^{*}}-[\gamma^{*}_{\delta}]_{j^{*}}^2-\frac{1}{L-1}\left(\sum_{l\neq j^{*}}[\gamma^{*}_{\delta}]_{l}\right)^2\\
&= [\gamma^{*}_{\delta}]_{j^{*}}-[\gamma^{*}_{\delta}]_{j^{*}}^2-\frac{1}{L-1}(1-[\gamma^{*}_{\delta}]_{j^{*}})^2
\end{aligned}
\label{eq: careful upper}
\end{equation}
We take the maximum value of the right hand side with respect to $[\gamma^{*}_{\delta}]_{j^{*}}$ over the domain $[1/L,1].$ Then we obtain $$\max_{\frac{1}{L}\leq [\gamma^{*}_{\delta}]_{j^{*}}\leq 1}[\gamma^{*}_{\delta}]_{j^{*}}-[\gamma^{*}_{\delta}]_{j^{*}}^2-\frac{1}{L-1}(1-[\gamma^{*}_{\delta}]_{j^{*}})^2=\frac{1}{4}\left(1-\frac{1}{L}\right)$$
where the maximum value is achieved at $[\gamma^{*}_{\delta}]_{j^{*}}=\frac{1+\frac{1}{L}}{2}.$
Combined with \eqref{eq: important lower} and \eqref{eq: careful upper}, we establish 
$$R_{\mathbb{Q}}(\beta^{*}_{\delta})\geq R_{\mathbb{Q}}(\beta^{*})-\frac{\delta}{2}\cdot \left(1-\frac{1}{L}\right).$$




\subsection{Proof of Proposition \ref{prop: identification}}
We now supply a proof of Proposition \ref{prop: identification}, which essentially follows from the same argument as that of Theorem 1 in   \cite{meinshausen2015maximin}.  Let $\mathbb{H}$ denote the convex hull of the set ${\mathbb{B}}=\{b^{(1)},\ldots,b^{(L)}\}.$  By the linear form of $b$, we have 
\begin{equation*}
\begin{aligned}
\beta^{*}&=\argmax_{\beta\in \mathbb{R}^{p}} \min_{b\in {\mathbb{B}}}  \left[2 b^{\intercal}\Sigma^{\mathbb{Q}}\beta- \beta^{\intercal}\Sigma^{\mathbb{Q}} \beta\right]\\
&=\argmax_{\beta\in \mathbb{R}^{p}} \min_{b\in \mathbb{H}}  \left[2 b^{\intercal}\Sigma^{\mathbb{Q}}\beta- \beta^{\intercal}\Sigma^{\mathbb{Q}} \beta\right]\\
\end{aligned}
\end{equation*}
We decompose $\Sigma^{\mathbb{Q}}=C^{\intercal} C$ such that $C$ is invertible. Define $\widetilde{\mathbb{H}}=C^{-1} \mathbb{H}.$ Then we have  $\beta^{*}=C^{-1}\xi^*$ with 
\begin{equation}
\xi^*=\argmax_{\xi \in \mathbb{R}^{p}} \min_{u\in \widetilde{\mathbb{H}}}  \left[2 u^{\intercal}\xi-\xi^{\intercal}\xi\right]
\label{eq: original}
\end{equation}
If we interchange $\min$ and $\max$ in the above equation, then we have 
\begin{equation}
\xi^{*}=\arg\min_{\xi \in \widetilde{\mathbb{H}}} \xi^{\intercal}\xi
\label{eq: inter-change}
\end{equation}
We will justify this inter-change by showing that the solution $\xi^{*}$ defined in \eqref{eq: inter-change} is the solution to \eqref{eq: original}. For any $\nu\in [0,1]$ and $\mu\in \widetilde{\mathbb{H}}$, we use the fact $\xi^{*}+\nu(\mu-\xi^{*})\in \widetilde{\mathbb{H}}$ and obtain
\begin{equation*}
\|\xi^{*}+\nu(\mu-\xi^{*})\|_2^2\geq \|\xi^{*}\|_2^2
\end{equation*}
This leads to 
\begin{equation*}
(\xi^{*})^{\intercal} \mu-(\xi^{*})^{\intercal}\xi^{*}\geq 0
\end{equation*}
and hence 
\begin{equation*}
2(\xi^{*})^{\intercal} \mu-(\xi^{*})^{\intercal}\xi^{*}\geq (\xi^{*})^{\intercal}\xi^{*},\quad \text{for any}\quad \mu\in \widetilde{\mathbb{H}}
\end{equation*}
By taking $\xi$ as $\xi^{*}$ in the optimization problem \eqref{eq: original}, we have 
\begin{equation*}
\max_{\xi \in \mathbb{R}^{p}} \min_{u\in \widetilde{\mathbb{H}}}  \left[2 u^{\intercal}\xi-\xi^{\intercal}\xi\right]\geq \min_{u\in \widetilde{\mathbb{H}}}  \left[2 u^{\intercal}\xi^{*}-[\xi^{*}]^{\intercal}\xi^{*}\right]\geq  (\xi^{*})^{\intercal}\xi^{*}.
\end{equation*}
In \eqref{eq: original}, we take $u=\xi^{*}$, then we have 
\begin{equation*}
\max_{\xi \in \mathbb{R}^{p}} \min_{u\in \widetilde{\mathbb{H}}}  \left[2 u^{\intercal}\xi-\xi^{\intercal}\xi\right]\leq \max_{\xi \in \mathbb{R}^{p}} \left[2 [\xi^{*}]^{\intercal}\xi-\xi^{\intercal}\xi\right]= (\xi^{*})^{\intercal}\xi^{*}
\end{equation*}
By matching the above two bounds, $\xi^{*}$ is the optimal solution to \eqref{eq: original} and 
$$\max_{\xi \in \mathbb{R}^{p}} \min_{u\in \widetilde{\mathbb{H}}}  \left[2 u^{\intercal}\xi-\xi^{\intercal}\xi\right]=[\xi^{*}]^{\intercal}\xi^{*}.
$$
Since $\beta^{*}=C^{-1}\xi^*$ and $\Sigma^{\mathbb{Q}}=C^{\intercal} C$, we have 
\begin{equation}
\beta^{*}=\arg\min_{\beta \in {\mathbb{H}}} \beta^{\intercal}\Sigma^{\mathbb{Q}}\beta
\label{eq: direct conclusion}
\end{equation}
and 
$$
\max_{\beta \in \mathbb{R}^{p}} \min_{b\in {\mathbb{H}}}  \left[2 b^{\intercal}\Sigma^{\mathbb{Q}}\beta-\beta^{\intercal}\Sigma^{\mathbb{Q}}\beta\right]= [\beta^{*}]^{\intercal}\Sigma^{\mathbb{Q}}\beta^{*}.
$$
We establish \eqref{eq: optimal weight} by combining \eqref{eq: direct conclusion} and the fact that $\beta \in {\mathbb{H}}$ can be expressed as $\beta={\mathbb{B}}\gamma$ for $\gamma\in \Delta^{L}.$ 



\subsection{Proof of Proposition \ref{prop: maximin proj}}
We can write the maximin definition in the following form
\begin{equation}
\beta^{*,{\rm MP}}=\argmax_{\|\beta\|_2\leq 1} \min_{b \in {\mathbb{B}}} \beta^{\intercal}
\label{eq: maximin proj another}
\end{equation}
where ${\mathbb{B}}=\{b^{(1)},\ldots,b^{(L)}\}.$
Since $b^{\intercal}\beta$ is linear in $b$, we can replace ${\mathbb{B}}$ with its convex hull $\mathbb{H}$,
\begin{equation*}
\beta^{*,{\rm MP}}=\argmax_{\|\beta\|_2\leq 1} \min_{b \in \mathbb{H}} b^{\intercal}\beta
\end{equation*}
We exchange the max and min in the above equation and have 
\begin{equation*}
\min_{b \in \mathbb{H}}\max_{\|\beta\|_2\leq 1}  b^{\intercal}\beta=\min_{b\in \mathbb{H}} \|b\|_2
\end{equation*}
We define 
$$\xi=\arg\min_{b\in \mathbb{H}} \|b\|_2.$$
We claim that $\xi^{*}=\xi/\|\xi\|$ is the optimal solution of \eqref{eq: maximin proj another}. For any $\mu\in \mathbb{H}$, we have $\xi+\nu(\mu-\xi)\in \mathbb{H}$ for $\nu\in[0,1]$ and have 
\begin{equation*}
\|\xi+\nu(\mu-\xi)\|_2^2\geq \|\xi\|_2^2 \quad \text{for any} \quad \nu\in [0,1]
\end{equation*}
By taking $\nu\rightarrow 0,$ we have 
\begin{equation*}
\mu^{\intercal}\xi-\|\xi\|_2^2\geq 0
\end{equation*}
By dividing both sides by $\|\xi\|_2$, we have 
\begin{equation}
\mu^{\intercal}\xi^{*} \geq \|\xi\|_2 \quad \text{for any} \quad \mu\in \mathbb{H}.
\label{eq: key lower bound} 
\end{equation}
In the definition of \eqref{eq: maximin proj another}, we take $\beta=\xi^{*}$ and have 
\begin{equation}
\max_{\|\beta\|_2\leq 1} \min_{b\in \mathbb{H}} b^{\intercal}\beta \geq  \min_{b\in \mathbb{H}} b^{\intercal}\xi^{*}\geq \|\xi\|_2
\label{eq: lower}
\end{equation}
where the last inequality follows from \eqref{eq: key lower bound} .
Additionally, we take $b=\xi$ in the definition of \eqref{eq: maximin proj another} and have 
\begin{equation*}
\max_{\|\beta\|_2\leq 1} \min_{b\in \mathbb{H}} b^{\intercal}\beta\leq \max_{\|\beta\|_2\leq 1} \xi^{\intercal}\beta=\|\xi\|_2
\end{equation*}
Combined with \eqref{eq: lower}, we have shown that $$\xi^{*}=\argmax_{\|\beta\|_2\leq 1} \min_{b\in \mathbb{H}} b^{\intercal}\beta$$ that is, $\beta^{*,{\rm MP}}=\xi^{*}.$



\section{Proofs of Extra Lemmas}
\label{sec: additional proof}



\subsection{Proof of Lemma \ref{lem: bias general}}
\label{sec: bias general}
On the event $\mathcal{G}_1\cap \mathcal{G}_6(\widehat{b}^{(l)}_{init}-b^{(l)},\widehat{b}^{(l)}_{init}-b^{(l)},\sqrt{\log p})$, we have 
$$\frac{1}{|B|}\sum_{i\in B}[(X^{\mathbb{Q}}_{i})^{\intercal}(\widehat{b}^{(l)}_{init}-b^{(l)})]^2\lesssim \frac{\|{b}^{(l)}\|_0 \log p}{n_l}\sigma_l^2.$$
Then we have 
\begin{align*}
\left|(\widehat{b}_{init}^{(l)}-b^{(l)})^{\intercal}\widehat{\Sigma}^{\mathbb{Q}}(\widehat{b}_{init}^{(k)}-b^{(k)})\right| &\leq \frac{1}{|B|}\|X^{\mathbb{Q}}_{B}(\widehat{b}_{init}^{(l)}-b^{(l)})\|_2\|X^{\mathbb{Q}}_{B}(\widehat{b}_{init}^{(k)}-b^{(k)})\|_2\\
 & \lesssim \sqrt{\frac{\|b^{(l)}\|_0 \|b^{(k)}\|_0(\log p)^2}{{n_l n_k}}}
\end{align*}
and establish \eqref{eq: error bound 1}. We decompose 
\begin{equation}
\begin{aligned}
&(\widehat{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}-\widehat{\Sigma}^{(l)} \widehat{u}^{(l,k)})^{\intercal}(\widehat{b}_{init}^{(l)}-b^{(l)})\\
&=(\widetilde{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}-\widehat{\Sigma}^{(l)} \widehat{u}^{(l,k)})^{\intercal}(\widehat{b}_{init}^{(l)}-b^{(l)})+[\widehat{b}_{init}^{(k)}]^{\intercal}(\widehat{\Sigma}^{\mathbb{Q}}-\widetilde{\Sigma}^{\mathbb{Q}})^{\intercal}(\widehat{b}_{init}^{(l)}-b^{(l)}).
\end{aligned}
\label{eq: bias decomp}
\end{equation}
Regarding the first term of \eqref{eq: bias decomp}, we apply H{\"o}lder's inequality and establish
\begin{equation*}
\left|(\widetilde{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}-\widehat{\Sigma}^{(l)} \widehat{u}^{(l,k)})^{\intercal}(\widehat{b}_{init}^{(l)}-b^{(l)})\right|\leq \|\widetilde{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}-\widehat{\Sigma}^{(l)} \widehat{u}^{(l,k)}\|_{\infty}\|\widehat{b}_{init}^{(l)}-b^{(l)}\|_1.
\end{equation*}
By the optimization constraint \eqref{eq: constraint 1}, on the event $\mathcal{G}_2,$ we have
\begin{equation}
\left|(\widetilde{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k)}-\widehat{\Sigma}^{(l)} \widehat{u}^{(l,k)})^{\intercal}(\widehat{b}_{init}^{(l)}-b^{(l)})\right|\lesssim\|\omega^{(k)}\|_2 \sqrt{\frac{\log p}{n_l}} \cdot \|b^{(l)}\|_0 \sqrt{\frac{ \log p}{n_l}}.
\label{eq: term 1 bound}
\end{equation}
Regarding the second term of \eqref{eq: bias decomp}, conditioning on $\widehat{b}_{init}^{(k)}$ and $\widehat{b}_{init}^{(l)},$ on the event $\mathcal{G}_6(\widehat{b}_{init}^{(k)},\widehat{b}_{init}^{(l)}-b^{(l)},\sqrt{\log p}),$
\begin{equation*}
\left|[\widehat{b}_{init}^{(k)}]^{\intercal}(\widehat{\Sigma}^{\mathbb{Q}}-\widetilde{\Sigma}^{\mathbb{Q}})^{\intercal}(\widehat{b}_{init}^{(l)}-b^{(l)})
\right|\lesssim\frac{\sqrt{\log p}}{\sqrt{N_{\mathbb{Q}}}}\|\widehat{b}_{init}^{(k)}\|_2\|\widehat{b}_{init}^{(l)}-b^{(l)}\|_2.
\end{equation*}
On the event $\mathcal{G}_1,$ we further have 
\begin{equation*}
\left|[\widehat{b}_{init}^{(k)}]^{\intercal}(\widehat{\Sigma}^{\mathbb{Q}}-\widetilde{\Sigma}^{\mathbb{Q}})^{\intercal}(\widehat{b}_{init}^{(l)}-b^{(l)})
\right|\lesssim\|\widehat{b}^{(k)}_{init}\|_2\sqrt{\frac{\|b^{(l)}\|_0 (\log p)^2}{n_l N_{\mathbb{Q}}}}.
\end{equation*}
Combined with \eqref{eq: term 1 bound}, we establish \eqref{eq: error bound 2}.
We establish  \eqref{eq: error bound 3} through applying the similar argument for \eqref{eq: error bound 2} by exchanging the role of $l$ and $k.$ Together with \eqref{eq: control of event 1}, \eqref{eq: control of event 2} and \eqref{eq: control of event 3} with $t=\sqrt{\log p},$ we establish the lemma.

\subsection{Proof of Lemma \ref{lem: bias 1}}
On the event $\mathcal{G}_0\cap \mathcal{G}_2,$ we apply the H{\"o}lder's inequality and establish 
$$
\left|\frac{1}{n_l}(\widehat{b}_{init}^{(k)}-b^{(k)})^{\intercal}[X^{(l)}]^{\intercal}\epsilon^{(l)}\right|\leq \|\widehat{b}_{init}^{(k)}-b^{(k)}\|_1\left\|\frac{1}{n_l}[X^{(l)}]^{\intercal}\epsilon^{(l)}\right\|_{\infty} \lesssim \frac{s \log p}{n}.$$
Similarly, we establish $\left|\frac{1}{n_k}(\widehat{b}_{init}^{(l)}-b^{(l)})^{\intercal}[X^{(k)}]^{\intercal}\epsilon^{(k)}\right| \lesssim {s \log p}/{n}.$  We define the event 
$$
\mathcal{G}'_5=\left\{ \max_{\substack{\mathcal{S}\subset[p], |\mathcal{S}|\leq s\\ \mathcal{T}\subset[p], |\mathcal{T}|\leq s}}\max_{\substack{\|w_{\mathcal{S}^c}\|_1\leq C\|w_{\mathcal{S}}\|_1\\\|v_{\mathcal{T}^c}\|_1\leq C\|v_{\mathcal{T}}\|_1}}\frac{v^{\intercal}\left(\frac{1}{N}\sum_{i=1}^{N}X^{\mathbb{Q}}_{i}[X^{\mathbb{Q}}_{i}]^{\intercal}\right)w}{\sqrt{v^{\intercal}E(X^{\mathbb{Q}}_{i}[X^{\mathbb{Q}}_{i}])v}\sqrt{w^{\intercal}E(X^{\mathbb{Q}}_{i}[X^{\mathbb{Q}}_{i}])w}} \leq 1+C\sqrt{\frac{s\log p}{N}}\right\}\\
$$

It follows from Theorem 1.6 of \cite{zhou2009restricted} that the event $\mathcal{G}'_5$ holds with probability larger than $1-p^{-c}$ for some positive constant $c>0$.
On the event $\mathcal{G}_1\cap \mathcal{G}'_5$ with $N=\sum_{l=1}^{L}n_l+N_{\mathbb{Q}},$ we have 
\begin{equation}
\left|(\widehat{b}_{init}^{(l)}-b^{(l)})^{\intercal}\widehat{\Sigma}(\widehat{b}_{init}^{(k)}-b^{(k)})\right|\lesssim \frac{s\log p}{n}\cdot\left(1+\sqrt{\frac{s\log p}{\sum_{l=1}^{L}n_l+N_{\mathbb{Q}}}}\right).
\label{eq: cauchy of G5}
\end{equation}
Note that 
\begin{equation}
\begin{aligned}
&[\widehat{b}_{init}^{(l)}]^{\intercal}(\widehat{\Sigma}-\widetilde{\Sigma}^{(k)})(\widehat{b}_{init}^{(k)}-b^{(k)})\\
&=[\widehat{b}_{init}^{(l)}-b^{(l)}]^{\intercal}(\widehat{\Sigma}-\widetilde{\Sigma}^{(k)})(\widehat{b}_{init}^{(k)}-b^{(k)})+[b^{(l)}]^{\intercal}(\widehat{\Sigma}-\widetilde{\Sigma}^{(k)})(\widehat{b}_{init}^{(k)}-b^{(k)})\\
&=[\widehat{b}_{init}^{(l)}-b^{(l)}]^{\intercal}\widehat{\Sigma}(\widehat{b}_{init}^{(k)}-b^{(k)})+[b^{(l)}]^{\intercal}(\widehat{\Sigma}-\Sigma)(\widehat{b}_{init}^{(k)}-b^{(k)})\\
&-[\widehat{b}_{init}^{(l)}-b^{(l)}]^{\intercal}\widetilde{\Sigma}^{(k)}(\widehat{b}_{init}^{(k)}-b^{(k)})-[b^{(l)}]^{\intercal}(\widetilde{\Sigma}^{(k)}-\Sigma)(\widehat{b}_{init}^{(k)}-b^{(k)})\\
\end{aligned}
\label{eq: intermediate decomp}
\end{equation}
With a similar proof for \eqref{eq: cauchy of G5}, we show that, on the event $\mathcal{G}_1\cap \mathcal{G}'_5,$
\begin{equation}
\left|[\widehat{b}_{init}^{(l)}-b^{(l)}]^{\intercal}\widetilde{\Sigma}^{(k)}(\widehat{b}_{init}^{(k)}-b^{(k)})\right|\lesssim \frac{s\log p}{n}\cdot \left(1+\sqrt{\frac{s\log p}{n}}\right).
\label{eq: intermediate decomp 1}
\end{equation}
By H{\"o}lder's inequality, we have 
\begin{align*}
&\left|[b^{(l)}]^{\intercal}(\widehat{\Sigma}-\Sigma)(\widehat{b}_{init}^{(k)}-b^{(k)})\right|\leq \|(\widehat{\Sigma}-\Sigma)b^{(l)}\|_{\infty} \|\widehat{b}_{init}^{(k)}-b^{(k)}\|_1\\
&\left|[b^{(l)}]^{\intercal}(\widetilde{\Sigma}^{(k)}-\Sigma)(\widehat{b}_{init}^{(k)}-b^{(k)})\right|\leq \|(\widetilde{\Sigma}^{(k)}-\Sigma)b^{(l)}\|_{\infty} \|\widehat{b}_{init}^{(k)}-b^{(k)}\|_1
\end{align*}
We define 
{\small
\begin{align*}
\mathcal{G}'_6(w,v,t)&=\left\{\left|{w^{\intercal}\left(\widehat{\Sigma}-\Sigma\right)v}\right|\lesssim t\frac{\|\Sigma^{1/2} w\|_2\|\Sigma^{1/2} v\|_2}{\sqrt{\sum_{l=1}^{L}n_l+N_{\mathbb{Q}}}},\; \left|{w^{\intercal}\left(\widetilde{\Sigma}^{(k)}-\Sigma\right)v}\right|\lesssim t\frac{\|\Sigma^{1/2} w\|_2\|\Sigma^{1/2} v\|_2}{\sqrt{n_k}}\right\}
\end{align*}}
and it follows from Lemma 10 in the supplement of \cite{cai2020semisupervised} that $${\mathbf{P}}(\mathcal{G}'_6(w,v,t))\geq 1-\exp(-t^2).$$


On the event $\cap_{j=1}^{p}\mathcal{G}'_6(b^{(l)},e_j,\sqrt{\log p})\cap \mathcal{G}_1,$ we have 
$$\max\left\{\|(\widehat{\Sigma}-\Sigma)b^{(l)}\|_{\infty},\|(\widetilde{\Sigma}^{(k)}-\Sigma)b^{(l)}\|_{\infty}\right\}\lesssim \sqrt{\frac{\log p}{n}} \|b^{(l)}\|_2$$
and 
$$
\max\left\{\left|[b^{(l)}]^{\intercal}(\widehat{\Sigma}-\Sigma)(\widehat{b}_{init}^{(k)}-b^{(k)})\right|, \left|[b^{(l)}]^{\intercal}(\widetilde{\Sigma}^{(k)}-\Sigma)(\widehat{b}_{init}^{(k)}-b^{(k)})\right|\right\}\lesssim \|b^{(l)}\|_2\cdot \frac{s\log p}{n}.$$
Together with \eqref{eq: cauchy of G5}, \eqref{eq: intermediate decomp}, \eqref{eq: intermediate decomp 1}, \eqref{eq: control of event 1} and \eqref{eq: control of event 2}, we establish 
$${\mathbf{P}}\left(\left|[\widehat{b}_{init}^{(l)}]^{\intercal}(\widehat{\Sigma}-\widetilde{\Sigma}^{(k)})(\widehat{b}_{init}^{(k)}-b^{(k)})\right|\lesssim \left(\|b^{(l)}\|_2+1\right)\frac{s\log p}{n}\right)\geq 1-\min\{n,p\}^{-c}.$$
We apply a similar argument to show that $${\mathbf{P}}\left(\left|[\widehat{b}_{init}^{(k)}]^{\intercal}(\widehat{\Sigma}-\widetilde{\Sigma}^{(l)})(\widehat{b}_{init}^{(l)}-b^{(l)})\right|\lesssim \left(\|b^{(k)}\|_2+1\right)\frac{s\log p}{n}\right)\geq 1-\min\{n,p\}^{-c}.$$ 







\subsection{Proof of Lemma \ref{lem: event lemma 1}}
\label{sec: event lemma 1}

For ${\bf V}_{\pi(l_1,k_1),\pi(l_2,k_2)}$ defined in \eqref{eq: cov def}, we express it as 
\begin{equation}
{\bf V}_{\pi(l_1,k_1),\pi(l_2,k_2)}={\bf V}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}+{\bf V}^{(b)}_{\pi(l_1,k_1),\pi(l_2,k_2)}
\label{eq: cov decomp}
\end{equation}
where ${\bf V}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}$ and ${\bf V}^{(b)}_{\pi(l_1,k_1),\pi(l_2,k_2)}$ defined in \eqref{eq: cov def a} and \eqref{eq: cov def b}, respectively.

For $\widehat{\bf V}_{\pi(l_1,k_1),\pi(l_2,k_2)}$ defined in \eqref{eq: cov est}, we express it as 
\begin{equation}
\widehat{\bf V}_{\pi(l_1,k_1),\pi(l_2,k_2)}=\widehat{\bf V}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}+\widehat{\bf V}^{(b)}_{\pi(l_1,k_1),\pi(l_2,k_2)}
\label{eq: cov est decomp}
\end{equation}
with
\begin{equation}
\begin{aligned}
\widehat{\bf V}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}=&\frac{\widehat{\sigma}_{l_1}^2}{|B_{l_1}|}(\widehat{u}^{(l_1,k_1)})^{\intercal}\widehat{\Sigma}^{(l_1)} \left[\widehat{u}^{(l_2,k_2)} {\bf 1}(l_2=l_1)+\widehat{u}^{(k_2,l_2)} {\bf 1}(k_2=l_1)\right]\\
&+\frac{\widehat{\sigma}_{k_1}^2}{|B_{k_1}|}(\widehat{u}^{(k_1,l_1)})^{\intercal}\widehat{\Sigma}^{(k_1)} \left[\widehat{u}^{(l_2,k_2)} {\bf 1}(l_2=k_1)+\widehat{u}^{(k_2,l_2)} {\bf 1}(k_2=k_1)\right]
\end{aligned}
\label{eq: cov est 1}
\end{equation}
\begin{equation}
\widehat{\bf V}^{(b)}_{\pi(l_1,k_1),\pi(l_2,k_2)}=\frac{\sum_{i=1}^{N_{\mathbb{Q}}} \left((\widehat{b}_{init}^{(l_1)})^{\intercal} X_{i}^{\mathbb{Q}} (\widehat{b}_{init}^{(k_1)})^{\intercal}X_{i}^{\mathbb{Q}}(\widehat{b}_{init}^{(l_2)})^{\intercal} X_{i}^{\mathbb{Q}} (\widehat{b}_{init}^{(k_2)})^{\intercal}X_{i}^{\mathbb{Q}} -(\widehat{b}_{init}^{(l_1)})^{\intercal}\bar{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k_1)}(\widehat{b}_{init}^{(l_2)})^{\intercal}\bar{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k_2)}\right)}{|B|N_{\mathbb{Q}}}
\label{eq: cov est 2}
\end{equation}
where $\bar{\Sigma}^{\mathbb{Q}}=\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}X_{i}^{\mathbb{Q}}(X_{i}^{\mathbb{Q}})^{\intercal}$ and $\widehat{\sigma}_l^2=\|Y^{(l)}-X^{(l)}\widehat{b}^{(l)}\|_2^2/n_l$ for $1\leq l\leq L.$

The control of the event $\mathcal{E}_1$ follows from the following high probability inequalities:
with probability larger than $1-\exp(-cn)-\min\{N_{\mathbb{Q}},p\}^{-c}$ for some positive constant $c>0,$ 
\begin{equation}
n\cdot \left|\widehat{{\bf V}}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}-{\bf V}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}\right|\leq C d_0 \left(\frac{s\log p}{n}+\sqrt{\frac{\log p}{n}}\right)\leq \frac{d_0}{4}.
\label{eq: target 1}
\end{equation}
\begin{equation}
N_{\mathbb{Q}}\cdot \left|\widehat{{\bf V}}^{(b)}_{\pi(l_1,k_1),\pi(l_2,k_2)}-{\bf V}^{(b)}_{\pi(l_1,k_1),\pi(l_2,k_2)}\right|\lesssim \log \max\{N_{\mathbb{Q}},p\} \sqrt{\frac{s \log p \log N_{\mathbb{Q}}}{n}}
+{\frac{\left(\log N_{\mathbb{Q}}\right)^{5/2}}{\sqrt{N_{\mathbb{Q}}}}}.
\label{eq: target 2}
\end{equation}
The proofs of \eqref{eq: target 1} and \eqref{eq: target 2} are presented in Sections \ref{sec: target 1 proof} and \ref{sec: target 2 proof}, respectively.
 
We combine \eqref{eq: target 1} and \eqref{eq: target 2} and establish 
\begin{equation*}
\begin{aligned}
\|\widehat{{\bf Cov}}-{\bf Cov}\|_2&\lesssim \max_{(l_1,k_1),(l_2,k_2)\in \mathcal{I}_{L}}\left|\widehat{{\bf Cov}}_{\pi(l_1,k_1),\pi(l_2,k_2)}-{\bf Cov}_{\pi(l_1,k_1),\pi(l_2,k_2)}\right|\\
&\leq n\cdot \max_{(l_1,k_1),(l_2,k_2)\in \mathcal{I}_{L}}\left|\widehat{{\bf V}}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}-{\bf V}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}\right|\\
&+n\cdot \max_{(l_1,k_1),(l_2,k_2)\in \mathcal{I}_{L}}\left|\widehat{{\bf V}}^{(b)}_{\pi(l_1,k_1),\pi(l_2,k_2)}-{\bf V}^{(b)}_{\pi(l_1,k_1),\pi(l_2,k_2)}\right|\\
&\leq \frac{d_0}{4}+\frac{\sqrt{n\cdot s}[\log \max\{N_{\mathbb{Q}},p\}]^2}{N_{\mathbb{Q}}}+\frac{n\cdot (\log N_{\mathbb{Q}})^{5/2}}{N_{\mathbb{Q}}^{3/2}}\leq d_0/2,
\end{aligned}
\end{equation*}
where the first inequality holds for a finite $L$ and the last inequality follows from Condition (A2).
\subsubsection{Proof of \eqref{eq: target 1}}
\label{sec: target 1 proof}
\begin{equation}
\begin{aligned}
&n\cdot \left|\widehat{{\bf V}}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}-{\bf V}^{(a)}_{\pi(l_1,k_1),\pi(l_2,k_2)}\right|\\
&\lesssim \left|\widehat{\sigma}_{l_1}^2-{\sigma}_{l_1}^2\right|(\widehat{u}^{(l_1,k_1)})^{\intercal}\widehat{\Sigma}^{(l_1)} \left[\widehat{u}^{(l_2,k_2)} {\bf 1}(l_2=l_1)+\widehat{u}^{(k_2,l_2)} {\bf 1}(k_2=l_1)\right]\\
&+\left|\widehat{\sigma}_{k_1}^2-{\sigma}_{k_1}^2\right|(\widehat{u}^{(k_1,l_1)})^{\intercal}\widehat{\Sigma}^{(k_1)} \left[\widehat{u}^{(l_2,k_2)} {\bf 1}(l_2=k_1)+\widehat{u}^{(k_2,l_2)} {\bf 1}(k_2=k_1)\right]
\end{aligned}
\end{equation}
Since 
\begin{equation}
\begin{aligned}
&\left|(\widehat{u}^{(l_1,k_1)})^{\intercal}\widehat{\Sigma}^{(l_1)} \left[\widehat{u}^{(l_2,k_2)} {\bf 1}(l_2=l_1)+\widehat{u}^{(k_2,l_2)} {\bf 1}(k_2=l_1)\right]\right|\\
&\leq \sqrt{(\widehat{u}^{(l_1,k_1)})^{\intercal}\widehat{\Sigma}^{(l_1)} \widehat{u}^{(l_1,k_1)}\cdot (\widehat{u}^{(l_1,k_2)})^{\intercal}\widehat{\Sigma}^{(l_1)} \widehat{u}^{(l_1,k_2)}} \\
&+\sqrt{(\widehat{u}^{(l_1,k_1)})^{\intercal}\widehat{\Sigma}^{(l_1)} \widehat{u}^{(l_1,k_1)}\cdot (\widehat{u}^{(l_1,l_2)})^{\intercal}\widehat{\Sigma}^{(l_1)} \widehat{u}^{(l_1,l_2)}}
\end{aligned}
\end{equation}
we have 
$$\left|(\widehat{u}^{(l_1,k_1)})^{\intercal}\widehat{\Sigma}^{(l_1)} \left[\widehat{u}^{(l_2,k_2)} {\bf 1}(l_2=l_1)+\widehat{u}^{(k_2,l_2)} {\bf 1}(k_2=l_1)\right]\right|\lesssim n \max_{(l,k)\in \mathcal{I}_{L}}{\bf V}^{(a)}_{\pi(l,k),\pi(l,k)}\lesssim d_0$$
Similarly, we have 
$\left|(\widehat{u}^{(k_1,l_1)})^{\intercal}\widehat{\Sigma}^{(k_1)} \left[\widehat{u}^{(l_2,k_2)} {\bf 1}(l_2=k_1)+\widehat{u}^{(k_2,l_2)} {\bf 1}(k_2=k_1)\right]\right|\lesssim d_0.$
Hence, on the event $\mathcal{G}_3,$ we establish \eqref{eq: target 1}.
\subsubsection{Proof of \eqref{eq: target 2}}
\label{sec: target 2 proof}

Define $$W_{i,1}=[b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}},\; W_{i,2}=[b^{(k_1)}]^{\intercal}X_{i}^{\mathbb{Q}},\; W_{i,3}=[b^{(l_2)}]^{\intercal}X_{i}^{\mathbb{Q}}, \; W_{i,4}=[b^{(k_2)}]^{\intercal}X_{i}^{\mathbb{Q}};$$
and 
$$\widehat{W}_{i,1}=(\widehat{b}_{init}^{(l_1)})^{\intercal}X_{i}^{\mathbb{Q}}, \;  \widehat{W}_{i,2}=(\widehat{b}_{init}^{(k_1)})^{\intercal}X_{i}^{\mathbb{Q}},\;  \widehat{W}_{i,3}=(\widehat{b}_{init}^{(l_2)})^{\intercal} X_{i}^{\mathbb{Q}}, \;  \widehat{W}_{i,4}=(\widehat{b}_{init}^{(k_2)})^{\intercal}X_{i}^{\mathbb{Q}}.$$
With the above definitions, we have 
\begin{equation}
\begin{aligned}
&\mathbf{E} [b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(k_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(l_2)}]^{\intercal}X_{i}^{\mathbb{Q}}[b^{(k_2)}]^{\intercal}X_{i}^{\mathbb{Q}}-(b^{(l_1)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k_1)}(b^{(l_2)})^{\intercal}\Sigma^{\mathbb{Q}} b^{(k_2)}\\
&=\mathbf{E} \prod_{t=1}^{4}{W}_{i,t}-\mathbf{E} {W}_{i,1}{W}_{i,2}\cdot \mathbf{E} {W}_{i,3}{W}_{i,4}
\end{aligned}
\label{eq: shorthand 1}
\end{equation}
and 
\begin{equation}
\begin{aligned}
&{\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left((\widehat{b}_{init}^{(l_1)})^{\intercal} X_{i}^{\mathbb{Q}} (\widehat{b}_{init}^{(k_1)})^{\intercal}X_{i}^{\mathbb{Q}}(\widehat{b}_{init}^{(l_2)})^{\intercal} X_{i}^{\mathbb{Q}} (\widehat{b}_{init}^{(k_2)})^{\intercal}X_{i}^{\mathbb{Q}} -(\widehat{b}_{init}^{(l_1)})^{\intercal}\bar{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k_1)}(\widehat{b}_{init}^{(l_2)})^{\intercal}\bar{\Sigma}^{\mathbb{Q}}\widehat{b}_{init}^{(k_2)}\right)}\\
&=\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\prod_{t=1}^{4}\widehat{W}_{i,t}-\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\widehat{W}_{i,1}\widehat{W}_{i,2}\cdot \frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\widehat{W}_{i,3}\widehat{W}_{i,4}
\end{aligned}
\label{eq: shorthand 2}
\end{equation}
Hence, it is sufficient to control the following terms.
{\small
\begin{equation*}
\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\prod_{t=1}^{4}\widehat{W}_{i,t}-\mathbf{E} \prod_{t=1}^{4}{W}_{i,t}=\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\prod_{t=1}^{4}\widehat{W}_{i,t}-\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\prod_{t=1}^{4}{W}_{i,t}+\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\prod_{t=1}^{4}{W}_{i,t}-\mathbf{E} \prod_{t=1}^{4}{W}_{i,t}
\label{eq: forth moment}
\end{equation*}
\begin{equation*}
\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\widehat{W}_{i,1}\widehat{W}_{i,2}-\mathbf{E} {W}_{i,1}{W}_{i,2}=\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\widehat{W}_{i,1}\widehat{W}_{i,2}-\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}{W}_{i,1}{W}_{i,2}+\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}{W}_{i,1}{W}_{i,2}-\mathbf{E} {W}_{i,1}{W}_{i,2}
\label{eq: second moment}
\end{equation*}
\begin{equation*}
\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\widehat{W}_{i,3}\widehat{W}_{i,4}-\mathbf{E} {W}_{i,3}{W}_{i,4}=\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\widehat{W}_{i,3}\widehat{W}_{i,4}-\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}{W}_{i,3}{W}_{i,4}+\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}{W}_{i,3}{W}_{i,4}-\mathbf{E} {W}_{i,3}{W}_{i,4}
\label{eq: second moment copy}
\end{equation*}
}
Specifically, we will show that, with probability larger than $1-\min\{N_{\mathbb{Q}},p\}^{-c},$ 
\begin{equation}
\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}{W}_{i,1}{W}_{i,2}-\mathbf{E} {W}_{i,1}{W}_{i,2}\right|\lesssim \|b^{(l_1)}\|_2 \|b^{(k_1)}\|_2\sqrt{\frac{\log N_{\mathbb{Q}}}{N_{\mathbb{Q}}}},
\label{eq: concentration error 1}
\end{equation}
\begin{equation}
\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}{W}_{i,3}{W}_{i,4}-\mathbf{E} {W}_{i,3}{W}_{i,4}\right|\lesssim \|b^{(l_2)}\|_2 \|b^{(k_2)}\|_2\sqrt{\frac{\log N_{\mathbb{Q}}}{N_{\mathbb{Q}}}},
\label{eq: concentration error 2}
\end{equation}
\begin{equation}
\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left(\prod_{t=1}^{4}W_{i,t}-\mathbf{E} \prod_{t=1}^{4}W_{i,t}\right)\lesssim \|b^{(l_1)}\|_2\|b^{(k_1)}\|_2\|b^{(l_2)}\|_2\|b^{(k_2)}\|_2 {\frac{\left(\log N_{\mathbb{Q}}\right)^{5/2}}{\sqrt{N_{\mathbb{Q}}}}},
\label{eq: concentration error 3}
\end{equation}
{\small
\begin{equation}
\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\widehat{W}_{i,1}\widehat{W}_{i,2}-\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}{W}_{i,1}{W}_{i,2}\right|\lesssim \sqrt{\frac{s \log p}{n}}\left(\sqrt{\log N_{\mathbb{Q}}}(\|b^{(l_1)}\|_2+\|b^{(k_1)}\|_2)+\sqrt{\frac{s \log p}{n}}\right),
\label{eq: approximation error 1}
\end{equation}
}
{\small
\begin{equation}
\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\widehat{W}_{i,3}\widehat{W}_{i,4}-\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}{W}_{i,3}{W}_{i,4}\right|\lesssim\sqrt{\frac{s \log p}{n}}\left(\sqrt{\log N_{\mathbb{Q}}}(\|b^{(l_2)}\|_2+\|b^{(k_2)}\|_2)+\sqrt{\frac{s \log p}{n}}\right).
\label{eq: approximation error 2}
\end{equation}}
If we further assume that $\|b^{(l)}\|_2\leq C$ for $1\leq l\leq L$ and $s^2(\log p)^2/n\leq c$ for some positive constants $C>0$ and $c>0,$ then with probability larger than $1-\min\{N_{\mathbb{Q}},p\}^{-c},$ 
\begin{equation}
\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\prod_{t=1}^{4}\widehat{W}_{i,t}-\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\prod_{t=1}^{4}{W}_{i,t}\right|\lesssim \log \max\{N_{\mathbb{Q}},p\} \sqrt{\frac{s \log p \log N_{\mathbb{Q}}}{n}}.
\label{eq: approximation error 3}
\end{equation}
By the expression \eqref{eq: shorthand 1} and \eqref{eq: shorthand 2}, we establish \eqref{eq: target 2} by applying \eqref{eq: concentration error 1}, \eqref{eq: concentration error 2}, \eqref{eq: concentration error 3}, \eqref{eq: approximation error 1}, \eqref{eq: approximation error 2}, \eqref{eq: approximation error 3}. In the following, we prove 
\eqref{eq: concentration error 1}, \eqref{eq: concentration error 2} and \eqref{eq: concentration error 3}. Then we will present the proofs of \eqref{eq: approximation error 1}, \eqref{eq: approximation error 2}, \eqref{eq: approximation error 3}.

\paragraph{Proofs of \eqref{eq: concentration error 1}, \eqref{eq: concentration error 2} and \eqref{eq: concentration error 3}.}
We shall apply the following lemma to control the above terms, which re-states the Lemma 1 in \cite{cai2011adaptive}. 
\begin{Lemma} 
	\label{lem: fund concentration lemma}
	Let $\xi_1,\cdots,\xi_n$ be independent random variables with mean 0. Suppose that there exists some $c>0$ and $U_{n}$ such that $\sum_{i=1}^{n}\mathbf{E}\xi_{i}^2 \exp\left(c|\xi_i|\right)\leq U_n^2.$ Then for $0<t\leq U_n$, 
	\begin{equation}
	{\mathbf{P}}\left(\sum_{i=1}^{n} \xi_i\geq C U_n t\right)\leq \exp(-t^2),
	\end{equation}
	where $C=c+c^{-1}.$
\end{Lemma}


Define $$W^{0}_{i,1}=\frac{[b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}}{\sqrt{[b^{(l_1)}]^{\intercal}\Sigma^{\mathbb{Q}}b^{(l_1)}}},\; W^{0}_{i,2}=\frac{[b^{(k_1)}]^{\intercal}X_{i}^{\mathbb{Q}}}{\sqrt{[b^{(k_1)}]^{\intercal}\Sigma^{\mathbb{Q}}b^{(k_1)}}}$$
and 
$$W^{0}_{i,3}=\frac{[b^{(l_2)}]^{\intercal}X_{i}^{\mathbb{Q}}}{{\sqrt{[b^{(l_2)}]^{\intercal}\Sigma^{\mathbb{Q}}b^{(l_2)}}}} \; W^{0}_{i,4}=\frac{[b^{(k_2)}]^{\intercal}X_{i}^{\mathbb{Q}}}{{\sqrt{[b^{(k_2)}]^{\intercal}\Sigma^{\mathbb{Q}}b^{(k_2)}}}}$$

Since $X_{i}^{\mathbb{Q}}$ is sub-gaussian, $W^0_{i,t}$ is sub-gaussian and both $W^0_{i,1}W^0_{i,2}$ and $W^0_{i,3}W^0_{i,4}$ are sub-exponetial random variables, which follows from Remark 5.18   in \cite{vershynin2010introduction}. By Corollary 5.17 in \cite{vershynin2010introduction}, we have 
\begin{equation*}
{\mathbf{P}}\left(\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left(W^0_{i,1}W^0_{i,2}-\mathbf{E} W^0_{i,1}W^0_{i,2} \right)\right|\geq C\sqrt{\frac{\log N_{\mathbb{Q}}}{N_{\mathbb{Q}}}}\right)\leq 2 N_{\mathbb{Q}}^{-c}
\end{equation*} 
and 
\begin{equation*}
{\mathbf{P}}\left(\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left(W^0_{i,3}W^0_{i,4}-\mathbf{E} W^0_{i,3}W^0_{i,4} \right)\right|\geq C\sqrt{\frac{\log N_{\mathbb{Q}}}{N_{\mathbb{Q}}}}\right)\leq 2 N_{\mathbb{Q}}^{-c}
\end{equation*} 
where $c$ and $C$ are positive constants. The above inequalities imply \eqref{eq: concentration error 1} and \eqref{eq: concentration error 2} after rescaling.



For $1\leq t\leq 4$, since $W^0_{i,t}$ is a sub-gaussian random variable, there exist positive constants $C_1>0$ and $c>2$ such that the following concentration inequality holds,
\begin{equation}
\sum_{i=1}^{N_{\mathbb{Q}}}{\mathbf{P}}\left(\max_{1\leq t\leq 4}|W^0_{i,t}|\geq C_1\sqrt{\log N_{\mathbb{Q}}}\right)\leq N_{\mathbb{Q}} \max_{1\leq i\leq N_{\mathbb{Q}}}{\mathbf{P}}\left(\max_{1\leq t\leq 4}|W^0_{i,t}|\geq C_1\sqrt{\log N_{\mathbb{Q}}}\right)\lesssim N_{\mathbb{Q}}^{-c}
\label{eq: concentration of subgaussian}
\end{equation}
Define $$H_{i,a}=\prod_{t=1}^{4}W^0_{i,t} \cdot \mathbf{1}\left(\max_{1\leq t\leq 4}|W^0_{i,t}|\leq C_1\sqrt{\log N_{\mathbb{Q}}}\right)\quad \text{for}\quad 1\leq t\leq 4,$$ and $$H_{i,b}=\prod_{t=1}^{4}W^0_{i,t} \cdot \mathbf{1}\left(\max_{1\leq t\leq 4}|W^0_{i,t}|\geq C_1\sqrt{\log N_{\mathbb{Q}}}\right) \quad \text{for}\quad 1\leq t\leq 4.$$ Then we have 
\begin{equation}
\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \prod_{t=1}^{4}W^0_{i,t}-\mathbf{E} \prod_{t=1}^{4} W^0_{i,t}=\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left(H_{i,a}-\mathbf{E} H_{i,a}\right)+\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left(H_{i,b}-\mathbf{E} H_{i,b}\right)
\label{eq: error decomposition}
\end{equation}
By applying the Cauchy-Schwarz inequality, we bound $\mathbf{E} H_{i,b}$ as
\begin{equation}
\begin{aligned}
\left|\mathbf{E} H_{i,b}\right|&\leq  \sqrt{\mathbf{E}\left( \prod_{t=1}^{4}W^0_{i,t}\right)^2 {\mathbf{P}}\left(\max_{1\leq t\leq 4}|W^0_{i,t}|\geq C_1\sqrt{\log N_{\mathbb{Q}}}\right)}\\
&\lesssim {\mathbf{P}}\left(|W^0_{i,t}|\geq C_1\sqrt{\log N_{\mathbb{Q}}}\right)^{1/2}\lesssim N_{\mathbb{Q}}^{-1/2},
\end{aligned}
\label{eq: bound of expectation}
\end{equation}
where the second and the last inequalities follow from the fact that $W^0_{i,t}$ is a sub-gaussian random variable.
Now we apply Lemma \ref{lem: fund concentration lemma} to bound $\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left(H_{i,a}-\mathbf{E} H_{i,a}\right)$.
By taking $c={c_1}/{\left(C_1^2 \log N_{\mathbb{Q}}\right)^2}$ for some small positive constant $c_1>0$,  we have 
$$\sum_{i=1}^{N_{\mathbb{Q}}}\mathbf{E} \left(H_{i,a}-\mathbf{E} H_{i,a}\right)^2\exp\left(c \left|H_{i,a}-\mathbf{E} H_{i,a}\right|\right)\leq C \sum_{i=1}^{N_{\mathbb{Q}}}\mathbf{E} \left(H_{i,a}-\mathbf{E} H_{i,a}\right)^2 \leq C_2 N_{\mathbb{Q}}.$$
By applying Lemma \ref{lem: fund concentration lemma} with $U_n=\sqrt{C_2 N_{\mathbb{Q}}}$, $c={c_1}/{\left(C_1^2 \log N_{\mathbb{Q}}\right)^2}$ and $t=\sqrt{\log N_{\mathbb{Q}}}$, then we have 

\begin{equation}
{\mathbf{P}} \left(\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left(H_{i,a}-\mathbf{E} H_{i,a}\right)\geq C {\frac{(\log N_{\mathbb{Q}})^{5/2}}{\sqrt{N_{\mathbb{Q}}}}}\right)\lesssim N_{\mathbb{Q}}^{-c}.
\label{eq: control of the truncated sum}
\end{equation}
Note that 
\begin{equation}
\begin{aligned}
{\mathbf{P}}\left(\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} H_{i,b}\right| \geq C {\frac{\left(\log N_{\mathbb{Q}}\right)^{5/2}}{\sqrt{N_{\mathbb{Q}}}}}\right)&\leq {\mathbf{P}}\left(\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left|H_{i,b}\right| \geq C {\frac{\left(\log N_{\mathbb{Q}}\right)^{5/2}}{\sqrt{N_{\mathbb{Q}}}}}\right)\\
&\leq \sum_{i=1}^{N_{\mathbb{Q}}} {\mathbf{P}}\left(\left|H_{i,b}\right| \geq C {\frac{\left(\log N_{\mathbb{Q}}\right)^{5/2}}{\sqrt{N_{\mathbb{Q}}}}}\right)\\
&\leq \sum_{i=1}^{N_{\mathbb{Q}}}{\mathbf{P}}\left(\max_{1\leq t\leq 4}|W^0_{i,t}|\geq C_1\sqrt{\log N_{\mathbb{Q}}}\right)\lesssim N_{\mathbb{Q}}^{-c}
\end{aligned}
\label{eq: concentration of subgaussian 2}
\end{equation}
where the last inequality follows from \eqref{eq: concentration of subgaussian}.

By the decomposition \eqref{eq: error decomposition}, we have
\begin{equation*}
\begin{aligned}
&{\mathbf{P}}\left(\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left(\prod_{t=1}^{4}W^0_{i,t}-\mathbf{E} \prod_{t=1}^{4}W^0_{i,t}\right)\right|\geq 3C {\frac{\left(\log N_{\mathbb{Q}}\right)^{5/2}}{\sqrt{N_{\mathbb{Q}}}}}\right)\\
& \leq  {\mathbf{P}} \left(\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} \left(H_{i,a}-\mathbf{E} H_{i,a}\right)\right|\geq C {\frac{\left(\log N_{\mathbb{Q}}\right)^{5/2}}{\sqrt{N_{\mathbb{Q}}}}}\right)\\
&+{\mathbf{P}}\left(\left|\mathbf{E} H_{i,b}\right| \geq C {\frac{\left(\log N_{\mathbb{Q}}\right)^{5/2}}{\sqrt{N_{\mathbb{Q}}}}}\right)+{\mathbf{P}}\left(\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}} H_{i,b}\right| \geq C {\frac{\left(\log N_{\mathbb{Q}}\right)^{5/2}}{\sqrt{N_{\mathbb{Q}}}}}\right)
\lesssim N_{\mathbb{Q}}^{-c}.\\
\end{aligned}
\end{equation*}
where the final upper bound follows from \eqref{eq: bound of expectation}, \eqref{eq: control of the truncated sum} and \eqref{eq: concentration of subgaussian 2}.
Hence, we establish that \eqref{eq: concentration error 3} holds with probability larger than $1-N_{\mathbb{Q}}^{-c}.$

\paragraph{Proofs \eqref{eq: approximation error 1}, \eqref{eq: approximation error 2} and \eqref{eq: approximation error 3}.}
It follows from the definitions of $\widehat{W}_{i,t}$ and $W_{i,t}$ that 
\begin{equation}
\begin{aligned}
&\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\widehat{W}_{i,1}\widehat{W}_{i,2}-\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}{W}_{i,1}{W}_{i,2}=[\widehat{b}_{init}^{(l_1)}-b^{(l_1)}]^{\intercal}\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_1)}-b^{(k_1)}]\\
&+[b^{(l_1)}]^{\intercal}\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_1)}-b^{(k_1)}]+[\widehat{b}_{init}^{(l_1)}-b^{(l_1)}]^{\intercal}\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}b^{(k_1)}
\end{aligned}
\end{equation}
On the event $\mathcal{G}_2\cap\mathcal{G}_5$ with $\mathcal{G}_2$ defined in \eqref{eq: high prob event 1} and $\mathcal{G}_5$ defined in \eqref{eq: high prob event 2}, we establish \eqref{eq: approximation error 1}. By a similar argument, we establish \eqref{eq: approximation error 2}.
Furthermore, we define the event
\begin{equation}
\begin{aligned}
\mathcal{G}_7=\left\{\max_{1\leq l\leq L}\max_{1\leq i\leq N_{\mathbb{Q}}} \left|X_{i}^{\mathbb{Q}}{b}^{(l)}\right|\lesssim (\sqrt{C_0}+\sqrt{\log N_{\mathbb{Q}}})\|b^{(l)}\|_2\right\}\\
\mathcal{G}_8=\left\{\max_{1\leq i\leq N_{\mathbb{Q}}} \|X_{i}^{\mathbb{Q}}\|_{\infty}\lesssim (\sqrt{C_0}+\sqrt{\log N_{\mathbb{Q}}+\log p})\right\}
\end{aligned}
\end{equation}
It follows from the assumption (A1) that ${\mathbf{P}}\left(\mathcal{G}_7\right)\geq 1- N_{\mathbb{Q}}^{-c}$ and ${\mathbf{P}}\left(\mathcal{G}_8\right)\geq 1-\min\{N_{\mathbb{Q}},p\}^{-c}$ for some positive constant $c>0.$ Note that
\begin{equation}
\begin{aligned}
&\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left|\widehat{W}_{i,1}\widehat{W}_{i,2}-{W}_{i,1}{W}_{i,2}\right|\leq \frac{1}{N_{\mathbb{Q}}} \sum_{i=1}^{N_{\mathbb{Q}}}\left|[\widehat{b}_{init}^{(l_1)}-b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_1)}-b^{(k_1)}]\right|\\
&+\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left|[b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_1)}-b^{(k_1)}]\right|+\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left|[\widehat{b}_{init}^{(l_1)}-b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}b^{(k_1)}\right|
\end{aligned}
\label{eq: upper decomposition}
\end{equation}
By the Cauchy-Schwarz inequality, we have
\begin{align*}
&\frac{1}{N_{\mathbb{Q}}} \sum_{i=1}^{N_{\mathbb{Q}}}\left|[\widehat{b}_{init}^{(l_1)}-b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_1)}-b^{(k_1)}]\right|\\
&\leq \frac{1}{N_{\mathbb{Q}}} \sqrt{\sum_{i=1}^{N_{\mathbb{Q}}}\left([\widehat{b}_{init}^{(l_1)}-b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}\right)^2 \sum_{i=1}^{N_{\mathbb{Q}}}\left([X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_1)}-b^{(k_1)}]\right)^2}\\
\end{align*}
Hence, on the event $\mathcal{G}_1\cap \mathcal{G}_6(\widehat{b}_{init}^{(k_1)}-b^{(k_1)},\widehat{b}_{init}^{(k_1)}-b^{(k_1)},\sqrt{\log p})\cap  \mathcal{G}_6(\widehat{b}_{init}^{(l_1)}-b^{(l_1)},\widehat{b}_{init}^{(l_1)}-b^{(l_1)},\sqrt{\log p})$,
\begin{equation}
\frac{1}{N_{\mathbb{Q}}} \sum_{i=1}^{N_{\mathbb{Q}}}\left|[\widehat{b}_{init}^{(l_1)}-b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_1)}-b^{(k_1)}]\right|\lesssim \frac{s\log p}{n}
\label{eq: part 1}
\end{equation}
On the event $\mathcal{G}_7,$ we have 
\begin{align*}
&\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left|[b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_1)}-b^{(k_1)}]\right|\\
&\lesssim (\sqrt{C_0}+\sqrt{\log N_{\mathbb{Q}}})\|b^{(l_1)}\|_2\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left|[X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_1)}-b^{(k_1)}]\right|\\
&\leq (\sqrt{C_0}+\sqrt{\log N_{\mathbb{Q}}})\|b^{(l_1)}\|_2\frac{1}{\sqrt{N_{\mathbb{Q}}}}\sqrt{\sum_{i=1}^{N_{\mathbb{Q}}}\left([X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_1)}-b^{(k_1)}]\right)^2}\\
\end{align*}
where the last inequality follows from the Cauchy-Schwarz inequality. Hence, on the event $\mathcal{G}_1\cap  \mathcal{G}_7\cap \mathcal{G}_6(\widehat{b}_{init}^{(k_1)}-b^{(k_1)},\widehat{b}_{init}^{(k_1)}-b^{(k_1)},\sqrt{\log p}),$ we establish 
\begin{equation}
\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left|[b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_1)}-b^{(k_1)}]\right|\lesssim (\sqrt{C_0}+\sqrt{\log N_{\mathbb{Q}}})\|b^{(l_1)}\|_2\sqrt{\frac{s\log p}{n}}.
\label{eq: part 2}
\end{equation}
Similarly, we establish 
$$\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left|[\widehat{b}_{init}^{(l_1)}-b^{(l_1)}]^{\intercal}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}b^{(k_1)}\right|\lesssim (\sqrt{C_0}+\sqrt{\log N_{\mathbb{Q}}})\|b^{(k_1)}\|_2\sqrt{\frac{s\log p}{n}}.
$$
Combined with \eqref{eq: upper decomposition}, \eqref{eq: part 1} and \eqref{eq: part 2}, we establish 
\begin{equation}
\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left|\widehat{W}_{i,1}\widehat{W}_{i,2}-{W}_{i,1}{W}_{i,2}\right|\lesssim \left(\sqrt{\log N_{\mathbb{Q}}}(\|b^{(l_1)}\|_2+\|b^{(k_1)}\|_2)+\sqrt{\frac{s\log p}{n}}\right)\sqrt{\frac{s\log p}{n}}
\label{eq: absolute bound 1}
\end{equation}
Similarly, we establish  
\begin{equation}
\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left|\widehat{W}_{i,3}\widehat{W}_{i,4}-{W}_{i,3}{W}_{i,4}\right|\lesssim \left(\sqrt{\log N_{\mathbb{Q}}}(\|b^{(l_2)}\|_2+\|b^{(k_2)}\|_2)+\sqrt{\frac{s\log p}{n}}\right)\sqrt{\frac{s\log p}{n}}
\label{eq: absolute bound 2}
\end{equation}
Define 
$
{H}_{i,1}={W}_{i,1}{W}_{i,2}, {H}_{i,2}={W}_{i,3}{W}_{i,4}, \widehat{H}_{i,1}=\widehat{W}_{i,1}\widehat{W}_{i,2}$  and $\widehat{H}_{i,2}=\widehat{W}_{i,3}\widehat{W}_{i,4}.
$
Then we have 
\begin{equation}
\begin{aligned}
&\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\prod_{t=1}^{4}\widehat{W}_{i,t}-\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\prod_{t=1}^{4}{W}_{i,t}=\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\widehat{H}_{i,1}\widehat{H}_{i,2}-\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}{H}_{i,1}{H}_{i,2}\\
&=\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left(\widehat{H}_{i,1}-{H}_{i,1}\right){H}_{i,2}+\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left(\widehat{H}_{i,2}-{H}_{i,2}\right){H}_{i,1}+\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\left(\widehat{H}_{i,1}-{H}_{i,1}\right)\left(\widehat{H}_{i,2}-{H}_{i,2}\right)\\
\end{aligned}
\label{eq: error bound decomposition}
\end{equation}
On the event $\mathcal{G}_7,$ we have 
\begin{equation}
\left|{H}_{i,1}\right|\lesssim({C_0}+{\log N_{\mathbb{Q}}})\|b^{(l_1)}\|_2\|b^{(k_1)}\|_2
\quad \text{and}\quad 
\left|{H}_{i,2}\right|\lesssim({C_0}+{\log N_{\mathbb{Q}}})\|b^{(l_2)}\|_2\|b^{(k_2)}\|_2
\label{eq: bounded verification}
\end{equation}
On the event $\mathcal{G}_7\cap\mathcal{G}_8,$ we have 
\begin{equation}
\begin{aligned}
&\left|\widehat{H}_{i,2}-{H}_{i,2}\right|\leq \left|[\widehat{b}_{init}^{(l_2)}-b^{(l_2)}]^{\intercal}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_2)}-b^{(k_2)}]\right|\\
&+\left|[b^{(l_2)}]^{\intercal}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}[\widehat{b}_{init}^{(k_2)}-b^{(k_2)}]\right|+\left|[\widehat{b}_{init}^{(l_2)}-b^{(l_2)}]^{\intercal}X_{i}^{\mathbb{Q}}[X_{i}^{\mathbb{Q}}]^{\intercal}b^{(k_2)}\right|\\
&\lesssim (C_0+\log N_{\mathbb{Q}}+\log p) \left(s^2\frac{\log p}{n}+s\sqrt{\frac{\log p}{n}}\|b^{(k_2)}\|_2+s\sqrt{\frac{\log p}{n}}\|b^{(l_2)}\|_2\right)
\end{aligned}
\label{eq: single upper decomposition}
\end{equation}
By the decomposition \eqref{eq: error bound decomposition}, we combine \eqref{eq: bounded verification}, \eqref{eq: single upper decomposition}, \eqref{eq: absolute bound 1} and \eqref{eq: absolute bound 2} and establish 
\begin{equation}
\begin{aligned}
&\left|\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\prod_{t=1}^{4}\widehat{W}_{i,t}-\frac{1}{N_{\mathbb{Q}}}\sum_{i=1}^{N_{\mathbb{Q}}}\prod_{t=1}^{4}{W}_{i,t}\right|\\
&\leq({C_0}+{\log N_{\mathbb{Q}}})\|b^{(l_2)}\|_2\|b^{(k_2)}\|_2\left(\sqrt{\log N_{\mathbb{Q}}}(\|b^{(l_1)}\|_2+\|b^{(k_1)}\|_2)+\sqrt{\frac{s\log p}{n}}\right)\sqrt{\frac{s\log p}{n}}\\
&+({C_0}+{\log N_{\mathbb{Q}}})\|b^{(l_1)}\|_2\|b^{(k_1)}\|_2\left(\sqrt{\log N_{\mathbb{Q}}}(\|b^{(l_2)}\|_2+\|b^{(k_2)}\|_2)+\sqrt{\frac{s\log p}{n}}\right)\sqrt{\frac{s\log p}{n}}\\
&+\left(\sqrt{\log N_{\mathbb{Q}}}(\|b^{(l_1)}\|_2+\|b^{(k_1)}\|_2)+\sqrt{\frac{s\log p}{n}}\right)\sqrt{\frac{s\log p}{n}}\\
&\cdot(C_0+\log N_{\mathbb{Q}}+\log p) \left(s^2\frac{\log p}{n}+s\sqrt{\frac{\log p}{n}}\|b^{(k_2)}\|_2+s\sqrt{\frac{\log p}{n}}\|b^{(l_2)}\|_2+\|b^{(l_2)}\|_2\|b^{(k_2)}\|_2\right)
\end{aligned}
\end{equation}
If we further assume that $\|b^{(l)}\|_2\leq C$ for $1\leq l\leq L$ and $s^2(\log p)^2/n\leq c$ for some positive constants $C>0$ and $c>0,$ then we establish \eqref{eq: approximation error 3}.



\section{Additional Simulation}
\label{sec: additional simulation}

\subsection{Additional Simulation settings}
\label{sec: additional simulation setting}
In addition to the simulation settings in Section \ref{sec: results} in the main paper, we consider the following simulation settings to evaluate the finite-sample performance of our proposed method. \\
\noindent {\bf Setting 2 ($L=2$ with covariate shift)}.
$b^{(1)}$ and $b^{(2)}$ are the same as setting 1, except for $b^{(1)}_{498}=0.5$, $b^{(1)}_j = -0.5$ for $j=499, 500,$ and $b^{(2)}_{500}=1$.
$[{x_{\rm new}}]_{j}=1$ for $498\leq j\leq 500$, and $[{x_{\rm new}}]_{j}=0$ otherwise.
$\Sigma^{\mathbb{Q}}_{i,i}=1.5$ for $1\leq i\leq 500$, $\Sigma^{\mathbb{Q}}_{i,j}=0.9$ for $1\leq i\neq j\leq 5,$ $\Sigma^{\mathbb{Q}}_{i,j}=0.9$ for $499\leq i\neq j\leq 500$ and $\Sigma^{\mathbb{Q}}_{i,j}=\Sigma_{i,j}$ otherwise.


\noindent {\bf Setting 5 (perturbation setting, no covariate shift with $L=2$)}:
$b^{(1)}_j=j/40$ for $1\leq j\leq 10,$ $b^{(1)}_j=(10-j)/40$ for $11\leq j\leq 20$, $b^{(1)}_j=0.2$ for $j=21$, $b^{(1)}_j=1$ for $j=22,23$;
$b^{(2)}_j=b^{(1)}_j+{\rm perb}/\sqrt{300}$ for $1\leq j\leq 10,$ $b^{(2)}_j=0$ for $11\leq j\leq 20$, $b^{(2)}_{j}=0.5$ for $j=21$, $b^{(2)}_j=0.2$ for $j=22,23$ .
We vary the values of ${\rm perb}$ across $\{1,1.125,1.25,1.5,3.75,4,5,7,10,12\}.$
$[x_{\rm new}]_{j}=j/5$ for $1\leq j\leq 5$.


\noindent {\bf Setting 6 (opposite effect, no covariate shift with $L=2$)}:
\begin{enumerate}
\item[(6a)] $b^{(l)}$ for $1\leq l \leq 2$ are almost the same as setting 1, except for $b^{(1)}_j=0$ for $j=499$, $b^{(1)}_j=0.2$ for $j=500$, $b^{(2)}_j=-0.2$ for $j=500$. 
$[{x_{\rm new}}]_{j}=1$ for $j=500$.
\item[(6b)] Same as 6(a) except for $b^{(2)}_{j}=-0.4$ for $j=500$.
\end{enumerate}
\noindent {\bf Setting 7 (covariate shift with $L=5$)}:
\begin{enumerate}
\item[(7a)] $b^{(1)}_j=j/10$ for $1\leq j\leq 10,$ $b^{(1)}_j=(10-j)/10$ for $11\leq j\leq 20$, $b^{(1)}_{j}=1/5$ for $j=21$, $b^{(1)}_{j}=1$ for $j=22,23$;
For $2\leq l\leq L$, $b^{(l)}_j=b^{(1)}_j+0.1\cdot(l-1)/\sqrt{300}$ for $1\leq j\leq 10,$ $b^{(2)}_j=-0.3\cdot(l-1)/\sqrt{300}$ for $11\leq j\leq 20,$ $b^{(l)}_{j}=0.5\cdot(l-1)$ for $j=21$, $b^{(l)}_{j}=0.2\cdot(j-1)$ for $j=22,23$; 
$[{x_{\rm new}}]_{j}=1$ for $21\leq j\leq 23$;
$\Sigma^{\mathbb{Q}}_{i,i}=1.1$ for $1\leq i\leq 500$, $\Sigma^{\mathbb{Q}}_{i,j}=0.75$ for $1\leq i\neq j\leq 6$ and $\Sigma^{\mathbb{Q}}_{i,j}=\Sigma_{i,j}$ otherwise.
\item[(7b)] $b^{(l)}$ for $1\leq l \leq 2$ and $\Sigma^{\mathbb{Q}}$ are the same as (a); for $l\geq 3$, $\{b^{(l)}_{j}\}_{1\leq j\leq 6}$ are independently generated following standard normal and $b^{(l)}_{j}=0$ for $7\leq j\leq 500$; 
$x_{\rm new}\sim \mathcal{N}({\bf 0},\Sigma^{\rm new})$ with $\Sigma^{\rm new}_{i,j}=0.5^{1+|i-j|}/25$ for $1\leq i,j\leq 500$.
\end{enumerate}

\subsection{Choice of $\delta$: Instability Measure and Reward Plots}
\label{sec: delta choice sim}

In Table \ref{tab: complete instability}, we report the instability measure $\mathbb{I}(\delta)$ for settings 2, 3, 6, and 7 detailed in Section \ref{sec: results} and Section \ref{sec: additional simulation setting} in the supplement. setting 5 is not included since it consists of more than 10 subsettings and all other settings have been reported in Table \ref{tab: stable} in  the main paper.
\begin{table}[H]
\centering
\begin{tabular}[t]{|c|c|c|c|c|c||c|}
\hline
setting & $\delta=0$ & $\delta=0.1$ & $\delta=0.5$ & $\delta=1$ & $\delta=2$ & $\Gamma^{\mathbb{Q}}_{11}+\Gamma^{\mathbb{Q}}_{22}-2\Gamma^{\mathbb{Q}}_{12}$\\
\hline
2 & 0.023 & 0.021 & 0.014 & 0.010 & 0.006 & 4.635\\
\hline
3(a) & 0.094 & 0.082 & 0.044 & 0.023 & 0.010 & 1.935\\
\hline
3(b) & 0.058 & 0.050 & 0.029 & 0.017 & 0.008 & 2.810\\
\hline
4(a) & 0.108 & 0.087 & 0.044 & 0.024 & 0.011 & 2.007\\
\hline
4(b) & 0.076 & 0.059 & 0.027 & 0.014 & 0.006 & $L=5$\\
\hline
4(c) & 0.052 & 0.039 & 0.016 & 0.008 & 0.003 & $L=10$\\
\hline
6(a) & 3.305 & 1.449 & 0.221 & 0.065 & 0.018 & 0.160\\
\hline
6(b) & 1.451 & 0.816 & 0.168 & 0.056 & 0.017 & 0.360\\
\hline
7(a) & 0.007 & 0.007 & 0.007 & 0.005 & 0.003 & $L=5$\\
\hline
7(b) & 0.005 & 0.005 & 0.004 & 0.003 & 0.001 & $L=5$\\
\hline
\end{tabular}
\caption{The instability measure $\mathbb{I}(\delta)$ for settings 2, 3, 4, 6, and 7. The reported values are averaged over 100 repeated simulations. }
\label{tab: complete instability}
\end{table}

In Figure \ref{fig: reward-reduction}, we demonstrate the effect of $\delta$ on the reward across simulation settings with large ${\mathbb{I}}(0)$ values. For these settings, if the stable aggregation is an important goal, our recommended value is $\delta=2$ as ${R}_{\mathbb{Q}}(\widehat{\gamma}_{\delta})/{R}_{\mathbb{Q}}(\widehat{\gamma}_{\delta=0})$ is above 95\% even for $\delta=2.$

 \begin{figure}[htp!]
    \centering
    \includegraphics[width=0.9\linewidth]{figures/reward-ratio-vf-3.png}
    \caption{The reward ratio with respect to different $\delta$ values. The true and estimated reward ratios respectively denote ${R}_{\mathbb{Q}}(\widehat{\gamma}_{\delta})/{R}_{\mathbb{Q}}(\widehat{\gamma}_{\delta=0})$ and $\widehat{R}(\widehat{\gamma}_{\delta})/\widehat{R}(\widehat{\gamma}_{\delta=0})$, where $\widehat{\gamma}_{\delta}$ and $\widehat{R}(\widehat{\gamma}_{\delta})$ are estimated based on a single data set with $n=500$ and $N_{\mathbb{Q}}=2000.$}
    \label{fig: reward-reduction}
   
\end{figure}

In Figure \ref{fig: reward-reduction all}, we report the reward ratios for extra settings detailed in Section \ref{sec: results} and Section \ref{sec: additional simulation setting}. Since $\mathbb{I}(0)$ is small in these settings, the maximin effect without the ridge penalty is already a stable aggregation.
\begin{figure}[H]
\centering
\includegraphics[scale=0.5]{figures/reward-ratio-vf-6.png}
\caption{The reward ratio with respect to different $\delta$ values. The true and estimated reward ratios respectively denote ${R}_{\mathbb{Q}}(\widehat{\gamma}_{\delta})/{R}_{\mathbb{Q}}(\widehat{\gamma}_{\delta=0})$ and $\widehat{R}(\widehat{\gamma}_{\delta})/\widehat{R}(\widehat{\gamma}_{\delta=0})$, where $\widehat{\gamma}_{\delta}$ and $\widehat{R}(\widehat{\gamma}_{\delta})$ are estimated based on a single data set with $n=500$ and $N_{\mathbb{Q}}=2,000.$}
\label{fig: reward-reduction all}
\end{figure}




\subsection{Simulation Results for Settings 2, 4, 5, 6 and 7}
The results for settings 2, 4, 5, 6 and 7 are similar to those presented in Section \ref{sec: results} in the main paper. Our proposed CIs achieve the desired coverage level and the intervals become shorter with a larger $n$ or $\delta$. We mainly highlight three interesting observations and then present other simulation results. 

\noindent {\bf Opposite effect setting.}  In Figure \ref{fig: opposite effect}, we investigate the opposite effect setting, which is setting 6. Note that the maximin effect tends to shrink the opposite effects to zero \citep{meinshausen2015maximin}. For example, in setting 6, $b^{(1)}_{500}$ and $b^{(2)}_{500}$ have opposite signs and the maximin effect is zero for $\delta=0$.  We use the Empirical Rejection Rate (ERR) to denote the proportion of rejecting the null hypothesis out of 500 simulations. In Table \ref{fig: opposite effect}, we observe that ERR is below 5\% for $\delta=0$, which indicate that the corresponding maximin effect is not significant. 
\begin{figure}[H]
\centering
\begin{subfigure}[b]{\textwidth}
    \includegraphics[width=0.9\linewidth]{figures/setting6a.png}
   \caption{setting6(a)}
 
\end{subfigure}
\begin{subfigure}[b]{\textwidth}
    \includegraphics[width=0.9\linewidth]{figures/setting6b.png}
  \caption{setting6(b)}
\end{subfigure}
\caption{setting 6 with opposite effects. ``Coverage" and ``CI Length" stand for the empirical coverage and the average length of our proposed CI, respectively; ``Length Ratio" represents the ratio of the average length of our proposed CI to the normality CI in \eqref{eq: normality CI}; ``ERR" represents the empirical rejection rate out of 500 simulations.}
\label{fig: opposite effect}
\end{figure}
\noindent{\bf Dependence of RMSE on $\delta$ and $n$. }
For settings 1 and 2, the Root Mean Square Error (RMSE) of the point estimator $\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}$ in \eqref{eq: point estimator ridge} is reported in Table \ref{tab: RMSE setting 1}. 


\begin{table}[H]
\centering
\begin{tabular}{|c|ccccc|ccccc|}
  \hline
  &\multicolumn{5}{c}{setting 1}\vline& \multicolumn{5}{c}{setting 2}\vline\\
  \hline
  n& $\delta=0$ & $\delta=0.1$ & $\delta=0.5$ & $\delta=1$ & $\delta=2$ & $\delta=0$ & $\delta=0.1$ & $\delta=0.5$ & $\delta=1$ & $\delta=2$ \\ 
    \hline
    100 & 0.137 & 0.136 & 0.134 & 0.131 & 0.129 & 0.271 & 0.260 & 0.227 & 0.202 & 0.178\\
    \hline
    200 & 0.129 & 0.104 & 0.089 & 0.086 & 0.084 & 0.183 & 0.177 & 0.157 & 0.142 & 0.126\\
    \hline
    300 & 0.125 & 0.088 & 0.072 & 0.069 & 0.068& 0.137 & 0.132 & 0.118 & 0.107 & 0.094\\
    \hline
    500 & 0.120 & 0.077 & 0.058 & 0.056 & 0.056 & 0.108 & 0.104 & 0.093 & 0.084 & 0.074\\
    \hline
\end{tabular}
\caption{Root Mean Square Error of $\widehat{x_{\rm new}^{\intercal}\beta^{*}_{\delta}}$ for settings 1 and 2.}
\label{tab: RMSE setting 1}
\end{table}
For setting 1, the RMSE decreases with an increasing $n$ or a larger $\delta$ value. For $n=300, 500$, the RMSE for $\delta=2$ is round half of that for $\delta=0.$  For setting 2, the decrease of the RMSE with respect to $\delta$ is not as much as that of setting 1, since the weight optimization in setting 2 is much more stable  than that in setting 1. 


\noindent {\bf Higher dimension $p$.} In Figure \ref{fig: setting 2 higher dim}, we have explored our proposed method for a lager $p$ value and our proposed CIs are still valid for $p=1000,2000$ and $3000.$

\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{figures/setting2-varying-p.png}
\caption{Dependence on $\delta$ and $p$: setting 2 (covariate shift) with $n=500$. ``Coverage" and ``CI Length" stand for the empirical coverage and the average length of our proposed CI, respectively; ``Length Ratio" represents the ratio of the average length of our proposed CI to the normality CI in \eqref{eq: normality CI}.}
\label{fig: setting 2 higher dim}
\end{figure}





\noindent{\bf Additional results for settings 3, 4, 5 and 7.} We report the results for setting 3 with $n=200$ in Figure \ref{fig: method comparison n=200}. We report the results for settings 4(a) with $L=2$ and 4(c) with $L=10$ in Figure \ref{fig: setting 4}. We report the results for settings 5 and 7 in Figures \ref{fig: setting 5} and \ref{fig: setting 7}, respectively.

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.9\textwidth}
\centering
    \includegraphics[scale=0.6]{figures/setting3a-Comparison-CS-n200.png}
   \caption{setting 3(a) with covariate shift}
 
\end{subfigure}
\begin{subfigure}[b]{0.9\textwidth}
\centering
    \includegraphics[scale=0.6]{figures/setting3b-Comparison-NoCS-n200.png}
  \caption{setting 3(b) with no covariate shift}
  
\end{subfigure}
\caption{Comparison of covariate shift and no covariate shift algorithms with $n=200$. {``CS Known", ``CS" and ``No CS" represent Algorithm \ref{algo: SAR} with known $\Sigma^{\mathbb{Q}}$,  Algorithm \ref{algo: SAR}  with covariate shift but unknown $\Sigma^{\mathbb{Q}}$, and Algorithm \ref{algo: SAR}  with no covariate shift, respectively.}
 ``Coverage" and ``CI Length" stand for the empirical coverage and the average length of our proposed CI, respectively; ``Length Ratio" represents the ratio of the average length of our proposed CI to the normality CI in \eqref{eq: normality CI}.}
\label{fig: method comparison n=200}
\end{figure}


\begin{figure}[H]
    \centering
     \begin{subfigure}[b]{0.9\textwidth}
     \centering
        \includegraphics[scale=0.6]{figures/setting4-L=2.png}
        \caption{setting 4(a) with $L=2$}
    \end{subfigure}
    \begin{subfigure}[b]{0.9\textwidth}
       \centering
        \includegraphics[scale=0.6]{figures/setting4-L=10.png}
        \caption{setting 4(c) with $L=10$}
    \end{subfigure}
    \caption{Dependence on $\delta$ and $n$. ``Coverage" and ``CI Length" stand for the empirical coverage and the average length of our proposed CI, respectively; ``Length Ratio" represents the ratio of the average length of our proposed CI to the normality CI in \eqref{eq: normality CI}.}
   \label{fig: setting 4}
\end{figure}






\begin{figure}[H]
\centering
\includegraphics[width=0.9\linewidth]{figures/setting5-perturbation.png}
\caption{Dependence on the value ${\rm perb}$ for setting 5 (the perturbation setting). ``Coverage" and ``CI Length" stand for the empirical coverage and the average length of our proposed CI, respectively; ``Length Ratio" represents the ratio of the average length of our proposed CI to the normality CI in \eqref{eq: normality CI}. }
\label{fig: setting 5}
\end{figure}



\begin{figure}[H]
\begin{subfigure}[b]{0.9\textwidth}
\centering
    \includegraphics[width=0.9\linewidth]{figures/setting7a.png}
   \caption{setting7(a)}
 
\end{subfigure}
\begin{subfigure}[b]{0.9\textwidth}
\centering
    \includegraphics[width=0.9\linewidth]{figures/setting7b.png}
  \caption{setting7(b)}
\end{subfigure}
\caption{Dependence on $\delta$ and $n$: setting 7 (covariate shift with L=5).``Coverage" and ``CI Length" stand for the empirical coverage and the average length of our proposed CI, respectively; ``Length Ratio" represents the ratio of the average length of our proposed CI to the normality CI in \eqref{eq: normality CI}. }
\label{fig: setting 7}
\end{figure}






  







\subsection{Comparison of Different Threshold Levels}
\label{sec: thresholding comparison}
Our proposed CI in \eqref{eq: aggregation 1} relies on the index set ${\mathbb{M}}$ in \eqref{eq: generating condition}. As an alternative, we define 
\begin{equation}
{\rm CI}'_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)=\cup_{m\in \mathbb{M}'} {\rm Int}_{\alpha}^{[m]}(x_{\rm new}),
\label{eq: aggregation 2}
\end{equation} 
where $\mathbb{M}'$ is defined in \eqref{eq: generating condition prime}. 
The CI in \eqref{eq: aggregation 2} uses a different index set ${\mathbb{M}}'$ in \eqref{eq: generating condition prime}. Note that both ${\mathbb{M}}$ and ${\mathbb{M}}'$ depend on a pre-specified value $\alpha_0$ with the default value $\alpha_0=0.01.$ Furthermore, we explore the performance of constructed CIs with $\alpha_0=0.05.$ We compare the following CIs,
\begin{enumerate}
\item[(V0)] We do not screen out any sampled data: \begin{equation}
{\rm CI}_{\alpha}\left(x_{\rm new}^{\intercal}\beta^{*}_{\delta}\right)=\cup_{m=1}^{M} {\rm Int}_{\alpha}^{[m]}(x_{\rm new}).
\label{eq: aggregation}
\end{equation}
\item[(V1-1)] CI in \eqref{eq: aggregation 1} where ${\mathbb{M}}$ is defined in \eqref{eq: generating condition} with $\alpha_0=0.01.$
\item[(V1-5)] CI in \eqref{eq: aggregation 1} where ${\mathbb{M}}$ is defined in \eqref{eq: generating condition} with $\alpha_0=0.05.$
\item[(V2-1)] CI in \eqref{eq: aggregation 2} where ${\mathbb{M}}'$ is defined in \eqref{eq: generating condition prime} with $\alpha_0=0.01.$
\item[(V2-5)] CI in \eqref{eq: aggregation 2} where ${\mathbb{M}}'$ is defined in \eqref{eq: generating condition prime} with $\alpha_0=0.05.$
\end{enumerate} 

We compare the above five methods and the normality CI in \eqref{eq: normality CI} over settings 1 and 2. The results for settings 1 and 2 are reported in Tables \ref{tab: setting 1 thresholding} and \ref{tab: setting 2 thresholding}, respectively. We report the empirical coverage and the length ratio for $n\in \{100, 200, 300, 500\}$ and $\delta\in\{0, 0.1, 0.5, 1, 2\},$ where all length ratios are defined as the ratios with respect to the length of the normality CI. For different choices of the index sets, our proposed CIs have a similar performance in terms of both empirical coverage and length ratios. In general, our proposed CIs with the index set ${\mathbb{M}}'$ are slightly shorter than those with the index set ${\mathbb{M}}.$ Furthermore, our proposed CIs get shorter with a larger value of $\alpha_0.$
 

\begin{table}[H]
\centering
\resizebox{\linewidth}{!}{
\begin{tabular}[t]{|c|c|c| c c c c c|c c c c c|}
\hline
\multicolumn{1}{|c|}{ } & \multicolumn{1}{c|}{ } & \multicolumn{6}{c|}{Coverage} & \multicolumn{5}{c|}{Length Ratio} \\
\cline{3-8} \cline{9-13}
$n$ & $\delta$ & normality & V0 & V1-1 & V1-5 & V2-1 & V2-5 & V0 & V1-1 & V1-5 & V2-1 & V2-5\\
\hline
 & 0.0 & 0.948 & 0.980 & 0.980 & 0.980 & 0.978 & 0.974 & 1.189 & 1.188 & 1.188 & 1.186 & 1.176\\
 & 0.1 & 0.932 & 0.962 & 0.962 & 0.962 & 0.962 & 0.958 & 1.231 & 1.230 & 1.228 & 1.224 & 1.208\\
 & 0.5 & 0.920 & 0.944 & 0.942 & 0.940 & 0.928 & 0.920 & 1.275 & 1.270 & 1.257 & 1.244 & 1.196\\
 & 1.0 & 0.920 & 0.902 & 0.898 & 0.896 & 0.892 & 0.878 & 1.159 & 1.148 & 1.128 & 1.118 & 1.057\\
\multirow{-5}{*}{\centering\arraybackslash 100} & 2.0 & 0.918 & 0.838 & 0.836 & 0.832 & 0.830 & 0.824 & 0.931 & 0.924 & 0.912 & 0.905 & 0.876\\
\cline{1-13}
 & 0.0 & 0.914 & 0.980 & 0.980 & 0.980 & 0.980 & 0.980 & 1.248 & 1.248 & 1.248 & 1.248 & 1.245\\
 & 0.1 & 0.946 & 0.996 & 0.996 & 0.996 & 0.996 & 0.996 & 1.345 & 1.345 & 1.344 & 1.343 & 1.336\\
 & 0.5 & 0.942 & 0.986 & 0.986 & 0.984 & 0.986 & 0.982 & 1.511 & 1.501 & 1.480 & 1.463 & 1.388\\
 & 1.0 & 0.928 & 0.960 & 0.960 & 0.952 & 0.950 & 0.942 & 1.273 & 1.260 & 1.237 & 1.216 & 1.152\\
\multirow{-5}{*}{\centering\arraybackslash 200} & 2.0 & 0.926 & 0.926 & 0.924 & 0.924 & 0.920 & 0.914 & 1.019 & 1.013 & 1.002 & 0.997 & 0.970\\
\cline{1-13}
 & 0.0 & 0.886 & 0.972 & 0.972 & 0.972 & 0.972 & 0.970 & 1.259 & 1.259 & 1.259 & 1.259 & 1.258\\
 & 0.1 & 0.946 & 1.000 & 1.000 & 1.000 & 1.000 & 1.000 & 1.416 & 1.416 & 1.415 & 1.414 & 1.410\\
 & 0.5 & 0.948 & 0.996 & 0.996 & 0.994 & 0.994 & 0.988 & 1.600 & 1.592 & 1.570 & 1.555 & 1.458\\
 & 1.0 & 0.942 & 0.968 & 0.968 & 0.968 & 0.964 & 0.958 & 1.280 & 1.270 & 1.249 & 1.233 & 1.167\\
\multirow{-5}{*}{\centering\arraybackslash 300} & 2.0 & 0.938 & 0.940 & 0.940 & 0.940 & 0.938 & 0.934 & 1.042 & 1.038 & 1.029 & 1.025 & 0.999\\
\cline{1-13}
 & 0.0 & 0.860 & 0.966 & 0.966 & 0.966 & 0.966 & 0.966 & 1.294 & 1.294 & 1.294 & 1.294 & 1.293\\
 & 0.1 & 0.934 & 0.998 & 0.998 & 0.998 & 0.998 & 0.998 & 1.528 & 1.528 & 1.528 & 1.527 & 1.521\\
 & 0.5 & 0.958 & 0.996 & 0.996 & 0.996 & 0.996 & 0.996 & 1.723 & 1.709 & 1.678 & 1.655 & 1.541\\
 & 1.0 & 0.962 & 0.984 & 0.984 & 0.984 & 0.982 & 0.980 & 1.297 & 1.287 & 1.266 & 1.256 & 1.201\\
\multirow{-5}{*}{\centering\arraybackslash 500} & 2.0 & 0.962 & 0.974 & 0.974 & 0.974 & 0.974 & 0.972 & 1.074 & 1.070 & 1.061 & 1.058 & 1.036\\
\hline
\end{tabular}}
\caption{Comparison of our proposed CIs with different index sets for setting 1.}
\label{tab: setting 1 thresholding}
\end{table}
\begin{table}[H]
\centering
\resizebox{\linewidth}{!}{
\begin{tabular}[t]{|c|c|c| c c c c c|c c c c c|}
\hline
\multicolumn{1}{|c|}{ } & \multicolumn{1}{c|}{ } & \multicolumn{6}{c|}{Coverage} & \multicolumn{5}{c|}{Length Ratio} \\
\cline{3-8} \cline{9-13}
$n$ & $\delta$ & normality & V0 & V1-1 & V1-5 & V2-1 & V2-5 & V0 & V1-1 & V1-5 & V2-1 & V2-5\\
\hline
 & 0.0 & 0.910 & 0.928 & 0.920 & 0.904 & 0.910 & 0.890 & 1.194 & 1.165 & 1.114 & 1.124 & 1.032\\
 & 0.1 & 0.908 & 0.930 & 0.922 & 0.906 & 0.914 & 0.892 & 1.200 & 1.171 & 1.120 & 1.132 & 1.037\\
 & 0.5 & 0.912 & 0.922 & 0.918 & 0.904 & 0.914 & 0.890 & 1.195 & 1.165 & 1.114 & 1.132 & 1.041\\
 & 1.0 & 0.920 & 0.922 & 0.914 & 0.898 & 0.906 & 0.880 & 1.150 & 1.122 & 1.075 & 1.094 & 1.014\\
\multirow{-5}{*}{\centering\arraybackslash 100} & 2.0 & 0.930 & 0.906 & 0.902 & 0.894 & 0.898 & 0.884 & 1.054 & 1.031 & 0.995 & 1.011 & 0.951\\
\cline{1-13}
 & 0.0 & 0.906 & 0.976 & 0.972 & 0.966 & 0.972 & 0.956 & 1.554 & 1.503 & 1.433 & 1.452 & 1.318\\
 & 0.1 & 0.904 & 0.976 & 0.972 & 0.966 & 0.972 & 0.958 & 1.546 & 1.495 & 1.425 & 1.444 & 1.313\\
 & 0.5 & 0.902 & 0.976 & 0.972 & 0.968 & 0.972 & 0.960 & 1.494 & 1.447 & 1.382 & 1.404 & 1.289\\
 & 1.0 & 0.902 & 0.970 & 0.968 & 0.962 & 0.968 & 0.960 & 1.435 & 1.394 & 1.335 & 1.358 & 1.259\\
\multirow{-5}{*}{\centering\arraybackslash 200} & 2.0 & 0.912 & 0.974 & 0.968 & 0.958 & 0.966 & 0.950 & 1.335 & 1.302 & 1.253 & 1.275 & 1.196\\
\cline{1-13}
 & 0.0 & 0.898 & 0.994 & 0.990 & 0.990 & 0.992 & 0.982 & 1.786 & 1.733 & 1.645 & 1.667 & 1.520\\
 & 0.1 & 0.900 & 0.996 & 0.990 & 0.990 & 0.992 & 0.982 & 1.774 & 1.723 & 1.636 & 1.659 & 1.516\\
 & 0.5 & 0.910 & 0.996 & 0.992 & 0.992 & 0.994 & 0.984 & 1.729 & 1.682 & 1.603 & 1.628 & 1.500\\
 & 1.0 & 0.910 & 0.994 & 0.992 & 0.990 & 0.990 & 0.984 & 1.675 & 1.632 & 1.562 & 1.586 & 1.473\\
\multirow{-5}{*}{\centering\arraybackslash 300} & 2.0 & 0.914 & 0.988 & 0.988 & 0.986 & 0.988 & 0.980 & 1.569 & 1.534 & 1.476 & 1.498 & 1.407\\
\cline{1-13}
 & 0.0 & 0.916 & 0.992 & 0.992 & 0.990 & 0.992 & 0.990 & 1.809 & 1.767 & 1.686 & 1.706 & 1.564\\
 & 0.1 & 0.916 & 0.992 & 0.992 & 0.990 & 0.992 & 0.990 & 1.804 & 1.762 & 1.683 & 1.704 & 1.566\\
 & 0.5 & 0.920 & 0.994 & 0.994 & 0.992 & 0.992 & 0.992 & 1.785 & 1.746 & 1.672 & 1.694 & 1.568\\
 & 1.0 & 0.918 & 0.994 & 0.994 & 0.994 & 0.994 & 0.992 & 1.757 & 1.721 & 1.653 & 1.676 & 1.561\\
\multirow{-5}{*}{\centering\arraybackslash 500} & 2.0 & 0.916 & 0.992 & 0.992 & 0.992 & 0.992 & 0.992 & 1.688 & 1.658 & 1.600 & 1.621 & 1.525\\
\hline
\end{tabular}}
\caption{Comparison of our proposed CIs with different index sets for setting 2.}
\label{tab: setting 2 thresholding}
\end{table}


\subsection{Sample Splitting Comparison}
\label{sec: sample splitting}
We compare the algorithm with and without sample splitting and report the results in Table \ref{tab: splitting comparison}. For the sample splitting algorithm, we split the samples into two equal size sub-samples. For $n=100,$ no sample splitting algorithm is slightly under-coverage (the empirical coverage level is still above 90\%). When $n\geq 200,$ both the algorithm with and without sample splitting achieve the desired coverage levels. As expected, the CIs with sample splitting are longer than those without sample splitting. In Table \ref{tab: splitting comparison}, under the column indexed with ``Length ratio", we report the ratio of the average length of CI with sample splitting to that without sample splitting.

\begin{table}[H]
\centering
\begin{tabular}[t]{|c|c|c c|c c|c|}
\hline
\multicolumn{1}{|c|}{ } & \multicolumn{1}{c|}{ } & \multicolumn{2}{c|}{Coverage} & \multicolumn{2}{c|}{Length} & \multicolumn{1}{c|}{} \\
\hline
$\delta$ & $n$ & Splitting & No Splitting & Splitting & No Splitting & Length ratio\\
\hline
 & 100 & 0.978 & 0.920 & 1.921 & 1.062 & 1.809\\
\cline{2-7}
 & 200 & 0.994 & 0.972 & 1.618 & 0.898 & 1.802\\
\cline{2-7}
 & 300 & 0.994 & 0.990 & 1.336 & 0.789 & 1.693\\
\cline{2-7}
\multirow{-4}{*}{\centering\arraybackslash 0.0} & 500 & 1.000 & 0.992 & 0.999 & 0.651 & 1.534\\
\cline{1-7}
 & 100 & 0.980 & 0.922 & 1.904 & 1.023 & 1.861\\
\cline{2-7}
 & 200 & 0.994 & 0.972 & 1.567 & 0.863 & 1.816\\
\cline{2-7}
 & 300 & 0.994 & 0.990 & 1.286 & 0.759 & 1.695\\
\cline{2-7}
\multirow{-4}{*}{\centering\arraybackslash 0.1} & 500 & 1.000 & 0.992 & 0.952 & 0.629 & 1.514\\
\cline{1-7}
 & 100 & 0.982 & 0.918 & 1.814 & 0.890 & 2.038\\
\cline{2-7}
 & 200 & 0.996 & 0.972 & 1.373 & 0.748 & 1.836\\
\cline{2-7}
 & 300 & 0.996 & 0.992 & 1.099 & 0.666 & 1.651\\
\cline{2-7}
\multirow{-4}{*}{\centering\arraybackslash 0.5} & 500 & 1.000 & 0.994 & 0.800 & 0.559 & 1.433\\
\cline{1-7}
 & 100 & 0.986 & 0.914 & 1.639 & 0.769 & 2.131\\
\cline{2-7}
 & 200 & 0.998 & 0.968 & 1.155 & 0.655 & 1.764\\
\cline{2-7}
 & 300 & 0.996 & 0.992 & 0.911 & 0.589 & 1.546\\
\cline{2-7}
\multirow{-4}{*}{\centering\arraybackslash 1.0} & 500 & 1.000 & 0.994 & 0.681 & 0.499 & 1.364\\
\cline{1-7}
 & 100 & 0.986 & 0.902 & 1.291 & 0.630 & 2.049\\
\cline{2-7}
 & 200 & 0.996 & 0.968 & 0.871 & 0.549 & 1.587\\
\cline{2-7}
 & 300 & 0.998 & 0.988 & 0.706 & 0.499 & 1.415\\
\cline{2-7}
\multirow{-4}{*}{\centering\arraybackslash 2.0} & 500 & 0.998 & 0.992 & 0.549 & 0.426 & 1.290\\
\hline
\end{tabular}
\caption{Comparison of algorithm with/without sample-splitting in setting 2 with $p=500.$}
\label{tab: splitting comparison}
\end{table}












