SlideShare a Scribd company logo
1 of 13
Download to read offline
Enhanced TaPR (eTaPR)
시계열 데이터 기반 이상 탐지의 정확도 평가 방법
2021. 8. 12.
황원석
hws23@nsr.re.kr
일반적인 이상 탐지의 정확도 평가
• 기존 정확도 실험 세팅
– 학습 데이터를 통해 학습
– 평가 데이터에서 이상 (anomaly)을 탐지
• 평가 데이터에는 다수의 anomaly가 포함됨
• 탐지 알고리즘들은 평가 데이터 중 anomaly의 위치를 예측 (prediction)함
• 탐지의 정확도 평가
– 전체 anomaly 중 탐지한 anomaly의 비율 (recall)
– 전체 prediction 중 탐지에 성공한 prediction의 비율 (precision)
2021-08-12 2
시계열 데이터 기반 이상 탐지 정확도 평가의 필요성
• 시계열 데이터가 아닌 경우 (이진 분류나 정보 검색 상황의 경우)
– Anomaly는 탐지되거나, 탐지되지 않은 경우 밖에 없음
– Prediction은 탐지에 성공하거나, 실패한 경우 밖에 없음
• 시계열 데이터의 경우
– Anomaly는 일부 범위만 탐지될 수 있음
– Prediction은 일부 범위만 탐지에 성공할 수 있음
• 시계열 데이터의 anomaly/prediction은 범위 (range)이기 때문
2021-08-12 3
시계열 데이터 기반 이상 탐지의 특징
• 시계열 데이터에서 anomaly는 범위인 이유
– 특정 이벤트 (예, 사이버 공격, 사기 등)로 인해, 일정 시간 동안 동일한 패턴을 지닌 데이터 발생
– 이 시간 동안 수집된 데이터는 동일한 anomaly로 간주됨
• 탐지 시스템의 prediction도 범위로 간주하는 이유
– 사용자의 입장에서는 연속적인 prediction은 하나의 prediction과 동일하게 인식됨
2021-08-12 4
Time
1 9 9 9 9 9 …
An intrusion event (anomaly)
2 1 2 1 2 1 2 1 2 1
An observed value at 𝑡1
Regarding the range (𝑡7 - 𝑡11) as an anomaly
𝑡1 𝑡7 𝑡11
범위에 대한 평가 시 고려할 사항 (아이디어 1)
• Anomaly의 일부 범위만 탐지된 경우
– 가정: 사람은 주어진 prediction을 분석하여 anomaly를 찾고자 노력함
– Anomaly가 얼마나 쉽게 탐지될 수 있는지 평가 (아이디어 1)
• Anomaly의 일정 범위 이상을 알면, 사람이 전체 범위를 찾을 수 있음 (𝑎2와 𝑎3은 발견될 가능성이 높음)
– 일정 이상의 범위가 탐지된 anomaly에게만 점수 부여
– 범위의 임계값은 파라미터 (𝜃𝑟)로 결정
• Anomaly의 더 많은 범위를 알수록 발견하기 쉬워짐 (𝑎2 보다 𝑎3가 사람이 찾기 쉬움)
– 탐지한 범위에 비례하여 점수 결정
2021-08-12 5
𝑎1 𝑎2 𝑎3
𝑝1 𝑝2 𝑝3
A prediction range
An anomaly range
Time
Hard to be detect Likely to be detect More likely to be detect
범위에 대한 평가 시 고려할 사항 (아이디어 2)
• Prediction의 일부 범위만 탐지에 성공한 경우
– 가정: 사람은 prediction 범위 중 정상이 포함되어 있더라도 prediction의 전체 범위를 확인함
– Prediction이 탐지에 성공하였는지 평가 (아이디어 2)
• Prediction의 일정 범위 이상만 탐지에 성공해도 사람에게 유용한 정보가 됨 (𝑝2와 𝑝3는 탐지에 유용)
– 일정 이상의 범위만 탐지에 성공한 prediction에게만 점수 부여
– 범위의 임계값은 파라미터 (𝜃𝑝)로 결정
• Prediction의 더 많은 범위가 탐지에 성공할수록 이를 통해 더 쉽게 anomaly 탐지 가능 (𝑝2 보다 𝑝3가 더 유용)
– 탐지에 성공한 범위에 비례하여 점수 결정
2021-08-12 6
𝑎1 𝑎2 𝑎3
𝑝1 𝑝2 𝑝3
A prediction range
Time
An anomaly range
Useless to detect Useful to detect More useful to be detect
범위에 대한 평가 시 고려할 사항 (아이디어 3)
• 최종적으로 탐지에 실패한 경우 평가
– 탐지에 성공한 경우만 점수를 받아야 함
– 아이디어 1과 2만 고려하면 탐지에 실패한 경우도 점수를 받을 수 있음
• Prediction을 통해 찾은 anomaly는 없지만, 이 prediction은 탐지에 성공한 것으로 평가 가능 (𝑝1과 𝑎1)
• 탐지에 실패한 prediction을 통해 anomaly가 탐지된 것으로 평가 가능 (𝑝2과 𝑎2)
• 탐지의 성공 여부는 prediction과 anomaly를 모두 봐야 함 (아이디어 3)
– 범위가 아닌 경우, prediction이 탐지에 성공하면, 탐지된 anomaly가 무조건 존재하므로 이 아이디어가
필요 없음
2021-08-12 7
𝑎1 𝑎2
𝑝1 𝑝2
Time
𝑎1을 탐지하기엔 𝑝1이 너무 적은 범위를 탐지하여 탐지에 실패함
아이디어 2만 고려하면 𝑝1이 탐지에 성공한 것으로 보임
𝑝2의 대부분 범위가 탐지에 실패함
아이디어 1만 고려하면 𝑎2가 탐지에 성공한 것으로 보임
범위에 대한 평가 시 고려할 사항 (아이디어 3)
• 최종적으로 탐지에 실패한 경우 평가
– 가정: 사람은 prediction를 분석하여 anomaly를 찾게 됨
– Prediction을 통해 찾은 anomaly는 없지만, 아이디어 2에 의해, 이 prediction은 탐지에 성공한 것으로 평가 가능
• 𝑎1는 일부 범위만이 탐지되어 탐지되지 않은 것으로 평가 (Idea 1에 따름)
• 𝑝1의 결과 탐지된 것이 없으므로 실패로 간주하는 것이 옳음
– 탐지에 실패한 prediction을 통해 anomaly가 탐지된 것으로 평가
• 𝑝2는 일부 범위만이 탐지에 성공하여 탐지에 실패한 것으로 평가 (Idea 2에 따름)
• 𝑝2가 도움되지 않기 때문에 𝑎2도 실패한 것으로 간주하는 것이 옳음
• 탐지의 성공 여부는 prediction과 anomaly를 모두 봐야 함 (아이디어 3)
– 범위가 아닌 경우, prediction이 탐지에 성공하면, 탐지된 anomaly가 무조건 존재하므로 이 아이디어가 필요 없음
2021-08-12 8
𝑎1 𝑎2
𝑝1 𝑝2
Time
탐지 실패:
𝑎1을 탐지하기엔 𝑝1이 너무 적은 범위를 탐지함
탐지 실패:
𝑝2의 대부분 범위가 탐지에 실패함
• 짧은 prediction보다 긴 prediction이 탐지에 실패했을 때 더 큰 감점이 필요 (아이디어 4)
– 사람이 anomaly를 찾기 위해 prediction이 지목한 긴 시간 동안 시스템에 문제가 없는지 확인해야 함
• 사람에게는 더 많은 노력이 필요
• 반면, anomaly의 길이는 고려할 필요 없음
– 예를 들어, 사이버 공격의 길이에 비례하여 그 영향이 크다고 할 수 없음
2021-08-12 9
범위에 대한 평가 시 고려할 사항 (아이디어 4)
제안하는 평가 척도
• Enhanced Time-series aware Recall (eTaR)
– 평가 데이터의 모든 anomaly가 평균적으로 탐지될 가능성을 의미
– 아이디어 1 + 3
• Enhanced Time-series aware Precision (eTaP)
– 탐지 알고리즘의 모든 prediction이 평균적으로 옳을 가능성을 의미
– 아이디어 2 + 3 + 4
• eTaF1
– eTaP와 eTaR의 조화 평균
– 대회 성적은 이 점수에 의해 결정됨
2021-08-12 10
• 아이디어 1, 2는 다음 논문 참고
– W.-Hwang et al. “Time-Series Aware Precision and Recall for Anomaly Detection: Considering Variety of
Detection Result and Addressing Ambiguous Labeling,” In Proc. of CIKM, pp. 2241-2244, 2019.
• eTaPR은 상기 논문에서 제안한 방법의 문제점을 아이디어 3, 4를 추가하여 개선한 버전
2021-08-12 11
참고
사용 방법
• Python whl 파일 설치
– 명령: python -m pip install eTaPR-[version]-py3-none-any.whl
• 실행 방법
– TaPR_pkg.etapr.evaluate_haicon(anomalies: list, predictions: list) -> dict
• anomalies: 각 단위 시각의 데이터가 정상이면 0, 비정상이면 1로 표현된 list
• predictions: 각 단위 시각의 데이터가 정상으로 예측되면 0, 비정상으로 예측되면 1로 표현된 list
• 반환되는 dict에서 ‘tar’, ‘tap’, ‘f1’에 결과가 저장되어 있음
– 예:
result = TaPR_pkg.etapr.evaluate_w_streams(anomalies_list, predictions_list)
result[‘tar’], result[‘tap’], result[‘f1’]
2021-08-12 12
• Precision 과 recall은 널리 사용되는 평가 방법 중 하나
• Precision 과 recall은 다양한 공격을 탐지 하였는지 평가하는데 부적합
– 방법 2는 가장 긴 시간 동안 영향을 준 공격 𝑎1만을 탐지하였으나, 높은 점수를 받음
2021-08-12 13
참고: Precision 및 Recall을 사용하지 않는 이유
Method
Metric
Precision Recall
1 0.67 0.40
2 1.00 0.67

