Table of Contents
Fetching ...

Scalable Model Editing via Customized Expert Networks

Zihan Yao, Yu He, Tianyu Qi, Ming Li

TL;DR

This work tackles the challenge of updating factual knowledge in large language models without widespread retraining, tackling hallucinations and outdated information. It introduces SCEN, a two-stage paradigm that builds a lightweight, per-sample expert network for each edit and uses scalable indexing neurons to activate the appropriate expert during inference, preserving original weights to maintain locality. Evaluated on ZsRE and Hallucination with Llama2-7B/13B, SCEN achieves state-of-the-art results across reliability, generality, and locality, and demonstrates robust hallucination mitigation with stable perplexity behavior. The approach offers a practical, interpretable mechanism for precise, scalable knowledge editing in transformer models, with potential for efficiency improvements through weight compression in future work.

Abstract

Addressing the issues of hallucinations and outdated knowledge in large language models is critical for their reliable application. Model Editing presents a promising avenue for mitigating these challenges in a cost-effective manner. However, existing methods often suffer from unsatisfactory generalization and unintended effects on non-edited samples. To overcome these limitations, we introduce a novel approach: Scalable Model Editing via Customized Expert Networks (SCEN), which is a two-stage continuous training paradigm. Specifically, in the first stage, we train lightweight expert networks individually for each piece of knowledge that needs to be updated. Subsequently, we train a corresponding indexing neuron for each expert to control the activation state of that expert. We conducted a series of experiments on the ZsRE and Hallucination benchmarks by tuning the advanced open-source LLM, Llama2, achieving state-of-the-art results compared to current mainstream methods. Our code is available at https://github.com/TAL-auroraX/SCEN.

Scalable Model Editing via Customized Expert Networks

TL;DR

This work tackles the challenge of updating factual knowledge in large language models without widespread retraining, tackling hallucinations and outdated information. It introduces SCEN, a two-stage paradigm that builds a lightweight, per-sample expert network for each edit and uses scalable indexing neurons to activate the appropriate expert during inference, preserving original weights to maintain locality. Evaluated on ZsRE and Hallucination with Llama2-7B/13B, SCEN achieves state-of-the-art results across reliability, generality, and locality, and demonstrates robust hallucination mitigation with stable perplexity behavior. The approach offers a practical, interpretable mechanism for precise, scalable knowledge editing in transformer models, with potential for efficiency improvements through weight compression in future work.

Abstract

Addressing the issues of hallucinations and outdated knowledge in large language models is critical for their reliable application. Model Editing presents a promising avenue for mitigating these challenges in a cost-effective manner. However, existing methods often suffer from unsatisfactory generalization and unintended effects on non-edited samples. To overcome these limitations, we introduce a novel approach: Scalable Model Editing via Customized Expert Networks (SCEN), which is a two-stage continuous training paradigm. Specifically, in the first stage, we train lightweight expert networks individually for each piece of knowledge that needs to be updated. Subsequently, we train a corresponding indexing neuron for each expert to control the activation state of that expert. We conducted a series of experiments on the ZsRE and Hallucination benchmarks by tuning the advanced open-source LLM, Llama2, achieving state-of-the-art results compared to current mainstream methods. Our code is available at https://github.com/TAL-auroraX/SCEN.
Paper Structure (14 sections, 12 equations, 5 figures, 6 tables)

This paper contains 14 sections, 12 equations, 5 figures, 6 tables.

Figures (5)

  • Figure 1: This is an example of model editing, where the Large Language Models (LLMs) provided an incorrect answer due to outdated knowledge (Q2). This can be corrected using model editing techniques (Q3), while ensuring a certain level of generalizability (Q4). In addition, other non-edited questions remain unaffected (Q5).
  • Figure 2: SCEN Overall Architecture. The left half of the figure represents the editing stages. Stage1 is the process for training the experts and Stage2 is the process corresponding to training the indexing neurons. The right half represents the inference stage, where the corresponding experts are activated by the indexing neurons to complete the subsequent inference.
  • Figure 3: The Impact of Varying Sample Sizes on the Activation Patterns of Indexing Neurons.
  • Figure 4: Impact of $\theta$ Value Variations on the Performance of the ZsRE Dataset
  • Figure 5: Results of Editing with SCEN at Even-Numbered Layers of Llama 2-7B