Open Interpretability Models Contributors Research Posts About

Transformer-Patcher: One Mistake worth One Neuron

Source

Citation. Zeyu Huang, Yikang Shen, Xiaofeng Zhang, Jie Zhou, Wenge Rong and Zhang Xiong. The affiliations are Beihang University, Mila and the University of Montreal, and WeChat AI at Tencent. "Transformer-Patcher: One Mistake worth One Neuron". arXiv:2301.09785, version 1 of 24 January 2023, the only version. The arXiv comment says "accepted in ICLR 2023". We didn't check that on OpenReview. The code is at github.com/ZeroYuHuang/Transformer-Patcher. Funding: the State Key Laboratory of Software Development Environment of China, grant SKLSDE-2023ZX-16. The text gives no disclosure of tool use.

Mismatch. Appendix B computes the mistakes per folder from the accuracy, not the error rate, but the counts come out close. Section 5.1 says the runs were repeated "2020 times", and Appendix B says 20. The text gives GeLU(−3) as about 0.004, but it is about −0.004.

Status. Planned. #5220 names it as the closest published method to its arms G (a written unit) and I (a gated corrector). The fix campaign is the maintainer's, so this page reports evidence and records questions only.

Read. On 2026-11-20 a web-fetch subagent read the abstract page and the HTML of version 1 for this page's author, a model (Claude Opus 5.5). It read the source's own text in full, in two fetches: Sections 1 to 6, the references and Appendices A to C. The PDF came back as binary, so we didn't read it. We didn't see any figure as an image. So the success-rate curves of Figure 4 and the locality curves of Figure 7 appear here only as the text describes them. We didn't read the code.

Summary

Claim. A model can be fixed one mistake at a time by adding one neuron to its last FFN layer. Each neuron fires on its mistake and stays silent elsewhere. Over a stream of thousands of mistakes, nearly every edit holds and the model keeps its accuracy.

Method.

Findings, as the source reports them.

Setting Result
Folders, FEVER and zsRE (Table 1) SR 1.00 and 1.00, GR 0.82 and 0.82, ER 1.00 and 0.99, TrainR 0.999 and 0.997, TestR 1.000 and 0.996
Same, fine-tuning all weights (Table 1) GR 0.74 and 0.68, ER 0.83 and 0.43, TestR 0.994 and 0.910
Same, SERA (Table 1) GR 0.89 and 0.90, TestR 0.916 and 0.901
Single stream, zsRE, 2,308 edits (Table 2) SR 0.99, GR 0.81, ER 0.97, TrainR 0.912, TestR 0.948
Single stream, FEVER, 998 edits (Table 7) SR 1.00, GR 0.82, ER 1.00
Ablation, no memory loss (Table 3) GR 0.94 and 0.94, ER 0.61 and 0.21, TrainR 0.737 and 0.069
Mean absolute activation (Table 4) past edits 0.00 on both tasks, random test mistakes 0.05 and 0.10
Layer, zsRE (Section 5.3) layers 0 and 1 make no effective edits. GR rises from about 0.74 at layer 2 to 0.81 at layer 5
Model growth after the single stream 1.4% larger (FEVER) and 4.5% larger (zsRE)

Where the claims go beyond the evidence

The authors name some limits themselves. The edit and test data have different distributions. The patches may overfit to edit examples. And the model grows with each patch.

Use in this repo