# Change Detection via Affine and Quadratic Detectors

Yang Cao, Arkadi Nemirovski, Yao Xie, Vincent Guigues, Anatoli B. Juditsky

► To cite this version:

Yang Cao, Arkadi Nemirovski, Yao Xie, Vincent Guigues, Anatoli B. Juditsky. Change Detection via Affine and Quadratic Detectors. Electronic Journal of Statistics, 2018, 12 (1), pp.1-57. 10.1214/17-ejs1373. hal-01351066v2

HAL Id: hal-01351066

https://hal.science/hal-01351066v2

Submitted on 26 Feb 2019

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

Public Domain
# Change detection via affine and quadratic detectors

Yang Cao*, Arkadi Nemirovski† and Yao Xie*

H. Milton Stewart School of Industrial and Systems Engineering
Georgia Institute of Technology, Atlanta, Georgia 30332, USA
e-mail: caoyang@gatech.edu; nemirovs@isye.gatech.edu; yao.xie@isye.gatech.edu

Vincent Guigues‡

School of Applied Mathematics, FGV
190 Praia de Botafogo, Rio de Janeiro, RJ, 22250-900, Brazil
e-mail: vincent.guigues@fgv.br

and

Anatoli Juditsky§

LJK, Université Grenoble Alpes
700 Avenue Centrale 38041 Domaine Universitaire de Saint-Martin-d'Hères, France
e-mail: anatoli.juditsky@imag.fr

**Abstract:** The goal of the paper is to develop a specific application of the convex optimization based hypothesis testing techniques developed in A. Juditsky, A. Nemirovski, "Hypothesis testing via affine detectors," Electronic Journal of Statistics 10:2204-2242, 2016. Namely, we consider the Change Detection problem as follows: observing one by one noisy observations of outputs of a discrete-time linear dynamical system, we intend to decide, in a sequential fashion, on the null hypothesis that the input to the system is a nuisance, vs. the alternative that the input is a "nontrivial signal," with both the nuisances and the nontrivial signals modeled as inputs belonging to finite unions of some given convex sets. Assuming the observation noises are zero mean sub-Gaussian, we develop "computation-friendly" sequential decision rules and demonstrate that in our context these rules are provably near-optimal.

**MSC 2010 subject classifications:** Primary 62C20; secondary 90C22.

**Keywords and phrases:** Change-point detection, semi-definite program.

Received February 2017.

<footnote>*Research was partially supported by NSF grants CAREER CCF-1650913, CCF-1442635, CMMI-1538746, and a Georgia Institute of Technology IMat Faculty Fellow (IFF) Seed Grant.</footnote>

<footnote>†Research was supported by NSF grants CCF-1523768, and CCF-1415498 and CNPq grant 401371/2014-0.</footnote>

<footnote>‡Research was partially supported by an FGV grant, CNPq grants 307287/2013-0 and 401371/2014-0, and FAPERJ grant E-26/201.599/2014.</footnote>

<footnote>§Research was supported by the LabEx PERSYVAL-Lab (ANR-11-LABX-0025) and CNPq grant 401371/2014-0.</footnote>
# 1. Introduction

Quick detection of change-points from data streams is a classic and fundamental problem in signal processing and statistics, with a wide range of applications from cybersecurity [21] to gene mapping [36]. Classical statistical change-point detection [35, 2, 4, 40, 37], where one monitors i.i.d. univariate and low-dimensional multivariate observations is a well-developed area. Outstanding contributions include Shewhart's control chart [33], Page's CUSUM procedure [29], Shiryaev-Roberts procedure [34], Gordon's non-parametric procedure [11], and window-limited procedures [19]. Various asymptotic optimality results have been established for these classical methods [24, 30, 31, 27, 19, 20]. High-dimensional change-point detection (also referred to as the multi-sensor change-point detection) is a more recent topic, and various statistical procedures are proposed including [14, 13, 15, 18, 26, 39, 22, 6, 5, 42, 23]. However, there has been very little research on the computational aspect of change-point detection, especially in the high-dimensional setting.

## 1.1. Outline

This paper presents a computational framework to solve change-point detection problems which is completely general: it can process many high-dimensional situations achieving improved false detection control. The main idea is to adapt the framework for hypothesis testing using convex optimization [17] to change-point detection. Change-point detection can be viewed as a multiple-testing problem, where at each time, one has to test whether there has been no change, or there already has been a change-point. With our approach, at each time a detector is designed by convex optimization to achieve the above goal. The convex optimization framework is computationally efficient and can control false detection uniformly according to a pre-specified level.

Since change-point detection in various settings is the subject of huge literature (see, e.g., [1, 28, 38, 9, 10, 32, 42, 4, 20, 35, 2, 40, 37] and references therein), it would be too time-consuming to position our developments w.r.t. those presented in the literature. Instead, we illustrate our approach by its application to a simple example and then comment on the “spirit” of our constructions and results (which, we believe, is somehow different from majority of traditional approaches to change detection).

**Illustrating problem.** We consider a simple version of the classical problem of change detection in the input of a dynamical system (see, e.g., [7, 41, 25] and references therein), where we observe noisy outputs $\omega_t \in \mathbb{R}^\nu$ of a discrete time linear time invariant system on time horizon $t = 1, \dots, d$:

$$ 
\begin{aligned}
x_t &= Ax_{t-1} + bu_t, \\
\omega_t &= Cx_t + \xi_t,
\end{aligned} 
\qquad (1.1) $$

where the inputs $u_t$ are scalars, A, b, C are known, and the observation noises $\xi_t \sim \mathcal{N}(0, I_\nu)$ are independent across time $t = 1, \dots, d$. The input $u = [u_1; \dots; u_d]$
to the system can be either zero (nuisance hypothesis), or a signal of “some
shape $\tau \in \{1, ..., d\}$ and some magnitude $\ge \rho > 0,$” meaning that $u_t = 0$ for
$t < \tau$, and $u_\tau \ge \rho$ (so that $\tau$ represents the change-point location in time); we
refer to the latter option as to the signal hypothesis. We observe $\omega_t$'s one by
one, and our goal is to design decision rules $\{\mathcal{T}_t : 1 \le t \le d\}$ and thresholds
$\{\rho_{t\tau} > 0, 1 \le \tau \le t \le d\}$ in such a way that

* rule $\mathcal{T}_t$ is invoked at time $t$. Depending solely on the observations $\omega_1, ..., \omega_t$ available at this time, this rule

* either accepts the signal hypothesis, in which case we terminate with “sig-
nal” conclusion,

* or claims that so far the nuisance hypothesis is not rejected (“nuisance conclusion at time *t*”), in which case we pass to time instant *t* + 1 (when *t* < *d*) or terminate (when *t* = *d*);

* whenever the nuisance hypothesis is true, the probability of false alarm (signal conclusion somewhere on time horizon $t = 1, ..., d$) is at most a given $\epsilon \in (0, 1/2)$;

* for every $t \le d$ and every $\tau \le t$, whenever the input is a signal of shape $\tau$ and magnitude $\ge \rho_{t\tau}$, the probability of signal conclusion at time $t$ or earlier is at least $1 - \epsilon$. In other words, for every input of shape $\tau$ and magnitude $\ge \rho_{t\tau}$, the probability of the nuisance conclusions at all time instants $1, 2, ..., t$ should be at most $\epsilon$.

In what follows we refer to $\epsilon$ as to risk of the collection $\{\mathcal{T}_t, 1 \le t \le d\}$.
Needless to say, we would like to meet the outlined design specifications with as
small thresholds $\rho_{t\tau}$ as possible.

Our related results can be summarized as follows: we develop specific decision rules $\mathcal{T}_t$ and thresholds $\rho_{t\tau}$ meeting the design specifications and such that

* $\mathcal{T}_t$ and $\rho_{t\tau}$ are yielded by explicit convex optimization problems and thus can be built in a computationally efficient fashion; moreover, the decision rules $\mathcal{T}_t$ are easy to implement;

* the resulting inference procedure is near-optimal in some precise sense. Specifically, for every $\tau$ and $t$, $1 \le \tau \le t \le d$, consider the testing problem where, given the observations $\omega_1, ..., \omega_t$, we want to decide on only two hypotheses on input $u$ underlying the observations: the hypothesis $H_1$ “$u = 0$” and the alternative $H_2(\rho)$ “$u$ is a signal of shape $\tau$ and magnitude $\ge \rho$,” where $\rho > 0$ is a parameter. It may happen that these two hypotheses can be decided upon with risk $\le \epsilon$, meaning that “in the nature” there exists a test which, depending on observations $\omega_1, ..., \omega_t$, accepts exactly one of the hypotheses with error probabilities (i.e., probability to reject $H_1$ when $u = 0$ and the probability to reject $H_2(\rho)$ when $u$ is a signal of shape $\tau$ and magnitude $\ge \rho$) at most $\epsilon$. One can easily find the smallest $\rho = \rho_{t\tau}^*$ for which such a test exists$^1$. Clearly, by

<footnote n="1">¹Note that the observation $(\omega_1, ..., \omega_t)$ is of the form $\bar{A}_t u + \xi^t$ with standard (zero mean, unit covariance matrix) Gaussian noise $\xi^t = (\xi_1, ..., \xi_t)$. It is immediately seen that $\rho_{t\tau}^*$ is the smallest $\rho$ for which the distance $\inf_{v \in V_{t\tau}} \|v\|_2$ from the origin to the convex set $V_{t\tau} = \{\bar{A}_t u : u_s = 0 \text{ for } s < \tau, u_\tau \ge \rho\}$ is at least $2\text{ErfInv}(\epsilon)$, where ErfInv is the inverse error function, see (3.12).</footnote>
construction, $\rho_{t\tau}^*$ is a lower bound on the threshold $\rho_{t\tau}$ of any inference routine which meets the design specifications we are dealing with. Near-optimality of our inference routine means, essentially, that our thresholds $\bar{\rho}_{t\tau}$ are close to the “ideal” thresholds $\rho_{t\tau}^*$ independently of particular values of parameters of model (1.1):

$$ \frac{\bar{\rho}_{t\tau}}{\rho_{t\tau}^*} \le \frac{1}{2} \left[ 1 + \frac{\text{ErfInv}(\epsilon/d^2)}{\text{ErfInv}(\epsilon)} \right] $$

(for details, see Proposition 3.4).

**Paper's scope.** The developments to follow are in no sense restricted to the simplest model of nuisance and signal inputs we have considered so far. In fact, we allow nuisance inputs to vary in a prescribed set $N \ni 0$, and for signal inputs to have $K$ different “shapes,” with signals of “shape $k \le K$ and magnitude $\rho > 0$” varying in prescribed sets $U_k(\rho)$ shrinking as $\rho > 0$ grows. We treat two cases separately:

**I.** “Decision rules based on affine detectors,” in Section 3. In this case, $N \ni 0$ is a convex compact set, and $U_k(\rho) = N + \rho W_k$, where $W_k$ are closed convex sets not containing the origin and such that $\rho W_k \subset W_k$ whenever $\rho \ge 1$, implying that $U_k(\rho)$ indeed shrinks as $\rho$ grows. As far as the observation noises are concerned, we require the vector $\xi^d = (\xi_1, ..., \xi_d)$ to be zero mean sub-Gaussian, with the (perhaps, unknown) matrix parameter (see 4, Section 1.2) belonging to a given convex compact set. This case covers the example we have started with.

**II.** “Decision rules based on quadratic detectors,” in Section 4. In this case, $N \ni 0$ is a bounded set given by a finite system of quadratic inequalities, and $U_k(\rho)$, $1 \le k \le K$, is given by a parametric system of quadratic inequalities of appropriate structure (for details, see Section 4.3). The simplest illustration here is the case when $u_t$ in (1.1) are allowed to be vectors, the only nuisance input is $u = 0$, and a signal input of shape $\tau \le d$ of magnitude $\ge \rho$ is a block-vector $[u_1; ..., u_d]$ with $u_1 = ... = u_{\tau-1} = 0$ and $\|u_\tau\|_2 \ge \rho$. The noise $\xi^d = [\xi_1; ..., \xi_d]$ is assumed to be zero mean Gaussian, with (perhaps, unknown) covariance matrix varying in a known convex compact set.

**Comments.** To complete the introduction, let us comment on the “spirit” of our constructions and results, which we refer to as *operational*. Following the line of research in [8, 16, 17], we allow for rather general *structural* assumptions on the components of our setup (system (1.1) and descriptions of nuisance and signal inputs) and are looking for *computation-friendly* inference routine meaning that our easy-to-implement routines and their performance characteristics are given by *efficient computation* (usually based on Convex Optimization). This appears to be in sharp contrast with the traditional in statistics “closed analytical form” *descriptive* procedures and performance characteristics. While closed analytical form results possess strong explanatory power, these results usually impose severe restrictions on the underlying setup and in this respect are much more restrictive than operational results. We believe that in many applications,
including those considered in this paper, the relatively broad applicability of operational results more than compensates for the lack of explanatory power that is typical of computation-based constructions. It should be added that under favorable circumstances (which, in the context of this paper, do take place in case I), the operational procedures we are about to develop are provably near-optimal in a certain precise sense (see Section 3.4). Therefore, their performance, whether good or bad from the viewpoint of a particular application, is nearly the best possible under the circumstances.

## 1.2. Terminology and notation

In what follows,

1. All vectors are column vectors.

2. We use “MATLAB notation:” for matrices $A_1, ..., A_k$ of common width, $[A_1; A_2; ...; A_k]$ stands for the matrix obtained by (up-to-down) vertical concatenation of $A_1, A_2, ..., A_k$; for matrices $A_1, ..., A_k$ of common height, $[A_1, A_2, ..., A_k]$ is the matrix obtained by (left-to-right) horizontal concatenation of $A_1, A_2, ..., A_k$.

3. $\mathbf{S}^n$ is the space of $n \times n$ real symmetric matrices, and $\mathbf{S}_+^n$ is the cone of positive semidefinite matrices from $\mathbf{S}^n$. Relation $A \succeq B$ ($A \succ B$) means that $A, B$ are symmetric matrices of the same size such that $A - B$ is positive semidefinite (respectively, positive definite), and $B \preceq A$ ($B \prec A$) is the same as $A \succeq B$ (respectively, $A \succ B$).

4. $\mathcal{SG}[U, \mathcal{U}]$, where $U$ is a nonempty subset of $\mathbf{R}^n$, and $\mathcal{U}$ is a nonempty subset of $\mathbf{S}_+^n$, stands for the family of all Borel sub-Gaussian probability distributions on $\mathbf{R}^n$ with sub-Gaussianity parameters from $U \times \mathcal{U}$. In other words, $P \in \mathcal{SG}[U, \mathcal{U}]$ if and only if $P$ is a probability distribution such that for some $u \in U$ and $\Theta \in \mathcal{U}$ one has $\ln(\int e^{h^T y} P(dy)) \le u^T h + \frac{1}{2} h^T \Theta h$ for all $h \in \mathbf{R}^n$ (whenever this is the case, $u$ is the expectation of $P$); we refer to $\Theta$ as to sub-Gaussianity matrix of $P$. For a random variable $\xi$ taking values in $\mathbf{R}^n$, we write $\xi \sim \mathcal{SG}[U, \mathcal{U}]$ to express the fact that the distribution $P$ of $\xi$ belongs to $\mathcal{SG}[U, \mathcal{U}]$.

Similarly, $\mathcal{G}[U, \mathcal{U}]$ stands for the family of all Gaussian distributions $\mathcal{N}(u, \Theta)$ with expectation $u \in U$ and covariance matrix $\Theta \in \mathcal{U}$, and $\xi \sim \mathcal{G}[U, \mathcal{U}]$ means that $\xi \sim \mathcal{N}(u, \Theta)$ with $u \in U$, $\Theta \in \mathcal{U}$.

5. Given two families $\mathcal{P}_1, \mathcal{P}_2$ of Borel probability distributions on $\mathbf{R}^n$ and a detector $\phi$ (a Borel real-valued function on $\mathbf{R}^n$), Risk($\phi|\mathcal{P}_1, \mathcal{P}_2$) stands for the risk of the detector [8] taken w.r.t. the families $\mathcal{P}_1, \mathcal{P}_2$, that is, the smallest $\epsilon$ such that

$$ (a) \quad \int e^{-\phi(y)} P(dy) \le \epsilon \quad \forall P \in \mathcal{P}_1, \qquad (1.2) \\ (b) \quad \int e^{\phi(y)} P(dy) \le \epsilon \quad \forall P \in \mathcal{P}_2. $$

When $\mathcal{T}$ is a test deciding on $\mathcal{P}_1$ and $\mathcal{P}_2$ via random observation $y \sim P \in \mathcal{P}_1 \cup \mathcal{P}_2$ (that is, $\mathcal{T}: \mathbf{R}^n \to \{1, 2\}$ is a Borel function, with $\mathcal{T}(y) = 1$ interpreted as “given observation $y$, the test accepts the hypothesis $H_1: P \in \mathcal{P}_1$ and rejects the hypothesis $H_2: P \in \mathcal{P}_2,$” and $\mathcal{T}(y) = 2$ interpreted as “given observation
$y, \mathcal{T}$ accepts $H_2$ and rejects $H_1$)

$$ \text{Risk}_1(\mathcal{T}|\mathcal{P}_1, \mathcal{P}_2) = \sup_{P \in \mathcal{P}_1} \text{Prob}_{y \sim P}\{y: \mathcal{T}(y) = 2\}, $$

$$ \text{Risk}_2(\mathcal{T}|\mathcal{P}_1, \mathcal{P}_2) = \sup_{P \in \mathcal{P}_2} \text{Prob}_{y \sim P}\{y: \mathcal{T}(y) = 1\} $$

stand for the partial risks of the test, and

$$ \text{Risk}(\mathcal{T}|\mathcal{P}_1, \mathcal{P}_2) = \max[\text{Risk}_1(\mathcal{T}|\mathcal{P}_1, \mathcal{P}_2), \text{Risk}_2(\mathcal{T}|\mathcal{P}_1, \mathcal{P}_2)] $$

stands for the risk of the test.

A detector $\phi(\cdot)$ and a real $\alpha$ specify a test $\mathcal{T}^{\phi, \alpha}$ which accepts $H_1$ ($\mathcal{T}^{\phi, \alpha}(y) = 1$) when $\phi(y) \ge \alpha$, and accepts $H_2$ ($\mathcal{T}^{\phi, \alpha}(y) = 2$) otherwise. From (1.2) it is immediately seen that

$$ \text{Risk}_1(\mathcal{T}^{\phi, \alpha}|\mathcal{P}_1, \mathcal{P}_2) \le e^{\alpha} \text{Risk}(\phi|\mathcal{P}_1, \mathcal{P}_2), \quad (1.3) $$

$$ \text{Risk}_2(\mathcal{T}^{\phi, \alpha}|\mathcal{P}_1, \mathcal{P}_2) \le e^{-\alpha} \text{Risk}(\phi|\mathcal{P}_1, \mathcal{P}_2). $$

All proofs are transferred to the appendix.

## 2. Dynamic change detection: preliminaries

In the sequel, we address the situation which can be described informally as follows. We observe noisy outputs of a linear system at times $t = 1, \dots, d$, the input to the system being an unknown vector $x \in \mathbb{R}^n$. Our “full observation” is

$$ y^d = \bar{A}_d x + \xi^d, \quad (2.1) $$

where $\bar{A}_d$ is a given $\nu_d \times n$ sensing matrix, and $\xi^d \sim \mathcal{SG}[\{0\}, \mathcal{U}]$ (see item 4 in Section 1.2), where $\mathcal{U}$ is a given nonempty convex compact subset of int $\mathbf{S}_+^{\nu_d}$.

Observation $y^d$ is obtained in $d$ steps; at a step (time instant) $t = 1, \dots, d$, the observation is

$$ y^t = \bar{A}_t x + \xi^t \equiv S_t[\bar{A}_d x + \xi^d] \in \mathbf{R}^{\nu_t}, \quad (2.2) $$

where $1 \le \nu_1 \le \nu_2 \le \dots \le \nu_d$, $S_t$ is $\nu_t \times \nu_d$ matrix of rank $\nu_t$ and $y^t$ “remembers” $y^{t-1}$, meaning that $S_{t-1} = R_t S_t$ for some matrix $R_t$. Clearly, $\xi^t$ is sub-Gaussian with parameters $(0, \Theta_t)$, with

$$ \Theta_t = S_t \Theta S_t^T \subset \mathcal{U}_t := \{S_t \Theta S_t^T : \Theta \in \mathcal{U}\}; \quad (2.3) $$

note that $\mathcal{U}_t$, $1 \le t \le d$, are convex compact sets comprised of positive definite $\nu_t \times \nu_t$ matrices.

Our goal is to build a *dynamic test* for deciding on the *null*, or *nuisance*, hypothesis, stating that the input to the system underlying our observations is a nuisance, vs. the alternative of a *signal* input. Specifically, at every time $t = 1, \dots, d$, given observation $y^t$, we can either decide that the input is a signal and terminate (“termination at step $t$ with a signal conclusion,” or, equivalently, “detection of a signal input at time $t$”), or to decide (“nuisance conclusion at step $t$”) that so far, the nuisance hypothesis holds true, and to pass to the next time instant $t+1$ (when $t < d$) or to terminate (when $t = d$).
Given an upper bound $\epsilon$ on the probability of a false alarm (detecting a signal input somewhere on the time horizon 1, ..., $d$ in the situation when the true input is a nuisance), our informal goal is to build a dynamic test which respects the false alarm bound and under this restriction, detects signal inputs “as fast as possible.”

We consider two different types of detection procedures, those based on affine and on quadratic detectors, each type dealing with its own structure of nuisance and signal inputs.

### 3. Change detection via affine detectors

We start with describing the structure of nuisance and signal inputs that we intend to deal with.

#### 3.1. Setup

Consider the setup as follows.

1. Inputs to the system belong to a given convex compact set $X \subset \mathbb{R}^n$, and nuisance inputs form a given closed and convex subset $N$ of $X$, with $0 \in N$.

2. Informal description of a signal input $x$ is as follows: $x \in X$ is obtained from some nuisance input $v$ by adding an “activation” $w$ of some shape and some magnitude. There are $K$ possible shapes, $k$-th of them represented by a closed convex set $W_k \subset \mathbb{R}^n$ such that

2.1. $0 \notin W_k$;

2.2. $W_k$ is semi-conic, meaning that when $w \in W_k$ and $\rho \ge 1$, it holds $\rho w \in W_k$.

The magnitude of an activation is just a positive real, and an activation of shape $k$ and magnitude at least $\rho > 0$ is an element of the set

$$W_k^\rho = \{w = \rho y : y \in W_k\}.$$

**Example:** Let $K = n$ and let $W_k$ be the set of all inputs $w \in \mathbb{R}^n$ with the first $k-1$ entries in $w$ equal to zero, and $k$-th entry $\ge 1$. In this case, the shape of an activation $w \in \mathbb{R}^n$ is its “location” – the index of the first nonzero entry in $w$, and activations of shape $k$ and magnitude $\ge \rho$ are vectors $w$ from $\mathbb{R}^n$ with the first nonzero entry in position $k$ and the value of this entry at least $\rho$.

We have presented the simplest formalization of what informally could be called “activation up.” To get equally simple formalization of an “activation down,” one should take $K = 2n$ and define $W_{2i-1}$ and $W_{2i}$, $i \le n$, as the sets of all vectors from $\mathbb{R}^n$ for which the first nonzero entry is in position $i$, and the value of this entry is at least 1 for $W_{2i-1}$ (“activation up” of magnitude $\ge 1$ at time $i$) or is at most $-1$ for $W_{2i}$ (“activation down” of magnitude $\ge 1$ at time $i$).

3. The formal description of “signal” inputs is as follows: these are vectors $x$ from $X$ which for some $k \le K$ can be represented as $x = v+w$ with $v \in V_k$ and $w \in W_k^\rho$ for some $\rho > 0$, where $W_k$ are as described above, and $V_k$, $0 \in V_k$, are nonempty compact convex subsets of $X$.<fnref n="2" /> Thus, when speaking about signals (or

<footnote n="2">²In the informal description of signals, $V_k$ were identified with the set $N$ of nuisances; now we lift this restriction in order to add more flexibility.</footnote>
signal inputs), we assume that we are given $K$ nonempty closed convex sets $W_k$, $k \le K$, each of them semi-conic and not containing the origin, and $K$ nonempty compact convex sets $V_k \subset X$. These sets give rise to single-parametric families of compact convex sets

$$W_k^\rho = \{\rho y : y \in W_k\}, \quad X_k^\rho = [V_k + W_k^\rho] \cap X,$$

indexed by “activation shape” $k$ and parameterized by “activation magnitude” $\rho > 0$. Signals are exactly the elements of the set $\tilde{X} = \bigcup_{\rho>0, k \le K} X_k^\rho$. In the sequel, we refer to inputs from $N$ as to feasible nuisances, to inputs from $X_k^\rho$ as to feasible signals with activation of shape $k$ and magnitude $\ge \rho$, and to inputs from $\tilde{X}$ as to feasible signals. To save words, in what follows “a signal of shape $k$ and magnitude $\ge \rho$” means exactly the same as “a signal with activation of shape $k$ and magnitude $\ge \rho$.”

From now on, we make the following assumption:

**Assumption A1.** For every $k \le K$, there exists $R_k > 0$ such that the set $X_k^{R_k}$ is nonempty.

Since $X_k^\rho$ shrinks as $\rho$ grows due to semi-conicity of $W_k$, it follows that for every $k$, the sets $X_k^\rho$ are nonempty for all small enough positive $\rho$.

## 3.2. Construction

### 3.2.1. Outline

Given an upper bound $\epsilon \in (0, 1/2)$ on the probability of false alarm, our course of actions is as follows.

1. We select $d$ positive reals $\epsilon_t$, $1 \le t \le d$, such that $\sum_{t=1}^d \epsilon_t = \epsilon$; $\epsilon_t$ will be an upper bound on the probability of a false alarm at time $t$.

2. We select thresholds $\rho_{tk} > 0$, $1 \le k \le K$ in such a way that a properly designed test $\mathcal{T}_t$ utilizing the techniques of [17, Section 3] is able to distinguish reliably, given an observation $y^t$, between the hypotheses $H_{1,t} : x \in N$ and $H_{2,t} : x \in \bigcup_{k=1}^K X_k^{\rho_{tk}}$ on the input $x$ underlying observation $y^t$. After $y^t$ is observed, we apply test $\mathcal{T}_t$ to this observation, and, according to what the test says,

* either claim that the input is a signal, and terminate,

* or claim that so far, the hypothesis of nuisance input seems to be valid, and either pass to the next observation (when $t < d$), or terminate (when $t = d$).

The generic construction we intend to use when building the test $\mathcal{T}_t$ stems from [8, 17].

### 3.2.2. Implementation: preliminaries

**Building block: affine detectors for sub-Gaussian families.** Our principal building block originates from [17] and is as follows. Let $\mathcal{U}$ be a convex
compact set comprised of positive definite $\nu \times \nu$ matrices, and $U_1, U_2$ be two closed nonempty convex subsets in $\mathbb{R}^\nu$, with $U_1$ bounded. The following result was proved in [17]:

**Proposition 3.1.** [17, Propositions 3.3 and 3.4] With $\mathcal{U}$, $U_1$, $U_2$ as above, consider the convex-concave saddle point problem

