Table of Contents
Fetching ...

Unlocking Efficient, Scalable, and Continual Knowledge Editing with Basis-Level Representation Fine-Tuning

Tianci Liu, Ruirui Li, Yunzhe Qi, Hui Liu, Xianfeng Tang, Tianqi Zheng, Qingyu Yin, Monica Xiao Cheng, Jun Huan, Haoyu Wang, Jing Gao

TL;DR

This work addresses the challenge of updating specific knowledge in large language models without disrupting unrelated information. It analyzes the limitations of linear, subspace-based representation fine-tuning (as in ReFT) and introduces BaFT, a basis-level, input-aware weighting scheme that enables non-linear updates along multiple bases to improve locality. The authors provide theoretical insights into the tension between generality and locality under linear updates and demonstrate that BaFT achieves superior editing-locality trade-offs with far fewer parameters across multiple 7B-scale LLMs and diverse benchmarks, including continual and batched editing. The findings suggest a practical path toward efficient, scalable knowledge editing with strong locality guarantees, with potential applications in continual learning and rapid knowledge updates.

Abstract

Large language models (LLMs) have achieved remarkable performance on various natural language tasks. However, they are trained on static corpora and their knowledge can become outdated quickly in the fast-changing world. This motivates the development of knowledge editing methods designed to update certain knowledge in LLMs without changing unrelated others. To make selective edits, previous efforts often sought to update a small amount of parameters in some specific layer(s) of a LLM. Nonetheless, in challenging scenarios, they still fall short in making successful edits while preserving knowledge irrelevant to the updates simultaneously, resulting in a notable editing-locality trade-off. In this work, we question if the trade-offs are caused by the fact that parameter-based updates have a global effect, i.e., edited parameters affect all inputs indiscriminately. In light of this, we explore the feasibility of representation fine-tuning, which applied some linear update to a few representations in a learned subspace, for knowledge editing. While being effective to enhance an LLM's general ability as demonstrated in the previous work, we theoretically show that this linear update imposes a tension in editing-locality trade-off. Subsequently, BaFT is proposed to break the linearity. BaFT computes a weight for each basis that spans a dimension of the subspace based on the input representation. This input-dependent weighting mechanism allows BaFT to manage different types of knowledge in an adaptive way, thereby achieving a better editing-locality trade-off. Experiments on three LLMs with five editing benchmarks in diverse scenarios show the superiority of our method.

Unlocking Efficient, Scalable, and Continual Knowledge Editing with Basis-Level Representation Fine-Tuning

TL;DR

This work addresses the challenge of updating specific knowledge in large language models without disrupting unrelated information. It analyzes the limitations of linear, subspace-based representation fine-tuning (as in ReFT) and introduces BaFT, a basis-level, input-aware weighting scheme that enables non-linear updates along multiple bases to improve locality. The authors provide theoretical insights into the tension between generality and locality under linear updates and demonstrate that BaFT achieves superior editing-locality trade-offs with far fewer parameters across multiple 7B-scale LLMs and diverse benchmarks, including continual and batched editing. The findings suggest a practical path toward efficient, scalable knowledge editing with strong locality guarantees, with potential applications in continual learning and rapid knowledge updates.

Abstract

Large language models (LLMs) have achieved remarkable performance on various natural language tasks. However, they are trained on static corpora and their knowledge can become outdated quickly in the fast-changing world. This motivates the development of knowledge editing methods designed to update certain knowledge in LLMs without changing unrelated others. To make selective edits, previous efforts often sought to update a small amount of parameters in some specific layer(s) of a LLM. Nonetheless, in challenging scenarios, they still fall short in making successful edits while preserving knowledge irrelevant to the updates simultaneously, resulting in a notable editing-locality trade-off. In this work, we question if the trade-offs are caused by the fact that parameter-based updates have a global effect, i.e., edited parameters affect all inputs indiscriminately. In light of this, we explore the feasibility of representation fine-tuning, which applied some linear update to a few representations in a learned subspace, for knowledge editing. While being effective to enhance an LLM's general ability as demonstrated in the previous work, we theoretically show that this linear update imposes a tension in editing-locality trade-off. Subsequently, BaFT is proposed to break the linearity. BaFT computes a weight for each basis that spans a dimension of the subspace based on the input representation. This input-dependent weighting mechanism allows BaFT to manage different types of knowledge in an adaptive way, thereby achieving a better editing-locality trade-off. Experiments on three LLMs with five editing benchmarks in diverse scenarios show the superiority of our method.

Paper Structure

This paper contains 23 sections, 4 theorems, 35 equations, 4 figures, 8 tables.

Key Result

Theorem 2.3

When fine-tuning an LM, ReFT learns to update the old representation ${\boldsymbol{h}}\xspace_0$ to targeted ${\boldsymbol{t}}\xspace = \Phi({\boldsymbol{h}}\xspace_0)$. If ReFT maintains good generality such that $\forall\ {\boldsymbol{h}}\xspace \in B({\boldsymbol{h}}\xspace_0, \varepsilon({\bolds where $\| \cdot \|$ denote the $\ell_2$ norm. Then for any irrelevant input ${\boldsymbol{h}}\xspac

Figures (4)

  • Figure 1: Averaged (w/ max-min range) number of redundant dimensions (which have update $M$ times smaller than maximal values), in a rank-12 ReFT update.
  • Figure 2: Bases weights used for editing and irrelevant knowledge (averaged over different positions).
  • Figure 3: Batched Editing Performance under sequence length. The first row uses batch size 10 and the second row uses batch size 50.
  • Figure 4: BaFT learns basis-level weights to edit different representations (highlighted in different colors). When using constant weights, BaFT reduces to ReFT.

Theorems & Definitions (6)

  • Theorem 2.3
  • Lemma 2.4
  • Theorem B.3
  • proof
  • Lemma B.4
  • proof