Unsupervised learning, applied in one-class classification, aims to discover rules to separate normal and abnormal data in the absence of labels. One-Class SVM (OC-SVM) is a common unsupervised approach to detect outliers. It considers all the data points as positively labeled instances and builds around them a smooth boundary to detect ‘strange’ samples.

Recently, various approaches based on feature extraction models appear to be a valid instrument to use with OC-SVM. Following the amazing success of deep neural networks as feature extractors, different methods that exploit feature extraction, using deep-learning, and OC-SVM were introduced as multi-step one-class procedures.

In this post, we present a One-Class Convolutional Neural Network architecture (as introduced here) that merges the power of deep networks to extract meaningful data representations along with the one-class objective, all in one-step.

THE MODEL

The structure of the proposed architecture is composed of two parts: a feature extractor and a multi-layer perceptron. A fundamental aspect of this approach is that any pre-trained deep-learning model can be used as the base network for feature extraction. The most common choices regard the adoption of standard network modules for feature extraction, for example, VGG, ResNet, or Inception can be good alternatives for this specific task. There are no fixed rules regarding the points where to cut the network in order to produce a meaningful feature representation. The multilayer perceptron part is located at the end, it receives the embedded representations and tries to classify them into 0 or 1. Here, 1 means that the input sample belongs to the real target class while 0 means that the input sample belongs to the noisy class. As before, the choice of a structure for this part is not fixed. It can be manipulated and tuned in order to achieve better performances.

Between the feature extractor module and the final multilayer perceptron network happens the magic. Exactly there we can find the core idea of the whole procedure, which permits us to join the feature extraction with the classification, all in one step and having at disposal only one set of label. The embedded data samples are ‘corrupted’ adding some zero-centered gaussian noise. These modified samples are then concatenated batch-wise with their original couples. The result of this approach is that we have a duplicated batch of images formed by original samples (class 1) and corrupted ones (class 0). Our aim is that our classification layers can understand this difference and discriminate real images from all the rest.

#data-science #machine-learning #keras #developer

One-Class Neural Network in Keras
3.15 GEEK