논문 해설
An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework
강화학습과 시계열 포레스트 기반 프레임워크를 이용한 전력 소비의 비지도 이상 탐지
- 연구 문제 라벨이 드문 시계열 이상 탐지에서 상황에 맞는 비지도 AD 모델을 고르는 문제를 다룹니다.
- 연구 방법 여섯 개 후보 AD 모델의 예측 정오를 TSF로 분류하고, DQN 에이전트가 TSF 신호와 일부 ground truth 라벨 기반 보상으로 매 시점 모델을 선택합니다.
- 주요 결과 실제 데이터에서 정밀도 0.977과 F1 0.727을 보였고, 합성 데이터에서는 F1 0.989로 KNN 다음 성능을 보였습니다. 결과는 데이터와 설정에 따라 달라집니다.
라벨이 부족한 시계열 이상 탐지의 문제
시계열 이상 탐지는 전력 계측, 사이버 공격, 금융 사기처럼 여러 분야에서 쓰이지만 실제 현장에서는 이상 라벨을 대량으로 얻기 어렵습니다. 원문은 라벨이 드물고 비싸며, 이상이 여러 형태로 나타나기 때문에 한 가지 가정에 기반한 AD 모델이 특정 이상 유형에는 민감하지만 다른 유형은 놓칠 수 있다고 설명합니다. 이 연구는 이 두 문제를 함께 다루며, 라벨에 전적으로 의존하지 않으면서 상황에 맞는 비지도 AD 모델을 시점마다 고르는 방법을 목표로 합니다. 연구 대상은 시간별 전력 소비 데이터이며, 실제 데이터와 합성 데이터에서 검증합니다.
RLAD의 구성: TSF 분류기와 DQN 선택기
제안 방법은 RLAD라고 부르는 강화학습 기반 모델 선택 프레임워크입니다. 후보 풀에는 KNN, COPOD, ECOD, OSVM, IForest, USAD 여섯 개의 비지도 AD 모델이 있으며, 각 모델은 정상 데이터로 학습한 뒤 테스트 구간의 이상 점수와 경험적 임계값으로 예측 라벨을 냅니다. 각 AD 모델에 대응하는 여섯 개의 TSF는 그 모델의 예측이 정답과 일치하는지(1)와 불일치하는지(0)를 분류합니다. DQN 에이전트는 이상 점수, 임계값, 예측 라벨, 두 신뢰 점수를 상태로 받아 매 시간 단계에서 여섯 모델 중 하나를 고르며, 선택된 모델의 라벨이 최종 예측이 됩니다. 원문은 할인율을 1로 두고 상태 전이를 시계열 순서에 따른 결정론적 전이로 가정합니다.

Figure 1 : Illustration of the Proposed Framework
원문 · CC BY 4.0 · Jihan Ghanim, Mariette Awad · An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.라벨 일부를 쓰는 보상 함수
보상 함수는 선택된 AD 모델의 TP, TN, FP, FN 결과에 점수를 부여합니다. 원문은 테스트 데이터의 약 80%에서는 TSF가 예측한 클래스 라벨을 기준으로, 나머지 20%에서는 ground truth 라벨을 기준으로 보상을 계산한다고 설명합니다. 원래 보상은 rTN=0.5, rTP=1, rFN=-3, rFP=-1.5로 정의되며, TP 보상을 TN보다 크게 두고 FN 페널티를 FP보다 크게 둡니다. 이는 이상을 놓치는 비용이 거짓 경보보다 크다는 실세계 가정에 따른 설계입니다. 이 라벨 사용 범위는 TSF 학습과 보상 계산에 공유되는 20% 라벨 조건이며, 전체 이상 데이터의 30%를 넘지 않도록 제한된다고 원문은 밝힙니다.
실제 및 합성 데이터에서의 비교 결과
실제 데이터는 LEAD1.0의 부분집합이고 합성 데이터는 독일 주거 지역 전력 소비 데이터에 약 5%의 이상을 무작위로 주입한 것입니다. 합성 데이터에서 KNN은 정밀도, 재현율, F1 score가 모두 1이며, 제안 방법은 정밀도 1, 재현율 0.977, F1 score 0.989로 KNN 다음입니다. 실제 데이터에서 제안 방법은 정밀도 0.977과 F1 score 0.727을 보고하며, 같은 표의 KNN 재현율 0.702보다 제안 방법의 재현율 0.579는 낮습니다. 따라서 실제 데이터의 F1과 정밀도에서 우수하다는 결과는 재현율 전체의 우위를 뜻하지 않습니다. LLM 기반 비교에서는 ChatGPT4o-mini에 사고 연쇄 프롬프트를 적용한 합성 데이터 결과가 F1 0.913으로 보고되며, 본문의 재현율 0.84와 표 5의 재현율 0.83이 서로 다르게 적혀 있습니다.

