Hacker News
points by rao-v 1 day ago | 0 comments
I’ve always wondered why we don’t add a few frozen “layers” to models that perform complex computations 2/3rds deep in the model. Some set of steerable fft + some common vector math operations could be reusable units of capability that the model learns to leverage during training.

Given that models learn to use residual connections optimally, it can’t be hard for them to steer around the fixed computation layer when it’s not needed.

I’m sure giant models invest a few layers in reproducing these functions, but surely smaller models can benefit?

[–] zxexz 22 hours ago
I’ve done it by hardcoding a knowledge graph nn and adding a few “query” layers. You can freeze the graph and swap it out and update it during training so you can update the knowledge at will during inference. You just need to keep the format the same; the model learns an arbitrary graph query language. If you register a buffer it can update you can teach it to keep scratchpad memory very quickly.
[–] rao-v 21 hours ago
Very nice! I'm actually running a autoresearch / modded-gpt comparision to try the complex math operation idea right now! I suspect it's too hard for small quick model training runs to figure out how to use them.

I'll put your knowledge graph nn idea into the mix of things to try.

[–] aerodexis 13 hours ago
super neat! Would be curious to read more.
[–] zxexz 7 hours ago
I don't have the original code but I can throw something together.
[–] yababa_y 18 hours ago
I explored ideas like this when trying to generalize lattice deduction transformers (which are extraordinarily powerful where they work). https://github.com/emberian/clairnets.

Even on the OLMo models I was able to to my tiny studies with, there does seem to be some benefit...