More Related Content

Similar to Introduction to e tapr for hai con -kor

Hyperparameter Tuning
Hyperparameter TuningHyperparameter Tuning
Hyperparameter TuningJon Lederman
 
Five Things I Learned While Building Anomaly Detection Tools - Toufic Boubez ...
Five Things I Learned While Building Anomaly Detection Tools - Toufic Boubez ...Five Things I Learned While Building Anomaly Detection Tools - Toufic Boubez ...
Five Things I Learned While Building Anomaly Detection Tools - Toufic Boubez ...tboubez
 
Evaluating algorithms using Item Response Theory
Evaluating algorithms using Item Response TheoryEvaluating algorithms using Item Response Theory
Evaluating algorithms using Item Response TheoryCSIRO
 
L7 method validation and modeling
L7 method validation and modelingL7 method validation and modeling
L7 method validation and modelingSeppo Karrila
 
Pattern recognition at scale anomaly detection in banking on stream data
Pattern recognition at scale anomaly detection in banking on stream dataPattern recognition at scale anomaly detection in banking on stream data
Pattern recognition at scale anomaly detection in banking on stream dataNUS-ISS
 
Getting better at detecting anomalies by using ensembles
Getting better at detecting anomalies by using ensemblesGetting better at detecting anomalies by using ensembles
Getting better at detecting anomalies by using ensemblesCSIRO
 
