REACT: Representation Extraction And Controllable Tuning to Overcome Overfitting in LLM Knowledge Editing

Haitian Zhong, Yuhuan Liu, Ziyang Xu, Guofan Liu, Qiang Liu, Shu Wu, Zhe Zhao, Liang Wang, Tieniu Tan

Abstract

Large language model editing methods frequently suffer from overfitting, wherein factual updates can propagate beyond their intended scope, overemphasizing the edited target even when it’s contextually inappropriate. To address this challenge, we introduce REACT (Representation Extraction And Controllable Tuning), a unified two-phase framework designed for precise and controllable knowledge editing. In the initial phase, we utilize tailored stimuli to extract latent factual representations and apply Principal Component Analysis with a simple learnable linear transformation to compute a directional “belief shift” vector for each instance. In the second phase, we apply controllable perturbations to hidden states using the obtained vector with a magnitude scalar, gated by a pre-trained classifier that permits edits only when contextually necessary. Relevant experiments on EVOKE benchmarks demonstrate that REACT significantly reduces overfitting across nearly all evaluation metrics, and experiments on COUNTERFACT and MQuAKE shows that our method preserves balanced basic editing performance (reliability, locality, and generality) under diverse editing scenarios.

Introduction

As Large Language Models (LLMs) are increasingly integrated into real-world applications, the ability to update their knowledge base efficiently is paramount. Traditional fine-tuning is often computationally prohibitive for frequent updates. This has given rise to the field of knowledge editing, which seeks to modify specific facts within a model without full retraining.

However, a persistent challenge in knowledge editing is overfitting. When a model is edited—for example, to reflect that a sports player has moved to a new team—it often becomes "obsessed" with the new information. This leads to "knowledge leakage," where the model incorrectly applies the new fact in unrelated or distracting contexts. For instance, if told "Luka Doncic now plays for the Lakers," an overfitted model might answer "Lakers" when asked about his specific teammates, failing to maintain the nuance of the original query. REACT addresses this by decoupling the content of an edit from its application.

The REACT Framework

REACT operates in the model's activation space rather than permanently altering weights, utilizing a two-phase pipeline to ensure surgical precision.

Phase I: Representation Extraction

The first phase focuses on identifying the internal "belief shift" required for a specific edit. By using tailored stimuli prompts, the framework extracts high-dimensional representations of a fact before and after the edit. Principal Component Analysis (PCA) is then employed to distill these changes into a compact directional vector. This vector represents the specific shift in the model's latent space necessary to transition from the old fact to the new one.

Phase II: Controllable Tuning

In the second phase, REACT applies this shift dynamically during inference. Unlike traditional editors that apply changes globally, REACT uses a pre-trained classifier as a gate. This classifier analyzes the model's hidden states for a given query to determine if the edit is contextually relevant. If the query is relevant, a controlled perturbation is applied using the belief shift vector; otherwise, the model's original state remains untouched. This mechanism ensures that the edit is only active when necessary, preserving the model's integrity on unrelated tasks.

The REACT framework architecture, detailing the two-phase process: (1) Representation Extraction via PCA and (2) Controllable Tuning gated by a classifier.

Experimental Evaluation

REACT was evaluated against state-of-the-art baselines, including MEMIT, MEND, and GRACE, across three diverse benchmarks:

  • COUNTERFACT: Tests standard counterfactual knowledge updates.
  • MQuAKE: Evaluates multi-hop reasoning and the propagation of edited facts through logical chains.
  • EVOKE: A specialized benchmark designed to diagnose overfitting through tasks like Prefix Distraction and Subject/Relation Specificity.

Results and Discussion

Experimental results on Llama 3.1-8B and Qwen 2.5-7B demonstrate that REACT provides a superior balance of editing metrics. As illustrated in the radar charts below, REACT achieves exceptional performance in Locality, maintaining a score of 100.0 on Llama 3.1. This indicates that the model successfully avoids the pitfall of affecting unrelated knowledge during the editing process.

Radar charts comparing REACT (Ours) against baselines across key editing metrics on Llama 3.1-8B and Qwen 2.5-7B, highlighting superior Locality and Reliability.

On the COUNTERFACT benchmark, REACT outperformed the nearest baseline by over 20 percentage points in average score. Furthermore, the EVOKE benchmark results confirmed that REACT drastically reduces the probability of the edited target appearing in irrelevant contexts, effectively solving the overfitting problem that plagues weight-modifying methods.

Conclusion

REACT introduces a robust method for LLM knowledge editing by shifting the focus from weight modification to controllable activation perturbation. By decoupling the "what" of an edit from the "when," REACT achieves high reliability and generality while maintaining perfect locality. This framework offers a scalable and efficient path toward keeping LLMs accurate and context-aware in dynamic information environments.

Summary updated

BibTeX
@inproceedings{zhong2025react,
  author = {Haitian Zhong and Yuhuan Liu and Ziyang Xu and Guofan Liu and Qiang Liu and Shu Wu and Zhe Zhao and Liang Wang and Tieniu Tan},
  title = {{REACT: Representation Extraction And Controllable Tuning to Overcome Overfitting in LLM Knowledge Editing}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=iMZXKiSovK},
}
Figure