A Wild Bootstrap for Degenerate Kernel Tests

Kacper Chwialkowski, Dino Sejdinovic, Arthur Gretton

Introduction

Statistical tests based on distribution embeddings into reproducing kernel Hilbert spaces have been applied in many contexts, including two sample testing , tests of independence , tests of conditional independence , and tests for higher order (Lancaster) interactions . For these tests, consistency is guaranteed if and only if the observations are independent and identically distributed. Much real-world data fails to satisfy the i.i.d. assumption: audio signals, EEG recordings, text documents, financial time series, and samples obtained when running Markov Chain Monte Carlo, all show significant temporal dependence patterns.

The asymptotic behaviour of kernel test statistics becomes quite different when temporal dependencies exist within the samples. In recent work on independence testing using the Hilbert-Schmidt Independence Criterion (HSIC) , the asymptotic distribution of the statistic under the null hypothesis is obtained for a pair of independent time series, which satisfy an absolute regularity or a ϕ\phi-mixing assumption. In this case, the null distribution is shown to be an infinite weighted sum of dependent χ2\chi^{2}-variables, as opposed to the sum of independent χ2\chi^{2}-variables obtained in the i.i.d. setting . The difference in the asymptotic null distributions has important implications in practice: under the i.i.d. assumption, an empirical estimate of the null distribution can be obtained by repeatedly permuting the time indices of one of the signals. This breaks the temporal dependence within the permuted signal, which causes the test to return an elevated number of false positives, when used for testing time series. To address this problem, an alternative estimate of the null distribution is proposed in , where the null distribution is simulated by repeatedly shifting one signal relative to the other. This preserves the temporal structure within each signal, while breaking the cross-signal dependence.

A serious limitation of the shift procedure in is that it is specific to the problem of independence testing: there is no obvious way to generalise it to other testing contexts. For instance, we might have two time series, with the goal of comparing their marginal distributions - this is a generalization of the two-sample setting to which the shift approach does not apply.

We note, however, that many kernel tests have a test statistic with a particular structure: the Maximum Mean Discrepancy (MMD), HSIC, and the Lancaster interaction statistic, each have empirical estimates which can be cast as normalized VV-statistics, 1nm11i1,...,imnh(Zi1,...,Zim)\frac{1}{n^{m-1}}\sum_{1\leq i_{1},...,i_{m}\leq n}h(Z_{i_{1}},...,Z_{i_{m}}), where Zi1,...,ZimZ_{i_{1}},...,Z_{i_{m}} are samples from a random process at the time points {i1,,im}\{i_{1},\ldots,i_{m}\}. We show that a method of external randomization known as the wild bootstrap may be applied to simulate from the null distribution. In brief, the arguments of the above sum are repeatedly multiplied by random, user-defined time series. For a test of level α\alpha, the 1α1-\alpha quantile of the empirical distribution obtained using these perturbed statistics serves as the test threshold. This approach has the important advantage over that it may be applied to all kernel-based tests for which VV-statistics are employed, and not just for independence tests.

The main result of this paper is to show that the wild bootstrap procedure yields consistent tests for time series, i.e., tests based on the wild bootstrap have a Type I error rate (of wrongly rejecting the null hypothesis) approaching the design parameter α\alpha, and a Type II error (of wrongly accepting the null) approaching zero, as the number of samples increases. We use this result to construct a two-sample test using MMD, and an independence test using HSIC. The latter procedure is applied both to testing for instantaneous independence, and to testing for independence across multiple time lags, for which the earlier shift procedure of cannot be applied.

We begin our presentation in Section 2, with a review of the τ\tau-mixing assumption required of the time series, as well as of VV-statistics (of which MMD and HSIC are instances). We also introduce the form taken by the wild bootstrap. In Section 3, we establish a general consistency result for the wild bootstrap procedure on VV-statistics, which we apply to MMD and to HSIC in Section 4. Finally, in Section 5, we present a number of empirical comparisons: in the two sample case, we test for differences in audio signals with the same underlying pitch, and present a performance diagnostic for the output of a Gibbs sampler (the MCMC M.D.); in the independence case, we test for independence of two time series sharing a common variance (a characteristic of econometric models), and compare against the test of in the case where dependence may occur at multiple, potentially unknown lags. Our tests outperform both the naive approach which neglects the dependence structure within the samples, and the approach of , when testing across multiple lags. Detailed proofs are found in the appendices.

Background

The main results of the paper are based around two concepts: τ\tau-mixing , which describes the dependence within the time series, and VV-statistics , which constitute our test statistics. In this section, we review these topics, and introduce the concept of wild bootstrapped VV-statistics, which will be the key ingredient in our test construction.

and Λ\Lambda is the set of all one-Lipschitz continuous real-valued functions on the domain of XX. τ(M,X)\tau(\mathcal{M},X) can be interpreted as the minimal L1L_{1} distance between XX and XX^{*} such that X=dXX\overset{d}{=}X^{*} and XX^{*} is independent of MF\mathcal{M}\subset\mathcal{F}. Furthermore, if F\mathcal{F} is rich enough, this XX^{*} can be constructed.

Note that this mixing definition differs from commonly used notion of β\beta mixing (or ϕ\phi mixing), which was required in the previous work . We describe in more detail how these notions of dependence are related in Appendix B.

V𝑉V-statistics.

The test statistics considered in this paper are always VV-statistics. Given the observations Z={Zt}t=1nZ=\left\{Z_{t}\right\}_{t=1}^{n}, a VV-statistic of a symmetric function hh taking mm arguments is given by

where NmN^{m} is a Cartesian power of a set N={1,...,n}N=\{1,...,n\}. For simplicity, we will often drop the second argument and write simply V(h)V(h).

We will refer to the function hh as to the core of the VV-statistic V(h)V(h). While such functions are usually called kernels in the literature, in this paper we reserve the term kernel for positive-definite functions taking two arguments. A core hh is said to be jj-degenerate if for each z1,,zjz_{1},\ldots,z_{j} Eh(z1,,zj,Zj+1,,Zm)=0,Eh(z_{1},\ldots,z_{j},Z_{j+1}^{*},\ldots,Z_{m}^{*})=0, where Zj+1,,ZmZ_{j+1}^{*},\ldots,Z_{m}^{*} are independent copies of Z1Z_{1}. If hh is jj-degenerate for all jm1j\leq m-1, we will say that it is canonical. For a one-degenerate core hh, we define an auxiliary function h2h_{2}, called the second component of the core, and given by h2(z1,z2)=Eh(z1,z2,Z3,,Zm).h_{2}(z_{1},z_{2})=Eh(z_{1},z_{2},Z_{3}^{*},\ldots,Z_{m}^{*}). Finally we say that nV(h)nV(h) is a normalized VV-statistic, and that a VV-statistic with a one-degenerate core is a degenerate VV-statistic. This degeneracy is common to many kernel statistics when the null hypothesis holds .

