HAL Id: hal-02568715
https://hal.archives-ouvertes.fr/hal-02568715
Submitted on 10 May 2020
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.
Multi-scale streaming anomalies detection for time series
Ravi Kiran
To cite this version:
Ravi Kiran. Multi-scale streaming anomalies detection for time series. CAp 2017, Jun 2017, Grenoble, France. �hal-02568715�
Multi-scale streaming anomalies detection for time series
B Ravi Kiran Université Lille 3, CRIStAL, Lille, France
Streaming anomaly detection
I x (t ) are observations over time t where new data arrives over time t .
I Problem : Window x (t ) , [ t : t − p + 1 ] which “deviates” from normal behavior.
I Motivation : How to become invariant to the window-size/scale of pseudo-periodic structure in x (t ) ?
Streaming multi-scale Lag-matrix construction
X
tp= [ x
t, x
t−1, . . . , x
t−p+1]
T∈ R
pStreaming PCA
I Dimensionality reduction for time series lag embedding I Recursive update for principal subspace
I Linear Principal Component Analysis criterion : Given X
p∈ R
T×p, w
pis defined as 1-D projection capturing most of the energy of samples :
w
p= arg min
kwk=1P
Tt=1
k X
tp− (ww
T) X
tpk
2Multiscale streaming PCA
Algorithm 1 Streaming PCA
Initialization: w
j← 0, σ
j2← ϵ with ϵ 1
for t = 1, . . . , T do for j = 1 , . . . , J do
Z
tj← H
T2j
X
tjy
tj← w
TjZ
tjσ
j2← σ
j2+ (y
tj)
2e
jt← Z
tj− y
tjw
jw
j← w
j+ σ
j−2y
tje
jtZ H
tj← w
TjZ
tjw
jα
tj← k Z H
tj− Z
tjk
2end for
end for
return ααα ∈ R
T×JGiven x (t ) ∈ R for t = 1 : T I We evaluate the lag-matrix
X ∈ R
T×pwhere p = 2
j.
I For each X
t∈ R
pwe perform a change of basis Z
t: = Φ
TX
tI H refers to a unitary tx. that can . localize a deviation from the
local mean and variations.
. Preserve the variance.
I Haar transform Φ = H : H
2N=
√12"
H
N⊗ [ 1 , 1 ] I
N⊗ [ 1, − 1 ]
#
Hierarchical (Approximation) PCA
2j−1 2j−1 2j−1 2j−1 Future
wTj−1· wTj−1·wTj−1· wTj−1· wTj · wTj ·
wTj+1·
For scale p
j+1= 2p
j, a reduced lag matrix Z
tj+1is obtained by projection of each component of size p
jon the principal direction obtained at this scale, i.e. Z
tj+1= [ w
TjZ
tj, w
TjZ
jt−2j
]
Twith Z
t1= X
t1. The principal direc- tion is updated after this step.
Global flow
Input x
tX
t2j=1X
t2j=2X
t2j=JUpdate w
1Update w
2Update w
Jα
t1= k X
t1− X f
t1k
α
t2= k X
t2− X f
t2k
α
tJ= k X
tJ− X H
tJk
Norm k ααα
tk
22nd iteration k ααα H
t− ααα
tk
2Least corr. scale arg min
jP
i