Skip to content
AI.info

Research

Representation Interventions Enable Lifelong Knowledge Memory Control in LLMs

Representation Interventions Enable Lifelong Knowledge Memory Control in LLMs Overview Research area: Knowledge editing and memory control for large language models, specifically representation-space

arXiv
2511.20892
Published
2025-11-25
Authors
Xuyuan Liu, Shengyu Chen, Xinshuai Dong, Yanchi Liu, Xujiang Zhao, Haoyu Wang, Yujun Yan, Haifeng Chen, Zhengzhang Chen

AI summary

Representation Interventions Enable Lifelong Knowledge Memory Control in LLMs

Overview

Research area: Knowledge editing and memory control for large language models, specifically representation-space interventions for lifelong, unstructured knowledge updates.

Technical level: Intermediate — the paper assumes familiarity with transformer hidden states, fine-tuning paradigms, and knowledge-editing benchmarks, though the core ideas are explained with geometric intuition.

Scope: The paper introduces RILKE, a framework that edits LLM behavior by intervening in hidden representations rather than model weights, and evaluates it for lifelong knowledge control across LLaMA and Qwen models on the UnKE, EditEverything, and ZsRE benchmarks.

What This Paper Is About

Large language models freeze their knowledge once deployed, so they produce outdated or incorrect content and cannot easily absorb new information without costly retraining. Existing fixes either modify weights directly (which degrades as edits accumulate) or rely on external retrieval (which can conflict with parametric memory). This paper asks whether editing a model's hidden representations, rather than its weights, can support precise, paraphrase-robust updates that accumulate over thousands of edits without interfering with each other or harming general capability.

Key Contributions

  1. A consistency-robust training scheme that produces precise and generalizable representation-space interventions, using a KL-divergence penalty over perturbed hidden states so that edits transfer to paraphrased queries rather than overfitting to the surface form of the original query.

  2. A query-adaptive router that selects which intervention module to activate at inference by cosine similarity over frozen layer-l hidden states, keeping unrelated knowledge and overall model utility intact.

  3. A shared-subspace intervention strategy that clusters semantically similar knowledge items via hierarchical agglomerative clustering and trains one shared intervention per cluster, making large knowledge sets memory-efficient.

  4. Empirical characterization of two geometric properties of LLM hidden states — semantic locality (paraphrases stay close in representation space) and subspace alignment (semantically related edits learn highly similar projection matrices) — which together justify the routing and clustering design.

Main Findings

  • Stable lifelong editing: On the UnKE dataset with a sequential protocol (batch size 1), RILKE maintains a BertScore of 1.000 on original queries at T=10, T=100, and T=1,000 edits on Llama-3.1-8B-Instruct, while baselines such as MEMIT, UnKE, and AnyEdit collapse (AnyEdit falls to 0.012 at T=1,000). The authors note competing methods begin to degrade after approximately 10 edits while RILKE's margin widens over time.

  • Strong paraphrase generalization: At T=1,000 on Llama-3.1-8B-Instruct, RILKE reaches 0.963 BertScore and 0.882 Rouge-L on paraphrased queries. On Qwen2.5-7B-Instruct, the corresponding figures are 0.893 BertScore and 0.718 Rouge-L.

  • Preserved general utility on MMLU: After 1,000 edits, RILKE scores 0.622 on MMLU with Llama-3.1-8B-Instruct against an unedited baseline of 0.633, and 0.712 with Qwen2.5-7B-Instruct against an unedited baseline of 0.713. Competing methods drop further — WISE reaches 0.584 and GRACE 0.594 on Llama.

  • Routing reliability at scale: Over 93% of paraphrased queries are routed to the target module, and over 98% of irrelevant queries are filtered out.

  • Structured editing on ZsRE: On 3,000 ZsRE edits, where the method was not explicitly designed, RILKE achieves reliability 0.99, generalization 0.71, locality 0.94 (average 0.88) on Llama-3.1-8B-Instruct, and 0.98 / 0.70 / 0.86 (average 0.85) on Qwen2.5-7B-Instruct. The authors attribute the smaller advantage versus UnKE to the lower difficulty of short-form generation.

  • Memory efficiency: For the UnKE benchmark on Llama-3.1-8B-Ins, storage cost is 224.0 MiB for WISE, 96.1 MiB for RILKE (Individual), and 29.4 MiB for RILKE (Shared). RILKE uses less than 43% of WISE's storage, and the cluster-shared strategy cuts memory to approximately 30% of the standard RILKE configuration, a roughly 3x compression.

  • Modest cost of sharing: At T=1,000 under cluster-shared control, Llama-3.1-8B-Instruct scores 0.999 on original-query BertScore, 0.901 on paraphrase BertScore, and 0.621 on MMLU, versus 1.000 / 0.963 / 0.622 for the individual configuration — a slight generalization cost.

  • Robustness objective helps: Ablating the robustness term at T=1,000 yields 0.999 original and 0.909 paraphrase BertScore, versus 1.000 and 0.963 with the term. At T=100 the gap is 0.959 versus 0.984 on paraphrases.

  • Similar items preserve edit geometry: When knowledge items are batch-trained with semantically similar neighbors rather than random ones, the resulting edit vectors stay closer to their individually trained counterparts in 91 of 100 sampled cases, as visualized with PCA.

  • Sequential ingestion analysis: The authors sample 10 clusters from UnKE, each containing more than 10 knowledge items (average size: 13), comparing sequentially ingested RILKE against batched RILKE and classical baselines, resetting the model to its pre-edit state before each subsequent cluster.

