[Review] Anomaly Detection with Generative Adversarial Networks for Multivariate Time Series - 1

2019. 5. 19. 21:35관심있는 주제/GAN

728x90

GAN과 Anomaly Detection에 대해서 찾아보다가 나온 논문인데, 이게 또 이전에 포스팅한거랑 또 연관이 있고 

다 꼬리에 꼬리를 무는 것만 내가 찾는 기분...?

 

https://paperswithcode.com/paper/anomaly-detection-with-generative-adversarial  https://github.com/LiDan456/GAN-AD

 

Cyber-Physical Systems 는 로봇, 의료기기,등 물리적인 실제의 시스템과 사이버 공간의 소프트웨어 및 주변환경을 실시간으로 통합해주는 시스템이라고 합니다!! 

그러한 CPSs 시스템 점점 복잡해지고 있다고 합니다.  그래서 cyper attack을 막는 목적으로 머 sensor같은 것도 장착되어있다 합니다. 

하지만 기존의 Detection 기술로는 다이나믹하게 막기 어렵다고 하네요.  그래서 비지도 머신러닝을 이용하여 공격과 같은 유사한 것을 분류한다고 합니다. 

여기서 저자들은 

In this work, we proposed a novel Generative Adversarial Networks-based Anomaly Detection (GAN-AD) method for such complex networked CPSs. 

GAN으로 하겠다 합니다 ㅎㅎㅎ  LSTM-RNN을 사용한다 하네요. CPSs로 정상적으로  작동하는  sensor와 actuators 를 Multivariate time series 분포를 캡처하는데 쓰겠다고 합니다.

 

사실 잘 모르겠고... CPSs 에서 정상적으로 작동하는 Sensors 와 actuators를 잘 학습해서 이상한놈을 탐지하겠다 

탐지하는데 Time-Series 적인 데이터이니 RNN-LSTM으로 시간별로 정상적인 분포를 잘 학습해서 이상한 놈들을 탐지하겠다는 것 같습니다... 너무 다른 도멘의 전문적인 용어가 나오니 너무 어렵네요.

 

암튼 일반 머신러닝에서도 Time Series 적인 데이터에서 detecting 은 어렵다고 하네요.

First, most of the supervised techniques require enough liable normal data and labelled anomaly classes to learn from but this is hardly the case in practice as anomalies are typically rare.
Secondly, most of existing unsupervised methods are built through linear projection and transformation but there is often non-linearity in the hidden inherent correlations of the multivariate time series of complex CPSs

 

이 그림만 이해하고 도망가고 싶네요~~

  • 설명
    • First, to deal with time-series data, the generator and discriminator are built as two Long-ShortTerm Recurrent Neural Networks (LSTM-RNN)
    • In other words, G can be viewed as an implicit model of the CPS. At the same time, the resulting discriminator D is also able to distinguish fake from real with high sensitivity.
    • In other words, D is an intuitive tool for anomaly detection.
## 오른쪽 큰 부분
As shown, the testing samples are mapped back into the latent space, and the corresponding residual loss is calculated based on the difference between the reconstructed testing samples (by the trained generator) and the actual testing samples.
At the same time, testing samples are also fed to the trained discriminator to compute the discrimination loss. The two losses are then combined to detect potential anomalies for sequential CPS data (more details are described in Section III-C).

 

 

Outlier를 잡는 것에서는 

지도학습 방식이 있는데 기존의 라벨링이 부여진 것을 통해서 잡는다고 하네요.

그러나 그런 방식은 결국 초기 라벨에 많이 의존하게 됩니다. 즉 시간이 지나서 Outlier가 성격이 바뀌게 되면

탐지할 수가 없다고 하네요. 

비지도 학습도 있는데요

PCA , PLS 방식을 통해서 차원 축소를 해서 잡는 방법이 있습니다.

머 따른 방법으로는 Autoencoder랑 Vae로 하는 바법도 있지만 논문에서는 이야기가 없네요

이런 방식은 그러나 오직 상관관계가 높은 데이터나  multivariate gaussian 데이터를 따를 때 효과적이라고 하네요.

 

하지만 GAN을 전통적인 방식과 달리 좋은 점이 있다는데요.

Discriminator가 결국 이상한놈들을 탐지하는 것을 배운다는 점입니다. 

 

현재 논문에서는 임의의 데이터 분포에 있는 representation을 비지도 학습으로 적용하고 latent space를 이해할 수 있는 GAN 논문을 제안했다고 합니다 ( - 결국 읽을 후보가 늘어나네요)

showed the possibility of recognizing anomalies with reconstructed testing samples from latent space
and successfully applied the proposed GANbased detection strategy to discover unexpected markers for images.
S. Thomas, P. Seebck, S. M. Waldstein, U. Schmidt-Erfurth, and G. Langs, “Unsupervised anomaly detection with generative adversarial networks to guide marker discovery,” pp. 146–157, 2017. [36] Z. Houssam, C. S. Foo, B. Lecouat, G. Manek, and V. R. Chandrasekhar, “Efficient gan-based anomaly detection,” arXiv preprint arXiv, vol. 1802, no. 06222, 2018. 

해당 논문에선 residual loss와 discrimination loss를 기반으로 한 anomaly를 더 잘 detect하게 했다는 것을 보이겠다고 합니다.

 

Our contributions 

i), a novel GAN-based unsupervised anomaly detection method is proposed to detect anomalies (cyber-attacks) for complex multi-process cyber-physical systems with networked sensors and actuators;

 

 ii), the GAN model is trained with multiple time series, which adapts GAN from the image generation domain for time series generation by adopting the Long Short Term-Recurrent Neural Networks (LSTM-

RNN) to capture the temporal dependency; 

 

iii), normal sequences with high dimension is uniformly utilized to train the GAN model to discriminate fake from real and reconstruct testing sequences from specific latent space simultaneously;

 

iv), the discrimination loss calculated by the trained discriminator and the residual loss between reconstructed and real testing sequences (to make use of both the trained discriminator and generator) are combined together to detect anomalous points in the high dimensional time series, 

and the proposed method is shown to outperform existing methods in detecting anomalies due to cyber attacks in a complex Secure Water Treatment (SWaT) system with six stages 

 

 

오늘 따라 비가와서 그런지 논문이 안읽혀서 복붙이 평소보다 많네요...ㅠㅠ 죄송요

728x90