Our main results will rely on the fact that h2h_{2} governs the asymptotic behaviour of normalized degenerate VV-statistics. Unfortunately, the limiting distribution of such VV-statistics is quite complicated - it is an infinite sum of dependent χ2\chi^{2}-distributed random variables, with a dependence determined by the temporal dependence structure within the process {Zt}\{Z_{t}\} and by the eigenfunctions of a certain integral operator associated with h2h_{2} . Therefore, we propose a bootstrapped version of the VV-statistics which will allow a consistent approximation of this difficult limiting distribution.

Bootstrapped V𝑉V-statistic.

We will study two versions of the bootstrapped VV-statistics

As noted in in [19, Remark 2], a simple realization of a process that satisfies this assumption is Wt,n=e1/lnWt1,n+1e2/lnϵtW_{t,n}=e^{-1/l_{n}}W_{t-1,n}+\sqrt{1-e^{-2/l_{n}}}\epsilon_{t} where W0,nW_{0,n} and ϵ1,,ϵn\epsilon_{1},\ldots,\epsilon_{n} are independent standard normal random variables. For simplicity, we will drop the index nn and write WtW_{t} instead of Wt,nW_{t,n}. A process that fulfils the bootstrap assumption will be called bootstrap process. Further discussion of the wild bootstrap is provided in the Appendix A. The versions of the bootstrapped VV-statistics in (2) and (3) were previously studied in for the case of canonical cores of degree m=2m=2. We extend their results to higher degree cores (common within the kernel testing framework), which are not necessarily one-degenerate. When stating a fact that applies to both B1B_{1} and B2B_{2}, we will simply write BB, and the argument hh or index nn will be dropped when there is no ambiguity.

Asymptotics of wild bootstrapped V𝑉V-statistics

In this section, we present main Theorems that describe asymptotic behaviour of VV-statistics, all the poofs are in the Appendix C. In the next section, these results will be used to construct kernel-based statistical tests applicable to dependent observations. Tests are constructed so that the VV-statistic is degenerate under the null hypothesis and non-degenerate under the alternative. Theorem 1 guarantees that the bootstrapped VV-statistic will converge to the same limiting null distribution as the simple VV-statistic.

Throughout this paper we will make one mild assumption

where Zi=(Zi1,Zim)Z_{i}=(Z_{i_{1}},\cdots Z_{i_{m}}). This assumption is almost always automatically satisfied, since most of the kernels used in practice are bounded.

Assume that the stationary process ZtZ_{t} is τ\tau-dependent with r=1r2τ(r)<\sum_{r=1}^{\infty}r^{2}\sqrt{\tau(r)}<\infty. If the core hh is a Lipschitz continuous, one-degenerate and its h2h_{2}-component is a positive definite kernel, such that Eh2(Z0,Z0)<Eh_{2}(Z_{0},Z_{0})<\infty, then nBnnB_{n} (2), (3), and nVnnV_{n} (1) converge weakly to the same distribution VV. Moreover nBn(h2)nB_{n}(h_{2}) and nVn(h2)nV_{n}(h_{2}) converge weakly to (m2)1V\binom{m}{2}^{-1}V.

On the other hand, if the VV-statistic is not degenerate, which is usually true under the alternative, it converges to some non-zero constant.

Assume that the stationary process ZtZ_{t} is τ\tau-dependent with τ(r)=o(r4)\tau(r)=o(r^{-4}). If the core hh is a Lipschitz continuous, and h0h_{0} component is positive then VnV_{n} converges in mean squared to h0h_{0}.

In this setting, Theorem 3 guarantees that the bootstrapped VV-statistic will converge to zero in probability. This property is necessary in testing, as it implies that the test thresholds computed using the bootstrapped VV-statistics will also converge to zero, and so will the corresponding Type II error.

Assume that the stationary process {Zt}\{Z_{t}\} is τ\tau-dependent with a coefficient τ(r)=o(r4)\tau(r)=o(r^{-4}). If the core hh is a function of m>1m>1 arguments then B1(h)B_{1}(h) and o(n)B2(h)o(n)B_{2}(h) converge to zero in mean squared.

Although both B2B_{2} and B1B_{1} converge to zero, the rate does not seem to be that same. As a consequence, tests that utilize B2B_{2} usually give lower Type II error then the ones that use B1B_{1}. On the other hand, B1B_{1} seems to better approximate VV-statistic distribution under the null hypothesis. This agrees with our experiments in Section 5 as well as with those in [19, Section 5]). These results a sufficient for adopting kernel tests developed for i.i.d. data to tests that work on random processes. In particular Theorem 1 justifies usage of bootstraped VV-statistics for estimating quantiles of the null distribution, while Theorems 23 guarantee consistency.

Calculate the test statistic nVn(h)nV_{n}(h).

Obtain wild bootstrap samples {Bn(h)}i=1D\{B_{n}(h)\}_{i=1}^{D} and estimate the 1α1-\alpha empirical quantile of these samples.

If nVn(h)nV_{n}(h) exceeds the quantile, reject.

Applications to Kernel Tests

In this section, we describe how the wild bootstrap for VV-statistics can be used to construct kernel tests for independence and the two-sample problem, which are applicable to weakly dependent observations. We start by reviewing the main concepts underpinning the kernel testing framework.

In this section, we describe how the wild bootstrap for VV-statistics can be used to construct kernel tests for independence and the two-sample problem, in presence of weakly dependent observations.

Denote the observations by {Xi}i=1nxPx\{X_{i}\}_{i=1}^{n_{x}}\sim P_{x}, and {Yj}j=1nyPy\{Y_{j}\}_{j=1}^{n_{y}}\sim P_{y}. Our goal is to test the null hypothesis H0:Px=Py\mathbf{H}_{0}:P_{x}=P_{y} vs. the alternative H1:PxPy\mathbf{H}_{1}:P_{x}\neq P_{y}. In the case where samples have equal sizes, i.e., nx=nyn_{x}=n_{y}, application of the wild bootstrap to MMD-based tests on dependent samples is straightforward: the empirical MMD can be written as a VV-statistic with the core of degree two on pairs zi=(xi,yi)z_{i}=(x_{i},y_{i}) given by h(z1,z2)=k(x1,x2)k(x1,y2)k(x2,y1)+k(y1,y2)h(z_{1},z_{2})=k(x_{1},x_{2})-k(x_{1},y_{2})-k(x_{2},y_{1})+k(y_{1},y_{2}). It is clear that whenever kk is Lipschitz continuous and bounded, so is hh. Moreover, hh is a valid positive definite kernel, since it can be represented as an RKHS inner product k(,x1)k(,y1),k(,x2)k(,y2)Hk\left\langle k(\cdot,x_{1})-k(\cdot,y_{1}),k(\cdot,x_{2})-k(\cdot,y_{2})\right\rangle_{\mathcal{H}_{k}}. Under the null hypothesis, hh is also one-degenerate, i.e., Eh((x1,y1),(X2,Y2))=0Eh\left((x_{1},y_{1}),(X_{2},Y_{2})\right)=0. Therefore, we can use the bootstrapped statistics in (2) and (3) to approximate the null distribution and attain a desired test level.

