logoalt Hacker News

I built an LLM where Gemini 4 wrote the initial weights as code

485 points • by umjunsik132 • yesterday at 1:00 PM • 160 comments • view on HN

Comments

riverdweller • yesterday at 1:54 PM

I tried using Fable 5.1 a few weeks ago to craft a neural network (that simulated a much more expensive financial risk calculation engine that executes large numbers of Monte Carlo simulations). It came up with a network that agreed with the simulation around 98% of the time. But the resulting network couldn't then be used as a starting point for further "traditional" training through gradient descent; it was far too sensitive.

It turned out that instead of using weights with small absolute values (e.g. -2 < w < 2) it had in some parts of the network HUGE weights (like 10^10 in some cases), and if a result was, say, the difference between two weights like 10,000,000,000 - 10,000,000,002 = -2, then a "tiny" weight nudge of even one millionth resulted in things like 10,001,000,000 - 9,999,000,002 = 1998, which sent the results wildly off. So it was far too sensitive to any such changes to be trainable. Shrinking the nudge steps to 1/10^10 helped eliminate the sensitivity, but then made the changes in smaller weights in the "normal" range far too tiny to have any effect, so the network couldn't improve at all. It was easier to just start from random weights.

I didn't try it, but I suspect that if my prompt had told fable to keep all values/slopes inside a small range and to work in log units it might have turned out rather better.

➕ show 21 replies
manbitesdog • yesterday at 2:25 PM

This is called a Gödel Machine: a program that rewritews itself whenever it can prove the rewrite will do better. I remember reading about this on 2017 with the name Hypernetworks, a network that outputs the weights of another. With the current generation, it seems like a good timing for this approach to work.

➕ show 2 replies
benob • yesterday at 2:38 PM

I don't see how this relates to WSP. The agent wrote a program to extract statistics and trained a model on top of it. Besides, the comparison at same number of trainable parameters forgets the many non-trainable parameters. Equal memory/disk space would be more appropriate.

➕ show 2 replies
13rac1 • yesterday at 3:06 PM

From the website:

> the model supports continual knowledge updates without training.

From the README:

> Limitations. The layer fires only when the subject appears verbatim, so aliases are missed. Answers are emitted verbatim. Reverse ("who coaches X" → "which team does Y coach") and multi-hop questions are not answered from an edit.

This method produces verbatim fact answer overrides: the answer is output when the subject appears verbatim. This isn't information the model can use, such as in reverse or multi-hop questions. I disagree with calling it "continual knowledge updates."

➕ show 1 reply
lumost • yesterday at 1:56 PM

This looks roughly on par with “adding curated features to a small network gives a small boost.” The ablation is between the 103M parameter model with 8GB of weight space features and the 103M parameter model without, gaining only 11% on perplexity. I’d strongly expect this gain to disappear at larger model sizes.

➕ show 1 reply
mycall • yesterday at 1:36 PM

Somehow reminds me of code = data in a lispy way.

➕ show 1 reply
agnosticmantis • yesterday at 3:50 PM

This is sort of consistent with an older post on HN showing the process of setting weights by LLMs is similar to how an ML engineer reasoned about creating a model.

Here the LLM is creating the features (n-grams, skip-grams, etc.) and fitting a learned model on top via gradient descent.

MisterPea • yesterday at 3:39 PM

It's all Joever. Iterations on this has extremely large implications on alignment

djoldman • yesterday at 2:55 PM

At inference, you need 8GB of table data in addition to the ~103 million parameter model.

The paper essentially claims that for the same training compute you get perplexity like a network about 1.5x larger, but you have to use 8 GB of memory at inference time.

luka598 • yesterday at 1:26 PM

Just skimmed but this looks like llm doing feature extraction and then training with gradient descent on those features, which i feel is something like these kind of tasks were done before compute heavy learning by destiling the original data using domain knowledge and then fitting a more general model on the destiled data. You just replaced human with a machine. And I guess a machine is also susceptible to bitter lesson.

edit: nvm I was mostly worng - llm edits weights of an additional layer

corvettez0606 • yesterday at 1:46 PM

Soon someone will do something like this but with lifting layers from all the various open weight models to make a super model.

➕ show 1 reply
xelananv • yesterday at 1:33 PM

This is interesting! How much time do these compilations take, compared to training?

Sena_997 • yesterday at 3:23 PM

very misleading title, like someone might assume that LLM wrote weights directly

➕ show 1 reply
sprinter123 • yesterday at 6:57 PM

this seem less like an LLM and more like a network of very sensitive gates (ik how stupid i sound but there is no capability here to generalise to topics, or atleast, is not shown)

The testing is also shoddy

enjoyyourlife • yesterday at 3:01 PM

I wonder if it is possible to use an ontology to build an LLM. LLMs seem to be good for fast information retrieval

baq • yesterday at 1:57 PM

also compile z3 or a smaller sat solver into the weights and train the whole thing to use it

andai • yesterday at 6:55 PM

This is very interesting, though not (despite what the intro says?) to be confused with the recent "weight-space programming", where the LLM literally outputs the neurons directly (and/or adjusts them).

Here the LLM wrote a program ("compiler") which created a very unusual (hybrid?) LLM, and then the neural network part was trained as usual. The LLM did not write the weights.

I think some of the confusion may come from the original MIT post, which already bundled several techniques under the same umbrella. This paper, while very cool, appears to be stretching the terminology even further.

estebarb • yesterday at 5:19 PM

From what I understood the paper, they are basically hard wiring lots of context and continuations. Which kinda works, years ago it was called expert systems.

Not really what I expected from the title.

hoppp • yesterday at 1:30 PM

Continual knowledge updates sound good on paper but give it time with me and it'll learn to curse back like a mofo

➕ show 3 replies
partloyaldemon • yesterday at 5:05 PM

Everyone is interpreting. Anthropic‘s actions is paranoia with respect to nerfing ML work, but it could be out of a sense of weakness too.

parasti • yesterday at 4:20 PM

Seems Gemini also wrote 97% of bytes of the paper itself.

dude250711 • yesterday at 1:30 PM

It must be tough being an ML specialist these days: do you want your account locked or do you want your work sabotaged.

➕ show 3 replies
goosethe • yesterday at 5:20 PM

oh man someone should make this into a loop where the model can alter it weights after an inference. some kind of descent of the local gradient.

iantongeorge • yesterday at 3:32 PM

two specific mechanisms from this paper (wtable-lm) map almost 1:1 onto TempleRust's Ring-0 philosophy - COMING SOON

deadbabe • yesterday at 1:50 PM

Ok, so if we can do this kind of thing fast enough it seems like eventually we don’t need context we can just update weights with memory of every prompt and output built right into the model?

➕ show 3 replies
logicallee • yesterday at 5:43 PM

Can someone explain how WSP (weight space programming, where the AI writes the weights to a NN directly, without gradient descent) works? How does the AI calculate what the weights should be?

➕ show 1 reply
zkmon • yesterday at 3:14 PM

Is this possible because the frontier models saw the weights of the open-weights models (and maybe their own)?

➕ show 1 reply
blondie9x • yesterday at 1:45 PM

Where is it noted that Gemma 4 was used as the initial model?

➕ show 1 reply
apishare_api • today at 12:03 AM

[dead]

t9tokenbudget • yesterday at 3:31 PM

[dead]

eaxitect • yesterday at 6:38 PM

[dead]

scintillating • yesterday at 2:02 PM

[dead]