Today we introduce Looped Weight-Space Programming! 🚀
We asked Claude Opus 5.5 to solve hard mazes. It got only 26% right.
Then we asked it to write a transformer that solves them, setting every weight directly.
It took just 39 minutes and $19. No training.
The model it wrote solves 100% of our test mazes. 🧵
Today we introduce Looped Weight-Space Programming! 🚀
We asked Claude Opus 5.5 to solve hard mazes. It got only 26% right.
Then we asked it to write a transformer that solves them, setting every weight directly.
It took just 39 minutes and $19. No training.
The model it wrote solves 100% of our test mazes. 🧵
Thank you so much for your take, Arnas!
(1) Claude encoded the maze-solving algorithm into both the transformer's architecture and its weights. So by your criteria, if we give gradient descent the architecture (the solution template) and ask it to find only the weights, it should work. However, it got 0%. I believe our evaluation was a fair comparison in that regard.
(2) To test this further. For gradient descent, we even tried adding supervision signals for the distance and pointer states after every loop. Hence, we showed gradient descent the correct state at each step of the solution, and none of our checkpoints solved a single test maze.
(3) Even if we ask Claude (who knows the algorithm to solve the maze) to write the gradient descent code to train the model it wrote, or to train other SoTA models (e.g. HRM, TRM, EBR), the weights Claude writes directly still do better.
If you have an experiment in mind, I'd love to hear it and run it!
Yes, we're well aware of this awesome work! We mention it in our intro. The difference is who writes the program. With Tracr or ALTA, a person writes it in RASP or ALTA's language, and the compiler turns it into weights. In our case, Claude gets a description of the task, then designs the algorithm, decides what every weight means and writes every weight itself.
ImageNet would be an INSANE extension to this! We're working on it. Stay tuned 🚀
Totally agree! Each transformer here is written for one task, so it's far from a general learner yet. That's next on our list actually, putting these modules side by side in one transformer w/ a router that sends each input to the right one. We also want to see if training from Claude's weights keeps their abilities or washes them out.
@y_mehtu Thanks for sharing, that looks really cool! 🔥 Interpretability is one of the parts we're most excited about too, since Claude picks what every number means before setting it. We'll def give it a read!
Ofc, a Python script would solve it. The point here is not to solve these reasoning problems per se. We aim to show that you can solve them using weights, and that an LLM can find those weights. Current learning algorithms, like the gradient descent that trains our modern LLMs, cannot find that part of weight space though. When we train the exact same architecture from scratch, we get 0%. Also, the best gradient-descent trained looped models top out at 93.5%. So the solution exists in weight space, and the question is how to reach it.
There's a second payoff that a script doesn't give you. Because Claude wrote every weight, we know what each number means. That makes these models ground truth for interpretability tools, since you can check whether a tool recovers the algorithm you know is there.
I hope this makes sense.
Thanks for your take on this, Puneet!
For a human, a maze is insanely easy! For state of the art LLMs like LDT, TRM, HRM and Claude itself, they couldn't solve such simple problems.
Also, our transformer can scale to ANY problem size, even a trillion-by-trillion maze, given enough compute, and it will achieve 100% accuracy every single time.
If you have harder reasoning algorithmic problems, please do DM me and I'll evaluate them!
Exactly! The Tracr point is really interesting. There's no compiler in our setup though, Claude writes the formula for every weight directly in numpy. So in a way, Claude is acting as the Tracr here!
And it goes the other way too. We gave fresh Claude sessions only the maze weights, w/out telling them it's a maze, and they worked out the whole algorithm in about 2 mins