ARIMA Model for analysis of time series data.ppt
ARIMA Model for analysis of time series data.pptARIMA Model for analysis of time series data.ppt
ARIMA Model for analysis of time series data.pptREFOTDEBuea
 
PG STAT 531 Lecture 4 Exploratory Data Analysis
PG STAT 531 Lecture 4 Exploratory Data AnalysisPG STAT 531 Lecture 4 Exploratory Data Analysis
PG STAT 531 Lecture 4 Exploratory Data AnalysisAashish Patel
 
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptxMACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptxVijayalakshmi171563
 
PPT - Deep and Confident Prediction For Time Series at Uber
PPT - Deep and Confident Prediction For Time Series at UberPPT - Deep and Confident Prediction For Time Series at Uber
PPT - Deep and Confident Prediction For Time Series at UberJisang Yoon
 
The uncertainty of measurements
The uncertainty of measurementsThe uncertainty of measurements
The uncertainty of measurementserwin marlon sario
 
forecasting model
forecasting modelforecasting model
forecasting modelFEG
 
Anomalies! You can't escape them.
Anomalies! You can't escape them.Anomalies! You can't escape them.
Anomalies! You can't escape them.CSIRO
 
Barga Data Science lecture 9
Barga Data Science lecture 9Barga Data Science lecture 9
Barga Data Science lecture 9Roger Barga
 

Similar to Introduction to e tapr for hai con -kor (20)

Hyperparameter Tuning
Hyperparameter TuningHyperparameter Tuning
Hyperparameter Tuning
 
Five Things I Learned While Building Anomaly Detection Tools - Toufic Boubez ...
Five Things I Learned While Building Anomaly Detection Tools - Toufic Boubez ...Five Things I Learned While Building Anomaly Detection Tools - Toufic Boubez ...
Five Things I Learned While Building Anomaly Detection Tools - Toufic Boubez ...
 
Evaluating algorithms using Item Response Theory
Evaluating algorithms using Item Response TheoryEvaluating algorithms using Item Response Theory
Evaluating algorithms using Item Response Theory
 