When nxnyn_{x}\neq n_{y}, however, it is no longer possible to write the empirical MMD as a one-sample VV-statistic. We will therefore require the following bootstrapped version of MMD

Let kk be bounded and Lipschitz continuous, and let {Xt}\left\{X_{t}\right\} and {Yt}\left\{Y_{t}\right\} both be τ\tau-dependent with coefficients τ(r)=O(r6ϵ)\tau(r)=O(r^{-6-\epsilon}), but independent of each other. Further, let nx=ρxnn_{x}=\rho_{x}n and ny=ρynn_{y}=\rho_{y}n where n=nx+nyn=n_{x}+n_{y}. Then, under the null hypothesis Px=PyP_{x}=P_{y}, φ(ρxρynMMD^k,ρxρynMMD^k,b)0\varphi\left(\rho_{x}\rho_{y}n\widehat{\text{MMD}}_{k},\rho_{x}\rho_{y}n\widehat{\text{MMD}}_{k,b}\right)\to 0 in probability as nn\to\infty, where φ\varphi is the Prokhorov metric and MMD^k\widehat{\text{MMD}}_{k} is the MMD between empirical measures.

2 Wild Bootstrap For HSIC

Using HSIC in the context of random processes is not new in the machine learning literature. For a 1-approximating functional of an absolutely regular process , convergence in probability of the empirical HSIC to its population value was shown in . No asymptotic distributions were obtained, however, nor was a statistical test constructed. The asymptotics of a normalized VV-statistic were obtained in for absolutely regular and ϕ\phi-mixing processes . Due to the intractability of the null distribution for the test statistic, the authors propose a procedure to approximate its null distribution using circular shifts of the observations leading to tests of instantaneous independence, i.e., of X_{t}\rotatebox[origin={c}]{90.0}{\models}Y_{t}, t\forall t. This was shown to be consistent under the null (i.e., leading to the correct Type I error), however consistency of the shift procedure under the alternative is a challenging open question (see [8, Section A.2] for further discussion). In contrast, the wild bootstrap guarantees test consistency under both hypotheses: null and alternative, which is a major advantage. In addition, the wild bootstrap can be used in constructing a test for the harder problem of determining independence across multiple lags simultaneously, similar to the one in .

Following symmetrisation, it is shown in that the empirical HSIC can be written as a degree four VV-statistic with core given by

where we denote by SnS_{n} the group of permutations over nn elements. One-degeneracy of the core under the null hypothesis was stated in [15, Theorem 2], [15, Section A.2, following eq. (11)] shows that h2h_{2} is a kernel; h00h_{0}\geq 0 follows from the fact that HSIC is a distance. Using Theorems 1,3,2 we can construct an independence test using hh. Drawback of this test, when implemented in the most straightforward way, is its quadruple computational complexity. To achieve quadratic time complexity, that matches time complexity of HSIC test for i.i.d. data, we modify our bootstrapped statistic.

[15, section A.2, following eq. (11)] The second component of hh is h2(z1,z2)=16kˉ(x1,x2)lˉ(y1,y2).h_{2}(z_{1},z_{2})=\frac{1}{6}\bar{k}(x_{1},x_{2})\bar{l}(y_{1},y_{2}).

Squared norm of TnT_{n} is equal to 6B(h2)6B(h_{2}).

Next we relate SnS_{n} to TnT_{n} – we show that the difference between them is asymptotically negligible. We start with a technical lemma.

If (kˉ×kˉ,Zi)(\bar{k}\times\bar{k},Z_{i}) is of type Δ\varDelta of order O(r4)O(r^{-4}) (see Definition 2), then

Since (kˉ×kˉ,Xi)(\bar{k}\times\bar{k},X_{i}) is of type Δ\varDelta, by Lemma 4, the expected value is of order O(1)O(1). ∎

If (kˉ×kˉ,Zi)(\bar{k}\times\bar{k},Z_{i}), (lˉ×lˉ,Zi)(\bar{l}\times\bar{l},Z_{i}) are of type Δ\varDelta of order O(r4)O(r^{-4}), then, under the null, Sn2Tn2\|S_{n}\|^{2}-\|T_{n}\|^{2} converges to zero in mean square. Under the alternative 1n(Sn2Tn2)\frac{1}{n}(\|S_{n}\|^{2}-\|T_{n}\|^{2}) converges to zero in mean square.

We first show that ESnTn20E\|S_{n}-T_{n}\|^{2}\to 0 both under the null and the alternative. Then, using the fact that Tn2<\|T_{n}\|^{2}<\infty under the null and 1nTn2<\frac{1}{n}\|T_{n}\|^{2}<\infty under alternative we will conclude the proof. The difference SnTnS_{n}-T_{n} is

We examine differences separately – it is sufficient to show that each difference converges to zero in mean square.

The expected norm of the first difference is

We used vu=vu\|v\otimes u\|=\|v\|\|u\| and Cauchy-Schwarz inequality. By Lemma 2 the first term is O(1)O(1). The second term is equal to

The expected value converges to zero in mean square by Lemma 4 (the assumption supi,jk(Xi,Xj)<\sup_{i,j}k(X_{i},X_{j})<\infty is satisfied). Using similar reasoning, the second term

also converges to zero. The final term is

1niNQi\frac{1}{n}\sum_{i\in N}Q_{i} converges in mean square to zero (Lemmas 6, 7). We rewrite the second term

To show that the above expression converges to zero it is sufficient to show that ETn2<E\|T_{n}\|^{2}<\infty and ESn2<E\|S_{n}\|^{2}<\infty. Under the null hypothesis, by Lemma 4, expected value of ETn2=nBn(h2)E\|T_{n}\|^{2}=nB_{n}(h_{2}) is finite. Since ETnSn20E\|T_{n}-S_{n}\|^{2}\to 0 we also have ETnSn0E\|T_{n}-S_{n}\|\to 0. Therefore we have

it is sufficient to show that n1ETn2<n^{-1}E\|T_{n}\|^{2}<\infty and n1ESn2<n^{-1}E\|S_{n}\|^{2}<\infty. By Theorem 3, n1ETn2<n^{-1}E\|T_{n}\|^{2}<\infty is finite and, using the reasoning similar to the one above, we have that n1ESn2<n^{-1}E\|S_{n}\|^{2}<\infty. ∎

This shows that we can use squared norm of SnS_{n} as a bootstrapped test statistic. For HSIC we redefine BnB_{n}

Finally, notice that both statistics 7 and 8 can be calculated in quadratic time.

Let Zt=(Xt,Yt)Z_{t}=\left(X_{t},Y_{t}\right) be a stationary process that is τ\tau-dependent such that r=1r2τ(r)<\sum_{r=1}^{\infty}r^{2}\sqrt{\tau(r)}<\infty. Under the null hypothesis BnB_{n}^{*} (7) and nVn(h)nV_{n}(h) (8)converge weakly to the same distribution. Under the alternative hypothesis BnB_{n}^{*} converges to zero in probability, while Vn(h)V_{n}(h) converges to a positive constant.

