SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\begin{array}{l} \left(\hat {\sigma} ^ {(n, m)}\right) ^ {2} - \operatorname {V a r} _ {P ^ {(m)}} \left[ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} \right] = \\ = \frac {1}{n} \sum_ {i = 1} ^ {n} \left[ (T _ {i} ^ {(m)}) ^ {2} - \mathbb {E} _ {P ^ {(m)}} [ (T _ {1} ^ {(m)}) ^ {2} \mid \mathcal {D} _ {t r} ^ {(m)} ] \right] - \left(\frac {1}{n} \sum_ {i = 1} ^ {n} T _ {i} ^ {(m)} - \mathbb {E} _ {P ^ {(m)}} [ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} ]\right) ^ {2} \\ - 2 \mathbb {E} _ {P ^ {(m)}} \left[ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} \right] \left(\frac {1}{n} \sum_ {i = 1} ^ {n} T _ {i} ^ {(m)} - \mathbb {E} _ {P ^ {(m)}} \left[ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} \right]\right) \\ \end{array}
$$
Using a law of large numbers for triangular arrays [6, Corollary 9.5.6] (we comment on needed conditions to use this result below) and the continuous mapping theorem, we have that
$\frac{1}{n}\sum_{i = 1}^{n}\left[(T_i^{(m)})^2 -\mathbb{E}_{P^{(m)}}[(T_1^{(m)})^2\mid \mathcal{D}_{tr}^{(m)}]\right] = o_p(1)$
-  $\left(\frac{1}{n}\sum_{i = 1}^{n}T_{i}^{(m)} - \mathbb{E}_{P^{(m)}}[T_{1}^{(m)}\mid \mathcal{D}_{tr}^{(m)}]\right)^{2} = o_{p}(1)$
$\begin{array}{r}\bullet \underbrace{2\mathbb{E}_{P^{(m)}}[T_1^{(m)}\mid\mathcal{D}_{tr}^{(m)}]}_{\mathcal{O}_p(1)(\mathrm{Assumption~3.2})}\Big(\frac{1}{n}\sum_{i = 1}^n T_i^{(m)} - \mathbb{E}_{P^{(m)}}[T_1^{(m)}\mid \mathcal{D}_{tr}^{(m)}]\Big) = o_p(1) \end{array}$
16Because of the definition of sup.
$$
\sup  _ {P \in \mathcal {P}} \mathbb {P} _ {P} \left[ \left| (\hat {\sigma} ^ {(n, m)}) ^ {2} - \mathsf {V a r} _ {P} [ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} ] \right| > \varepsilon \right] \leq \mathbb {P} _ {P ^ {(m)}} \left[ \left| (\hat {\sigma} ^ {(n, m)}) ^ {2} - \mathsf {V a r} _ {P ^ {(m)}} [ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} ] \right| > \varepsilon \right] + \frac {1}{m} \to 0
$$
as  $m\to \infty$  ,i.e.,
$$
(\hat {\sigma} ^ {(n, m)}) ^ {2} - \mathsf {V a r} _ {P} [ T _ {1} ^ {(m)} | \mathcal {D} _ {t r} ^ {(m)} ] = o _ {\mathcal {P}} (1) \mathrm {a s} m \to \infty
$$
Conditions to use the law of large numbers. Let  $(P^{(m)})_{m\in \mathbb{N}}$  be an arbitrary sequence of probability measures in  $\mathcal{P}$ . Define our triangular arrays as  $\left\{V_{i,1}^{(m)}\right\}_{1\leq i\leq n}$  and  $\left\{V_{i,2}^{(m)}\right\}_{1\leq i\leq n}$ , where  $V_{i,1}^{(m)} \triangleq T_i^{(m)} - \mathbb{E}_{P^{(m)}}[T_1^{(m)}|\mathcal{D}_{tr}^{(m)}]$  and  $V_{i,2}^{(m)} \triangleq (T_i^{(m)})^2 - \mathbb{E}_{P^{(m)}}[(T_1^{(m)})^2|\mathcal{D}_{tr}^{(m)}]$ . Now, we comment on the conditions for the law of large numbers [6, Corollary 9.5.6]:
1. This condition naturally applies by definition and because of Assumption 3.2.
2. From Assumption 3.2 and Resnick [27, Example 6.5.2],
$$
\mathbb {E} _ {P ^ {(m)}} \left[ \left| V _ {i, 1} ^ {(m)} \right| \mid \mathcal {D} _ {t r} ^ {(m)} \right] \leq \mathbb {E} _ {P ^ {(m)}} \left[ \left| T _ {i} ^ {(m)} \right| \mid \mathcal {D} _ {t r} ^ {(m)} \right] + \left| \mathbb {E} _ {P ^ {(m)}} [ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} ] \right| \leq 2 \mathbb {E} _ {P ^ {(m)}} \left[ \left| T _ {i} ^ {(m)} \right| \mid \mathcal {D} _ {t r} ^ {(m)} \right] = \mathcal {O} _ {p} (1)
$$
$$
\mathbb {E} _ {P ^ {(m)}} \left[ \left| V _ {i, 2} ^ {(m)} \right| \mid \mathcal {D} _ {t r} ^ {(m)} \right] \leq 2 \mathbb {E} _ {P ^ {(m)}} \left[ \left(T _ {i} ^ {(m)}\right) ^ {2} \mid \mathcal {D} _ {t r} ^ {(m)} \right] = \mathcal {O} _ {p} (1)
$$
3. Fix any  $\epsilon > 0$  and let  $k$  be defined as in Assumption 3.2. See that
$$
\begin{array}{l} \mathbb {E} _ {P ^ {(m)}} \left[ \left| V _ {i, 1} ^ {(m)} \right| \mathbb {1} [ | V _ {i, 1} ^ {(m)} | \geq \epsilon n ] \mid \mathcal {D} _ {t r} ^ {(m)} \right] = \mathbb {E} _ {P ^ {(m)}} \left[ \left| V _ {i, 1} ^ {(m)} \right| \mathbb {1} [ (| V _ {i, 1} ^ {(m)} | / (\epsilon n)) ^ {k} \geq 1 ] \mid \mathcal {D} _ {t r} ^ {(m)} \right] \\ \leq \frac {1}{(n \epsilon) ^ {k}} \mathbb {E} _ {P ^ {(m)}} \left[ \left| V _ {i, 1} ^ {(m)} \right| ^ {1 + k} \mid \mathcal {D} _ {t r} ^ {(m)} \right] \\ = \frac {1}{(n \epsilon) ^ {k}} \mathbb {E} _ {P ^ {(m)}} \left[ | T _ {i} ^ {(m)} - \mathbb {E} _ {P ^ {(m)}} \left[ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} \right] | ^ {1 + k} \mid \mathcal {D} _ {t r} ^ {(m)} \right] \\ \leq \frac {1}{(n \epsilon) ^ {k}} \left\{\mathbb {E} _ {P ^ {(m)}} \left[ | T _ {i} ^ {(m)} | ^ {1 + k} \mid \mathcal {D} _ {t r} ^ {(m)} \right] ^ {\frac {1}{1 + k}} + \mathbb {E} _ {P ^ {(m)}} \left[ | T _ {i} ^ {(m)} | \mid \mathcal {D} _ {t r} ^ {(m)} \right] \right\} ^ {1 + k} \\ = \frac {1}{(n \epsilon) ^ {k}} \mathcal {O} _ {p} (1) \\ = o _ {p} (1) \\ \end{array}
$$
where the third inequality is obtained via Minkowski Inequality [27] and the fifth step is an application of Assumption 3.2 and Resnick [27, Example 6.5.2]. Analogously, define  $k' = k/2$  and see that
$$
\begin{array}{l} \mathbb {E} _ {P ^ {(m)}} \left[ \left| V _ {i, 2} ^ {(m)} \right| \mathbb {1} [ | V _ {i, 2} ^ {(m)} | \geq \epsilon n ] \mid \mathcal {D} _ {t r} ^ {(m)} \right] = \mathbb {E} _ {P ^ {(m)}} \left[ \left| V _ {i, 2} ^ {(m)} \right| \mathbb {1} [ (| V _ {i, 2} ^ {(m)} | / (\epsilon n)) ^ {k ^ {\prime}} \geq 1 ] \mid \mathcal {D} _ {t r} ^ {(m)} \right] \\ \leq \frac {1}{(n \epsilon) ^ {k ^ {\prime}}} \mathbb {E} _ {P ^ {(m)}} \left[ | V _ {i, 2} ^ {(m)} | ^ {1 + k ^ {\prime}} \mid \mathcal {D} _ {t r} ^ {(m)} \right] \\ = \frac {1}{(n \epsilon) ^ {k ^ {\prime}}} \mathbb {E} _ {P ^ {(m)}} \left[ | (T _ {i} ^ {(m)}) ^ {2} - \mathbb {E} _ {P ^ {(m)}} [ (T _ {1} ^ {(m)}) ^ {2} \mid \mathcal {D} _ {t r} ^ {(m)} ] | ^ {1 + k ^ {\prime}} \mid \mathcal {D} _ {t r} ^ {(m)} \right] \\ \leq \frac {1}{(n \epsilon) ^ {k ^ {\prime}}} \left\{\mathbb {E} _ {P ^ {(m)}} \left[ (T _ {i} ^ {(m)}) ^ {2 (1 + k ^ {\prime})} \mid \mathcal {D} _ {t r} ^ {(m)} \right] ^ {\frac {1}{1 + k ^ {\prime}}} + \mathbb {E} _ {P ^ {(m)}} \left[ (T _ {i} ^ {(m)}) ^ {2} \mid \mathcal {D} _ {t r} ^ {(m)} \right] \right\} ^ {1 + k ^ {\prime}} \\ = \frac {1}{(n \epsilon) ^ {k ^ {\prime}}} \left\{\mathbb {E} _ {P ^ {(m)}} \left[ (T _ {i} ^ {(m)}) ^ {2 + k} \mid \mathcal {D} _ {t r} ^ {(m)} \right] ^ {\frac {1}{1 + k ^ {\prime}}} + \mathbb {E} _ {P ^ {(m)}} \left[ (T _ {i} ^ {(m)}) ^ {2} \mid \mathcal {D} _ {t r} ^ {(m)} \right] \right\} ^ {1 + k ^ {\prime}} \\ = \frac {1}{(n \epsilon) ^ {k ^ {\prime}}} \mathcal {O} _ {p} (1) \\ = o _ {p} (1) \\ \end{array}
$$
$$
\mathbb {E} _ {P} [ \varphi_ {\alpha} ^ {\mathrm {S T F R}} (\mathcal {D} _ {t e} ^ {(n)}, \mathcal {D} _ {t r} ^ {(m)}) ] = 1 - \Phi \left(\tau_ {\alpha} - \sqrt {\frac {n}{\sigma_ {P} ^ {2}}} \Omega_ {P} ^ {\mathrm {S T F R}}\right) + o (1)
$$
Proof. First, note that there must be  $17$  a sequence of probability measures in  $\mathcal{P}$ ,  $(P^{(m)})_{m\in \mathbb{N}}$ , such that
$$
\sup  _ {P \in \mathcal {P}} \left| \mathbb {E} _ {P} \left[ \varphi_ {\alpha} ^ {\mathrm {S T F R}} \left(\mathcal {D} _ {t e} ^ {(n)}, \mathcal {D} _ {t r} ^ {(m)}\right) \right] - 1 + \Phi \left(\tau_ {\alpha} - \sqrt {\frac {n}{\sigma_ {P} ^ {2}}} \Omega_ {P} ^ {\mathrm {S T F R}}\right) \right| \leq \left| \mathbb {E} _ {P ^ {(m)}} \left[ \varphi_ {\alpha} ^ {\mathrm {S T F R}} \left(\mathcal {D} _ {t e} ^ {(n)}, \mathcal {D} _ {t r} ^ {(m)}\right) \right] - 1 + \Phi \left(\tau_ {\alpha} - \sqrt {\frac {n}{\sigma_ {P ^ {(m)}} ^ {2}}} \Omega_ {P ^ {(m)}} ^ {\mathrm {S T F R}}\right) \right| + \frac {1}{m}
$$
Then, it suffices to show that the RHS vanishes when we consider such a sequence  $(P^{(m)})_{m\in \mathbb{N}}$
Now, let us first decompose the test statistic  $\Lambda^{(n,m)}$  in the following way:
$$
\begin{array}{l} \Lambda^ {(n, m)} \triangleq \\ \triangleq \frac {\sqrt {n} \bar {T} ^ {(n , m)}}{\hat {\sigma} ^ {(n , m)}} \\ = \frac {\sqrt {n} \left(\bar {T} ^ {(n , m)} - \mathbb {E} _ {P ^ {(m)}} \left[ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} \right]\right)}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} \mathbb {E} _ {P ^ {(m)}} \left[ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} \right]}{\hat {\sigma} ^ {(n , m)}} \\ = \frac {\sqrt {n} \left(\bar {T} ^ {(n , m)} - \mathbb {E} _ {P ^ {(m)}} \left[ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} \right]\right)}{\hat {\sigma} ^ {(n , m)}} + \\ + \frac {\sqrt {n} \Big (\mathbb {E} _ {P ^ {(m)}} [ \ell (\hat {g} _ {2} ^ {(m)} (Z _ {1}) , Y _ {1}) - \ell (g _ {2 , P ^ {(m)}} ^ {*} (Z _ {1}) , Y _ {1}) \mid \mathcal {D} _ {t r} ^ {(m)} ] - \big (\mathbb {E} _ {P ^ {(m)}} [ \ell (\hat {g} _ {1} ^ {(m)} (X _ {1} , Z _ {1}) , Y _ {1}) - \ell (g _ {1 , P ^ {(m)}} ^ {*} (X _ {1} , Z _ {1}) , Y _ {1}) \mid \mathcal {D} _ {t r} ^ {(m)} ] \big) \Big)}{\hat {\sigma} ^ {(n , m)}} \\ + \frac {\sqrt {n} \left(\mathbb {E} _ {P ^ {(m)}} \left[ \ell \left(g _ {2 , P ^ {(m)}} ^ {*} (Z _ {1}) , Y _ {1}\right) \right] - \mathbb {E} _ {P ^ {(m)}} \left[ \ell \left(g _ {1 , P ^ {(m)}} ^ {*} (X _ {1} , Z _ {1}), Y _ {1}\right) \right]\right)}{\hat {\sigma} ^ {(n , m)}} \\ = \frac {\sqrt {n} W _ {1 , P ^ {(m)}} ^ {(m)}}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} W _ {2 , P ^ {(m)}} ^ {(m)}}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} \Omega_ {P ^ {(m)}} ^ {\mathrm {S T F R}}}{\hat {\sigma} ^ {(n , m)}} \\ \end{array}
$$
Given that  $n$  is a function of  $m$ , we omit it when writing the  $W_{j,P(m)}^{(m)}$ 's. Define  $\sigma_{P(m)}^{(m)} \triangleq \sqrt{\operatorname{Var}_{P(m)}[T_1^{(m)} \mid \mathcal{D}_{tr}^{(m)}]}$  and see that
$$
\begin{array}{l} \mathbb {E} _ {P ^ {(m)}} \left[ \varphi_ {\alpha} ^ {\text {S T F R}} \left(\mathcal {D} _ {t e} ^ {(n)}, \mathcal {D} _ {t r} ^ {(m)}\right) \right] = \mathbb {P} _ {P ^ {(m)}} \left[ p \left(\mathcal {D} _ {t e} ^ {(n)}, \mathcal {D} _ {t r} ^ {(m)}\right) \leq \alpha \right] \\ = \mathbb {P} _ {P ^ {(m)}} \left[ 1 - \Phi \left(\Lambda^ {(n, m)}\right) \leq \alpha \right] \\ = \mathbb {P} _ {P ^ {(m)}} \left[ \Lambda^ {(n, m)} \geq \tau_ {\alpha} \right] \\ = \mathbb {P} _ {P ^ {(m)}} \left[ \frac {\sqrt {n} W _ {1 , P ^ {(m)}} ^ {(m)}}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} W _ {2 , P ^ {(m)}} ^ {(m)}}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} \Omega_ {P ^ {(m)}} ^ {\mathrm {S T F R}}}{\hat {\sigma} ^ {(n , m)}} \geq \tau_ {\alpha} \right] \\ = \mathbb {P} _ {P ^ {(m)}} \left[ \frac {\sqrt {n} W _ {1 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} + \frac {\sqrt {n} W _ {2 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} + \frac {\sqrt {n} \Omega_ {P ^ {(m)}} ^ {\mathrm {S T F R}}}{\sigma_ {P ^ {(m)}}} + \tau_ {\alpha} - \tau_ {\alpha} \frac {\hat {\sigma} ^ {(n , m)}}{\sigma_ {P ^ {(m)}}} \geq \tau_ {\alpha} \right] \\ = \mathbb {P} _ {P ^ {(m)}} \left[ \frac {\sqrt {n} W _ {1 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} \frac {\sigma_ {P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} + \frac {\sqrt {n} W _ {2 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} + \tau_ {\alpha} - \tau_ {\alpha} \frac {\hat {\sigma} ^ {(n , m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} \frac {\sigma_ {P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} \geq \tau_ {\alpha} - \frac {\sqrt {n} \Omega_ {P ^ {(m)}} ^ {\mathrm {S T F R}}}{\sigma_ {P ^ {(m)}}} \right] \\ = 1 - \Phi \left(\tau_ {\alpha} - \sqrt {\frac {n}{\sigma_ {P ^ {(m)}} ^ {2}}} \Omega_ {P ^ {(m)}} ^ {\mathrm {S T F R}}\right) + o (1) \tag {B.1} \\ \end{array}
$$
17Because of the definition of sup.
Implying that
$$
\sup  _ {P \in \mathcal {P}} \left| \mathbb {E} _ {P} \left[ \varphi_ {\alpha} ^ {\text {S T F R}} \left(\mathcal {D} _ {t e} ^ {(n)}, \mathcal {D} _ {t r} ^ {(m)}\right)\right] - 1 + \Phi \left(\tau_ {\alpha} - \sqrt {\frac {n}{\sigma_ {P} ^ {2}}} \Omega_ {P} ^ {\text {S T F R}}\right)\right| = o (1) \text {a s} m \rightarrow \infty
$$
Justifying step B.1. First, from a central limit theorem for triangular arrays [6, Corollary 9.5.11], we have that
$$
\sqrt {n} \left(\frac {W _ {1 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}}\right) = \sqrt {n} \left(\frac {\bar {T} ^ {(n , m)} - \mathbb {E} _ {P ^ {(m)}} [ T _ {1} ^ {(m)} | \mathcal {D} _ {t r} ^ {(m)} ]}{\sigma_ {P ^ {(m)}} ^ {(m)}}\right) = \frac {1}{\sqrt {n}} \sum_ {i = 1} ^ {n} \left(\frac {T _ {i} ^ {(m)} - \mathbb {E} _ {P ^ {(m)}} [ T _ {1} ^ {(m)} | \mathcal {D} _ {t r} ^ {(m)} ]}{\sigma_ {P ^ {(m)}} ^ {(m)}}\right) \Rightarrow N (0, 1)
$$
we comment on the conditions to use this theorem below.
Second, we have that
$$
\begin{array}{l} \frac {\sqrt {n} W _ {1 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} - \left(\frac {\sqrt {n} W _ {1 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} \frac {\sigma_ {P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} + \frac {\sqrt {n} W _ {2 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} + \tau_ {\alpha} - \tau_ {\alpha} \frac {\hat {\sigma} ^ {(n , m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} \frac {\sigma_ {P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}}\right) = \\ = \frac {\sqrt {n} W _ {1 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} \left(1 - \frac {\sigma_ {P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}}\right) - \frac {\sqrt {n} W _ {2 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} + \tau_ {\alpha} \left(\frac {\hat {\sigma} ^ {(n , m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} - 1\right) \left(\frac {\sigma_ {P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} - 1\right) + \tau_ {\alpha} \left(\frac {\sigma_ {P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} - 1\right) + \tau_ {\alpha} \left(\frac {\hat {\sigma} ^ {(n , m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} - 1\right) \\ = o _ {p} (1) \text {a s} m \rightarrow \infty \\ \end{array}
$$
To see why the random quantity above converges to zero in probability, see that because of Assumption 3.3, Lemma B.1, and continuous mapping theorem, we have that
$$
\frac {\hat {\sigma} ^ {(n , m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} - 1 = o _ {p} (1) \text {a n d} \frac {\sigma_ {P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} - 1 = o _ {p} (1) \text {a s} m \rightarrow \infty
$$
Additionally, because of Assumptions 3.1, 3.3 and condition  $n = o(m^{2\gamma})$ , we have that
$$
\left| \frac {\sqrt {n} W _ {2 , P (m)} ^ {(m)}}{\sigma_ {P ^ {(m)}}} \right| = \left| \frac {o (m ^ {\gamma}) \mathcal {O} _ {p} (m ^ {- \gamma})}{\sigma_ {P ^ {(m)}}} \right| \leq \left| \frac {o (m ^ {\gamma}) \mathcal {O} _ {p} (m ^ {- \gamma})}{\inf  _ {P \in \mathcal {P}} \sigma_ {P}} \right| = o _ {p} (1)
$$
$$
\begin{array}{l} \frac {\sqrt {n} W _ {1 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} \frac {\sigma_ {P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} + \frac {\sqrt {n} W _ {2 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} + \tau_ {\alpha} - \tau_ {\alpha} \frac {\hat {\sigma} ^ {(n , m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} \frac {\sigma_ {P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}}} = \\ = \frac {\sqrt {n} W _ {1 , P (m)} ^ {(m)}}{\sigma_ {P (m)} ^ {(m)}} - \left[ \frac {\sqrt {n} W _ {1 , P (m)} ^ {(m)}}{\sigma_ {P (m)} ^ {(m)}} - \left(\frac {\sqrt {n} W _ {1 , P (m)} ^ {(m)}}{\sigma_ {P (m)} ^ {(m)}} \frac {\sigma_ {P (m)} ^ {(m)}}{\sigma_ {P (m)}} + \frac {\sqrt {n} W _ {2 , P (m)} ^ {(m)}}{\sigma_ {P (m)}} + \tau_ {\alpha} - \tau_ {\alpha} \frac {\hat {\sigma} ^ {(n , m)}}{\sigma_ {P (m)} ^ {(m)}} \frac {\sigma_ {P (m)} ^ {(m)}}{\sigma_ {P (m)}}\right) \right] \\ = \frac {\sqrt {n} W _ {1 , P ^ {(m)}} ^ {(m)}}{\sigma_ {P ^ {(m)}} ^ {(m)}} + o _ {p} (1) \Rightarrow N (0, 1) \\ \end{array}
$$
by Slutsky's theorem. Because  $N(0,1)$  is a continuous distribution, we have uniform convergence of the distribution function [27][Chapter 8, Exercise 5] and we do not have to worry about the fact that  $\tau_{\alpha} - \frac{\sqrt{n}\Omega_{P(m)}^{\mathrm{STFR}}}{\sigma_{P(m)}}$  depends on  $m$ .
Conditions to apply the central limit theorem. Now, we comment on the conditions for the central limit theorem [6, Corollary 9.5.11]. Define our triangular array as  $\left\{V_{i}^{(m)}\right\}_{1\leq i\leq n}$ , where  $V_{i}^{(m)}\triangleq$
$$
\frac {T _ {i} ^ {(m)} - \mathbb {E} _ {P (m)} [ T _ {i} ^ {(m)} | \mathcal {D} _ {t r} ^ {(m)} ]}{\sigma_ {P (m)} ^ {(m)}}.
$$
1. This condition naturally applies by definition and because of Assumption 3.2.
2. See that, for any  $m$ , we have that
$$
\mathbb {E} _ {P ^ {(m)}} \big [ \big (V _ {i} ^ {(m)} \big) ^ {2} \mid \mathcal {D} _ {t r} ^ {(m)} \big ] = 1
$$
$$
\begin{array}{l} \mathbb {E} _ {P ^ {(m)}} \left[ \left(V _ {i} ^ {(m)}\right) ^ {2} \mathbb {1} [ | V _ {i} ^ {(m)} | \geq \epsilon n ] \mid \mathcal {D} _ {t r} ^ {(m)} \right] = \\ = \mathbb {E} _ {P ^ {(m)}} \left[ \left(V _ {i} ^ {(m)}\right) ^ {2} \mathbb {1} \left[ \left(\left| V _ {i} ^ {(m)} \right| / (\epsilon n)\right) ^ {k} \geq 1 \right] \mid \mathcal {D} _ {t r} ^ {(m)} \right] \\ \leq \frac {1}{(n \epsilon) ^ {k}} \mathbb {E} _ {P ^ {(m)}} \left[ | V _ {i} ^ {(m)} | ^ {2 + k} \mid \mathcal {D} _ {t r} ^ {(m)} \right] \\ = \frac {1}{(n \epsilon) ^ {k}} \mathbb {E} _ {P ^ {(m)}} \left[ \left| \frac {T _ {i} ^ {(m)} - \mathbb {E} _ {P ^ {(m)}} \left[ T _ {i} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} \right]}{\sigma_ {P ^ {(m)}} ^ {(m)}} \right| ^ {2 + k} \mid \mathcal {D} _ {t r} ^ {(m)} \right] \\ \leq \frac {1}{(n \epsilon) ^ {k}} \frac {1}{(\sigma_ {P (m)} ^ {(m)}) ^ {2 + k}} \left\{\mathbb {E} _ {P ^ {(m)}} \left[ | T _ {i} ^ {(m)} | ^ {2 + k} \mid \mathcal {D} _ {t r} ^ {(m)} \right] ^ {\frac {1}{2 + k}} + \mathbb {E} _ {P ^ {(m)}} \left[ | T _ {i} ^ {(m)} | \mid \mathcal {D} _ {t r} ^ {(m)} \right] \right\} ^ {2 + k} \\ = \frac {1}{(n \epsilon) ^ {k}} \left[ \frac {1}{\left(\sigma_ {P ^ {(m)}}\right) ^ {2 + k}} + o _ {p} (1) \right] \left\{\mathbb {E} _ {P ^ {(m)}} \left[ \left| T _ {i} ^ {(m)} \right| ^ {2 + k} \mid \mathcal {D} _ {t r} ^ {(m)} \right] ^ {\frac {1}{2 + k}} + \mathbb {E} _ {P ^ {(m)}} \left[ \left| T _ {i} ^ {(m)} \right| \mid \mathcal {D} _ {t r} ^ {(m)} \right] \right\} ^ {2 + k} \\ \leq \frac {1}{(n \epsilon) ^ {k}} \left[ \frac {1}{(\inf  _ {P \in \mathcal {P}} \sigma_ {P}) ^ {2 + k}} + o _ {p} (1) \right] \mathcal {O} _ {p} (1) \\ = \frac {1}{(n \epsilon) ^ {k}} \mathcal {O} _ {p} (1) \\ = o _ {p} (1) \\ \end{array}
$$
where the third inequality is obtained via Minkowski Inequality [27] and the last inequality is an application of Assumption 3.2 and Resnick [27, Example 6.5.2].
Corollary 3.6. Suppose we are under the conditions of Theorem 3.4.
- (Type-I error) If  $H_0: X \perp Y \mid Z$  holds, then
- (Type-II error) In general, we have
where  $o(1)$  denotes uniform convergence over all  $P \in \mathcal{P}$  as  $m \to \infty$  and  $\Delta_P \triangleq \mathbb{E}_P[\ell(f_{2,P}^*(Z), Y)] - \mathbb{E}_P[\ell(f_{1,P}^*(X, Z), Y)]$ .
Proof. Under the conditions of Theorem 3.4, we start proving that
1.  $\Delta_P - \Delta_{1,P} \leq \Omega_P^{\mathrm{STFR}}$  holds;
2. Under  $H_0, \Omega_P^{\mathrm{STFR}} \leq \Delta_{2,P}$  holds.
For (1), see that,
$$
\begin{array}{l} \Omega_ {P} ^ {\mathrm {S T F R}} = \mathbb {E} _ {P} [ \ell (g _ {2, P} ^ {*} (Z), Y) ] - \mathbb {E} _ {P} [ \ell (g _ {1, P} ^ {*} (X, Z), Y) ] \\ = \mathbb {E} _ {P} \left[ \ell \left(g _ {2, P} ^ {*} (Z), Y\right) \right] - \mathbb {E} _ {P} \left[ \ell \left(f _ {2, P} ^ {*} (Z), Y\right) \right] \quad (\geq 0) \\ + \mathbb {E} _ {P} [ \ell (f _ {1, P} ^ {*}, (X, Z), Y) ] - \mathbb {E} _ {P} [ \ell (g _ {1, P} ^ {*}, (X, Z), Y) ] \\ + \mathbb {E} _ {P} [ \ell (f _ {2, P} ^ {*} (Z), Y) ] - \mathbb {E} _ {P} [ \ell (f _ {1, P} ^ {*} (X, Z), Y) ] \\ \geq \mathbb {E} _ {P} \left[ \ell \left(f _ {1, P} ^ {*} (X, Z), Y\right) \right] - \mathbb {E} _ {P} \left[ \ell \left(g _ {1, P} ^ {*} (X, Z), Y\right) \right] + \Delta_ {P} \\ = \Delta_ {P} - \Delta_ {1, P} \\ \end{array}
$$
Now, for (2):
$$
\begin{array}{l} \Omega_ {P} ^ {\mathrm {S T F R}} = \mathbb {E} _ {P} [ \ell (g _ {2, P} ^ {*} (Z), Y) ] - \mathbb {E} _ {P} [ \ell (g _ {1, P} ^ {*} (X, Z), Y) ] \\ = \mathbb {E} _ {P} \left[ \ell \left(g _ {2, P} ^ {*} (Z), Y\right) \right] - \mathbb {E} _ {P} \left[ \ell \left(f _ {2, P} ^ {*} (Z), Y\right) \right] \\ + \mathbb {E} _ {P} \left[ \ell \left(f _ {1, P} ^ {*} (X, Z), Y\right) \right] - \mathbb {E} _ {P} \left[ \ell \left(g _ {1, P} ^ {*} (X, Z), Y\right) \right] \quad (\leq 0) \\ + \mathbb {E} _ {P} \left[ \ell \left(f _ {2, P} ^ {*} (Z), Y\right) \right] - \mathbb {E} _ {P} \left[ \ell \left(f _ {1, P} ^ {*} (X, Z), Y\right) \right] \quad (= 0, \text {b e c a u s e} H _ {0} \text {h o l d s}) \\ \leq \mathbb {E} _ {P} \left[ \ell \left(g _ {2, P} ^ {*} (Z), Y\right) \right] - \mathbb {E} _ {P} \left[ \ell \left(f _ {2, P} ^ {*} (Z), Y\right) \right] \\ = \Delta_ {2, P} \\ \end{array}
$$
Finally, see that
$$
1 - \Phi \left(\tau_ {\alpha} - \sqrt {\frac {n}{\sigma_ {P} ^ {2}}} \Omega_ {P} ^ {\mathrm {S T F R}}\right) \leq 1 - \Phi \left(\tau_ {\alpha} - \sqrt {\frac {n}{\sigma_ {P} ^ {2}}} \Delta_ {2, P}\right)
$$
$$
\Phi \left(\tau_ {\alpha} - \sqrt {\frac {n}{\sigma_ {P} ^ {2}}} \Omega_ {P} ^ {\mathrm {S T F R}}\right) \leq \Phi \left(\tau_ {\alpha} - \sqrt {\frac {n}{\sigma_ {P} ^ {2}}} (\Delta_ {P} - \Delta_ {1, P})\right)
$$
Combining these observations with Theorem 3.4, we get the result.
B.2 GCM
Theorem A.5. Suppose that Assumptions A.3, 3.2, and 3.3 hold. If  $n$  is a function of  $m$  such that  $n \to \infty$  and  $n = o(m^{\gamma})$  as  $m \to \infty$ , then
$$
\Omega_ {P} ^ {\mathrm {G C M}} \triangleq \mathbb {E} _ {P} \left[ \operatorname {C o v} _ {P} (X, Y \mid Z) \right] + \mathbb {E} _ {P} \left[ \delta_ {1, P} (Z) \delta_ {2, P} (Z) \right]
$$
Proof. First, note that there must be  $18$  a sequence of probability measures in  $\mathcal{P}$ ,  $(P^{(m)})_{m\in \mathbb{N}}$ , such that
$$
\begin{array}{l} \sup  _ {P \in \mathcal {P}} \left| \mathbb {E} _ {P} \left[ \varphi_ {\alpha} ^ {\mathrm {G C M}} \left(\mathcal {D} _ {t e} ^ {(n)}, \mathcal {D} _ {t r} ^ {(m)}\right) \right] - 1 + \Phi \left(\tau_ {\alpha / 2} - \sqrt {\frac {n}{\sigma_ {P} ^ {2}}} \Omega_ {P} ^ {\mathrm {G C M}}\right) - \Phi \left(- \tau_ {\alpha / 2} - \sqrt {\frac {n}{\sigma_ {P} ^ {2}}} \Omega_ {P} ^ {\mathrm {G C M}}\right) \right| \leq \\ \leq \left| \mathbb {E} _ {P ^ {(m)}} [ \varphi_ {\alpha} ^ {\mathrm {G C M}} (\mathcal {D} _ {t e} ^ {(n)}, \mathcal {D} _ {t r} ^ {(m)}) ] - 1 + \Phi \left(\tau_ {\alpha / 2} - \sqrt {\frac {n}{\sigma_ {P ^ {(m)}} ^ {2}}} \Omega_ {P ^ {(m)}} ^ {\mathrm {G C M}}\right) - \Phi \left(- \tau_ {\alpha / 2} - \sqrt {\frac {n}{\sigma_ {P ^ {(m)}} ^ {2}}} \Omega_ {P ^ {(m)}} ^ {\mathrm {G C M}}\right) \right| + \frac {1}{m} \\ \end{array}
$$
Now, let us first decompose the test statistic  $\Gamma^{(n,m)}$  in the following way:
$$
\begin{array}{l} \Gamma^ {(n, m)} \triangleq \left| \frac {\sqrt {n} \bar {T} ^ {(n , m)}}{\hat {\sigma} ^ {(n , m)}} \right| = \\ = \left| \frac {\sqrt {n} \left(\bar {T} ^ {(n , m)} - \mathbb {E} _ {P ^ {(m)}} \left[ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} \right]\right)}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} \mathbb {E} _ {P ^ {(m)}} \left[ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} \right]}{\hat {\sigma} ^ {(n , m)}} \right| \\ = \left| \frac {\sqrt {n} \Big (\bar {T} ^ {(n , m)} - \mathbb {E} _ {P ^ {(m)}} [ T _ {1} ^ {(m)} \mid \mathcal {D} _ {t r} ^ {(m)} ] \Big)}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} \mathbb {E} _ {P ^ {(m)}} [ (\hat {g} _ {1} ^ {(m)} (Z _ {1}) - g _ {1 , P ^ {(m)}} ^ {*} (Z _ {1})) (\hat {g} _ {2} ^ {(m)} (Z _ {1}) - g _ {2 , P ^ {(m)}} ^ {*} (Z _ {1})) \mid \mathcal {D} _ {t r} ^ {(m)} ]}{\hat {\sigma} ^ {(n , m)}} \right| \\ + \frac {\sqrt {n} \mathbb {E} _ {P ^ {(m)}} [ (\hat {g} _ {1} ^ {(m)} (Z _ {1}) - g _ {1 , P ^ {(m)}} ^ {*} (Z _ {1})) \delta_ {2 , P ^ {(m)}} (Z _ {1}) \mid \mathcal {D} _ {t r} ^ {(m)} ]}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} \mathbb {E} _ {P ^ {(m)}} [ \delta_ {1 , P ^ {(m)}} (Z _ {1}) (\hat {g} _ {2} ^ {(m)} (Z _ {1}) - g _ {2 , P ^ {(m)}} ^ {*} (Z _ {1})) \mid \mathcal {D} _ {t r} ^ {(m)} ]}{\hat {\sigma} ^ {(n , m)}} \\ + \left. \frac {\sqrt {n} \Omega_ {P ^ {(m)}} ^ {\mathrm {G C M}}}{\hat {\sigma} ^ {(n , m)}} \right| \\ = \left| \frac {\sqrt {n} W _ {1 , P (m)} ^ {(m)}}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} W _ {2 , P (m)} ^ {(m)}}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} W _ {3 , P (m)} ^ {(m)}}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} W _ {4 , P (m)} ^ {(m)}}{\hat {\sigma} ^ {(n , m)}} + \frac {\sqrt {n} \Omega_ {P (m)} ^ {\mathrm {G C M}}}{\hat {\sigma} ^ {(n , m)}} \right| \\ \end{array}
$$
18 Because of the definition of sup.