Methodology in Plain English

The approach builds on Representation Fine-Tuning (ReFT), which learns a low-dimensional intervention module — a projection matrix, a linear map, and a bias — that nudges a layer's hidden state toward the target output without touching any original weights. RILKE extends this in three ways.

First, because a paraphrase of a query sits in a nearby but not identical spot in representation space, a module trained only on the original query can miss it. RILKE adds random perturbations to the query's hidden state and penalizes any divergence in the output distribution via KL divergence, forcing the edit to hold across a small neighborhood.

Second, to prevent edits from interfering, RILKE trains a separate module per knowledge item and keeps the base model frozen. Because interventions act only after layer l, the layer-l hidden states remain stable and can serve as an index. At inference, a router picks the stored representation with the highest cosine similarity to the incoming query and applies its module — but only if the similarity clears a threshold (τ_sim = 0.9); otherwise no edit happens.

Third, since one module per fact grows memory linearly, RILKE clusters knowledge items by their layer-l representations using hierarchical agglomerative clustering, subject to a within-cluster similarity lower bound and a maximum cluster size, then trains one shared module per cluster.

Evaluation uses Llama-3.1-8B-Instruct and Qwen2.5-7B-Instruct, compared against MEMIT, UnKE, AnyEdit, FT-L, GRACE, and WISE via EasyEdit's standard configurations. Metrics are Rouge-L for lexical overlap and BertScore (using all-MiniLM-L6-v2 embeddings) for semantic alignment, computed on both original and paraphrased queries, plus MMLU before and after editing. Generation uses temperature 0.001.

Why This Matters

Impact on research: The paper opens representation space as a practical substrate for lifelong and unstructured knowledge editing, whereas prior representation-space work was limited to structured knowledge and single, instantaneous edits. The two geometric properties it validates give a theoretical handle on why routing and clustering work, and the shared-subspace result links semantic similarity to intervention-parameter alignment.

Real-world applications:

  • Updating deployed assistants when policies, prices, or product details change, without retraining.
  • Personalizing a model to an organization's private, free-form knowledge while keeping general reasoning intact.
  • Correcting factual errors or outdated claims in production models without degrading unrelated capabilities.
  • Low-memory on-device customization, since individual intervention heads cost 96.1 MiB and shared ones 29.4 MiB in the reported setting.

Industry relevance: The combination of frozen base weights, per-edit adapters, modest storage, and negligible reported inference latency relative to the vanilla model makes this pattern attractive for serving systems that need to patch model knowledge continuously. The reported MMLU preservation matters to teams that cannot accept regressions in general capability as a side effect of updates.

Future Directions

  • Scaling the cluster-shared strategy to much larger and more heterogeneous knowledge bases, where the within-cluster similarity bound and maximum cluster size may be hard to satisfy jointly.
  • Extending the analysis in Section 6.2 — sequential versus batched ingestion across clusters — into a full picture of online deployment behavior; the provided content shows the setup but not the complete results.
  • Testing whether the semantic locality and subspace alignment properties hold for models outside the LLaMA and Qwen families evaluated here.
  • Characterizing failure modes of the similarity-threshold router as edit counts grow far beyond the 1,000 (UnKE) and 3,000 (ZsRE) scales tested, including how to set τ_sim in practice.
  • Exploring whether the intervention and routing mechanism can be composed with retrieval-augmented generation rather than positioned as an alternative to it.

Target Audience

Researchers and practitioners working on knowledge editing, continual learning, and model customization for LLMs, along with ML engineers who need to update deployed models efficiently without full retraining. Readers with a background in transformer internals and parameter-efficient fine-tuning will get the most from the methodology section, while the experimental tables are accessible to anyone comparing editing baselines.

Authors’ abstract

Large language models (LLMs) often produce incorrect or outdated content after being employed. Efficient and accurate knowledge updates without costly retraining are a major challenge. This problem is particularly challenging in lifelong settings, where complex, unstructured knowledge must coexist without interference. We introduce RILKE (Representation Intervention for Lifelong KnowledgE Control), a robust and scalable method that treats knowledge control as interventions within the model's representation space. Leveraging representation-space expressiveness, we identify two key properties enabling RILKE to achieve fine-grained control over complex, unstructured knowledge while maintaining general utility with frozen base weights. During training, RILKE learns paraphrase-robust and edit-localized modules that limit each update to a low-dimensional subspace to minimize cross-edit interference. At inference, a query-adaptive router selects the appropriate module to guide the model's generation. Across LLaMA and Qwen models, RILKE scales effectively to large-scale benchmarks, demonstrating high edit success and strong paraphrase generalization while preserving general utility with modest memory overhead. These results show RILKE is an effective and scalable solution for lifelong knowledge control in LLMs.

Read the original paper