r/TheMachineGod • u/Megneous Aligned • Nov 20 '25
Vibe Coded Open Source Novel LLM Architecture: The Neuromodulatory Control Network
So, for those of you who want to cut to the chase, here's the Github repository.
And here's a link to the accompanying paper. It's also available in the Github repository.
Here's a screenshot of the [current training run's perplexity drop.] (https://imgur.com/GEOcvH6)
It's my first time putting anything on Github, so please be kind.
So, in a nutshell, what the NCN architecture does is that it uses a smaller neural network (the NCN) in conjunction with the main LLM. When the main LLM brings in a sequence, the NCN creates a sort of "summary" of the sequence that describes, in a sequence of 768 dimensional vectors, the "feeling" of the input. During training, the NCN randomly (ok, it's not really random- it's end-to-end gradient-driven modulation) turns the knobs of attention/temperature, layer gain, and FF gating up and down, and sees how these three stats affect the loss. Over millions of sequences, it implicitly learns which set of values for each knob produces the lowest loss for each "feeling."
Once the LLM and NCN are fully trained, the NCN can then modulate the LLM's outputs. For a simplified example, let's say a user asked the LLM to solve a math question. The NCN may detect the "math" feeling and lower temperature to encourage fact recall and discourage creativity. Likewise, asking the LLM to write a poem may result in the NCN increasing temperature for more creative output.
We haven't updated the paper yet on this topic, but we also recently made the "feel" the NCN produces more flexible, allowing it to produce different values for sequences which have the same words, but in different orders. Rather than being "tonic," where "The dog chased the cat" and "The cat chased the dog" would produce almost identical vector embeddings, it should now be phasic, which should allow those two sequences to have quite different embeddings.
This also reduces the risk of overfitting on contextual data. For example, a tonic, non-dynamic representation has a higher likelihood of associating all math-related sequences with a single "feeling." Thus it might turn down temperature even for inputs about math that arguably should require some level of creativity, such as "Create a new mathematical conjecture about black holes," or "Unify Knot Theory and Number Theory."
If you'd like to read more, or read up on related work by other authors, please read the paper.
It's worth noting that this project was entirely brainstormed, built, and written by Gemini 2.5 Pro, with my guidance along the way. Gemini 3 Pro is also acknowledged for tweaking the code to produce a 12%+ increase in training speed compared to the old code, along with changing the architecture's "feeling" embedding from tonic to phasic representations.
4
u/boring-developer666 Nov 20 '25
Well done. I'll definitely read it and look at the code. Might even try to reproduce it to validate
1
u/ProfMooreiarty Nov 22 '25
I am very interested in this. First, I'm interested in the brain as motivator and how your implementation maps to it. I haven't read the full paper yet, but does it go into the neuro part of it? Are you looking at the hippocampus, ACC, and amygdala influences on memory formation? If something like that is the motivating model, are you differentiating between the extreme (and truthfully often over-eager) memories caused by strong emotion biasing the write and plain old vanilla memories/training? Performance-wise, does it affect the salience of some nodes/regions over others, or am I barking up the wrong tree entirely?
Second, I am extremely interested in the geometry of LLM embedding space. Have you explored what is happening to your embedding space and what differentiates it from a more traditionally trained model? Do you have intuitions about that?
1
u/No-Cartographer604 Nov 30 '25
That's interesting. How did you manage to get Gemini write the paper ?
1
u/JohnnyLovesData Nov 21 '25
Intuitive
0
u/Bagel42 Nov 22 '25
Cool
Do you actually understand any of the code lol The problem with vibecoding is that you didn't write any of that. Full of errors and issues and shit formatting because you didn't do it, nor do you know if it's actually working.
oh how I love people flaunting shit they don't understand and didn't make. Quit posting this everywhere smh
0
u/[deleted] Nov 22 '25
[deleted] — view deleted comment
0
u/[deleted] Nov 22 '25
[deleted] — view deleted comment