Savant Syndrome of Neural Networks

For this, we calculate the correlation coefficient R between two weight vectors given byDefinition of correlation between weight vectors of two pixelsThe correlation coefficient values between -1 and 1.

If two pixels trigger similar node areas in the hidden layer the correlation of the associated weight tends to be high and targets 1.

However, if two pixels address different zones in the hidden layer R tends to zero or even -1.

Now we are on the last mile.

We assume the grid structure to be reflected in the hidden layer.

Accordingly, the correlation of adjacent pixels should be high if pixel pairs are located within the same grid block and low if pixels are located cross-border in different grid blocks.

So we calculate for each pixel the average of the correlation with its nearest neighbors to the right and downwards.

Definition of weight vector correlation between adjacent pixel pairsIf we visualize this value for both NNs we obtain the following heatmaps:Weight vector correlation between adjacent pixel pairs for original NN and shuffled NNThis shows that the shuffled NN evolves a separated hidden layer with areas dedicated for each grid segment whereas the original NN considers the image en bloc.

Final RemarksPlease notice that we have used a simple 3-layer dense NN with purpose of classification.

In particular, we have not used a convolutional network.

Nevertheless, our network is able to recognize puzzled images.

One could argue that puzzling is just an additional degree of freedom for image representation, i.


a shoe can be shown original but also in several puzzled variants, however, all these pictures are still just a shoe (although the puzzled versions are very uncommon in real life).

But if so the NN would treat the input pictures en bloc and not show the separated weight structure.

Furthermore, I ask myself if the applied puzzling algorithm is also a form of Data Augmentation.

At least it’s not a classical transformation like rotation or scaling to enlarge the amount of training data.

Finally, feel free to browse my code.

So you can reproduce all of my findings presented above.

It’s in Python using TensorFlow Keras.

Thanks for reading this article!.If you like this neural session I would be pleased to hear you clap.

But maybe my findings are an old hat?.If you can provide further insights, alternative approaches or know related topics feel free to add your comments!.

. More details

Leave a Reply