L7 method validation and modeling
L7 method validation and modelingL7 method validation and modeling
L7 method validation and modeling
 
Data wrangling week 10
Data wrangling week 10Data wrangling week 10
Data wrangling week 10
 
lec21.VAE_1.pdf
lec21.VAE_1.pdflec21.VAE_1.pdf
lec21.VAE_1.pdf
 
Anomaly detection
Anomaly detectionAnomaly detection
Anomaly detection
 
Pattern recognition at scale anomaly detection in banking on stream data
Pattern recognition at scale anomaly detection in banking on stream dataPattern recognition at scale anomaly detection in banking on stream data
Pattern recognition at scale anomaly detection in banking on stream data
 
Getting better at detecting anomalies by using ensembles
Getting better at detecting anomalies by using ensemblesGetting better at detecting anomalies by using ensembles
Getting better at detecting anomalies by using ensembles
 
ARIMA Model.ppt
ARIMA Model.pptARIMA Model.ppt
ARIMA Model.ppt
 
ARIMA Model for analysis of time series data.ppt
ARIMA Model for analysis of time series data.pptARIMA Model for analysis of time series data.ppt
ARIMA Model for analysis of time series data.ppt
 
ARIMA Model.ppt
ARIMA Model.pptARIMA Model.ppt
ARIMA Model.ppt
 
PG STAT 531 Lecture 4 Exploratory Data Analysis
PG STAT 531 Lecture 4 Exploratory Data AnalysisPG STAT 531 Lecture 4 Exploratory Data Analysis
PG STAT 531 Lecture 4 Exploratory Data Analysis
 
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptxMACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
 
PPT - Deep and Confident Prediction For Time Series at Uber
PPT - Deep and Confident Prediction For Time Series at UberPPT - Deep and Confident Prediction For Time Series at Uber
PPT - Deep and Confident Prediction For Time Series at Uber
 
The uncertainty of measurements
The uncertainty of measurementsThe uncertainty of measurements
The uncertainty of measurements
 
forecasting model
forecasting modelforecasting model
forecasting model
 
Data cleaning-outlier-detection
Data cleaning-outlier-detectionData cleaning-outlier-detection
Data cleaning-outlier-detection
 
Anomalies! You can't escape them.
Anomalies! You can't escape them.Anomalies! You can't escape them.
Anomalies! You can't escape them.
 
Barga Data Science lecture 9
Barga Data Science lecture 9Barga Data Science lecture 9
Barga Data Science lecture 9
 

More from DACON AI 데이콘

20210728 대회주최 문의
20210728 대회주최 문의20210728 대회주최 문의
20210728 대회주최 문의DACON AI 데이콘
 
K-Fashion 경진대회 1등 수상자 솔루션
K-Fashion 경진대회 1등 수상자 솔루션K-Fashion 경진대회 1등 수상자 솔루션
K-Fashion 경진대회 1등 수상자 솔루션DACON AI 데이콘
 
K-Fashion 경진대회 2등 수상자 솔루션
K-Fashion 경진대회 2등 수상자 솔루션K-Fashion 경진대회 2등 수상자 솔루션
K-Fashion 경진대회 2등 수상자 솔루션DACON AI 데이콘
 
K-Fashion 경진대회 3등 수상자 솔루션
K-Fashion 경진대회 3등 수상자 솔루션K-Fashion 경진대회 3등 수상자 솔루션
K-Fashion 경진대회 3등 수상자 솔루션DACON AI 데이콘
 
아리랑 위성영상 AI 객체 검출 경진대회 2등 수상자 솔루션
아리랑 위성영상 AI 객체 검출 경진대회 2등 수상자 솔루션아리랑 위성영상 AI 객체 검출 경진대회 2등 수상자 솔루션
아리랑 위성영상 AI 객체 검출 경진대회 2등 수상자 솔루션DACON AI 데이콘
 
아리랑 위성영상 AI 객체 검출 경진대회 1등 수상자 솔루션
아리랑 위성영상 AI 객체 검출 경진대회 1등 수상자 솔루션아리랑 위성영상 AI 객체 검출 경진대회 1등 수상자 솔루션
아리랑 위성영상 AI 객체 검출 경진대회 1등 수상자 솔루션DACON AI 데이콘
 
진동데이터 활용 충돌체 탐지 AI 경진대회 2등
진동데이터 활용 충돌체 탐지 AI 경진대회 2등진동데이터 활용 충돌체 탐지 AI 경진대회 2등
진동데이터 활용 충돌체 탐지 AI 경진대회 2등DACON AI 데이콘
 