By Lemma 1, 6nBn(h2)=Tn26nB_{n}(h_{2})=\|T_{n}\|^{2}. By definition (7), Bn=Sn2B_{n}^{*}=\|S_{n}\|^{2} . By Lemma 3, 6nBn(h2)Bn6nB_{n}(h_{2})-B_{n}^{*} converges to zero in mean square. We check assumptions; since process ZtZ_{t} is τ\tau-mixing (of order o(r4)o(r^{-4}) ) and both kˉ\bar{k}, lˉ\bar{l} are canonical, Lemma 11 guarantees that (kˉ,Zi)(\bar{k},Z_{i}), (lˉ,Zi)(\bar{l},Z_{i}) are of type Δ\varDelta of order O(r4)O(r^{-4}).

Under the null hypothesis, by Theorem 1, nVn(h)6nBn(h2)nV_{n}(h)-6nB_{n}(h_{2}) converges to zero. We check assumptions; by Lemma 1, h2h_{2} is a symmetric, one-degenerate, bounded kernel, assumptions concerning τ\tau-mixing are satisfied.

Under the alternative, by Theorem 3 and Lemma 3 respectively, 6Bn(h2)6B_{n}(h_{2}) and 1nBn6Bn(h2)\frac{1}{n}B_{n}^{*}-6B_{n}(h_{2}) converge to zero in mean square. By Theorem 3, Vn(h)V_{n}(h) converges to a positive constant. ∎

We consider two types of tests: instantaneous independence and independence at multiple time lags.

Test of instantaneous independence

Here, the null hypothesis H0\mathbf{H_{0}} is that XtX_{t} and YtY_{t} are independent at all times tt, and the alternative hypothesis H1\mathbf{H_{1}} is that they are dependent. We use Proposition2 directly to bootstrap an appropriate quantile and compare it with a test statistic.

Lag-HSIC

Proposition 2 allows us to construct a test of time series independence that is similar to one designed by . Here, we will be testing against a broader null hypothesis: XtX_{t} and YtY_{t^{\prime}} are independent for tt<M|t-t^{\prime}|<M for an arbitrary large but fixed MM.

Since the time series Zt=(Xt,Yt)Z_{t}=(X_{t},Y_{t}) is stationary, it suffices to check whether there exists a dependency between XtX_{t} and Yt+mY_{t+m} for MmM-M\leq m\leq M. Since each lag corresponds to an individual hypothesis, we will require a Bonferroni correction to attain a desired test level α\alpha. We therefore define q=1α2M+1q=1-\frac{\alpha}{2M+1}. The shifted time series will be denoted Ztm=(Xt,Yt+m)Z_{t}^{m}=(X_{t},Y_{t+m}). Let Sm,n=nVn(h,Zm)S_{m,n}=nV_{n}(h,Z^{m}) denote the value of the normalized HSIC statistic calculated on the shifted process ZtmZ_{t}^{m}. Let Fb,nF_{b,n} denote the empirical cumulative distribution function obtained by the bootstrap procedure using BnB_{n}^{*} (7). The test will then reject the null hypothesis if the event An={maxMmMSm,n>Fb,n1(q)}\mathcal{A}_{n}=\left\{\max_{-M\leq m\leq M}S_{m,n}>F^{-1}_{b,n}(q)\right\} occurs. By a simple application of the union bound, it is clear that the asymptotic probability of the Type I error will be limnPH0(An)α\lim_{n\to\infty}P_{\,\mathbf{H_{0}}}\left(\mathcal{A}_{n}\right)\leq\alpha. On the other hand, if the alternative holds, there exists some mm with mM|m|\leq M for which Vn(h,Zm)=n1Sm,nV_{n}(h,Z^{m})=n^{-1}S_{m,n} converges to a non-zero constant. In this case

as long as n1Fb,n1(q)0n^{-1}F^{-1}_{b,n}(q)\to 0, which follows from the convergence of BnB_{n}^{*} (7) to zero in probability shown in Proposition 2. Therefore, the Type II error of the multiple lag test is guaranteed to converge to zero as the sample size increases. Our experiments in the next Section demonstrate that while this procedure is defined over a finite range of lags, it results in tests more powerful than the procedure for an infinite number of lags proposed in . We note that a procedure that works for an infinite number of lags, although possible to construct, does not add much practical value under the present assumptions. Indeed, since the τ\tau-mixing assumption applies to the joint sequence Zt=(Xt,Yt)Z_{t}=(X_{t},Y_{t}), dependence between XtX_{t} and Yt+mY_{t+m} is bound to disappear at a rate of o(m6)o(m^{-6}), i.e., the variables both within and across the two series are assumed to become gradually independent at large lags.

Experiments

We employ MMD in order to diagnose how far an MCMC chain is from its stationary distribution [23, Section 5], by comparing the MCMC sample to a benchmark sample. A hypothesis test of whether the sampler has converged based on the standard permutation-based bootstrap leads to too many rejections of the null hypothesis, due to dependence within the chain. Thus, one would require heavily thinned chains, which is wasteful of samples and computationally burdensome. Our experiments indicate that the wild bootstrap approach allows consistent tests directly on the chains, as it attains a desired number of false positives. To assess performance of the wild bootstrap in determining MCMC convergence, we consider the situation where samples {Xi}\{X_{i}\} and {Yi}\{Y_{i}\} are bivariate, and both have the identical marginal distribution given by an elongated normal P=\mathcal{N}\left(\left[\begin{array}[]{cc}0&0\end{array}\right],\left[\begin{array}[]{cc}15.5&14.5\\ 14.5&15.5\end{array}\right]\right). However, they could have arisen either as independent samples, or as outputs of the Gibbs sampler with stationary distribution PP. Table 1 shows the rejection rates under the significance level α=0.05\alpha=0.05. It is clear that in the case where at least one of the samples is a Gibbs chain, the permutation-based test has a Type I error much larger than α\alpha. The wild bootstrap using Vb1V_{b1} (without artificial degeneration) yields the correct Type I error control in these cases. Consistent with findings in [19, Section 5], Vb1V_{b1} mimics the null distribution better than Vb2V_{b2}. The bootstrapped statistic MMD^k,b\widehat{\text{MMD}}_{k,b} in (4) which also relies on the artificially degenerated bootstrap processes, behaves similarly to Vb2V_{b2}. In the alternative scenario where {Yi}\{Y_{i}\} was taken from a distribution with the same covariance structure but with the mean set to \mu=\left[\begin{array}[]{cc}2.5&0\end{array}\right], the Type II error for all tests was zero.

Pitch-evoking sounds

Instantaneous independence

To examine instantaneous independence test performance, we compare it with the Shift-HSIC procedure on the ’Extinct Gaussian’ autoregressive process proposed in the [8, Section 4.1]. Using exactly the same setting we compute type I error as a function of the temporal dependence and type II error as a function of extinction rate. Figure 1 shows that all three tests (Shift-HSIC and tests based on Vb1V_{b1} and Vb2V_{b2}) perform similarly.

Lag-HSIC

