두 구성요소는deterministic contrastive loss (DCL)에 의해 jointly하게 학습된다.
해당 loss는 다른 표현학습에서의 contrastive loss와 다르고 image anomaly detection에서의 loss와 다르며 negative samples을 사용하는 모든 loss들과 다르다
추가적인 regularization이나 adversarial training이 필요없는non-stochastic 목적함수를 제시하고, 이는 곧anomaly score가 된다.
2. Related Work
Deep Anomaly Detection
관련된 방법론들은 Deep autoencoder, Deep one-class classification, Deep generative models, Outlier exposure 등 다양함
자기지도 Anomaly detection을 Detection Accuracy을 크게 향상시킴
- 이 방법은 데이터를augment한 후 어떤 transformations이 적용되었는지 예측하는 방법
- 학습이 끝난 Classifier는 Anomaly detection에 사용
self-supervised anomaly detection에 대한 다른 방법은 같은 이미지로부터 나온 서로다른 두개의 view를 맞추는 contrastive loss로 classifier를 학습하는 방법이다. 이렇게 한다면strong representations을 얻을 수 있고 이상탐지에 활용할 수 있다.
GOAD 논문의 저자는 image 외에 self-supervised anomaly detection을 다른 도메인으로 어떻게 확장할 수 있는지 연구하였다. 유사하게 transformation prediction을 기반으로 하지만 open-set setting을 고려하였다.
본 연구에서는 유사하지만학습 가능한transformations을 사용하고 더 높은 성능을 얻어낸다.
Self-Supervised Learning
자기지도 학습은 대부분auxiliary task를 위한 data augmentation에 의존한다. Auxiliary tasks (보조작업 e.g. patch prediction, solving jigsaw-puzzles, cross-channel prediction, rotation prediction)으로 학습한 네트워크는 downstream task를 위한feature extractors로 사용됩니다.
-> 다양한 종류의 보조작업이 있음, 이 보조작업으로 학습한 네트워크는 feature 추출기로 사용됨
Image에서 주로 발전되어왔지만, 시계열 representations 추출을 위한temporal order verification과 같은 auxiliary task 방법론도 제안되었음.
Contrastive Representation Learning
대부분의 self-supervised method들은 InfoMax 방식을 따르고 있다.
해당 방법 기반들은데이터와 문맥 간혹은데이터의 각기 다른 views들간의"상호정보량"을 극대화하도록 학습된다.
이러한 방법들에서 상호정보량을 계산하는 일은 힘들기 때문에,approximation혹은bounds들이 사용되곤 합니다. 본 연구에서도 Contrastive loss를 사용했지만 같은 샘플에서의 두개의 views와 다른 샘플들에서의 views들을 미니배치 안에서 대조하는 방법을 선택하지 않고,같은 샘플에서의 서로 다른 views로부터 original version을 결정하도록 학습되었습니다. 이렇게 single sample만을 사용하는 방법은test 시에 anomalies에 score를 부여할 수 있고,data transformation을 학습시킬 수 있다는 장점이 있습니다.
Learning Data Augmentation Schemes
Data Augmentation 방법은 예전부터 있었다. 일반적으로는 Hand-crafted data augmentation 방법들이 있다.
본 연구는 Viewmaker networks 논문과 가장 밀접하게 관련되어 있으며 SimCLR 논문의 framework에서 representation learning을 위해 어떻게 views들을 생성하는지에 대해 연구하였다. 이렇게 하면original sample과 semantic information을 공유하지 않는 trivial solution인 view들을 피하도록 학습할 수 있다.
NeuTraL AD 방법론은 deep, self-supervised anomaly detection 분야에 속하며, 이미지를 넘어 이상 감지에 효과적으로 transformations을 사용할 수 있도록 학습하는 것이 주요 핵심이다. 이 방법은 시계열이나 Tabular data 에서도 사용할 수 있으며 특히 시계열에서 상당히 좋은 성능을 보인다.
3. Neural Transformation Learning for Deep Anomaly Detection
Proposed Method: NeuTraL AD
NeuTraL AD 방법론은 Learnable transformations와 Encoder 두 개의 파이프라인으로 이루어져있습니다. 둘 모두deterministic contrastive loss (DCL)에 의해 jointly 학습됩니다. 목적 함수는 두 가지 목적으로 작동하는데, 첫번째로 학습 시에 encoder와 transformation의 parameters를 최적화시키고, 두번째로 추론 시에 각 Sample들이 inlier인지, anomaly인지 스코어링합니다.
Learnable Data Transformations
data space χ 에 대한
Data Sample D={xi∼χ}Ni=1
K transformations T:={T1,....,TK|Tk:χ→χ}
이때, Transformations는 학습 가능하다.
Gradient-based 최적화 방법들로 parameter들을 학습시킬 수 있고, 저자는 feed-forward 신경망을 사용하였다.
Deterministic Contrastive Loss (DCL)
본 연구의 가장 핵심 부분이다. 본 논문에서는 새로운 목적함수를 제시한다.
DCL 손실함수는 transformed sample과 original sample을 가깝게 하고 다른 transformed version sample과는 멀어지게 한다.
이를 위한 Score Function은 다음과 같다.
여기서 f 함수가 X → Z 하는 encoder 함수이며features extractor 이다.
sim function은consine similarity 이다.
DCL 손실함수는 다음과 같다.
위 식의 분자는 transformed sample을 original sample과 가깝게 한다.
이렇게 함으로써 transformation이 semantic information을 보존하도록 한다.
위 식의 분모는 transformed sample들이 다른 transformed sample들과 멀어지도록 한다.
Anomaly Score
본 연구는 GOAD와 마찬가지로 training loss가 곧 anomaly score가 된다.
따라서 Anomaly Score 수식은 다음과 같다.
해당 Score는deterministic하며 새로운 data point에 대해 곧바로 평가되기 때문에negative sample이 필요가 없다.
위 그림처럼 normal과 abnormal이 확실히 구별됨을 볼 수 있다.
습을 진행해서 DCL을 최소화하고 나면 위 그림처럼 정상과 이상의 Score가 뚜렷하게 구분된다.
해당 Score 방식은 상당히 simple하고 추가적인 regularization이나 constraints가 필요없다.