$$ SV = \min_{h \in \mathbb{R}^\nu} \max_{\theta_1 \in U_1, \theta_2 \in U_2, \Theta \in \mathcal{U}} [\Phi(h; \theta_1, \theta_2, \Theta) := \frac{1}{2}h^T[\theta_2 - \theta_1] + \frac{1}{2}h^T\Theta h]. $$

This saddle point problem is solvable, and a saddle point ($h_* = \frac{1}{2}\Theta_*^{-1}[\theta_1^* - \theta_2^*]$; $\theta_1^*, \theta_2^*, \Theta_*$) induces affine detector

$$ \phi_*(\omega) = h_*^T(\omega - w_*) , \quad w_* = \frac{1}{2}[\theta_1^* + \theta_2^*] $$

for the families of distributions $P_1 = SG[U_1, \mathcal{U}]$ and $P_2 = SG[U_2, \mathcal{U}]$ (for notation, see item 4 in Section 1.2), and the risk Risk($\phi_*|P_1, P_2$) of this detector (see item 5 in Section 1.2) is upper-bounded by

$$ \epsilon_* = e^{SV} = \exp\left(-\frac{1}{2}h_*^T\Theta_*h_*\right) = \exp\left(-\frac{1}{8}[\theta_1^* - \theta_2^*]^T\Theta_*^{-1}[\theta_1^* - \theta_2^*]\right). $$

Moreover, let

$$ \delta = \sqrt{h_*^T \Theta_* h_*}, $$

and let $\alpha \le \delta^2$, $\beta \le \delta^2$. Then

$$ (a) \quad \forall (\theta \in U_1, \Theta \in \mathcal{U}) : \mathrm{Prob}_{\omega \sim \mathcal{N}(\theta, \Theta)}\{\phi_*(\omega) \le \alpha\} \le \mathrm{Erf}(\delta - \alpha/\delta), \quad (3.1) $$

$$ (b) \quad \forall (\theta \in U_2, \Theta \in \mathcal{U}) : \mathrm{Prob}_{\omega \sim \mathcal{N}(\theta, \Theta)}\{\phi_*(\omega) \ge -\beta\} \le \mathrm{Erf}(\delta - \beta/\delta), \quad (3.1) $$

where

$$ \mathrm{Erf}(s) = \frac{1}{\sqrt{2\pi}} \int_s^\infty \exp\{-r^2/2\} dr $$

is the normal error function. In particular, when deciding, via a single observation $\omega$, on Gaussian hypotheses $H_\chi^G$, $\chi = 1, 2$, with $H_\chi^G$ stating that $\omega \sim \mathcal{N}(\theta, \Theta)$ with $(\theta, \Theta) \in U_\chi \times \mathcal{U}$, the risk of the test which accepts $H_1^G$ when $\phi_*(\omega) \ge 0$ and accepts $H_2^G$ otherwise is at most Erf($\delta$).

Given $k \in \{1, ..., K\}$, observe that the set $X_k^\rho$ is nonempty when $\rho > 0$ is small enough (this was already assumed) and is empty for all large enough values of $\rho$ (since $X$ is compact and $W_k$ is a nonempty closed convex set not containing the origin). From these observations and compactness of $X$ it follows that there exists the largest $\rho = R_k > 0$ for which $X_k^\rho$ is nonempty.

Let us fix $t \in \{1, ..., d\}$, and let

$$ \mathcal{U}_t = \{S_t \Theta S_t^T : \Theta \in \mathcal{U}\} \quad (3.2) $$

be the set of allowed covariance matrices of the observation noise $\xi^t$ in observation $y^t$, so that $\mathcal{U}_t$ is a convex compact subset of the interior of $\mathbf{S}_+^{\nu_t}$. According
to our assumptions, for any nuisance input the distribution of the associated observation $y^t$, see (2.2), belongs to the family $SG[N^t, \mathcal{U}_t]$, with

$$N^t = \bar{A}_t N, \quad (3.3)$$

where $N \subset X$ is the convex compact set of nuisance inputs. Given, along with $t$, an integer $k \le K$ and a real $\rho \in (0, R_k]$, we can define the set

$$U_{k\rho}^t = \{\bar{A}_t x : x \in X_k^\rho\}; \quad (3.4)$$

whatever be a signal input from $X_k^\rho$, the distribution of observation $y^t$ associated with $x$ belongs to the family $SG[U_{k\rho}^t, \mathcal{U}_t]$. Applying Proposition 3.1 to data $U_1 = N^t$, $U_2 = U_{k\rho}^t$, and $\mathcal{U} = \mathcal{U}_t$, we arrive at the convex-concave saddle point problem

$$\mathcal{SV}_{tk}(\rho) = \min_{h \in \mathbf{R}^{\nu_t}} \max_{\theta_1 \in N^t, \theta_2 \in U_{k\rho}^t, \Theta \in \mathcal{U}_t} \left[ \frac{1}{2} h^T [\theta_2 - \theta_1] + \frac{1}{2} h^T \Theta h \right]. \quad (3.5)$$

The corresponding saddle point

$$(h_{tk\rho}; \theta_{tk\rho}^1, \theta_{tk\rho}^2, \Theta_{tk\rho})$$

does exist and gives rise to the affine detector

$$\phi_{tk\rho}(y^t) = h_{tk\rho}^T [y^t - w_{tk\rho}], \quad w_{tk\rho} = \frac{1}{2}[\theta_{tk\rho}^1 + \theta_{tk\rho}^2], \quad (3.6)$$

and risk

$$\text{Risk}(\phi_{tk\rho}|SG[N^t, \mathcal{U}_t], SG[U_{k\rho}^t, \mathcal{U}_t]) \le \epsilon_{tk\rho} := \exp\{\mathcal{SV}_{tk}(\rho)\} \\ = \exp\{-\frac{1}{8}[\theta_{tk\rho}^1 - \theta_{tk\rho}^2]^T [\Theta_{tk\rho}]^{-1} [\theta_{tk\rho}^1 - \theta_{tk\rho}^2]\}. \quad (3.7)$$

Therefore, in view of (1.3),

$$\int_{\mathbf{R}^{\nu_t}} \exp\{-\phi_{tk\rho}(y^t)\} P(dy^t) \le \epsilon_{tk\rho} \quad \forall P \in SG[N^t, \mathcal{U}_t], \\ \int_{\mathbf{R}^{\nu_t}} \exp\{\phi_{tk\rho}(y^t)\} P(dy^t) \le \epsilon_{tk\rho} \quad \forall P \in SG[U_{k\rho}^t, \mathcal{U}_t]. \quad (3.8)$$

To proceed, we need the following simple observation:

**Lemma 3.1.** For every $t \in \{1, ..., d\}$ and $k \in \{1, ..., K\}$, the function $\mathcal{SV}_{tk}(\rho)$ is concave, nonpositive and nonincreasing continuous function of $\rho \in (0, R_k]$, and $\lim_{\rho \to +0} \mathcal{SV}_{tk}(\rho) = 0$.

Moreover, if $\mathcal{U}$ contains a $\succeq$-largest element $\bar{\Theta}$, that is, $\bar{\Theta} \succeq \Theta$ for some $\bar{\Theta} \in \mathcal{U}$ and all $\Theta \in \mathcal{U}$, then $\Gamma_{tk}(\rho) = \sqrt{-\mathcal{SV}_{tk}(\rho)}$ is a nondecreasing continuous convex nonnegative function on $\Delta_k = (0, R_k]$.

### 3.2.3. Implementation: construction

Recall that we have split the required false alarm probability $\epsilon$ between decision steps $t = 1, ..., d$:

$$\epsilon = \sum_{t=1}^{d} \epsilon_t. \quad [\epsilon_t > 0 \forall t]$$
At time instant $t \in \{1, ..., d\}$ we act as follows:

1. For $\varkappa \in (0, 1]$, let

$$K_t(\varkappa) = \{k \le K : SV_{tk}(R_k) < \ln(\varkappa)\},$$

$$K_t(\varkappa) = \text{Card} K_t(\varkappa),$$

so that $K_t(\varkappa)$ is nondecreasing and continuous from the left, and let<fnref n="3" />

$$\varkappa_t = \sup \{\varkappa \in (0, 1] : K_t(\varkappa) \le \frac{\epsilon\epsilon_t}{\varkappa^2}\}. \qquad (3.9)$$

Clearly, $\varkappa_t$ is well defined, takes values in $(0, 1]$, and since $K_t(\varkappa)$ is continuous from the left, we have

$$K_t(\varkappa_t) \le \frac{\epsilon\epsilon_t}{\varkappa_t^2}. \qquad (3.10)$$

For $k \in K_t(\varkappa_t)$, we have $0 = \lim_{\rho \to +0} SV_{tk}(\rho) > \ln(\varkappa_t)$ and $SV_{tk}(R_k) < \ln(\varkappa_t)$. Invoking Lemma 3.1, there exists (and can be rapidly approximated to high accuracy by bisection) $\rho_{tk} \in (0, R_k)$ such that

$$SV_{tk}(\rho_{tk}) = \ln(\varkappa_t). \qquad (3.11)$$

After $\rho_{tk}$ is specified, we build the associated detector $\phi_{tk}(\cdot) \equiv \phi_{tk\rho_{tk}}(\cdot)$ according to (3.6). Note that the risk (3.7) of this detector is $\epsilon_{tk\rho_{tk}} = \varkappa_t$.

For $k \notin K_t(\varkappa_t)$, we set $\rho_{tk} = +\infty$.

3. Finally, we set $\alpha_t = \ln(\varkappa_t/\epsilon)$. and process observation $y^t$ at step $t$ as follows:

* if there exists $k$ such that $\rho_{tk} < \infty$ and $\phi_{tk}(y^t) < \alpha_t$, we claim that the input underlying observation is a signal and terminate;

* otherwise, we claim that so far, the nuisance hypothesis is not rejected, and pass to the next time instant $t+1$ (when $t < d$) or terminate (when $t = d$).

### 3.2.4. Characterizing performance

The performance of the above inference procedure can be described as follows:

**Proposition 3.2.** For any zero mean sub-Gaussian, with parameter $\Theta \in \mathcal{U}$, distribution of observation noise $\xi^d$ in (2.1), one has:

(i) when the input is a feasible nuisance, the probability of terminating with the signal conclusion at time $t \in \{1, ..., d\}$ does not exceed $\epsilon_t$, and thus the probability of a false alarm is at most $\epsilon = \sum_{t=1}^d \epsilon_t$;

(ii) when $t \in \{1, ..., d\}$ and $k \in \{1, ..., K\}$ are such that $\rho_{tk} < \infty$, and the input belongs to a set $X_k^\rho$ with $\rho \ge \rho_{tk}$, then the probability to terminate at step $t$ with the signal conclusion is at least $1 - \epsilon$.

<footnote n="3">³Specific choices of parameters $\varkappa_t$, $K_t(\varkappa_t)$, etc., allow to control false alarm and signal miss probabilities; the rationale behind these choices becomes clear from the proof of Proposition 3.2.</footnote>
### 3.3. Refinement in the Gaussian case

In the case when observation noise $\xi$ in (2.1) is $\mathcal{N}(0, \Theta)$ with $\Theta \in \mathcal{U}$, the outlined construction can be refined. Specifically, at a time instant $t \le d$ we now act as follows.

#### 3.3.1. Construction

1. Let ErfInv stand for the inverse error function:

$$ \text{ErfInv}(\kappa) = \begin{cases} \min\{r : \text{Erf}(r) \le \kappa\}, & 0 \le \kappa \le 1/2, \\ 0, & 1/2 \le \kappa < \infty. \end{cases} \qquad (3.12) $$

Assuming $\epsilon < 1/2$ and given $t \in \{1, ..., d\}$, we set for $\delta \ge 0$

$$ \begin{aligned} \mathcal{L}_t(\delta) &= \{k \le K : \mathcal{SV}_{tk}(R_k) < -\frac{1}{2}\delta^2\}, \\ L_t(\delta) &= \text{Card} \mathcal{L}_t(\delta), \end{aligned} $$

so that $L_k(\delta)$ is a continuous from the right non-increasing function of $\delta \ge 0$. We put

$$ \delta_t = \inf \{ \delta : \delta \ge \frac{1}{2} [\text{ErfInv}(\epsilon_t/L_t(\delta)) + \text{ErfInv}(\epsilon)] \} \quad [\text{with } \text{ErfInv}(\epsilon_t/0) := 0]. \qquad (3.13) $$

Clearly, $\delta_t$ is well defined, is positive, and

$$ \delta_t \ge \frac{1}{2} [\text{ErfInv}(\epsilon_t/L_t(\delta_t)) + \text{ErfInv}(\epsilon)], \qquad (3.14) $$

since $L_k(\delta)$ defined above is continuous from the right.

2. For $k \in \mathcal{L}_t(\delta_t)$, we have $\mathcal{SV}_{tk}(R_k) < -\frac{1}{2}\delta_t^2$, and $\mathcal{SV}_{tk}(\rho) > -\frac{1}{2}\delta_t^2$ for all small enough $\rho > 0$. Invoking Lemma 3.1, there exists (and can be rapidly approximated to high accuracy by bisection) $\rho = \rho_{tk} \in \Delta_k$ such that

$$ \mathcal{SV}_{tk}(\rho_{tk}) = -\frac{1}{2}\delta_t^2. \qquad (3.15) $$

After $\rho_{tk}$ is specified, we define the associated detector $\phi_{tk}(\cdot) \equiv \phi_{tk\rho_{tk}}(\cdot)$ by applying the construction from Proposition 3.1 to the data $U_1 = N^t$, $U_2 = U_{k\rho_{tk}}^t$, $\mathcal{U} = \mathcal{U}_t$ (see (3.2), (3.3), (3.4)), that is, find a saddle point $(h_*; \theta_1^*, \theta_2^*, \Theta_*)$ of the convex-concave function

$$ \frac{1}{2}h^T[\theta_2 - \theta_1] + \frac{1}{2}h^T\Theta h : \mathbf{R}^{\nu_t} \times (N^t \times U_{k\rho_{tk}}^t \times \mathcal{U}_t) \to \mathbf{R} $$

(such a saddle point does exist). By Proposition 3.1, the affine detector

$$ \phi_{tk}(y^t) = h_*[y^t - w_*], \quad w_* = \frac{1}{2}[\theta_1^* + \theta_2^*] $$

has the risk bounded by

$$ \exp\{-\frac{1}{2}\delta^2\} = \epsilon_* = \exp\{\frac{1}{2}h_*^T[\theta_2^* - \theta_1^*] + \frac{1}{2}h_*^T\Theta_*h_*\}. \qquad (3.16) $$

Moreover (see (3.1)), for all $\alpha \le \delta^2$ and $\beta \le \delta^2$ it holds

(a) $\forall (\theta \in N^t, \Theta \in \mathcal{U}_t) : \text{Prob}_{y^t \sim \mathcal{N}(\theta, \Theta)}\{\phi_{tk}(y^t) \le \alpha\} \le \text{Erf}(\delta - \alpha/\delta)$,

(b) $\forall (\theta \in U_{k\rho_{tk}}^t, \Theta \in \mathcal{U}_t) : \text{Prob}_{y^t \sim \mathcal{N}(\theta, \Theta)}\{\phi_{tk}(y^t) \ge -\beta\} \le \text{Erf}(\delta - \beta/\delta). \qquad (3.17)$$
Comparing the second equality in (3.16) with the description of $SV_{tk}(\rho_{tk})$, we see that $\epsilon_* = \exp\{SV_{tk}(\rho_{tk})\}$, which combines with the first equality in (3.16) and with (3.15) to imply that $\delta$ in (3.16) is nothing but $\delta_t$ as given by (3.13). The bottom line is that

(\#) For $k \in L_t(\delta_t)$, we have defined reals $\rho_{tk} \in \Delta_k$ and affine detectors $\phi_{tk}(y^t)$ such that relations (3.17) are satisfied with $\delta = \delta_t$ given by (3.13) and every $\alpha \le \delta_t^2, \beta \le \delta_t^2$.

For $k \notin L_t(\delta_t)$, we set $\rho_{tk} = \infty$.

3. Finally, we process observation $y^t$ at step $t$ as follows. We set

$$ \alpha = -\beta = \frac{\delta_t}{2} [\text{ErfInv}(\epsilon) - \text{ErfInv}(\epsilon_t/L_t(\delta_t))], \quad (3.18) $$

thus ensuring, in view of (3.14), that $\alpha \le \delta_t^2, \beta \le \delta_t^2$. Next, given observation $y^t$, we look at the $k$'s with finite $\rho_{tk}$ (that is, at $k$'s from $L_t(\delta_t)$) and check whether for at least one of these $k$'s the relation $\phi_{tk}(y^t) < \alpha$ is satisfied. If this is the case, we terminate and claim that the input is a signal, otherwise we claim that so far, the nuisance hypothesis seems to be true, and pass to time $t+1$ (if $t < d$) or terminate (when $t = d$).

### 3.3.2. Characterizing performance

The performance of the above inference procedure can be described as follows (cf. Proposition 3.2):

**Proposition 3.3.** Let the observation noise $\xi \sim N(0, \Theta)$ with $\Theta \in \mathcal{U}$. Then

(i) when the input is a feasible nuisance, the probability to terminate with the signal conclusion at time $t \in \{1, \dots, d\}$ does not exceed $\epsilon_t$, and thus the probability of a false alarm is at most $\epsilon = \sum_{k=1}^d \epsilon_t$ (we know this already from Proposition 3.2)

(ii) when $t \in \{1, \dots, d\}$ and $k \in \{1, \dots, K\}$ are such that $\rho_{tk} < \infty$, and the input belongs to a set $X_k^\rho$ with $\rho \ge \rho_{tk}$, then the probability to terminate at step $t$ with the signal conclusion is at least $1 - \epsilon$.

### 3.4. Near-optimality

Our goal now is to understand how good are the inference procedures we have developed. For the sake of definiteness, assume that

$$ \epsilon_t = \epsilon/d, \quad 1 \le t \le d. $$

We consider two assumptions about the observation noise $\xi$ (2.1) along with two respective change inference procedures:

* Sub-Gaussian case, where $\xi$ is known to be sub-Gaussian with parameters $(0, \Theta)$ and $\Theta$ known to belong to $\mathcal{U}$; the corresponding inference procedure is built in Section 3.2;
* Gaussian case, where $\xi \sim \mathcal{N}(0, \Theta)$ with $\Theta \in \mathcal{U}$; the corresponding inference procedure is described in Section 3.3.

Let us fix time instant $t \le d$ and signal shape $k \le K$.

Given $\epsilon \in (0, 1/2)$, it may happen that $\mathcal{SV}_{tk}(R_k) > -\frac{1}{2}\text{ErfInv}^2(\epsilon)$. In this case, informally speaking, even the feasible signal of shape $k$ and the largest possible magnitude $R_k$ does not allow to claim at time $t$ that the input is signal “$(1 - \epsilon)$-reliably.”

Indeed, denoting by $(h_*; \theta_1^*, \theta_2^*, \Theta_*)$ the saddle point of the convex-concave function (3.5) with $\rho = R_k$, we have $\theta_1^* = \bar{A}_t z_*$ with some $z_* \in N$, $\theta_2^* = \bar{A}_t [v_* + R_k w_*]$ with $v_* \in V_k$, $w_* \in W_k$ and $v_* + R_k w_* \in X$, and

$$ \frac{1}{2} \| [\Theta^*]^{-1/2} [\theta_1^* - \theta_2^*] \|_2 = \sqrt{-2\mathcal{SV}_{tk}(R_k)} < \text{ErfInv}(\epsilon). $$

The latter implies that when $\xi^t \sim \mathcal{N}(0, \Theta_*)$ (which is possible), there is no test which allows distinguishing via observation $y^t$ with risk $\le \epsilon$ between the feasible nuisance input $z_*$ and the feasible signal $v_* + R_k w_*$ of shape $k$ and magnitude $\ge R_k$. In other words, even after the nuisance hypothesis is reduced to a single nuisance input $z_*$, and the alternative to this hypothesis is reduced to a single signal $v_* + R_k w_*$ of shape $k$ and magnitude $R_k$, we are still unable to distinguish $(1 - \epsilon)$-reliably between these two hypotheses via observation $y^t$ available at time $t$. Now consider the situation where

$$ \mathcal{SV}_{tk}(R_k) \le -\frac{1}{2}\text{ErfInv}^2(\epsilon), \qquad (3.19) $$

so that there exists $\rho_{tk}^* \in (0, R_k)$ such that

$$ \mathcal{SV}_{tk}(\rho_{tk}^*) = -\frac{1}{2}\text{ErfInv}^2(\epsilon). \qquad (3.20) $$

Similarly to the above, $\rho_{tk}^*$ is just the smallest magnitude of signal of shape $k$ which is distinguishable from nuisance at time $t$, meaning that for every $\rho' < \rho_{tk}^*$ there exist a feasible nuisance input $u$ and feasible signal input of shape $k$ and magnitude $\ge \rho'$ such that these two inputs cannot be distinguished via $y^t$ with risk $\le \epsilon$. A natural way to quantify the quality of an inference procedure is to look at the smallest magnitude $\rho$ of a feasible signal of shape $k$ which, with probability $1 - \epsilon$, ensures the signal conclusion and termination at time $t$. We can quantify the performance of a procedure by the ratios $\rho/\rho_{tk}^*$ stemming from various $t$ and $k$, the closer these ratios are to 1, the better. The result of this quantification of the inference procedures we have developed is as follows:

**Proposition 3.4.** Let $\epsilon \in (0, 1/2)$, $t \le d$ and $k \le K$ be such that (3.19) is satisfied. Let $\epsilon_t = \epsilon/d$, $1 \le t \le d$, and let $\rho_{tk}^* \in (0, R_k)$ be given by (3.20). Let,
further, a real $\chi$ satisfy $\chi > \underline{\chi}$ where

$$ \underline{\chi} = \begin{cases} \frac{1}{2} \left[ 1 + \frac{\text{ErfInv}(\epsilon/(Kd))}{\text{ErfInv}(\epsilon)} \right], & \text{Gaussian case} \\ \left( \frac{1}{2} \left[ 1 + \frac{\text{ErfInv}(\epsilon/(Kd))}{\text{ErfInv}(\epsilon)} \right] \right)^2, & \text{Gaussian case} \\ \frac{\ln(Kd/\epsilon^2)}{\text{ErfInv}^2(\epsilon)}, & \text{U does not contain } \geq\text{-largest element,} \\ & \text{sub-Gaussian case.} \end{cases} \tag{3.21} $$

Then, whenever the input is a feasible signal of shape $k$ and magnitude at least $\chi\rho_{tk}^*$, the probability for the inference procedure from Section 3.2 in the sub-Gaussian case, and the procedure from Section 3.3 in the Gaussian case, to terminate at time $t$ with the signal inference is at least $1 - \epsilon$.

**Discussion.** Proposition 3.4 states that when (3.19) holds (which, as was explained, just says that feasible signals of shape $k$ of the largest possible magnitude $R_k$ can be $(1 - \epsilon)$-reliably detected at time $t$), the ratio $\chi$ of the magnitude of a signal of shape $k$ which is detected $(1 - \epsilon)$-reliably by the inference procedure we have developed to the lower bound $\rho_{tk}^*$ on the magnitude of activation of shape $k$ detectable $(1 - \epsilon)$-reliably at time $t$ by any other inference procedure can be made arbitrarily close to the right hand side quantities in (3.21). It is immediately seen that the latter quantities are upper-bounded by $\bar{\chi} = O(1) \ln(Kd/\epsilon)/\ln(1/\epsilon)$, provided $\epsilon \le 0.5$. We see that unless $K$ and/or $d$ are extremely large, $\bar{\chi}$ is a moderate constant. Moreover, when $K$, $d$ remain fixed and $\epsilon \to +0$, we have $\bar{\chi} \to 1$, which, informally speaking, means that with $K$, $d$ fixed, the performance of the inference routines in this section approaches the optimal performance as $\epsilon \to +0$.

### 3.5. Numerical illustration

The setup of the numerical experiment we are about to report upon is as follows. We observe on time horizon $\{t = 1, 2, \dots, d = 16\}$ the output $z_1, z_2, \dots$ of the dynamical system

$$ (I - \Delta)^3 z = \kappa (I - \Delta)^2 (u + \zeta), \quad \kappa = (0.1d)^{-3} \approx 0.244, \tag{3.22} $$

where $\Delta$ is the shift in the space of two-sided sequences: $(\Delta z)_t = z_{t-1}$, $\{u_t : -\infty < t < \infty\}$ is the input, and $\zeta = \{\zeta_t < -\infty < t < \infty\}$ is the random input noise with zero mean independent Gaussian components $\zeta_t$ with variances varying in $[\sigma^2, 1]$, with some given $\sigma \in (0, 1]$. Our goal is to dynamically test the nuisance hypothesis about system's input vs. a signal alternative. We start with specifying the model of the system input. Note that, aside from noise and the system input $u^d = [u_1; \dots; u_d]$ on the time horizon we are interested in, the observed output $[z_1; \dots; z_d]$ depends on the past – prior to time instant $t = 1$ – outputs and inputs. The influence of this past on the observed behavior of the system can be summarized by the initial conditions $v$
(in the case of the dynamics described by (3.22), $v \in \mathbf{R}^3$). We could augment the input $u^d$ by these initial conditions to consider as the input the pair $x = [v; u^d]$, and express our hypotheses on input in terms of $x$, thus bringing the situation back to that considered in Section 3.1. It turns out, however, that when no restrictions are imposed on the initial conditions, our inferential procedure may become numerically unstable. On the other hand, note that by varying the initial conditions we shift the trajectory $z^t = [z_1; \dots; z_t]$ along the low-dimensional linear subspace $E_t \in \mathbf{R}^t$ (in the case of (3.22) $E_t$ is the space of collections $(z_1, \dots, z_s)$ with entries $z_s$ quadratically depending on $s$). Given $t$, we can project the observed $z^t$ onto the orthogonal complement of $E_t$ in $\mathbf{R}^t$ and treat this projection, $y^t$, as the observation we have at time $t$. It is immediately seen that the resulting observation scheme is of the form (2.2):

$$y^t = \bar{A}_t u^t + \xi^t, \quad 4 \le t \le d, \qquad (3.23)$$

with matrix $\bar{A}_t$ readily given by $t$, and zero mean Gaussian noise $\xi^t$ with covariance matrix $\Theta$ belonging to the “matrix interval” $U_t = \{\sigma^2\Theta_t \preceq \Theta \preceq \Theta_t\}$, with $\Theta_t = \bar{A}_t \bar{A}_t^T$. Note that the restriction $t \ge 4$ reflects the fact that for $t \le 3$, $E_t = \mathbf{R}^t$, and thus our observations $z^t$, $t \le 3$, bear no information on the input $u^d$.

Now we have reduced the problem to the framework of Section 3.1, with inputs to the system being the actual external inputs $u^d = [u_1; \dots; u_d]$ on the observation horizon. In our experiments, the nuisance and signal inputs were as follows:

* The set $X$ of all allowed inputs was

$$X = \{u \in \mathbf{R}^d : \|u\|_{\infty} \le R = 10^4\};$$

* The set $N$ of nuisances was just the origin: $N = \{0\} \subset \mathbf{R}^d$;