The KCSD is, to our knowledge, the only test procedure to reject the null hypothesis if there exist tt,tt^{\prime} such that ZtZ_{t} and ZtZ_{t^{\prime}} are dependent. In the experiments, we compare lag-HSIC with KCSD on two kinds of processes: one inspired by econometrics and one from . In lag-HSIC, the number of lags under examination was equal to max{10,logn}\max\{10,\log n\}, where nn is the sample size. We used Gaussian kernels with widths estimated by the median heuristic. The cumulative distribution of the VV-statistics was approximated by samples from nVb2nV_{b2}. To model the tail of this distribution, we have fitted the generalized Pareto distribution to the bootstrapped samples ( shows that for a large class of underlying distribution functions such an approximation is valid). The first process is a pair of two time series which share a common variance,

The above set of equations is an instance of the VEC dynamics used in econometrics to model market volatility. The left panel of the Figure 2 presents the Type II error rate: for KCSD it remains at 90% while for lag-HSIC it gradually drops to zero. The Type I error, which we calculated by sampling two independent copies (Xt(1),Yt(1))(X^{(1)}_{t},Y^{(1)}_{t}) and (Xt(2),Yt(2))(X^{(2)}_{t},Y^{(2)}_{t}) of the process and performing the tests on the pair (Xt(1),Yt(2))(X^{(1)}_{t},Y^{(2)}_{t}), was around 5% for both of the tests. Our next experiment is a process sampled according to the dynamics proposed by ,

with parameters C=.4C=.4, f1=4Hzf_{1}=4Hz,f2=20Hzf_{2}=20Hz, and frequency 1Ts=100Hz\frac{1}{T_{s}}=100Hz. We compared performance of the KCSD algorithm, with parameters set to vales recommended in , and the lag-HSIC algorithm. The Type II error of lag-HSIC, presented in the right panel of the Figure 2, is substantially lower than that of KCSD. The Type I error (C=0C=0) is equal or lower than 5% for both procedures. Most oddly, KCSD error seems to converge to zero in steps. This may be due to the method relying on a spectral decomposition of the signals across a fixed set of bands. As the number of samples increases, the quality of the spectrogram will improve, and dependence will become apparent in bands where it was undetectable at shorter signal lengths.

References

Appendix A An Introduction to the Wild Bootstrap

Bootstrap methods aim to evaluate the accuracy of the sample estimates - they are particularly useful when dealing with complicated distributions, or when the assumptions of a parametric procedure are in doubt. Bootstrap methods randomize the dataset used for the sample estimate calculation, so that a new dataset with a similar statistical properties is obtained, e.g. one popular method is resampling. In the wild bootstrap method the observations in the dataset are multiplied by appropriate random numbers. To present the idea behind the wild bootstrap we will discuss a toy example similar to that in , and then relate it to the wild bootstrap method used in this article.

Consider a stationary autoregressive-moving-average random process {Xi}iZ\{X_{i}\}_{i\in\mathbf{Z}} with zero mean. The normalized sample mean of the process XtX_{t} has normal distribution

where σ2=j=j=cov(X0,Xj)\sigma_{\infty}^{2}=\sum_{j=-\infty}^{j=\infty}cov(X_{0},X_{j}). The variance σ2\sigma_{\infty}^{2} is not easy to estimate (the naive approach of approximating different covariances separately and summing them has several drawbacks, e.g. how many empirical covariances should be calculated?). Using the wild bootstrap method we will construct processes that mimic behaviour of the XtX_{t} process and then use them to approximate the distribution of the normalized sample mean, i=1NXin\frac{\sum_{i=1}^{N}X_{i}}{\sqrt{n}}. The bootstrap process used to to randomize the sample meets the following criteria:

{Wt,n}1tn\{W_{t,n}\}_{1\leq t\leq n} is a row-wise strictly stationary triangular array independent of all XtX_{t}, such that EWt,n=0EW_{t,n}=0 and supnEWt,n2+σ<\sup_{n}E|W_{t,n}^{2+\sigma}|<\infty for some σ>0\sigma>0.

The autocovariance of the process is given by EWs,nWt,n=ρ(st/ln)EW_{s,n}W_{t,n}=\rho(|s-t|/l_{n}) for some function ρ\rho, such that limu0ρ(u)=1\lim_{u\to 0}\rho(u)=1.

The sequence {ln}\left\{l_{n}\right\} is taken such that limnln=\lim_{n\to\infty}l_{n}=\infty.

A process that fulfils those criteria, given also in the main article, is

We need to show that the distribution of the normalized sample mean of the process Ytn=WtnXtY_{t}^{n}=W_{t}^{n}X_{t}, where tn|t|\leq n, mimics the distribution N(0,σ2)N(0,\sigma_{\infty}^{2}). It suffices to calculate the expected value and correlations:

The asymptotic auto-covariance structure of the process YtY_{t} is the same as the auto-covariance structure of the process XtX_{t}. Therefore

This mechanism is used in . Recall that, under some assumptions, a normalized V-statistic can be written as

where λk\lambda_{k} are eigenvalues and ϕk\phi_{k} are eigenfunction of the kernel hh, respectively. Since Eϕk(Xi)=0E\phi_{k}(X_{i})=0 (degeneracy condition) one may replace

and conclude, as in the toy example, that the limiting distribution of the single component of the sum kλk...\sum_{k}\lambda_{k}... remains the same. One of the main contributions of is in showing that the distribution of the whole sum kλk(i=1nWtnϕk(Xi)n)2\sum_{k}\lambda_{k}\left(\frac{\sum_{i=1}^{n}W_{t}^{n}\phi_{k}(X_{i})}{\sqrt{n}}\right)^{2} with the components bootstrapped converges in a particular sense (in probability in Prokhorov metric) to the distribution of the normalized V-statistic, 1n1i,jnh(Xi,Xj)\frac{1}{n}\sum_{1\leq i,j\leq n}h(X_{i},X_{j}).

Appendix B Relation between β𝛽\beta,ϕitalic-ϕ\phi and τ𝜏\tau mixing

Strong mixing is historically the most studied type of temporal dependence – a lot of models, example being Markov Chains, are proved to be strongly mixing, therefore it’s useful to relate weak mixing to strong mixing. For a random variable XX on a probability space (Ω,F,PX)(\Omega,\mathcal{F},P_{X}) and MF\mathcal{M}\subset\mathcal{F} we define

A process is called β\beta-mixing or absolutely regular if

By we have β(M,σ(X))ϕ(M,σ(X))\beta(\mathcal{M},\sigma(X))\leq\phi(\mathcal{M},\sigma(X)) .

[10, Equation 7.6] relates τ\tau-mixing and β\beta-mixing , as follows: if QxQ_{x} is the generalized inverse of the tail function

While this definition can be hard to interpret, it can be simplified in the case EXp=ME|X|^{p}=M for some p>1p>1, since via Markov’s inequality P(X>t)MtpP(|X|>t)\leq\frac{M}{t^{p}}, and thus Mtpu\frac{M}{t^{p}}\leq u implies P(X>t)uP(|X|>t)\leq u. Therefore Q(u)=MupQx(u)Q^{\prime}(u)=\frac{M}{\sqrt[p]{u}}\geq Q_{x}(u). As a result, we have the following inequality

