MATH · IN · MODELS

Transformer-Patcher corrects mistakes by adding one key-value neuron per patch

measured in 1 paper

Huang et al. correct a mistake by appending one key row and one value column to the last FFN layer, adding a key direction that detects the trigger via inner product and a value direction to the output [huang-etal-2023-transformer-patcher] This is the same outer-product pattern as ROME but realized by growing the weight matrices rather than editing existing entries [huang-etal-2023-transformer-patcher] A margin-based memory loss enforces locality across many sequential patches, not any geometric constraint between different patches' key directions [huang-etal-2023-transformer-patcher] It uses rather than finds geometry, correcting thousands of sequential mistakes on BERT-base and BART-base where MEND and KnowledgeEditor collapse after only a few [huang-etal-2023-transformer-patcher]

Context

matrix growth (new key-value neuron) instead of weight modification, margin-based memory loss for locality, not geometric interference between key directions, USES not FINDS (FFN-as-key-value-memory framing, no pre-existing-geometry claim), robustness to thousands of sequential edits where hypernetwork-based editors collapse

Papers

Transformer-Patcher: One Mistake Worth One Neuron — Huang, Zeyu, Shen, Yikang, Zhang, Xiaofeng, Zhou, Jie, Rong, Wenge, Xiong, Zhang2023 · arXiv:2301.09785