진동데이터 활용 충돌체 탐지 AI 경진대회 1등
진동데이터 활용 충돌체 탐지 AI 경진대회 1등진동데이터 활용 충돌체 탐지 AI 경진대회 1등
진동데이터 활용 충돌체 탐지 AI 경진대회 1등DACON AI 데이콘
 
포스트 코로나 데이터 시각화 경진대회 - 대상
포스트 코로나 데이터 시각화 경진대회 - 대상포스트 코로나 데이터 시각화 경진대회 - 대상
포스트 코로나 데이터 시각화 경진대회 - 대상DACON AI 데이콘
 
포스트 코로나 데이터 시각화 경진대회 - 최우수상
포스트 코로나 데이터 시각화 경진대회 - 최우수상포스트 코로나 데이터 시각화 경진대회 - 최우수상
포스트 코로나 데이터 시각화 경진대회 - 최우수상DACON AI 데이콘
 
포스트 코로나 데이터 시각화 경진대회 - 우수상
포스트 코로나 데이터 시각화 경진대회 - 우수상포스트 코로나 데이터 시각화 경진대회 - 우수상
포스트 코로나 데이터 시각화 경진대회 - 우수상DACON AI 데이콘
 
포스트 코로나 데이터 시각화 경진대회 - 장려상2
포스트 코로나 데이터 시각화 경진대회 - 장려상2포스트 코로나 데이터 시각화 경진대회 - 장려상2
포스트 코로나 데이터 시각화 경진대회 - 장려상2DACON AI 데이콘
 
포스트 코로나 데이터 시각화 경진대회 - 장려상
포스트 코로나 데이터 시각화 경진대회 - 장려상포스트 코로나 데이터 시각화 경진대회 - 장려상
포스트 코로나 데이터 시각화 경진대회 - 장려상DACON AI 데이콘
 
생체 광학 데이터 분석 AI 경진대회 10위 수상작
생체 광학 데이터 분석 AI 경진대회 10위 수상작생체 광학 데이터 분석 AI 경진대회 10위 수상작
생체 광학 데이터 분석 AI 경진대회 10위 수상작DACON AI 데이콘
 
생체 광학 데이터 분석 AI 경진대회 9위 수상작
생체 광학 데이터 분석 AI 경진대회 9위 수상작생체 광학 데이터 분석 AI 경진대회 9위 수상작
생체 광학 데이터 분석 AI 경진대회 9위 수상작DACON AI 데이콘
 

More from DACON AI 데이콘 (20)

20210728 대회주최 문의
20210728 대회주최 문의20210728 대회주최 문의
20210728 대회주최 문의
 
데이콘 뽀개기
데이콘 뽀개기데이콘 뽀개기
데이콘 뽀개기
 
Bittrader competition (1)
Bittrader competition (1)Bittrader competition (1)
Bittrader competition (1)
 
Bittrader competition
Bittrader competitionBittrader competition
Bittrader competition
 
Superbai
SuperbaiSuperbai
Superbai
 
K-Fashion 경진대회 1등 수상자 솔루션
K-Fashion 경진대회 1등 수상자 솔루션K-Fashion 경진대회 1등 수상자 솔루션
K-Fashion 경진대회 1등 수상자 솔루션
 
K-Fashion 경진대회 2등 수상자 솔루션
K-Fashion 경진대회 2등 수상자 솔루션K-Fashion 경진대회 2등 수상자 솔루션
K-Fashion 경진대회 2등 수상자 솔루션
 
K-Fashion 경진대회 3등 수상자 솔루션
K-Fashion 경진대회 3등 수상자 솔루션K-Fashion 경진대회 3등 수상자 솔루션
K-Fashion 경진대회 3등 수상자 솔루션
 
아리랑 위성영상 AI 객체 검출 경진대회 2등 수상자 솔루션
아리랑 위성영상 AI 객체 검출 경진대회 2등 수상자 솔루션아리랑 위성영상 AI 객체 검출 경진대회 2등 수상자 솔루션
아리랑 위성영상 AI 객체 검출 경진대회 2등 수상자 솔루션
 
아리랑 위성영상 AI 객체 검출 경진대회 1등 수상자 솔루션
아리랑 위성영상 AI 객체 검출 경진대회 1등 수상자 솔루션아리랑 위성영상 AI 객체 검출 경진대회 1등 수상자 솔루션
아리랑 위성영상 AI 객체 검출 경진대회 1등 수상자 솔루션
 
