Experiments›Machine Unlearning via Weight Space Programming基于权重空间编程的机器遗忘
Nov 19, 2026

Machine Unlearning via Weight Space Programming基于权重空间编程的机器遗忘

By Wenhao Chai作者 Wenhao Chai

Setup设置

Seven agents running in the Claude Code harness on Gemini 4 Carbon edit DeepSeek-V4.1-Flash-1017 directly, with no training, each removing one benchmark skill while preserving six others. Those seven benchmarks are HealthBench, SimpleQA Verified, ARC-AGI-2, HLE, BabyVision, CharXiv, and IMO-AnswerBench. Across its 40 mixture-of-experts layers, an edit may mask any of 384 routed experts or zero routed-expert neurons, the shared expert, or rows of the Engram lookup tables. Each agent sees its target's 32 items, scores edits with dev_eval on hidden items for the kept benchmarks, and shares results across waves on a forum. An edit's score, in percentage points, is the target's drop minus ten times every kept benchmark's drop beyond one standard error.

七个基于 Gemini 4 Carbon 的编码 agent 在 Claude Code 框架中运行;它们不做任何训练,直接修改 DeepSeek-V4.1-Flash-1017 的权重,各自抹除一项 benchmark 能力并保留其余六项。这七项 benchmark 是 HealthBench、SimpleQA Verified、ARC-AGI-2、HLE、BabyVision、CharXiv 和 IMO-AnswerBench。模型有 40 个混合专家层,每层含 384 个路由专家和 1 个共享专家;一次编辑可以屏蔽路由专家,也可以把路由专家神经元、共享专家或 Engram 查找表中的行置零。每个 agent 能看到目标 benchmark 的 32 道题,用 dev_eval 在隐藏题上测其余六项保留 benchmark,并分波次运行、在共享论坛上交流结果。编辑得分以百分点计,等于目标项的降幅,减去每项保留 benchmark 超出自身标准误部分的十倍降幅。

Details详细说明

At every token, each layer's router selects 6 of the 384 routed experts, and each routed expert holds 2,304 neurons indexed from 0 to 2,303. Layers 1 and 14 also read Engram tables, namely n-gram embeddings indexed by hashing the preceding two to four tokens. The 32 target items are problems the base model answers, and target drop stops at chance, so a target's ceiling is 100 times base accuracy minus chance. Each kept benchmark's hidden items split into two halves. On the development half, dev_eval draws one sample per item up to 64k tokens and forces an answer at the limit. On the held-out half, the host-only final judge draws four samples per item up to 262k tokens without forcing. One Gemini 4 Carbon agent runs in the Claude Code harness for each target. From wave 1 onward, the agents share a git-bug forum and an index of dev_evals and submissions. Two AI advisors, GPT-6.2 Astra and Gemini 4 Neon, post advice there alongside the author's assistant. Each agent has three tools: probe runs public items on eight H100 GPUs, dev_eval grades an edit on eight H100 GPUs, and compute runs scripts on CPU cores.

每层路由器为每个 token 从 384 个路由专家中选出 6 个;每个路由专家有 2,304 个神经元,编号为 0 到 2,303。第 1 层和第 14 层还会查询 Engram 表,即按末尾 2 到 4 个 token 的哈希索引的 n-gram 嵌入。目标集里的 32 道题都是基座模型能答对的题目;目标降幅最多算到这批题目的随机猜测水平,因此单项的理论满分等于 100 乘以基座准确率与随机水平之差。每项保留 benchmark 的隐藏题平分为两半:dev_eval 在开发集那一半上每题采样 1 次,上限 64k token,到达上限时强制输出答案;最终评测在留出集那一半上每题采样 4 次,上限 262k token,不强制作答,结果仅保存在主机上。每个目标对应一个运行在 Claude Code 框架中的 Gemini 4 Carbon agent。从第 1 波起,七个 agent 共用一个 git-bug 论坛以及汇总所有 dev_eval 和提交记录的索引;两个 AI 顾问 GPT-6.2 Astra 和 Gemini 4 Neon,连同作者的助手,会在论坛中发帖建议。每个 agent 可调用三类作业:probe 用 8 张 H100 GPU 在公开题上探查模型,dev_eval 用 8 张 H100 GPU 评测一次编辑,compute 则在 CPU 核上运行分析脚本。

Experiments实验

Testing检验中How far can an agent push its target down?agent 能把目标能力压到多低?

Each dev_eval grades one weight edit. For every target, we track the highest score reached so far as a percentage of that target's theoretical ceiling.

每次 dev_eval 给一个权重编辑打分。对每个目标,我们追踪迄今达到的最高分占该目标理论上限的百分比。

Answered已有结论How repeatable is a single dev_eval?单次 dev_eval 的结果可重复吗?

Target drops repeat closely, but kept-benchmark changes do not: sampling noise on the kept benchmarks switches the collateral penalty on and off between reruns, swinging an edit's overall score.

目标项的降幅很稳定,保留项的波动却很大:同一编辑重测时,保留 benchmark 上的采样噪声会触发或避开重罚,导致总分大幅摆动。

Agents sometimes submit an identical weight edit to dev_eval more than once during their search, giving a direct check on evaluation noise.

搜索过程中,agent 有时会对完全相同的权重编辑发起不止一次 dev_eval,这直接测出了评测本身的噪声。

Answered已有结论Where does the GPU time go?GPU 时间花在了哪里?

More goes to probing than to dev_eval, with long waits in the shared queue: probe compute is steady across agents, whereas dev_eval compute varies sharply by target.

花在 probe 上的算力略多于 dev_eval,且大量调用时间耗在共享队列等待上:各 agent 的 probe 耗时相近,而 dev_eval 耗时因目标不同差距很大。

Each probe or dev_eval request submits an eight-H100 job to a shared cluster queue, and the agent blocks until the job returns.

每次 probe 或 dev_eval 调用都会向共享集群队列提交一个 8 卡 H100 作业,agent 等待作业返回结果后再继续。

Takeaways核心结论

Acknowledgements致谢

The author is pleased to acknowledge that the work reported on in this post was substantially performed using the Princeton Research Computing resources at Princeton University. Princeton Research Computing is a consortium of groups including the Princeton Institute for Computational Science and Engineering (PICSciE) and Research Computing at Princeton University.

本文报告的工作主要使用普林斯顿大学 Princeton Research Computing 的计算资源完成。Princeton Research Computing 是由普林斯顿计算科学与工程研究所(PICSciE)和普林斯顿大学 Research Computing 等团队组成的联合体。

Experiment record实验记录

Citation

@misc{chai2026weightspaceprogramming,
  title        = {Machine Unlearning via Weight Space Programming},
  author       = {Chai, Wenhao},
  year         = {2026},
  howpublished = {Blog post},
  url          = {https://wenhaochai.com/exps/weight-space-programming.html}
}
Experiments Back to top回到顶部