* The sets $V_k$ and $W_k$, $1 \le k \le K$, responsible for signal inputs, were as follows: the number $K$ of these sets was set to $d = 16$, and we used $V_k = \{0\}$, $k \le K$. We have considered three scenarios for the sets $W_k$ of “activations of shape $k$ and magnitude at least 1:”

1. [pulse] $W_k = \{u \in \mathbf{R}^d : u_t = 0, t \ne k, u_k \ge 1\}, 1 \le k \le K = d$;

2. [jump up] $W_k = \{u \in \mathbf{R}^d : u_t = 0, t < k, u_t \ge 1, k \le t \le d\}, 1 \le k \le K = d$,

3. [step] $W_k = \{u \in \mathbf{R}^d : u_t = 0, t < k, u_k = u_{k+1} = \dots = u_d \ge 1\}, 1 \le k \le K = d$.

In other words, in our experiments, signals of shape $k$ are exactly the same as “pure activations” of shape $k$ – these are the sequences $u_1, \dots, u_d$ which “start” at time $k$ (i.e., $u_t = 0$ for $t < k$), of magnitude which is the value of $u_k$. In addition, there are some restrictions, depending on the scenario in question, on $u_t$’s for $t > k$.

In this situation, the detection problem becomes a version of the standard problem of detecting sequentially a pulse of a given form in the (third) derivative
of a time series observed in Gaussian noise. The goal of our experiment was to
evaluate the performance of the inference procedure from Section 3.3 for this
example. The procedure was tuned to the probability of false alarm $\epsilon = 0.01$,
equally distributed between the $d = 16$ time instants, that is, we used $\epsilon_t =
0.01/16$, $t = 1, \dots, d = 16$.

We present the numerical results in Figure 1. We denote by $\rho_{tk}$ the magnitude of an activation of shape $k$ which is provably detected at time $k$ with confidence level 0.99; we also denote by $\rho_{tk}^*$ the “oracle” lower bound on this quantity.<fnref n="4" /> Figure 1 displays the dependence of $\rho_{tk}$ (left plots) and the ratio $\rho_{tk}/\rho_{tk}^*$ (right plots) on $k$ (horizontal axis) for different activation geometries (pulses, jumps up, and steps). We display these data only for the pairs $t, k$ with finite $\rho_{tk}^*$; recall that $\rho_{tk}^* = \infty$ means that with the upper bound $R = 10^4$ on the uniform norm of a feasible input, even the ideal inference does not allow us to detect 0.99-reliably an activation of shape $k$ at time $t$.

Our experiment shows that $\rho_{tk}^*$ is finite in the domain $\{(t, k) : 4 \le t \le 16, 3 \le k \le t\}$. The restriction $k \le t$ is quite natural: we cannot detect a signal of shape $k$ before the corresponding activation starts. Note that signals of shapes $k=1, 2$ are “undetectable,” and that no signal inputs can be detected at time $t=3$ seemingly due to the fact that activation can be completely masked by the initial conditions in the case of “early” activation and/or short observation horizon. Our experiment shows that this phenomenon affects equally the inference routines from Sections 3.2 and 3.3, and the ideal detection, and disappears when the initial conditions for (3.23) are set to 0 and our inferences are adjusted to this a priori information.

The data in Figure 1 show that the “non-optimality ratios” $\rho_{tk}/\rho_{tk}^*$ of the proposed inferences as compared to the ideal detectors are quite moderate – they never exceed 1.34; not that bad, especially when taking into account that the ideal detection assumes a priori knowledge of the activation shape (position).

3.6. Extension: union-type nuisance

So far, we have considered the case of a single nuisance hypothesis and multiple
signal alternatives. The proposed approach can be easily extended to the case
of multiple nuisance hypotheses, namely, to the situation differing from the one
described in Section 3.1 in exactly one point – instead of assuming that nuisances
belong to a closed convex set $N \subset X$, we can assume that nuisance inputs run
through the union $\cup_{m=1}^M N_m$ of given closed convex sets $N_m \subset X$, with $0 \in N_m$
for all $m$. The implied modifications of our constructions and results are as
follows.

<footnote n="4">⁴ $\rho_{tk}^*$ (defined in Section 3.4) is the minimal magnitude of activation of shape $k$ such that the “ideal” inference which knows $k$ in advance, tuned for reliability 0.99, terminates with a signal conclusion at time $t$. When $\rho_{tk}^* > R$, the maximal allowed activation magnitude, we set $\rho_{tk}^* = +\infty$. Recall that in the reported experiments $R = 10^4$ is used.</footnote>
<figure><img src="image_1.png" /><figcaption>FIG 1. Performance of detector from Section 3.3, dynamics (3.22). Left: $\rho_{tk}$, $\max[k, 4] \le t \le 16$ (ranges and values) vs. $k$, $3 \le k \le 16$. Right: $\rho_{tk}/\rho_{tk}^*$, $\max[k, 4] \le t \le 16$ (ranges and values) vs $k$, $3 \le k \le 16$. Activation geometry: pulses for top plots, jumps up for middle plots, and steps for bottom plots.</figcaption></figure>

**Sub-Gaussian case.** In this case, the construction of Section 3.2.3 in [17], as applied to $N_m$ in the role of $N$, gives rise to $M$ functions

$$ SV_{tk}^{m}(\rho) = \min_{h \in \mathbb{R}^{\nu_t}} \max_{\theta_1 \in N^{tm}, \theta_2 \in U_{k\rho}^{t}, \Theta \in \mathcal{U}_t} \left[ \frac{1}{2} h^T [\theta_2 - \theta_1] + \frac{1}{2} h^T \Theta h \right], \quad N^{tm} = \bar{A}_t N_m, \tag{3.24} $$
$1 \le m \le M$, and thus - to the parametric families

$$
\begin{align}
\mathcal{K}_t(\varkappa) &= \{k \le K : \mathcal{SV}_{tk}^m(R_k) < \ln(\varkappa), \forall 1 \le m \le M\}, \tag{3.25} \\
K_t(\varkappa) &= \text{Card} \mathcal{K}_t(\varkappa),
\end{align}
$$

so that $K_t(\varkappa)$ is nondecreasing and continuous from the left. At time instant $t$
we act as follows:

1. We define the quantity

$$
\varkappa_t = \sup \left\{ \varkappa \in (0, 1] : M K_t(\varkappa) \le \frac{\epsilon \epsilon_t}{\varkappa^2} \right\}.
$$

Clearly, $\varkappa_t$ is well defined, takes values in $(0,1)$, and since $K_t(\varkappa)$ is continuous from the left, we have

$$
MK_t(\varkappa_t) \le \frac{\epsilon\epsilon_t}{\varkappa_t^2}. \qquad (3.26)
$$

We set $\alpha_t = \ln(\varkappa_t M / \epsilon)$.

2. For $k \in \mathcal{K}_t(\varkappa_t)$, we have $0 = \lim_{\rho \to +0} \mathcal{SV}_{tk}^m(\rho) > \ln(\varkappa_t)$ and $\mathcal{SV}_{tk}^m(R_k) < \ln(\varkappa_t)$. Invoking Lemma 3.1, there exists (and can be rapidly approximated to high accuracy by bisection) $\rho_{tk} \in (0, R_k)$ such that

$$
\max_{m \le M} \mathcal{SV}_{tk}^{m}(\rho_{tk}) = \ln(\varkappa_t). \quad (3.27)
$$

Given $\rho_{tk}$, we define the affine detectors

$$
\phi_{tk}^{m}(y^{t}) = h_{tkm}^{T}[y^{t} - w_{tkm}], \quad w_{tkm} = \frac{1}{2}[\theta_{1,tkm} + \theta_{2,tkm}],
$$

where $(h_{tkm}; \theta_{1,tkm}, \theta_{2,tkm}, \Theta_{tkm})$ is a solution to the saddle point problem (3.24) with $\rho = \rho_{tk}$.

For $k \notin \mathcal{K}_t(\varkappa_t)$, we set $\rho_{tk} = +\infty$.

3. Finally, we process the observation $y^t$ at step $t$ as follows:

* if there exists $k$ such that $\rho_{tk} < \infty$ and $\phi_{tk}^m(y^t) < \alpha_t$ for all $m \le M$,
we claim that the observed input is a signal, and terminate;

* otherwise, we claim that so far, the nuisance hypothesis is not rejected, and pass to the next time instant $t+1$ (when $t < d$) or terminate (when $t = d$).

The performance of the inference policy we have described is given by the fol-
lowing analogue of Proposition 3.2:

**Proposition 3.5.** For any zero mean sub-Gaussian, with parameter $\Theta \in \mathcal{U}$,
distribution of observation noise on time horizon $1, \dots, d,$

* when the input is a nuisance (i.e., belongs to $\cup_{m \le M} N_m$), the probability to terminate with the signal conclusion at time $t \in \{1, \dots, d\}$ does not exceed $\epsilon_t$, and thus the probability of a false alarm is at most $\epsilon = \sum_{t=1}^{d} \epsilon_t$;
* when $t \in \{1, ..., d\}$ and $k \in \{1, ..., K\}$ are such that $\rho_{tk} < \infty$, and the input belongs to a set $X_k^\rho$ with $\rho \ge \rho_{tk}$, then the probability to terminate at step t with the signal conclusion is at least $1 - \epsilon$.

Furthermore, let us assume that $\epsilon_t = \epsilon/d$ for all $t$ and that for some $t \le d$ and $k \le K$ we have

$$ SV_{tk}^{m}(R_k) < -\frac{1}{2}\text{ErfInv}^{2}(\epsilon), \forall 1 \le m \le M, \quad (3.28) $$

so that the quantities $\rho_{tk}^{m*} \in (0, R_k)$ such that

$$ SV_{tk}^{m}(\rho_{tk}^{m*}) = -\frac{1}{2}\text{ErfInv}^{2}(\epsilon) $$

are well defined (for “lower bound interpretation” of these quantities, see comments after (3.20)). Then for every $\chi$ satisfying

$$ \chi > \frac{\ln(dKM/\epsilon^2)}{\text{ErfInv}^2(\epsilon)}, $$

and every feasible signal input of shape $k$ and magnitude $\ge \chi \max_{m \le M} \rho_{tk}^{m*}$, the probability of termination with signal conclusion at time $t$ is $\ge 1 - \epsilon$.

Proof of Proposition 3.5 is given by a straightforward modification of the proofs of Propositions 3.2 and 3.4.

# 4. Change detection via quadratic detectors

## 4.1. Outline

In Section 3, we were interested in deciding as early as possible upon the hypotheses about the input $x$ underlying observations (2.2) in the situation where both signals and nuisances formed finite unions of convex sets. Solving this problem was reduced to decisions on pairs of convex hypotheses – those stating that the expectation of a (sub-)Gaussian random vector with partly known covariance matrix belongs to the union of convex sets associated with the hypotheses, and we could make decisions looking at the (signs of) properly built affine detectors – affine functions of observations. Now we intend to address the case when the signals (or nuisances) are specified by non-convex restrictions, such as “$u$ belongs to a given linear subspace and has Euclidean norm at least $\rho > 0$.” This natural setting is difficult to capture via convex hypotheses: in such an attempt, we are supposed to “approximate” the restriction “the $\| \cdot \|_2$-norm of vector $x$ is $\ge \rho$” by the union of convex hypotheses like “$i$-th entry in $x$ is $\ge \rho'$”/“$i$-th entry in $x$ is $\le -\rho'$”; the number of these hypotheses grows with the input’s dimension, and the “quality of approximation,” whatever be its definition, deteriorates as the dimension grows.

In this situation, a natural way to proceed is to look at “quadratic liftings” of inputs and observations. Specifically, given a vector $w$ of dimension $m$, let
us associate with it its “quadratic lifting” – the symmetric $(m+1) \times (m+1)$ matrix $Z(w) = [w; 1][w; 1]^T$. Observe that the restrictions on $w$ expressed by linear and quadratic constraints induce linear restrictions on $Z(w)$. Secondly, given noisy observation $y^t = \bar{A}_t x + \xi^t$ of signal $x$, the quadratic lifting $Z(y^t)$ can be thought of as noisy observation of an affine image $\hat{A}Z(x)\hat{A}^T$ of $Z(x)$, where

$$ \hat{A} = \left[ \begin{array}{c|c} \bar{A}_t & 1 \end{array} \right], $$

(here and in what follows the empty block refers to the null matrix). As a result, roughly speaking, linear and quadratic constraints on the input translate into linear constraints on the expectation of “lifted observation” $Z(y^t)$, and different hypotheses on input, expressed by linear and quadratic constraints, give rise to convex hypotheses on $Z(y^t)$. Then, in order to decide on the resulting convex hypotheses, we can use affine in $Z(y^t)$, that is, quadratic in $y^t$, detectors, and this is what we intend to do.

## 4.2. Preliminaries

### 4.2.1. Gaussian case

In the sequel, the following result (which is a slightly modified concatenation of Propositions 3.1 and 5.1 of [17]) is used:

**Proposition 4.1.**

(i) Let $\mathcal{U}$ be a convex compact set contained in the interior of the cone $S_+^\nu$ of positive semidefinite $\nu \times \nu$ matrices in the space $S^\nu$ of symmetric $\nu \times \nu$ matrices. Let $\Theta_* \in S_+^\nu$ be such that $\Theta_* \succeq \Theta$ for all $\Theta \in \mathcal{U}$, and let $\delta \in [0, 2]$ be such that

$$ \|\Theta^{1/2}\Theta_*^{-1/2} - I_\nu\| \le \delta, \quad \forall \Theta \in \mathcal{U}, \qquad (4.1) $$

where $\| \cdot \|$ is the spectral norm.<fnref n="5" /> Finally, let $\gamma \in (0, 1)$, $A$ be a $\nu \times (n+1)$ matrix, $\mathcal{Z}$ be a nonempty convex compact subset of the set $\mathcal{Z}^+ = \{Z \in S_+^{n+1}: Z_{n+1,n+1} = 1\}$, and let

$$ \phi_{\mathcal{Z}}(Y) := \max_{Z \in \mathcal{Z}} \mathrm{Tr}(ZY) \qquad (4.2) $$

be the support function of $\mathcal{Z}$. These data specify the closed convex set

$$ \mathcal{H} = \mathcal{H}^\gamma := \{(h, H) \in \mathbf{R}^\nu \times \mathbf{S}^\nu : -\gamma \Theta_*^{-1} \preceq H \preceq \gamma \Theta_*^{-1}\}, \qquad (4.3) $$

the matrix

$$ B = \left[ \begin{array}{c} A \\ [0, \dots, 0, 1] \end{array} \right] \qquad (4.4) $$

and the function $\Phi_{A,\mathcal{Z}}: \mathcal{H} \times \mathcal{U} \to \mathbf{R}$,

$$ \Phi_{A,\mathcal{Z}}(h, H; \Theta) = -\frac{1}{2} \ln \mathrm{Det}(I - \Theta_*^{1/2} H \Theta_*^{1/2}) + \frac{1}{2} \mathrm{Tr}([\Theta - \Theta_*]H) $$

<footnote n="5">⁵With $\delta = 2$, (4.1) is satisfied for all $\Theta$ such that $0 \preceq \Theta \preceq \Theta_*$, so that the restriction $\delta \le 2$ is w.l.o.g.</footnote>
$$ 
\begin{aligned}
&+ \frac{\delta(2+\delta)}{2(1-\|\Theta_*^{1/2} H \Theta_*^{1/2}\|_F)} \|\Theta_*^{1/2} H \Theta_*^{1/2}\|_F^2 \\
&+ \frac{1}{2} \phi_Z \left( B^T \left[ \left[ \frac{H}{h^T} \middle| h \right] + [H, h]^T [\Theta_*^{-1} - H]^{-1} [H, h] \right] B \right),
\end{aligned} 
\quad (4.5) $$

where $\| \cdot \|_F$ is the Frobenius norm of a matrix.

Function $\Phi_{A,Z}$ is continuous on its domain, convex in $(h, H) \in \mathcal{H}$ and concave in $\Theta \in \mathcal{U}$ and possesses the following property:

Whenever $u \in \mathbb{R}^n$ is such that $[u; 1][u; 1]^T \in \mathcal{Z}$ and $\Theta \in \mathcal{U}$, the Gaussian random vector $\zeta \sim \mathcal{N}(A[u; 1], \Theta)$ satisfies the relation

$$ \forall (h, H) \in \mathcal{H}: \ln \left( \mathbf{E}_{\zeta \sim \mathcal{N}(A[u;1],\Theta)} \left\{ e^{\frac{1}{2}\zeta^T H \zeta + h^T \zeta} \right\} \right) \le \Phi_{A,Z}(h, H; \Theta). \quad (4.6) $$

Besides this, $\Phi_{A,Z}$ is coercive in $(h, H)$: $\Phi_{A,Z}(h_i, H_i; \Theta) \to +\infty$ as $i \to \infty$ whenever $\Theta \in \mathcal{U}$, $(h_i, H_i) \in \mathcal{H}$ and $\|(h_i, H_i)\| \to \infty$, $i \to \infty$.

(ii) Let two collections of data from (i): $(\mathcal{U}_\chi, \Theta_*^{(\chi)}, \delta_\chi, \gamma_\chi, A_\chi, Z_\chi)$, $\chi = 1, 2$, with common $\nu$ be given, giving rise to the sets $\mathcal{H}_\chi$, matrices $B_\chi$, and functions $\Phi_{A_\chi, Z_\chi}(h, H; \Theta)$, $\chi = 1, 2$. These collections specify the families of normal distributions

$$ \mathcal{G}_\chi = \{\mathcal{N}(v, \Theta) : \Theta \in \mathcal{U}_\chi \ \& \ \exists u : v = A_\chi[u; 1], [u; 1][u; 1]^T \in \mathcal{Z}_\chi\}, \chi = 1, 2. $$

Consider the convex-concave saddle point problem

$$ \mathcal{SV} = \min_{(h,H) \in \mathcal{H}_1 \cap \mathcal{H}_2} \max_{\Theta_1 \in \mathcal{U}_1, \Theta_2 \in \mathcal{U}_2} \underbrace{\frac{1}{2} [\Phi_{A_1, Z_1}(-h, -H; \Theta_1) + \Phi_{A_2, Z_2}(h, H; \Theta_2)]}_{\Phi(h, H; \Theta_1, \Theta_2)}. \quad (4.7) $$

A saddle point $(h_*, H_*; \Theta_1^*, \Theta_2^*)$ does exist in this problem, and the induced quadratic detector

$$ \phi_*(\omega) = \frac{1}{2}\omega^T H_* \omega + h_*^T \omega + \underbrace{\frac{1}{2}[\Phi_{A_1, Z_1}(-h_*, -H_*; \Theta_1^*) - \Phi_{A_2, Z_2}(h_*, H_*; \Theta_2^*)]}_{a}, \quad (4.8) $$

satisfies

$$ \begin{aligned} (a) \quad & \int_{\mathbb{R}^\nu} e^{-\phi_*(\omega)} P(d\omega) \le \epsilon_* := e^{\mathcal{SV}} \quad \forall P \in \mathcal{G}_1, \\ (b) \quad & \int_{\mathbb{R}^\nu} e^{\phi_*(\omega)} P(d\omega) \le \epsilon_* \quad \forall P \in \mathcal{G}_2. \end{aligned} \quad (4.9) $$

That is, the risk, as defined in item 5 of Section 1.2, of the detector $\phi_*$ on the families $\mathcal{G}_1, \mathcal{G}_2$ satisfies

$$ \text{Risk}(\phi_*|\mathcal{G}_1, \mathcal{G}_2) \le \epsilon_* $$

For the proof, see [17]; for the reader's convenience, we reproduce the proof in Section A.5. The justification for the remark below can be found in appendix A.6.

**Remark 4.1.** Note that the computational effort of solving (4.7) reduces dramatically in the “easy case” of the situation described in item (ii) of Proposition 4.1, specifically, in the case where
• the observations are direct, meaning that $n = \nu$ and $A_\chi[u; 1] \equiv u$, $u \in \mathbf{R}^\nu$, $\chi = 1, 2$;

• the sets $U_\chi$ are comprised of positive definite diagonal matrices, and the matrices $\Theta_*^{(\chi)}$ are diagonal as well, $\chi = 1, 2$;

• the sets $Z_\chi$, $\chi = 1, 2$, are convex compact sets of the form

$$Z_{\chi} = \{ Z \in \mathbf{S}_{+}^{\nu+1} : Z \succeq 0, \mathrm{Tr}(ZQ_{j}^{\chi}) \le q_{j}^{\chi}, 1 \le j \le J_{\chi} \}$$

with diagonal matrices $Q_j^\chi$, $^6$ and these sets intersect the interior of the positive semidefinite cone $\mathbf{S}_+^{\nu+1}$.

In this case, the convex-concave saddle point problem (4.7) admits a saddle point ($h_*, H_*; \Theta_1^*, \Theta_2^*$) where $h_* = 0$ and $H_*$ is diagonal, and restricting $h$ to be zero and $H$ to be diagonal reduces drastically the design dimension of the saddle point problem.

### 4.2.2. Sub-Gaussian case

Sub-Gaussian version of Proposition 4.1 is as follows:

**Proposition 4.2.**

(i) Let $U$ be a convex compact set contained in the interior of the cone $\mathbf{S}_+^\nu$ of positive semidefinite $\nu \times \nu$ matrices in the space $\mathbf{S}^\nu$ of symmetric $\nu \times \nu$ matrices, let $\Theta_* \in \mathbf{S}_+^\nu$ be such that $\Theta_* \succeq \Theta$ for all $\Theta \in U$, and let $\delta \in [0, 2]$ be such that (4.1) holds true. Finally, let $\gamma, \gamma^+$ be such that $0 < \gamma < \gamma^+ < 1$, $A \in \nu \times (n+1)$ matrix, $Z$ be a nonempty convex compact subset of the set $Z^+ = \{Z \in \mathbf{S}_+^{n+1} : Z_{n+1,n+1} = 1\}$, and let $\phi_Z(Y)$ be the support function of $Z$, see (4.2). These data specify the closed convex sets

$$\mathcal{H} = \mathcal{H}^{\gamma} := \{(h, H) \in \mathbf{R}^{\nu} \times \mathbf{S}^{\nu} : -\gamma \Theta_{*}^{-1} \preceq H \preceq \gamma \Theta_{*}^{-1}\},$$

$$\hat{\mathcal{H}} = \hat{\mathcal{H}}^{\gamma, \gamma^{+}} = \{(h, H, G) \in \mathcal{H}^{\gamma} \times \mathbf{S}^{\nu} : 0 \preceq G \preceq \gamma^{+} \Theta_{*}^{-1}, H \preceq G\},$$

the matrix $B$ given by (4.4), and the functions

$$\Psi_{A,Z}(h, H, G)$$

$$= -\frac{1}{2} \ln \mathrm{Det}(I - \Theta_*^{1/2} G \Theta_*^{1/2})$$

$$+ \frac{1}{2} \phi_Z \left( B^T \left[ \left[ \frac{H}{h^T} \middle| h \right] + [H, h]^T [\Theta_*^{-1} - G]^{-1} [H, h] \right] B \right) : \hat{\mathcal{H}} \times Z \to \mathbf{R},$$

$$\Psi_{A,Z}^{\delta}(h, H, G; \Theta)$$

$$= -\frac{1}{2} \ln \mathrm{Det}(I - \Theta_*^{1/2} G \Theta_*^{1/2}) + \frac{1}{2} \mathrm{Tr}([\Theta - \Theta_*]G) + \frac{\delta(2+\delta)}{2(1-\|\Theta_*^{1/2} G \Theta_*^{1/2}\|)} \|\Theta_*^{1/2} G \Theta_*^{1/2}\|_F^2$$

$$+ \frac{1}{2} \phi_Z \left( B^T \left[ \left[ \frac{H}{h^T} \middle| h \right] + [H, h]^T [\Theta_*^{-1} - G]^{-1} [H, h] \right] B \right) : \hat{\mathcal{H}} \times \{0 \preceq \Theta \preceq \Theta_*\} \to \mathbf{R},$$

$$\Phi_{A,Z}(h, H) = \min_G \{ \Psi_{A,Z}(h, H, G) : (h, H, G) \in \hat{\mathcal{H}} \} : \mathcal{H} \to \mathbf{R},$$

$$\Phi_{A,Z}^{\delta}(h, H; \Theta) = \min_G \{ \Psi_{A,Z}^{\delta}(h, H, G; \Theta) : (h, H, G) \in \hat{\mathcal{H}} \} : \mathcal{H} \times \{0 \preceq \Theta \preceq \Theta_*\} \to \mathbf{R},$$

(4.10)

<footnote>$^6$In terms of the sets $U_\chi$, this assumption means that the latter sets are given by linear inequalities on the squares of entries in $u$.</footnote>
where, same as in (4.5), $\| \cdot \|$ is the spectral, and $\| \cdot \|_F$ is the Frobenius norm of a matrix.

Function $\Phi_{A,Z}(h, H)$ is convex and continuous on its domain, while function $\Phi_{A,Z}^{\delta}(h, H; \Theta)$ is continuous on its domain, convex in $(h, H) \in \mathcal{H}$ and concave in $\Theta \in \{0 \le \Theta \le \Theta_*\}$. Besides this,

Whenever $u \in \mathbb{R}^n$ is such that $[u; 1][u; 1]^T \in \mathcal{Z}$ and $\Theta \in \mathcal{U}$, the sub-Gaussian random vector $\zeta$ with parameters $(A[u; 1], \Theta)$ satisfies the relation

$$ \begin{align} \forall (h, H) \in \mathcal{H}: \tag{4.11} \\ (a) \quad \ln \left( \mathbf{E}_{\zeta} \left\{ e^{\frac{1}{2}\zeta^T H \zeta + h^T \zeta} \right\} \right) &\le \Phi_{A,Z}(h, H), \nonumber \\ (b) \quad \ln \left( \mathbf{E}_{\zeta} \left\{ e^{\frac{1}{2}\zeta^T H \zeta + h^T \zeta} \right\} \right) &\le \Phi_{A,Z}^{\delta}(h, H; \Theta). \nonumber \end{align} $$

Besides this, $\Phi_{A,Z}$ and $\Phi_{A,Z}^{\delta}$ are coercive in $(h, H)$: $\Phi_{A,Z}(h_i, H_i) \to +\infty$ and $\Phi_{A,Z}^{\delta}(h_i, H_i; \Theta) \to +\infty$ as $i \to \infty$ whenever $\Theta \in \mathcal{U}$, $(h_i, H_i) \in \mathcal{H}$ and $\|(h_i, H_i)\| \to \infty$, $i \to \infty$.

(ii) Let two collections of data from (i): $(\mathcal{U}_{\chi}, \Theta_{*}^{(\chi)}, \delta_{\chi}, \gamma_{\chi}, \gamma_{\chi}^{+}, A_{\chi}, \mathcal{Z}_{\chi})$, $\chi = 1, 2$, with common $\nu$ be given, giving rise to the sets $\mathcal{H}_{\chi}$, matrices $B_{\chi}$, and functions $\Phi_{A_{\chi}, \mathcal{Z}_{\chi}}(h, H)$, $\Phi_{A_{\chi}, \mathcal{Z}_{\chi}}^{\delta}(h, H; \Theta)$, $\chi = 1, 2$. These collections specify the families of distributions $\mathcal{SG}_{\chi}$, $\chi = 1, 2$, where $\mathcal{SG}_{\chi}$ is comprised of all sub-Gaussian distributions with parameters $v, \Theta$, such that $v$ can be represented as $A_{\chi}[u; 1]$ for some $u$ with $[u; 1][u; 1]^T \in \mathcal{Z}_{\chi}$, and $\Theta \in \mathcal{U}_{\chi}$. Consider the convex-concave saddle point problem

