Self-Rewriting Lets a 27B Model Rewrite Its Own Weights Without Training, Boosting Accuracy on New Problems by 6.6 Percentage Points
English text is being prepared.
Researchers from UIUC, Yale, CMU, Rutgers, Princeton, and Stanford introduced Self-Rewriting, which enables Qwen3.5 27B to rewrite its own weights through reasoning without gradients or an optimizer. On 490 unseen math problems, the best modification increased accuracy from 57.2% to 63.8%. After repairing corrupted weights, accuracy on text-based math problems recovered from 0.0% to 33.0%, while performance across six image benchmarks rose from 7.3% to 70.2%. Under the same process, the 2B model failed to complete the modification, while the 4B and 9B models corrupted themselves; only the 27B model was able to improve itself and repair a corrupted copy.
Why read this
SelectedAI score 78
The research demonstrates a path for models to rewrite their weights without gradients or an optimizer, and reveals a link between this self-repair capability and model scale.
Topics
Body
来自 UIUC、Yale、CMU、Rutgers、Princeton 和 Stanford 的研究者们提出 Self-Rewriting:27B 开源模型无需训练改写自身权重,新题准确率提升 6.6 个百分点
Language Models Can Rewrite Their Own Weights https://arxiv.org/abs/2611.21885
# 让模型自己改权重
语言模型通常训练一次就被冻结。再要变好,要么重新训练,要么在推理时多花计算,而多花的计算用完就没了,不会写进权重里。UIUC 的 Jiajun Fan、刘謌,以及来自卡内基梅隆、罗格斯、普林斯顿、斯坦福和耶鲁的合作者,给出了第三条路,叫做 Self-Rewriting:模型靠自己的推理改写自身权重,全程没有梯度,也不做训练。
做法是给模型开一轮会话。它先看到自己在练习题上的评分结果,然后每一步可以选一件事:用 Python 读写权重、读取隐状态,或者让改前和改后的自己用同一道题、同一个随机种子对照作答。系统关掉了梯度,也不允许调用优化器。每轮最多跑 200 次代码、20 次前向计算。实验用的是 Qwen3.5 系列,主力是 27B。
# 改完之后,新题上确实更好了
在需要先检查再提交的那套流程里,27B 连续做了八轮,每轮都从原始权重起步。提交前,框架会在模型读不到的练习题上先测一次,再由模型决定提交还是撤回。八轮里有五轮撤回,三轮提交;提交的版本会替换当时在用的模型,准确率只升不降。收益最大的几轮,大概只需单卡运行几小时。
最好的一轮,是给所有线性注意力层的时间步偏置统一加了 0.5,超时写不完的比例从 33.6% 降到 26.1%。在 490 道从未见过的数学题上,每题用相同设置答八次,准确率从 57.2% 升到 63.8%,提高了 6.6 个百分点。另一轮也提高了 4.0 个百分点。改动写进权重之后,以后答题不必再额外加计算。
# 损坏的副本也能修,而且会随规模出现
他们另外做了修复实验:把第 30 层 MLP 输出矩阵里连续 8 行换成很强的噪声,损坏后的副本几乎解不出题。负责思考和写代码的是完好的 27B,但它读到的权重、隐状态和答题结果都来自损坏副本,而且从未去对照原始权重。模型自己定位到被破坏的那块矩阵,把过大的权重按中位数的 15 倍裁掉。在 200 道未见过的文本数学题上,准确率从 0.0% 回到 33.0%,原模型是 58.5%。这套只在文本上找到的修复,放到六个从未见过的图像基准上,准确率从 7.3% 升到 70.2%,相当于原模型 84.3% 准确率的 83%。
同样的任务和工具分给 2B、4B、9B 和 27B:2B 没改成,4B 和 9B 会把自己改坏,只有 27B 既能改好自己,也能修好损坏的副本。
AI Trends