provides examples of systems that are tau-mixing. In particular, given that certain assumptions are satisfied causal functions of stationary sequences, iterated random functions, Markov chains, expanding maps are all τ\tau-mixing.

Of particular interest to this work are Markov chains. The assumptions provided by , under which Markov chains are tau-mixing are somehow difficult to check but we can use classical theorems about the β\beta-mixing). In particular [7, Corollary 3.6] states that a Harris recurrent (chain returns to a fixed set of the state space an infinite number of times) and aperiodic Markov chain satisfies absolute regularity. [7, Theorem 3.7] states that geometric ergodicity xPn(x,)πTVCqn,0<q<1\forall_{x}\|P^{n}(x,\cdot)-\pi\|_{TV}\leq Cq^{n},0<q<1 implies geometric decay of the β\beta coefficient. Interestingly [7, Theorem 3.3] describes situations in which a non-stationary chain β\beta-mixes exponentially.

Using inequality 18 between τ\tau-mixing coefficient and strong mixing coefficients one can use those classical theorems show that e.g for p=2p=2 we have

Appendix C Proofs

In this section we prove the main theorems. As for the notation, nn denotes number of observations, N={1,,n}N=\{1,\cdots,n\}, if hh is function then h×hh\times h denotes a product of hh with itself, limnXn=L2X\lim_{n\to\infty}X_{n}\overset{L_{2}}{=}X denotes convergence in mean square

Hoeffding decomposition reduces any VV-statistic to a sum of canonical VV-statistics with canonical cores hch_{c}, which are easier to study in context of non-iid data. As an illustration, consider a canonical core hh of mm arguments and fix some indexes i1im1imi_{1}\leq\cdots\leq i_{m-1}\ll i_{m}, for a sake of example we may assume that indexes represent time. If observations Zi1,,Zim1Z_{i_{1}},\cdots,Z_{i_{m-1}} are independent of the observation ZimZ_{i_{m}}, then the expected value of h(Zi1,,Zim)h(Z_{i_{1}},\cdots,Z_{i_{m}}), by degeneracy, is equal to zero. If it is reasonable to assume that ZimZ_{i_{m}} is almost independent of Zi1,,Zim1Z_{i_{1}},\cdots,Z_{i_{m-1}}, maybe because it is so distant in time, then it is also reasonable to expect that for a canonical core hh (which is not too complicated )

which follows from the following approximate calculation

Associate with any set of indexes i1,,imi_{1},\cdots,i_{m} its nearest neighbor within the set. Suppose iri_{r} is is an index with the most distant nearest neighbor. We will call iri_{r} the most isolated index, and we will refer to its distance to the nearest neighbor as an isolation distance.

Consider a following example, for the set {1,5,7}\{1,5,7\}, 11 is the most isolated index and the isolation distance is 44.

Given a sequence of random variables ZtZ_{t} and a function hh, if for all sets of indexes i1,,imi_{1},\cdots,i_{m}, with the isolation distance equal to rr

for some some function Δ\varDelta, then we say that the pair (h,Zt)(h,Z_{t}) is of type Δ\varDelta.

The next theorem shows a growth rate of a canonical VV-statistic when a pair h,Zth,Z_{t} is of type Δ\varDelta.

Let (Zt,h)(Z_{t},h), where hh is a function of m>1m>1 arguments, be a of type Δ\varDelta, with Δ(h,r)=o(rk)\varDelta(h,r)=o(r^{-k}) for some kk, then

The proof uses a technique similar to [1, Lemma 3]. We will focus on ordered mm-tuples 1i1imn1\leq i_{1}\leq\ldots\leq i_{m}\leq n, and by considering all possible permutations of their indices, we obtain an upper bound

where (strict) inequality stems from the fact that the mm-tuples with some coinciding entries appear multiple times on the right.

Since (h,Zt)(h,Z_{t}) is a of type Δ\varDelta

where w(i)w(i) is an isolating distance of the index set i=i1,imi=i_{1},\cdots i_{m}. We need to estimate order of the sum

Let us upper bound the number of ordered mm-tuples ii with w(i)=ww(i)=w. Denote s=m2+1s=\left\lfloor\frac{m}{2}\right\rfloor+1. i1i_{1} can take nn different values, but since i2i1+wi_{2}\leq i_{1}+w, i2i_{2} can take at most w+1w+1 different values. For 2ls12\leq l\leq s-1, since min{i2li2l1,i2l1i2l2}w\min\left\{i_{2l}-i_{2l-1},i_{2l-1}-i_{2l-2}\right\}\leq w, we can either let i2l1i_{2l-1} take up to nn different values and let i2li_{2l} take up to w+1w+1 different values (if i2li2l1i2l1i2l2i_{2l}-i_{2l-1}\leq i_{2l-1}-i_{2l-2}) or let i2l1i_{2l-1} take up to w+1w+1 different values and let i2li_{2l} take up to nn different values (if i2li2l1>i2l1i2l2i_{2l}-i_{2l-1}>i_{2l-1}-i_{2l-2}), upper bounding the total number of choices for [i2l1,i2l]\left[i_{2l-1},i_{2l}\right] by 2n(w+1)2n(w+1). Finally, the last term imi_{m} can always have at most w+1w+1 different values. This brings the total number of mm-tuples with w(i)=ww(i)=w to at most 2s2ns1(w+1)s2^{s-2}n^{s-1}(w+1)^{s}. Thus, the number of mm-tuples with w(i)=0w(i)=0 is O(ns1)O(n^{s-1}) and since Eh(Zi1,,Zim)<Eh\left(Z_{i_{1}},\ldots,Z_{i_{m}}\right)<\infty, we have

which proves the claim. We have used Δ(h,w)=o(wk)\varDelta(h,w)=o(w^{-k}). ∎

The previous theorem states sufficient conditions for a VV-statistic or a bootstrapped VV-statistic to converge to zero.

Let hh be a function of m>1m>1 arguments and let ({Zt}tN,h×h)(\{Z_{t}\}_{t\in N},h\times h) be a of type Δ\varDelta, with Δ(h×h,r)=o(r4)\varDelta(h\times h,r)=o(r^{-4}). If {Gi}iN\{G_{i}\}_{i\in N} is a random process, independent of ZtZ_{t}, such that supiEGi4<\sup_{i}EG_{i}^{4}<\infty, with notation Tn=1nm1iNmGi1Gi2h(Zi)T_{n}=\frac{1}{n^{m-1}}\sum_{i\in N^{m}}G_{i_{1}}G_{i_{2}}h(Z_{i}),

is uniformly bounded. We get the bound by applying Cauchy-Schwarz iteratively and using assumption supiEGi4<\sup_{i}EG_{i}^{4}<\infty.

We check that the second non-central moment converges to zero,

