Validation accuracy reach to 1.000 in very first epoch

I am using below small 3D CNN to predict whether 32*32*32 image cube in a CT scan is malignant or not.

def classifier(input_shape, kernel_size, pool_size):
model = Sequential()

border_mode='valid',
input_shape=input_shape))

return model


Compilation is as below

input_shape = (1,32,32,32)
model = classifier(input_shape, (3, 3, 3), (2, 2, 2))
model.compile(loss='categorical_crossentropy',
metrics=['accuracy'])


But when training from 2nd epoch the validation accuracy reach to 1.0000. as in below graphs. I tried with several learning rates (which sudden drops indicates restarting the training with reduced learning rates).

I am using 900 image cube, label pairs as the training data set and 283 cube,label pairs as the validation set. Each cube is shifted 48 ways to increase the data set. I did this manually because Keras ImageDataGenerator do not support for 3D data augmentation. Therefore total no of train data =43116(~900*48) and total no of test data =13584 (~283*48). Data was standardized before fed to the network. My question is, is this due to this architecture doesn't suit for my classification problem or is this due to fewer no of data samples. Or is this is a indication of over-fitting? Can you please help me to figure out what is going wrong here.

• 1.00 accuracy on validation is usually too good to be true, but it is not over-fitting (assuming your validation is not included in the training data). I'd start by checking the following: (1) What is the class imbalance in the data? Could it be that 99.9999% of the data is one class? (2) What features are meaningful in the model? Could it be that you inserted the true label to the images accidently? (3) Is your validation data really outside the train data? – tmrlvi Jan 15 '18 at 8:28
• This really looks a bug in validation set – Maxim Jan 15 '18 at 9:18
• As others have said, this sounds to be too good to be true. Aren't there any data leaks? Are training and validation sets kept separated? Maybe there is more subtle leak, e.g. in recent report they described how super accurate classifier build on x-ray images learned to detect rulers and medical on photos containing tumors, that were absent on the "negative" images. Are all the properties of positive and negative images the same (size, quality, angles, colors, etc.)? – Tim Dec 11 '18 at 9:42
• For quick and dirty check: randomly shuffle the labels, then split the data to train/validation and train - what happens? – Tim Dec 11 '18 at 9:43