MATLAB: Does simple Convolutional Neural Network learn features with only one class

activationscnn

I have read about one-class classification problems using SVM as discriminator to detect anomalous data. But, couldn't find much with CNN deep networks. I am working on a classification problem where I want to extract features from CNN network. I am providing image dataset from one class only and after training the model for 50 epochs, I am extracting the features for further classification using another model.
I am getting very fine results. However, I am confused how my CNN model is learning features when I am providing data from one class only. Is it even learning or not. I tried to analyze activations after each convolution layer (4 in my model) for 1, 50 and 100 epochs. I can see subtle changes, however I need a solid explanation as to what actually is happening after each epoch cycle.
for epoch 1 and conv layer 1,2 ,3 and 4 , strongest activations in each layer is as shown below:
after 50 epochs and conv layer 1,2 ,3 and 4, strongest activations in each layer is as shown below:

Best Answer

Yes, simple convolution neural networks do learn features with only one class. When there exist only one class, the problem is effectively a binary classification, i.e. whether the class is present or not.
However, it is a fact that larger the number of classes, the network would try to learn more complex features.
In cases where the features required to make a classification is simple, the network may learn it pretty quickly. If the training data isn't diverse enough, then the network may assume find a feature which may not be the right one, but works for the given training data and make a classification based on that.