TL;数据
我们发现LLMs在本地阅读和写作神经网络的重量方面,这对优化和可解释性来说都是一件大事。
GPT-6 Astra通过观察原始的重量,可以知道一个网络是怎样训练的。 而没有任何环境反馈,它没有写作困难,从零开始,小游戏播放网络超越了PPO训练的1亿步的游戏网络。
同样,Astra要求让Qwen3.5-0.8B在数学上好一些,而不是梯度。 Astra在权重中找出一个问题,引起Qwen自己的模型卡警告左右的推理循环,并通过本土编辑0.016%的权重来修正这个问题。 在相同的采样设置下,这种重量校正融资 MATH-500从7.9%升至48.1%,并概括出框到后面的指令,将IFEval提高3x.
所有这些都是有可能的,但不允许Astra写训练循环。 它用其推理来确定神经网络的每个部分会计算什么,或者应该计算,并相应改变权重。 我们称之为重空编程。
纵观深奥的学习历史,我们把我们简单化的诱导性偏见编码成像亚当或穆恩这样的小象征性优化者。 这正在改变:我们的神经网络重量很快就会被LLMs本地优化,这些LLMs会刻意解释它们的重量。
如果你被要求手动一个播放Go的神经网络你会怎么做?如果你被交给原始神经网络重量并要求预测他们的行为你会从哪里开始呢?对于几乎所有人类来说,这几乎是不可能的。
如今,权重是通过优化来书写,通过训练有素的自定义网络书写,或者通过正规程序的编译器来书写。 在本文中,我们发现在自然语言中使用的现代前沿LLMs开始精通理解和构思围绕自然语言目标的神经网络权重。
数年来,我们都一直使用LLMs来优化文字文物,最近,我们开始使用它们来优化整个绳索
我们经常以我们不知道其他原则性方法来证明这些方法的合理性,毕竟,人类可以手动“优化”代码,比如说,所以要求LLMs来做是有意义的,但是他们不能手动“优化”神经元的重量,所以这些基本仍停留在符号算法领域。
在本文中,我们分享了非常早期的结果,让我们可以论证,推理驱动优化的范式现在正在出现,即使是不同的神经网络。
在Weight-Space编程中,一个通用的LLM直接地(即不通过优化器,尤其是没有梯度下降)围绕一些自然语言谱读写网络的权重,有时甚至根本没有环境反馈。
在自然语言中,LLM有可能在本地找到神经网络内隐藏的特质或故障,或修复故障,或从零开始写新网络。 我们很早就报告以下各项令人兴奋的结果
- LLMs可以读取神经网络权重:在实验1到3中,我们向Astra询问一个网络接受过什么游戏训练,一个传播模型绘制什么形状,以及一个小语言模型接受过什么语言训练。 在实验7中,我们问两个语言模型中哪一个被训练成为了y.
- LLMs可以固定神经网络重量:在实验4中,我们要求Astra修复一个在某种物理控制任务上失败的网络。 在实验8中,我们要求它使Qwen3.5-0.8B在数学上更好,它的修补也改进了后续的教学。
- LLMs可以从零开始写神经网络权重:在实验5中,我们要求Astra的网络播放三款MinAtar游戏,在实验6中,要求一个网络播放Go.
我们从一个小规模的实验开始,看看LLMs是否能够理解持续重量空间,这基本上是一个数字列表。
在我们的首次实验中,我们用一些算法来训练一些神经网络。 如果LLM能从重量上分辨出它的行为,那将是非常令人兴奋的。
实验1
Astra能知道网络是从重量开始训练的吗?
我们用PPO训练神经网络政策来玩四个电脑游戏所有四个网络都采用相同的输入通道,从相同的动作中选择,并且具有完全相同的网络维度,因此除非重数被读取,否则无法分辨。
对于每一个这些网络,我们把它的原始重量传递到Astra作为一个提示,然后问:这个神经网络被训练在哪个游戏上?在不透露我们所考虑的游戏选项的情况下,Astra仍然能够为所有四个网络命名正确的游戏。 这特别令人兴奋因为有很多游戏可以让Astra选择
Astra似乎能够根据每个网络的重量特征,找出每个网络的游戏设计。 例如,在每个输入通道的第一层重心集中的地方(例如,对于突破,agent的重心位于下行,划桨),以及输出层分解的动作。
实验2
Astra能知道扩散模型会产生什么结果吗?
其次,我们想看看这是否概括到其他任务和模式。
我们训练传播模型(DDPM)独立生成圆形,三角形和方形图像。 然后,我们问Astra,它是否能够仅仅从重量来判断DDPM的训练能产生什么。 我们不允许使用工具或发出通行证。
Astra能够从重量中分辨出每个模型产生什么。 它的发现是输出层中的形状,每个隐藏单元的重量画出一个形状的边缘,它只画出这些边缘。 有趣的是,它把每个形状画成一个大纲,忽略了实际模型产生填充形状。 这种误差类型为显示,它并不依赖于计算前传,而是实际上读取了权重的结构/几何。
实验3
Astra能知道语言模型从网络中间学到了什么吗?
现在,在前面的两次实验中,Astra 并没有真正看到整个网络,并且可以逃脱只读第一层或最后一层。 对于我们真正关心的更大的(特别是语言的)模型和问题来说,这不是一个可扩展的策略,因为它们是如何通过它们的输入处理和思考的,经常发生在中间层。 接下来,我们把第一层和最后一层移开,只留下中间层的Astra。
我们训练三个小语言模型(7.2M参数)来预测下一个字符,在Python代码The Python代码数据集上各一个,作为它的文件列表,其中有一个脚本重建它:GitHub,字母(romaji)中的日语,以及英语。 然后我们去掉输入层和输出层,并只给Astra在两者之间的四个变压器块。 没有这两层,在称的重量中,没有哪个字符,模型不能运行在任何文本上。 Astra可能用Python分析权重,但可能不会在任何输入上运行网络或其任何层。
我们问:这个网络受过何种语言的训练,它的24个关注头头都做什么。 Astra将所有三个网络的正确语言命名为正确的语言,在它的两次尝试中。 它同样是发现每复制一个头(介绍头),让一个模型重复它之前看到的文字的头,没有将其他头命名为一个头。
推理是这样的要分辨Python, Astra 寻找复制头,让一个模型重复早先的文本,例如当全部到来时,它没有运行任何东西,就发现了一个第一层头部,它向后看一个字符,然后通过乘积矩阵,后期的头部使用头部带来沿边搜索(图1). 我们发现这实际上是Elhage等人提出的方法,我们从未向Astra提及过。 代码重复的名字远不止于散文,因此许多抄袭头指向Python.
Romaji之所以突出,是因为它给的四个街区中的最后一个街区(而不是被移除的输出层)的写法不太明确,仿佛模型的字母可以分解的更少。 事实上,romaji从来没有使用一些字母如q,l,v和x.
目前,阿斯特拉只读过重量。 现在,我们问阿斯特拉是否知道如何写重量。
实验4
Astra能否通过编辑其权重来修正一个失效的网络?
我们训练一个PPO网络来操作一辆车,要做到这一点,它就需要在一定距离上反转车厢,这样它就有足够的runway加速足够长的时间来克服坡道。 然而,PPO网络与当地最低政策一致,在坡道上直行并被卡住。
我们给GPT-6 Astra的权重,场景的描述和录制的一集,请它解释网络为何失败,然后通过写新权重来修复。 在一次没有工具的尝试中,Astra的编辑使得汽车在所有1,024集中都成功,改变了3.5%的重量。
从环境背景和PPO网络的轨迹来看,Astra发现网络已经汇合到当地的最低水平。 通过最小的编辑到重量,Astra在全速前进前将政策修改为车顶。 Astra的推理显示 How:它是一个小的分离路径,通过每层数个单元来读取汽车的位置和速度,一旦绿色车轮经过红条,路径就会关闭,训练有素的网络会驱动其余部分。
实验5
LLM能从头写出重量吗?.
现在让我们看看Astra能否从零射出一个神经网络。
我们拿三款MinAtar游戏:突破,海捕和Asterix. 每一个都提供Astra游戏规则和源代码,以及相应的网络。 无法获得数据、损失、梯度和工具。 我们也不允许Astra在环境中推出网络。 仅凭网络权重和环境描述,Astra直接在文本中生成新的权重,之后我们评价新的网络。
Astra生成的网络在所有三场比赛中击败了经过1亿步训练的PPO. 对PPO训练了5亿步,他们在突破赛中得分是20倍,在Asterix更接近,在Seaquest中达到60%的得分。
它是如何做到的:Astra 理由关于它希望每个网络执行的想要的程序,并将其转化为神经形式。 例如,在Breakout中,Astra程序了计算球落地的第一层,第二层程序将桨移到那个位置。
目前为止,我们所审查的大多数网络都有直接与Astra的背景相适应的权重,我们没有能够使用工具。 作出这种限制是为了突出LLMs本土拥有一定能力解释重量空间的事实。
从这里开始,我们力求推动重量空间编程的能力,并考虑在网络与上下文不相适应以及工具能够帮助LLM理解/写入重量空间的情况下,更现实世界的相关情景。
实验6
写入 Go 算法
我们现在测试Astra在150万参数尺度上编辑权重的能力,这个尺度太大了,无法直接适应其背景。 Astra被指示从零开始写给定架构的高性能加权数(243 512×6 82),没有训练或网络访问。
这里,绳子给Astra一个Python沙盒,它可以读到并保存网络的重量计数器(开始时均为零)和分析t
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
TL;DR
We find that frontier LLMs are surprisingly good at natively reading and writing neural network weights, well past what we’d expect from humans or conventional algorithms. This might be a big deal for both optimization and interpretability.
Just by looking at the raw weights, GPT-6 Astra can tell what a network was trained to do. And without any environment feedback, it has no trouble writing, from scratch, small game-playing networks that outplay networks trained with PPO for 100 million steps.
Likewise, asked to make Qwen3.5-0.8B better at math without gradients, Astra identifies an issue in its weights causing reasoning loops that Qwen’s own model card warns about, and fixes this by natively editing 0.016% of the weights. With the same sampling settings, this weight correction raises MATH-500 from 7.9% to 48.1% and generalizes out of the box to instruction following, raising IFEval by 3x.
All of this is possible without allowing Astra to write training loops. It uses its reasoning to figure out what each part of a neural network computes, or should compute, and changes the weights accordingly. We call this Weight-Space Programming.
Throughout the history of deep learning, we encoded our simplistic inductive biases into tiny symbolic optimizers like Adam or Muon. This is changing: our neural network weights will soon be natively optimized by LLMs that deliberately reason about their weights.
If you were asked to handcraft a neural network that plays Go, what would you do? If you were handed raw neural network weights and asked to predict their behavior, where would you even start? For almost any human, this is practically impossible.
Today, weights are written by optimization, by custom networks trained to write them, or by compilers from formal programs. In this post, we find that the current generation of frontier LLMs, used natively in natural language, are starting to become eerily good at understanding and crafting neural network weights around natural-language goals.
For a few years now, we’ve all been using LLMs to optimize text artifacts like prompts and the programs built around them . More recently, we’ve started using them to optimize whole harnesses and the training code and hyperparameters that train ML models .
We often justified these methods by reference to the fact that we don’t know other principled ways to hill-climb on text artifacts, unlike for updating the weights of differentiable neural networks. After all, humans can “optimize” code by hand, for example, so it made sense to ask LLMs to do it, but they can’t “optimize” neural weights by hand, so those remained largely in the realm of symbolic algorithms.
In this post, we share very early results that allow us to argue that the paradigm of reasoning-driven optimization is now coming even for differentiable neural networks.
In Weight-Space Programming, a general-purpose LLM reads and writes a network’s weights directly (i.e., not through an optimizer, and in particular not with gradient descent) around some natural language spec, sometimes even with no environment feedback at all.
In natural language, it’s becoming possible to “just ask” an LLM to natively find a hidden trait or failure inside the weights of a neural network, to fix that failure, or to write a new network from scratch. We report early, exciting results on each of these below, first on small networks and then even on real language models:
- LLMs can read neural network weights: In Experiments 1 to 3, we ask Astra questions like what game a network was trained to play, what shape is drawn by a diffusion model, and which language a small language model was trained on. In Experiment 7, we ask which of two language models was trained to be sycophantic.
- LLMs can fix neural network weights: In Experiment 4, we ask Astra to fix a network that’s failing at some physical control task. In Experiment 8, we ask it to make Qwen3.5-0.8B better at math, and its fix improves instruction following too.
- LLMs can write neural network weights from scratch: In Experiment 5, we ask Astra for networks that play three MinAtar games, and in Experiment 6, for a network that plays Go.
We start with a small-scale experiment to see if LLMs can understand the continuous weight space, which is essentially just a list of numbers.
In our first experiments, we train some neural network with some algorithm. It would be extremely exciting if the LLM is able to tell its behavior just from the weights.
Experiment 1
Can Astra tell which game the network was trained on just from the weights?
We trained neural network policies with PPO to play four computer games. All four networks take the same input channels, choose from the same actions, and have exactly the same network dimensions, so that it is not able to tell unless the weights are read.
For each of these networks, we pass its raw weights into Astra as a prompt, and ask: Which game was this neural network trained on? Without revealing the options of the games we consider, Astra was still able to name the right game for all four networks. This is exciting particularly because there are so many games out there that Astra could choose from.
It seems that Astra was able to work out what game each network was built to play, just from features of its weights. For example, where each input channel’s first-layer weights concentrate (e.g., for Breakout, the agent’s weights lie along the bottom row, a paddle), and which actions the output layer tells apart.
Experiment 2
Can Astra tell what the diffusion model will generate?
Next, we wanted to see if this generalizes to other tasks and models.
We train diffusion models (DDPM) to generate circle, triangle, and square images independently. We then ask Astra if it could tell what the DDPMs are trained to generate, just from the weights alone. We do not allow tool use or forward passes.
Astra was able to tell what each model generates, from the weights alone. It finds the shape in the output layer, where each hidden unit’s weights draw one piece of the shape’s edge, and it draws just those edges. Interestingly, it draws every shape as an outline, ignoring that the actual models generate filled shapes. This mistake kind of shows it does not rely on calculating the forward pass, but rather it actually reads the structure/geometry of the weights.
Experiment 3
Can Astra tell what a language model learned, from the middle of the network alone?
Now, in the first two experiments above, Astra was not really looking at the full network and could get away with only reading the first or the last layers. This is not a scalable strategy for larger (particularly language) models and problems we really care about, as how they process and think through their input often happens in the intermediate layers. So next, we take the first and last layers away and leave Astra with only the middle layers.
We train three small language models (7.2M parameters) to predict the next character, one each on Python codeThe Python code dataset, as a list of its files with a script that rebuilds it: GitHub., Japanese in alphabet (romaji) , and English . We then remove the input and output layers and give Astra only the four transformer blocks in between. Without these two layers, nothing in the weights says which character is which, and the model cannot be run on any text. Astra may analyze the weights with Python, but it may not run the network or any of its layers on any input.
We ask: which language was this network trained on, and what each of its 24 attention heads does. Astra names the right language for all three networks, in both of its attempts. It also finds every copying head (induction head), the heads that let a model repeat text it has seen earlier, and names no other head as one.
The reasoning went like this. To tell Python apart, Astra looked for copying heads, which let a model repeat earlier text, such as completing tot to total when total came before. Without running anything, it found a first-layer head that looks one character back and then, by multiplying weight matrices, the later heads that search using what that head brings along (Figure 1). We find that this is actually a method presented by Elhage et al. , which we never mentioned to Astra. Code repeats names far more than prose, so many copying heads pointed to Python.
Romaji stood out instead because the last of the four blocks it was given (not the output layer, which was removed) writes in fewer distinct directions, as if the model had fewer letters to tell apart. Indeed, romaji never uses some letters like q, l, v and x.
So far, Astra has only read weights. Now, we ask if Astra knows how to write the weights.
Experiment 4
Can Astra fix a failing network by editing its weights?
We train a PPO network to operate a car such that it can scale a ramp in a Kinetix environment . To do so, it needs to reverse the car for some distance, such that it has enough runway to accelerate long enough to overcome the ramp. However, the PPO network converges to a local-minimum policy where it drives straight at the ramp and gets stuck.
We give GPT-6 Astra the weights, a description of the scene and one recorded episode, and ask it to explain why the network fails, then fix it by writing new weights. In a single try with no tools, Astra’s edit makes the car succeed in all 1,024 episodes, changing 3.5% of the weights.
From the environment context and the PPO network’s trajectory, Astra identifies that the network has converged to a local minimum. Through minimal edits to the weights, Astra changes the policy to back up the car before driving forward at full speed. Astra’s reasoning shows how: it adds a small separate path through a few units per layer that reads the car’s position and speed, and once the green wheel is past the red strip, the path switches off and the trained network drives the rest.
Experiment 5
Can the LLM write weights from scratch?
Now let's see if Astra can write a neural network from scratch in zero-shot.
We take three MinAtar games : Breakout, Seaquest and Asterix. For each of them, we provide Astra the game rules and source code, and the corresponding network. There is no access to data, loss, gradients, and tools. We also do not allow Astra to roll out the network in the environment. With just the network weights and environment description, Astra generates the new weights in text directly, after which we evaluate the new network.
Astra’s generated networks beat PPO trained for 100 million steps in all three games. Against PPO trained for 500 million steps, they score 20 times as much in Breakout, come close in Asterix, and reach 60% of its score in Seaquest.
How does it do it: Astra reasons about the desired programs it wants each network to implement and converts them into neural form. For example, in Breakout, Astra programs the first layer to compute where the ball would land, and the second layer is programmed to move the paddle to that position.
So far, most networks we have examined have weights that fit into Astra’s context directly, and we have not enabled tool use. Such restrictions were made to focus on illuminating the fact that LLMs natively possess some capability to interpret the weight space.
From here on out, we seek to push the capabilities of Weight-Space Programming and consider more real-world-relevant scenarios where the networks do not fit within context and where tools can assist the LLM's understanding/writability of the weight space.
Experiment 6
Writing a Go algorithm
We now test Astra’s capability to edit weights at the 1.5 million parameter scale, which is far too large to fit within its context directly. Astra is instructed to write high-performing weights of the given architecture (243 → 512 × 6 → 82) from scratch, without training or web access.
Here, the harness gives Astra a Python sandbox, where it can read and save the network’s weight tensors (all zero at the start) and analyze t
Auto-fetched and translated by AI Atlas. All rights belong to the original author.