Live data from Hacker News

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

cprimozic.net

71–80 of 160 posts

Re: Reverse engineering a neural network's clever solution to binary addition

#71
post #68

Earlier quoted context omitted.

One thing that the essay doesn't consider is the importance of efficiency in computation. Efficiency is important because in practice it is often the factor which most limits the scalability of a computational system. The human brain only consumes around 20W [1], but for numerical calculations it is massively outclassed by an ARM chip consuming a tenth of that. Conversely, digital models of neural networks need a hug…

> a TWh, which is about six million years' of power i'm not a physics guy but wanted to check this - a Watt is a per second measure, and a Terawatt is 1 trillion watts, so 1 TWh is 50 billion seconds of 20 Watts, which is 1585 years of power for a single brain, not 6 million. i'm sure i got this wrong as i'm not a physics guy but where did i go wrong here? a more neutral article (that doesn't have a clear "AI is harm…

A watt is not a per-second measure, Wh are the energy measurement to W being the power. TWh = 10^12Wh which means a trillion-watt for 1 hour.

10^12 / 20 (power of brain) / 24 (hours in a day) / 365 (days in a year) = 5 707 762 years.

Re: Reverse engineering a neural network's clever solution to binary addition

#72
post #68

Earlier quoted context omitted.

One thing that the essay doesn't consider is the importance of efficiency in computation. Efficiency is important because in practice it is often the factor which most limits the scalability of a computational system. The human brain only consumes around 20W [1], but for numerical calculations it is massively outclassed by an ARM chip consuming a tenth of that. Conversely, digital models of neural networks need a hug…

> a TWh, which is about six million years' of power i'm not a physics guy but wanted to check this - a Watt is a per second measure, and a Terawatt is 1 trillion watts, so 1 TWh is 50 billion seconds of 20 Watts, which is 1585 years of power for a single brain, not 6 million. i'm sure i got this wrong as i'm not a physics guy but where did i go wrong here? a more neutral article (that doesn't have a clear "AI is harm…

Watts are actually a time independent measurement, note that the TWh has "hour" affixed to the end. This is 1 Tera Watt over the course of one hour, not one second. Your numbers are off by a factor of 3600.

1TWh / 20 Watt brain = 50,000,000,000 (50 Billion) Hours.

50 Billion Hours / (24h * 365.25) = 5,703,855.8 Years

Re: Reverse engineering a neural network's clever solution to binary addition

#74
post #49

Earlier quoted context omitted.

None of these require arbitrary amounts of repeated addition though. E.g. multiplying two 8 bit numbers requires at most 7 additions.

Are you doing the equivalent of repeated squaring here? Otherwise, you'd need up to 255 (or so) additions to multiply two 8 bit numbers, I think?

An 8x8 bit multiplication only requires 7 additions, either in parallel or sequentially. Remember long-form multiplication? [1] It's the same principle. Of course, high-speed digital multiplication circuits use a much more optimized, much more complex implementation.

[1] https://en.wikipedia.org/wiki/Multiplication_algorithm#Examp...

Re: Reverse engineering a neural network's clever solution to binary addition

#75
post #72
post #68

Earlier quoted context omitted.

> a TWh, which is about six million years' of power i'm not a physics guy but wanted to check this - a Watt is a per second measure, and a Terawatt is 1 trillion watts, so 1 TWh is 50 billion seconds of 20 Watts, which is 1585 years of power for a single brain, not 6 million. i'm sure i got this wrong as i'm not a physics guy but where did i go wrong here? a more neutral article (that doesn't have a clear "AI is harm…

Watts are actually a time independent measurement, note that the TWh has "hour" affixed to the end. This is 1 Tera Watt over the course of one hour, not one second. Your numbers are off by a factor of 3600. 1TWh / 20 Watt brain = 50,000,000,000 (50 Billion) Hours. 50 Billion Hours / (24h * 365.25) = 5,703,855.8 Years

thank you both.. was googling this and found some stackexchange type answers and still got confused. apparently it is quite common to see the "per time" part of the definition of a Watt and get it mixed up with Watt-hours. i think i got it now thank yoyu

Re: Reverse engineering a neural network's clever solution to binary addition

#76
post #33
post #3

That's awesome - the network's solution is essentially to convert the input to analog, perform the actual addition in analog , and then convert that back to digital. And the first two parts of that all happened in the input weights, no less.

So that's how savants do it ...

There is one savant that can do crazy math but is otherwise normal. Afgter an epileptic fit.

His system is base 10000, he can add any two numbers below 5000 and come up with a single digit response in one loop. Then covert to base10 for the rest of us. Each digit in his base 10000 system has a different visual representation, like we have 0-9.

It's integer accurate so I don't think it uses sine wave approximations. Guy can remember pi for 24 hours.

I don't think the boffins or he himself got close to understanding what is going on in his head.

Re: Reverse engineering a neural network's clever solution to binary addition

#77
post #14

Earlier quoted context omitted.

Yeah, the current solution is similar to overfitting, this wont generalize to harder math where the operation doesn't correspond to the activation function of the network.

Is this true? If it can add, it can probably subtract? If it can add and subtract it may be able to multiply (repeated addition) and divide? If it can multiply it can do exponents? I don’t know, but cannot jump to your conclusion without much more domain knowledge.

Repeated additions may be hard, but computing a*b as exp(log(a)+log(b)) should be learnable.

Re: Reverse engineering a neural network's clever solution to binary addition

#78
post #50

Earlier quoted context omitted.

Ah, the good old radio component you can program into fpgas.

Very easy to design a radio component into electronics, much harder to design it out.

I’ve had all kinds of cheap electronics that came with unadvertised radio features for free.

Re: Reverse engineering a neural network's clever solution to binary addition

#79
post #39

Impressive. Am I right that what is really going on here is that the network is implementing the "+" operator by actually having the CPU of the host carrying out the "+" when executing the network? I.e., the network converts the binary input and output to floating point, and then it is the CPU of the host the network is running on that really does the addition in floating point. So usually one does a bunch of FLOPs t…

You know how the basic node does a weighted sum of inputs, and feeds the result to a non linear function for output? This network exploited the addition operation implicit in that first part, the weighted sum.

Fascinating! Is it really exploitation? It seems to me that the node should optimize to the minimal inputs (weights) in the happy path. I.e. it's optimal for all non-operand inputs to be weighted to zero.

I'm curious how reproducible this is. I'm also curious how networks form abstractions and if we can verify those abstractions in isolation (or have other networks verify them, like this) then the building blocks become far less opaque.

Re: Reverse engineering a neural network's clever solution to binary addition

#80
post #62
post #34

Earlier quoted context omitted.

I cannot wrap my head around that. I listened to the audio to check it wasn't a transcription error and don't think it is. He is claiming GPT3 was trained on 57 billion billion words. The training dataset is something like 500B tokens and not all of that is used (common crawl is processed less than once), and I'm damn near certain that it wasn't trained for a hundred million epochs. Their original paper says the larg…

I didn't even catch that. Surely they meant 57 billion words. Some words are broken up into several tokens, which might explain the 300B tokens.

It's at about 7 minutes in the video, they really do say it several times in a few ways. He starts by saying it's trained on 570 billion megabytes, which is probably where this confusion starts. Looking again at the paper, Common Crawl after filtering is 570GB or 570 billion bytes. So he makes two main mistakes - one is straight up multiplying by another million, then by assuming one byte is equivalent to one word. Then a bit more because less than half of it is used. That's probably taking it out by a factor of about ten million or more.

300B is then the "training budget" in a sense, not every dataset is used in its entirety, some are processed more than once, but each of the GPT3 sizes were trained on 300B tokens.

Post reply on HN