진동데이터 활용 충돌체 탐지 AI 경진대회 2등
진동데이터 활용 충돌체 탐지 AI 경진대회 2등진동데이터 활용 충돌체 탐지 AI 경진대회 2등
진동데이터 활용 충돌체 탐지 AI 경진대회 2등
 
진동데이터 활용 충돌체 탐지 AI 경진대회 1등
진동데이터 활용 충돌체 탐지 AI 경진대회 1등진동데이터 활용 충돌체 탐지 AI 경진대회 1등
진동데이터 활용 충돌체 탐지 AI 경진대회 1등
 
20200923
2020092320200923
20200923
 
포스트 코로나 데이터 시각화 경진대회 - 대상
포스트 코로나 데이터 시각화 경진대회 - 대상포스트 코로나 데이터 시각화 경진대회 - 대상
포스트 코로나 데이터 시각화 경진대회 - 대상
 
포스트 코로나 데이터 시각화 경진대회 - 최우수상
포스트 코로나 데이터 시각화 경진대회 - 최우수상포스트 코로나 데이터 시각화 경진대회 - 최우수상
포스트 코로나 데이터 시각화 경진대회 - 최우수상
 
포스트 코로나 데이터 시각화 경진대회 - 우수상
포스트 코로나 데이터 시각화 경진대회 - 우수상포스트 코로나 데이터 시각화 경진대회 - 우수상
포스트 코로나 데이터 시각화 경진대회 - 우수상
 
포스트 코로나 데이터 시각화 경진대회 - 장려상2
포스트 코로나 데이터 시각화 경진대회 - 장려상2포스트 코로나 데이터 시각화 경진대회 - 장려상2
포스트 코로나 데이터 시각화 경진대회 - 장려상2
 
포스트 코로나 데이터 시각화 경진대회 - 장려상
포스트 코로나 데이터 시각화 경진대회 - 장려상포스트 코로나 데이터 시각화 경진대회 - 장려상
포스트 코로나 데이터 시각화 경진대회 - 장려상
 
생체 광학 데이터 분석 AI 경진대회 10위 수상작
생체 광학 데이터 분석 AI 경진대회 10위 수상작생체 광학 데이터 분석 AI 경진대회 10위 수상작
생체 광학 데이터 분석 AI 경진대회 10위 수상작
 
생체 광학 데이터 분석 AI 경진대회 9위 수상작
생체 광학 데이터 분석 AI 경진대회 9위 수상작생체 광학 데이터 분석 AI 경진대회 9위 수상작
생체 광학 데이터 분석 AI 경진대회 9위 수상작
 

Recently uploaded

Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxSwapnil Therkar
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |aasikanpl
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Lokesh Kothari
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 sciencefloriejanemacaya1
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptMAESTRELLAMesa2
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )aarthirajkumar25
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PPRINCE C P
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfnehabiju2046
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxAArockiyaNisha
 
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfNAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfWadeK3
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bSérgio Sacani
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 

Recently uploaded (20)

Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
Boyles law module in the grade 10 science
Boyles law module in the grade 10 scienceBoyles law module in the grade 10 science
Boyles law module in the grade 10 science
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.ppt
 
Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )Recombination DNA Technology (Nucleic Acid Hybridization )
Recombination DNA Technology (Nucleic Acid Hybridization )
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdf
 
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptxPhysiochemical properties of nanomaterials and its nanotoxicity.pptx
Physiochemical properties of nanomaterials and its nanotoxicity.pptx
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfNAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 

