Neural CA to Detect MNIST Digits

For discussion of other cellular automata.
Post Reply
User avatar
simsim314
Posts: 1828
Joined: February 10th, 2014, 1:27 pm

Neural CA to Detect MNIST Digits

Post by simsim314 »

Neural CAs are modern class of CAs that are continuous, and apply Neural-Network based rule to local neighbourhood.

I was trying to play with those rules to make some useful ML work like classifying MNIST hand written digits. While I couldn't train a CA in classical sense to detect MNIST digits, i.e. if the same rule is applied every generation, if we allow different rule to be applied each iteration, it's kinda straightforward to train such a Neural CA.

Why I think its still relevant and interesting:
1. The information is still coded inside the image, no hidden weights.
2. The information processing is still all local, just like any regular CA.

To train I made the target to be the average digits on all MNIST train data, and asked to fit every 5 iterations (thus not diverging too much, yet allowing the CA to encode some useful processing information between the 5 iterations targets).

The interesting part as I see it - how neural nets learn to encode some global visual information, into cells values that are evolved by local rules. The image becomes both the visual entity of a digit, and the CAs "information processing" encoding. It needs to encode using local information only, what digit it is and per cell at what area of the digit this pixel is.

You can test the result here: here (notice it takes up to 2min to load the model, be patient, you will also need to draw a digit and press run to see the result).

I also made a repository with training code here.
Post Reply