Supremum over nn is needed since EGi1Gi2Gj1Gj2EG_{i_{1}}G_{i_{2}}G_{j_{1}}G_{j_{2}} might change with nn. Lemma 4, by the assumption that (h()×h(),Zt)(h(\cdots)\times h(\cdots),Z_{t}) is of type Δ\varDelta, the growth of the inner sum i,jNmEh(Zi)h(Zj)\sum_{i,j\in N^{m}}|Eh(Z_{i})h(Z_{j})| is at most of order

Since Δ(h×h,r)=o(r4)\varDelta(h\times h,r)=o(r^{-4}), the growth rate is

For m=2m=2 we have assumed existence of an extra term o(1)o(1), which concludes the proof. ∎

We next prove that the asymptotic distribution of a VV-statistic depends on number of terms in the Hoeffding decomposition that are equal to zero.

Let hh be a core with mm arguments. If h0=h1=0h_{0}=h_{1}=0, and for all c>2c>2 component (hc×hc,Zt)(h_{c}\times h_{c},Z_{t}) is of type Δ\varDelta, with Δ(hc×hc,r)=o(r4)\varDelta(h_{c}\times h_{c},r)=o(r^{-4}) then

Using Hoeffding decomposition we write the core hh as a sum of the components hch_{c} ,

h0=0h_{0}=0 and h1=0h_{1}=0. By Lemma 4, for c3c\geq 3, nVn(hc)nV_{n}(h_{c}) converges to zero in mean squared. To see that it suffices to put Q=1Q=1 and verify that (hc×hc,Zt)(h_{c}\times h_{c},Z_{t}) is of Δ\varDelta type, which is explicitly assumed. ∎

Before we study the asymptotic distribution of a bootstrapped statistic BnB_{n} we need to sate three simple lemmas that will be frequently used.

By the definition of WiW_{i}, E(i=1nWi)2n2r=1nCov(W0,Wr)=nO(ln)E(\sum_{i=1}^{n}W_{i})^{2}\leq n2\sum_{r=1}^{n}Cov(W_{0},W_{r})=nO(l_{n}), where r=1nCov(W0,Wr)=O(ln)\sum_{r=1}^{n}Cov(W_{0},W_{r})=O(l_{n}) follows from bootstrap assumption. Also, by the Bootstrap assumptions we have limnln3n2=0\lim_{n\to\infty}\frac{l_{n}^{3}}{n^{2}}=0. Therefore 1ni=1nWi\frac{1}{n}\sum_{i=1}^{n}W_{i} converges to zero in mean squared. ∎

If {Wi}\{W_{i}\} is a bootstrap process then

Let ff be a function and let j={j1,,jq}j=\{j_{1},\ldots,j_{q}\} be a subset of {1,,m}\{1,\ldots,m\}. Then

Each element f(Zij1,...,Zijq)f(Z_{i_{j_{1}}},...,Z_{i_{j_{q}}}) is repeated exactly nmqn^{m-q} times. ∎

We now prove an analogue of the Lemma 5 for bootstrapped statistics BB.

and (hc,Zt)(h_{c},Z_{t}) for c>2c>2 are of type Δ\varDelta, with Δ(hc×hc,r)=o(r4)\varDelta(h_{c}\times h_{c},r)=o(r^{-4}) then

Using Hoeffding decomposition we write core hh as a sum of components hch_{c} (the ones with h0,h1h_{0},h_{1} are equal to zero and therefore omitted)

We will show that for almost all fixed j1<<jcj_{1}<\cdots<j_{c} the sum 19 converges to zero.

Suppose j1>2j_{1}>2. The sum 19 can be written

By Lemma 4, for c3c\geq 3, nlnVn(hc)\frac{n}{l_{n}}V_{n}(h_{c}) converges to zero in mean squared. Indeed, it is sufficient to put Gi=1G_{i}=1 and Tn=nVn(hc)T_{n}=nV_{n}(h_{c}) and notice that nlnVn(hc)=1ln=o(1)Tn\frac{n}{l_{n}}V_{n}(h_{c})=\frac{1}{l_{n}}=o(1)T_{n}, since lnl_{n}\to\infty. Consequently, since (1ni=1nQi)2(\frac{1}{n}\sum_{i=1}^{n}Q_{i})^{2} converges to zero in mean square 6, the product, converges to zero in mean square i.e.

Suppose j1=2j_{1}=2. The sum 19 can be written

The latter expression lnni=1nQi\frac{l_{n}}{n}\sum_{i=1}^{n}Q_{i} converges to zero in mean square. The former expression can be further decomposed

We use Lemma 4 for 1lnT+\frac{1}{l_{n}}T_{+} and 1lnT\frac{1}{l_{n}}T_{-}, to show that they converge to zero. We need to check that

Suppose j1=1j_{1}=1 and j2>2j_{2}>2. This case is identical to the previous case, up to swapping i1,i2i_{1},i_{2} in the equation 20.

Finally, suppose j1=1j_{1}=1 and j2=2j_{2}=2 and c>2c>2. The sum 19 can be written

We again use Lemma 4 to see that this sum converges to zero in mean squared (we checked the assumptions above). We have proved that

So far we avoided expressing results in terms of τ\tau-mixing and degeneracy of a core, now we relate Δ\varDelta formalism to those concepts. We start with a technical lemma.

If hh is a Lipschitz continuous core then its components are also Lipschitz continuous.

The auxiliary function used in the Hoeffding decomposition

is Lipschitz, since hh is Lipschitz continuous.

h0h_{0} is obviously Lipschitz continuous. If hkh_{k} for k<ck<c are Lipschitz continuous then, since gcg_{c} is Lipschitz continuous, hch_{c} is also Lipschitz continuous as a sum of Lipschitz continuous functions. ∎

Let {Zt}\left\{Z_{t}\right\} be a τ\tau-dependent stationary process and hh be a Lipschitz core of mm arguments, If for all c>0c>0 (hc×hc,Zt)(h_{c}\times h_{c},Z_{t}) and (h,Zt)(h,Z_{t}) are of type Δ\varDelta with the rate O(τ(d))O(\tau(d)) then

Let f=hc×hcf=h_{c}\times h_{c} or f=hf=h. ff is canonical and Lipschitz continuous (if f=hc×hcf=h_{c}\times h_{c} it follows from Lemma 10). Suppose iri_{r} is the isolating index. Further suppose there are kk indexes a1,,aka_{1},\cdots,a_{k} smaller than iri_{r} and mk1m-k-1 indexes greater than iri_{r}, namely ak+2,,ama_{k+2},\cdots,a_{m}. In this notation ak+1=ira_{k+1}=i_{r}.

Let us partition the vector (Zi1,,Zim)\left(Z_{i_{1}},\ldots,Z_{i_{m}}\right) into three parts:

where ak+1a_{k+1} is the isolating index. If k=0k=0, AA is empty and if k=m1k=m-1, CC is empty but this does not change our arguments below. Using Lemma [9, Lemma 5.3], we will construct BB^{*} and CC^{**} that are independent of AA and independent of each other and