Introduction to e tapr for hai con -kor

  • 1. Enhanced TaPR (eTaPR) 시계열 데이터 기반 이상 탐지의 정확도 평가 방법 2021. 8. 12. 황원석 hws23@nsr.re.kr
  • 2. 일반적인 이상 탐지의 정확도 평가 • 기존 정확도 실험 세팅 – 학습 데이터를 통해 학습 – 평가 데이터에서 이상 (anomaly)을 탐지 • 평가 데이터에는 다수의 anomaly가 포함됨 • 탐지 알고리즘들은 평가 데이터 중 anomaly의 위치를 예측 (prediction)함 • 탐지의 정확도 평가 – 전체 anomaly 중 탐지한 anomaly의 비율 (recall) – 전체 prediction 중 탐지에 성공한 prediction의 비율 (precision) 2021-08-12 2
  • 3. 시계열 데이터 기반 이상 탐지 정확도 평가의 필요성 • 시계열 데이터가 아닌 경우 (이진 분류나 정보 검색 상황의 경우) – Anomaly는 탐지되거나, 탐지되지 않은 경우 밖에 없음 – Prediction은 탐지에 성공하거나, 실패한 경우 밖에 없음 • 시계열 데이터의 경우 – Anomaly는 일부 범위만 탐지될 수 있음 – Prediction은 일부 범위만 탐지에 성공할 수 있음 • 시계열 데이터의 anomaly/prediction은 범위 (range)이기 때문 2021-08-12 3
  • 4. 시계열 데이터 기반 이상 탐지의 특징 • 시계열 데이터에서 anomaly는 범위인 이유 – 특정 이벤트 (예, 사이버 공격, 사기 등)로 인해, 일정 시간 동안 동일한 패턴을 지닌 데이터 발생 – 이 시간 동안 수집된 데이터는 동일한 anomaly로 간주됨 • 탐지 시스템의 prediction도 범위로 간주하는 이유 – 사용자의 입장에서는 연속적인 prediction은 하나의 prediction과 동일하게 인식됨 2021-08-12 4 Time 1 9 9 9 9 9 … An intrusion event (anomaly) 2 1 2 1 2 1 2 1 2 1 An observed value at 𝑡1 Regarding the range (𝑡7 - 𝑡11) as an anomaly 𝑡1 𝑡7 𝑡11
  • 5. 범위에 대한 평가 시 고려할 사항 (아이디어 1) • Anomaly의 일부 범위만 탐지된 경우 – 가정: 사람은 주어진 prediction을 분석하여 anomaly를 찾고자 노력함 – Anomaly가 얼마나 쉽게 탐지될 수 있는지 평가 (아이디어 1) • Anomaly의 일정 범위 이상을 알면, 사람이 전체 범위를 찾을 수 있음 (𝑎2와 𝑎3은 발견될 가능성이 높음) – 일정 이상의 범위가 탐지된 anomaly에게만 점수 부여 – 범위의 임계값은 파라미터 (𝜃𝑟)로 결정 • Anomaly의 더 많은 범위를 알수록 발견하기 쉬워짐 (𝑎2 보다 𝑎3가 사람이 찾기 쉬움) – 탐지한 범위에 비례하여 점수 결정 2021-08-12 5 𝑎1 𝑎2 𝑎3 𝑝1 𝑝2 𝑝3 A prediction range An anomaly range Time Hard to be detect Likely to be detect More likely to be detect
  • 6. 범위에 대한 평가 시 고려할 사항 (아이디어 2) • Prediction의 일부 범위만 탐지에 성공한 경우 – 가정: 사람은 prediction 범위 중 정상이 포함되어 있더라도 prediction의 전체 범위를 확인함 – Prediction이 탐지에 성공하였는지 평가 (아이디어 2) • Prediction의 일정 범위 이상만 탐지에 성공해도 사람에게 유용한 정보가 됨 (𝑝2와 𝑝3는 탐지에 유용) – 일정 이상의 범위만 탐지에 성공한 prediction에게만 점수 부여 – 범위의 임계값은 파라미터 (𝜃𝑝)로 결정 • Prediction의 더 많은 범위가 탐지에 성공할수록 이를 통해 더 쉽게 anomaly 탐지 가능 (𝑝2 보다 𝑝3가 더 유용) – 탐지에 성공한 범위에 비례하여 점수 결정 2021-08-12 6 𝑎1 𝑎2 𝑎3 𝑝1 𝑝2 𝑝3 A prediction range Time An anomaly range Useless to detect Useful to detect More useful to be detect
  • 7. 범위에 대한 평가 시 고려할 사항 (아이디어 3) • 최종적으로 탐지에 실패한 경우 평가 – 탐지에 성공한 경우만 점수를 받아야 함 – 아이디어 1과 2만 고려하면 탐지에 실패한 경우도 점수를 받을 수 있음 • Prediction을 통해 찾은 anomaly는 없지만, 이 prediction은 탐지에 성공한 것으로 평가 가능 (𝑝1과 𝑎1) • 탐지에 실패한 prediction을 통해 anomaly가 탐지된 것으로 평가 가능 (𝑝2과 𝑎2) • 탐지의 성공 여부는 prediction과 anomaly를 모두 봐야 함 (아이디어 3) – 범위가 아닌 경우, prediction이 탐지에 성공하면, 탐지된 anomaly가 무조건 존재하므로 이 아이디어가 필요 없음 2021-08-12 7 𝑎1 𝑎2 𝑝1 𝑝2 Time 𝑎1을 탐지하기엔 𝑝1이 너무 적은 범위를 탐지하여 탐지에 실패함 아이디어 2만 고려하면 𝑝1이 탐지에 성공한 것으로 보임 𝑝2의 대부분 범위가 탐지에 실패함 아이디어 1만 고려하면 𝑎2가 탐지에 성공한 것으로 보임
  • 8. 범위에 대한 평가 시 고려할 사항 (아이디어 3) • 최종적으로 탐지에 실패한 경우 평가 – 가정: 사람은 prediction를 분석하여 anomaly를 찾게 됨 – Prediction을 통해 찾은 anomaly는 없지만, 아이디어 2에 의해, 이 prediction은 탐지에 성공한 것으로 평가 가능 • 𝑎1는 일부 범위만이 탐지되어 탐지되지 않은 것으로 평가 (Idea 1에 따름) • 𝑝1의 결과 탐지된 것이 없으므로 실패로 간주하는 것이 옳음 – 탐지에 실패한 prediction을 통해 anomaly가 탐지된 것으로 평가 • 𝑝2는 일부 범위만이 탐지에 성공하여 탐지에 실패한 것으로 평가 (Idea 2에 따름) • 𝑝2가 도움되지 않기 때문에 𝑎2도 실패한 것으로 간주하는 것이 옳음 • 탐지의 성공 여부는 prediction과 anomaly를 모두 봐야 함 (아이디어 3) – 범위가 아닌 경우, prediction이 탐지에 성공하면, 탐지된 anomaly가 무조건 존재하므로 이 아이디어가 필요 없음 2021-08-12 8 𝑎1 𝑎2 𝑝1 𝑝2 Time 탐지 실패: 𝑎1을 탐지하기엔 𝑝1이 너무 적은 범위를 탐지함 탐지 실패: 𝑝2의 대부분 범위가 탐지에 실패함
  • 9. • 짧은 prediction보다 긴 prediction이 탐지에 실패했을 때 더 큰 감점이 필요 (아이디어 4) – 사람이 anomaly를 찾기 위해 prediction이 지목한 긴 시간 동안 시스템에 문제가 없는지 확인해야 함 • 사람에게는 더 많은 노력이 필요 • 반면, anomaly의 길이는 고려할 필요 없음 – 예를 들어, 사이버 공격의 길이에 비례하여 그 영향이 크다고 할 수 없음 2021-08-12 9 범위에 대한 평가 시 고려할 사항 (아이디어 4)
  • 10. 제안하는 평가 척도 • Enhanced Time-series aware Recall (eTaR) – 평가 데이터의 모든 anomaly가 평균적으로 탐지될 가능성을 의미 – 아이디어 1 + 3 • Enhanced Time-series aware Precision (eTaP) – 탐지 알고리즘의 모든 prediction이 평균적으로 옳을 가능성을 의미 – 아이디어 2 + 3 + 4 • eTaF1 – eTaP와 eTaR의 조화 평균 – 대회 성적은 이 점수에 의해 결정됨 2021-08-12 10
  • 11. • 아이디어 1, 2는 다음 논문 참고 – W.-Hwang et al. “Time-Series Aware Precision and Recall for Anomaly Detection: Considering Variety of Detection Result and Addressing Ambiguous Labeling,” In Proc. of CIKM, pp. 2241-2244, 2019. • eTaPR은 상기 논문에서 제안한 방법의 문제점을 아이디어 3, 4를 추가하여 개선한 버전 2021-08-12 11 참고
  • 12. 사용 방법 • Python whl 파일 설치 – 명령: python -m pip install eTaPR-[version]-py3-none-any.whl • 실행 방법 – TaPR_pkg.etapr.evaluate_haicon(anomalies: list, predictions: list) -> dict • anomalies: 각 단위 시각의 데이터가 정상이면 0, 비정상이면 1로 표현된 list • predictions: 각 단위 시각의 데이터가 정상으로 예측되면 0, 비정상으로 예측되면 1로 표현된 list • 반환되는 dict에서 ‘tar’, ‘tap’, ‘f1’에 결과가 저장되어 있음 – 예: result = TaPR_pkg.etapr.evaluate_w_streams(anomalies_list, predictions_list) result[‘tar’], result[‘tap’], result[‘f1’] 2021-08-12 12
  • 13. • Precision 과 recall은 널리 사용되는 평가 방법 중 하나 • Precision 과 recall은 다양한 공격을 탐지 하였는지 평가하는데 부적합 – 방법 2는 가장 긴 시간 동안 영향을 준 공격 𝑎1만을 탐지하였으나, 높은 점수를 받음 2021-08-12 13 참고: Precision 및 Recall을 사용하지 않는 이유 Method Metric Precision Recall 1 0.67 0.40 2 1.00 0.67