$$ \mathcal{SV} = \min_{(h,H) \in \mathcal{H}_1 \cap \mathcal{H}_2} \max_{\Theta_1 \in \mathcal{U}_1, \Theta_2 \in \mathcal{U}_2} \underbrace{\left[ \Phi_{A_1, \mathcal{Z}_1}^{\delta_1}(-h, -H; \Theta_1) + \Phi_{A_2, \mathcal{Z}_2}^{\delta_2}(h, H; \Theta_2) \right]}_{\Phi^{\delta_1, \delta_2}(h, H; \Theta_1, \Theta_2)}. \quad (4.12) $$

A saddle point $(h_*, H_*; \Theta_1^*, \Theta_2^*)$ does exist in this problem, and the induced quadratic detector

$$ \phi_*(\omega) = \frac{1}{2}\omega^T H_* \omega + h_*^T \omega + \underbrace{\left[ \Phi_{A_1, \mathcal{Z}_1}^{\delta_1}(-h_*, -H_*; \Theta_1^*) - \Phi_{A_2, \mathcal{Z}_2}^{\delta_2}(h_*, H_*; \Theta_2^*) \right]}_{a}, \quad (4.13) $$

when applied to the families of sub-Gaussian distributions $\mathcal{SG}_{\chi}$, $\chi = 1, 2$, has the risk

$$ \text{Risk}(\phi_* | \mathcal{SG}_1, \mathcal{SG}_2) \le \epsilon_* := e^{\mathcal{SV}}, $$

that is

$$ (a) \quad \int_{\mathbb{R}^\nu} e^{-\phi_*(\omega)} P(d\omega) \le \epsilon_* \quad \forall P \in \mathcal{SG}_1, $$

$$ (b) \quad \int_{\mathbb{R}^\nu} e^{\phi_*(\omega)} P(d\omega) \le \epsilon_* \quad \forall P \in \mathcal{SG}_2. $$

Similarly, the convex minimization problem

$$ \text{Opt} = \min_{(h,H) \in \mathcal{H}_1 \cap \mathcal{H}_2} \underbrace{\left[ \Phi_{A_1, \mathcal{Z}_1}(-h, -H) + \Phi_{A_2, \mathcal{Z}_2}(h, H) \right]}_{\Phi(h, H)} \quad (4.13) $$
is solvable, and the induced by its optimal solution ($h_*, H_*$) quadratic detector

$$ \phi_*(\omega) = \frac{1}{2}\omega^T H_* \omega + h_*^T \omega + \underbrace{\frac{1}{2}[\Phi_{A_1, \mathcal{Z}_1}(-h_*, -H_*) - \Phi_{A_2, \mathcal{Z}_2}(h_*, H_*)]}_a, $$

when applied to the families of sub-Gaussian distributions $SG_\chi$, $\chi = 1, 2$, has the risk

$$ \text{Risk}(\phi_*|SG_1, SG_2) \le \epsilon_* := e^{\text{Opt}}, $$

so that for just defined $\phi_*$ and $\epsilon_*$ relation (4.13) takes place.

**Remark 4.2.** Proposition 4.2 offers two options for building quadratic detectors for the families $SG_1, SG_2$, those based on the saddle point of (4.12) and on the optimal solution to (4.13). Inspecting the proof, the number of options can be increased to 4: we can replace any of the functions $\Phi_{A_\chi, \mathcal{Z}_\chi}^{\delta_\chi}$, $\chi = 1, 2$ (or both these functions simultaneously) with $\Phi_{A_\chi, \mathcal{Z}_\chi}$. The second of the original two options is exactly what we get when replacing both $\Phi_{A_\chi, \mathcal{Z}_\chi}^{\delta_\chi}$, $\chi = 1, 2$, with $\Phi_{A_\chi, \mathcal{Z}_\chi}$. It is easily seen that depending on the data, each of these 4 options can result in the smallest risk bound. Thus, it makes sense to keep all these options in mind and to use the one which, under the circumstances, results in the best risk bound. Note that the risk bounds are efficiently computable, so that identifying the best option is easy.

### 4.3. Setup

We continue to consider the situation described in Section 2, but with different specifications of noise and of nuisance and signal inputs, as compared to Section 3.1.

We define nuisance and signal inputs as follows.

1. Admissible inputs, nuisance and signal alike, belong to a bounded set $X \subset \mathbf{R}^n$ containing the origin cut off $\mathbf{R}^n$ by a system of quadratic inequalities:

$$ X = \{x \in \mathbf{R}^n : \text{Tr}(Q_i Z(x)) \le q_i, 1 \le i \le I\}, \quad (4.14) $$

where $Q_i$ are $(n+1) \times (n+1)$ symmetric matrices. We assume w.l.o.g. that the first constraint defining $X$ is $\|x\|_2^2 \le R^2$, that is, $Q_1$ is the diagonal matrix with the diagonal 1, ..., 1, 0, and $q_1 = R^2$. We set

$$ \mathcal{X} = \{W \in \mathbf{S}_+^{n+1} : W_{n+1, n+1} = 1, \text{Tr}(WQ_i) \le q_i, 1 \le i \le I\}, \quad (4.15) $$

so that $\mathcal{X}$ is a convex compact set in $\mathbf{S}_+^{n+1}$, and $Z(x) \in \mathcal{X}$ for all $x \in X$.

2. The set $\mathcal{N}$ of nuisance inputs contains the origin and is cut off $X$ by a system of quadratic inequalities, so that

$$ \mathcal{N} = \{x \in \mathbf{R}^n : \text{Tr}(Q_i Z(x)) \le q_i, 1 \le i \le I_+, I_+ > I\}. \quad (4.16) $$

We set

$$ \mathcal{N} = \{W \in \mathbf{S}_+^{n+1} : W_{n+1, n+1} = 1, \text{Tr}(WQ_i) \le q_i, 1 \le i \le I_+\}, \quad (4.17) $$
so that $\mathcal{N} \subset \mathcal{X}$ is a convex compact set in $\mathbf{S}_+^{n+1}$, and $Z(x) \in \mathcal{N}$ for all $x \in \mathcal{N}$.

3. Signals belonging to $X$ are of different shapes and magnitudes, with signal of shape $k$, $1 \le k \le K$, and magnitude $\ge 1$ defined as a vector from the set

$$W_k = \{x \in \mathbf{R}^n : \mathrm{Tr}(Q_{ik}Z(x)) \le b_{ik}, 1 \le i \le I_k\}$$

with two types of quadratic constraints:

* constraints of type A: $b_{ik} \le 0$, the symmetric matrices $Q_{ik}$ have zero North-West (NW) block of size $n \times n$, and zero South-East (SE) diagonal entry; these constraints are just linear constraints on $x$;

* constraints of type B: $b_{ik} \le 0$, the only nonzeros in $Q_{ik}$ are in the NW block of size $n \times n$.

We denote the sets of indices $t$ of constraints of these two types by $\mathcal{I}_k^A$ and $\mathcal{I}_k^B$ and assume that at least one of the right hand sides $b_{ik}$ is strictly negative, implying that $W_k$ is at a positive distance from the origin.

We define a signal of shape $k$ and magnitude $\ge \rho > 0$ as a vector from the set $W_k^\rho = \rho W_k$; note that

$$W_k^\rho = \{x \in \mathbf{R}^n : \mathrm{Tr}(Q_{ik}Z(x)) \le \rho b_{ik}, i \in \mathcal{I}_k^A, \mathrm{Tr}(Q_{ik}Z(x)) \le \rho^2 b_{ik}, i \in \mathcal{I}_k^B\}.$$

We set

$$W_k^\rho = \{W \in \mathbf{S}_+^{n+1} : W_{n+1,n+1} = 1, \mathrm{Tr}(Q_{ik}W) \le \rho b_{ik}, i \in \mathcal{I}_k^A, \mathrm{Tr}(Q_{ik}W) \le \rho^2 b_{ik}, i \in \mathcal{I}_k^B\},$$

ensuring that $Z(x) \in W_k^\rho$ whenever $x \in W_k^\rho$. Note that sets $W_k^\rho$ shrink as $\rho > 0$ grows due to $b_{ik} \le 0$. We assume that for small $\rho > 0$, the sets $W_k^\rho \cap \mathcal{X}$ are nonempty (this is definitely the case when some signals of shape $k$ and positive magnitude are admissible inputs – otherwise signals of shape $k$ are of no interest in our context, and we can ignore them). Since $\mathcal{X}$ is compact and some of $b_{ik}$ are negative, the sets $W_k^\rho$ are empty for large enough values of $\rho$. As a byproduct of the compactness of $\mathcal{X}$, it is immediately seen that there exists $R_k \in (0, \infty)$ such that $W_k^\rho$ is nonempty when $\rho \le R_k$ and is empty when $\rho > R_k$.

### 4.4. Change detection via quadratic detectors, Gaussian case

In this section, we consider the situation of Section 2, assuming the noise $\xi^d$ in (2.1) to be zero mean Gaussian: $\xi^d \sim \mathcal{N}(0, \Theta)$.

#### 4.4.1. Preliminaries

Given $t \le d$, let us set

$$A_t = [\bar{A}_t, 0], B_t = \begin{bmatrix} A_t \\ [0, \dots, 0, 1] \end{bmatrix},$$
so that the observation $y^t \in \mathbf{R}^{\nu_t}$ at time $t$ is Gaussian with the expectation $A_t[x; 1]$ and covariance matrix $\Theta$ belonging to the convex compact subset $\mathcal{U}_t$ of the interior of the positive semidefinite cone $\mathbf{S}_+^{\nu_t}$, see (2.2), (2.3).

We fix $\gamma \in (0, 1)$, and $\Theta_{*,d} \in \mathbf{S}_+^{\nu_d}$ such that $\Theta_{*,d} \succeq \Theta$ for all $\Theta \in \mathcal{U}_d$. For $1 \le t \le d$, we set $\Theta_{*,t} = S_t \Theta_{*,d} S_t^T$, so that $\Theta_{*,t} \succ 0$ is such that $\Theta_{*,t} \succeq \Theta$ for all $\Theta \in \mathcal{U}_t$. Further, we specify reals $\delta_t \in [0, 2]$ and $\gamma \in (0, 1)$ such that

$$ \|\Theta^{1/2}[\Theta_{*,t}]^{-1/2} - I_{\nu_t}\| \le \delta_t \quad \forall \Theta \in \mathcal{U}_t, $$

and set<fnref n="7" />

$$ \mathcal{H}_t = \{(h, H) \in \mathbf{R}^{\nu_t} \times \mathbf{S}^{\nu_t} : -\gamma \Theta_{*,t}^{-1} \le H \le \gamma \Theta_{*,t}^{-1}\}. $$

Finally, given $t$, we put

$$ \begin{aligned} \Phi_t(h, H; \Theta) = & -\frac{1}{2} \ln \operatorname{Det}(I - \Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}) + \frac{1}{2} \operatorname{Tr}([\Theta - \Theta_{*,t}]H) \\ & + \frac{\delta_t(2+\delta_t)}{2(1-\|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|)} \|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|_F^2 \\ & + \frac{1}{2} \phi_N \left( B_t^T \left[ \left[ \frac{H}{h^T} \middle| h \right] \middle| h \right] + [H, h]^T [\Theta_{*,t}^{-1} - H]^{-1} [H, h] \right) B_t : \mathcal{H}_t \times \mathcal{U}_t \to \mathbf{R}, \end{aligned} $$

and given $t$, $k$ and $\rho \in (0, R_k]$, we set

$$ \begin{aligned} \Phi_{tk\rho}(h, H; \Theta) = & -\frac{1}{2} \ln \operatorname{Det}(I - \Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}) + \frac{1}{2} \operatorname{Tr}([\Theta - \Theta_{*,t}]H) \\ & + \frac{\delta_t(2+\delta_t)}{2(1-\|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|)} \|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|_F^2 \\ & + \frac{1}{2} \phi_{Z_k^\rho} \left( B_t^T \left[ \left[ \frac{H}{h^T} \middle| h \right] \middle| h \right] + [H, h]^T [\Theta_{*,t}^{-1} - H]^{-1} [H, h] \right) B_t : \mathcal{H}_t \times \mathcal{U}_t \to \mathbf{R}, \end{aligned} $$

and $Z_k^\rho = W_k^\rho \cap \mathcal{X}$.

Invoking Proposition 4.1, we obtain the following

**Corollary 4.1.** Given $t \le d$, $k \le K$ and $\rho \in (0, R_k]$, consider the convex-concave saddle point problem

$$ SV_{tk}(\rho) = \min_{(h,H) \in \mathcal{H}_t} \max_{\Theta_1, \Theta_2 \in \mathcal{U}_t} \frac{1}{2} [\Phi_t(-h, -H; \Theta_1) + \Phi_{tk\rho}(h, H; \Theta_2)]. $$

This saddle point problem is solvable, and a saddle point $(h_*, H_*; \Theta_1^*, \Theta_2^*)$ induces quadratic detector

$$ \begin{aligned} \phi_{tk\rho}(\omega^t) &= \frac{1}{2}[\omega^t]^T H_* \omega^t + h_*^T \omega^t + a : \mathbf{R}^{\nu_t} \to \mathbf{R}, \\ a &= \frac{1}{2}[\Phi_t(-h_*, -H_*; \Theta_1^*) - \Phi_{tk\rho}(h_*, H_*; \Theta_2^*)], \end{aligned} $$

such that, when applied to observation $y^t = \bar{A}_t x + \xi^t$, see (2.2), we have:

(i) whenever $x \in X$ is a nuisance input,

$$ \mathbf{E}_{y^t} \left\{ e^{-\phi_{tk\rho}(y^t)} \right\} \le \epsilon_{tk\rho} := \exp\{SV_{tk}(\rho)\}; \quad (4.18) $$

<footnote n="7">⁷Note that parameter $\gamma \in (0, 1)$ is introduced to prevent $\Phi_t$ to become infinite. Therefore, the larger $\gamma$ is, the better the computed quadratic detector would be. In practice, $\gamma = 0.999$ would fit most applications.</footnote>
(ii) whenever $x \in X$ is a signal of shape $k$ and magnitude $\ge \rho$,

$$ \mathbf{E}_{y^t} \left\{ e^{\phi_{tk\rho}(y^t)} \right\} \le \epsilon_{tk\rho}. \qquad (4.19) $$

### 4.4.2. Construction and performance characterization

The construction to follow is similar to that from Section 3.2.3. Given $t \le d$ and $k \le K$, it is easily seen that the function $SV_{tk}(\rho)$ possesses the following properties:

* it is nonpositive on $\Delta_k = (0, R_k]$ and nonincreasing in $\rho$ (indeed, $\Phi_t(0, 0; \cdot) \equiv \Phi_{tk\rho}(0; 0; \cdot) = 0$ and $\Phi_{tk\rho}(\cdot, \cdot)$ decreases as $\rho$ grows since $Z_k^\rho$ shrinks as $\rho$ grows, implying that $\phi_{Z_k^\rho}(\cdot)$ decreases as $\rho$ grows);

* the function tends to 0 as $\rho \to +0$;

* the function is continuous on $\Delta_k$.

Given an upper bound $\epsilon \in (0, 1/2)$ on the probability of a false alarm, let us set

$$ \epsilon_t = \frac{\epsilon}{d}, \quad \varkappa = \frac{\epsilon}{\sqrt{dK}}, \quad \alpha = -\ln(dK)/2. $$

Given $t, k$, we define $\rho_{tk}$ as follows: if $SV_{tk}(R_k) > \ln(\varkappa)$, we set $\rho_{tk} = +\infty$, otherwise we use bisection to find $\rho \in (0, R_k]$ such that

$$ SV_{tk}(\rho_{tk}) = \ln(\varkappa). $$

Our change detection procedure is as follows: at a step $t = 1, 2, \dots, d$, given the observation $y^t$, we look at all values $k \le K$ for which $\rho_{tk} < \infty$. If $k$ is such that $\rho_{tk} < \infty$, we check whether $\phi_{tk\rho_{tk}}(y^t) < \alpha$. If it is the case, we terminate with a signal conclusion. If $\phi_{tk\rho_{tk}}(y^t) \ge \alpha$ for all $k$ corresponding to $\rho_{tk} < \infty$, we claim that so far, the nuisance hypothesis seems to be valid, and pass to time $t+1$ (if $t < d$) or terminate (if $t = d$).

**Proposition 4.3.** Let the input $x \in X$ be observed according to (2.2), and let the observation noise $\xi^d$ be Gaussian with zero mean and covariance matrix $\Theta \in \mathcal{U}_d$. Then

* if $x$ is a nuisance, the probability for the above detection procedure to terminate with a signal conclusion is at most $\epsilon$;

* if $x$ is a signal of shape $k$ and magnitude $\ge \rho > 0$, and $t \le d$ is such that $\rho_{tk} \le \rho$, then the probability for the detection procedure to terminate with a signal conclusion at time $t$ or earlier is at least $1 - \epsilon$.

### 4.4.3. Numerical illustration

Here we report on a preliminary numerical experiment with the proposed detection procedure via quadratic detectors.
**Observation scheme** we deal with is given by

$$ 
\begin{aligned}
z_t &= Az_{t-1} + Bx_t, \\
w_t &= Cz_t + \xi_t;
\end{aligned}
\qquad (4.20) $$

here $z_t, x_t, w_t$ are, respectively, the states, the inputs and the outputs of a linear dynamical system, of dimensions $n_z, n_x, n_w$, respectively, and $\xi_t$ are independent across $t$ standard Gaussian noises. We assume that the observation at time $t$, $1 \le t \le d$, is the collection $w^t = [w_1; w_2; \dots; w_t]$. In order to account for the initial state $x_0$ and to make the expectations of observations known linear functions of the inputs, we, same as in Section 3.5, define $E_t$ as the linear subspace in $\mathbf{R}^{n_w t}$ comprised by all collections of accumulated outputs $[w_1; \dots; w_t]$ of the zero-input system

$$ z_s = Az_{s-1}, \quad w_s = Cz_s, $$

and define our (accumulated) observation $y^t$ at time $t$ as the projection of the observation $w^t$ onto the orthogonal complement $E_t^\perp$ of $E_t$. We represent this projection by the vector $y^t$ of its coordinates in an orthonormal basis of $E_t^\perp$ and set $\nu_t = \dim E_t^\perp$. Note that in this case the corresponding noises $\xi^t$, $1 \le t \le d$, see (2.2), are standard Gaussian of dimensions $\nu_t$ (as projections of standard Gaussian vectors), so that we are in the situation of $U_t = \{I_{\nu_t}\}$, see (2.3). Therefore we can set $\Theta_{*,t} = I_{\nu_t}$, and $\delta_t = 0$, see Section 4.4.1.

We define the admissible nuisance and signals inputs as follows:

* the admissible inputs $x = [x_1; \dots; x_d]$, $x_t \in \mathbf{R}^{n_x}$, are those with $\|x\|_2 \le R$ (we set $R = 10^4$);

* the only nuisance input is $x = 0 \in \mathbf{R}^n$, $n = n_x d$;

* there are $K = d$ signal shapes, signal of shape $k$ and magnitude $\ge 1$ being a vector of the form $x = [0; \dots; 0; x_k; x_{k+1}; \dots; x_d]$ with $\|x_k\|_2 \ge 1$ ("signal of shape $k$ and magnitude $\ge 1$ starts at time $k$ with block $x_k$ of energy $\ge 1$"). We consider three different types of the signal behavior after time $k$:

- pulse: $x_{k+1} = \dots = x_d = 0$,

- step: $x_k = x_{k+1} = \dots = x_d$,

- free jump: $x_{k+1}, \dots, x_d$ may be arbitrary.

The description of the matrix $\bar{A}_t$ arising in (2.2) is self-evident. The description, required in Section 4.3, of the nuisance set $N$ by quadratic constraints imposed on the quadratic lifting of an input is equally self-evident. The corresponding descriptions of signals of shape $k$ and magnitude $\ge 1$ are as follows:

* pulse: $Q_{1k}$ is the diagonal $(n+1) \times (n+1)$ matrix with the only nonzero diagonal entries, equal to -1, in positions $(i, i)$, $i \in J_k := \{i : (k-1)n_x+1 \le i \le kn_x\}$, and $b_{1k} = -1$. The constraint $\mathrm{Tr}(Q_{1k}Z(x)) \le b_{1k}$ says exactly that $\|x_k\|_2^2 \ge 1$. The remaining constraints are homogeneous and express the facts that
- the entries in $Z(x)$ with indices $(i, n+1)$ and $i \le n$, except for those with $i \in J_k$, are zeros, which can be easily expressed by homogeneous constraints of type A, and,

- the entries in $Z(x)$ with indices $(i, j)$, $i \le j \le n$, except for those with $i, j \in J_k$, are zeros, which can be easily expressed by homogeneous constraints of type B;

* step: $Q_{1k}$ and $b_{1k}$ are exactly as above. The remaining constraints are homogeneous and express the facts that

- the entries in $Z(x)$ with indices $(i, n+1)$ and $i \le i_k := n_x(k-1)$ are zero (homogeneous constraints of type A);

- the entries in $Z(x)$ with indices $i \le j \le n$, $i \le i_k$, are zero (homogeneous constraints of type B);

