Reverse engineering a neural network's clever solution to binary addition (2023)

Ameo | 48 points

> While playing around with this setup, I tried re-training the network with the activation function for the first layer replaced with sin(x) and it ends up working pretty much the same way.

There is some evidence that the activation functions and weights can be arbitrarily selected assuming you have a way to evolve the topology of the network.

https://arxiv.org/abs/1906.04358

bob1029 | an hour ago

Very nice. I think people don't appreciate enough the correspondence between linear algebra, differential equations, and wave behavior.

Roughly speaking, it seems the network is essentially converting binary digits to orthogonal basis functions and then manipulating those basis functions. Finally a linear transformation back into the binary digit space.

anon291 | 10 minutes ago

This seems interesting, but I got stuck fairly early on when I read "all 32,385 possible input combinations". There are two 8 bit numbers, 16 totally independent bits. That's 65_536 combinations. 32_285 is close to half that, but not quite. Looking at it in binary it's 01111110_10000001, i.e. two 8 bit words that are the inverse of each other. How was this number arrived at, and why?

Looking later there's also a strange DAC that gives the lowest resistance to the least significant bit, thus making it the biggest contributor to the output. Very confusing.

drougge | 4 hours ago
rnhmjoj | 5 hours ago

>As I mentioned, before, I had imagined the network learning some fancy combination of logic gates to perform the whole addition process digitally, similarly to how a binary adder operates. This trick is yet another example of neural networks finding unexpected ways to solve problems.

My intuition is that this solution allows for some form of gradient approach to a solution, which is why it's unintuitive. We think about solutions as all or nothing and look for complete solutions.

IlikeKitties | 6 hours ago