Reproduce “AlphaEdit: Null-Space Constrained Knowledge Editing for Language Models” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Junfeng Fang, Houcheng Jiang, Kun Wang, Yunshan Ma, Shi Jie, Xiang Wang, Xiangnan He, Tat-seng Chua

AlphaEdit updates models with new facts while constraining changes to directions that leave preserved key–value associations unchanged. It projects updates into the null space of preserved keys, then optimizes for new facts. On LLaMA3 (8B) after 2,000 sequential Counterfact edits, it outperforms RECT on efficacy, generalization, and specificity. This finding is limited to this setting, not all model knowledge.

Key insights

  • The inherent trade-off in model editing between updating new knowledge and preserving old knowledge can be resolved by projecting perturbations into a null space that decouples these objectives.
  • Maintaining the stability of hidden representations is crucial for preventing catastrophic forgetting and preserving general model capabilities during sequential knowledge updates.
  • Simple, mathematically grounded projection techniques can be integrated into existing model editing methods to significantly boost their performance across various metrics.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.