KDD Cup 2021で開催された時系列異常検知コンペ
Multi-dataset Time Series Anomaly Detection (https://compete.hexagon-ml.com/practice/competition/39/) に参加して
5位入賞した解法の紹介と上位解法の整理のための資料です.
9/24のKDD2021参加報告&論文読み会 (https://connpass.com/event/223966/) の発表資料です.
1. KDD Cup 2021
時系列異常検知コンペ
Multi-dataset Time Series Anomaly Detection
参加報告
産総研 / 三菱電機
吉村 玄太
2021-09-24
KDD2021 参加報告&論文読み会
This work is based on results obtained from a project, JPNP20006, commissioned by
the New Energy and Industrial Technology Development Organization (NEDO).
3. KDD Cup 2021
KDD Cupは1997年以降毎年開催されているデータ分析コンペ
25回目の今回は3課題
1. Multi-dataset Time Series Anomaly Detection
• 複数の単変量時系列から異常検知
• University of California, Riverside
2. City Brain Challenge
• 都市規模の交通シミュレーション環境上で
信号を制御して車両数を最大化
• Shanghai Jiao Tong University
3. Open Graph Benchmark Large-Scale Challenge (OGB-LSC)
• 大規模グラフの3タスク(node classification,
link prediction, graph regression)
• Stanford University
Genta Yoshimura KDD Cup 2021: Multi-dataset Time Series Anomaly Detection 3
4. 従来の時系列異常検知データセット※の問題点
“Current Time Series Anomaly Detection Benchmarks are Flawed
and are Creating the Illusion of Progress” と主張 [Wu+20]
1. Triviality:極めて単純なアルゴリズムで解ける
2. Mislabeling:明らかに間違った真値が散見される
Genta Yoshimura KDD Cup 2021: Multi-dataset Time Series Anomaly Detection 4
※ Yahoo, Numenta, NASA, OMNI, …
5. Multi-dataset Time Series Anomaly Detection
• 前述の問題点を軽減した時系列異常検知向けのデータセット
• 様々なドメインで収集された250種類の単変量時系列から成る
• 各時系列はそれぞれある既知の時点で前後に分割されている
• 前半=train:異常を1つも含まない
• 後半=test:異常区間を1つだけ含む
• 推定した異常位置が異常区間の真値の±100以内であれば正解
• 求)250時系列に対する正解率 (Accuracy) が高い
汎用的な時系列異常検知アルゴリズム
Genta Yoshimura KDD Cup 2021: Multi-dataset Time Series Anomaly Detection 5
6. 異常の例
• 異常の種類は様々
• 異常部位の長さも様々
Genta Yoshimura KDD Cup 2021: Multi-dataset Time Series Anomaly Detection 6
Source: 6位解法の説明動画
https://www.youtube.com/watch?v=aAtRv8fiXD4
14. 異常スコア関数
水色で塗った3種類の異常スコア関数について説明
(*) 最終日 (6/1) の投稿コードに追加したが締切のタイムゾーンが不明瞭だったため投稿できず
Genta Yoshimura KDD Cup 2021: Multi-dataset Time Series Anomaly Detection 14
No. Name Description
1 orig_p2p Peak-to-peak value of the original time series X (orig)
2 diff_p2p Peak-to-peak value of the 1st-order difference of X (diff)
3 acc_p2p Peak-to-peak value of the 2nd-order difference of X (acc)
4 orig_p2p_inv Inverse of peak-to-peak value of orig
5 diff_small Percentage of time when the absolute value of diff is small
6 acc_std Standard deviation of acc
7 acc_std_inv Inverse of standard deviation of acc
8 orig_mp_novelty Matrix Profile (AB-join) of orig
9 orig_mp_outlier Matrix Profile (self-join) of orig
10 orig_np_novelty Normalized Matrix Profile (AB-join) of orig
11 orig_np_outlier Normalized Matrix Profile (self-join) of orig
12 diff_large* Percentage of time when the absolute value of diff is large
13 diff_cross* Percentage of time when diff crosses zero
15. 例1.Peak-to-peak value
• 部分列の振幅
• Rolling max/minを用いて簡単に算出
• 3種類の時系列に対して算出
• 元の時系列 (orig)
• 1階差分 (diff)
• 2階差分 (acc)
Genta Yoshimura KDD Cup 2021: Multi-dataset Time Series Anomaly Detection 15
𝑓 𝑋𝑡:𝑡+𝑤 = max(𝑋𝑡:𝑡+𝑤) − min(𝑋𝑡:𝑡+𝑤)
𝑡 𝑇
𝑤
𝑋
𝑡0
𝑌
24. 参考文献
[Breunig+00]
Markus M. Breunig, et al.
"LOF: Identifying Density-Based Local Outliers.“
ACM SIGMOD 2000 (2000).
[Yeh+16]
Chin-Chia M. Yeh, et al.
"Matrix Profile I: All Pairs Similarity Joins for Time Series:
A Unifying View that Includes Motifs, Discords and Shapelets.“
IEEE ICDM 2016 (2016).
[Law+19]
Sean M. Law
"STUMPY: A Powerful and Scalable Python Library for Time Series Data Mining.“
Journal of Open Source Software (2019).
[Wu+20]
Renjie Wu, and Eamonn J. Keogh
"Current Time Series Anomaly Detection Benchmarks are Flawed and are Creating the Illusion of Progress.“
arXiv preprint arXiv:2009.13807 (2020).
[UCR]
The UCR Matrix Profile Page
https://www.cs.ucr.edu/~eamonn/MatrixProfile.html
Genta Yoshimura KDD Cup 2021: Multi-dataset Time Series Anomaly Detection 24