Offline Change Detection under Contamination
Abstract
In this work, we propose a non-parametric and robust change detection algorithm to detect multiple change points in time series data under nonadversarial contamination.
The algorithm is designed for the offline setting, where the objective is to detect changes when all data are received.
We only make weak moment assumptions on the inliers (uncorrupted data) to handle a large class of distributions.
The robust scan statistic in the change detection algorithm is fashioned using mean estimators based on influence functions.
We establish the consistency of the estimated change point indexes as the number of samples increases, and provide empirical evidence to support the consistency results.
INTRODUCTION
Change point detection in time series data is the task of identifying changes in the underlying data generation model and can be traced back to the initial work of Page [1954, 1955] in the context of statistical process/quality control.
This simple and elegant framework has been deployed in diverse applications such as bioinformatics [Vert and Bleakley, 2010], finance [Pástor and Stambaugh, 2001, Pepelyshev and Polunchenko, 2017], climatology [Verbesselt et al., 2010], metric learning [Lajugie et al., 2014]; to name a few.
In addition to the inherent challenges in change point detection scenarios such as dealing with non-i i.d data [Tartakovsky, 2019] and heavy-tails [Fearnhead and Rigaill,
Bhatt et al., 2021], modern machine learning applications have to deal with the introduction of adversarial examples in the dataset [Kurakin et al., 2017, Jia and Liang, 2017].
Consider monitoring mean shifts in non-stationary processes using Wireless Sensor Networks (WSN)
[Akyildiz and Vuran, 2010, Cui and Xie, 2019].
The WSNs are used in a wide range of applications such as healthcare (EEG/ fMRI), environmental impact monitoring, energy consumption, etc.
In many of these applications, the sensors are deployed in harsh conditions, thereby increasing data corruption or erroneous readings during transmission.
Data from a collection of near-by sensors are logged for surveillance and event-classification.
This motivates the development of change detection algorithms in the offline setting [Aminikhanghahi and Cook, 2017, Truong et al., 2020] that can tackle all the above challenges in a systematic manner.
1.1 MAIN RESULTS
We propose a non-parametric change detection algorithm that can deal with non-i.i.d data, outliers, and a weak form of adversarial contamination to identify the change points in a consistent manner.
Specifically, we make the following contributions:
Non-parametric algorithms feature a key quantity known as scan statistic , for example CUSUM statistic of Page [1954], which is required to ‘scan’ the dataset to identify the change points.
We propose a scan statistic based on influence functions proposed by Catoni [2012] that can handle outliers and heavy-tails, to deal additionally with contamination.
We consider a contamination model, where the outliers (corrupted data) are correlated to each other and to inliers (uncorrupted data).
The inliers can also be correlated to one another.
The resulting robust non-parametric algorithm RC-Cat announces a change if the scan statistic exceeds a pre-specified threshold, provided the scan statistic is a local maximum.
This additional sophistication of local search methods was the introduced in Niu and Zhang [2012] and developed for the robust version in Li and Yu [2021], to mainly avoid overestimation of change points.
A natural way to theoretically evaluate change detec-
tion algorithms is to establish consistency of the estimated change point indexes as the number of samples increases.
In particular, we show that RC-Cat is consistent in the presence of contamination, i.e, as the number of data points n ↑ ∞ ,
[Equation]
where K is the number of true change points located at τ k , k ∈ { 1 , · · · , K } and (cid:98) K is the number of detected change points announced at (cid:98) τ k , k ∈ { 1 , · · · , (cid:98) K } , and w > 0 is parameter that related to the window length considered.
1.2 RELATED LITERATURE
Change detection methods are mainly classified studied in online and offline settings.
In the online setting, the aim is to detect changes as soon as they occur in real-time by optimizing an objective
that trades-off detection delay and false alarm; see Poor and Hadjiliadis [2008] for a detailed introduction and Xie et al.
[2021] for a survey of recent developments.
In contrast, in the offline setting, the changes need to be detected in a retrospective manner by ‘segmenting’ the entire dataset [Aminikhanghahi and Cook, 2017].
Here the objective is to design consistent algorithms and empirically validate using well-known metrics such as F1Score [de Bem et al., 2020],
Hausdorff metric
[Harchaoui and Lévy-Leduc, 2010], etc; see Truong et al.
[2020] for detailed overview of the methods and recent developments.
In the context of robust change detection, a common model of contamination that is considered to design algorithm is the
Huber contamination model [Huber, 1964].
In this model, the data generation model is a mixture model (1 − η ) F + ηQ , where F is the true distribution before the change and Q is any arbitrary distribution with a probability η .
Using such a model of contamination, Hušková [2013] make use of
M-estimation idea from robust statistics [Huber, 2004] to address the change point detection problem in the context of regression.
Fearnhead and Rigaill [2019] consider penalized M-estimation based procedure that can deal with outliers.
[Prasad et al., 2020] showed that Huber contamination model is equivalent to assuming a heavy-tailed noise for the i.i.d data.
In light of this, Yu and Chen [2022] propose a scan statistic based on U-statistics to deal with heavy-tailed noise distributions.
The setup and analysis considered in this work is closest to Li and Yu [2021], however, with the following key differences:
• Li and Yu [2021] consider change detection under i.i.d data.
While this is a useful starting point, it only serves as a crude approximation when the data is gathered from heterogeneous sources [Mercier et al., 2008] and is in general non-i.i.d [Tartakovsky, 2019].
• The scan statistics is fashioned using the robust estimator (RUME) in Prasad et al.
RUME uses half of the samples to identify the shortest interval containing at least (1 − η ) n fraction of the points, and then the remaining half of the points is used to return an estimate of the mean.
While this is acceptable in the case of robust mean estimation, it has clear disadvantages in the context of change point detection, where the initial segregation might hide/ remove the true change points.
Another feature of RUME is that the amount of contamination that the estimator can handle is limited, and this limits the applicability in many applications.
In contrast, our algorithm deals with non-i.i.d inliers and contamination, where the inliers only have a bounded second moment.
Also, unlike Li and Yu
], we do not segregate the data for robust mean estimation, which avoids the problem of loosing change points
MEAN ESTIMATION UNDER CONTAMINATION
In this section, we propose a robust mean estimator that can deal with non-i.i.d data with arbitrary contamination.
The estimator is based on influence functions proposed in Catoni [2012] and Catoni and Giulini [2017].
Let { X t } nt =1 be a collection of real-valued random variables.
Let F 0 denote the trivial sigma algebra, and let F t denote the sigmaalgebra generated by the set { X 1 , X 2 , · · · , X t } , whence X t is F t − measurable.
Let [ n ] := { 1 , 2 , · · · , n } .
C1.
The set { X t } t ∈ [ n ] is such that the (unknown) conditional expected value
[Equation]
C2.
The conditional second moment of X t is bounded, i.e, for a known M > 0 ,
[Equation]
It is easy to see that i.i.d is a special case that satisfies
C1 and C2 .
However, the model allows for more general dependencies, see Seldin et al.
2.1 CONTAMINATION MODEL
We assume that for some corruption rate 0 < η < 1 , an adversary may change at most ηk of any sub-sequence of { X t } t ∈ [ n ] with length k at least k ≥ k 0 , to arbitrary values.
The resulting set of observations will be (cid:101) X 1 , (cid:101) X 2 , · · · , (cid:101) X n , so that sup
i
[Equation] [Equation]
k ] k (cid:88)
[Equation]
where I ( · ) denotes the indicator function and k ≥ k 0 with k 0 being a fixed integer such that k 0 = Ω(log n ) .
The task is to estimate the true mean µ :=
1 n (cid:80) ni
=1 µ i based on the observations (cid:101) X 1 , (cid:101)
X 2 , · · · , (cid:101) X n .
This contamination model is widely-studied in machine learning for i.i.d data; see Charikar et al.
[2017], Hopkins and Li [2018], Lugosi and Mendelson [2021] and the related references for existing results.
The contamination model is similar to I ∪ O model of Lecué and Lerasle [2019] and also shares similarities with the Huber contamination model
[Huber, 1964].
While the contamination can be arbitrary, we do not allow the possibility where the adversary corrupts a fraction of the sample possibly with the knowledge of the whole dataset to intentionally hide the change points, i.e, the contamination is weakly adversarial .
Remark .
The well known Huber contamination model in change detection [Li and Yu, 2021] is a special case of the considered adversarial model.
Let ϵ ∈
[0 , 1] denote the outlier distribution probability in the Huber contamination model, i.e, the data is generated as (1 − ϵ ) P + ϵQ , where P is the true distribution and Q is any arbitrary distribution.
Let the empirical fraction (cid:98)
[Equation]
X i + j (cid:1) .
According to Proposition B.1 in Bhatt et al.
[2022b], with probability at least 1 − β , we have for all k
[Equation]
ϵ,k ) .
Fix k 0 > c log( n/β ) and set [Equation]
Clearly, for all k ≥ k 0 , we have the corruption fraction (cid:98) ϵ n to be at most η with a very high probability.
2.2 MEAN ESTIMATION WITH INFLUENCE FUNCTIONS
The idea of using influence functions for robust mean estimation is not new [Huber, 2004].
However these M-estimators are unable to scale gracefully with dimension [Maronna, 1976, Donoho and Gasko, 1992], and Prasad et al.
[2020] show that the bias scales polynomially with dimension.
This led to the development of a class of M-estimators introduced by Catoni [2012] that can be used to obtain dimension-free bounds in the vector settings [Catoni and Giulini, 2017].
With a similar future objective in mind, we make use of the influence functions proposed in these works to fashion a robust estimator that has minimax optimal asymptotic bias in the contamination parameter when the data sequence is more general than i.i.d .
Consider a non-decreasing function ψ : R → R such that − log [Equation] + [Equation]
[Equation]
≤
[Equation]
≤
[Equation]
+
[Equation]
+ [Equation] [Equation] ) for all x ∈ R as in Catoni [2012].
One can choose such a function that is bounded: specifically, we assume that for some 0 < A < ∞ ,
[Equation]
x ∈
[Equation]
From Catoni [2012], the narrowest possible choice for the influence function has A = log 2 , and is given by
[Equation]
We consider an estimator based on soft-truncation after rescaling, defined by
[Equation]
where α > 0 is a re-scaling parameter, and the uncontaminated version is given as
[Equation]
In the absence of contamination, depending on the choice of ψ ( · ) and α , the estimator (5) can closely approximate the empirical mean; see Holland [2019] for example.
Similar estimator for i.i.d data was considered in Holland [2019], where the deviation bounds were characterized using wellknown PAC
Bayesian inequalities inspired by DonskerVaradhan’s variational formula [Catoni, 2004, Dupuis and
Ellis, 2011].
However, since the data are not i.i.d in our case, we need a different approach to characterize the deviations, and this is the main contribution of this section.
Theorem 1.
Consider a collection of random variables { (cid:101) X t } t ∈ [ n ] .
Let α = (cid:115)
[Equation]
(cid:17) and δ ∈ (0 , 1) .
The estimator (4) satisfies
[Equation]
with probability at least 1 − δ .
A high-probability deviation bound for (cid:98) µ , i.e, in the absence of contamination is first characterized as a function of α , whence we obtain
[Equation]
From (2), we have the following relation
[Equation]
This provides the deviation bound of the overall softtruncation estimator (4).
Corollary 2.
Let B > 1 .
Under the assumptions as in
Theorem 1 such that (6) holds, we have with probability at
[Equation]
where c 20 := 2 A (1 /B + 2) .
Corollary 2 obtains the deviation purely in terms of the contamination fraction, and will be useful later in establishing the consistency of change detection algorithms.
Another useful feature is that it informs the choice of segmentation window length that guarantees a tight deviation characterization.
From (6), it is clear that there is an asymptotic ( n ↑ ∞ ) bias of O ( √M η ) associated with the estimator owing to contamination.
Also, when µ t ∈ [0 , 1] with a possibly heavy tail martingale difference noise– a common assumption in bandits [Lattimore and Szepesvári, 2020] and reinforcement learning [Agarwal et al., 2019]– the deviation bound and hence the bias can be written in terms of the (conditional) variance σ 2 as O ( σ √ η ) by using the standard C r inequality 1 .
This matches the minimax lower bound [Diakonikolas et al., 2017, Hopkins and Li, 2018] that is shown to be information theoretically optimal.
However, in general, as the deviation (6) depends on the non-centered moment, it is sensitive to the location of the distribution.
Catoni and Giulini [2017] propose a ‘shiftingdevice’ approach to obtain centered estimates that can be used to obtain a deviation bound in terms of the conditional variance.
This has been used for PAC-Bayesian analysis using influence functions in Holland [2019].
Theorem 3.
Consider the set of r.vs { (cid:101)
X t } t ∈ [ n ] such that µ t = µ, ∀ t .
Additionally, let V denote an upper bound on conditional variance of the uncontaminated random variables.
Let 0 < k < n denote the length of the data to create a shifting device.
Let α
[Equation]
with ϑ k = (cid:114) 2 M (cid:16) log(2 /
[Equation]
k + 2 Aη (cid:17) .
The estimator (4) satisfies |
[Equation]
with probability at least 1 − δ .
Theorem 3 provides a deviation bound as a function of the conditional variance.
When the contamination level η is negligible, a judicious choice of k will lessen the dependence on the raw moments, and the conditional variance in the deviation term Theorem 3 works to combat sensitivity to the distribution location.
A procedure to obtain an estimator having the deviation bound as in (8) is given as follows: i.)
Shifting-Device: Let { (cid:101)
X i } ki =1 denote a sub-set of the collection.
Compute a soft-truncated estimate using these k samples,
[Equation]
where ¯ α is informed by Theorem 1. ii.)
Shift the remaining n − k samples by ¯ µ η , i.e, (cid:101)
X
′ i
= (cid:101)
X i − ¯ µ η , whence the conditional second moment of this data is now bounded by ( V + ϑ 2 k ) .
Computing the soft-truncated estimate of this data
[Equation]
where α ′ is informed by Theorem 3. iii.)
Estimator (cid:98) µ η = µ ′ η + ¯ µ η has the desired properties.
OFFLINE CHANGE DETECTION
In the rest of the paper, we assume that the contamination model used by the adversary is as in (1).
We first provide an algorithm based on the robust estimation techniques discussed in Sec.2.2, and later establish the theoretical properties of the algorithm.
Algorithm 1 is an offline robust change detection algorithm that can handle η fraction of weakly adversarial contamination when the data is not necessarily i.i.d.
The methodology is inspired by Niu and Zhang [2012] and Li and Yu [2021], which handle the uncontaminated and weak contamination situations respectively.
Algorithm 1 is an intuitive solution that combines local and global search methods in a non-parametric manner to identify the change points.
It works as follows:
The dataset is scanned using the scan statistic S w ( · ) , which is the absolute difference between the robust estimates of mean over specified length w .
Here the estimator over length w > 0 ,
[Equation]
with one possible choice of ψ ( · ) given by (3).
The nature of the (non-parametric) scan statistic, where normalized estimates of equal length of samples are compared, is wellstudied in the literature.
For example, Cao et al.
[2019] make use of similar ideas for empirical means of independent sub-gaussian distributions to detect changes in the mean in multi-armed bandit problems, while Niu and Zhang [2012]
( RC
Cat ) 1: Input: { (cid:101) X } ni =1 , b ( threshold ) > 0 , 2 w ( window ) > 0 , η ∈ (0 , 1) , λ
≥2: L ← ∅ , G ← ∅ 3: for j ∈ { w + 1 , · · · , n − w } do 4:
S w ( j ) ← (cid:12)(cid:12)(cid:12) Ψ (cid:16) { (cid:101)
X i } j + w i =
j +1 (cid:17) − Ψ (cid:16) { (cid:101)
X i } j − 1 i =
j − w (cid:17)(cid:12)(cid:12)(cid:12) 5: end for 6: for j ∈ { λw + 1 , · · · , n − λw } do 7: if j is a λw − local maximizer of S w ( j ) then 8:
L ← L ∪ { j } 9: end if 10: end for 11: for k ∈ L do 12: if S w ( k ) > b then 13:
G ← G ∪ { k } 14: end if 15: end for 16: Output: G consider an application in bioinformatics.
The robust scan statistic is closest to that in Li and Yu [2021], except with a few key differences: (i)
There is no sample splitting to estimate the location parameter using RUME [Prasad et al., 2020].
In Li and Yu [2021], the data over w/ 2 is used to simply identify a high-confidence interval, and the remaining w/ 2 portion is used to calculate the robust mean.
This not only increases the variance of the estimator, but also may hide/ remove change points depending on which of w/points is selected.
This affects the detection delay and hence the consistency.
(ii) The worst case computational complexity of RC-Cat is O ( nw ) , whereas the worst case complexity in case of Li and Yu [2021] is O ( n 2 w log( w )) .
Here the w log( w ) is from ranking the data to find the shortest interval involved in RUME.
Note that the state-of-the-art methods such as penalized bi-weight loss methods have a computational complexity of O ( n 3 )
[Fearnhead and Rigaill, 2019, Corollary 2].
The λw − local maximizer is inspired by Niu and Zhang [2012] and also appears in Li and Yu [2021].
S w ( j ) is a h − local maximizer if S w ( j ) ≥ S w ( k ) for all k ∈ ( j − h, j + h ) , and is motivated by two key ideas: (i)
It helps to avoid overestimating the number of change points.
(ii) It helps to localize change points with a high probability.
3.1 ANALYSIS
RC-Cat is a computationally appealing solution to offline change detection.
In this section, we establish that it is consistent as well, i.e, as the number of data samples increase, the regime changes are identified within a prescribed margin with a high probability.
We need to make a few standard assumptions to enable this result.
Let K be the number of true change points located at τ k , k ∈ { 1 , · · · , K } with τ 0 = 0 and τ K +1 = n .
Let (cid:98) K be the number of detected change points announced at (cid:98) τ k , k ∈ { 1 , · · · , (cid:98) K } by RC-Cat .
Let the collections be denoted as K := { τ 1 , · · · , τ K } and (cid:98) K :
= { (cid:98) τ 1 , (cid:98) τ 2 , · · · , (cid:98) τ (cid:98) K } respectively.
Let the minimal spacing be denoted as δ =
min k ∈K | τ k +1 − τ k | and the jump size be denoted as θ =
min
k ∈K | µ τ k +1 − µ τ k | .
A1.
The conditional expectation in C1 is constant between change points, i.e, for k ∈ { 1 , 2 , · · · , K + 1 } µ t = µ τ k
[Equation]
A2.
The minimal spacing δ > λw for some λ ≥ 2 .
A3.
The jump size θ > √ 3 b , where b is the threshold.
A2 essentially says that the process has slow changes and
A3 is related to detectability.
The assumptions A2 and A are intuitive and standard in the change detection literature [Niu and Zhang, 2012, Cao et al., 2019, Yu, 2020, Li and Yu, 2021], while A1 simplifies exposition.
While these conditions are necessary for characterizing the theoretical properties, deviations from these assumptions do not drastically affect the empirical performance.
A1 can be relaxed to allow small perturbations between change points for the conditional expectation, and the same analysis carries over.
Theorem 4.
Let { (cid:101)
X i } i ∈ [ n ] be the collection of r.vs input to RC-Cat .
Let the threshold b = 2 c
√M η .
Under assumptions A1 - A3 , there is a constant c 1 > 0 such that
[Equation] [Equation]
Theorem 4 shows that for large dataset, RC-Cat identifies the change points or the segments to within specified tolerance with a high probability.
In other words, as n ↑ ∞ , we have that
[Equation]
Due to the nature of the robust estimator used in the scan statistic, RC-Cat can handle data from heterogeneous sources and non-i.i.d as specified by C1 and C2 .
Corollary 5.
Let K = ∅ .
Under the same assumptions as in Theorem 4, there is a constant c 1 > 0 such that
[Equation]
Corollary 5 says that when K = ∅ , the proposed algorithm
RC-Cat is still consistent, and provides an upper bound on the false detection probability.
PROOFS OF MAIN RESULTS
In this section, we provide the proofs of the main results.
The proof of Theorem 1 builds on the standard martingale analysis Freedman [1975], Seldin et al.
[2012] to establish the bounds for bounded functions of real-valued random variables.
The key idea is to make use of the fact that the influence function ψ ( · ) is bounded by logarithmic functions, and to construct a supermartingale as a function of ψ ( · ) .
The result then follows using Markov’s inequality.
The proof of Theorem 4 closely follows Niu and Zhang [2012], but under weaker assumptions on the data and the parameters.
Also, in comparison with Li and Yu [2021], for a fixed confidence δ , RC-Cat achieves consistency even over smaller sized datasets.
4.1 PROOF OF THEOREM
Before establishing the result, we will first characterize the high-probability deviation bound for the robust estimator in the absence of contamination as a function of α .
This is given as Lemma 6.
A similar proof idea can be also found in Bhatt et al.
[2022a].
Lemma 6.
Let the set of r.vs { X t } t ∈ [ n ] satisfy C1 and C2 .
For α > 0 and δ ∈ (0 , 1) , the estimator (5) satisfies with probability at least 1 − δ
[Equation]
Proof.
For any t ≤ n , we have the following using the upper bound on the influence function ψ ( · ) ,
[Equation]
Using the fact that 1 + x ≤ e x for all x ∈ R , we have using C
[Equation]
Construct a sequence of random variables Y t as follows: Y
= 1 and for t ≥ 1 ,
[Equation]
Clearly, E (cid:104)
Y t (cid:12)(cid:12)(cid:12) F t − 1 (cid:105) ≤
Y t − 1 as Y t − 1 is F t − 1 measurable
and (10) holds.
We have that the unconditional expectation
E [ Y n ] ≤ E [ Y 1 ] ≤ · · · ≤ E [ Y 0 ] = 1 .
Recursively, Y n is expressed as
[Equation]
= exp (cid:16) n (cid:98) µ
[Equation]
α(cid:17)(cid:17) .
Here (cid:98) µ is given as in (5) and µ = 1 n (cid:80) nt =1 µ t .
By Markov’s inequality, we have that
[Equation]
In other words, we have that
[Equation]
Dividing by nα gives the deviation in one direction.
Using the lower bound on the influence function, we have that
[Equation]
Analogous arguments establish the deviation of the estimator (cid:98) µ in the other direction, whence
[Equation]
The result follows.
From (2), we have the following relation
[Equation]
From (6) and (11), we have with probability at least 1 − δ ,
[Equation]
The main result holds by setting α .
4.2 PROOF OF COROLLARY
From Theorem 1, we have with probability at least 1 − δ | (cid:98)
[Equation]
By choosing n ≥ BAη log(2 /δ ) , we have the result.
4.3 PROOF OF THEOREM
The proof is established using the following reasoning.
Let T :=
{ x : | x − τ k | > w, ∀ k ∈ K} denote the set of all points that are at least w − away from the true change points.
Consider the following events,
[Equation]
Here E 1 ( x ) captures the events that false detection was not raised, E 2 ( y ) captures all the events when the algorithm raised a detection, and E n captures the event that detection was raised only around the region where the true changes occurred.
The result holds if we establish two relations
On event E n , we have
[Equation]
We begin by characterizing the probability of each event as separate results to highlight the assumptions required, and the main result follows from Lemmas 7-9.
Lemma 7.
Let { (cid:101)
X i } i ∈ [ n ] be a collection that is input to
RC-Cat .
Let the threshold b = 2 c 0 √M η .
For x ∈ T , we have under assumption
A
[Equation]
Proof.
As x ∈ T , by definition there is no change point in the interval [ x − w, x + w ] .
Consider the random variables { (cid:101)
X i } x + w i = x − w .
Let µ x denote the mean of the segment.
Let Ψ( { (cid:101)
X i } x − 1 i = x − w ) and Ψ( { (cid:101)
X i } x + w i = x +1 )
define the scan statistic in RC-Cat .
By Corollary 2, we have using w ≥ BAη log(4 /δ ) ,
[Equation]
each with probability at least 1 − δ/ 2 .
Therefore, the event E 1 ( x ) occurs with probability at least 1 − δ .
Indeed, by triangle inequality
[Equation]
The result holds.
Lemma 8.
Let { (cid:101)
X i } i ∈ [ n ] be a collection that is input to
RC-Cat .
Let the threshold b = 2 c
√M η .
Let assumptions A1 - A3 hold.
For y ∈ K , we have
P ( S w ( y ) > b ) ≥ 1 − δ.
Proof.
For any k , consider y =
τ k .
By assumption A1 and
A2 , we have that the segment { (cid:101)
X i }
τ k + w i =
τ k +1 has mean µ τ k and the segment { (cid:101)
X i }
τ k − 1 i =
τ k − w has mean µ τ k − 1 .
For simplicity, we abuse the notation and denote Ψ( { (cid:101)
X i }
τ k + w i = τ k +1 ) :
= Ψ 1 , and Ψ( { (cid:101) X i }
τ
k − 1 i = τ
k − w ) :
= Ψ 2 .
We have using the inequality ( x + y ) 2 ≥ x 2 / 2 − y 2 for any x, y ∈ R ,
[Equation]
≥
[Equation]
By Corollary 2, we have using w ≥ BAη log(4 /δ ) ,
(cid:12)(cid:12)(cid:12)(cid:16) Ψ 1 − µ
[Equation]
k (cid:17)(cid:12)(cid:12)(cid:12) 2 ≤ b 2 / 4 , (cid:12)(cid:12)(cid:12)(cid:16) Ψ
[Equation]
− µ
[Equation]
k − 1 (cid:17)(cid:12)(cid:12)(cid:12) 2 ≤ b 2 / 4 , each with probability at least 1 − δ/ 2 .
The result follows using assumption A3 .
Lemma 9.
Let the threshold b = 2 c 0 √M η .
Let assumptions A1 - A3 hold.
On event E n , we have { (cid:98) K = K } & max
[Equation]
Moreover, P ( E cn ) → 0 .
Proof.
First, note that (cid:98) τ k ∈ T c , ∀ k ∈ (cid:98) K by definition of T , where (cid:98)
τ k are the change points detected by RC-Cat .
Therefore, we have that
[Equation]
By assumption A2 , we have that there are no other change points in this interval.
Next, we show that there is a change point identified in the interval ( τ k − w, τ k + w ) .
Let λ The intervals Ω
+ :=
( τ k + w, τ k +( λ +1) w ) & Ω − :=
( τ k − w, τ k − ( λ +1) w ) are contained in T by definition and A2 .
This implies that on every x ∈ Ω + ∪ Ω − , the event E 1 ( x ) holds with the corresponding scan statistic S w ( x ) < b .
However, by
Lemma 8 we have S w ( τ k ) > b .
This implies that there is a local maximum, say (cid:98) τ k ∈ ( τ k − w, τ k + w ) , and
S w ( (cid:98) τ k ) ≥ S w ( τ k ) > b .
Using union bound, we have
[Equation]
From Lemma 7 and Lemma 8, we have the trivial upper bound
P
[Equation]
The result holds by choosing δ = 1 n c 1+1 for c 1 > 0 .
4.4 PROOF OF COROLLARY
Let [ m ] := { t : w + 1 ≤ t ≤ n − w } .
As K = ∅ , we have that the event
E n = ∩ x ∈ [ m ] E 1 ( x ) has a probability lower bound using Lemma 7 as
P ( E n ) ≥ 1 − nδ, where δ = 1 n c 1+1 for c 1 > 0 .
4.5 PROOF OF THEOREM
The soft-truncation of k samples as ¯ µ η obtains from Theorem 1, the deviation bound
[Equation]
with probability at least 1 − δ/ 2 .
For the shifted data (cid:101) X ′ i
= (cid:101)
X i − ¯ µ η note that E [ (cid:101) X ′ 2 |F ] ≤
( V + ϑ 2 k ) .
So the softtruncation estimate of shifted data obtains from Theorem 1, the deviation bound
[Equation]
with probability at least 1 − δ/ 2 .
Defining µ ′ η := (cid:98) µ η − ¯ µ η , the result follows with probability 1 − δ as both high-probability events should hold.
NUMERICAL RESULTS
In this section, we provide numerical results to illustrate the performance of Algorithm 1.
Our main objective is to provide empirical evidence to support the consistency results.
5.1 SYNTHETIC DATA
We assume that the adversary/ nature replaces the original data with samples generated from random distributions.
The algorithm parameters for all the figures in Figure 1 are chosen as follows.
The inlier distributions are modeled as
[Equation]
where ζ t is a martingale difference noise.
From Theorem 3, the choice of w is given as w ≥ BAη log(4 /δ ) for a confidence level δ = 0 .
01 , B = 2 , and A = log 2 .
The value µ t ≤ 3 , ∀ t , obtaining a bound M = 10 for unit variance.
There is a trade-off between false detection and nodetection for different choices of b informed by Theorem 3.
For good performance, we recommend setting smaller than that informed by theory and increasing the neighbourhood width λ for local search and elimination.
For Fig.1, λ =was chosen.
5.2 COMPARISON WITH ARC METHOD
In this section, we compare our method with a recent stateof-art method, the ARC algorithm
[Li and Yu, 2021].
Specifically, we examine the robustness of proposed method and
ARC under three different contamination settings.
(Setting 1) Pareto contamination .
The inliers follow studentt distribution with degree of freedom 3.
Outliers follow pareto distribution with degree freedom
[Figure]
(Setting 2)
One-sided arbitrary contamination .
The inliers follow student-t distribution with degree of freedom 3.
Outliers are fixed at 100.
(Setting 3)
Two-sided arbitrary contamination .
The inliers follow student-t distribution with degree of freedom 3.
Outliers are fixed at 100 or -100.
The total time horizon T is fixed at 1500 , the confidence level δ = 0 .
01 , A = log(2) , B = 2 , M = 5 , the true mean is in the range, − 3 ≤ µ t ≤ 3 and two underlying change points equally spaced between [0 , T ] .
We consider varying the following tuning parameter.
The contamination rate η ∈ { 5% , 10% , 20% , 30% , 40% } .
Window size w ∈ { 80 , 100 , 120 } .
Average differences (i.e., average of | ˆ τ k − τ k | ’s) between detected time and true change points are reported.
To be fair (without deliberately tuning threshold b ), for both methods, the detected change points are chosen to be time stamps with top two S w ( k ) values.
Based on the Tables 1 - 3, we can find that the proposed method is robust to different contamination level, while
ARC method is not.
Especially when we increase contami-
Setting
[Table] [Table]
[Table]
nation rate η to 40 %, ARC behaves much worse.
Moreover, our method is also less sensitive to the choices of window size than ARC method.
These results indicate that RC-Cat is indeed a better method.
5.3 REAL-WORLD DATA
We consider two real data sets in this subsection, the welllog data Jeremias [2018], Fearnhead and Rigaill [2019], Li and Yu [2021] which has been widely studied in the existing literature and PM2.5 index data URL [2018] which has not been considered in the literature.
Well-log data set contains 4050 measurements of nuclear magnetic response during the drilling of a well.
Majority of the observations behave very well and a small proportion of the observations are far away from the mean value.
PM2.5 index data set records air quality of Hong Kong during 1-Jan 2014 to 2-Feb-2022.
The PM2.5 index fluctuates occasionally over the total period of time.
From Figure 2, we can see that the proposed method
RC-Cat can well detect the jump points in well-log data and is very robust to those outliers.
Our method can also capture the fluctuations of Hong Kong PM2.5 index.
[Figure]
the experiment, we choose tuning parameters b η
2 and λ
CONCLUSION
In this work, we provided a robust change detection algorithm based on influence functions that can deal with a fraction of arbitrary but weakly adversarial contamination.
Key contributions to the vast literature on robust offline change detection methods include: (i)
The ability to handle non-i.i.d data along with contamination.
(ii) A computationally appealing algorithm that is consistent.
The algorithm itself is intuitive, and combines local search methods to segment the dataset.
This work motivates change detection in multi-variate datasets, possibly in the presence of contamination, motivated by the appealing aspect of obtaining dimension-free robust estimation in high-dimension using influence functions; see Catoni and Giulini [2017].