Why does adding random pixels stop my model learning in cnn? I am using a very simple model to classify a 224x224 RGB image.

For a test, I have labelled my images (2 labels "Green" or "Red", 2,000 images of each) based on colour of a single fixed pixel from upper part of image.

My simple model achieves very high accuracy and very low loss, until I add more "random" pixels to lower part of image.

Why is my model getting confused?

The model easily copes with:



But, when I add more pixels in lower part of image - it achieves only 50% accuracy and high loss:



These project is a bit facile but I am researching a simple image structure I can control.

def VerySimpleNet():
    model = keras.Sequential([
        keras.layers.Conv2D(16, kernel_size=3, activation=tf.nn.relu, input_shape=(224, 224, 3)),
        keras.layers.Dropout(0.4),
        keras.layers.Flatten(),
        keras.layers.Dense(3, activation=tf.nn.softmax)
    ])
return model



  EDIT 1


Is it possible to add a bonus to Data Science questions to encourage more answers?


  EDIT 2


I would really be interested if anybody was keen to have a more interactive chat(email,txt?) with me on this question.
I think the problem here is that you are trying to relate what you know about the input to what the model is trying to predict. I suggest trying to interpret why your model is giving certain outputs for images.

I came across SHAP a while back when reading about model interpretation. The image plot of SHAP should be able to narrow in on why your model is interpreting a label for a specific Image.



This should lead you to figure out why your model is making the prediction.