- the entries in $Z(x)$ with indices $(i, n+1)$ and $(i', n+1)$ such that $i_k < i, i' \le n$ and $i - i'$ is an integer multiple of $n_x$, are equal to each other (homogeneous constraints of type A);

- the entries with indices $(i, j)$ and $(i', j')$ such that $i_k < i, i' \le n$ and both $i - i', j - j'$ are integer multiples of $n_x$, are equal to each other (homogeneous constraints of type B);

* free jump: $Q_{1k}$ and $b_{1k}$ are exactly as above, the remaining constraints are homogeneous and express the facts that

- the entries in $Z(x)$ with indices $(i, n+1)$, $i \le i_k$, are zeros (homogeneous constraints of type A);

- the entries in $Z(x)$ with indices $(i, j)$ such that $i \le i_k$ and $i \le j$ are zeros (homogeneous constraints of type B).

**Numerical results.** The discrete time dynamical system (4.20) we consider is obtained by the discretization of the continuous-time model

$$ \frac{d}{ds} \begin{bmatrix} u(s) \\ v(s) \end{bmatrix} = \underbrace{\begin{bmatrix} I_2 \end{bmatrix}}_{A_c} \begin{bmatrix} u(s) \\ v(s) \end{bmatrix} + \underbrace{\begin{bmatrix} I_2 \end{bmatrix}}_{B_c} x(s), $$

with unit time step, assuming the input $x(s) = x_t$ constant on consecutive segments $[t-1, t]$. We obtain the discrete-time system

$$ \underbrace{\begin{bmatrix} u_t \\ v_t \end{bmatrix}}_{z_t} = Az_{t-1} + Bx_t, \quad A = \exp\{A_c\}, \quad B = \int_0^1 \exp\{(1-s)A_c\}B_c ds, $$

or, which is the same, the system

$$ u_t = u_{t-1} + v_{t-1} + \frac{1}{2}x_t, $$

$$ v_t = v_{t-1} + x_t. $$
The system output $u_t$ is observed with the standard Gaussian noise at times $t = 1, 2, ..., d$. Our time horizon was $d = 8$, and required probability of false alarm was $\epsilon = 0.01$.

The results of experiments are presented in Table 1; the cells $t, k$ with $k > t$ are blank, because signals of shape $k > t$ start after time $t$ and are therefore “completely invisible” at this time. Along with the quantity $\rho_{tk}$ – the magnitude of the signal of shape $k$ which makes it detectable, with probability $1 - \epsilon = 0.99$ at time $t$ (the first number in a cell) we present the “non-optimality index” (second number in a cell) defined as follows. Given $t$ and $k$, we compute the largest $\rho = \rho_{tk}^*$ such that for a signal $x^{tk}$ of shape $k$ and magnitude $\ge \rho$, the $\| \cdot \|_2$-norm of $\bar{A}_t x$, see (2.2), is $\le 2 \text{ErfInv}(\epsilon)$. The latter implies that if all we need to decide at time $t$ is whether the input is the signal $\theta x^{tk}$ with $\theta < 1$, or is identically zero, a $(1 - \epsilon)$-reliable decision would be impossible.<fnref n="8" /> Since $\theta$ can be made arbitrarily close to 1, $\rho_{tk}^*$ is a lower bound on the magnitude of a signal of shape $k$ which can be detected $(1 - \epsilon)$-reliably, by a procedure utilizing observation $y^t$ (cf. Section 3.4). The non-optimality index reported in the table is the ratio $\rho_{tk}/\rho_{tk}^*$. Note that the computed values of this ratio are neither close to one (which is a bad news for us), nor “disastrously large” (which is a good news). In this respect it should be mentioned that $\rho_{tk}^*$ are overly optimistic estimates of the performance of an “ideal” change detection routine.

### 4.5. Change detection via quadratic detectors, sub-Gaussian case

Using Proposition 4.2 in the role of Proposition 4.1, the constructions and the results of Section 4.4 can be easily adjusted to the situation when the noise $\xi^d$ in (2.1) is zero mean sub-Gaussian, $\xi^T \sim \mathcal{SG}(0, \Theta)$, rather than Gaussian. In fact, there are two options for such an adjustment, based on quadratic detectors yielded by saddle point problem (4.12) and convex minimization problem (4.13), respectively. To save space, we restrict ourselves with the first option; utilizing the second option is completely similar.

The only modification of the contents of Section 4.4 needed to pass from Gaussian to sub-Gaussian observation noise is the redefinition of the functions $\Phi_t(h, H; \Theta)$ and $\Phi_{tk\rho}(h, H; \Theta)$ introduced in Section 4.4.1. In our present situation,

* $\Phi_t(h, H; \Theta)$ should be redefined as the function $\Phi_{A_t, \mathcal{N}}^{\delta_t}(h, H; \Theta)$ given by relation (4.10) as applied to $\delta_t$ in the role of $\delta$, $A_t = [\bar{A}_t, 0]$ in the role of $A$, the set $\mathcal{N}$, see (4.17), in the role of $\mathcal{Z}$, and the matrix $\Theta_{*,t}$ in the role of $\Theta_*$.

* $\Phi_{tk\rho}(h, H; \Theta)$ should be redefined as the function $\Phi_{A_t, \mathcal{Z}_k^\rho}^{\delta_t}(h, H; \Theta)$ given by (4.10) with $\mathcal{Z}_k^\rho$ in the role of $\mathcal{Z}$ and the just specified $\delta_t, A_t, \Theta_*$.

With this redefinition of $\Phi_t(h, H; \Theta)$ and $\Phi_{tk\rho}(h, H; \Theta)$, Corollary 4.1 and Proposition 4.3 (with the words “let the observation noise $\xi^d$ be Gaussian with zero

<footnote n="8">⁸According to our convention, meaningful inputs should be of Euclidean norm at most $10^4$. Consequently, in the case $\rho_{tk}^* > 10^4$, we put $\rho_{tk}^* = \infty$.</footnote>
<table><thead><tr><th>t</th><th>k</th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th></tr></thead><tbody><tr><td>1</td><td>∞/1.00</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2</td><td>∞/1.00</td><td>∞/1.00</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>3</td><td>∞/1.00</td><td>37.8/1.66</td><td>37.8/1.66</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>4</td><td>∞/1.00</td><td>28.5/1.68</td><td>15.6/1.68</td><td>28.5/1.67</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>5</td><td>∞/1.00</td><td>24.8/1.69</td><td>11.4/1.69</td><td>11.4/1.69</td><td>24.8/1.69</td><td></td><td></td><td></td><td></td></tr><tr><td>6</td><td>∞/1.00</td><td>23.0/1.70</td><td>9.6/1.70</td><td>7.9/1.70</td><td>9.6/1.70</td><td>23.0/1.70</td><td></td><td></td><td></td></tr><tr><td>7</td><td>∞/1.00</td><td>21.7/1.71</td><td>8.6/1.71</td><td>6.4/1.71</td><td>6.4/1.71</td><td>8.6/1.71</td><td>21.7/1.71</td><td></td><td></td></tr><tr><td>8</td><td>∞/1.00</td><td>20.9/1.72</td><td>8.0/1.71</td><td>5.6/1.72</td><td>5.1/1.72</td><td>5.6/1.72</td><td>8.0/1.71</td><td>20.9/1.72</td><td></td></tr></tbody></table>

Signal geometry: pulse

<table><thead><tr><th>t</th><th>k</th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th></tr></thead><tbody><tr><td>1</td><td>∞/1.00</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2</td><td>∞/1.00</td><td>∞/1.00</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>3</td><td>19.0/1.67</td><td>19.0/1.67</td><td>37.8/1.66</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>4</td><td>7.8/1.68</td><td>7.8/1.68</td><td>10.3/1.68</td><td>28.5/1.67</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>5</td><td>4.2/1.70</td><td>4.2/1.70</td><td>4.9/1.69</td><td>7.9/1.69</td><td>24.8/1.69</td><td></td><td></td><td></td><td></td></tr><tr><td>6</td><td>2.6/1.70</td><td>2.6/1.70</td><td>2.8/1.70</td><td>3.8/1.71</td><td>6.9/1.70</td><td>23.0/1.70</td><td></td><td></td><td></td></tr><tr><td>7</td><td>1.7/1.71</td><td>1.7/1.71</td><td>1.9/1.72</td><td>2.2/1.71</td><td>3.3/1.71</td><td>6.3/1.71</td><td>21.7/1.71</td><td></td><td></td></tr><tr><td>8</td><td>1.2/1.72</td><td>1.2/1.72</td><td>1.3/1.72</td><td>1.5/1.73</td><td>1.9/1.72</td><td>2.9/1.72</td><td>5.9/1.72</td><td>20.9/1.72</td><td></td></tr></tbody></table>

Signal geometry: step

<table><thead><tr><th>t</th><th>k</th><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th></tr></thead><tbody><tr><td>1</td><td>∞/1.00</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>2</td><td>∞/1.00</td><td>∞/1.00</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>3</td><td>∞/1.00</td><td>∞/1.00</td><td>37.8/1.66</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>4</td><td>∞/1.00</td><td>∞/1.00</td><td>38.3/1.68</td><td>28.5/1.67</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>5</td><td>∞/1.00</td><td>∞/1.00</td><td>38.5/1.69</td><td>28.7/1.69</td><td>24.8/1.69</td><td></td><td></td><td></td><td></td></tr><tr><td>6</td><td>∞/1.00</td><td>∞/1.00</td><td>38.8/1.70</td><td>28.9/1.70</td><td>25.0/1.70</td><td>23.0/1.70</td><td></td><td></td><td></td></tr><tr><td>7</td><td>∞/1.00</td><td>∞/1.00</td><td>39.0/1.71</td><td>29.1/1.72</td><td>25.3/1.72</td><td>23.2/1.72</td><td>21.7/1.71</td><td></td><td></td></tr><tr><td>8</td><td>∞/1.00</td><td>∞/1.00</td><td>39.2/1.72</td><td>29.1/1.72</td><td>25.3/1.72</td><td>23.2/1.72</td><td>21.8/1.72</td><td>20.9/1.72</td><td></td></tr></tbody></table>

Signal geometry: free jump

<caption>TABLE 1
Change detection via quadratic detectors. The first number in a cell is $\rho_{tk}$, the second is the nonoptimality index $\rho_{tk}/\rho_{tk}^*$.</caption>

mean and covariance matrix $\Theta \in \mathcal{U}_d$ replaced with “let the observation noise $\xi^d$ be sub-Gaussian with zero mean and matrix parameter $\Theta \in \mathcal{U}_d$”) remain intact.

# 5. Rust signal detection

## 5.1. Situation

In this Section, we present an example motivated by material science applications, in which one aims to detect the onset of a rust signal in a piece of metal from a sequence of noisy images. In general, this setup can be used to detect degradation in systems of a similar nature.
The rust signal occurs at some time, and its energy grows in the subsequent images. This can be modeled as follows. At times $t = 0, 1, ..., d$, we observe vectors

$$y_t = y + x_t + \xi_t \in \mathbf{R}^\nu, \quad (5.1)$$

where

* $y$ is a fixed deterministic “background,”

* $x_t$ is a deterministic spot, which may correspond to a rust signal at time $t$, and

* $\xi_t$ are independent across all $t$ zero mean Gaussian observation noises with covariance matrices $\Sigma_t$.

We assume that $x_0 = 0$, and our ideal goal is to decide on the nuisance hypothesis $x_t = 0, 1 \le t \le d$, versus the alternative that the input (“signal”) $x = [x_1; ...; x_d]$ is of some shape and some positive magnitude. We specify the shape and the magnitude below.

### 5.1.1. Assumptions on observation noise

Assume that the observation noise covariance matrices $\Sigma_t$, for all $t$, are known to belong to a given convex compact subset $\Xi$ of the interior of the positive semidefinite cone $\mathbf{S}_+^\nu$. We allow the following two scenarios:

**C.1** : $\Sigma_t = \Sigma \in \Xi$ for all $t$;

**C.2** : $\Sigma_t$ can vary with $t$, but stay all the time in $\Xi$.

### 5.1.2. Assumptions on spots

We specify signals $x = [x_1; ...; x_d]$ by shape $k \in \{1, ..., K\}$, $K = d$, and magnitude $\rho > 0$. Namely, signal $x = [x_1; ...; x_d]$ of shape $k$ and magnitude $\ge \rho > 0$ “starts” at time $k$, meaning that $x_t = 0$ when $t < k$. After the “change” happens, the signal satisfies

$$\|x_t\|_2^2 \ge \sum_{s=1}^{t-k} \alpha_{t,s} \|x_{t-s}\|_2^2 + \rho p(t-k+1), \quad k \le t \le K = d, \quad (5.2)$$

where $\alpha_{t,s}$ are given nonnegative coefficients responsible for dynamics of the energies $\|x_t\|_2^2$, and $p(s)$, $1 \le s \le d$, are given nonnegative coefficients with $p(1) = 1$. For example,

1. Setting $p(1) = 1$ and $p(s) = 0$ for $s > 1$,

* with $\alpha_{t,s} \equiv 0$, we get an “occasional spot” of magnitude $\ge \rho$ and shape $k: x_t = 0$ for $t < k$, the energy of $x_k$ is at least $\rho$, and there are no restrictions on the energy of $x_t$ for $t > k$;
* with $\alpha_{t,1} = \lambda_t \ge 0$ and $\alpha_{t,s} = 0$ when $s > 1$, we get $x_t = 0$ for $t < k$, $\|x_k\|_2^2 \ge \rho$, and $\|x_t\|_2^2 \ge \lambda_t \|x_{t-1}\|_2^2$ for $t > k$. In other words, the energy of the signal of shape $k$ increases or decreases in a prescribed way after the instant $k$.

2. Setting $\alpha_{t,s} \equiv 0$, we get signals of shape $k$ with $x_t = 0$ for $t < k$, and energies satisfying $\|x_t\|_2^2 \ge \rho p(t - k + 1)$ for $t \ge k$.

On top of (5.2), we impose on signal $x$ of shape $k$ and magnitude $\ge \rho$ a system (perhaps, empty) of linear constraints

$$C_k x \le \rho c_k \qquad (5.3)$$

with $c_k \le 0$.

## 5.2. Processing the situation: formulation

Let us treat as our observation at time $t$, $t = 1, \dots, d$, the vector $y^t$ with blocks $y_i - y_0$, $1 \le i \le t$, arriving at the observation scheme

$$y^t := [y_1 - y_0; \dots; y_t - y_0] = \bar{A}_t x + \xi^t = S_t[\bar{A}_d x + \xi^d], \qquad (5.4)$$

where

* $\bar{A}_d$ is the unit matrix of size $n = \nu d$; and $S_t$ is the natural projection of $\mathbf{R}^n$ onto the space of the first $\nu_t = \nu t$ coordinates;

* $\xi^d \sim \mathcal{N}(0, \Theta)$, where $\Theta$ is a positive semidefinite $d \times d$ block matrix with $\nu \times \nu$ blocks $\Theta^{t\tau}$, $1 \le t, \tau \le d$, given by<fnref n="9" />

$$\Theta^{t\tau} = \begin{cases} \Sigma_0, & t \neq \tau; \\ \Sigma_0 + \Sigma_\tau, & t = \tau. \end{cases} \qquad (5.5)$$

We can easily translate a priori information on $\Sigma_s$, $0 \le s \le d$, described in Section 5.1.1, into a convex compact subset $\mathcal{U}$ of the interior of $\mathbf{S}_+^{\nu d}$ such that $\Theta$ always belongs to $\mathcal{U}$. We now cast the above “spot detection” problem into the setup from Section 4.3 as follows. We set $Z(x) = [x; 1][x; 1]^T$.

1. We assume that the magnitudes of all entries in a meaningful input are bounded by $R$, for a given $R > 0$, and put

$$X = \{x \in \mathbf{R}^n : \mathrm{Tr}(Z(x)Q_i) \le R^2, 1 \le i \le n\}, \quad Q_i = \mathrm{Diag}\{e_i\},$$

where $e_i$ is $i$th canonical basis vector in $\mathbf{R}^{n+1}$. We further set $I = n$ and (cf. (4.15))

$$\mathcal{X} = \{W \in \mathbf{S}_+^{n+1} : W_{n+1,n+1} = 1, \mathrm{Tr}(WQ_i) \le R^2, 1 \le i \le n\}.$$

<footnote n="9">⁹Indeed, the $t$-th block $y_t - y_0$ of $y^d$ satisfies $y_t - y_0 = x_t + \xi_t - \xi_0$ (recall that $x_0 = 0$). Thus, for the $t$-th block $\xi_t - \xi_0$ of $\xi^d$ we have $\mathbf{E}\{(\xi_t - \xi_0)(\xi_t - \xi_0)^T\} = \Sigma_t + \Sigma_0$, while $\mathbf{E}\{(\xi_t - \xi_0)(\xi_\tau - \xi_0)^T\} = \Sigma_0$ when $t \neq \tau$, giving rise to (5.5).</footnote>
2. In our current situation, the nuisance set $N$ is the origin. To represent this set in the form (4.16), it suffices to set $I_+ = I + 1 = n + 1$, $q_{n+1} = 0$, and to take, as $Q_{n+1}$, the $(n+1) \times (n+1)$ diagonal matrix with the diagonal entries $1, ..., 1, 0$. We put (cf. (4.17))

$$ \mathcal{N} = \{W \in \mathbf{S}_+^{n+1} : W_{n+1,n+1} = 1, \mathrm{Tr}(WQ_i) \le q_i, 1 \le i \le n+1\}. $$

3. Sets $W_k$ of signals of shape $k$ and magnitude $\ge 1$, as described in Section 5.1.2, are given by quadratic constraints on $x = [x_1; ...; x_d]$:

• linear constraints on the traces of diagonal blocks $Z_t(x) = x_t x_t^T$ in $Z(x) = [x_1; ...; x_d; 1][x_1; ...; x_d; 1]^T$, $1 \le t \le d$, namely,

$$ \begin{aligned} \mathrm{Tr}(Z_t(x)) \le 0, & \quad 1 \le t \le k-1; \quad -\mathrm{Tr}(Z_k(x)) \le -p(1) = -1; \\ -\mathrm{Tr}(Z_t(x)) + \sum_{s=1}^{t-k} \alpha_{t,s} \mathrm{Tr}(Z_{t-s}(x)) \le -p(t-k+1), & \quad k < t \le d. \end{aligned} \quad (5.6) $$

In the terminology of Section 4.3, these are type B constraints,

• In addition, linear constraints $C_k x \le c_k$ defined in (5.3) map to linear constraints on the first $n$ entries in the last column of $Z(x)$. All these constraints are of type A (recall that $c_k \le 0$).

Observe that among the right hand sides of the constraints (5.6) there is a $(-1)$, implying that all $W_k$ are at a positive distance from the origin.

Finally, we put $W_k^\rho = \rho W_k$ and convert these sets, as described in Section 4.3, into sets $W_k^\rho$ such that $Z(x) \in W_k^\rho$ whenever $x \in W_k^\rho$.

Note that with our $\mathcal{X}$, all sets $W_k^\rho$ with small positive $\rho$ do intersect with $\mathcal{X}$.

We have covered the problem posed in Section 5.1 by the setup of Section 4.3, and, consequently, can apply the machinery from Section 4.4 to process the problem.

### 5.3. Processing the situation: computation

A computational issue related to this approach stems from the fact that in our intended application $y$ and $x_t$ are images, implying that $\nu = \mathrm{dim} y = \mathrm{dim} x_t$ can be in the range of tens of thousands. This would make our approach completely unrealistic computationally, unless we can “kill” the huge dimensions of the arising convex programs. We are about to demonstrate that under some meaningful structural assumptions this indeed can be done. These assumptions, in their simplest version, are as follows:

1. Matrices $\Sigma_t$, $0 \le t \le d$, are equal to each other and are of the form $\theta\sigma^2 I_\nu$, with known $\sigma > 0$ and known range $[\vartheta, 1]$ of the factor $\theta$, with $\vartheta \in (0, 1]$.

2. The only restrictions on the activation signal, apart from the component-wise boundedness, are energy constraints in (5.2) (e.g., linear constraints as in (5.3) are not allowed).

Now, computational problems we should solve in the framework of the approach developed in Section 4.4 reduce to building and solving, for given $t \in \{1, ..., d\}$, $k \in \{1, ..., t\}$, and $\rho > 0$, saddle point problems associated with $t, k, \rho$. Let us fix $t \in \{1, ..., d\}$, $k \in \{1, ..., t\}$, and $\rho > 0$, and let $\mathcal{SP}(t, k, \rho)$ denote the corresponding saddle point problem. This problem is built as follows.
1) We deal with observations

$$y^t = x^t + \xi^t, \xi^t \sim \mathcal{N}(0, \Theta)$$

where

(a) $y^t, x^t$ are block vectors with $t$ blocks, $y_i$ and $x_i$, respectively; dimension of every block is $\nu$;

(b) $\Theta \in \mathcal{U}_t$, where $\mathcal{U}_t$ is comprised of matrices $\Theta = \Theta_\theta$ with $t \times t$ blocks $\Theta_\theta^{ij}$ of size $\nu \times \nu$ such that

$$\Theta_{\theta}^{ij} = \begin{cases} \theta \sigma^2 I_{\nu}, & i \neq j \\ 2\theta \sigma^2 I_{\nu}, & i = j \end{cases}, \qquad (5.7)$$

with parameter $\theta$ running through $[\vartheta, 1]$ (cf. (5.5)). In other words, denoting by $J_t$ the $t \times t$ matrix with diagonal entries equal to 2 and off-diagonal entries equal to 1, we have

$$\mathcal{U}_t = \{J_t \otimes \theta \sigma^2 I_\nu : \vartheta \le \theta \le 1\},$$

where $A \otimes B$ is the Kronecker product of matrices $A, B$: $A \otimes B$ is block matrix obtained by replacing entries $A_{ij}$ in $A$ with blocks $A_{ij}B$.

It is immediately seen that $\mathcal{U}_t$ has the $\succeq$-largest element, specifically, the matrix

$$\Theta_{*,t} = \sigma^2 J_t \otimes I_\nu.$$

Note that

$$\Theta_{*,t}^{1/2} = \sigma J_t^{1/2} \otimes I_\nu \text{ and } \Theta \in \mathcal{U}_t \Rightarrow \|\Theta^{1/2} \Theta_{*,t}^{-1/2} - I_{\nu t}\| \le \delta := 1 - \sqrt{\vartheta}.$$

2) We specify the set $\mathcal{Z}_{tk\rho} \subset \mathbf{S}_+^{\nu t+1}$ as follows:

$$\mathcal{Z}_{tk\rho} = \begin{cases} \{Z \in \mathbf{S}_+^{\nu t+1} : Z_{\nu t+1, \nu t+1} = 1, \mathrm{Tr}(Z\mathrm{Diag}\{\mathcal{D}_{tks}, 0\}) \\ \le \rho d_{tks}, 1 \le s \le S_{tk}\}, \end{cases}$$

$$\mathcal{D}_{tks} = D_{tks} \otimes I_\nu$$

with diagonal $t \times t$ matrices $D_{tks}$ readily given by the coefficients in (5.6).

Now, we are in the situation where functions $\Phi_t$ and $\Phi_{tk\rho}$ from Section 4.4.1 are as follows:

$$\Phi_t(h, H; \Theta) = -\frac{1}{2} \ln \mathrm{Det} \left( I_{\nu t} - \Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2} \right) + \frac{1}{2} \mathrm{Tr} ([\Theta - \Theta_{*,t}] H) \\ + \frac{\delta(2+\delta)}{2(1 - \|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|)} \|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|_F^2 + \frac{1}{2} h^T [\Theta_{*,t}^{-1} - H]^{-1} h,$$

$$\Phi_{tk\rho}(h, H; \Theta) = -\frac{1}{2} \ln \mathrm{Det} \left( I_{\nu t} - \Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2} \right) + \frac{1}{2} \mathrm{Tr} ([\Theta - \Theta_{*,t}] H) \\ + \frac{\delta(2+\delta)}{2(1 - \|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|)} \|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|_F^2$$
$$ + \frac{1}{2} \max_{Z \in \mathcal{Z}_{tk\rho}} \mathrm{Tr} \left( Z \left[ \frac{H + H[\Theta_{*,t}^{-1} - H]^{-1}H}{h^T + h^T[\Theta_{*,t}^{-1} - H]^{-1}H} \middle| \frac{h + H[\Theta_{*,t}^{-1} - H]^{-1}h}{h^T[\Theta_{*,t}^{-1} - H]^{-1}h} \right] \right). $$

The saddle point problem $\mathcal{SP}(t, k, \rho)$ reads

$$ \min_{(h,H) \in \mathcal{H}} \left[ \Psi(h, H) := \max_{\Theta_1, \Theta_2 \in \mathcal{U}_t} \frac{1}{2} [\Phi_t(-h, -H; \Theta_1) + \Phi_{tk\rho}(h, H; \Theta_2)] \right], \quad (5.8) \\ \mathcal{H} = \{(h, H) : -\gamma \Theta_{*,t}^{-1} \le H \le \gamma \Theta_{*,t}^{-1}\}. $$

Observe that when $(h, H) \in \mathcal{H}$ and $\Theta \in \mathcal{U}_t$, we clearly have $\Phi_t(h, H; \Theta) = \Phi_t(-h, H; \Theta)$ and $\Phi_{tk\rho}(h, H; \Theta) = \Phi_{tk\rho}(-h, H; \Theta)$, where the concluding relation is due to the fact that whenever $Z \in \mathcal{Z}_{tk\rho}$, we also have $EZE \in \mathcal{Z}_{tk\rho}$, where $E$ is the diagonal matrix with diagonal $1, 1, \dots, 1, -1$. As a result, (5.8) has a saddle point with $h = 0$, and building such a saddle point reduces to solving the problem

$$ \min_{H \in \hat{\mathcal{H}}} \left[ \hat{\Psi}(H) := \max_{\Theta_1, \Theta_2 \in \mathcal{U}_t} \frac{1}{2} \left[ \hat{\Phi}_t(-H; \Theta_1) + \hat{\Phi}_{tk\rho}(H; \Theta_2) \right] \right], \quad (5.9) $$

where

$$ \begin{align*} \hat{\Phi}_t(H; \Theta) &= -\frac{1}{2} \ln \operatorname{Det} \left( I_{\nu t} - \Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2} \right) \\ &\quad + \frac{1}{2} \operatorname{Tr} \left( [\Theta - \Theta_{*,t}] H \right) + \frac{\delta(2+\delta)}{2(1-\|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|)} \|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|_F^2, \\ \hat{\Phi}_{tk\rho}(H; \Theta) &= -\frac{1}{2} \ln \operatorname{Det} \left( I_{\nu t} - \Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2} \right) + \frac{1}{2} \operatorname{Tr} \left( [\Theta - \Theta_{*,t}] H \right) \\ &\quad + \frac{\delta(2+\delta)}{2(1-\|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|)} \|\Theta_{*,t}^{1/2} H \Theta_{*,t}^{1/2}\|_F^2 \\ &\quad + \frac{1}{2} \max_{Z \in \mathcal{Z}_{tk\rho}} \operatorname{Tr} \left( \mathrm{NW}_{\nu t}(Z) [H + H[\Theta_{*,t}^{-1} - H]^{-1}H] \right), \\ \hat{\mathcal{H}} &= \{H : -\gamma \Theta_{*,t}^{-1} \le H \le \gamma \Theta_{*,t}^{-1}\}, \end{align*} $$

and $\mathrm{NW}_t(Q)$ is the North-Western $\ell \times \ell$ block of $(\ell+1) \times (\ell+1)$ matrix $Q$.

Note that the saddle point problem in (5.9) has symmetry; specifically, if $D = I_t \otimes P$ with matrix $P$ which is obtained from $\nu \times \nu$ permutation matrix by replacing some entries equal to 1 with minus these entries, then

* $D^T\Theta D = \Theta$ for every $\Theta \in \mathcal{U}_t$,

* $\mathrm{Diag}\{D, 1\}^T Z \mathrm{Diag}\{D, 1\} \in \mathcal{Z}_{tk\rho}$ whenever $Z \in \mathcal{Z}_{tk\rho}$,

* $D^T H D \in \hat{\mathcal{H}}$ whenever $H \in \hat{\mathcal{H}}$.

Hence, as is immediately seen from (5.9), it holds $\hat{\Psi}(D^T H D) = \hat{\Psi}(H)$. As a result, (5.9) has a saddle point with $H = D^T H D$ for all indicated $D$'s, or, which is the same, with $H = G \otimes I_\nu$, for some $t \times t$ symmetric matrix $G$. Specifying $G$ reduces to solving saddle point problem of sizes not affected by $\nu$, specifically, the problem

$$ \min_{G \in \hat{\mathcal{G}}} \left[ \hat{\Psi}(G) := \max_{\mathcal{I}_1, \mathcal{I}_2 \in \mathcal{J}_t} \frac{1}{2} \left[ \tilde{\Phi}_t(-G; \mathcal{I}_1) + \tilde{\Phi}_{tk\rho}(G; \mathcal{I}_2) \right] \right], \quad (5.10) $$
$$ \tilde{\Phi}_t(G; \mathcal{I}) = -\frac{\nu}{2} \ln \text{Det} \left( I_t - J_t^{1/2} G J_t^{1/2} \right) + \frac{\nu}{2} \text{Tr} \left( [\mathcal{I} - J_t] G \right) + \frac{\delta(2+\delta)\nu}{2(1-\|J_t^{1/2} G J_t^{1/2}\|)} \|J_t^{1/2} G J_t^{1/2}\|_F^2, $$

$$ \tilde{\Phi}_{tk\rho}(G; \mathcal{I}) = -\frac{\nu}{2} \ln \text{Det} \left( I_t - J_t^{1/2} G J_t^{1/2} \right) + \frac{\nu}{2} \text{Tr} \left( [\mathcal{I} - J_t] G \right) + \frac{\delta(2+\delta)\nu}{2(1-\|J_t^{1/2} G J_t^{1/2}\|)} \|J_t^{1/2} G J_t^{1/2}\|_F^2 + \frac{\nu}{2} \max_{W \in \mathcal{W}_{tk\rho}} \text{Tr} \left( W [G + G[J_t^{-1} - G]^{-1}G] \right), $$

where

$$ J_t = \sigma^2[I_t + [1; \dots; 1][1; \dots; 1]^T], $$

$$ \mathcal{J}_t = \{\theta J_t : \vartheta \le \theta \le 1\}, $$

$$ \hat{\mathcal{G}} = \{G \in \mathbf{S}_+^t : -\gamma J_t^{-1} \le G \le \gamma J_t^{-1}\}, $$

$$ W_{tk\rho} = \{W : W \in \mathbf{S}_+^t, \text{Tr}(WD_{tks}) \le \rho\nu^{-1}d_{tks}, 1 \le s \le S_{tk}\}. $$

**Remark 5.1.** Our approach is aimed at processing the situation where the magnitude of a spot is quantified by its energy. When $y_t$ represents an image with $\nu$ pixels, this model makes sense if changes in image are more or less spatially uniform, so that a “typical spot of the magnitude 1” means small (eventually, $\ll \sigma$) change in brightness of a significant fraction of the pixels (i.e., we are in the case of *dense alternatives*, in the terminology of [15]). We can also easily process the model where “typical spot of magnitude 1” means large (of order of 1) changes in brightnesses of just few pixels (in the terminology of [15], this is the case of *sparse alternatives*). In the latter situation, we do not need quadratic lift: we can model the set of “spots of shape $k$ and magnitude $\ge \rho > 0$” as the union of two convex sets, one where the $k$-th entry in the spot is $\ge \rho$, and the other one – where this entry is $\le -\rho$. In this model, all we need are affine detectors.

## 5.4. Real-data example

In this Section, we consider a sequence of metal corrosion images captured using bright-field transmission electron microscopy.<fnref n="10" /> We downsize each image to 308-by-308 pixels. There are 23 gray images (frames) in the sequence and 2 frames per second. Hence, this corresponds to 11.5 seconds from the original video. At some point, a corrosion spot initiates in the image sequence. Sample images from the sequence are illustrated in Fig. 2.

The dynamics of the signal model, in terms of the definition in (5.2), has the following parameters: $\alpha_{t,1} = 1$, and $\alpha_{t,s} = 0$ for $s > 1$; $p(1) = 1$ and $p(s) = 0$ for $s > 1$; $\rho$ is about $1.2 \times 10^2$ and it is estimated from the real-data.

In the example, we set the risk tolerance $\epsilon = 0.1$, and let $\vartheta = 0.5$. To evaluate detection performance, we run 3000 Monte Carlo trials and add zero-mean Gaussian noise (with variance 25) to the images. To estimate the noise variance $\sigma^2$, we use the empirical estimation obtained taking the first 5 noisy images in the

