Live data from Hacker News

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

cprimozic.net

61–70 of 160 posts

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

#62
post #34
post #27

Earlier quoted context omitted.

I think there is no doubt that there must be more efficient model architectures out there, take for example the sample efficiency of GPT-3: > If you think about what a human, a human probably in a human’s lifetime, 70 years, processes probably about a half a billion words, maybe a billion, let’s say a billion. So when you think about it, GPT-3 has been trained on 57 billion times the number of words that a human in h…

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.

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

#63

These stories remind me of a story from Discover Magazine https://www.discovermagazine.com/technology/evolving-a-consc... A researcher was using a process to "evolve" a FPGA and the result was a circuit that was super efficient but worked in ways that were unexpected: part of the circuit seemed unconnected to the rest but if removed the whole thing stopped working and it would only work at a specific temperature.

Primary source (or at least one of several published versions): https://cse-robotics.engr.tamu.edu/dshell/cs625/Thompson96Ev...

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

#64

These stories remind me of a story from Discover Magazine https://www.discovermagazine.com/technology/evolving-a-consc... A researcher was using a process to "evolve" a FPGA and the result was a circuit that was super efficient but worked in ways that were unexpected: part of the circuit seemed unconnected to the rest but if removed the whole thing stopped working and it would only work at a specific temperature.

oh weird, I first heard about a story like this in https://www.damninteresting.com/on-the-origin-of-circuits/, I think perhaps they're both about the same lab.

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

#65
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.

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

#66

These stories remind me of a story from Discover Magazine https://www.discovermagazine.com/technology/evolving-a-consc... A researcher was using a process to "evolve" a FPGA and the result was a circuit that was super efficient but worked in ways that were unexpected: part of the circuit seemed unconnected to the rest but if removed the whole thing stopped working and it would only work at a specific temperature.

oh weird, I first heard about a story like this in https://www.damninteresting.com/on-the-origin-of-circuits/ , I think perhaps they're both about the same lab.

Same guy: Adrian Thompson

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

#67

A couple questions: 1. How much of this outcome is due to the unusual (pseudo) periodic activation function? Seems like a lot of the DAC-like behavior is coming from the periodicity of the first layer’s output, which seems to be due to the unique activation function. 2. Would the behavior of the network change if the binary strings were encoded differently? The author encodes them as 1D arrays with 1 corresponding to…

For 1., the author used Ameo (the weird activation function) in the first layer and tanh for others, later on notes:

"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. Interestingly, the weights learned in that case are fractions of π rather than 1."

By the looks of it, any activation function that maps a positive and negative range should work. Haven't tested that myself. The 1 vs π is likely due to the peaks of the functions, Ameo at 1 and sine at π/2.

Regardless, it's not Ameo.

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

#68

The essay linked from the article is interesting: http://www.incompleteideas.net/IncIdeas/BitterLesson.html

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 harming our planet" agenda) estimates closer to 1404MWh to train GPT3: https://blog.scaleway.com/doing-ai-without-breaking-the-bank... i dont know either way but i'd like as best an estimate as possible since this seems an important number.

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

#69
post #48

Earlier quoted context omitted.

It converted the inputs to analog so there isn't really a notion of 'overflow'.

Putting aside the idea that "analog" doesn't have overflow. (Any physical implementation of that analog signal would have limits in the real world. If nothing else, then how much current or voltage your PSU can supply, or how much current can go through your wire.) But that is not even the real issue. The real issue that it is not analog, it is just "analog" with quotes. The neural network is executed by a digital co…

Are there any true analog adder circuits? If so are they also less error prone like digital.

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

#70

These stories remind me of a story from Discover Magazine https://www.discovermagazine.com/technology/evolving-a-consc... A researcher was using a process to "evolve" a FPGA and the result was a circuit that was super efficient but worked in ways that were unexpected: part of the circuit seemed unconnected to the rest but if removed the whole thing stopped working and it would only work at a specific temperature.

Yeah, IIRC it grew an antenna that was utilizing the clock in the computer it was sitting next to.
Post reply on HN