---
abstract: 'Motivated by change point problems in time series and the detection of textured objects in images, we consider the problem of detecting a piece of a Gaussian Markov random field hidden in white Gaussian noise. We derive minimax lower bounds and propose near-optimal tests.'
author:
- 'Ery Arias-Castro[^1]'
- 'Sébastien Bubeck[^2]'
- 'Gábor Lugosi[^3]'
- 'Nicolas Verzelen[^4]'
bibliography:
- 'ref.bib'
title: Detecting Markov Random Fields Hidden in White Noise
---

Introduction {#sec:intro}
============

Anomaly detection is important in a number of applications, including surveillance and environment monitoring systems using sensor networks, object tracking from video or satellite images, and tumor detection in medical imaging. The most common model is that of an object or signal of unusually high amplitude hidden in noise. In other words, one is interested in detecting the presence of an object in which the mean of the signal is different from that of the background. We refer to this as the *detection-of-means* problem. In many situations, anomaly manifests as unusual dependencies in the data. This *detection-of-correlations* problem is the one that we consider in this paper.

Setting and hypothesis testing problem {#sec:setting}
--------------------------------------

It is common to model dependencies by a Gaussian random field $\X = (X_i : i \in \cV)$, where $\cV \subset \cV_\infty$ is of size $|\cV| = n$, while $\cV_\infty$ is countably infinite. We focus on the important example of a $d$-dimensional integer lattice \[lattice\] = {1, …, m}\^d \_= \^d. We formalize the task of detection as the following hypothesis testing problem. One observes a realization of $\X = (X_i : i \in \cV)$, where the $X_i$’s are known to be standard normal. Under the null hypothesis $\cH_0$, the $X_i$’s are independent. Under the alternative hypothesis $\cH_1$, the $X_i$’s are correlated in one of the following ways. Let $\cC$ be a class of subsets of $\cV$. Each set $S\in \cC$ represents a possible anomalous subset of the components of $\X$. Specifically, when $S \in \cC$ is the anomalous subset of nodes, each $X_i$ with $i \notin S$ is still independent of all the other variables, while $(X_i : i \in S)$ coincides with $(Y_i : i \in S)$, where $\Y=(Y_i : i \in \cV_\infty)$ is a stationary Gaussian Markov random field. We emphasize that, in this formulation, the anomalous subset $S$ is only known to belong to $\cC$.

We are thus addressing the problem of detecting a region of a Gaussian Markov random field against a background of white noise. This testing problem models important detection problems such as the detection of a piece of a time series in a signal and the detection of a textured object in an image, which we describe below. Before doing that, we further detail the model and set some foundational notation and terminology.

Tests and minimax risk {#sec:tests}
----------------------

We denote the distribution of $\X$ under $\cH_0$ by $\PROB_0$. The distribution of the zero-mean stationary Gaussian Markov random field $\Y$ is determined by its covariance operator $\bGamma=(\bGamma_{i,j} : i,j\in \cV_\infty)$ defined by $\bGamma_{i,j}=\EXP[Y_i Y_j]$. We denote the distribution of $\X$ under $\cH_1$ by $\PROB_{S,\bGamma}$ when $S\in \cC$ is the anomalous set and $\bGamma$ is the covariance operator of the Gaussian Markov random field $\Y$.

A *test* is a measurable function $f: \bbR^\cV \to \{0,1\}$. When $f(\X)=0$, the test accepts the null hypothesis and it rejects it otherwise. The probability of *type I* error of a test $f$ is $\PROB_0\{f(\X)=1\}$. When $S\in \cC$ is the anomalous set and $\Y$ has covariance operator $\bGamma$, the probability of *type II* error is $\PROB_{S,\bGamma}\{f(\X)=0\}$. In this paper we evaluate tests based on their *worst-case risks*. The risk of a test $f$ corresponding to a covariance operator $\bGamma$ and class of sets $\cC$ is defined as \[risk-known-f\] R\_[,]{}(f) = \_0{f()=1} + \_[S ]{} \_[S,]{}{f()=0} . Defining the risk this way is meaningful when the distribution of $\Y$ is known, meaning that $\bGamma$ is available to the statistician. In this case, the minimax risk is defined as \[risk-known\] R\^\*\_[,]{} = \_f R\_[,]{}(f) , where the infimum is over all tests $f$. When $\bGamma$ is only known to belong to some class of covariance operators $\mathfrak{G}$, it is more meaningful to define the risk of a test $f$ as \[risk-unknown-f\] R\_[,]{}(f) = \_0{f()=1} + \_ \_[S ]{} \_[S,]{}{f()=0} . The corresponding minimax risk is defined as \[risk-unknown\] R\_[,]{}\^\* = \_f R\_[,]{}(f) . In this paper we consider situations in which the covariance operator $\Gamma$ is known (i.e., the test $f$ is allowed to be constructed using this information) and other situations when $\Gamma$ is unknown but it is assumed to belong to a class $\mathfrak{G}$. When $\bGamma$ is known (resp. unknown), we say that a test $f$ *asymptotically separates the two hypotheses* if $R_{\cC,\bGamma}(f) \to 0$ (resp. $R_{\cC,\mathfrak{G}}(f) \to 0$), and we say that the hypotheses *merge asymptotically* if $R_{\cC,\bGamma}^* \to 1$ (resp. $R_{\cC,\mathfrak{G}}^* \to 1$), as $n = |\cV| \to \infty$. We note that, as long as $\bGamma \in \mathfrak{G}$, $R_{\cC,\bGamma}^* \le R_{\cC,\mathfrak{G}}^*$, and that $R_{\cC,\mathfrak{G}}^* \le 1$, since the test $f \equiv 1$ (which always rejects) has risk equal to $1$.

At a high-level, our results are as follows. We characterize the minimax testing risk for both known ($R^*_{\cC,\bGamma}$) and unknown ($R_{\cC,\mathfrak{G}}^*$) covariances when the anomaly is a Gaussian Markov random field. More precisely, we give conditions on $\bGamma$ or $\mathfrak{G}$ enforcing the hypotheses to merge asymptotically so that detection problem is nearly impossible. Under nearly matching conditions, we exhibit tests that asymptotically separate the hypotheses. Our general results are illustrated in the following subsections.

Example: detecting a piece of time series {#sec:intro-tseries}
-----------------------------------------

As a first example of the general problem described above, consider the case of observing a time series $X_1,\ldots,X_n$. This corresponds to the setting of the lattice in dimension $d=1$. Under the null hypothesis, the $X_i$’s are i.i.d. standard normal random variables. We assume that the anomaly comes in the form of temporal correlations over an (unknown) interval $S = \{i+1, \dots, i+k\}$ of, say, known length $k<n$. Here, $i\in \{0,1\ldots,n-k\}$ is thus unknown. Specifically, when $S$ is the anomalous interval, $(X_{i+1}, \dots, X_{i+k}) \sim (Y_{i+1}, \dots, Y_{i+k})$, where $(Y_i: i \in \bbZ)$ is an autoregressive process of order $h$ (abbreviated $\ar_h$) with zero mean and unit variance, that is, \[ARp\] Y\_i = \_1 Y\_[i-1]{} + + \_h Y\_[i-h]{} + Z\_i, i , where $(Z_i: i \in \bbZ)$ are i.i.d. standard normal random variables, $\psi_1, \dots, \psi_h \in \bbR$ are the coefficients of the process—assumed to be stationary—and $\sigma>0$ is such that $\Var(Y_i) = 1$ for all $i$. Note that $\sigma$ is a function of $\psi_1, \dots, \psi_h$, so that the model has effectively $h$ parameters. It is well-known that the parameters $\psi_1,\ldots,\psi_h$ define a stationary process when the roots of the polynomial $z^p - \sum_{i=1}^p \psi_i z^{p-i}$ in the complex plane lie within the open unit circle. See [@MR1093459] for a standard reference on time series.

In the simplest setting $h=1$ and the parameter space for $\psi$ is $(-1,1)$. Then, the hypothesis testing problem is to distinguish $$\cH_0: X_1, \dots, X_n \iid \cN(0,1),$$ versus $$\cH_1: \exists i \in \{0,1,\ldots,n-k\} \text{ such that }$$ $$X_1, \dots, X_i, X_{i+k+1}, \dots, X_n \iid \cN(0,1)$$ and $(X_{i+1}, \dots, X_{i+k})$ is independent of $X_1, \dots, X_i, X_{i+k+1}, \dots, X_n$ with $$%X_{i+1} \sim \cN(0,1), \quad 
X_{i+j+1} - \psi X_{i+j} \iid \cN(0,1-\psi^2), \quad \forall j \in \{1, \dots, k-1\}\ .$$ Typical realizations of the observed vector under the null and alternative hypotheses are illustrated in .

![Top: a realization of the observed time series under the null hypothesis (white noise). Bottom: a realization under the alternative with anomalous interval $S = \{201, \dots, 250\}$, assuming an $\ar_1$ covariance model with parameter $\psi = 0.9$.[]{data-label="fig:timeseries"}](tseries-H0 "fig:"){width="0.9\linewidth"}\
![Top: a realization of the observed time series under the null hypothesis (white noise). Bottom: a realization under the alternative with anomalous interval $S = \{201, \dots, 250\}$, assuming an $\ar_1$ covariance model with parameter $\psi = 0.9$.[]{data-label="fig:timeseries"}](tseries-H1 "fig:"){width="0.9\linewidth"}

Gaussian autoregressive processes and other correlation models are special cases of Gaussian Markov random fields, and therefore this setting is a special case of our general framework, with $\cC$ being the class of discrete intervals of length $k$. In the simplest case, the length of the anomalous interval is known beforehand. In more complex settings, it is unknown, in which case $\cC$ may be taken to be the class of all intervals within $\cV$ of length at least $k_{\rm min}$.

This testing problem has been extensively studied in the slightly different context of change-point analysis, where under the null hypothesis $X_1, \dots, X_n$ are generated from an $\ar_h(\psi^0)$ process for some $\psi^0\in \mathbb{R}^h$, while under the alternative hypothesis there is an $i \in \cV$ such that $X_1, \dots, X_i$ and $X_{i+1}, \dots, X_n$ are generated from $\ar_h(\psi^0)$ and $\ar_h(\psi^1)$, with $\psi^0 \ne \psi^1$, respectively. The order $h$ is often given. In fact, instead of assuming autoregressive models, nonparametric models are often favored. See, for example, [@MR0269062; @MR1331669; @springerlink:10.1007/BF00970969; @MR1791905; @MR2597589; @MR2301477; @MR809433; @MR1200409] and many other references therein. These papers often suggest maximum likelihood tests whose limiting distributions are studied under the null and (sometimes fixed) alternative hypotheses. For example, in the special case of $h=1$, such a test would reject $\cH_0$ when $|\hat \psi|$ is large, where $\hat \psi$ is the maximum likelihood estimate for $\psi$. In particular, from [@MR809433], we can speculate that such a test can asymptotically separate the hypotheses in the simplest setting described above when $\psi k^\alpha \to \infty$ for some $\alpha < 1/2$ fixed. See also [@MR2301477; @MR2597589] for power analyses against fixed alternatives.

Our general results imply the following in the special case when the anomaly comes in the form of an autoregressive process with unknown parameter $\psi \in \bbR^h$. We note that the order of the autoregressive model $h$ is allowed to grow with $n$ in this asymptotic result.

\[cor:AR\] Assume $n, k \to \infty$, and that $h = o\big(\sqrt{k/\log(n)}\wedge k^{1/4}\big)$. Denote by $\mathfrak{F}(h,r)$ the class of covariance operators corresponding to $AR_h$ processes with valid parameter $\psi=(\psi_1,\ldots, \psi_h)$ satisfying $\|\psi\|_2^2\geq r^2$. Then $R_{\cC,\mathfrak{F}(h,r)}^* \to 1$ when \[AR1\] r\^2 C\_1 ((n/k)/k + /k) . Conversely, if $f$ denotes the pseudo-likelihood test of Section \[sec:fisher\], then $R_{\cC,\mathfrak{F}(h,r)}(f) \to 0$ when \[AR2\] r\^2 C\_2 ((n)/k + /k) . In both cases, $C_1$ and $C_2$ denote numerical constants.

In the interesting setting where $k = n^\kappa$ for some $\kappa > 0$ fixed, the lower and upper bounds provided by match up to a multiplicative constant that depends only on $\kappa$.

Despite an extensive literature on the topic, we are not aware of any other minimax optimality result for time series detection.

Example: detecting a textured region {#sec:intro-images}
------------------------------------

In image processing, the detection of textured objects against a textured background is relevant in a number of applications, such as in the detection of local fabric defects in the textile industry by automated visual inspection [@4418522], the detection of a moving object in a textured background [@yilmaz2006object; @Kim2005172], the identification of tumors in medical imaging [@1229852; @breast-tumor], the detection of man-made objects in natural scenery [@10.1109/CVPR.2003.1211345], the detection of sites of interest in archeology [@litton] and of weeds in crops [@MR1959083]. In all these applications, the object is generally small compared to the size of the image.

Common models for texture include Markov random fields [@4767341] and joint distributions over filter banks such as wavelet pyramids [@531803; @springerlink:10.1023/A:1026553619983]. We focus here on textures that are generated via Gaussian Markov random fields [@1164641; @springerlink:10.1023/A:1007925832420]. Our goal is to detect a textured object hidden in white noise. For this discussion, we place ourselves in the lattice setting in dimension $d=2$. Just like before, under $\cH_0$, the $(X_i : i\in \cV)$ are independent standard normal random variables. Under $\cH_1$, when the region $S \subset \cV$ is anomalous, the $(X_i : i\notin S)$ are still i.i.d. standard normal, while $(X_i : i \in S) \sim (Y_i : i \in S)$, where $(Y_i: i \in \bbZ^2)$ is such that for each $i\in \bbZ^2$, the conditional distribution of $Y_i$ given the rest of the variables $Y^{(-i)} := (Y_j : j \ne i)$ is normal with mean \[markov-lattice\] \_[(t\_1,t\_2)\^2{(0,0)}]{} \_[t\_1, t\_2]{} Y\_[i + (t\_1, t\_2)]{} and variance $\sigma_{\phi}^2$, where the $\phi_{t_1,t_2}$’s are the coefficients of the process and $\sigma_{\phi}$ is such that $\Var(Y_i) = 1$ for all $i$. The set of valid parameters $\phi$ is defined in Section \[sec:prelim\_gmrf\]. A simple sufficient condition is $\|\phi\|_1= \sum_{(t_1,t_2)\in [-h,h]^2\setminus \{(0,0)\}} |\phi_{t_1, t_2}|<1$. In this model, the *dependency neighborhood* of $i \in \bbZ^2$ is $i + [-h,h]^2 \cap \bbZ^2$. One of the simplest cases is when $h=1$ and $\phi_{t_1, t_2} = \phi$ when $(t_1,t_2) \in \{(\pm1,0), (0,\pm1)\}$ for some $\phi \in (-1/4, 1/4)$, and the anomalous region is a discrete square; see Figure \[fig:texture\] for a realization of the resulting process.

This is a special case of our setting. While intervals are natural in the case of time series, squares are rather restrictive models of anomalous regions in images. We consider instead the “blob-like” regions (to be defined later) that include convex and star-shaped regions.

![Left: white noise, no anomalous region is present. Right: a squared anomalous region is present. In this example on the $50 \times 50$ grid, the anomalous region is a $15 \times 15$ square piece from a Gaussian Markov random field with neighborhood radius $h=1$ and coefficient vector $\phi_{t_1, t_2} = \phi := \frac14(1-10^{-4})$ when $(t_1,t_2) \in \{(\pm1,0), (0,\pm1)\}$, and zero otherwise.[]{data-label="fig:texture"}](texture-H0 "fig:"){width=".30\linewidth"}   ![Left: white noise, no anomalous region is present. Right: a squared anomalous region is present. In this example on the $50 \times 50$ grid, the anomalous region is a $15 \times 15$ square piece from a Gaussian Markov random field with neighborhood radius $h=1$ and coefficient vector $\phi_{t_1, t_2} = \phi := \frac14(1-10^{-4})$ when $(t_1,t_2) \in \{(\pm1,0), (0,\pm1)\}$, and zero otherwise.[]{data-label="fig:texture"}](texture-H1 "fig:"){width=".30\linewidth"}  

A number of publications address the related problems of texture classification [@kervrann1995markov; @springerlink:10.1023/A:1007925832420; @varma05] and texture segmentation [@jain1991unsupervised; @buhmann98; @MR1966045; @sharon; @malik-belongie-al]. In fact, this literature is quite extensive. Only very few papers address the corresponding change-point problem [@shahrokni; @palenichka:158] and we do not know of any theoretical results in this literature. Our general results (in particular, Corollary \[cor:lower\_hypercube\]) imply the following.

\[cor:image\] Assume $n, k \to \infty$, and that $h = o\big(\sqrt{k/\log(n)}\wedge k^{1/5}\big)$. Denote by $\mathfrak{G}(h,r)$ the class of covariance operators corresponding to stationary Gaussian Markov Random Fields with valid parameter (see Section \[sec:prelim\_gmrf\] for more details) $\phi=(\phi_{i,j})_{(i,j)\in \{-h,\ldots, h\}^2\setminus \{0\}}$ satisfying $\|\phi\|_2^2\geq r^2$. Then $R_{\cC,\mathfrak{G}(h,r)}^* \to 1$ when \[CAR1\] r\^2 C\_1 . Conversely, if $f$ denotes the pseudo-likelihood test of Section \[sec:fisher\], then $R_{\cC,\mathfrak{G}(h,r)}(f) \to 0$ when \[CAR2\] r\^2 C\_2  . In both cases, $C_1$ and $C_2$ denote positive numerical constants.

Informally, the lower bound on the magnitude of the coefficient vector $\phi$, namely $r^2$, quantifies the extent to which the variables $Y_i$ are explained by the rest of variables $Y^{(-i)}$ as in .

Although not in the literature on change-point or object detection, [@anandkumar2009detection] is the only other paper developing theory in a similar context. It considers a spatial model where points $\{x_i, i \in [N]\}$ are sampled uniformly at random in some bounded region and a nearest-neighbor graph is formed. On the resulting graph, variables are observed at the nodes. Under the (simple) null hypothesis, the variables are i.i.d. zero mean normal. Under the (simple) alternative, the variables arise from a Gaussian Markov random with covariance operator of the form $\Gamma_{i,j} \propto g(\|x_i - x_j\|)$, where $g$ is a known function. The paper analyzes the large-sample behavior of the likelihood ratio test.

More related work
-----------------

As we mentioned earlier, the detection-of-means setting is much more prevalent in the literature. When the anomaly has no a priori structure, the problem is that of multiple testing; see, for example, [@Ingster99; @baraud; @MR2065195] for papers testing the global null hypothesis. Much closer to what interests us here, the problem of detecting objects with various geometries or combinatorial properties has been extensively analyzed, for example, in some of our earlier work [@maze; @combin; @cluster] and elsewhere [@MR2604703; @morel]. We only cite a few publications that focus on theory. The applied literature is vast; see [@cluster] for some pointers.

Despite its importance in practice, as illustrated by the examples and references given in Sections \[sec:intro-tseries\] and \[sec:intro-images\], the detection-of-correlations setting has received comparatively much less attention, at least from theoreticians. Here we find some of our own work [@correlation-detect; @multidim]. In the first of these papers, we consider a sequence $X_1, \dots, X_n$ of standard normal random variables. Under the null, they are independent. Under the alternative, there is a set $S$ in a class of interest $\cC$ where the variables are correlated. We consider the unstructured case where $\cC$ is the class of all sets of size $k$ (given) and also various structured cases, and in particular, that of intervals. This would appear to be the same as in the present lattice setting in dimension $d=1$, but the important difference is that that correlation operator $\bGamma$ is not constrained, and in particular no Markov random field structure is assumed. The second paper extends the setting to higher dimensions, thus testing whether some coordinates of a high-dimensional Gaussian vector are correlated or not. When the correlation structure in the anomaly is arbitrary, the setting overlaps with that of sparse principal component analysis [@berthet; @cai2013sparse]. The problem is also connected to covariance testing in high-dimensions; see, e.g., [@cai2013optimal]. We refer the reader to the above-mentioned papers for further references.

Contribution and content
------------------------

The present paper thus extends previous work on the detection-of-means setting to the detection-of-correlations setting in the (structured) context of detecting signals/objects in time series/images. The paper also extends some of our own work on the detection-of-correlations to Markov random field models, which are typically much more appropriate in the context of detection in signals and images. The theory in the detection-of-correlations setting is more complicated than in the the detection-of-means setting, and in particular deriving exact minimax (first-order) results remains an open problem. Compared to our previous work on the detection-of-correlations setting, the Markovian assumption makes the problem significantly more complex as it requires handling Markov random fields which are conceptually more complex objects. As a result, the proof technique is by-and-large novel, at least in the detection literature.

The rest of the paper is organized as follows. In we lay down some foundations on Gaussian Markov Random Fields, and in particular, their covariance operators, and we also derive a general minimax lower bound that is used several times in the paper. In the remainder of the paper, we consider detecting correlations in a finite-dimensional lattice , which includes the important special cases of time series and textures in images. We establish lower bounds, both when the covariance matrix is known (Section \[sec:known\]) or unknown (Section \[sec:unknown\]) and propose test procedures that are shown to achieve the lower bounds up to multiplicative constants. In Section \[sec:cubes\], we specialize our general results to specific classes of anomalous regions such as classes of cubes, and more generally, “blobs.” In we outline possible generalizations and further work. The proofs are gathered in .

Preliminaries {#sec:prelim}
=============

In this paper we derive upper and lower bounds for the minimax risk, both when $\bGamma$ is known as in and when it is unknown as in , the latter requiring a substantial amount of additional work. For the sake of exposition, we sketch here the general strategy for obtaining minimax lower bounds by adapting the general strategy initiated in [@ingster93a] to detection-of-correlation problems. This allows us to separate the technique used to derive minimax lower bounds from the technique required to handle Gaussian Markov random fields.

Some background on Gaussian Markov random fields {#sec:prelim_gmrf}
------------------------------------------------

We elaborate on the setting described in Sections \[sec:setting\] and \[sec:tests\]. As the process $Y$ is indexed by $\mathbb{Z}^d$, note that all the indices $i$ of $\phi$ and $\bGamma$ are $d$-dimensional. Given a positive integer $h$, denote by $\bbN_h$ the integer lattice $\{-h, \dots, h\}^d \setminus\{0\}^d$ with $(2h+1)^d-1$ nodes. For any nonsingular covariance operator $\bGamma$ of a stationary Gaussian Markov random field over $\mathbb{Z}^d$ with unit variance and neighborhood $\bbN_h$, there exists a unique vector $\phi$ indexed by the nodes of $\bbN_h$ satisfying $\phi_i=\phi_{-i}$ such that, for all $i,j\in \bbZ^d$, \^[-1]{}\_[i,j]{}/\^[-1]{}\_[i,i]{}=

- \_[i-j]{}& 1|i-j|\_h,\
1 &i=j,\
0 &

\[eq:conditions\] where $\bGamma^{-1}$ denotes the inverse of the covariance operator $\bGamma$. Consequently, there exists a bijective map from the collection of invertible covariance operators of stationary Gaussian Markov random fields over $\mathbb{Z}^d$ with unit variance and neighborhood $\bbN_h$ to some subset $\Phi_h\subset \bbR^{\bbN_h}$. Given $\phi\in \Phi_h$, $\bGamma(\phi)$ denotes the unique covariance operator satisfying $\bGamma_{i,i}=1$ and . It is well known that $\Phi_h$ contains the set of vectors $\phi$ whose $\ell_1$-norm is smaller than one, that is, $$\{\phi \in \bbR^{\bbN_h} : \|\phi\|_1 < 1\} \subset \Phi_h\ ,$$ as the corresponding operator $\bGamma^{-1}(\phi)$ is diagonally dominant in that case. In fact, the parameter space $\Phi_h$ is characterized by the Fast Fourier Transform (FFT) as follows $$\Phi_h=\Big\{\phi:\quad 1+ \sum_{1\leq |i|_{\infty}\leq h  } \phi_i \cos(\langle i,\omega\rangle) >0,\quad \forall \omega \in (-\pi,\pi]^{d}\Big\}\ ,$$ where and $i\in \mathbb{Z}^d$ and $\langle \cdot , \cdot\rangle$ denotes the scalar product in $\mathbb{R}^d$. The interested reader is referred to [@MR1344683 Sect.1.3] or [@MR2130347 Sect.2.6] for further details and discussions. For $\phi\in \Phi_h$, define $\sigma^{2}_{\phi}=1/\bGamma _{i,i}^{-1}(\phi)$.

The correlated process $Y=(Y_i : i\in \bbZ^d)$ is centered Gaussian with covariance operator $\bGamma(\phi)$ is such that, for each $i\in \mathbb{Z}^d$, the conditional distribution of $Y_i$ given the rest of the variables $Y^{(-i)}$ is \[eq:conditional\_definition\] Y\_[i]{}|Y\^[(-i)]{}  \~ (\_[j\_h]{} \_[j]{}Y\_[i+j]{}, \^2\_)  .

Define the *$h$-boundary* of $S$, denoted $\Delta_h(S)$, as the collection of vertices in $S$ whose distance to $\bbZ^d\setminus S$ is at most $h$. We also define the *$h$-interior* $S$ as $S^h = S\setminus \Delta_h(S)$. If $S\subset \cV$ is a finite set, we denote by $\bGamma_{S}$ the principal submatrix of the covariance operator $\bGamma$ indexed by $S$. If $\bGamma$ is nonsingular, each such submatrix is invertible.

A general minimax lower bound
-----------------------------

As is standard, an upper bound is obtained by exhibiting a test $f$ and then upper-bounding its risk—either or according to whether $\bGamma$ is known or unknown. In order to derive a lower bound for the minimax risk, we follow the standard argument of choosing a prior distribution on the class of alternatives and then lower-bounding the minimax risk with the resulting *average risk*. When $\bGamma$ is known, this leads us to select a prior on $\cC$, denoted by $\nu$, and consider \[risk-nu-gamma\] |[R]{}\_[,]{}(f) = \_0{f()=1} + \_[S]{} (S) \_[S,]{}{f()=0} |[R]{}\^\*\_[,]{} = \_f |[R]{}\_[,]{}(f) . The latter is the *Bayes risk* associated with $\nu$. By placing a prior on the class of alternative distributions, the alternative hypothesis becomes effectively simple (as opposed to composite). The advantage of this is that the optimal test may be determined explicitly. Indeed, the Neyman-Pearson fundamental lemma implies that the likelihood ratio test $f_{\nu,\bGamma}^*(x) = \IND{L_{\nu,\bGamma}(x) > 1}$, with $$L_{\nu,\bGamma} = \sum_{S\in \cC} \nu(S) \frac{{\rm d}\PROB_{S,\bGamma}}{{\rm d}\PROB_0}~,$$ minimizes the average risk. In most of the paper, $\nu$ will be chosen as the uniform distribution on the class $\cC$. In this because the sets in $\cC$ play almost the same role (although not exactly because of boundary effects).

When $\bGamma$ is only known to belong to some class $\mathfrak{G}$ we also need to choose a prior on $\mathfrak{G}$, which we denote by $\pi$, leading to \[risk-nu-pi\] |[R]{}\_[,]{}(f) = \_0{f()=1} + \_[S]{} (S) \_[S,]{}{f()=0} ([d]{}) |[R]{}\^\*\_[,]{} = \_f |[R]{}\_[,]{}(f) . In this case, the likelihood ratio test becomes $f_{\nu,\pi}^*(x) = \IND{L_{\nu,\pi}(x) > 1}$, where $$L_{\nu,\pi} = \sum_{S\in \cC} \nu(S) \frac{{\rm d}\PROB_{S,\pi}}{{\rm d}\PROB_0}~, \quad \PROB_{S,\pi} = \int \PROB_{S,\bGamma} \pi({\rm d}\bGamma)~,$$ minimizes the average risk.

In both cases, we then proceed to bound the second moment of the resulting likelihood ratio under the null. Indeed, in a general setting, if $L$ is the likelihood ratio for $\P_0$ versus $\P_1$ and $R$ denotes its risk, then [@TSH Problem 3.10] \[LR-risk-general\] R = 1 - 12 \_0 | L(X) - 1 | 1 - 12  , where the inequality follows by the Cauchy-Schwarz inequality.

Working with the minimax risk (as we do here) allows us to bypass making an explicit choice of prior, although one such choice is eventually made when deriving a lower bound. Another advantage is that the minimax risk is monotone with respect to the class $\cC$ in the sense that if $\cC'\subset
\cC$, then the minimax risk corresponding to $\cC'$ is at most as large as that corresponding to $\cC$. This monotonicity does not necessarily hold for the Bayes risk. See [@combin] for a discussion in the context of the detection-of-means problem.

We now state a general minimax lower bound. (Recall that all the proofs are in .) Although the result is stated for a class $\cC$ of disjoint subsets, using the monotonicity of the minimax risk, the result can be used to derive lower bounds in more general settings. It is particularly useful in the context of detecting blob-like anomalous regions in the lattice. (The same general approach is also fruitful in the detection-of-means setting.) We emphasize that this result is quite straightforward given the work flow outlined above. The technical difficulties will come with its application to the context that interest us here, which will necessitate a good control of below.

Recall the definition .

\[prp:non\_overlap\_parametric\] Let $\{\bGamma(\phi): \phi\in \Phi\}$ be a class of nonsingular covariance operators and let $\cC$ be a class of disjoint subsets of $\cV$. Put the uniform prior $\nu$ on $\cC$ and let $\pi$ be a prior on $\Phi$. Then $$\bar{R}^*_{\nu,\pi} \ge 1 - \frac{1}{2|\cC| } \Big(\sum_{S\in \cC}
V_S\Big)^{1/2}\ ,$$ where \[V\_S\] V\_S := \_  , and the expected value is with respect to $\phi_1,\phi_2$ drawn i.i.d. from the distribution $\pi$.

Known covariance {#sec:known}
================

We start with the case where the covariance operator $\bGamma$ is known. Although this setting is of less practical importance, as this operator is rarely known in applications, we treat this case first for pedagogical reasons and also to contrast with the much more complex setting where the operator is unknown, treated later on.

Lower bound {#sec:lower-known}
-----------

Recall the definition of the minimax risk and the average risk . (Henceforth, to lighten the notation, we replace subscripts in $\bGamma(\phi)$ with subscripts in $\phi$.) For any prior $\nu$ on $\cC$, the minimax risk is at least as large as the $\nu$-average risk, $R^*_{\cC,\phi} \ge \bar{R}^*_{\nu,\phi}$, and the following corollary of Proposition \[prp:non\_overlap\_parametric\] provides a lower bound on the latter.

\[cor:non\_overlap\_GMRF\] Let $\cC$ be a class of disjoint subsets of $\cV$ and fix $\phi\in
\Phi_h$ satisfying $\|\phi\|_1<1/2$. Then, letting $\nu$ denote the uniform prior over $\cC$, we have \[eq:lower\_R\*\_GMRF1\] |[R]{}\^\*\_[,]{} 1 - \^[1/2]{} .

In particular, the corollary implies that, for any fixed $a\in (0,1)$, $R^*_{\cC,\phi} \ge 1-a$ as soon as \[eq:lower\_R\*\_GMRF1-2\] \_[S]{} . Furthermore, the hypotheses merge asymptotically (i.e., $R^*_{\cC,\phi} \to 1$) when \[nonoverlap3\] (||) - \_[S ]{} |S|  .

The condition $\|\phi\|_1<1/2$ in is technical and likely an artifice of our proof method. This condition arises from the term $\det^{-1/2}(2\bGamma_S(\phi)-\bI_S)$ in $V_S$ in . For this determinant to be positive, the smallest eigenvalue of $\bGamma_S(\phi)$ has to be larger than $1/2$, which in turn is enforced by $\|\phi\|_1<1/2$. In order to remove, or at least improve on this constraint, we would need to adopt a more subtle approach than applying the Cauchy-Schwarz inequality in . We did not pursue this as typically one is interested in situations where $\phi$ is small — see, for example, how the result is applied in .

Upper bound: the generalized likelihood ratio test {#sec:glrt}
--------------------------------------------------

When the covariance operator $\bGamma(\phi)$ is known, the generalized likelihood ratio test rejects the null hypothesis for large values of $$\max_{S \in \cC} \ X_S^\top (\bI_S - \bGamma_S^{-1}(\phi)) X_S~.$$ We use instead the statistic \[U\] U(X) = \_[S ]{}   , which is based on the centering and normalization the statistics $X_S^\top (\bI_S - \bGamma_S^{-1}(\phi)) X_S$ where $S\in \cC$.

In the following result, we implicitly assume that $|\cC| \to \infty$, which is the most interesting case.

\[prp:glrt\] Assume that $\phi\in \Phi_h$ satisfies $\|\phi\|_1 \le \eta < 1$ and that $|S^h|\geq |S|/2$. The test $f(x)=\IND{U(x) > 4}$ has risk $R_{\cC,\phi}(f) \le 2/|\cC|$ when \[glrt4\] \_2\^2 \_[S ]{} |S| C\_0 (||) , where $C_0 > 0$ only depends on the dimension $d$ of the lattice and $\eta$.

Comparing with Condition , we see that condition matches (up to constants) the minimax lower bound, so that (at least when $\|\phi\|_1 < 1/2$) the normalized generalized likelihood ratio test based on is asymptotically minimax up to a multiplicative constant. The $\ell_1$-norm $\|\phi\|_1$ arises in the proof of Corollary \[cor:non\_overlap\_GMRF\] when bounding the largest eigenvalue of $\bGamma(\phi)$ (see Lemma \[lem:spectrum\_gamma\]).

Unknown covariance {#sec:unknown}
==================

We now consider the case where the covariance operator $\bGamma(\phi)$ of the anomalous Gaussian Markov random field is unknown. We therefore start by defining a class of covariance operators via a class of vectors $\phi$. Given a positive integer $h>0$ and some $r>0$, define \[eq:definition\_phi\_h\_r\] \_h(r) := {\_h, \_2 r} , and let \[eq:G\] (h,r) := {() : \_h(r)} , which is the class of covariance operators corresponding to stationary Gaussian Markov Random Fields with parameter in the class .

Lower bound {#sec:lower-unknown}
-----------

The theorem below establishes a lower bound for the risk following the approach outlined in , which is based on the choice of a suitable prior $\pi$ on $\Phi_h$, defined as follows. By symmetry of the elements of $\Phi_h$, one can fix a sublattice $\bbN'_h$ of size $|\bbN_h|/2$ such that any $\phi\in\Phi_h$ is uniquely defined (via symmetry) by its restriction to $\bbN'_h$. Choose the distribution $\pi$ such that $\phi\sim \pi$ is the unique extension to $\bbN_h$ of the random vector $ r|\bbN_h|^{-1/2}\xi$, where the coordinates of the random vector $\xi$—indexed by $\bbN'_h$—are i.i.d. Rademacher random variables (i.e., symmetric $\pm 1$-valued random variables). Note that, if $r|\bbN_h|<1$, $\pi$ is acceptable since it concentrates on the set $\{\phi\in \Phi_h,\ \|\phi\|_2 = r\} \subset \Phi_h(r)$. Recall the definition of the minimax risk and the average risk . As before, for any priors $\nu$ on $\cC$ and $\pi$ on $\Phi_h(r)$, the minimax risk is at least as large as the average risk with these priors, $R^*_{\cC,\mathfrak{G}(h,r)} \ge \bar{R}^*_{\nu,\pi}$, and the following (much more elaborate) corollary of Proposition \[prp:non\_overlap\_parametric\] provides a lower bound on the latter.

\[thrm3:non\_overlap\_GMRF\] There exists a constant $C_0>0$ such that the following holds. Let $\cC$ be a class of disjoint subsets of $\cV$ and let $\nu$ denote the uniform prior over $\cC$. Let $a\in (0,1)$ and assume that the neighborhood size $|\bbN_h|$ satisfies \[eq:condition\_Nh\] |\_h|\_[S]{} . Then $
\bar{R}^*_{\nu,\pi} \ge 1-a
$ as soon as \[eq:condition\_r2\_lower\] r\^2 \_[S ]{} |S| C\_0  .

This bound is our main impossibility result. Its proof relies on a number auxiliary results for Gaussian Markov Random Fields (Section \[sec:proofs\_technique\]) that may useful for other problems of estimating Gaussian Markov Random Fields. Notice that the second term in is what appears in , which we saw arises in the case where the covariance is known. In light of this fact, we may interpret the first term in as the ‘price to pay’ for adapting to an unknown covariance operator in the class of covariance operators of Gaussian Markov random fields with dependency radius $h$.

Upper bound: a Fisher-type test {#sec:fisher}
-------------------------------

We introduce a test whose performance essentially matches the minimax lower bound of Theorem \[thrm3:non\_overlap\_GMRF\]. Comparatively, the construction and analysis of this test is much more involved than that of the generalized likelihood ratio test of .

Let $F_i = (X_{i+v} : 1 \le |v|_{\infty} \le h)$, seen as a vector, and let $\bF_{S,h}$ be the matrix with row vectors $F_i, i \in S^h$. Also, let $X_{S,h} = (X_i : i \in S^h)$. Under the null hypothesis, each variable $X_i$ is independent of $F_i$, although $X_i$ is correlated with some $(F_j, j\neq i)$. Under the alternative hypothesis, there exists a subset $S$ and a vector $\phi\in \Phi_h$ such that \[eq:conditional\] X\_[S,h]{}= \_[S,h]{}+ \_[S,h]{} , where each component $\epsilon_i$ of $\epsilon_{S,h}$ is independent of the corresponding vector $F_{i}$, but the $\epsilon_i$’s are not necessarily independent. Equation is the so-called conditional autoregressive (CAR) representation of a Gaussian Markov random field [@MR1344683]. For Gaussian Markov random fields, the celebrated pseudo-likelihood method [@besag:1975] amounts to estimating $\phi$ by taking least-squares in .

Returning to our testing problem, observe that the null hypothesis is true if and only if all the parameters of the conditional expectation of $X_{S,h}$ given $\bF_{S,h}$ are zero. In analogy with the analysis-of-variance approach for testing whether the coefficients of a linear regression model are all zero, we consider a Fisher-type statistic \[phi-stat\] T\^\*= \_[S]{}T\_S , T\_S :=  , where $\boldsymbol{\Pi}_{S,h} := \bF_{S,h}(\bF_{S,h}^\top  \bF_{S,h})^{-1}\bF^\top _{S,h}$ is the orthogonal projection onto the column space of $\bF_{S,h}$. Since in the linear model the response vector $X_{S,h}$ is not independent of the design matrix $\bF_{S,h}$, the statistic $T_S$ does not follow an $F$-distribution. Nevertheless, we are able to control the deviations of $T^*$, both under null and alternative hypotheses, leading to the following performance bound. Recall the definition .

\[thm:LS1\] There exist four positive constants $C_1,C_2,C_3,C_4$ depending only on $d$ such that the following holds. Assume that \[eq:condition\_LS\] |\_h|\^4|\_h|\^2 (||) C\_1 \_[S]{}|S\^h| . Fix $\alpha$ and $\beta$ in $(0,1)$ such that \[alpha\_beta\] ()()C\_2  . Then, under the null hypothesis, \[eq:upper\_TS\_H0\] ¶{ T\^\* |\_h|+ C\_3}  , while under the alternative, \[eq:upper\_TS\_H1\] ¶{ T\^\* |\_h| + C\_4 } 1 -  . In particular, if $\alpha_n,\beta_n\to 0$ are arbitrary positive sequences, then the test $f$ that rejects the null hypothesis if $$T^* \ge |\bbN_h| + C_3\left[\sqrt{|\bbN_h|(\log(|\cC|)+ 1+\log(\alpha_n^{-1}) )}+ \log(|\cC|)+ \log(\alpha_n^{-1})\right]$$ satisfies $R_{\cC,\mathfrak{G}(h,r)}(f) \to 0$ as soon as \[eq:power\_LS\] r\^2 &gt;  , where $C_0 > 0$ depends only on $d$.

Comparing with the minimax lower bound established in Theorem \[thrm3:non\_overlap\_GMRF\], we see that this test is nearly optimal with respect to $h$, the size of the collection $|\cC|$, and the size $|S|$ of the anomalous region (under the alternative).

Examples: cubes and blobs {#sec:cubes}
=========================

In this section we specialize our general results proved in the previous subsections to classes of cubes, and more generally, blobs.

Cubes
-----

Consider the problem of detecting an anomalous cube-shaped region. Let $\ell \in \{1, \dots, m\}$ and assume that $m$ is an integer multiple of $\ell$ (for simplicity). Let $\cC$ denote the class of all discrete hypercubes of side length $\ell$, that is, sets of the form $S = \prod_{s=1}^d \{b_s,\ldots,b_s+\ell-1\}$, where $b_s\in \{1,\ldots,m+1-\ell\}$. Each such hypercube $S \in \cC$ contains $|S| = k := \ell^d$ nodes, and the class is of size $|\cC| = (m-1-\ell)^d \le n$.

The lower bounds for the risk established in and Theorem \[thrm3:non\_overlap\_GMRF\] are not directly applicable here since these results require subsets of the class $\cC$ to be disjoint. However, they apply to any subclass $\cC' \subset \cC$ of disjoint subsets and, as mentioned in , any lower bound on the minimax risk over $\cC'$ applies to the minimax risk over $\cC$. A natural choice for $\cC'$ here is that of all cubes of the form $S = \prod_{s=1}^d \{a_s \ell +1, \dots, (a_s+1) \ell\}$, where $a_s \in \{0, \dots, m/\ell-1\}$. Note that $|\cC'|=(m/\ell)^d= n/k$.

[**$h$ bounded.**]{} Consider first the case where the radius $h$ of the neighborhood is bounded. We may apply to get $$R^*_{\cC,\phi} \geq 1- \frac{k^{1/2}}{2n^{1/2}}\exp\left\{\frac{5k\|\phi\|_2^2}{1-2\|\phi\|_1}\right\}\ .$$ For a given $r>0$ satisfying $2|\bbN_h|r\leq 1$, we can choose a parameter $\phi$ constant over $\bbN_h$ such that $\|\phi\|_2=r$ and $\|\phi\|_1=r\sqrt{(2h+1)^d-1}$. Since $R^*_{\cC,\mathfrak{G}(h,r)}\geq R^*_{\cC,\phi}$, we thus have $R^*_{\cC,\mathfrak{G}(h,r)} \to 1$ when $n \to \infty$, if $(k,\phi) = (k(n), \phi(n))$ satisfies $\log(n)\ll k\ll n$ and $r^2 \le \log(n/k)/(11 k)$. Comparing with the performance of the Fisher test of , in this particular case, Condition is met, and letting $\alpha = \alpha(n) \to 0$ and $\beta = \beta(n) \to 0$ slowly, we conclude from that this test (denoted $f$) has risk $R_{\cC,\mathfrak{G}(h,r)}(f) \to 0$ when $r^2 \ge C_0 \log(n)/k$ for some constant $C_0$. Thus, in this setting, the Fisher test, without knowledge of $\phi$, achieves the correct detection rate as long as $k \le n^b$ for some fixed $b < 1$.

[**$h$ unbounded.**]{} When $h$ is unbounded, we obtain a sharper bound by using Theorem \[thrm3:non\_overlap\_GMRF\] instead of . Specialized to the current setting, we derive the following.

\[cor:lower\_hypercube\] There exist two positive constants $C_1$ and $C_2$ depending only on $d$ such that the following holds. Assume that the neighborhood size $h$ is small enough that \[eq:condition\_neigbhorhood\] |\_h|C\_1 . Then the minimax risk tends to one when $n \to \infty$ as soon as $(k,h,r)=(k(n),h(n),r(n))$ satisfies $n/k\rightarrow \infty$ and \[eq:powerless\_gmrf\] r\^2 C\_2  .

Note that, in the case of a square neighborhood, $|\bbN_h| = (2h+1)^d -1$. Comparing with the performance of the Fisher test, in this particular case, Condition is equivalent to $|\bbN_h| \le C_0 \big(k^{1/4} \wedge \sqrt{k/\log(n)}\big)$ for some constant $C_0$. When $k$ is polynomial in $n$, this condition is stronger than Condition unless $d \le 5$. In any case, assuming $h$ is small enough that both and hold, and letting $\alpha = \alpha(n) \to 0$ and $\beta = \beta(n) \to 0$ slowly, we conclude from that the Fisher test has risk $R_{\cC,\mathfrak{G}(h,r)}$ tending to zero when $$r^2 \ge C_0 \left[\frac{\log(n)}{k}\bigvee\frac{\sqrt{|\bbN_{h}|\log(n)}}{k}\right],$$ for some large-enough constant $C_0 > 0$, matching the lower bound up to a multiplicative constant as long as $k \le n^b$ for some fixed $b < 1$.

In conclusion, whether $h$ is fixed or unbounded but growing slowly enough, the Fisher test achieves a risk matching the lower bound up to a multiplicative constant.

Blobs
-----

So far, we only considered hypercubes, but our results generalize immediately to much larger classes of blob-like regions. Here, we follow the same strategy used in the detection-of-means setting, for example, in [@MGD; @cluster; @MR2589191].

Fix two positive integers $\ell_\circ \le \ell^\circ$ and let $\cC$ be a class of subsets $S$ such that there are hypercubes $S_\circ$ and $S^\circ$, of respective side lengths $\ell_\circ$ and $\ell^\circ$, such that $S_\circ \subset S \subset S^\circ$. Letting $\cC_\circ$ and $\cC^\circ$ denote the classes of hypercubes of side lengths $\ell_\circ$ and $\ell^\circ$, respectively, our lower bound for the worst-case risk associated with the class $\cC^\circ$ obtained from applies directly to $\cC$—although not completely obvious, this follows from our analysis—while scanning over $\cC_\circ$ in the Fisher test yields the performance stated above for the class of cubes. In particular, if $\ell_\circ/\ell^\circ$ remains bounded away from $0$, the problem of detecting a region in $\cC$ is of difficulty comparable to detecting a hypercube in $\cC_\circ$ or $\cC^\circ$.

When the size of the anomalous region $k$ is unknown, meaning that the class $\cC$ of interest includes regions of different sizes, we can simply scan over dyadic hypercubes as done in the first step of the multiscale method of [@MGD]. This does not change the rate as there are less than $2n$ dyadic hypercubes. See also [@cluster].

We note that when $\ell_\circ/\ell^\circ = o(1)$, scanning over hypercubes may not be very powerful. For example, for “convex" sets, meaning when $$\cC = \Big\{S = K \cap \cV: K \subset \bbR^d \text{ convex}, |K \cap \cV| = k\Big\}~,$$ it is more appropriate to scan over ellipsoids due to John’s ellipsoid theorem [@MR0030135], which implies that for each convex set $K \subset \bbR^d$, there is an ellipsoid $E \subset K$ such that ${\rm vol}(E) \ge d^{-d} {\rm vol}(K)$. For the case where $d=2$ and the detection-of-means problem, [@MR2589191]—expanding on ideas proposed in [@MGD]—scan over parallelograms, which can be done faster than scanning over ellipses.

Finally, we mention that what we said in this section may apply to other types of regular lattices, and also to lattice-like graphs such as typical realizations of a random geometric graph. See [@cluster; @MR2604703] for detailed treatments in the detection-of-means setting.

Discussion {#sec:discussion}
==========

We provided lower bounds and proposed near-optimal procedures for testing for the presence of a piece of a Gaussian Markov random field. These results constitute some of the first mathematical results for the problem of detecting a textured object in a noisy image. We leave open some questions and generalization of interest.

[*More refined results.*]{} We leave behind the delicate and interesting problem of finding the exact detection rates, with tight multiplicative constants. This is particularly appealing for simple settings such as finding an interval of an autoregressive process, as described in . Our proof techniques, despite their complexity, are not sufficiently refined to get such sharp bounds. We already know that, in the detection-of-means setting, bounding the variance of the likelihood ratio does not yield the right constant. The variant which consists of bounding the first two moments of a carefully truncated likelihood ratio, possibly pioneered in [@Ingster99], is applicable here, but the calculations are quite complicated and we leave them for future research.

[*Texture over texture.*]{} Throughout the paper we assumed that the background is Gaussian white noise. This is not essential, but makes the narrative and results more accessible. A more general, and also more realistic setting, would be that of detecting a region where the dependency structure is markedly different from the remainder of the image. This setting has been studied in the context of time series, for example, in some of the references given in . However, we are not aware of existing theoretical results in higher-dimensional settings such as in images.

[*Other dependency structures.*]{} We focused on Markov random fields with limited neighborhood range (quantified by $h$ earlier in the paper). This is a natural first step, particularly since these are popular models for time series and textures. However, one could envision studying other dependency structures, such as short-range dependency, defined in [@MR2379935] as situations where the covariances are summable in the following sense $$\sup_{i\in \cV_\infty} \sum_{j \in \cV_\infty \setminus i} |\bGamma_{i,j}| < \infty\ .$$

Proofs {#sec:proofs}
======

Proof of 
---------

The Bayes risk is achieved by the likelihood ratio test $f_{\nu,\pi}^*(x)=\IND{L_{\nu,\pi}(x)>1}$ where $$L_{\nu,\pi}(x)= \frac{1}{|\cC|} \sum_{S\in \cC} L_S(x)~, \text{ with} \quad
L_S(x) = \int \frac{ {\rm d}\PROB_{S,\bGamma(\phi)}(x) } {{\rm d} \PROB_0(x)} \pi({\rm d}\phi)~.$$ In our Gaussian model, \[L\_S\] L\_S(x) = \_ , where the expectation is taken with respect to the random draw of $\phi \sim \pi$. Then, by , \[LR-risk\] |[R]{}\^\*\_[,]{} = 1 - 12 \_0 | L\_[,]{}() - 1 | 1 - 12  . (Recall that $\EXP_0$ stands for expectation with respect to the standard normal random vector $\X$.)

We proceed to bound the second moment of the likelihood ratio under the null hypothesis. Summing over $S,T \in \cC$, we have && \_0\[L\_[,]{}()\^2\]\
&=& 1[||\^2]{} \_[S,T]{} \_0\[L\_S() L\_T()\]\
&=& 1[||\^2]{} \_[S T]{} \_0\[ L\_S()\] \_0 \[L\_T()\] + 1[||\^2]{} \_[S]{} \_0 \[L\_S\^2()\]\
&=& + 1[||\^2]{} \_[S]{} \_0 \_\
& & 1+ 1[||\^2]{} \_[S]{}\_\
& = & 1 + \_[S]{} V\_S  , where in the second equality we used the fact that $S \ne T$ are disjoint, and therefore $L_S(\X)$ and $L_T(\X)$ are independent, and in the third we used the fact that $\E_0 [L_S(\X)] = 1$ for all $S\in \cC$.

Deviation inequalities
----------------------

Here we collect a few more-or-less standard inequalities that we need in the proofs. We start with the following standard tail bounds for Gaussian quadratic forms. See, e.g., Example 2.12 and Exercise 2.9 in [@BoLuMa13].

\[lem:normal-quad\] Let $Z$ be a standard normal vector in $\bbR^d$ and let $\bR$ be a symmetric $d\times d$ matrix. Then $$\pr{Z^\top \bR Z - \tr(\bR) \geq  2\|\bR\|_F \sqrt{t} + 2 \|\bR\|t \, } \le e^{-t}, \quad \forall t \ge 0~.$$ Furthermore, if the matrix $\bR$ is positive semidefinite, then $$\pr{Z^\top \bR Z - \tr(\bR) \leq  -2\|\bR\|_F \sqrt{t} \, } \le e^{-t}, \quad \forall t \ge 0.$$

\[lem:chaos\_4\] There exists a positive constant $C$ such that the following holds. For any Gaussian chaos $Z$ up to order $4$ and any $t>0$, $$\P\left\{|Z-\E[Z]|\geq C\Var^{1/2}(Z)t^2 \right\}\leq e^{-t}\ .$$

This deviation inequality is a consequence of the hypercontractivity of Gaussian chaos. More precisely, Theorem 3.2.10 and Corollary 3.2.6 in [@MR1666908] state that $$\E\exp\left[\left(\frac{Z-\E[Z]}{C\Var^{1/2}(Z)}\right)^{1/2}\right]\leq 2\ ,$$ where $C$ is a numerical constant. Then, we apply Markov inequality to prove the lemma.

\[lem:chaos\] There exists a positive constant $C$ such that the following holds. Let $F$ be a compact set of symmetric $r\times r$ matrices and let $Y\sim \cN(0,\bI_r)$. For any $t>0$, the random variable $Z:= \sup_{\bR \in F} \tr\left[\bR YY^\top \right]$ satisfies \[eq:chaos\_concentration\] {Z (Z) + t} (-C( )), where $W  := \sup_{\bR \in F} \tr(\bR YY^\top \bR)$ and $B  :=  \sup_{\bR \in F}\|\bR\|$.

A slight variation of this result where $Z$ is replaced by $\sup_{\bR \in F} \tr\left[\bR (YY^\top -\bI_r)\right]$ is proved in [@MR2662346] using the exponential Efron-Stein inequalities of [@MR2123200]. Their arguments straightforwardly adapt to Lemma \[lem:chaos\].

\[lem:concentration\_vp\_wishart\] Let $\bW$ be a standard Wishart matrix with parameters $(n,d)$ satisfying $n>d$. Then for any number $0<x<1$, $$\begin{aligned}
\mathbb{P}\left\{\lambda^{\rm max}(\bW) \geq
n\left(1+\sqrt{d/n}+\sqrt{2x/n}\right)^2 \right \} & \leq &e^{-x}\ 
,\nonumber  \\
%\label{majoration_wishart_sous_gaussienne}
\mathbb{P}\left\{\lambda^{\rm min}(\bW) \leq
n\left(1-\sqrt{d/n}-\sqrt{2x/n}\right)_+^2 \right\} & \leq
&e^{-x}\ . \nonumber\end{aligned}$$

Auxiliary results for Gaussian Markov random fields on the lattice {#sec:proofs_technique}
------------------------------------------------------------------

He we gather some technical tools and proofs for Gaussian Markov random fields on the lattice. Recall the notation introduced in Section \[sec:prelim\_gmrf\].

\[lem:spectrum\_gamma\] For any positive integer $h$ and $\phi\in \Phi_{h}$ with $\|\phi\|_1 <1$, we have that if $\lambda$ is an eigenvalue of the covariance operator $\bGamma(\phi)$, then $$\frac{\sigma_{\phi}^2}{1+\|\phi\|_1} \le \lambda \le
\frac{\sigma_{\phi}^2}{1-\|\phi\|_1}~.$$ Also, we have \[eq:lb\_sigma\]  1- \_1 \_\^2 1 .

Recall that $\|\cdot\|$ denotes the $\ell^2 \to \ell^2$ operator norm. First note that by the definition of $\phi$, $\sigma_\phi^2 \bGamma^{-1}(\phi)- \bI = (\phi_{i-j})_{i,j \in \bbZ^d}$, and therefore \[diag\_dominant\] \_\^2 \^[-1]{}() - \_1 , where whe used the bound $\|\bA\|\leq \sup_{i\in \bbZ^d}\sum_{j\in \bbZ^d}|\bA_{ij}|$. This implies that the largest eigenvalue of $\bGamma(\phi)$ is bounded by $\sigma^2_{\phi}/(1-\|\phi\|_1)$ if $\|\phi\|_1<1$ and that the smallest eigenvalue of $\bGamma(\phi)$ is at least $\sigma^2_{\phi}/(1+\|\phi\|_1)$. Considering the conditional regression of $Y_i$ given $Y_{-i}$ mentioned above, that is, $$Y_i= -\sum_{1\leq |j|_{\infty}\leq h}\phi_j Y_{i+j}+\epsilon_i$$ (with $\epsilon_i$ being standard normal independent of the $Y_j$ for $j\neq i$) and taking the variance of both sides, we obtain $$1-\sigma^2_{\phi}= \Var\left[ \sum_{1<|j|_{\infty}\leq h}\phi_j Y_{i+j}\right] = \phi^\top \bGamma(\phi) \phi \le \|\bGamma(\phi)\| \|\phi\|_2^2\leq \frac{\|\phi\|_2^2}{1-\|\phi\|_1}\sigma^2_{\phi}~,$$ and therefore 1 - \^[2]{}\_\^[2]{}\_ . Rearranging this inequality and using the fact that $\|\phi\|_2^2 \le
\|\phi\|_1^2 \le \|\phi\|_1$, we conclude that $\sigma^{2}_{\phi}\geq 1-\|\phi\|_1$. The remaining bound $\frac{\|\phi\|_2^2}{1+ \|\phi\|_1}\leq \frac{1 - \sigma^{2}_{\phi}}{\sigma^2_{\phi}}$ is obtained similarly.

Recall that for any $v\in \mathbb{Z}^d$, $\gamma_v$ is the correlation between $Y_i$ and $Y_{i+v}$ and is therefore equal to $\bGamma_{i, i+v}$. This definition does not depend on the node $i$ since $\bGamma$ is the covariance of a stationary process.

\[lem:conditional\_variance\] For any $h$ and any $\phi\in \Phi_{h}$, let $Y\sim \cN(0,\bGamma(\phi))$. As long as $\|\phi\|_1<1$, the $l_2$ norm of the correlations satisfies \[eq:upper\_norm\_correlation\] \_[v0]{}\_v\^2+ ()\^2

In order to compute $\|\gamma\|^2_2$, we use the spectral density of $Y$ defined by $$f(\omega_1,\ldots,\omega_d)=\frac{1}{(2\pi)^d}\sum_{(v_1,\ldots,v_d)\in \mathbb{Z}^d}\gamma_{v_1,\ldots v_d}\exp\left(\iota\sum_{i=1}^dv_i\omega_i\right)\ , \quad (\omega_1,\ldots,\omega_d)\in (-\pi,\pi]^d\ .$$ Following [@MR1344683 Sect.1.3] or [@MR2130347 Sect.2.6.5], we express the spectral density in terms of $\phi$ and $\sigma_{\phi}^2$: $$\frac{1}{f(\omega_1,\ldots, \omega_d)}= \frac{(2\pi)^d}{\sigma_{\phi}^2}\left[1- \sum_{v, 1\leq |v|_{\infty}\leq h\in \mathbb{Z}^d}\phi_{v}e^{\iota \langle v,\omega\rangle}\right]\ ,$$ where $\langle \cdot , \cdot\rangle$ denotes the scalar product in $\mathbb{R}^d$. As a consequence, $$|f(\omega_1,\ldots, \omega_d)|\leq \sigma_{\phi}^2[(2\pi)^d(1-\|\phi\|_1)]^{-1}~.$$ Relying on Parseval formula, we conclude \_[v0]{}\_v\^2&=& (2)\^d\_[\[-;\]\^d]{}\^2d\_1…d\_d\
&& \_[\[-;\]\^d]{}| -1|\^2d\_1…d\_d\
&& \_[\[-;\]\^d]{}| - 1 - \_[v, 1|v|\_h\^d]{} \_[v]{}e\^[v,]{}|\^2d\_1…d\_d\
&&\
& & ()\^2+\
& & ()\^2+  , where we used in the last line.

\[lem:covariance\_residuals\] For any $h$ and any $\phi\in \Phi_{h}$, let $Y\sim
\cN(0,\bGamma(\phi))$. Then for any $i\in \bbZ^d$, the random variable $\epsilon_i$ defined by the conditional regression $Y_i=\sum_{v\in
  \bbN_h}\phi_vY_{i+v} +\epsilon_i$ satisfies that

1.  $\epsilon_i$ is independent of all $X_j\ , j\neq i$ and $\Cov(\epsilon_i,X_i)=\Var(\epsilon_i)=\sigma_{\phi}^2$.

2.  For any $i\neq j$, $\Cov(\epsilon_i,\epsilon_j)=-\phi_{i-j}\sigma_{\phi}^2$ if $|i-j|_{\infty}\leq h$ and 0 otherwise.

The first independence property is a classical consequence of the conditional regression representation for Gaussian random vectors, see, for example, [@MR1419991]. Since $\Var(\epsilon_i)$ is the conditional variance of $Y_i$ given $Y^{(-i)}$, it equals $[(\bGamma^{-1}(\phi))_{i,i}]^{-1}=\sigma_{\phi}^2$. Furthermore, $$\Cov(\epsilon_i,Y_i) = \Var(\epsilon_i)+ \sum_{v\in \bbN_h}\phi_j\Cov(\epsilon_i,Y_{i+v})= \Var(\epsilon_i)\ ,$$ by the independence of $\epsilon_i$ and $Y^{(-i)}$. Finally, consider any $i\neq j$, (\_i,\_j)= (\_i,Y\_j) - \_[v\_h]{}\_v(\_i,Y\_[j+v]{}) , where all the terms are equal to zero with the possible exception of $v=i-j$. The result follows.

\[lem:control\_Gamma\_S\] As long as $\|\phi\|_1<1$, the following properties hold:

1.  If $i\in S^h$ or if $j \in S^h$, then $(\bGamma_S^{-1}(\phi))_{i,j}= (\bGamma^{-1}(\phi))_{i,j}$.

2.  If $i\in S^h$ and $j\in \Delta_h(S)$, then $1\leq (\bGamma_S^{-1}(\phi))_{j,j}\leq (\bGamma_S^{-1}(\phi))_{i,i}$.

3.  If $i\in \Delta_h(S)$, then $\sum_{j\in S:j\neq i}(\bGamma_S^{-1}(\phi))_{i,j}^2\leq  \frac{2\|\phi\|_2^2}{(1-\|\phi\|_1)^3}$.

We prove each part in turn.

[*Part 1.*]{} Consider $i \in S^h$ and any $j \in S$. By the Markov property, conditionally to $(Y_{i+k},\ 1\leq |k|_{\infty}\leq h)$, $Y_i$ is independent of all the remaining variables. Since all vertices $i+k$ with $1\leq |k|_{\infty}\leq h$ belong to $S$, the conditional distribution of $Y_{i}$ given $Y^{(-i)}$ is the same as the conditional distribution of $Y_{i}$ given $(Y_{j}, j\in S\setminus\{i\})$. This conditional distribution characterizes the $i$-th row of the inverse covariance matrix $\bGamma^{-1}_S$. Also, the conditional variance of $Y_i$ given $Y^{(-i)}$ is $[(\bGamma^{-1}(\phi))_{i,i}]^{-1}$ and the conditional variance of $Y_i$ given $Y_{S}$ is $[(\bGamma_S^{-1}(\phi))_{i,i}]^{-1}$. Furthermore, $-(\bGamma^{-1}(\phi))_{i,j}/(\bGamma^{-1}(\phi))_{i,i}$ is the $j$-th parameter of the condition regression of $Y_i$ given $Y^{(i)}$, and therefore we conclude that $(\bGamma^{-1}(\phi))_{i,i}= (\sigma^2_{\phi})^{-1}=(\bGamma_S^{-1}(\phi))_{i,i} $ and $(\bGamma^{-1}(\phi))_{i,j}/(\bGamma^{-1}(\phi))_{i,i}= -\phi_{i-j} = (\bGamma_S^{-1}(\phi))_{i,j}/(\bGamma_S^{-1}(\phi))_{i,i}$.

[*Part 2.*]{} Consider any vertex $i\in S^h$ and $j\in \Delta_h(S)$. Since $1/\bGamma_S^{-1}(\phi))_{j,j}$ and $1/\bGamma_S^{-1}(\phi))_{j,j}$ are the conditional variances of $Y_i$ and $Y_j$ given $Y_{k}, k \in
S\setminus \{j\}$ and $Y_{k}, k \in S\setminus \{i\}$, respectively, we have 1/\_S\^[-1]{}())\_[j,j]{} &=& (Y\_j | Y\_[k]{}: k S{j})\
&& (Y\_j |Y\^[(-j)]{} )\
&= & (Y\_i |Y\^[(-i)]{} )\
& = & (Y\_i |Y\_k: kS{i})\
&= & 1/\_S\^[-1]{}())\_[i,i]{}  .

[*Part 3.*]{} Consider $i\in \Delta_h(S)$. The vector $(\bGamma_S^{-1}(\phi))_{i,-i}\defeq \left(-(\bGamma_S^{-1}(\phi))_{i,j}/
  (\bGamma_S^{-1}(\phi))_{i,i}\right)_{j\in S: j\neq i}$ is formed by the regression coefficients of $Y_{i}$ on $(Y_{j}, j\in
S\setminus\{i\})$. Since the conditional variance of $Y_{i}$ given $(Y_{j}, j\in S\setminus\{i\})$ is at least $\sigma_{\phi}^2$ (by Parts 1 and 2), we get 1 - \_\^2 && 1 - (Y\_i|Y\_j:  j S{i})\
&= &({Y\_i|Y\_j, jS{i}})\
& = & (\_[jS{i}]{} - Y\_j )\
&& \_\^4 (\_[jS{i}]{} -(\_S\^[-1]{}())\_[i,j]{} Y\_j)\
& = & \_\^4 (\_S\^[-1]{}())\_[i,-i]{}\^\_S() (\_S\^[-1]{}())\_[i,-i]{}\
&& (\_S\^[-1]{}())\_[i,-i]{}\_2\^2 , where the equality in the second line above we use $\Var(Y_j)= 1$ and the law of total variance (i.e., $\Var(Y)= \EXP[Var(Y|\cB)]+ Var(E[Y|\cB])$) and in the last line we use that the smallest eigenvalue of $\bGamma(\phi)$ (and also of $\bGamma_S(\phi)$) is larger than $\sigma_{\phi}^2/(1+\|\phi\|_1)$ (Lemma \[lem:spectrum\_gamma\]). Rearranging this inequality and using the fact that $\|\phi\|_1 < 1$, we arrive at (\_S\^[-1]{}())\_[i,-i]{}\_2\^2 && (1 + \_1)2\
&&\
&&

\[lem:det\] For any $\phi_1, \phi_2\in \Phi_h$, define $$B_{\phi_1,\phi_2}:=\left(\frac{\det(\bGamma_{S}^{-1}(\phi_1))\det(\bGamma_{S}^{-1}(\phi_2))}{\det(\bGamma_{S}^{-1}(\phi_1)+
    \bGamma_{S}^{-1}(\phi_2) -\bI_S)}\right)^{1/2}\ .$$ (Note that $V_S$ defined in Proposition \[prp:non\_overlap\_parametric\] equals the expected value of $B_{\phi_1,\phi_2}$ when $\phi_1$ and $\phi_2$ are drawn independently from the distribution $\pi$.) Assuming that $\|\phi_1\|_1\vee \|\phi_2\|_1<1/5$, we have $$\log B_{\phi_1,\phi_2} \leq \frac{1}{2}|S|\langle \phi_1,\phi_2\rangle+ 8 Q_S\ ,$$ where Q\_S &:=& |S|\_[s\_1,s\_2,s\_3=1]{}\^2|\_[j,k\_h]{}\_[s\_1,j]{}\_[s\_2,k]{}\_[s\_3,k-j]{}|+ 15|S| (\_1\_2\^3\_2\_2\^3) + |\_[h]{}(S)| (\_1\_2\^2\_2\_2\^2)\
&&+  28 |\_[2h]{}(S)|(|\_[2h]{}(S)|(|\_h|+1))\^[1/2]{} (\_1\_2\^3\_2\_2\^3)  .

Since for any $\phi$, the spectrum of $\bGamma_S^{-1}(\phi)$ lies between the extrema of the spectrum of $\bGamma^{-1}(\phi)$, by Lemma \[lem:spectrum\_gamma\], we have -1 \^(\_S\^[-1]{}()-\_S) \^[max]{}(\_S\^[-1]{}()-\_S) -1 , where $\lambda^{\min}(\bA)$ and $\lambda^{\max}(\bA)$ denote the smallest and largest eigenvalues of a matrix $\bA$. Since $\sigma^2_{\phi}\leq \var{Y_i}=1$, the left-hand side is larger than $-\|\phi\|_1$, while relying on , we derive $$\frac{1+\|\phi\|_1}{\sigma^2_{\phi}}-1\leq (\|\phi\|_1+1)\left[1+\frac{\|\phi\|_2^2}{1-\|\phi\|_1}\right]-1 \leq \frac{2\|\phi\|_1}{1-\|\phi\|_1}\ .$$ Consequently, as long as $\|\phi\|_1< 1/5$, the spectrum of $\bGamma_S^{-1}(\phi)$ lies in $(\tfrac45,\tfrac32)$. This allows us to use the Taylor series of the logarithm, which for a matrix $\bA$ with spectrum in $(\tfrac12, 2)$, gives |(()) - +| || . Applying this expansion to $\bGamma_{S}^{-1}(\phi_1)$, $\bGamma_{S}^{-1}(\phi_2)$ and $\bGamma_{S}^{-1}(\phi_1)+ \bGamma_{S}^{-1}(\phi_2)-\bI_S$,

2B\_[\_1,\_2]{} && V\_1+ V\_2+ 8V\_3+8V\_4 ,\
V\_1&:=&  ,\
V\_2&:= & ||+||  ,\
V\_3&:= & ||  ,\
V\_4 &:= & ||  .

#### Control of $V_1$.

We use the fact that $$\tr\Big[\big(\bGamma_{S}^{-1}(\phi_1)-\bI_S\big)\big(\bGamma_{S}^{-1}(\phi_2)-\bI_S\big)\Big]
= 
\sum_{i,j\in S}\big((\bGamma_{S}^{-1}(\phi_1))_{i,j}-\delta_{i,j}\big)\big((\bGamma_{S}^{-1}(\phi_2))_{i,j}-\delta_{i,j}\big)~.$$ To bound the right-hand side, first consider any node $i \in S^h$ in the $h$-interior of $S$. By the first part of Lemma \[lem:control\_Gamma\_S\], the $i$-th row of $\bGamma_S^{-1}(\phi)$ equals the restriction to $S$ of the $i$-th row of $\bGamma^{-1}(\phi)$. Using the definition of $\phi_1,\phi_2$, we therefore have $$\begin{aligned}
\label{v1-bound1} \lefteqn{\sum_{j\in S}\big((\bGamma_{S}^{-1}(\phi_1))_{i,j}-\delta_{i,j}\big)\big((\bGamma_{S}^{-1}(\phi_2))_{i,j}-\delta_{i,j}\big)} &&\\ 
\notag &=& (\bGamma^{-1}(\phi_1))_{i,i} (\bGamma^{-1}(\phi_2))_{i,i} \langle \phi_1,\phi_2\rangle + ((\bGamma^{-1}(\phi_1))_{i,i}-1)((\bGamma^{-1}(\phi_2))_{i,i}-1) \\
\notag &= & \frac{\langle \phi_1,\phi_2\rangle }{\sigma_{\phi_1}^{2}\sigma_{\phi_2}^{2}}+ \frac{(1-\sigma_{\phi_1}^{2})(1-\sigma_{\phi_2}^{2})}{\sigma_{\phi_1}^{2}\sigma_{\phi_2}^{2}} \\
\notag &= & \langle \phi_1,\phi_2\rangle+ \langle \phi_1,\phi_2\rangle \frac{1- \sigma_{\phi_1}^{2}\sigma_{\phi_2}^{2}}{\sigma_{\phi_1}^{2}\sigma_{\phi_2}^{2}}+\frac{(1-\sigma_{\phi_1}^{2})(1-\sigma_{\phi_2}^{2})}{\sigma_{\phi_1}^{2}\sigma_{\phi_2}^{2}} \\
\notag &\leq &\langle \phi_1,\phi_2\rangle+ \frac{3}{2}\frac{\|\phi_1\|_2^4+ \|\phi_2\|_2^4}{(1-\|\phi_1\|_1)(1-|\phi_2\|_1)}\ ,\end{aligned}$$ using in the last line. Next, consider a node $i \in \Delta_h(S)$, near the boundary of $S$. Relying on Lemmas \[lem:spectrum\_gamma\] and \[lem:control\_Gamma\_S\], we get $$\begin{aligned}
\sum_{j\in S}\big((\bGamma_{S}^{-1}(\phi_1))_{i,j}-\delta_{i,j}\big)^2&\leq& \frac{2\|\phi_1\|_2^2}{(1-\|\phi_1\|_1)^3}+ \big(1/\sigma_{\phi_1}^{2}-1\big)^2\nonumber\\
&\leq & \frac{2\|\phi_1\|_2^2}{(1-\|\phi_1\|_1)^3}+ \frac{\|\phi_1\|_2^4}{(1-\|\phi_1\|_1)^2}\leq \frac{3\|\phi_1\|_2^2}{(1-\|\phi_1\|_1)^3} \ ,\label{eq:upper_delta_h} \end{aligned}$$ since we assume that $\|\phi\|_1<1$. By the Cauchy-Schwarz inequality, \[v1-bound2\] \_[jS]{}((\_[S]{}\^[-1]{}(\_1))\_[i,j]{}-\_[i,j]{})((\_[S]{}\^[-1]{}(\_2))\_[i,j]{}-\_[i,j]{})3 . Summing over $i\in S^h$ and over $i \in \Delta_h(S)$, we get $$V_1 \le  |S|\langle \phi_1,\phi_2\rangle+ \frac32 |S|\frac{\|\phi_1\|_2^4+ \|\phi_2\|_2^4}{(1-\|\phi_1\|_1)(1-\|\phi_2\|_1)}+ 3|\Delta_h(S)|\frac{\|\phi_1\|_2^2\vee \|\phi_2\|_2^2}{(1-\|\phi_1\|_1\vee \|\phi_2\|_1)^3}\ .$$

#### Control of $V_2$.

We proceed similarly as in the previous step. Note that $$\begin{aligned}
\tr\Big[\big(\bGamma_{S}^{-1}(\phi_1)-\bI_S\big)^3\Big]
& = & 
\sum_{i,j,k\in S}\big((\bGamma_{S}^{-1}(\phi_1))_{i,j}-\delta_{i,j}\big)\big((\bGamma_{S}^{-1}(\phi_1))_{j,k}-\delta_{j,k}\big)\big((\bGamma_{S}^{-1}(\phi_1))_{k,i}-\delta_{k,i}\big) \\
&\le &
\sum_{i\in S}\left|\sum_{j,k\in S}\big((\bGamma_{S}^{-1}(\phi_1))_{i,j}-\delta_{i,j}\big)\big((\bGamma_{S}^{-1}(\phi_1))_{j,k}-\delta_{j,k}\big)\big((\bGamma_{S}^{-1}(\phi_1))_{k,i}-\delta_{k,i}\big)\right|
~.\end{aligned}$$ First, consider a node $i$ in $S\setminus \Delta_{2h}(S)$. Here, we use $\Delta_{2h}(S)$ instead of $\Delta_{h}(S)$ so that we may replace $\bGamma_S^{-1}(\phi)$ below with $\bGamma^{-1}(\phi)$. We use again Lemma \[lem:control\_Gamma\_S\] to replace $(\bGamma_S^{-1}(\phi))_{i,j}$ by $(\bGamma^{-1}(\phi))_{i,j}$ in the sum\
&& |\_[j,k\_h]{}| + 3 \_[j\_h]{}|\_[1,j]{}|\^2+\
&& |\_[j,k\_h]{}| + 4 , using in the last line. Next, consider a node $i\in \Delta_{2h}(S)$. If $i\notin\Delta_h(S)$, then the support of $(\bGamma_{S}^{-1}(\phi_1))_{i,-i}$ is of size $|\bbN_h|$. If $i\in \Delta_{h}(S)$, then $\Delta_{2h}(S)\setminus\{i\}$ separates $\{i\}$ from $S\setminus \Delta_{2h}(S)$ in the dependency graph and the Global Markov property [@MR1419991] entails that $$Y_i\indep (Y_{k},\ k\in S\setminus \Delta_{2h}(S))|(Y_{k},\  k\in \Delta_{2h}(S)\setminus\{i\})\ ,$$ and therefore the support of $(\bGamma_{S}^{-1}(\phi_1))_{i,-i}$ is of size smaller than $|\Delta_{2h}(S)|$. Using the Cauchy-Schwarz inequality and , we get &&\
&& \_[jS]{}|(\_[S]{}\^[-1]{}(\_1))\_[i,j]{}-\_[i,j]{}| (\_[S]{}\^[-1]{}(\_1))\_[i,.]{}-\_[i,.]{}\_2 (\_[S]{}\^[-1]{}(\_1))\_[j,.]{}-\_[j,.]{}\_2\
&& (\_[S]{}\^[-1]{}(\_1))\_[i,.]{}-\_[i,.]{}\_2(\_[S]{}\^[-1]{}(\_1))\_[i,.]{}-\_[i,.]{}\_2 \_[jS]{}(\_[S]{}\^[-1]{}(\_1))\_[j,.]{}-\_[j,.]{}\_2\
&& 3\^[3/2]{} . In conclusion, V\_2&& |S| + 8|S|\
& & + 11 |\_[2h]{}(S)|(|\_[2h]{}(S)|(|\_h|+1))\^[1/2]{} .

#### Control of $V_3+V_4$.

Arguing as above, we obtain V\_3+V\_4&& |S| + 8|S|\
&+& 11 |\_[2h]{}(S)|(|\_[2h]{}(S)|(|\_h|+1))\^[1/2]{} .

Proof of Corollary \[cor:non\_overlap\_GMRF\]
---------------------------------------------

As stated in Lemma \[lem:spectrum\_gamma\], all eigenvalues of the covariance operator $\bGamma^{-1}(\phi)$ lie in $(1-\|\phi\|_1,\tfrac{1+\|\phi\|_1}{1-\|\phi\|_1} )$. Since the spectrum of $\bGamma^{-1}_{S}(\phi)$ lies between the extrema of the spectrum of $\bGamma^{-1}(\phi)$, and using the assumption that $\|\phi\|_1<1/2$, this entails \[gamma-id-op\] \_S()-\_S&lt;1 , We now apply Proposition \[prp:non\_overlap\_parametric\] with the probability measure $\pi$ concentrating on $\phi$. In this case, $$V_S = 
\frac{\det(\bGamma_{S}^{-1}(\phi))}{ \det(2 \bGamma_{S}^{-1}(\phi) -
  \bI_S)^{1/2}} = \det(\bI_S - (\bI_S - \bGamma_S(\phi))^2)^{-1/2},$$ and we get |[R]{}\^\*\_[, ]{} && 1 - \^[1/2]{}\
&& 1 - \^[1/2]{}\
&& 1 - \^[1/2]{} , where $\|\cdot\|_F$ denotes the Frobenius norm. The second inequality above is obtained by applying the inequality $1/(1-\lambda)\leq e^{\lambda/(1-\lambda)}$ for $0\leq \lambda<1$ to the eigenvalues of $(\bGamma_S(\phi)-\bI_S)^2$, while the third inequality follows from and the fact that $\|\phi\|_1 < 1/2$. It remains to bound $\|\bGamma_S(\phi)-\bI_S\|_F^2$: \_S() -\_S\_F\^2&=& \_[(i, j S),  ij]{}\^2(Y\_i,Y\_j)\
&& |S| \_[v0]{}\_v\^2\
&& 20|S| \_2\^2 , where we used Lemma \[lem:conditional\_variance\], $\sigma_{\phi}^2\le 1$, and $\|\phi\|_2\leq \|\phi\|_1\leq 1/2$ in the last line.

Proof of Theorem \[thrm3:non\_overlap\_GMRF\]
---------------------------------------------

Recall the definition of the prior $\pi$ defined just before the statement of the theorem. Taking the numerical constant $C$ in sufficiently small and relying on condition , we have $\|\phi\|_1= r \sqrt{\bbN_h}<1/5$. Consequently, the support of $\pi$ is a subset of the parameter space $\Phi_h$ and we are in position to invoke Lemma \[lem:det\].

Let $\phi_1,\phi_2$ be drawn independently according to the distribution $\pi$ and denote by $\xi_1$ and $\xi_2$ the corresponding random vectors defined on $\bbN'_h$. By Lemma \[lem:det\], $$\log B_{\phi_1,\phi_2}
\leq |S|r^2\bbN_h^{-1} \langle \xi_1,\xi_2 \rangle + 8 Q_S\ ,$$ where $$Q_S \leq 23|S| r^{3}\sqrt{|\bbN_h|} + |\Delta_{h}(S)|r^2+ 28
|\Delta_{2h}(S)|(|\Delta_{2h}(S)|\vee (|\bbN_h|+1))^{1/2} r^3\ .$$ Since $\langle \xi_1, \xi_2\rangle $ is distributed as the sum of $|\bbN_h|/2$ independent Rademacher random variables, we deduce that V\_S&& ()\^[|\_h|/2]{} ( 383(|S||\_[2h]{}(S)|\^[3/2]{}) r\^[3]{} + 8|\_[h]{}(S)|r\^2)\
&& ( + 383(|S||\_[2h]{}(S)|\^[3/2]{}) + 8|\_[h]{}(S)|r\^2) , since $\cosh(x)\leq \exp(x)\wedge \exp(x^2/2)$ for any $x>0$. Combining this bound with Proposition \[prp:non\_overlap\_parametric\], we conclude that the Bayes risk $\bar{R}^*_{\nu,\pi}$ is bounded from below by \[eq:lower\_gmrf\_complex\] 1 - \_[S]{}( + 383(|S||\_[2h]{}(S)|\^[3/2]{}) r\^[3]{} + 8|\_[h]{}(S)|r\^2) . If the numerical constant $C$ in Condition is sufficiently small, then $\tfrac{|S|^2r^4}{4|\bbN_h|} \bigwedge \tfrac{|S|r^2}{2}\leq 0.5\log(|\cC|/a)$. Also, choosing $C_0$ small enough in condition , relying on condition and on $|\bbN_h|\geq 1$, we also have $$383\left(|S|\sqrt{|\bbN_h|+1}\vee|\Delta_{2h}(S)|^{3/2}\right) r^{3} + 8|\Delta_{h}(S)|r^2\leq 0.5 \log(|\cC|/a) \ .$$ Thus, we conclude that $\bar{R}^*_{\nu,\pi}\geq 1-a$.

Proof of Corollary \[cor:lower\_hypercube\]
-------------------------------------------

We deduce the result by closely following the proof of Theorem \[thrm3:non\_overlap\_GMRF\]. We first prove that $5r\sqrt{|\bbN_h|}\leq 1$ is satisfied for $n$ large enough. Starting from , we have, for $n$ large enough, 5r&& 5C\_2\^[1/2]{} ()\^[1/2]{}\
&& 5C\_2\^[1/2]{} (C\_1 )\^[1/2]{} , where we used Condition in the second line. Taking $C_1$ and $C_2$ small enough, we only have to bound $|\bbN_{h}|^{3/2}\sqrt{\log(\tfrac nk)}/k$. We distinguish two cases.

[Case 1]{}: $|\bbN_h|\leq \log(n/k)$. Since $|\bbN_h|\leq  C_1k/\log\left(\frac{n}{k}\right)$, it follows that $|\bbN_{h}|^{3/2}\sqrt{\log(\tfrac nk)}/k\leq C_1$.

[Case 2]{}: $|\bbN_h|\geq \log(n/k)$. Then the second part of Condition enforces $\log^{4/5}(n/k) \leq C_1 k^{2/5}$. Using again the second part of Condition yields C\_1\^[3/2]{} C\_1\^[3/2]{} .

As $5r\sqrt{|\bbN_h|}\leq 1$, we can use the same prior $\pi$ as in the proof of Theorem \[thrm3:non\_overlap\_GMRF\] and arrive at the same lower bound on $R^*_\pi$. It remains to prove that this lower bound goes to one, namely that $$\frac{2|S|^2r^4}{|\bbN_h|} \bigwedge (|S|r^2)+  765\left(|S|\sqrt{|\bbN_h|+1}\vee|\Delta_{2h}(S)|^{3/2}\right) r^{3} + 16|\Delta_{2h}(S)|r^2- \frac{1}{2}\log(n/k)\to -\infty\ ,$$ where $S$ is a hypercube of size $k$. Taking the constant $C_2$ small enough in leads to $\frac{2k^2r^4}{|\bbN_h|} \bigwedge (kr^2)\leq \log(n/k)/4$ for $n$ large enough. k r\^[3]{}C\_2\^[3/2]{}\^[1/2]{}C\_2\^[3/2]{}(C\_1\^[1/2]{}C\_1\^[5/4]{})(n/k) , where we used again the second part of Condition . Taking $C_1$ and $C_2$ small enough ensures that $765k r^{3}\sqrt{|\bbN_h|+1}\leq \log(n/k)/8$ for $n$ large enough. Finally, it suffices to control $|\Delta_{2h}(S)|^{3/2}r^3$ since $|\Delta_{2h}(S)|r^2\leq |\Delta_{2h}(S)|^{3/2}r^3\vee 1$. Observe that $$|\Delta_{2h}(S)|= \ell^{d}- (\ell-4h)^d= \ell^d \left[1- (1-4h/\ell)^d\right]\leq 4\ell^ddh/\ell\leq  4d|\bbN_h|^{1/d}k^{\frac{d-1}{d}} .$$ It then follows from Condition that (d|\_h|\^[1/d]{}k\^)\^[3/2]{}r\^3 && C\_2\^[3/2]{}()\
&& C\_2\^[3/2]{}() where we used again in the second line. Choosing $C_1$ and $C_2$ small enough concludes the proof.

Proof of 
---------

We leave $\phi$ implicit throughout. Define $$U'_S = X_S^\top (\bI_S - \bGamma_S^{-1}) X_S - \tr(\bI_S - \bGamma_S^{-1}).$$ Under the null, $X$ is standard normal, so applying the union bound and gives $$\pr{U > 4} \le \sum_{\cS \in \cC}\P\Big\{ U'_S > 4\|\bI_S - \bGamma_S^{-1}\|_F\sqrt{\log(|\cC|)} +  4\|\bI_S - \bGamma_S^{-1}\|\log(|\cC|)\Big\} \le |\cC|^{-1}~.$$ Under the alternative where $S \in \cC$ is anomalous, $X_S$ has covariance $\bGamma_S$, so that we have $X_S^\top (\bI_S - \bGamma_S^{-1}) X_S \sim Z^\top (\bGamma_S - \bI_S) Z$, where $Z$ is standard normal in dimension $|S|$. Since $\Var(Y_i)=1$, the diagonal elements of $\bGamma_S - \bI_S$ are all equal to zero. We apply to get that ¶||\^[-1]{} , In view of the definition of $U$, we have $\P[U>4]\geq 1-  |\cC|^{-1}$ as soon as\[eq:lower\_RS\] 4 + 6 (||) . Therefore, it suffices to bound $\|\bGamma_S - \bI_S\|_F$, $\|\bGamma_S^{-1}-\bI_S\|_F$, $\|\bGamma-\bI\|$, $\|\bGamma^{-1}-\bI\|$ and $\tr[\bGamma_S^{-1}-\bI_S]$. In the sequel, the $C$ denotes a large enough positive constant depending only on $\eta$, whose value may vary from line to line. From Lemma \[lem:conditional\_variance\], we deduce that $$\|\bGamma_S - \bI_S\|^2_F\leq C |S| \|\phi\|_2^2 \ .$$ Lemma \[lem:spectrum\_gamma\] implies that $$\|\bGamma-\bI\|\vee \|\bGamma^{-1}-\bI\| \leq C \ .$$ We apply Lemma \[lem:control\_Gamma\_S\] to obtain \_S\^[-1]{}-\_S\_F\^2 && C |S|\_2\^2+ |S|(\_\^[-2]{} - 1)\^2\
&& C |S|\_2\^2 , where we used Lemma \[lem:spectrum\_gamma\] in the second line. Finally, we use again Lemmas \[lem:control\_Gamma\_S\] and \[lem:spectrum\_gamma\] to obtain &=& |S\^h| + \_[j\_h(S)]{}(\^[-1]{}\_[S]{})\_[j,j]{} -1\
&& |S\^h| C |S|\^2\_2 . Consequently, holds as soon as $|S|\|\phi\|_2^2\geq C \log(|\cC|)$.

Proof of 
---------

We use $C, C', C''$ as generic positive constants, whose actual values may change with each appearance.

[**Under the null hypothesis**]{}. First, we bound the $1-\alpha$ quantile of $T^*$ under the null hypothesis. Denote $Z_S:= \|\boldsymbol{\Pi}_{S,h}X_{S,h}\|_2^2$ so that $T_S= Z_S|S^h|[\|X_{S,h}\|_2^2-Z_S]^{-1}$. Since $Z_S$ is the squared norm of the projection of $X_{S,h}$ onto the column space of $\bF_{S,h}$, we can express $Z_S$ as a least-squares criterion: $$Z_S= \max_{\phi\in \mathbb{R}^{\bbN_h}} \|X_{S,h}\|_2^2- \sum_{i\in S^h}\Big(X_i - \sum_{j \in \bbN_h }\phi_jX_{i+j} \Big)^2 \ .$$ Given $\phi\in \mathbb{R}^{\bbN_h}$, define the matrix $\bB_{\phi,S}\in \mathbb{R}^{S\times S}$ such that for any $i\in S^h$, and any $j$, $(\bB_{\phi,S})_{i,i+j}=\phi_j$, and all the remaining entries of $\bB_{\phi,S}$ are zero. It then follows that \[eq:definition\_ZS\] Z\_S= \_[\^[\_h]{}]{}  , \_[,S]{}:= (\_S-\^\_[,S]{})(\_S-\_[,S]{})-\_S . Observe that $Z_S$ can be seen as the supremum of a Gaussian chaos of order 2. As the collection of matrices in the supremum of is not bounded, we cannot directly apply Lemma \[lem:chaos\]. Nevertheless, upon defining defining $\tilde{Z}_S:= \max_{\|\phi\|_1\leq 1} \tr\left[\bR_{\phi,S}X_{S}X_{S}^\top \right]$, we have for any $t>0$, \[eq:deviation\_ZS\] ¶\[Z\_St\]¶\[\_St\]+ ¶\[\_SZ\_S\] , and we can control the deviations of $\tilde{Z}_S$ using Lemma \[lem:chaos\]. Observe that for any $\phi$ with $\|\phi\|_1\leq 1$, $\|\bI_S-\bB_{\phi,S}\| \le 2$, so that $\|\bR_{\phi,S}\|\leq 3$. Choose $\widehat{\phi}_S$ among the $\phi$’s achieving the maximum in , and note that $\P[\tilde{Z}_S\neq Z_S] = \P[\|\widehat{\phi}_S\|_1> 1]$. We bound the right-hand side below. In view of , we also need to bound $\E[\tilde{Z}_S]$ and $\E\big[\sup_{\|\phi\|_1\leq 1}\tr(\bR_{\phi,S} X_{S}X_{S}^\top \bR_{\phi,S})\big]$ in order to control $\P[\tilde{Z}_S\geq t]$.

[*Control of $\P[\|\widehat{\phi}_S\|_1> 1]$*]{}. When $\bF_{S,h}^\top \bF_{S,h}$ is invertible, $\widehat{\phi}_S= (\bF_{S,h}^\top \bF_{S,h})^{-1}\bF_{S,h}X_{S,h}$. By the Cauchy-Schwarz inequality, $$\begin{aligned}
\P\big[\|\widehat{\phi}_S\|_1> 1\big]
&\leq & \P\big[\|\widehat{\phi}_S\|_2 > |\bbN_h|^{-1/2}\big]\nonumber\\
&\leq & \P\left[\lambda^{\min}(\bF_{S,h}^\top \bF_{S,h})\leq \tfrac12 |S^h|\right]+ \P\left[\|\bF_{S,h}X_{S,h}\|_2\geq \frac{|S^h|}{2|\bbN_h|^{1/2}} \right]\nonumber\\
&\leq &\P\left[\lambda^{\min}(\bF_{S,h}^\top \bF_{S,h})\leq \tfrac12 |S^h|\right]+ \P\left[\|\bF_{S,h}X_{S,h}\|_\infty\geq \frac{|S^h|}{2|\bbN_h|} \right]
\label{eq:upper_phi_1}\ .\end{aligned}$$ First, we control the smallest eigenvalue of $\bF_{S,h}^\top \bF_{S,h}$. Under the null hypothesis, the vectors $F_{i}$ follow the standard normal distribution, but $\bF_{S,h}^\top \bF_{S,h}$ is not a Wishart matrix since the vectors $F_i$ are correlated. However, $\bF_{S,h}^\top \bF_{S,h}$ decomposes as a sum of $|\bbN_{h}|+1$ (possibly dependent) standard Wishart matrices. Indeed, define \[S\_i\] S\_i= S\^h{i + (2h+1)u, u\^d}, i\_h {0} , and then $\bA_i=\sum_{j\in S_i} F_jF_j^\top $. The vectors $(F_{j},\ j\in S_i)$ are independent since the minimum $\ell_{\infty}$ distance between any two nodes in $S_i$ is at least $2h+1$, so that $\bA_i$ is standard Wishart. Denoting $n_i=|S_i|$, we are in position to apply , to get $$\P\left[\lambda^{\min}(\bA_i)\le n_i - 2\sqrt{|\bbN_h| n_i}- 2\sqrt{2x n_i}\right]\leq e^{-x}\ , \quad \forall x > 0\ .$$ Since the $\{S_i : i \in \bbN_h \cup \{0\}\}$ forms a partition of $S^h$, we have $\bF_{S,h}^\top \bF_{S,h}= \sum_{i \in \bbN_h \cup \{0\}} \bA_i$, and in particular, $\lambda_{\rm min}(\bF_{S,h}^\top \bF_{S,h}) \ge \sum_{i} \lambda_{\rm min}(\bA_i)$. Using this, the tail bound for $\lambda^{\min}(\bA_i)$ with $x \gets x +\log(|\bbN_h|+1)$, some simplifying algebra, and the union bound, we conclude that, for all $x > 0$, \[eq:control\_eigen\_FF\] ¶e\^[-x]{} , since $$\sum_{i \in \bbN_h \cup \{0\}} \Big(n_i - 2\sqrt{|\bbN_h| n_i}- 2\sqrt{2x n_i}\Big) 
\ge \sum_{i \in \bbN_h \cup \{0\}} n_i - 2(\sqrt{|\bbN_h|} + \sqrt{2x}) \sum_{i \in \bbN_h \cup \{0\}} \sqrt{n_i}\ ,$$ with $\sum_{i \in \bbN_h \cup \{0\}} n_i = |S^h|$, and $\sum_{i \in \bbN_h \cup \{0\}} \sqrt{n_i}\leq \sqrt{|S^h|(|\bbN_h|+1)}$, by the Cauchy-Schwarz inequality. Taking $x=C |S^h|/(|\bbN_h|+1)$ in the above inequality for a sufficiently small constant $C$ and relying on Condition , we get $$\P\left\{\lambda^{\min}(\bF_{S,h}^\top \bF_{S,h}^\top )\leq \tfrac12 |S^h|\right\}
\le \exp\left(-C |S^h|/(|\bbN_h|+1)\right) \ .$$ We now turn to bounding $\|\bF_{S,h}X_{S,h}\|_{\infty}$. Each component of $\bF_{S,h}X_{S,h}$ is of the form $Q_v:=\sum_{i\in S^h}X_{i}X_{i+v}$ for some $v\in \bbN_h$. Note that $Q_v$ is a quadratic form of $|S|$ standard normal variables, and the corresponding symmetric matrix has zero trace, Frobenius norm equal to $\sqrt{|S^h|/2}$, and operator norm smaller than $1$ by diagonal dominance. Combining Lemma \[lem:normal-quad\] with a union bound, we get ¶{\_[S,h]{}X\_[S,h]{}\_+ 2 (x+|\_h|) } 2e\^[-x]{} , x&gt;0 . Taking $x=C|S^h|/|\bbN_h|^2$ in the above inequality for a sufficiently small constant $C$ and using once again Condition allows us to get the bound $$\P\left\{ \|\bF_{S,h}X_{S,h}\|_\infty\geq \frac{|S^h|}{2|\bbN_h|} \right\} \le \exp[-C |S^h|/|\bbN_h|^2]\ .$$ Plugging these bounds into , we conclude that \[eq:bound\_phi\_l1\] ¶{\_S\_1&gt; 1} 3(-C ) .

[*Control of $\E[\tilde{Z}_S]$*]{}. Since $$\tilde{Z}_S\leq Z_S = \|\boldsymbol{\Pi}_{S,h}X_{S,h}\|_2^2\leq \|(\bF_{S,h}^\top \bF_{S,h})^{-1}\|\|\bF_{S,h}X_{S,h}\|_2^2 \le \|X_{S,h}\|_2^2\ ,$$ we have, for any $a > 0$, && a +\
&& a +  , where we used the Cauchy-Schwarz inequality in the second line. Since, under the null, $X_S\sim \cN(0,\bI_S)$, it follows that $\E\left[\|\bF_{S,h}X_{S,h}\|_2^2\right]=|\bbN_h(S)||S^h|$ and $\E\left[\|X_{S,h}\|_2^4\right]= |S^h|(|S^h|+2)$. Gathering this, the deviation inequality with $x=C|S^h|/|\bbN_h|^2$ with a small constant $C>0$, and Condition , and choosing as threshold $a =(|S^h|(1-|\bbN_h|^{-1/2})^{-1}$, leads to $$\begin{aligned}
 \E[\tilde{Z}_S]&\leq & \frac{|\bbN_h|}{1-|\bbN_h|^{-1/2}}+ \sqrt{3}|S^h|\sqrt{\P\left\{\lambda^{\min}(\bF_{S,h}^\top \bF_{S,h})\le 1/a\right\}}\nonumber\\
&\leq & |\bbN_h|+ C' |\bbN_h|^{1/2}+ \sqrt{3}|S^h| \exp\left(-C\frac{|S^h|}{|\bbN_h|^2}\right)\nonumber\\
&\leq & |\bbN_h|+ C |\bbN_h|^{1/2}\label{eq:upper_EZ}\ .\end{aligned}$$

[*Control of $\E\big[\sup_{\|\phi\|_1\leq 1} \tr(\bR_{\phi,S} X_{S}X_{S}^\top \bR_{\phi,S})\big]$*]{}. As explained above, $\|\bR_{\phi,S}\|\leq 3$ and we are therefore able to bound this expectation in terms of $\E[\tilde{Z}_S]$ as follows: \[eq:upper\_ER2\] 3C |\_h| , where we used in the last inequality.

Combining the decomposition with Lemma \[lem:chaos\] and , and , we obtain $$\P\left\{Z_S\geq |\bbN_h|+ C\left(|\bbN_h|^{1/2}+\sqrt{|\bbN_h|t}+ t\right)\right\}\leq e^{-t}+ 3\exp\left(-C' \frac{|S^h|}{|\bbN_h|^2}\right)\ , \quad \forall t>0\ .$$ Since $$T_S= \frac{|S^h|Z_S}{\|X_{S,h}\|_2^2-Z_S}, \text{ where $\|X_{S,h}\|_2^2$ follows a $\chi^2$ distribution with $|S^h|$ degrees of freedom}\ ,$$ from Lemma \[lem:normal-quad\], we derive $$\P\Big[\|X_{S,h}\|_2^2\geq |S^h|-2 \sqrt{|S^h|t}-2t\Big]\leq e^{-t}\ ,$$ for any $t>0$, and from these two deviation inequalities, we get, for all $t\leq C'' |S^h|$, ¶2e\^[-t]{}+ 3 . Finally, we take a union bound over all $S\in \cC$ and invoke again Condition to conclude that, for any $t\leq C'' |S^h|$, $$\P\left\{\max_{S\in \cC} T_S \geq  |\bbN_h|+ C\left(\sqrt{|\bbN_h|(\log(|\cC|)+ 1+t )}+ \log(|\cC|)+ t\right) \right\}\leq 2e^{-t}+  3|\cC|\exp\left(-C' \frac{|S^h|}{|\bbN_h|^2}\right) \ .$$ To conclude, we let $t=\log(1/(4\alpha))$ in the above inequality, and use the condition on $\alpha$ in the statement of the theorem together with Condition , to get the following control of $T^*$ under the null hypothesis: $$\P\left\{\max_{S\in \cC} T_S \geq   |\bbN_h|+ C\left(\sqrt{|\bbN_h|(\log(|\cC|)+ 1+\log(\alpha^{-1}) )}+ \log(|\cC|)+ \log(\alpha^{-1})\right) \right\} \leq \alpha \ .$$

[**Under the alternative hypothesis**]{}. Next we study the behavior of the test statistic $T^*$ under the assumption that there exists some $S\in \cC$ such that $X_S=Y_S\sim \cN(0, \bGamma_S(\phi))$. Since $T^*\geq T_S$, it suffices to focus on this particular $T_S$. For any $i \in S^h$, recall that $Y_i= \phi^\top F_i+ \epsilon_i$ where $F_i = (Y_{i+v} : 1 \le |v|_{\infty} \le h)$ and $\epsilon_i$ is independent of $F_i$. Hence, $Z_S$ decomposes as Z\_S &= &\_[S,h]{}Y\_[S,h]{}\_2\^2\
&= &\_[S,h]{}+ \_[S,h]{}\_[S,h]{} \_2\^2\
&= & \_[S,h]{}\_2\^2+ 2 \^\_[S,h]{}\^\_[S,h]{}+ \_[S,h]{}\_[S,h]{}\_2\^2 = ([I]{}) + ([II]{}) +([III]{}) . To bound the numerator of $T_S$, we bound each of these three terms. (I) and (II) are simply quadratic functions of multivariate normal random vectors and we control their deviations using Lemma \[lem:normal-quad\]. In contrast, (III) is more intricate and we use an ad-hoc method. In order to structure the proof, we state four lemmas needed in our calculations. We provide proofs of the lemmas further down.

\[lem:control\_(I)\] Under condition , there exists a numerical constant $C>0$ such that \[eq:deviation\_I\] ¶{([I]{})\_\^2 } 1 -(-C) .

\[lem:control\_(II)\] For any $t>0$, $$\begin{aligned}
\label{eq:deviation_II-a}
\P\left\{ ({\rm II})\geq - 2\sigma_{\phi}\|\phi\|_2\sqrt{2 |S^h| \|\bGamma(\phi)\|(2+\|\phi\|_1)t}- 12\big[\|\bGamma(\phi)\|\vee (1+\|\phi\|_1)\sigma_{\phi}^2\big]t \right\} &\geq& 1 -e^{-t}\ ,\\ \label{eq:deviation_II-b}
\P\left\{({\rm II}) \geq   -2\sqrt{2} \sigma_{\phi}\sqrt{(|\bbN_h|+1)[\log(|\bbN_h|+1)+ t]} \|\bF_{S,h} \phi\|_2\right\}&\geq& 1-e^{-t}\ .\end{aligned}$$

Recall that $\gamma_j= (\bGamma(\phi))_{0,j}$ denotes the covariance between $Y_0$ and $Y_j$.

\[lem:control\_(III)\] Denote by $\bGamma_{\bbN_h}(\phi)$ the covariance matrix of $(Y_{i},\ i\in \bbN_h)$. For any $t\leq |S^h|$, \[eq:deviation\_wisharts\] \^[max]{}(\_[\_h]{}()\^[-1/2]{}\_[\_h]{}()\^[-1/2]{})1+ 4()\^[-1]{}()(+(|\_h|)) with probability larger than $1-2e^{-t}$. Also, for any $t\ge 1$, \[eq:control\_bSigma\] |\_h|- C(|\_h|\_1+ \^[-1]{}()\_2\^2+ )t\^2 with probability larger than $1-2e^{-t}$.

To bound the denominator of $T_S$, we start from the inequality $$\|Y_{S,h}\|_2^2 - \|\boldsymbol{\Pi}_{S,h}Y_{S,h}\|_2^2= \|\epsilon_{S,h}\|_2^2- \|\boldsymbol{\Pi}_{S,h}\epsilon_{S,h}\|_2^2 \leq \|\epsilon_{S,h}\|_2^2$$ and then use the following result.

\[lem:control\_(IV)\] Under condition , we have \[eq:upper\_epsilon\] ¶{\_[S,h]{}\^2 \_\^2|S\^h|(1+ |\_h|\^[-1/2]{})}1-(-C )  .

With these lemmas in hand, we divide the analysis into two cases depending on the value of $\|\phi\|_2^2$. For small $\|\phi\|^2_2$, the operator norm of the covariance operator $\bGamma(\phi)$ remains bounded, which simplifies some deviation inequalities. For large $\|\phi\|^2_2$, we are only able to get looser bounds which are nevertheless sufficient as in that case $\|\phi\|_2^2$ is far above the detection threshold.

[**Case 1**]{}: $\|\phi\|_2^2\leq (4|\bbN_h|)^{-1}$. This implies that $\|\phi\|_1\leq 1/2$ and also that $\|\bGamma(\phi)\|\leq 2\sigma_{\phi}^2$ by Lemma \[lem:spectrum\_gamma\]. Combining and together with the inequality $2xy\leq x^2+y^2$, we derive that for any $t>0$, \[eq:lower\_case1\] C(|S\^h|\_2\^2- t) with probability larger than $1-e^{-t} -\exp\left(-C\frac{|S^h|}{(|\bbN_h|+1)}\right)$. Turning to the third term, we have $$\frac{({\rm III})}{\sigma_{\phi}^2} \geq \lambda^{\rm max}\left(\bGamma_{\bbN_h}(\phi)^{-1/2}\frac{\bF_{S,h}^\top  \bF_{S,h}}{|S^h|}\bGamma_{\bbN_h}(\phi)^{-1/2}\right)^{-1}\frac{\|\bGamma_{\bbN_h}(\phi)^{-1/2}\bF_{S,h}^\top \epsilon_{S,h}\|_2^2}{\sigma_{\phi}^2 |S^h|}\ .$$ Let $a>0$ be a positive constant whose value we determine later. For any $t>0$, with probability larger than $1-4e^{-t}$, we have &&\
&& |\_h|- C(|\_h|\^[3/2]{}\_2+ \_2\^2+ )t\^2 - 16(+(|\_h|))\
&&|\_h|- C(|\_h|\^[3/2]{}\_2+ )t\^2 - C’(1+ t\^4)\
&& |\_h|- a |S\^h|\^2\_2 - C(a\^[-1]{}t\^4 + t\^2 + (1+ t\^4))\
&& |\_h| - a |S\^h|\^2\_2 - C(1+ (a\^[-1]{}+1)t\^4) . Here in the first line, we used Lemma \[lem:control\_(III)\]. In the second line, we used the fact that $(1-y)/(1+x)\geq 1-x-y$ for all $x,y \ge 0$, $\|\phi\|_1\leq \sqrt{|\bbN_h|}\|\phi\|_2$ by the Cauchy-Schwarz inequality, and $\|\bGamma(\phi)\|\vee \|\bGamma^{-1}(\phi)\|\leq 2$. In the third line, we applied the inequality $\sum_{j\neq 0}\gamma_{j}^2\leq 4\|\phi\|_2^4+ 16\|\phi\|_2^2\leq 20$, which is a consequence of $\|\phi\|_1\leq 1/2$ and Lemma \[lem:conditional\_variance\]. The last line is a consequence of Condition . Then, we take $a=C/2$ with $C$ as in and apply Lemma \[lem:control\_(IV)\] to control the denominator of $T_S$. This leads to $$\P\left\{T_S \geq C |S^h|\|\phi\|_2^2 + |\bbN_h|- C' \sqrt{\bbN_h}(1\vee t^4)\right\}\geq 1 - 4e^{-t} -2e^{-C'' \frac{|S^h|}{|\bbN_h|^2}}\ .$$ Taking $t=\log(8/\beta)$ and letting $C_2$ be small enough in , we get $$\P\left\{T_S \geq C |S^h|\|\phi\|_2^2 + |\bbN_h|- C' \sqrt{\bbN_h}(1+\log^{4}(\beta^{-1}))\right\}\geq 1 - \beta\ ,$$ proving in Case 1.

[**Case 2**]{}: $\|\phi\|_2^2\geq (4 |\bbN_h|)^{-1}$. This condition entails $$\frac{2\|\phi\|_2^2}{1+\|\phi\|_1}\geq  \frac{\|\phi\|_2}{\sqrt{|\bbN_h|}}\ .$$ Since the term $({\rm III})$ is non-negative, we can start from the lower bound $Z_S\geq ({\rm I})+ ({\rm II})$. We derive from Lemma \[lem:control\_(I)\] and the above inequality that \[eq:lower\_I-bis\] ¶{([I]{})|S\^h| }1- (-C) . Taking $t=C |S^h|/|\bbN_h|^2$ in for a constant $C$ sufficiently small, and using Condition , we get that $({\rm II}) \ge - 3 \sqrt{C} \sigma_\phi \sqrt{|S^h|/|\bbN_h|} \sqrt{({\rm I})}$ with probability at least $1 - e^{-t}$. Also, $\|\phi\|_2^2 \ge (4|\bbN_h|)^{-1}$ implies that the right-hand side exceeds $- \frac12 ({\rm I})$ when the event in holds and $C$ is small enough. Hence, we get $$\P\left\{({\rm I}) + ({\rm II})\geq |S^h|\frac{\sigma_{\phi}^2\|\phi\|_2}{8\sqrt{|\bbN_h|}} \right\}\geq 1- 2 \exp\Big(-C\frac{|S^h|}{|\bbN_h|^2}\Big)\ .$$ Finally, we combine this bound with and the condition $\|\phi\|_2^2 \ge (4|\bbN_h|)^{-1}$, to get ¶{T\_S }1- 3 (-C) 1-, where we used the condition on $\beta$. In view of Condition , we have proved . This concludes the proof of . It remains to prove the auxiliary lemmas.

### Proof of Lemma \[lem:control\_(I)\]

Recall the definition of $S_i$ in . Let $\bF_{S_i}$ denote the matrix with row vectors $F_j, j \in S_i$. We have $$({\rm I}) = \|\bF_{S,h}\phi\|^2_2 = \sum_{i\in \bbN_h\cup\{0\}} \|\bF_{S_i}\phi\|^2_2 \ .$$ For any $u\in \bbR^{S_i}$, = u\_2\^2\_2\^2 \^(()) , since the indices $(v+j : v\in\bbN_{h}, j\in S_i)$ are all distinct. Since $\lambda^{\min}(\bGamma(\phi))\geq \frac{\sigma_{\phi}^2}{1+\|\phi\|_1}$ by Lemma \[lem:spectrum\_gamma\], $\frac{1+\|\phi\|_1}{\sigma_\phi^2\|\phi\|_2^2}\|\phi^\top \bF_{S_i}\|_2^2$ is stochastically lower bounded by a $\chi^2$ distribution with $|S_i|$ degrees of freedom. By Lemma \[lem:normal-quad\] and the union bound, we have that for any $t>0$, ([I]{})&& \_\^2 \_[i\_h{0}]{} |S\_i| -2\
&& \_[\^2 ]{} (|S\^h|- 2 ) , with probability larger than $1-e^{-t}$. Finally we set $t=\tfrac{|S^h|}{32(|\bbN_h|+1)}$ and use Condition to conclude.

### Proof of Lemma \[lem:control\_(II)\]

We first prove . Denote by $\tilde{\bSigma}_{\phi,S}$ the covariance matrix of the random vector $(\epsilon^\top _{\phi,S},\phi^\top  \bF_{S,h}^\top )$ of size $2|S^h|$. Let $\bR$ be the block matrix defined by $$\bR=\begin{pmatrix}  0 &\bI_{S^h} \\ \bI_{S^h} & 0    \end{pmatrix}.$$ Letting $Z$ be a standard Gaussian vector of size $2|S^h|$, we have $2\phi^\top  \bF_{S,h}^\top \epsilon_{S,h}\sim Z^\top  \tilde{\bSigma}^{1/2}_{\phi,S}\bR  \tilde{\bSigma}^{1/2}_{\phi,S}Z \ .$ From Lemma \[lem:normal-quad\] we get that for all $t>0$, with probability at least $1-e^{-t}$, $$\begin{aligned}
2\phi^\top  \bF_{S,h}^\top \epsilon_{S,h}& \le& \tr[\tilde{\bSigma}^{1/2}_{\phi,S}\bR\tilde{\bSigma}^{1/2}_{\phi,S}]- 2\|\tilde{\bSigma}^{1/2}_{\phi,S}\bR\tilde{\bSigma}^{1/2}_{\phi,S}\|_F\sqrt{t}- 2 \|\tilde{\bSigma}^{1/2}_{\phi,S}\bR\tilde{\bSigma}^{1/2}_{\phi,S}\|t\ , \notag \\
%&\geq&  - 2\|\tilde{\bSigma}^{1/2}_{\phi,S}\bR\tilde{\bSigma}^{1/2}_{\phi,S}\|_F\sqrt{t}- 2 \|\tilde{\bSigma}_{\phi,S}\|\|\bR\|t\\
&\le & - 2\|\tilde{\bSigma}^{1/2}_{\phi,S}\bR\tilde{\bSigma}^{1/2}_{\phi,S}\|_F\sqrt{t} - 2 \|\tilde{\bSigma}_{\phi,S}\| t\ , \label{phi_F_eps}\end{aligned}$$ where we used the fact that $\tr[\tilde{\bSigma}^{1/2}_{\phi,S}\bR\tilde{\bSigma}^{1/2}_{\phi,S}] = \E[\phi^\top  \bF_{S,h}^\top  \epsilon_{S,h}]=0$ and that $\|\bR\| = 1$. In order to bound the Frobenius norm above, we start from the identity $$\|\tilde{\bSigma}^{1/2}_{\phi,S}\bR\tilde{\bSigma}^{1/2}_{\phi,S}\|^2_F = \Var[2\phi^\top  \bF_{S,h}^\top  \epsilon_{S,h}] = \E\left[(2 \phi^\top  \bF_{S,h}^\top  \epsilon_{S,h})^2\right] = 4 \sum_{i,j\in S^h}\E[\epsilon_i\epsilon_j (\phi^\top F_i)(\phi^\top F_j)] \ ,$$ with $\eps_i$ being the $i$th component of $\eps_{S,h}$. For $i=j$, the expectation of the right-hand side is $\sigma_{\phi}^2\E[(\phi^\top F_i)^2]$, while if the distance between $i$ and $j$ is larger than $h$, then $\epsilon_i$ and $(\epsilon_j,F_i,F_j)$ are independent and the expectation of the right-hand side is zero. If $1 \le |i-j|\leq h$, then we use Isserlis’ theorem, together with the fact that $\eps_i \perp F_i$, to obtain ||&=& |+ E\[\_j\^F\_i\]|\
& & \_\^2|\_[i-j]{}|+ \^2\_[j-i]{}\_\^2 . Putting all the terms together, we obtain \^[1/2]{}\_[,S]{}\^[1/2]{}\_[,S]{}\^2\_F && 4 |S\^h|\_\^2 { (1 +\_1) + \_2\^2 }\
&& 4 \_\^2|S\^h|\_2\^2 ()(2+\_1) , using the fact that $\|\bGamma(\phi)\| \ge 1$.

Turning to $\|\tilde{\bSigma}_{\phi,S}\|$, denote $\bGamma(\phi)^{\epsilon}$ the covariance of the process $(\epsilon_i,\ i\in \bbZ^d)$. By Lemma \[lem:covariance\_residuals\], $(\bGamma(\phi)^{\epsilon})_{i,j}=\left[- \phi_{i-j}+ \1_{i=j}\right]\sigma_{\phi}^2$, and it follows that $\|\bGamma(\phi)^{\epsilon}\|\leq (1+\|\phi\|_1)\sigma_{\phi}^2$. Then, for all vectors $u,v \in \bbR^{S^h}$, (\_[iS\^h]{} u\_i\^F\_i + \_[iS\^h]{} v\_i\_i)&= & (\_[iS\^h]{} u\_iY\_i + \_[iS\^h]{} (v\_i-u\_i)\_i)\
&& 2 (\_[iS\^h]{} u\_iY\_i )+ 2(\_[iS\^h]{} (v\_i-u\_i)\_i)\
&& 2u\_2\^2 () + 2 u-v\_2\^2 ()\^\
&& 6(u\^2\_2+ v\_2\^2)  . Consequently, $\|\tilde{\bSigma}_{\phi,S}\|\leq 6[\|\bGamma(\phi)\|\vee \|\bGamma(\phi)^{\epsilon}\|]\leq 6[\|\bGamma(\phi)\|\vee (1+\|\phi\|_1)\sigma_{\phi}^2]$.

We conclude that holds by virtue of the two bounds we obtained for the two terms in .

Turning to , we decompose $({\rm II})$ into $2 \sum_{i\in \bbN_h\cup\{0\}}\phi^\top  \bF_{S_i}^\top  \epsilon_{S_i}$. For any $j_1\neq j_2\in S_i$, $|j_1-j_2|_{\infty}\geq 2h+1$ and therefore $\epsilon_{j_1}$ is independent of $(Y_{j_2+v},\ v\in\bbN_h\cup\{0\})$. Since $\epsilon_{j_2}$ and $F_{j_2} \phi$ are linear combinations of this collection, we conclude that $\epsilon_{j_1}\perp (\epsilon_{j_2}^\top , \phi^\top F_{j_2}^\top )$. Consequently, $\epsilon_{S_i}/\sigma_\phi$ follows a standard normal distribution and is independent of $\bF_{S_i} \phi$. By conditioning on $\bF_{S_i} \phi$ and applying a standard Gaussian concentration inequality, we get $$\P\Big\{|\phi^\top \bF_{S_i}^\top \epsilon_{S_i}| \leq \sigma_\phi\|\bF_{S_i} \phi\|_2\sqrt{2t} \Big\} \leq e^{-t}\ ,$$ for any $t>0$. We then take a union bound over all $i\in \bbN_h\cup\{0\}$. For any $t>0$, ([II]{}) && -2 \_ \_[i\_h{0}]{}\^\_[S\_i]{}\_2\
&& -2 \_ \_[S,h]{}\_2 , with probability larger than $1-e^{-t}$.

### Proof of Lemma \[lem:control\_(III)\]

[**Proof of .**]{} Fix $(v_1,v_2)\in \bbN_h$ and consider the random variable $$(\bF_{S,h}^\top  \bF_{S,h})_{v_1,v_2} = \sum_{i\in S^h}Y_{i+v_1}Y_{i+v_2} = Y_{S}^\top \bR Y_S = V^\top \bGamma_S(\phi)^{1/2}\bR \bGamma^{1/2}_{S}(\phi)V\ ,$$ which constitutes a definition for the symmetric matrix $\bR$, and $V\sim \cN(0,\bI_S)$. Observe that $\|\bR\|_F^2=|S^h|$ and $\|\bR\|\leq 1$ as the $l_1$ norm of each row of $\bR$ is smaller than one. We derive from Lemma \[lem:normal-quad\], and the fact that $\|\bGamma_S(\phi)^{1/2}\bR \bGamma^{1/2}_{S}(\phi)\|_F^2\leq \|\bR\|_F^2\|\bGamma^{1/2}_{S}(\phi)\|^4\leq |S^h|\|\bGamma(\phi)\|^2$ and $\|\bGamma_S(\phi)^{1/2}\bR \bGamma^{1/2}_{S}(\phi)\|\leq \|\bR\|\|\bGamma_S(\phi)\|\leq \|\bGamma(\phi)\|$, that for any $t>0$, $$\P\left\{\big|(\bF_{S,h}^\top  \bF_{S,h})_{v_1,v_2}- |S^h|\gamma_{v_1,v_2}\big|\leq 2\|\bGamma(\phi)\|\sqrt{|S^h|t}+ 2\|\bGamma(\phi)\|t \right\}\leq 2e^{-t}~.$$ Then we bound the $\ell_2$ operator norm of $|S^h|^{-1}\bF_{S,h}^\top  \bF_{S,h}- \bGamma_{\bbN_h}(\phi)$ by its $\ell_1$ operator norm and combine the above deviation inequality with a union bound over all $(v_1,v_2)\in \bbN_h$. Thus, for any $t\leq |S^h|$, - \_[\_h]{}()&& \_[v\_1\_h]{}\_[v\_2\_h]{}|- \_[v\_1,v\_2]{}|\
&& 2()( + )\
&& 4()(+ (|\_h|))  , with probability larger than $1-2e^{-t}$. Hence, under this event, $$\lambda^{\rm max}\left(\bGamma_{\bbN_h}(\phi)^{-1/2}\frac{\bF_{S,h}^\top  \bF_{S,h}}{|S^h|}\bGamma_{\bbN_h}(\phi)^{-1/2}\right)\leq 1+  4\|\bGamma(\phi)\|\|\bGamma^{-1}(\phi)\|\frac{|\bbN_h|}{|S^h|^{1/2}}\left(\sqrt{t}+\log(|\bbN_h|)\right)\ ,$$ since $\|\bGamma_{\bbN_h}(\phi)^{-1}\|\leq \|\bGamma^{-1}(\phi)\|$. This concludes the proof of .

[**Proof of .**]{} Turning to the second deviation bound, we use the following decomposition $$\|\bGamma_{\bbN_h}(\phi)^{-1/2}\bF_{S,h}^\top  \epsilon_{S,h}\|_2^2= \sum_{i\in S^h} \epsilon_{i}^2\|\bGamma_{\bbN_h}(\phi)^{-1/2}F_{i}\|_2^2+ \sum_{(i,j),\ i\neq j } \epsilon_i\epsilon_j F_j^\top  \bGamma_{\bbN_h}(\phi)^{-1}F_i =: A+ B\ ,$$ with $\eps_i$ being the $i$th entry of $\eps_{S,h}$. Since both $A$ and $B$ are Gaussian chaos variables of order 4, we apply Lemma \[lem:chaos\_4\] to control their deviations. For any $t>0$, \[eq:decomposition\_A+B\] ¶{A+B- C(\^[1/2]{}(A)+ \^[1/2]{}(B))t\^2 }2e\^[-t]{} , using the fact that $\Var^{1/2}(A+B) \le \Var^{1/2}(A)+ \Var^{1/2}(B)$. Thus, it suffices to compute the expectation and variance of $A$ and $B$.

First, we have $\E[A]= |S^h||\bbN_h|\sigma_{\phi}^2$, by independence of $\eps_i$ and $F_i$, and from this we get (A)&=&\_[i,j S\^h]{}(- \^4\_|\_h|\^2 ) =: \_[i,j S\^h]{}A\_[i,j]{} . If $|i-j|_{\infty}\leq h$, we may use the Cauchy-Schwarz inequality to get |A\_[i,j]{}|= 3\_\^4|\_h|(|\_[h]{}|+2) , again by independence of $\epsilon_i$ and $\|\bGamma_{\bbN_h}(\phi)^{-1/2}F_{i}\|_2^2$. If $|i-j|_{\infty}> h$, then $\epsilon_i$ is independent of $(F_i,F_j,\epsilon_j)$ and $\epsilon_j$ is independent of $(F_i,F_j,\epsilon_i)$, so we get &=& - |\_h|\^2\
& = & \_[v\_1,v\_2,v\_3,v\_4\_h]{} (\_[\_h]{}()\^[-1]{})\_[v\_1,v\_2]{}(\_[\_h]{}()\^[-1]{})\_[v\_3,v\_4]{}\
& &- |\_h|\^2 \
& =& \_[v\_1,v\_2,v\_3,v\_4\_h]{} (\_[\_h]{}()\^[-1]{})\_[v\_1,v\_2]{}(\_[\_h]{}()\^[-1]{})\_[v\_3,v\_4]{}where we apply Isserlis’ theorem in the second line and use the definition of $\bGamma_{\bbN_h}(\phi)$ in the last line. By symmetry, we get && 2\_[\_h]{}()\^[-1]{}\_\^2\_[v\_1,v\_2,v\_3,v\_4\_h]{}|\_[i+v\_1-j-v\_3]{}\_[i+v2-j-v\_4]{}|\
&& 2\_[\_h]{}()\^[-1]{}\^2|\_h| \_[v\_1,v\_2\_h]{}\^2\_[i-j+v\_1-v\_2]{}\
&& 2\^[-1]{}()\^2 |\_h|\^2 \_[v\_[2h]{}]{}\^2\_[i-j+v]{} , using the Cauchy-Schwarz inequality in the second line. Here $\|\bA\|_{\infty}$ denotes the supremum norm of the entries of $\bA$. Then, summing over all $j$ lying at a distance larger than $h$ from $i$, \_[jS\^h, |j-i|\_&gt;h]{} && 2\^[-1]{}()\^2 |\_h|\^2 \_[jS\^h, |j-i|\_&gt;h]{} \_[v\_[2h]{}]{}\^2\_[i-j+v]{}\
&& 2\^[d+1]{}\^[-1]{}()\^2 |\_h|\^3 \_[j\^d{0}]{}\_j\^[2]{} . Putting the terms together, we conclude that \[eq:var\_A\] (A)\_\^4|S\^h||\_h|\^3(6+ 2\^[d+1]{}\_[j\^d{0}]{}\_j\^[2]{}) .

Next we bound the first two moments of $B$. Consider $(i,j)\in S^h$ such that $|i-j|_{\infty}>h$. Then $\E\big[\epsilon_i\epsilon_j F_j^\top  \bGamma_{\bbN_h}(\phi)^{-1}F_i\big] = 0$ by independence of $\epsilon_i$ with the other variables in the expectation. Suppose now that $|i-j|_{\infty}\leq h$. By Isserlis’ theorem, and the independence of $\eps_i$ and $F_i$, as well as $\eps_j$ and $F_j$, and symmetry, to get &=& \_[\_h]{}()\^[-1]{}+\
&& - \^4\_|\_[i-j]{}|\^2\_[\_h]{}()\^[-1]{} -\_\^2|\_[i-j]{}| |\_h| , using the Cauchy-Schwarz inequality and Lemma \[lem:covariance\_residuals\]. As a consequence, \[eq:E\_B\] -\_\^4|S\^h|\_2\^2\^[-1]{}() - \_\^2|S\^h||\_h|\_1 . Turning to the variance, we obtain $$\Var(B)\leq \E[B^2] = \sum_{i_1\neq i_2} \sum_{i_3\neq i_4 }\E[V_{i_1,i_2,i_3,i_4}]\ ,$$ where $$V_{i_1,i_2,i_3,i_4} := \epsilon_{i_1}\epsilon_{i_2}\epsilon_{i_3}\epsilon_{i_4} F_{i_1}^\top  \bGamma_{\bbN_h}(\phi)^{-1}F_{i_2} F_{i_3}^\top  \bGamma_{\bbN_h}(\phi)^{-1}F_{i_4}\ .$$ Fix $i_1$. If one index among $(i_1,i_2,i_3,i_4)$ lies at a distance larger than $h$ from the three others, then the expectation of $V_{i_1,i_2,i_3,i_4}$ is equal to zero. If one index lies within distance $h$ of $i_1$ and the two remaining indices lie within distance $3h$ of $i_1$, we use the Cauchy-Schwarz inequality to get $$\E[V_{i_1,i_2,i_3,i_4}]
\le \E\Big[\prod_{k=1}^4 |\epsilon_{i_k}| (F_{i_k}^\top \bGamma_{\bbN_h}(\phi)^{-1}F_{i_k})^{1/2}\Big] \\
\leq \E[\epsilon_1^4(F_1^\top \bGamma_{\bbN_h}(\phi)^{-1}F_1)^2]= 3\sigma_{\phi}^4|\bbN_h|(|\bbN_h|+2)\ .$$ Finally, if say $|i_1-i_2|_{\infty}\leq h$ and $|i_3-i_4|_{\infty}\leq h$ and $|i_k - i_\ell| > h$ for $k = 1,2$ and $\ell = 3,4$, then we use again Isserlis’ theorem and simplify the terms to get &=&\
&+& \_[\_h]{}()\^[-1]{}\_[\_h]{}()\^[-1]{}\
&& \_\^4|\_[i\_2-i\_1]{}\_[i\_4-i\_3]{}||\_h|(|\_h|+2)+ \^[-1]{}()\^2\_\^8 \_[i\_2-i\_1]{}\^2\_[i\_4-i\_3]{}\^2  , where we used again Lemma \[lem:covariance\_residuals\] to control the terms involving $\epsilon$’s and the Cauchy-Schwarz inequality to bound the term in $(F_{i_k}, k=1,\ldots,4)$. Putting all the terms together, we conclude that \[eq:var\_B\] (B)C \_\^4(|S\^h||\_h|\^5 + |S\^h|\^2\_1\^2|\_h|\^2+ |S\^h|\^2\_\^2\_2\^4 \^[-1]{}()\^2) , since $\sigma_{\phi}^2\leq \Var[Y_i]= 1$.

Plugging in the bounds that we obtained for the moments of $A$ and $B$ in , we conclude the proof of .

### Proof of Lemma \[lem:control\_(IV)\]

Recall the definition of $S_i$ in . We decompose $\|\epsilon_{S,h}\|_2^2= \sum_{i\in \bbN_h\cup\{0\}}\|\epsilon_{S_i}\|^2_2$ and note that $\|\epsilon_{S_i}\|^2_2 \sim \sigma_\phi^2 \chi^2_{|S_i|}$. Applying the second deviation bound of Lemma \[lem:normal-quad\] together with a union bound, we obtain that for any $t>0$, \_[S,h]{}\_2\^2 && \_\^2 \_[i\_h{0}]{} (|S\_i|+ 2+ 2 t+ 2(|\_h|+1) )\
&& \_\^2(|S\^h| + 2+ 2|\_h|(t+ (|\_h|+1))) , with probability larger $1-e^{-t}$. Relying on Condition , we derive that ¶{\_[S,h]{}\^2\_\^2|S\^h|(1+ |\_h|\^[-1/2]{})} 1-(-C ) , for a numerical constant $C>0$ small enough.

Proof of Corollary \[cor:AR\]
-----------------------------

It is well known—see, e.g., [@MR1419991]—that any $\ar_h$ process is also a Gaussian Markov random field with neighborhood radius $h$ (and vice-versa). Denote $\tau_\psi^2$ the innovation variance of an $\ar_h(\psi)$ process. The bijection between the parameterizations $(\psi,\tau_\psi^2)$ and $(\phi,\sigma_{\phi}^2)$ is given by the following equations $$\begin{aligned}
\phi_{-i}~=~\phi_i&=&\frac{\psi_{i}- \sum_{k=i+1}^h \psi_k \psi_{k-i}}{1+ \|\psi\|_2^2}~,\quad \quad \text{for $i=1,\ldots, h$ ,} \label{eq:phi_psi_ar} \\
\sigma^2_{\phi}&=&  \frac{\tau_\psi^2}{1+\|\psi\|_2^2} \ .\label{eq:variance_sigma_ar}\end{aligned}$$ This correspondence is maintained below.

[**Lower bound**]{}. In this proof, $C$ is a positive constant that may vary from line to line. It follows from the above equations that $$\|\phi\|_2^2 \leq C\frac{\|\psi\|_2^2 + h\|\psi\|_2^4}{1+\|\psi\|_2^2} \ .$$ Consider any $r\leq 1/h$. In that case, if $\|\phi\|_2\geq r$ then the inequality above implies that $\|\psi\|_2\geq Cr$, and as a consequence, $R^*_{\cC,\mathfrak{G}(h,r)}\leq R^*_{\cC,\mathfrak{F}(h,Cr)}$. Therefore, since and our condition on $h$ together imply that $r \le 1/h$ eventually, it suffices to prove that $R^*_{\cC,\mathfrak{G}(h,r)} \to 1$. For that, we apply Corollary  \[cor:lower\_hypercube\]. Condition there is satisfied eventually under our assumptions ( and our condition on $h$). Consequently, we have $R^*_{\cC,\mathfrak{G}(h,r)}\to 1$ as soon as holds, which is the case when holds.

[**Upper bound**]{}. It follows from and the inequality $\tau_\psi^2\leq 1$ that $$1- \sigma^2_{\phi}\geq \frac{\|\psi\|_2^2}{1+\|\psi\|_2^2}\ .$$ Denoting $u_n:=\log(n)/k + \sqrt{h\log(n)}/k$, observe as above that $u_n\ll 1/h$ by our assumption on $h$.

Assume that $\|\psi\|_2^2\geq r^2$ for some $r^2\geq u_n$. If $\|\phi\|_1\leq 1/2$, it follows from the inequality $1-\sigma^2_{\phi}\leq \|\phi\|_2^2/(1-\|\phi\|_1)\leq 2\|\phi\|^2_2$ (Lemma \[lem:spectrum\_gamma\]) that $\|\phi\|_2^2\geq r^2/4$. And if $\|\phi\|_1> 1/2$, then $\|\phi\|_2^2 \geq (8h)^{-1}$ by the Cauchy-Schwarz inequality. Thus, when $r^2 \le 1/h$, we have $\|\phi\|_2^2\geq r^2/8$, and this implies $$R_{\cC,\mathfrak{F}(h,r)}(f)\leq R_{\cC,\mathfrak{G}(h,r/\sqrt{8})}(f)~, \quad \text{for any test $f$.}$$ When $r^2\geq 1/h$, we simply use a monotonicity argument $$R_{\cC,\mathfrak{F}(h,r)}(f)\leq R_{\cC,\mathfrak{F}(h,h^{-1/2})}(f)\leq R_{\cC,\mathfrak{G}(h,1/\sqrt{8h})}(f)~, \quad \text{for any test $f$.}$$ The result then follows from Theorem \[thm:LS1\].

Acknowledgements {#acknowledgements .unnumbered}
----------------

This work was partially supported by the US National Science Foundation (DMS-1223137, DMS-1120888) and the French Agence Nationale de la Recherche (ANR 2011 BS01 010 01 projet Calibration). The third author was supported by the Spanish Ministry of Science and Technology grant MTM2012-37195.

[^1]: Department of Mathematics, University of California, San Diego

[^2]: Department of Operations Research and Financial Engineering, Princeton University

[^3]: ICREA and Department of Economics, Universitat Pompeu Fabra

[^4]: (corresponding author) INRA, UMR 729 MISTEA, F-34060 Montpellier, FRANCE
