Remix.run Logo
▲ nukanse 4 hours ago

It should be possible to replace a small tree of neurons with a smaller set of functions that back propagate more efficiently and are cheaper to calculate meanwhile using less ram/cpu per computation. It's not probable that our first shoot in the dark with neurons got the optimal math structure.

Why would multiplication and addition be the only needed math, and not xor gates.

Ai should be used to find that set of functions.

▲dnhkng 3 hours ago | parent | next [-]

Like this?

https://dnhkng.github.io/posts/m4-tinystories/

https://dnhkng.github.io/posts/isa-net-compression/

I think they may have popped up on HN already.

▲ch4s3 an hour ago | parent [-]

This is really cool!

▲hodgehog11 2 hours ago | parent | prev | next [-]

It's not our first shot in the dark, and the current configurations are pretty well principled. I would expect that other designs could work well in a task-specific sense, but only marginally, and in terms of a generic structure, there are a lot of theoretical benefits of the current design.

The entire ML literature for the last 30 years has been playing genetic optimisation on model designs and architectures. We are reaching the exploitation phase because it is becoming clear that exploration is giving diminishing returns.

▲Zanfa 3 hours ago | parent | prev | next [-]

Additions and multiplications give you gradients for back propagation, I’m not sure what the XOR equivalent would be.

I believe binary networks use quantization-aware training for exactly that reason as well.

▲sigmoid10 3 hours ago | parent | next [-]

On top of that, you can trivially construct an XOR gate with just 2 neurons in the hidden layer. Neural networks are already proven universal approximation schemes and they are differentiable, meaning you can train using gradient descent. These two facts are what gave rise to modern AI, not some half-motivated architecture or building block. Complexity is what you need, and gradient descent is what you use to tame it. There are probably still quite a few possible improvements to sections of the overall process, but the biggest revolution will probably come from making hardware more aligned with these ideas rather than making AI more aligned with traditional hardware.

▲adrian_b an hour ago | parent | prev [-]

"XOR" is actually an incorrect name for addition modulo 2. For 3 or more inputs, true "XOR" and addition modulo 2 give different results ("exclusive or" means that 1 and only 1 of the operands is true, "addition modulo 2" means that an odd number of operands are true). No computer implements true "XOR", all implement addition modulo 2.

Addition modulo 2 is special, because it is identical with subtraction modulo 2. This means that computer "XOR" has 2 possible interpretations, as addition modulo 2 and as subtraction modulo 2.

Because addition modulo 2 is special, some of the algorithms that work with additions in bigger fields also work modulo 2, but other algorithms are no longer applicable.

▲ 2 hours ago | parent | prev | next [-]
[deleted]
▲nextaccountic 4 hours ago | parent | prev | next [-]

This sounds like Kolmogorov-Arnold networks.. rather than learning weights, learn a function computed by neurons

▲saagarjha 3 hours ago | parent | prev | next [-]

Because multiplication and addition let you model continuous-ish functions cheaply.

▲advael 4 hours ago | parent | prev | next [-]

I do think it'd be interesting to have some kind of localized snapping when subsets of neurons adjacent enough to segment from the network as a whole are close enough to a known family of functions over their inputs. Some kind of optimizing compiler over approximated neural circuitry

▲gmueckl 2 hours ago | parent [-]

The rub is that this is only worthwhile with a computational complexity gain. Maybe fitting low order polynomials might give that gain, but more complex functions take extra cycles to compute and would struggle to compete with chains of simple, practical activation functions.

▲wodenokoto 4 hours ago | parent | prev | next [-]

Neurons can do XOR gates.

My first home assignment after being introduced to NN was to draw an XOR gate on paper using neurons.

How to do it, is left as an exercise to the reader.

▲comradesmith 3 hours ago | parent [-]

They mean the inverse of that. Using XOR gates (or something similarly primitive) to implement neurons

▲cubefox an hour ago | parent | prev [-]

There is already a Boolean version of differentiation, called Boolean variation, which includes a chain rule and allows for a binary version of backpropagation and gradient descent:

https://proceedings.neurips.cc/paper_files/paper/2024/hash/7...

It uses XNOR (IFF, the opposite of XOR) as the activation function. This allows for a binary neural network that is trained directly in binary, not quantized later.

There is also a bunch of other papers that forego neural networks altogether and instead use something called "logic gate networks". Instead of neurons, they use logic gates. They don't have weights and use random connections instead. The learning consists in deciding which logic gate to use at each node ("neuron") in the network. They use conventional differentiation though, by "relaxing" the binary Boolean functions into continuous functions between 0 and 1, and then converting them to binary after training. I wonder whether the binary training approach from the paper above could be used for much faster training of these "logic gate networks". Currently they have extremely fast inference but slow training.