Table 1 : Performance of AD Candidate models on the synthetic anomalous dataset.
원문 · CC BY 4.0 · Jihan Ghanim, Mariette Awad · An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework · 원문 그림 인용 · 원본 PDF 12쪽에서 그림 영역을 추출했습니다.
Figure 2 : Template for the prompt strategy for the LLM to perform an AD task
원문 · CC BY 4.0 · Jihan Ghanim, Mariette Awad · An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework · 원문 그림 인용 · 원본 PDF 13쪽에서 그림 영역을 추출했습니다.
Table 5 : Performance of the LLM-based AD model on the synthetic dataset in comparison of the pro- posed RLAD model selection framework.
원문 · CC BY 4.0 · Jihan Ghanim, Mariette Awad · An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework · 원문 그림 인용 · 원본 PDF 13쪽에서 그림 영역을 추출했습니다.보상 함수와 탐색 설정의 영향
원문은 원래 보상 함수를 감쇠 탐색 epsilon과 함께 쓸 때 실험 전체에서 가장 좋은 전체 성능을 보였다고 보고합니다. DQN 탐색 비율은 기본값 0.1 대신 0.7로 설정되었고 seed는 1입니다. 합성 데이터 학습은 600,000 시간 단계, 실제 데이터 학습은 3,000,000 시간 단계로 수행되었습니다. 상수 보상 R1과 R2에서 F1 score는 0.738과 0.718로 떨어졌고, 적응형 보상 AdapInc와 AdapDec는 감쇠 탐색 조건에서 각각 0.981과 0.833을 보였습니다. 이 결과는 합성 데이터와 해당 DQN 설정에서 얻은 것이며, 다른 데이터나 탐색 설정으로 일반화되지 않습니다.

Figure 3 : Adaptive Increasing Reward
원문 · CC BY 4.0 · Jihan Ghanim, Mariette Awad · An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.
Figure 4 : Adaptive Decreasing Reward
원문 · CC BY 4.0 · Jihan Ghanim, Mariette Awad · An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.
Table 9 : Results of the Performance of the Proposed RL Framework for AD Model Selection on Differ- ent Constant Reward Functions Using the Synthetic Dataset.
원문 · CC BY 4.0 · Jihan Ghanim, Mariette Awad · An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework · 원문 그림 인용 · 원본 PDF 17쪽에서 그림 영역을 추출했습니다.
Table 10 : Results of the Performance of the Proposed RL Framework for AD Model Selection on Different Reward Functions Using the Synthetic Dataset.
원문 · CC BY 4.0 · Jihan Ghanim, Mariette Awad · An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework · 원문 그림 인용 · 원본 PDF 18쪽에서 그림 영역을 추출했습니다.이상 유형별 평가와 한계
이상 유형 실험에서는 global, local, clustered 이상을 각각 주입한 프랑스 데이터 기반 데이터셋을 사용했고 주입 비율은 2%입니다. 제안 방법의 F1 score는 global 0.962, local 0.931, clustered 0.963이며, KNN은 1, 0.99, 0.965로 나타났습니다. 원문은 KNN과 IForest를 제외한 나머지 모델이 local과 global 이상에서 낮은 성능을 보였다고 설명합니다. 저자들은 제안 방법이 TSF 분류가 완전하지 않아 일부 경우 성능이 다소 낮아진다고 해석합니다. 따라서 이 결과는 TSF 정확도에 따라 달라질 수 있는 조건부 결과이며, 모든 이상 유형에서 KNN보다 나은 방법이라는 뜻이 아닙니다.

Table 11 : Results of each of the TSFs on their corre- sponding testing set having global anomalous sliding windows from the France dataset.
원문 · CC BY 4.0 · Jihan Ghanim, Mariette Awad · An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework · 원문 그림 인용 · 원본 PDF 18쪽에서 그림 영역을 추출했습니다.
Table 13 : Results of each of the TSFs on their cor- responding testing set having clustered anomalous sliding windows from the France dataset.
원문 · CC BY 4.0 · Jihan Ghanim, Mariette Awad · An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework · 원문 그림 인용 · 원본 PDF 19쪽에서 그림 영역을 추출했습니다.
Table 14 : Results of the AD Models on Different Anomaly Types.
원문 · CC BY 4.0 · Jihan Ghanim, Mariette Awad · An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework · 원문 그림 인용 · 원본 PDF 19쪽에서 그림 영역을 추출했습니다.논문 정보
- 저자
- Jihan Ghanim, Mariette Awad
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2024년 12월 30일
- 등록일
- 2026년 11월 6일
- 수정일
- 2024년 12월 30일
- 버전
- v1
- arXiv
- 2501.00107
- 분류
- cs.LG · cs.AI
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
Anomaly detection (AD) plays a crucial role in time series applications, primarily because time series data is employed across real-world scenarios. Detecting anomalies poses significant challenges since anomalies take diverse forms making them hard to pinpoint accurately. Previous research has explored different AD models, making specific assumptions with varying sensitivity toward particular anomaly types. To address this issue, we propose a novel model selection for unsupervised AD using a combination of time series forest (TSF) and reinforcement learning (RL) approaches that dynamically chooses an AD technique. Our approach allows for effective AD without explicitly depending on ground truth labels that are often scarce and expensive to obtain. Results from the real-time series dataset demonstrate that the proposed model selection approach outperforms all other AD models in terms of the F1 score metric. For the synthetic dataset, our proposed model surpasses all other AD models except for KNN, with an impressive F1 score of 0.989. The proposed model selection framework also exceeded the performance of GPT-4 when prompted to act as an anomaly detector on the synthetic dataset. Exploring different reward functions revealed that the original reward function in our proposed AD model selection approach yielded the best overall scores. We evaluated the performance of the six AD models on an additional three datasets, having global, local, and clustered anomalies respectively, showing that each AD model exhibited distinct performance depending on the type of anomalies. This emphasizes the significance of our proposed AD model selection framework, maintaining high performance across all datasets, and showcasing superior performance across different anomaly types.
원문 인용
Jihan Ghanim, Mariette Awad (2024). An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework. arXiv:2501.00107v1. https://arxiv.org/abs/2501.00107v1
BibTeX
@misc{ghanim2024unsupervised,
title = {{An Unsupervised Anomaly Detection in Electricity Consumption Using Reinforcement Learning and Time Series Forest Based Framework}},
author = {Jihan Ghanim and Mariette Awad},
year = {2024},
eprint = {2501.00107},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2501.00107v1}
}