where ww is an isolating distance [9, Lemma 5.3] assumes that there exists a random variable δ\delta independent of the vector (A,B,C)(A,B,C). This assumption is important only if CDF of the vector is not continuous, we can assume that our space is endowed with such δ\delta.. Let D=(B,C)D=(B,C) The [9, Lemma 5.3] guarantees that there exist DD^{*} independent of AA, such that

where dd is the L1L_{1} distance on Euclidean space (non-negativity justifies dropping absolute value). By definition of τ\tau-mixing, τ(w)τ(σ(A),D)\tau(w)\geq\tau(\sigma(A),D). Since D=(B,C)D^{*}=(B^{*},C^{*}) has the same distribution as DD (in particular it has the same τ\tau dependence structure) we use the lemma again to construct CC^{**}, independent of AA and BB^{*}, such that

By the triangle inequality we obtain equation 21.

Since BB^{*} is a singleton, independent of both AA and CC^{**}, by degeneracy of ff

Note that f(A,B,C)f(A,B^{*},C^{**}) is just a shorthand, random variables A,B,CA,B^{*},C^{**} are inserted in the right order. Thus, we have that

In the proof we are going to use [Theorems 2.1, 3.1], which characterise asymptotic properties of nVn(h2)nV_{n}(h_{2}) and nB(h2)nB(h_{2}). Both theorems use similar set of assumptions which we verify upfront. Assumption A2.

(i) h2h_{2} is one-degenerate and symmetric - this follows from the Hoeffding decomposition;

(ii) h2h_{2} is a kernel - is one of the assumptions of this theorem;

(iii) Eh2(Z1,Z1)<Eh_{2}(Z_{1},Z_{1})<\infty – follows from supiN6Eh(Zi)<\sup_{i\in N^{6}}|Eh(Z_{i})|<\infty ;

(iv) h2h_{2} is Lipschitz continuous - follows from the Lemma 10.

Assumption B1, A1. Assumption B1B1, r=1nr2τ(r)<\sum_{r=1}^{n}r^{2}\sqrt{\tau(r)}<\infty, is the same as ours, assumption A1A1, r=1nτ(r)<\sum_{r=1}^{n}\sqrt{\tau(r)}<\infty is implied. Assumption B2. This assumption about the bootstrap process WtW_{t} is the same as our Bootstrap assumptions.

Denote by VV the weak limit of nVn(h2)nV_{n}(h_{2}), which exits by the [Theorem 2.1], and let F=σ(Z1,,Zn)\mathcal{F}=\sigma(Z_{1},\cdots,Z_{n}). By [19, Theorem 3.1], since the distribution of VV is continuous, we have

in probability. We show that nBn(h2)nB_{n}(h_{2}) converges to VV weakly, by showing pointwise convergence of CDF

To change the order of limit and expectation we have dominated convergence Theorem, justified since P(nBn(h)<xF)P(nB_{n}(h)<x|\mathcal{F}) are bounded by 1. The difference n(Bn(h)Vn(h))n(B_{n}(h)-V_{n}(h)) is

By Lemma 9 and Lemma 5 respectively, both

converge to zero in mean square. We check assumptions: since ZtZ_{t} is tau mixing and hh is Lipschitz continuous, by Lemma 11 all self products of components and ZtZ_{t}, (hc×hc,Zt)(h_{c}\times h_{c},Z_{t}) for c>0c>0, are Δ\varDelta type of order τ(r)\tau(r), of order at least o(r4)o(r^{-4}) (since r=1nr2τ(r)<\sum_{r=1}^{n}r^{2}\sqrt{\tau(r)}<\infty). Since hh is one degenerate, first and zero component h0,h1h_{0},h_{1} are equal to zero (and so are B(h0),B(h1)B(h_{0}),B(h_{1})).

This shows that nBn(h2)nB_{n}(h_{2}) converges weakly to VV. ∎

C.2 Proof of Theorem 2

Using Hoeffding decomposition we write the core hh as a sum of the components hch_{c} ,

By the Lemma 4, for c1c\geq 1, Vn(hc)V_{n}(h_{c}) converges to zero in probability. The sum associated with h1h_{1} is

By Lemma 11 (h1×h1,Zt)(h_{1}\times h_{1},Z_{t}) is Δ\varDelta type of order o(r4)o(r^{-4}). Using Lemma 4 we get the growth rate of E(Vn(h1))2=O(1n)E(V_{n}(h_{1}))^{2}=O(\frac{1}{n}), thus Vn(h1)V_{n}(h_{1}) converges in mean square to zero. ∎

C.3 Proof of Theorem 3

We show that the second non central moment of B1B_{1} converges to . The second non central moment is

The inequality in the third line follows from the fact that correlations of the bootstrap process WiW_{i} are positive (Bootstrap assumption) and

and therefore EC(1ni=1nWi)40EC\left(\frac{1}{n}\sum_{i=1}^{n}W_{i}\right)^{4}\to 0.

We now prove that o(n)B2(h)o(n)B_{2}(h) converges to zero. Using Hoeffding decomposition we write core hh as a sum of components hch_{c} and h0h_{0}

We examine terms of the above sum starting form the one with h0h_{0} - it is equal to zero

Term with h1h_{1} is zero as well, to see that fix jj and consider

If j=2j=2 the same reasoning holds and if j>2j>2

By Lemma 9, since B(h0)=B(h1)=0B(h_{0})=B(h_{1})=0, (nB(h)(m2)nB(h2))0(nB(h)-\binom{m}{2}nB(h_{2}))\to 0 in mean square and the only term that remains is

Now we can use the Lemma 4 to show that o(1)Tno(1)T_{n} converges to zero. ∎

C.4 Proof of Proposition 1

Let kk be bounded and Lipschitz continuous, and let {Xt}\left\{X_{t}\right\} and {Yt}\left\{Y_{t}\right\} both be τ\tau-dependent with coefficients τ(i)=O(i6ϵ)\tau(i)=O(i^{-6-\epsilon}), but independent of each other. Further, let nx=ρxnn_{x}=\rho_{x}n and ny=ρynn_{y}=\rho_{y}n where n=nx+nyn=n_{x}+n_{y}. Then, under the null hypothesis Px=PyP_{x}=P_{y}, φ(ρxρynMMD^k,ρxρynMMD^k,b)0\varphi\left(\rho_{x}\rho_{y}n\widehat{\text{MMD}}_{k},\rho_{x}\rho_{y}n\widehat{\text{MMD}}_{k,b}\right)\to 0 in probability as nn\to\infty, where φ\varphi is the Prokhorov metric.

Appendix D Various comments

The original HSIC and MMD tests for i.i.d. data, the computational cost of the wild bootstrap approach scales quadratically in the number of samples, and linearly in the number of bootstrap iterations (in the i.i.d. case, these were permutations of the data). The main alternative approaches are the lagged bootstrap of , which has the same scaling with data and number of bootstraps, and the spectrogram approach of (note, however, that both these alternative approaches apply only to the independence testing case). The cost of is comparable to our approach, however the statistical power of was much weaker on the data we examined.