<footnote n="10">¹⁰Data courtesy of Dr. Josh Kacher at the School of Materials Science and Engineering, Georgia Institute of Technology. More details can be found in Section 3.1 of [3].</footnote>
<figure><img src="image_2.png" /><figcaption>FIG 2. A sequence of metal corrosion images. The time (index for the image in the sequence) is labeled; the corrosion initiates at time t = 8 (marked by red circle) and develops over time.</figcaption></figure>

sequence (hence we assume they do not contain a rust spot). The corresponding estimation is 25.

Since the rust signal is local, i.e., when it occurs, a cluster of pixels captures the rust, we will apply our detector in the following scheme. Break each image into (rectangular or square) patches of equal size. Design a quadratic detector as described above for a patch. Then at each time, whenever one patch detects a change, we claim there has been a change - this corresponds to a “multi-sensor” scheme and the local detection statistic by taking their maximum.

We compare our quadratic detector to the “sliding window” (Sl-W) detector developed in [18, 12] and defined as follows. Given “window width” $h \in \{1, 2, ...\}$ and denoting by $y_{tj}$ the vector of observations at time t in patch j, we build the left and the right estimates, $\bar{y}_{tj}^t(h)$ and $\bar{y}_{rj}^t(h)$, of $y_{tj}$:

$$ \bar{y}_{tj}^t(h) = \frac{1}{h} \sum_{i=t-h+1}^{t} y_{ij} \quad \text{and} \quad \bar{y}_{rj}^t(h) = \frac{1}{h} \sum_{i=t}^{t+h-1} y_{ij}. $$

At time t, Sl-W always accepts the nuisance hypothesis when $t \le 2h - 2$; when $t \ge 2h - 1$, the nuisance hypothesis is accepted if for every patch $j = 1, ..., N$, it holds

$$ \max_{h \le \tau \le t-h+1} \| \bar{y}_{tj}^\tau(h) - \bar{y}_{rj}^\tau(h) \|_{\infty} \le \kappa, $$

and is rejected otherwise. In our experiments, $h = 2$ and $h = 3$ were used. The corresponding thresholds $\kappa$ are computed using Monte-Carlo simulation, see [12] for details.
<table><thead><tr><th rowspan="2">Detector</th><th colspan="3">Number K of patches</th></tr><tr><th>K = 1</th><th>K = 4</th><th>K = 8</th></tr></thead><tbody><tr><td>S1-W detector, h = 2</td><td>[10.0,11.0,14.0]</td><td>[10.0,10.6,14]</td><td>[10.0,10.2,14]</td></tr><tr><td>S1-W detector, h = 3</td><td>[10.0,10.9,11.0]</td><td>[10.0,10.7,11.0]</td><td>[5.0,10.3,11.0]</td></tr><tr><td>Quadratic detector</td><td>[13.0,13.0,13.0]</td><td>[11.0,11.0,11.0]</td><td>[10.0,10.0,10.0]</td></tr><tr><td>Detector</td><td>K = 16</td><td>K = 28</td><td>K = 49</td></tr><tr><td>S1-W detector, h = 2</td><td>[10.0,10.1,11.0]</td><td>[9.0,10.0,11.0]</td><td>[10.0,10.1,11]</td></tr><tr><td>S1-W detector, h = 3</td><td>[5.0,9.8,11.0]</td><td>[5.0,8.7,10.0]</td><td>[5.0,6.8,10.0]</td></tr><tr><td>Quadratic detector</td><td>[10.0,10.0,10.0]</td><td>[10.0,10.0,10.0]</td><td>[8.0,8.0,8.0]</td></tr></tbody></table>

Stopping time. Data in a cell $[t_{min}, t, t_{max}]$: t is the mean, and $[t_{min}, t_{max}]$ is the range of instant where the signal conclusion has been made. The actual change occurs at time 8.

<table><thead><tr><th rowspan="2">Nb. of patches</th><th colspan="6">False alarm probability</th><th colspan="6">Miss detection rate</th></tr><tr><th>1</th><th>4</th><th>8</th><th>16</th><th>28</th><th>49</th><th>1</th><th>4</th><th>8</th><th>16</th><th>28</th><th>49</th></tr></thead><tbody><tr><td>S1-W detector, h = 2</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0.34</td><td>0.01</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>S1-W detector, h = 3</td><td>0</td><td>0</td><td>0.006</td><td>0.05</td><td>0.26</td><td>0.64</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><td>Quadratic detector</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr></tbody></table>

Probabilities of false alarm and miss rates.

<caption>TABLE 2
Numerical results for rust detection</caption>

Simulation results are presented in Table 2. While the performance of S1-W with properly selected h and the number of patches N is quite good, the quadratic detector is a clear winner in terms of reliability (zero empirical probabilities of a false alarm and a miss), and with N = 49, there is no delay in detecting the change.

## Appendix A: Proofs

### A.1. Proof of Lemma 3.1

Recalling what $N^t$ and $U_{k\rho}^t$ are, we have

$$ SV_{tk}(\rho) = \min_{h \in \mathbb{R}^{\nu_t}} \max_{z, v, w, \Theta:} \left[ \frac{1}{2} h^T \bar{A}_t [v + \rho w - z] + \frac{1}{2} h^T \Theta h \right]. \\ z \in N, v \in V_k, w \in W_k, \\ v + \rho w \in X, \Theta \in \mathcal{U}_t $$

From compactness of X and N it follows that the domain of the right hand side saddle point problem is nonempty for all $\rho \in \Delta_k$, and from the fact that $\mathcal{U}_t$ is a compact set contained in the interior of the positive semidefinite cone it follows that the saddle point of the right hand side exists for all $\rho \in \Delta_k$. We also clearly have

$$ SV_{tk}(\rho) = \max_{z, v, w, \Theta:} \Psi_t(z, v + \rho w, \Theta), \\ z \in N, v \in V_k, w \in W_k, \\ v + \rho w \in X, \Theta \in \mathcal{U}_t \\ \Psi_t(p, q, \Theta) := -\frac{1}{8}[p-q]^T[\bar{A}_t^T \Theta^{-1} \bar{A}_t][p-q], $$
which combines with compactness of N, X, and $U_t$ and with the inclusion $U_t \subset \text{int } S_+^{\nu_t}$ to imply that $\mathcal{S}V_{tk}(\rho)$ is nonpositive and continuous on $\Delta_k$. From the same representation, due to semi-conicity of $W_k$, it follows that $\mathcal{S}V_{tk}(\rho)$ is non-increasing in $\rho \in \Delta_k$, and that $\text{lim}_{\rho \to +0} \mathcal{S}V_{tk}(\rho) \ge 0$ due to $0 \in N$ and $0 \in V_k$ (this was assumed in Section 3.1), which combines with the fact that $\mathcal{S}V_{tk}(\rho)$ is nonpositive to imply that $\text{lim}_{\rho \to +0} \mathcal{S}V_{tk}(\rho) = 0$. It remains to prove that $\mathcal{S}V_{tk}(\rho)$ is concave. To this end note that when $\rho \in \Delta_k$, the maximum in (A.1) is achieved, and that $\Psi_t(\cdot)$ is concave by the Schur Complement Lemma. Now let $\rho', \rho'' \in \Delta_k$, $\alpha \in [0, 1]$, and $\beta = 1 - \alpha$. We can find $z', z'' \in N$, $v', v'' \in V_k$, $w', w'' \in W_k$ and $\Theta', \Theta'' \in U_t$ such that

$$ \Psi_t(z', v' + \rho'w', \Theta') = \mathcal{S}V_{tk}(\rho'), \Psi_t(z'', v'' + \rho''w'', \Theta'') = \mathcal{S}V_{tk}(\rho''), \\ v' + \rho'w' \in X, v'' + \rho''w'' \in X. $$

Setting

$$ \rho = \alpha\rho' + \beta\rho'', z = \alpha z' + \beta z'', v = \alpha v' + \beta v'', \Theta = \alpha\Theta' + \beta\Theta'', \\ w = \rho^{-1}[\alpha\rho'w' + \beta\rho''w''] = \frac{\alpha\rho'}{\alpha\rho' + \beta\rho''}w' + \frac{\beta\rho''}{\alpha\rho' + \beta\rho''}w'', $$

we get by convexity of N, X, $V_k$, $W_k$, $U_t$:

$$ z \in N, v \in V_k, w \in W_k, \Theta \in U_t, v + \rho w = \alpha[v' + \rho'w'] + \beta[v'' + \rho''w''] \in X $$

and

$$ [z; v + \rho w; \Theta] = \alpha[z'; v' + \rho' w'; \Theta'] + \beta[z''; v'' + \rho'' w''; \Theta''] $$

The latter equality combines with concavity of $\Psi_t$ to imply that

$$ \mathcal{S}V_{tk}(\alpha\rho' + \beta\rho'') \ge \Psi_t(z, v + \rho w, \Theta) \\ \ge \alpha\Psi_t(z', v' + \rho'w', \Theta') + \beta\Psi_t(z'', v'' + \rho''w'', \Theta'') = \alpha\mathcal{S}V_{tk}(\rho') + \beta\mathcal{S}V_{tk}(\rho''). $$

The resulting inequality holds true for all $\rho', \rho'' \in \Delta_k$ and all $\alpha = 1 - \beta \in [0, 1]$, so that $\mathcal{S}V_{tk}(\cdot)$ is concave.

Now let $\mathcal{U}$ contain the $\succeq$-largest element $\bar{\Theta}$, whence the $\nu_t \times \nu_t$ matrix $\bar{\Theta}_t = S_t \bar{\Theta} S_t^T$, see (2.3), is the $\succeq$-largest element in $U_t$. Then by (A.1) we have

$$ \Gamma_{tk}(\rho) := \sqrt{-\mathcal{S}V_{tk}(\rho)} = \min_{\substack{z, v, w: \\ z \in N, v \in V_k, w \in W_k, \\ v + \rho w \in X}} \|H_t[v + \rho w - z]\|_2, \\ H_t = \frac{1}{2\sqrt{2}}[\bar{A}_t^T[\bar{\Theta}_t]^{-1}\bar{A}_t]^{1/2}, $$

and from the part of the lemma we have just proved we know that $\Gamma_{tk}(\rho)$ is a continuous nonnegative and nondecreasing function of $\rho \in \Delta_k$ such that $\text{lim}_{\rho \to +0} \Gamma_{tk}(\rho) = 0$. Given $\rho', \rho'' \in \Delta_k$ and taking into account the compactness of N, $V_k$, and X, we can find $z', v', w', z'', v'', w''$ such that

$$ z', z'' \in N, v', v'' \in V_k, w', w'' \in W_k, v' + \rho'w' \in X, v'' + \rho''w'' \in X, \\ \Gamma_{tk}(\rho') = \|H_t[v' + \rho'w' - z']\|_2, \Gamma_{tk}(\rho'') = \|H_t[v'' + \rho''w'' - z'']\|_2. $$
Now, given $\alpha \in [0, 1]$ and setting $\beta = 1 - \alpha$,

$$[\rho; z; v] = \alpha[\rho'; z'; v'] + \beta[\rho''; z''; v''], w = \rho^{-1}[\alpha\rho'w' + \beta\rho''w''],$$

we clearly have $z \in N$, $v \in V_k$, $w \in W_k$, $v+\rho w = \alpha[v'+\rho'w'] + \beta[v''+\rho''w''] \in X$ and therefore

$$\begin{aligned} \Gamma_{tk}(\rho) &\le \|H_t[v + \rho w - z]\|_2 = \|H_t[\alpha[v' + \rho'w' - z'] + \beta[v'' + \rho''w'' - z'')]\|_2 \\ &\le \alpha\Gamma_{tk}(\rho') + \beta\Gamma_{tk}(\rho''), \end{aligned}$$

and convexity of $\Gamma_{tk}(\cdot)$ follows. $\square$

## A.2. Proof of Proposition 3.2

(i) Let the input be a nuisance, and let $t \in \{1, ..., d\}$. The distribution $P$ of observation $y^t$ in this case belongs to $SG[N^t, U_t]$. Now let $k$ be such that $\rho_{tk} < \infty$. Invoking the first inequality in (3.8) with $\rho$ set to $\rho_{tk}$, we see that

$$\int_{\mathbb{R}^{\nu_t}} \exp\{-\phi_{tk}(y^t)\} P(dy^t) \le \epsilon_{tk\rho_{tk}} = \exp\{SV_{tk}(\rho_{tk})\} = \varkappa_t$$

(see (3.7) and (3.11)). Consequently, $P$-probability of the event $\mathcal{E}_k = \{\xi^t : \phi_{tk}(y^t) < \alpha_t\}$ is at most $\varkappa_t \exp\{\alpha_t\} = \frac{\varkappa_t^2}{\epsilon}$. The signal conclusion at step $t$ is made only when one of the events $\mathcal{E}_k$, $k \in \mathcal{K}_t(\varkappa_t)$, takes place, and $P$-probability of such outcome is at most $K_t(\varkappa_t) \frac{\varkappa_t^2}{\epsilon}$. We remark that the latter quantity is $\le \epsilon_t$ by (3.10).

(ii) Now assume that $t$ and $k$ are such that $\rho_{tk} < \infty$, and that the input belongs to $X_k^\rho$ with $\rho \ge \rho_{tk}$. Since $X_k^\rho$ shrinks when $\rho$ grows, the input in fact belongs to $X_k^{\rho_{tk}}$, and therefore the distribution $P$ of observation $y^t$ belongs to $SG[U_k^{\rho_{tk}}, U_t]$. Invoking the second inequality in (3.8), we get

$$\int_{\mathbb{R}^{\nu_t}} \exp\{\phi_{tk}(y^t)\} P(dy^t) \le \epsilon_{tk\rho_{tk}} = \exp\{SV_{tk}(\rho_{tk})\} = \varkappa_t$$

(see (3.7) and (3.11)). Hence, $P$-probability of the event $\mathcal{E}_k^c = \{\xi^t : \phi_{tk}(y^t) \ge \alpha_t\}$ is at most $\exp\{-\alpha_t\} \varkappa_t = \epsilon$. $\square$

## A.3. Proof of Proposition 3.3

(i) Let the input be a nuisance, and let $t \in \{1, ..., d\}$. The distribution $P$ of observation $y^t$ in this case belongs to $G[N^t, U_t]$. Now let $k$ be such that $\rho_{tk} < \infty$. Invoking (#) and taking into account that, as it was already explained, $\alpha$ as given by (3.18) satisfies $\alpha \le \delta_t^2$, we conclude that the inequality in (3.17.a) holds, that is,

$$\begin{aligned} \text{Prob}_{y^t \sim P} \{\phi_{tk}(y^t) < \alpha\} &\le \text{Erf}(\delta_t - \alpha/\delta_t) \\ &= \text{Erf}(\delta_t - \frac{1}{2}[\text{ErfInv}(\epsilon) - \text{ErfInv}(\epsilon_t/L_t(\delta_t))]) \quad \text{[by (3.18)]} \\ &\le \text{Erf}(\frac{1}{2}[\text{ErfInv}(\epsilon) + \text{ErfInv}(\epsilon_t/L_t(\delta_t))] - \frac{1}{2}[\text{ErfInv}(\epsilon) - \text{ErfInv}(\epsilon_t/L_t(\delta_t))]) \\ &\quad \text{[by (3.14) and since Erf(·) is nonincreasing]} \\ &= \min[\epsilon_t/L_t(\delta_t), 1/2]. \end{aligned}$$
This implies that the probability to come to the signal conclusion at step t (this conclusion is made only when $L_t(\delta_t) > 0$ and $\phi_{tk}(y^t) < \alpha$ for some $k \in \mathbb{L}_t(\delta_t)$) is at most $L_t(\delta_t) \cdot (\epsilon_t/L_t(\delta_t)) = \epsilon_t$, as claimed.

(ii) Now assume that $t$ and $k$ are such that $\rho_{tk} < \infty$, and that the input belongs to $X_k^\rho$ with $\rho \ge \rho_{tk}$. Since $X_k^\rho$ shrinks when $\rho$ grows, the input in fact belongs to $X_k^{\rho_{tk}}$, and therefore the distribution $P$ of observation $y^t$ belongs to $G[U_{k\rho_{tk}}^t, U_t]$. Since, as it was already explained, $\beta$ as given by (3.18) satisfies $\beta \le \delta_t^2$, invoking (#), we conclude that for our $P$ the inequality in (3.17.b) holds, that is,

$$ 
\begin{align*}
\mathrm{Prob}_{y^t \sim P} \{\phi_{tk}(y^t) \ge \alpha\} &= \mathrm{Prob}_{y^t \sim P} \{\phi_{tk}(y^t) \ge -\beta\} \le \mathrm{Erf}(\delta_t - \beta/\delta_t) \\
&= \mathrm{Erf}(\delta_t + \frac{1}{2}[\mathrm{ErfInv}(\epsilon) - \mathrm{ErfInv}(\epsilon_t/L_t(\delta_t))]) \quad \text{[by (3.18)]} \\
&\le \mathrm{Erf}(\frac{1}{2}[\mathrm{ErfInv}(\epsilon) + \mathrm{ErfInv}(\epsilon_t/L_t(\delta_t))] + \frac{1}{2}[\mathrm{ErfInv}(\epsilon) - \mathrm{ErfInv}(\epsilon_t/L_t(\delta_t))]) \quad \text{[by (3.14) and since Erf(·) is nonincreasing]} \\
&= \epsilon.
\end{align*}
$$

In other words, in the situation in question, $P$-probability to terminate at time $t$ with the signal conclusion (which is made when $\phi_{tk'}(y^t) < \alpha$ for some $k'$ with $\rho_{tk'} < \infty$) is at least $1 - \epsilon$. $\square$

### A.4. Proof of Proposition 3.4

Let us refer to the three situations listed in (3.21) as to cases I, II and III. Let $\bar{\rho} = \chi \rho_{tk}^*$, with $\chi$ satisfying (3.21). It may happen that $\bar{\rho} > R_k$; in this case we have nothing to prove, since there do not exist feasible signals of shape $k$ and magnitude $\ge \bar{\rho}$. Now let

$$ \bar{\rho} \le R_k. \qquad (A.2) $$

The function $SV_{tk}(\rho)$ is concave on $(0, R_k]$, tends to 0 as $\rho \to +0$ and is equal to $-\frac{1}{2}\mathrm{ErfInv}^2(\epsilon)$ when $\rho = \rho_{tk}^*$. Since $\chi \ge 1$, we conclude that $SV_{tk}(\bar{\rho}) \le \chi SV_{tk}(\rho_{tk}^*)$, implying in case II that

$$ 
\begin{align}
SV_{tk}(\bar{\rho}) &< -\frac{1}{2}\mathrm{ErfInv}^2(\epsilon) \left(\frac{1}{2}\left[1 + \frac{\mathrm{ErfInv}(\epsilon/(Kd))}{\mathrm{ErfInv}(\epsilon)}\right]\right)^2 \tag{A.3} \\
&= -\frac{1}{2}\left(\frac{1}{2}\left[\mathrm{ErfInv}(\epsilon) + \mathrm{ErfInv}(\epsilon/(Kd))\right]\right)^2, \nonumber
\end{align}
$$

and in case III – that

$$ SV_{tk}(\bar{\rho}) < \ln(\bar{\kappa}), \quad \bar{\kappa} = \epsilon/\sqrt{Kd}. \qquad (A.4) $$

In case I, by Lemma 3.1, the function $\sqrt{-SV_{tk}(\rho)}$ is convex on $(0, R_k]$, and therefore the same argument as above shows that $\sqrt{-SV_{tk}(\bar{\rho})} \ge \chi\sqrt{-SV_{tk}(\rho_{tk}^*)}$. That is, $SV_{tk}(\bar{\rho}) \le \chi^2 SV_{tk}(\rho_{tk}^*)$, and we again arrive at (A.3).

Let us now consider the Gaussian case. As we have seen, in this case

$$ SV_{tk}(\bar{\rho}) < -\frac{1}{2}\bar{\delta}^2, \quad \bar{\delta} = \frac{1}{2}[\mathrm{ErfInv}(\epsilon_t/K) + \mathrm{ErfInv}(\epsilon)]. \qquad (A.5) $$
Taking into account that $L_t(\bar{\delta}) \le K$ and that ErfInv(·) is non-increasing, we conclude that

$$ \bar{\delta} \ge \frac{1}{2} [\text{ErfInv}(\epsilon) + \text{ErfInv}(\epsilon_t/L_t(\bar{\delta}))], $$

which combines with (3.13) to imply that $\bar{\delta} \ge \delta_t$. Consequently, by (A.5), we have $SV_{tk}(\bar{\rho}) < -\frac{1}{2}\delta_t^2$, and since we are in the case where (A.2) holds and $SV$ is non-increasing, we have $SV_{tk}(R_k) < -\frac{1}{2}\delta_t^2$ as well. Hence, $k \in L_t(\delta_t)$, therefore $\rho_{tk} < \infty$, and, in addition, $\bar{\rho} > \rho_{tk}$ (since for finite $\rho_{tk}$ we have $SV_{tk}(\rho_{tk}) = -\frac{1}{2}\delta_t^2$, while $SV_{tk}(\bar{\rho}) < -\frac{1}{2}\delta_t^2$ and $SV$ is nonincreasing). Thus, we are in the case of $\rho_{tk} \le \bar{\rho} \le R_k$, and therefore, by item (ii) of Proposition 3.3, for a feasible signal of shape $k$ and magnitude $\ge \bar{\rho}$, the probability for the inference procedure from Section 3.3 to terminate at time $t$ with the signal conclusion is at least $1 - \epsilon$, as required.

Now, assume that we are in the sub-Gaussian case. By (A.2) combined with (A.4), we have

$$ SV_{tk}(R_k) < \ln(\bar{\kappa}). \qquad (A.6) $$

We claim that

$$ \bar{\kappa} \le \kappa_t, \qquad (A.7) $$

where $\kappa_t$ is given by (3.9). Indeed, we have $K_t(\bar{\kappa}) \le K = \epsilon\epsilon_t/\bar{\kappa}^2$ (recall that $\epsilon_t = \epsilon/d$), which combines with (3.9) to imply (A.7). Besides this, we have

$$ \ln(\bar{\kappa}) \le -\frac{1}{2}\text{ErfInv}^2(\epsilon). $$

Indeed, we have $0 < \text{ErfInv}(\epsilon) \le \sqrt{2\ln(1/\epsilon)}$, whence

$$ -\frac{1}{2}\text{ErfInv}^2(\epsilon) \ge \ln(\epsilon) \ge \ln(\sqrt{\epsilon^2/(dK)}) = \ln(\bar{\kappa}). $$

Invoking (A.6), we get $SV_{tk}(R_k) < \ln(\kappa_t)$ by (A.7), that is, recalling the construction from Section 3.2.3, $\rho_{tk}$ is well defined and satisfies

$$ \rho_{tk} \in (0, R_k) \text{ with } SV_{tk}(\rho_{tk}) = \ln(\kappa_t). \qquad (A.8) $$

Because $SV_{tk}(\rho)$ is nonincreasing, we conclude from (A.4), (A.7) and the second relation in (A.8) that $\bar{\rho} \ge \rho_{tk}$. Invoking item (ii) of Proposition 3.2, we conclude that if the input is a feasible signal with activation of shape $k$ and magnitude at least $\bar{\rho}$, the probability of the inference routine from Section 3.2.3 to terminate at time $t$ with the signal conclusion is at least $1 - \epsilon$. $\square$

### A.5. Proof of Proposition 4.1

Observe that when $m, \nu \in \mathbf{R}^n$ and $S \in \mathbf{S}^n$, $\|S\| < 1$, one has

$$ \ln \left( \mathbf{E}_{\xi \sim \mathcal{N}(\nu, I_n)} \left\{ \exp \left\{ m^T \xi + \frac{1}{2} \xi^T S \xi \right\} \right\} \right) = -\frac{1}{2} \ln \text{Det}(I_n - S) + m^T \nu + \frac{1}{2} \nu^T S \nu + \frac{1}{2} (m + S\nu)^T [I_n - S]^{-1} (m + S\nu). \qquad (A.9) $$
Indeed,

$$
\begin{align*}
& \mathbf{E}_{\xi \sim \mathcal{N}(\nu, I_n)} \{ \exp\{m^T \xi + \frac{1}{2} \xi^T S \xi \} \} \\
&= \frac{1}{(2\pi)^{n/2}} \exp\{m^T \nu + \frac{1}{2} \nu^T S \nu\} \int \exp\{d^T \eta - \frac{1}{2} \eta^T [I_n - S] \eta\} d\eta \\
& \qquad [d = m + S\nu, \eta = \xi - \nu] \\
&= \frac{1}{(2\pi)^{n/2}} \exp\{m^T \nu + \frac{1}{2} \nu^T S \nu\} \int \exp\{-\frac{1}{2} \zeta^T [I_n - S] \zeta + \frac{1}{2} d^T [I_n - S]^{-1} d\} d\zeta \\
& \qquad [\zeta = \eta - [I_n - S]^{-1} d] \\
&= \exp\{m^T \nu + \frac{1}{2} \nu^T S \nu + \frac{1}{2} d^T [I_n - S]^{-1} d\} \det^{-1/2}(I_n - S) \left[ \frac{1}{(2\pi)^{n/2}} \int \exp\{-\frac{1}{2} \omega^T \omega\} d\omega \right] \\
& \qquad [\omega = [I_n - S]^{1/2} \zeta] \\
&= \exp\{m^T \nu + \frac{1}{2} \nu^T S \nu + \frac{1}{2} d^T [I_n - S]^{-1} d\} \det^{-1/2}(I_n - S),
\end{align*}
$$

which is exactly (A.9).

A.5.1. *Proof of Proposition 4.1.i*

1.0. Let $b = [0; \dots; 0; 1] \in \mathbf{R}^{n+1}$, so that $B = \begin{bmatrix} A \\ b^T \end{bmatrix}$, and let $\mathcal{A}(u) = A[u; 1]$.
For any $u \in \mathbf{R}^n$, $h \in \mathbf{R}^\nu$, $\Theta \in \mathbf{S}_+^\nu$ and $H \in \mathbf{S}^\nu$ such that $-I \prec \Theta^{1/2} H \Theta^{1/2} \prec I$,
we have

$$
\begin{align}
\Psi(h, H; u, \Theta) &:= \ln \left( \mathbf{E}_{\xi \sim \mathcal{N}(\mathcal{A}(u), \Theta)} \left\{ \exp\left\{h^T \zeta + \frac{1}{2} \zeta^T H \zeta\right\} \right\} \right) \nonumber \\
&= \ln \left( \mathbf{E}_{\xi \sim \mathcal{N}(0, I)} \left\{ \exp\left\{h^T [\mathcal{A}(u) + \Theta^{1/2}\xi] + \frac{1}{2} [\mathcal{A}(u) + \Theta^{1/2}\xi]^T H [\mathcal{A}(u) + \Theta^{1/2}\xi] \right\} \right\} \right) \nonumber \\
&= -\frac{1}{2} \ln \det(I - \Theta^{1/2} H \Theta^{1/2}) + h^T \mathcal{A}(u) \nonumber \\
&\quad + \frac{1}{2} \mathcal{A}(u)^T H \mathcal{A}(u) + \frac{1}{2} [H \mathcal{A}(u) + h]^T \Theta^{1/2} [I - \Theta^{1/2} H \Theta^{1/2}]^{-1} \Theta^{1/2} [H \mathcal{A}(u) + h] \tag{by (A.9)} \\
&= -\frac{1}{2} \ln \det(I - \Theta^{1/2} H \Theta^{1/2}) + \frac{1}{2}[u; 1]^T [b h^T A + A^T h b^T + A^T H A] [u; 1] \nonumber \\
&\quad + \frac{1}{2}[u; 1]^T [B^T [H, h]^T \Theta^{1/2} [I - \Theta^{1/2} H \Theta^{1/2}]^{-1} \Theta^{1/2} [H, h] B] [u; 1] \tag{A.10}
\end{align}
$$

(because $h^T A(u) = [u; 1]^T b h^T A[u; 1] = [u; 1]^T A^T h b^T [u; 1]$ and $H A(u) + h = [H, h] B[u; 1]$).

Observe that when $(h, H) \in \mathcal{H}^{\gamma}$, we have $\Theta^{1/2}[I - \Theta^{1/2}H\Theta^{1/2}]^{-1}\Theta^{1/2} = [\Theta^{-1} - H]^{-1} \preceq [\Theta_{*}^{-1} - H]^{-1}$, so that (A.10) implies that for all $u \in \mathbf{R}^n$, $\Theta \in \mathcal{U}$, and $(h, H) \in \mathcal{H}^{\gamma}$,

$$
\begin{align}
\Psi(h, H; u, \Theta) &\le -\frac{1}{2} \ln \det(I - \Theta^{1/2} H \Theta^{1/2}) \nonumber \\
&\quad + \frac{1}{2}[u; 1]^T \underbrace{[b h^T A + A^T h b^T + A^T H A + B^T [H, h]^T [\Theta_*^{-1} - H]^{-1} [H, h] B]}_{Q[H,h]} [u; 1] \nonumber \\
&= -\frac{1}{2} \ln \det(I - \Theta^{1/2} H \Theta^{1/2}) + \frac{1}{2} \mathrm{Tr}(Q[H, h] Z(u)) \nonumber \\
&\le -\frac{1}{2} \ln \det(I - \Theta^{1/2} H \Theta^{1/2}) + \Gamma_{\mathcal{Z}}(h, H), \tag{A.11}
\end{align}
$$

(we have taken into account that $Z(u) \in \mathcal{Z}$ when $u \in U$ (premise of the proposition) and therefore $\mathrm{Tr}(Q[H, h]Z(u)) \le \phi_{\mathcal{Z}}(Q[H, h])$).
20. We need the following:

**Lemma A.1.** Let $\Theta_*$ be a $d \times d$ symmetric positive definite matrix, let $\delta \in [0, 2]$, and let $\mathcal{U}$ be a closed convex subset of $\mathbf{S}_+^d$ such that

$$ \Theta \in \mathcal{U} \Rightarrow \{\Theta \preceq \Theta_*\} \ \& \ \{\|\Theta^{1/2}\Theta_*^{-1/2} - I\| \le \delta\} \quad (A.12) $$

(cf. (4.1)). Let also $\mathcal{H}^o := \{H \in \mathbf{S}^d : -\Theta_*^{-1} \prec H \prec \Theta_*^{-1}\}$. Then

$$ \begin{aligned} \forall(H, \Theta) \in \mathcal{H}^o \times \mathcal{U}: \\ G(H; \Theta) := -\frac{1}{2} \ln \mathrm{Det}(I - \Theta^{1/2} H \Theta^{1/2}) \\ \le G^+(H; \Theta) := -\frac{1}{2} \ln \mathrm{Det}(I - \Theta_*^{1/2} H \Theta_*^{1/2}) + \frac{1}{2} \mathrm{Tr}([\Theta - \Theta_*]H) \\ + \frac{\delta(2+\delta)}{2(1-\|\Theta_*^{1/2} H \Theta_*^{1/2}\|)} \|\Theta_*^{1/2} H \Theta_*^{1/2}\|_F^2, \end{aligned} \quad (A.13) $$

where $\|\cdot\|$ is the spectral, and $\|\cdot\|_F$ - the Frobenius norm of a matrix. In addition, $G^+(H, \Theta)$ is a continuous function on $\mathcal{H}^o \times \mathcal{U}$ which is convex in $H \in \mathcal{H}^o$ and concave (in fact, affine) in $\Theta \in \mathcal{U}$.

**Proof.** Let us set

$$ d(H) = \|\Theta_*^{1/2} H \Theta_*^{1/2}\|, $$

so that $d(H) < 1$ for $H \in \mathcal{H}^o$. For $H \in \mathcal{H}^o$ and $\Theta \in \mathcal{U}$ fixed we have

$$ \begin{aligned} \|\Theta^{1/2} H \Theta^{1/2}\| &= \|[\Theta^{1/2} \Theta_*^{-1/2}][\Theta_*^{1/2} H \Theta_*^{1/2}][\Theta^{1/2} \Theta_*^{-1/2}]^T\| \\ &\le \|\Theta^{1/2} \Theta_*^{-1/2}\|^2 \|\Theta_*^{1/2} H \Theta_*^{1/2}\| \le \|\Theta_*^{1/2} H \Theta_*^{1/2}\| = d(H) \end{aligned} \quad (A.14) $$

(we have used the fact that $0 \preceq \Theta \preceq \Theta_*$ implies $\|\Theta^{1/2}\Theta_*^{-1/2}\| \le 1$). Noting that $\|AB\|_F \le \|A\|\|B\|_F$, a computation completely similar to the one in (A.14) yields

$$ \|\Theta^{1/2} H \Theta^{1/2}\|_F \le \|\Theta_*^{1/2} H \Theta_*^{1/2}\|_F := D(H). \quad (A.15) $$

Besides this, setting $F(X) = -\ln \mathrm{Det}(X) : \mathrm{int} \mathbf{S}_+^d \to \mathbf{R}$ and equipping $\mathbf{S}^d$ with the Frobenius inner product, we have $\nabla F(X) = -X^{-1}$, so that with $R_0 = \Theta_*^{1/2} H \Theta_*^{1/2}$, $R_1 = \Theta^{1/2} H \Theta^{1/2}$, and $\Delta = R_1 - R_0$, we have for properly selected $\lambda \in (0, 1)$ and $R_\lambda = \lambda R_0 + (1 - \lambda)R_1$:

$$ \begin{aligned} F(I - R_1) &= F(I - R_0 - \Delta) = F(I - R_0) + \langle \nabla F(I - R_\lambda), -\Delta \rangle \\ &= F(I - R_0) + \langle (I - R_\lambda)^{-1}, \Delta \rangle \\ &= F(I - R_0) + \langle I, \Delta \rangle + \langle (I - R_\lambda)^{-1} - I, \Delta \rangle. \end{aligned} $$

We conclude that

$$ F(I - R_1) \le F(I - R_0) + \mathrm{Tr}(\Delta) + \|I - (I - R_\lambda)^{-1}\|_F \|\Delta\|_F. \quad (A.16) $$

Denoting by $\mu_i$ the eigenvalues of $R_\lambda$ and noting that $\|R_\lambda\| \le \max[\|R_0\|, \|R_1\|] = d(H)$ (see (A.14)), we have $|\mu_i| \le d(H)$, and therefore eigenvalues $\nu_i = 1 -$
$\frac{1}{1-\mu_i} = -\frac{\mu_i}{1-\mu_i}$ of $I - (I - R_\lambda)^{-1}$ satisfy $|\nu_i| \le |\mu_i|/(1-\mu_i) \le |\mu_i|/(1-d(H))$, 
whence

$$ \|I - (I - R_{\lambda})^{-1}\|_{F} = \sqrt{\sum_{i=1}^{d} \nu_{i}^{2}} \le \frac{\sqrt{\sum_{i=1}^{d} \mu_{i}^{2}}}{1 - d(H)} = \frac{\|R_{\lambda}\|_{F}}{1 - d(H)}. $$

Noting that $\|R_\lambda\|_F \le \max[\|R_0\|_F, \|R_1\|_F] = D(H)$, see (A.15), we conclude that $\|I - (I - R_\lambda)^{-1}\|_F \le D(H)/(1 - d(H))$, so that (A.16) yields

$$ F(I - R_1) \le F(I - R_0) + \mathrm{Tr}(\Delta) + D(H) \|\Delta\|_F / (1 - d(H)). \quad (A.17) $$

Further, by (4.1) the matrix $D = \Theta^{1/2}\Theta_*^{-1/2} - I$ satisfies $\|D\| \le \delta$, whence

$$ \begin{aligned} \Delta &= \underbrace{\Theta^{1/2} H \Theta^{1/2}}_{R_1} - \underbrace{\Theta_*^{1/2} H \Theta_*^{1/2}}_{R_0} \\ &= (I + D) R_0 (I + D^T) - R_0 = D R_0 + R_0 D^T + D R_0 D^T. \end{aligned} $$

Consequently,

$$ \|\Delta\|_F \le \|DR_0\|_F + \|R_0 D^T\|_F + \|DR_0 D^T\|_F \le [2\|D\| + \|D\|^2]\|R_0\|_F \\ \le \delta(2 + \delta)\|R_0\|_F = \delta(2 + \delta)D(H). $$

This combines with (A.17) and the relation

$$ \mathrm{Tr}(\Delta) = \mathrm{Tr}(\Theta^{1/2} H \Theta^{1/2} - \Theta_*^{1/2} H \Theta_*^{1/2}) = \mathrm{Tr}([\Theta - \Theta_*]H) $$

to yield

$$ F(I - R_1) \le F(I - R_0) + \mathrm{Tr}([\Theta - \Theta_*]H) + \frac{\delta(2 + \delta)}{1 - d(H)} \|\Theta_*^{1/2} H \Theta_*^{1/2}\|_F^2, $$

and we arrive at (A.13). It remains to prove that $G^+(H; \Theta)$ is convex-concave and continuous on $H^o \times U$. The only component of this claim which is not completely evident is convexity of the function in $H \in H^o$. To see that it is the case, note that $\ln \mathrm{Det}(S)$ is concave on the interior of the semidefinite cone, the function $f(u, v) = \frac{u^2}{1-v}$ is convex and nondecreasing in $u, v$ in the convex domain $\Pi = \{(u, v) : u \ge 0, v < 1\}$, and the function $\frac{\|\Theta_*^{1/2} H \Theta_*^{1/2}\|_F^2}{1 - \|\Theta_*^{1/2} H \Theta_*^{1/2}\|}$ is obtained from $f$ by convex substitution of variables $H \mapsto (\|\Theta_*^{1/2} H \Theta_*^{1/2}\|_F, \|\Theta_*^{1/2} H \Theta_*^{1/2}\|)$ mapping $H^o$ into $\Pi$. $\square$

**3.0.** Combining (A.13), (A.11), (4.5) and the origin of $\Psi$, see (A.10), we arrive at

$$ \forall ((u, \Theta) \in U \times U, (h, H) \in H^\gamma = H) : \\ \ln (\mathbf{E}_{\zeta \sim \mathcal{N}(A[u;1], \Theta)} \{ \exp\{h^T \zeta + \frac{1}{2} \zeta^T H \zeta\} \}) \le \Phi_{A, \mathcal{Z}}(h, H; \Theta), $$

as claimed in (4.6).
4⁰. Now let us check that $\Phi_{A,Z}(h, H; \Theta) : \mathcal{H} \times \mathcal{U} \to \mathbf{R}$ is continuous and convex-concave. Recalling that the function $G^+(H; \Theta)$ from (A.13) is convex-concave and continuous on $\mathcal{H}^o \times \mathcal{U}$, all we need to verify is that $\Gamma_Z(h, H)$ is convex and continuous on $\mathcal{H}$. Recalling that $\mathcal{Z}$ is a nonempty compact set, the function $\phi_Z(\cdot) : \mathbf{S}^{n+1} \to \mathbf{R}$ is continuous, implying the continuity of $\Gamma_Z(h, H) = \frac{1}{2}\phi_Z(Q[H, h])$ on $\mathcal{H} = \mathcal{H}^\gamma$ ($Q[H, h]$ is defined in (A.11)). To prove the convexity of $\Gamma$, note that $\mathcal{Z}$ is contained in $\mathbf{S}_+^{n+1}$, implying that $\phi_Z(\cdot)$ is convex and $\succeq$-monotone. On the other hand, by Schur Complement Lemma, we have

$$ S := \left\{ \begin{array}{l} (h, H, G) : G \succeq Q[H, h], (h, H) \in \mathcal{H}^\gamma \\ = \left\{ (h, H, G) : \left[ \frac{G - [bh^T A + A^T h b^T + A^T H A]}{[H, h] B} \middle| \frac{B^T [H, h]^T}{\Theta_*^{-1} - H} \right] \succeq 0, (h, H) \in \mathcal{H}^\gamma \right\} \end{array} \right. $$

implying that $S$ is convex. Since $\phi_Z(\cdot)$ is $\succeq$-monotone, we have

$$ \{(h, H, \tau) : (h, H) \in \mathcal{H}^{\gamma}, \tau \ge \Gamma_{\mathcal{Z}}(h, H)\} = \{(h, H, \tau) : \exists G : G \succeq Q[H, h], \\ 2\tau \ge \phi_{\mathcal{Z}}(G), (h, H) \in \mathcal{H}^{\gamma}\}, $$

and we see that the epigraph of $\Gamma_Z$ is convex (since the set $S$ and the epigraph of $\phi_Z$ are so), as claimed.

5⁰. It remains to prove that $\Phi_{A,Z}$ is coercive in $H, h$. Let $\Theta \in \mathcal{U}$ and $(h_i, H_i) \in \mathcal{H}^\gamma$ with $\|(h_i, H_i)\| \to \infty$ as $i \to \infty$, and let us prove that $\Phi_{A,Z}(h_i, H_i; \Theta) \to \infty$. Looking at the expression for $\Phi_{A,Z}(h_i, H_i; \Theta)$, it is immediately seen that all terms in this expression, except for the terms coming from $\phi_Z(\cdot)$, remain bounded as $i$ grows, so that all we need to verify is that the $\phi_Z(\cdot)$-term goes to $\infty$ as $i \to \infty$. Observe that $H_i$ are uniformly bounded due to $(h_i, H_i) \in \mathcal{H}^\gamma$, implying that $\|h_i\|_2 \to \infty$ as $i \to \infty$.

Denoting $e = [0; \dots; 0; 1] \in \mathbf{R}^{\nu+1}$ and, as before, $b = [0; \dots; 0; 1] \in \mathbf{R}^{n+1}$, note that, by construction, $B^Te = b$. Now let $W \in \mathcal{Z}$, so that $W_{n+1,n+1} = 1$. Taking into account that the matrices $[\Theta_*^{-1} - H_i]^{-1}$ satisfy $\alpha I_d \preceq [\Theta_*^{-1} - H_i]^{-1} \preceq \beta I_d$ for some positive $\alpha, \beta$ due to $H_i \in \mathcal{H}^\gamma$, we come to

$$ \underbrace{\left[ \left[ \frac{H_i}{h_i^T} \middle| h_i \right] + [H_i, h_i]^T [\Theta_*^{-1} - H_i]^{-1} [H_i, h_i] \right]}_{Q_i} = \underbrace{\left[ h_i^T [\Theta_*^{-1} - H_i]^{-1} h_i \right]}_{\alpha_i \|h_i\|_2^2} ee^T + R_i, $$

where $\alpha_i \ge \alpha > 0$ and $\|R_i\|_F \le C(1 + \|h_i\|_2)$. As a result,

$$ \begin{align*} \phi_Z(B^T Q_i B) &\ge \operatorname{Tr}(WB^T Q_i B) = \operatorname{Tr}(WB^T [\alpha_i \|h_i\|_2^2 ee^T + R_i] B) \\ &\ge \alpha_i \|h_i\|_2^2 \underbrace{\operatorname{Tr}(Wbb^T)}_{=W_{n+1,n+1}=1} - \|BWB^T\|_F \|R_i\|_F \\ &\ge \alpha \|h_i\|_2^2 - C(1 + \|h_i\|_2) \|BWB^T\|_F, \end{align*} $$

and the concluding quantity tends to $\infty$ as $i \to \infty$ due to $\|h_i\|_2 \to \infty$, $i \to \infty$. Part (i) is proved.
### A.5.2. Proof of Proposition 4.1.ii

Part (ii) of the proposition is a straightforward combination of part (i) and [17, Proposition 3.1]; for the sake of completeness, here is a simple proof. Since by (i) the function $\Phi(h, H; \Theta_1, \Theta_2)$ is continuous and convex-concave on the domain $(\mathcal{H}_1 \cap \mathcal{H}_2) \times (\mathcal{U}_1 \times \mathcal{U}_2)$ and are coercive in $(h, H)$, while $\mathcal{H}$ and $\mathcal{U}$ are closed and

convex, and $\mathcal{U}$ in addition is compact, saddle point problem (4.7) is solvable (Sion-Kakutani Theorem). Now let $(h_*, H_*; \Theta_1^*, \Theta_2^*)$ be a saddle point. To prove (4.9), let $P \in \mathcal{G}_1$, that is, $P = \mathcal{N}(A_1[u; 1], \Theta_1)$ for some $\Theta_1 \in \mathcal{U}_1$ and some $u$ with $[u; 1][u; 1]^T \in \mathcal{Z}_1$. Applying (4.6) to the first collection of data, with $a$ given by (4.8), we get the first $\le$ in the following chain:

$$ \ln \left( \int e^{-\frac{1}{2}\omega^T H_* \omega - \omega^T h_* - a} P(d\omega) \right) \le \Phi_{A_1, \mathcal{Z}_1}(-h_*, -H_*; \Theta_1) - a \underbrace{\le}_{(a)} \Phi_{A_1, \mathcal{Z}_1}(-h_*, -H_*; \Theta_1^*) - a \underbrace{=}_{(b)} \mathcal{SV}, $$

where (a) is due to the fact that $\Phi_{A_1, \mathcal{Z}_1}(-h_*, -H_*; \Theta_1) + \Phi_{A_2, \mathcal{Z}_2}(h_*, H_*; \Theta_2)$ attains its maximum over $(\Theta_1, \Theta_2) \in \mathcal{U}_1 \times \mathcal{U}_2$ at the point $(\Theta_1^*, \Theta_2^*)$, and (b) is due to the origin of $a$ and the relation $\mathcal{SV} = \frac{1}{2}[\Phi_{A_1, \mathcal{Z}_1}(-h_*, -H_*; \Theta_1^*) + \Phi_{A_2, \mathcal{Z}_2}(h_*, H_*; \Theta_2^*)]$. The bound in (4.9.a) is proved. Similarly, let $P \in \mathcal{G}_2$, that is, $P = \mathcal{N}(A_2[u; 1], \Theta_2)$ for some $\Theta_2 \in \mathcal{U}_2$ and some $u$ with $[u; 1][u; 1]^T \in \mathcal{Z}_2$. Applying (4.6) to the second collection of data, with the same $a$ as above, we get the first $\le$ in the following chain:

$$ \ln \left( \int e^{\frac{1}{2}\omega^T H_* \omega + \omega^T h_* + a} P(d\omega) \right) \le \Phi_{A_2, \mathcal{Z}_2}(h_*, H_*; \Theta_2) + a \underbrace{\le}_{(a)} \Phi_{A_2, \mathcal{Z}_2}(h_*, H_*; \Theta_2^*) + a \underbrace{=}_{(b)} \mathcal{SV}, $$

with exactly the same justification as above of (a) and (b). The bound in (4.9.b) is proved. $\square$

### A.6. Justification for Remark 4.1.

In the easy case, we have $B_\chi = I_{\nu+1}$ and therefore

$$ \begin{aligned} M_\chi(h, H) &:= B_\chi^T \left[ \left[ \frac{H}{h^T} \middle| \frac{h}{h^T} \right] + [H, h]^T \left[ [\Theta_*^{(\chi)}]^{-1} - H \right]^{-1} [H, h] \right] B_\chi \\ &= \left[ \frac{H + H \left[ [\Theta_*^{(\chi)}]^{-1} - H \right]^{-1} H}{h^T + h^T \left[ [\Theta_*^{(\chi)}]^{-1} - H \right]^{-1} H} \middle| \frac{h + H \left[ [\Theta_*^{(\chi)}]^{-1} - H \right]^{-1} h}{h^T \left[ [\Theta_*^{(\chi)}]^{-1} - H \right]^{-1} h} \right] \end{aligned} $$

and

$$ \begin{aligned} \phi_{\mathcal{Z}_\chi}(Z) &= \max_W \{ \operatorname{Tr}(ZW) : W \succeq 0, \operatorname{Tr}(WQ_j^\chi) \le q_j^\chi, 1 \le j \le J_\chi \} \\ &= \min_\lambda \{ \sum_j q_j^\chi \lambda_j : \lambda \ge 0, Z \succeq \sum_j \lambda_j Q_j^\chi \}, \end{aligned} $$
where the last equality is due to semidefinite duality. From the second representation of $\phi_{Z_\chi}(\cdot)$ and the fact that all $Q_j^\chi$ are diagonal it follows that $\phi_{Z_\chi}(M_\chi(0, H)) \le \phi_{Z_\chi}(M_\chi(h, H))$ (indeed, with diagonal $Q_j^\chi$, this representation clearly says that if $\lambda$ is feasible for the minimization problem participating in the representation when $Z = M_\chi(h, H)$, it remains feasible when $Z$ is replaced with $M_\chi(0, H)$). This, in turn, combines straightforwardly with (4.5) to imply that when replacing $h_*$ with 0 in a saddle point $(h_*, H_*; \Theta_1^*, \Theta_2^*)$ of (4.7), we end up with another saddle point of (4.7). In other words, when solving (4.7), we can from the very beginning set $h$ to 0, thus converting (4.7) into the convex-concave saddle point problem

$$ SV = \min_{H:(0,H) \in \mathcal{H}_1 \cap \mathcal{H}_2} \max_{\Theta_1 \in \mathcal{U}_1, \Theta_2 \in \mathcal{U}_2} \Phi(0, H; \Theta_1, \Theta_2). \quad (A.18) $$

Taking into account the fact that we are in the case where all matrices from the sets $\mathcal{U}_\chi$, same as the matrices $\Theta_*^{(\chi)}$ and all the matrices $Q_j^\chi$, $\chi = 1, 2$, are diagonal, it is immediate to verify that if $E$ is a $\nu \times \nu$ diagonal matrix with diagonal entries $\pm 1$, then $\Phi(0, H; \Theta_1, \Theta_2) = \Phi(0, EHE; \Theta_1, \Theta_2)$. Due to convexity-concavity of $\Phi$ this implies that (A.18) admits a saddle point $(0, H_*; \Theta_1^*, \Theta_2^*)$ with $H_*$ invariant w.r.t. transformations $H_* \mapsto EH_*E$ with the above $E$, that is, with diagonal $H_*$, as claimed. $\square$

## A.7. Proof of Proposition 4.2

### A.7.1. Preliminaries

We start with the following result:

**Lemma A.2.** Let $\tilde{\Theta}$ be a positive definite $d \times d$ matrix, and let

$$ u \mapsto \mathcal{A}(u) = A[u; 1] $$

be an affine mapping from $\mathbf{R}^n$ into $\mathbf{R}^d$. Finally, let $h \in \mathbf{R}^d$, $H \in \mathbf{S}^d$ and $P \in \mathbf{S}^d$ satisfy the relations

$$ 0 \preceq P \prec I \ \& \ P \succeq \bar{\Theta}^{1/2} H \bar{\Theta}^{1/2}. \quad (A.19) $$

Then, setting $B = \begin{bmatrix} 0, \dots, 0, 1 \end{bmatrix}^A$, for every $u \in \mathbf{R}^n$ it holds

$$ \begin{aligned} \zeta \sim SG(\mathcal{A}(u), \bar{\Theta}) &\Rightarrow \ln \left( \mathbf{E}_\zeta \left\{ e^{h^T \zeta + \frac{1}{2} \zeta^T H \zeta} \right\} \right) \le -\frac{1}{2} \ln \operatorname{Det}(I - P) \\ &\quad + \frac{1}{2}[u; 1]^T B^T \left[ \left[ \frac{H}{h^T} \middle| h \right] + [H, h]^T \bar{\Theta}^{1/2} [I - P]^{-1} \bar{\Theta}^{1/2} [H, h] \right] B[u; 1] . \end{aligned} \quad (A.20) $$

Equivalently (set $G = \bar{\Theta}^{-1/2} P \bar{\Theta}^{-1/2}$), whenever $h \in \mathbf{R}^d$, $H \in \mathbf{S}^d$, and $G \in \mathbf{S}^d$ satisfy the relations

$$ 0 \preceq G \prec \bar{\Theta}^{-1} \ \& \ G \succeq H, \quad (A.21) $$
one has for every for every $u \in \mathbf{R}^n$:

$$ \zeta \sim \mathcal{SG}(\mathcal{A}(u), \bar{\Theta}) \Rightarrow \ln \left( \mathbf{E}_{\zeta} \left\{ e^{h^T \zeta + \frac{1}{2} \zeta^T H \zeta} \right\} \right) \leq -\frac{1}{2} \ln \det(I - \bar{\Theta}^{1/2} G \bar{\Theta}^{1/2}) \\ + \frac{1}{2} [u; 1]^T B^T \left[ \left[ \frac{H}{h^T} \middle| h \right] + [H, h]^T [\bar{\Theta}^{-1} - G]^{-1} [H, h] \right] B[u; 1] . \qquad (A.22) $$

**Proof. 1**$^0$. Let us start with the following observation:

**Lemma A.3.** Let $\bar{\Theta} \in \mathbf{S}_+^d$ and $S \in \mathbf{R}^{d \times d}$ be such that $S\bar{\Theta}S^T \prec I_d$. Then for every $\nu \in \mathbf{R}^d$ one has

$$ \ln \left( \mathbf{E}_{\xi \sim \mathcal{SG}(0, \bar{\Theta})} \left\{ e^{\nu^T S \xi + \frac{1}{2} \xi^T S^T S \xi} \right\} \right) \le \ln \left( \mathbf{E}_{x \sim \mathcal{N}(\nu, I_d)} \left\{ e^{\frac{1}{2} x^T S \bar{\Theta} S^T x} \right\} \right) \\ = -\frac{1}{2} \ln \det(I_d - S \bar{\Theta} S^T) + \frac{1}{2} \nu^T [S \bar{\Theta} S^T (I_d - S \bar{\Theta} S^T)^{-1}] \nu. \qquad (A.23) $$

**Proof.** Let $\xi \sim \mathcal{SG}(0, \bar{\Theta})$ and $x \sim \mathcal{N}(\nu, I_d)$ be independent. We have:

$$ \mathbf{E}_{\xi} \left\{ e^{\nu^T S \xi + \frac{1}{2} \xi^T S^T S \xi} \right\} \underset{a}{=} \mathbf{E}_{\xi} \left\{ \mathbf{E}_{x} \left\{ e^{[S \xi]^T x} \right\} \right\} = \mathbf{E}_{x} \left\{ \mathbf{E}_{\xi} \left\{ e^{[S^T x]^T \xi} \right\} \right\} \\ \underset{b}{\le} \mathbf{E}_{x} \left\{ e^{\frac{1}{2} x^T S \bar{\Theta} S^T x} \right\}, $$

where $a$ is due to $x \sim \mathcal{N}(0, I_d)$ and $b$ is due to $\xi \sim \mathcal{SG}(0, \bar{\Theta})$. We have verified the inequality in (A.23); the equality in (A.23) is given by direct computation. $\square$

**2**$^0$. Now, in the situation described in Lemma A.2, given $u \in \mathbf{R}^n$, let us set $\mu = \mathcal{A}(u) = A[u; 1]$, $\nu = P^{-1/2}\bar{\Theta}^{1/2}[H\mu + h]$, $S = P^{1/2}\bar{\Theta}^{-1/2}$, so that $S\bar{\Theta}S^T = P \prec I_d$ and $G = \bar{\Theta}^{-1/2}P\bar{\Theta}^{-1/2} = S^T S$. Let $\zeta \sim \mathcal{SG}(\mu, \bar{\Theta})$. Representing $\zeta$ as $\zeta = \mu + \xi$ with $\xi \sim \mathcal{SG}(0, \bar{\Theta})$, we have

$$ \ln \left( \mathbf{E}_{\zeta} \left\{ e^{h^T \zeta + \frac{1}{2} \zeta^T H \zeta} \right\} \right) = h^T \mu + \frac{1}{2} \mu^T H \mu + \ln \left( \mathbf{E}_{\xi} \left\{ e^{[h+H\mu]^T \xi + \frac{1}{2} \xi^T H \xi} \right\} \right) \\ \le h^T \mu + \frac{1}{2} \mu^T H \mu + \ln \left( \mathbf{E}_{\xi} \left\{ e^{[h+H\mu]^T \xi + \frac{1}{2} \xi^T G \xi} \right\} \right) \quad [\text{since } G \succeq H] \\ = h^T \mu + \frac{1}{2} \mu^T H \mu + \ln \left( \mathbf{E}_{\xi} \left\{ e^{[h+H\mu]^T \xi + \frac{1}{2} \xi^T S^T S \xi} \right\} \right) \quad [\text{since } G = S^T S] \\ = h^T \mu + \frac{1}{2} \mu^T H \mu + \ln \left( \mathbf{E}_{\xi} \left\{ e^{\nu^T S \xi + \frac{1}{2} \xi^T S^T S \xi} \right\} \right) \quad [\text{since } S^T \nu = h + H\mu] \\ \le h^T \mu + \frac{1}{2} \mu^T H \mu - \frac{1}{2} \ln \det(I_d - S\bar{\Theta}S^T) + \frac{1}{2} \nu^T [S\bar{\Theta}S^T(I_d - S\bar{\Theta}S^T)^{-1}] \nu \\ \qquad [\text{by Lemma A.3}] \\ = h^T \mu + \frac{1}{2} \mu^T H \mu - \frac{1}{2} \ln \det(I_d - P) \\ + \frac{1}{2}[H\mu + h]^T \bar{\Theta}^{1/2} (I_d - P)^{-1} \bar{\Theta}^{1/2} [H\mu + h] \quad [\text{plugging in } S \text{ and } \nu]. $$

It is immediately seen that the concluding quantity in this chain is nothing but the right hand side quantity in (A.20). $\square$
### A.7.2. Proof of Proposition 4.2.i

1.0. Let us prove (4.11.a). By Lemma A.2 (see (A.22)) applied with $\bar{\Theta} = \Theta_*$, setting $\mathcal{A}(u) = A[u; 1]$, we have

$$ 
\begin{aligned}
& \forall ((h, H) \in \mathcal{H}, G: 0 \le G \le \gamma^+ \Theta_*^{-1}, G \ge H, u \in \mathbf{R}^n : [u; 1][u; 1]^T \in \mathcal{Z}) : \\
& \quad \ln (\mathbf{E}_{\zeta \sim \mathcal{SG}(\mathcal{A}(u), \Theta_*)} \{e^{h^T \zeta + \frac{1}{2} \zeta^T H \zeta}\}) \le -\frac{1}{2} \ln \text{Det}(I - \Theta_*^{1/2} G \Theta_*^{1/2}) \\
& \quad \qquad + \frac{1}{2}[u; 1]^T B^T \left[ \left[ \frac{H}{h^T} \middle| \frac{h}{h^T} \right] + [H, h]^T [\Theta_*^{-1} - G]^{-1} [H, h] \right] B[u; 1] \\
& \quad \le -\frac{1}{2} \ln \text{Det}(I - \Theta_*^{1/2} G \Theta_*^{1/2}) \\
& \quad \qquad + \frac{1}{2} \phi_Z \left( B^T \left[ \left[ \frac{H}{h^T} \middle| \frac{h}{h^T} \right] + [H, h]^T [\Theta_*^{-1} - G]^{-1} [H, h] \right] B \right) \\
& = \Psi_{A, \mathcal{Z}}(h, H, G),
\end{aligned} 
\quad (A.24) $$

implying, due to the origin of $\Phi_{A,\mathcal{Z}}$, that under the premise of (A.24) we have

$$ \ln (\mathbf{E}_{\zeta \sim \mathcal{SG}(\mathcal{A}(u), \Theta_*)} \{e^{h^T \zeta + \frac{1}{2} \zeta^T H \zeta}\}) \le \Phi_{A, \mathcal{Z}}(h, H), \forall (h, H) \in \mathcal{H}. $$

Taking into account that when $\zeta \sim \mathcal{SG}(\mathcal{A}(u), \Theta)$ with $\Theta \in \mathcal{U}$, we have also $\zeta \sim \mathcal{SG}(\mathcal{A}(u), \Theta_*)$ due to $\Theta \preceq \Theta_*$, (4.11.a) follows.

2.0. Now let us prove (4.11.b). All we need is to verify the relation

$$ 
\begin{aligned}
& \forall ((h, H) \in \mathcal{H}, G, 0 \le G \le \gamma^+ \Theta_*^{-1}, H \le G, u \in \mathbf{R}^n : [u; 1][u; 1]^T \in \mathcal{Z}, \Theta \in \mathcal{U}) : \\
& \quad \ln (\mathbf{E}_{\zeta \sim \mathcal{SG}(\mathcal{A}(u), \Theta)} \{e^{h^T \zeta + \frac{1}{2} \zeta^T H \zeta}\}) \le \Psi_{A, \mathcal{Z}}^\delta(h, H, G; \Theta); \\
& \quad \le -\frac{1}{2} \ln \text{Det}(I - \Theta_*^{1/2} G \Theta_*^{1/2}) \\
& \quad \qquad + \frac{1}{2} \phi_Z \left( B^T \left[ \left[ \frac{H}{h^T} \middle| \frac{h}{h^T} \right] + [H, h]^T [\Theta_*^{-1} - G]^{-1} [H, h] \right] B \right)
\end{aligned} 
\quad (A.25) $$

with this relation at our disposal (4.11.b) can be obtained by the same argument as the one we used in item 1.0 to derive (4.11.a).

To establish (A.25), let us fix $h, H, G, u, \Theta$ satisfying the premise of (A.25); note that under the premise of Proposition 4.2.i, we have $0 \preceq \Theta \preceq \Theta_*$. Now let $\lambda \in (0, 1)$, and let $\Theta_\lambda = \Theta + \lambda(\Theta_* - \Theta)$, so that $0 \prec \Theta_\lambda \preceq \Theta_*$, and let $\delta_\lambda = \|\Theta_\lambda^{1/2} \Theta_*^{-1/2} - I\|$, so that $\delta_\lambda \in [0, 2]$. We have $0 \le G \le \gamma^+ \Theta_*^{-1} \le \gamma^+ \Theta_*^{-1}$ that is, $H, G$ satisfy (A.21) w.r.t. $\bar{\Theta} = \Theta_\lambda$. As a result, for our $h, G, H, u$ and the just defined $\bar{\Theta}$, relation (A.22) holds true:

$$ 
\begin{aligned}
\zeta &\sim \mathcal{SG}(\mathcal{A}(u), \Theta_\lambda) \Rightarrow \\
& \quad \ln (\mathbf{E}_\zeta \{e^{h^T \zeta + \frac{1}{2} \zeta^T H \zeta}\}) \le -\frac{1}{2} \ln \text{Det}(I - \Theta_\lambda^{1/2} G \Theta_\lambda^{1/2}) \\
& \quad + \frac{1}{2}[u; 1]^T B^T \left[ \left[ \frac{H}{h^T} \middle| \frac{h}{h^T} \right] + [H, h]^T [\Theta_\lambda^{-1} - G]^{-1} [H, h] \right] B[u; 1] \\
& \le -\frac{1}{2} \ln \text{Det}(I - \Theta_\lambda^{1/2} G \Theta_\lambda^{1/2}) \\
& \quad + \frac{1}{2} \phi_Z \left( B^T \left[ \left[ \frac{H}{h^T} \middle| \frac{h}{h^T} \right] + [H, h]^T [\Theta_\lambda^{-1} - G]^{-1} [H, h] \right] B \right)
\end{aligned} 
\quad (A.26) $$

(recall that $[u; 1][u; 1]^T \in \mathcal{Z}$). As a result,

$$ 
\begin{aligned}
\zeta &\sim \mathcal{SG}(\mathcal{A}(u), \Theta) \Rightarrow \ln (\mathbf{E}_{\zeta} \{e^{h^T \zeta + \frac{1}{2} \zeta^T H \zeta}\}) \le -\frac{1}{2} \ln \text{Det}(I - \Theta_{\lambda}^{1/2} G \Theta_{\lambda}^{1/2}) \\
& \quad + \frac{1}{2} \phi_Z \left( B^T \left[ \left[ \frac{H}{h^T} \middle| \frac{h}{h^T} \right] + [H, h]^T [\Theta_{\lambda}^{-1} - G]^{-1} [H, h] \right] B \right). 
\end{aligned} 
\quad (A.27) $$
When deriving (A.27) from (A.26), we have used that

— $\Theta \preceq \Theta_\lambda$, so that when $\zeta \sim SG(\mathcal{A}(u), \Theta)$, we have also $\zeta \sim SG(\mathcal{A}(u), \Theta_\lambda)$,

— $0 \preceq \Theta_\lambda \preceq \Theta_*$ and $G \prec \Theta_*$, whence $[\Theta_*^{-1} - G]^{-1} \preceq [\Theta_*^{-1} - G]^{-1}$,

— $\mathcal{Z} \subset \mathbf{S}_+^{n+1}$, whence $\phi_{\mathcal{Z}}$ is $\succeq$-monotone: $\phi_{\mathcal{Z}}(M) \le \phi_{\mathcal{Z}}(N)$ whenever $M \preceq N$.

By Lemma A.1 applied with $\Theta_\lambda$ in the role of $\Theta$ and $\delta_\lambda$ in the role of $\delta$, we have

$$ -\frac{1}{2} \ln \operatorname{Det}(I - \Theta_{\lambda}^{1/2} G \Theta_{\lambda}^{1/2}) \\ \leq -\frac{1}{2} \ln \operatorname{Det}(I - \Theta_{*}^{1/2} G \Theta_{*}^{1/2}) \\ + \frac{1}{2} \operatorname{Tr}([\Theta_{\lambda} - \Theta_{*}]G) + \frac{\delta_{\lambda}(2+\delta_{\lambda})}{2(1-\|\Theta_{*}^{1/2}G\Theta_{*}^{1/2}\|)} \|\Theta_{*}^{1/2}G\Theta_{*}^{1/2}\|_{F}^{2}. $$

Consequently, (A.27) implies that

$$ \begin{aligned} \zeta &\sim SG(\mathcal{A}(u), \Theta) \Rightarrow \\ &\ln \left( \mathbf{E}_{\zeta} \left\{ e^{h^T \zeta + \frac{1}{2} \zeta^T H \zeta} \right\} \right) \\ &\leq -\frac{1}{2} \ln \operatorname{Det}(I - \Theta_*^{1/2} G \Theta_*^{1/2}) + \frac{1}{2} \operatorname{Tr}([\Theta_\lambda - \Theta_*]G) \\ &\qquad + \frac{\delta_{\lambda}(2+\delta_{\lambda})}{2(1-\|\Theta_*^{1/2}G\Theta_*^{1/2}\|)} \|\Theta_*^{1/2}G\Theta_*^{1/2}\|_F^2 \\ &\qquad + \frac{1}{2} \phi_{\mathcal{Z}} \left( B^T \left[ \left[ \frac{H}{h^T} \middle| \frac{h}{h^T} \right] + [H, h]^T [\Theta_*^{-1} - G]^{-1} [H, h] \right] B \right). \end{aligned} $$

The resulting inequality holds true for all small positive $\lambda$; taking lim inf of the right hand side as $\lambda \to +0$, and recalling that $\Theta_0 = \Theta$, we get

$$ \begin{aligned} \zeta &\sim SG(\mathcal{A}(u), \Theta) \Rightarrow \\ &\ln \left( \mathbf{E}_{\zeta} \left\{ e^{h^T \zeta + \frac{1}{2} \zeta^T H \zeta} \right\} \right) \\ &\leq -\frac{1}{2} \ln \operatorname{Det}(I - \Theta_*^{1/2} G \Theta_*^{1/2}) + \frac{1}{2} \operatorname{Tr}([\Theta - \Theta_*]G) \\ &\qquad + \frac{\delta(2+\delta)}{2(1-\|\Theta_*^{1/2}G\Theta_*^{1/2}\|)} \|\Theta_*^{1/2}G\Theta_*^{1/2}\|_F^2 \\ &\qquad + \frac{1}{2} \phi_{\mathcal{Z}} \left( B^T \left[ \left[ \frac{H}{h^T} \middle| \frac{h}{h^T} \right] + [H, h]^T [\Theta_*^{-1} - G]^{-1} [H, h] \right] B \right) \end{aligned} $$

(note that under the premise of Proposition 4.2.i we clearly have $\liminf_{\lambda \to +0} \delta_\lambda \le \delta$). The right hand side of the resulting inequality is nothing but $\Psi_{A,\mathcal{Z}}^\delta(h, H, G; \Theta)$, see (4.10) and we arrive at the inequality required in the conclusion of (A.25).

3. To complete the proof of Proposition 4.2.i, it remains to prove that the functions $\Phi_{A,\mathcal{Z}}$, $\Phi_{A,\mathcal{Z}}^\delta$ possess the properties of continuity, convexity-concavity, and coerciveness announced in Proposition 4.2. Let us verify that this indeed is so for $\Phi_{A,\mathcal{Z}}^\delta$; reasoning to follow, with evident simplifications, is applicable to $\Phi_{A,\mathcal{Z}}$ as well.

Observe, first, that by exactly the same reasons as in item 4.0 of the proof of Proposition 4.1, the function $\Psi_{A,\mathcal{Z}}^\delta(h, H, G; \Theta)$ is real valued, continuous and convex-concave on the domain

$$ \hat{\mathcal{H}} \times \mathcal{Z} = \{(h, H, G) : -\gamma^+ \Theta_*^{-1} \preceq H \preceq \gamma^+ \Theta_*^{-1}, 0 \preceq G \preceq \gamma^+ \Theta_*^{-1}, H \preceq G\} \times \mathcal{Z}. $$

The function $\Phi_{A,\mathcal{Z}}^\delta(h, H; \Theta) : \mathcal{H} \times \mathcal{U} \to \mathbf{R}$ is obtained from $\Psi^\delta(h, H, G; \Theta)$ by the following two operations: we first minimize $\Psi_{A,\mathcal{Z}}^\delta(h, H, G; \Theta)$ over $G$ linked
to $(h, H)$ by the convex constraints $0 \preceq G \preceq \gamma^+\Theta_*^{-1}$ and $G \succeq H$, thus obtaining a function

$$ \bar{\Phi}(h, H; \Theta) : \underbrace{\{(h, H) : -\gamma^+\Theta_*^{-1} \preceq H \preceq \gamma^+\Theta_*^{-1}\}}_{\mathcal{H}} \times \mathcal{U} \rightarrow \mathbf{R} \cup \{+\infty\} \cup \{-\infty\}. $$

Second, we restrict the function $\bar{\Phi}(h, H; \Theta)$ from $\tilde{\mathcal{H}} \times \mathcal{U}$ onto $\mathcal{H} \times \mathcal{U}$. For $(h, H) \in \tilde{\mathcal{H}}$, the set of $G$'s linked to $(h, H)$ by the above convex constraints clearly is a nonempty compact set; as a result, $\bar{\Phi}$ is a real-valued convex-concave function on $\tilde{\mathcal{H}} \times \mathcal{U}$. From continuity of $\Psi_{A,Z}^{\delta}$ on its domain it immediately follows that $\Psi_{A,Z}^{\delta}$ is bounded and uniformly continuous on every bounded subset of this domain, implying by evident reasons that $\bar{\Phi}(h, H; \Theta)$ is bounded in every domain of the form $\bar{B} \times \mathcal{U}$, where $\bar{B}$ is a bounded subset of $\tilde{\mathcal{H}}$, and is continuous on $\bar{B} \times \mathcal{U}$ in $\Theta \in \mathcal{U}$ with properly selected modulus of continuity independent of $(h, H) \in \bar{B}$. Besides this, by construction, $\mathcal{H} \subset \text{int} \tilde{\mathcal{H}}$, implying that if $B$ is a convex compact subset of $\mathcal{H}$, it belongs to the interior of a properly selected convex compact subset $\bar{B}$ of $\tilde{\mathcal{H}}$. Since $\bar{\Phi}$ is bounded on $\bar{B} \times \mathcal{U}$ and is convex in $(h, H)$, the function $\bar{\Phi}$ is Lipschitz continuous in $(h, H) \in B$ with Lipschitz constant which can be selected to be independent of $\Theta \in \mathcal{U}$. Taking into account that $\mathcal{H}$ is convex and closed, the bottom line is that $\Phi_{A,Z}^{\delta}$ is not just a real-valued convex-concave function on the domain $\mathcal{H} \times \mathcal{U}$, it is also continuous on this domain.

Coerciveness of $\Phi_{A,Z}^{\delta}(h, H; \Theta)$ in $(h, H)$ is proved in exactly the same fashion as the similar property of function (4.5), see item 5⁰ in the proof of Proposition 4.1. The proof of item (i) of Proposition 4.2 is complete.

Item (ii) of Proposition 4.2 can be derived from item (i) of Proposition 4.2 in exactly the same fashion as Proposition 4.1.ii was derived from Proposition 4.1.i. □

### A.8. Proof of Proposition 4.3

Let us fix an input $x \in X$, and let $P$ be the corresponding distribution of $y^t$. Assuming that $x$ is a nuisance, at a given step $t$ a signal conclusion can take place only if there were $k$'s such that $\rho_{tk} < \infty$, and for some of these $k$'s it happened that $\phi_{tk\rho_{tk}}(y^t) < \alpha$. Invoking (4.18) with $\rho = \rho_{tk}$ and taking into account that $e_{tk}^{SV}(\rho_{tk}) = \varkappa$ whenever $\rho_{tk} < \infty$, we see that the $P$-probability of the event $\phi_{tk\rho_{tk}}(y^t) < \alpha$ is at most $e^{\alpha\varkappa} = \frac{\epsilon}{dK}$. Since there could be at most $K$ values of $k$ such that $\rho_{tk} < \infty$, in the situation under consideration the $P$-probability to terminate with the signal conclusion at step $t$ is at most $\epsilon/d$, and thus the $P$-probability of false alarm does not exceed $\epsilon$, as claimed.

Now assume that $x \in X$ is a signal of shape $k$ and magnitude $\ge \rho$, and that $\rho \ge \rho_{tk}$ for some $k$. The latter may happen only when $\rho_{tk} < \infty$, implying that the detector $\phi_{tk\rho_{tk}}(\cdot)$ was used at time $t$. Assuming that the procedure did not terminate at step $t$ with the signal conclusion, we should have $\phi_{tk\rho_{tk}}(y^t) \ge \alpha$, and invoking (4.19), we see that the $P$-probability of the outcome under consideration is at most $e^{-\alpha} \exp\{SV_{tk}(\rho_{tk})\} = e^{-\alpha} \varkappa = \sqrt{dK} \varkappa = \epsilon$. □
References

[1] M. Basseville and I. Nikiforov. *Detection of Abrupt Changes: Theory and Application*. Prentice-Hall, Englewood Cliffs, N.J., 1993. MR1210954

[2] E. Brodsky and B. S. Darkhovsky. *Nonparametric methods in change point problems*, volume 243. Springer Science & Business Media, 2013.
MR1228205

[3] Y. Cao, S. Zhu, Y. Xie, J. Key, J. Kacher, R. R. Unocic, and C. M. Rouleau. Sequential adaptive detection for in-situ transmission electron microscopy (tem). *arXiv preprint arXiv:1710.11297*, 2017.

[4] J. Chen and A. Gupta. *Parametric statistical change point analysis: with applications to genetics, medicine, and finance*. Boston: Birkhäuser, 2012.
MR3025631

[5] F. Enikeeva and Z. Harchaoui. High-dimensional change-point detection with sparse alternatives. *arXiv preprint arXiv:1312.1900*, 2013.

[6] G. Fellouris and G. Sokolov. Second-order asymptotic optimality in multisensor sequential change detection. *IEEE Transactions on Information Theory*, 62(6):3662–3675, 2016. MR3506755

[7] N. H. Gholson and R. L. Moose. Maneuvering target tracking using adaptive state estimation. *IEEE Transactions on Aerospace and Electronic Systems*, 13(3):310–317, 1977.

[8] A. Goldenshluger, A. Juditsky, and A. Nemirovski. Hypothesis testing by convex optimization. *Electronic Journal of Statistics*, 9(2):1645–1712, 2015.
MR3379005

[9] A. Goldenshluger, A. Juditsky, A. Tsybakov, and A. Zeevi. Change-point estimation from indirect observations. 1. minimax complexity. *Ann. Inst. Henri Poincare Probab. Stat.*, 44:787–818, 2008. MR2453845

[10] A. Goldenshluger, A. Juditsky, A. Tsybakov, and A. Zeevi. Change-point estimation from indirect observations. 2. adaptation. *Ann. Inst. H. Poincare Probab. Statist*, 44(5):819–836, 2008. MR2453846

[11] L. Gordon and M. Pollak. An efficient sequential nonparametric scheme for detecting a change of distribution. *The Annals of Statistics*, pages 763–804, 1994. MR1292540

[12] V. Guigues. Nonparametric multidimensional breakpoint detection for the mean and correlations of a discrete time stochastic process. *Journal of Nonparametric Statistics*, 24:857–882, 2012. MR2995481

[13] Y. I. Ingster, C. Pouet, and A. B. Tsybakov. Classification of sparse high-dimensional vectors. *Philosophical Transactions of the Royal Society of London A: Mathematical, Physical and Engineering Sciences*, 367(1906):4427–4448, 2009. MR2546395

[14] Y. I. Ingster and I. A. Suslina. On detection of a signal of known shape in multi-channel system. *Zapiski Nauchnykh Seminarov POMI*, 294:88–112, 2002. MR1976749

[15] Y. I. Ingster, A. B. Tsybakov, and N. Verzelen. Detection boundary in sparse regression. *Electron. J. Statist.*, 4:1476–1526, 2010. MR2747131
[16] A. Juditski and A. Nemirovski. On sequential hypotheses testing via convex optimization. *Automation and Remote Control*, 76:809–825, 2015. MR3374776

[17] A. Juditsky and A. Nemirovski. Hypothesis testing via affine detectors. *Electronic Journal of Statistics*, 10:2204–2242, 2016. MR3528713

[18] A. Korostelev and O. Lepski. On a multi-channel change-point problem. *Mathematical Methods of Statistics*, 17(3):187–197, 2008. MR2448945

[19] T. L. Lai. Sequential changepoint detection in quality control and dynamical systems. *Journal of the Royal Statistical Society. Series B (Methodological)*, pages 613–658, 1995. MR1354072

[20] T. L. Lai. Information bounds and quick detection of parameter changes in stochastic systems. *IEEE Transactions on Information Theory*, 44(7):2917–2929, 1998. MR1672051

[21] A. Lakhina, M. Crovella, and C. Diot. Diagnosing network-wide traffic anomalies. In *ACM SIGCOMM Computer Communication Review*, volume 34, pages 219–230. ACM, 2004.

[22] C. Lévy-Leduc and F. Roueff. Detection and localization of change-points in high-dimensional network traffic data. *The Annals of Applied Statistics*, pages 637–662, 2009. MR2750676

[23] K. Liu, R. Zhang, and Y. Mei. Scalable sum-shrinkage schemes for distributed monitoring large-scale data streams. *arXiv preprint arXiv:1603.08652*, 2016.

[24] G. Lorden. Procedures for reacting to a change in distribution. *The Annals of Mathematical Statistics*, pages 1897–1908, 1971. MR0309251

[25] E. Mazor, A. Averbuch, Y. Bar-Shalom, and J. Dayan. Interacting multiple model methods in target tracking: a survey. *IEEE Transactions on Aerospace and Electronic Systems*, 34(1):103–123, 1998.

[26] Y. Mei. Asymptotic optimality theory for decentralized sequential hypothesis testing in sensor networks. *IEEE Transactions on Information Theory*, 54(5):2072–2089, 2008. MR2450850

[27] G. V. Moustakides. Optimal stopping times for detecting changes in distributions. *The Annals of Statistics*, pages 1379–1387, 1986. MR0868306

[28] M. H. Neumann. Optimal change-point estimation in inverse problems. *Scandinavian Journal of Statistics*, 24(4):503–521, 1997. MR1615339

[29] E. Page. Continuous inspection schemes. *Biometrika*, 41(1/2):100–115, 1954. MR0088850

[30] M. Pollak. Optimal detection of a change in distribution. *The Annals of Statistics*, pages 206–227, 1985. MR0773162

[31] M. Pollak. Average run lengths of an optimal method of detecting a change in distribution. *The Annals of Statistics*, pages 749–779, 1987. MR0888438

[32] H. V. Poor and O. Hadjiliadis. *Quickest detection*, volume 40. Cambridge University Press Cambridge, 2009. MR2482527

[33] W. A. Shewhart. *Economic control of quality of manufactured product*. ASQ Quality Press, 1931.

[34] A. N. Shiryaev. On optimum methods in quickest detection problems. *Theory of Probability & Its Applications*, 8(1):22–46, 1963. MR0155708
[35] D. Siegmund. Sequential Analysis: Tests and Confidence Intervals. Springer Science & Business Media, 1985. MR0799155

[36] D. Siegmund and B. Yakir. The statistics of gene mapping. Springer Science & Business Media, 2007. MR2301277

[37] A. Tartakovsky, I. Nikiforov, and M. Basseville. Sequential analysis: Hypothesis testing and changepoint detection. CRC Press, 2014. MR3241619

[38] A. G. Tartakovsky and V. V. Veeravalli. Change-point detection in multi-channel and distributed systems. Applied Sequential Methodologies: Real-World Examples with Data Analysis, 173:339–370, 2004. MR2159163

[39] A. G. Tartakovsky and V. V. Veeravalli. Asymptotically optimal quick-est change detection in distributed sensor systems. Sequential Analysis, 27(4):441–475, 2008. MR2460208

[40] V. V. Veeravalli and T. Banerjee. Quickest change detection. Academic press library in signal processing: Array and statistical signal processing, 3:209–256, 2013.

[41] A. S. Willsky. Detection of abrupt changes in dynamic systems. Springer, 1985.

[42] Y. Xie and D. Siegmund. Sequential multi-sensor change-point detection. Annals of Statistics, 41(2):670–692, 2013. MR3099117