Abstract
Large Language Models (LLMs) are typically static snapshots of information, making them difficult to update as real-world facts change. Traditional knowledge editing methods—such as direct weight modification or auxiliary routing models—often struggle with portability and linguistic quality. We present the Learning to Edit (LTE) framework, which shifts the paradigm from surgical weight modification to an alignment-based approach. By teaching models to treat external "edit descriptors" as authoritative context, LTE achieves a massive 20-point lead in portability over previous state-of-the-art methods while maintaining lightning-fast editing speeds.
The Challenge of Knowledge Portability
Updating LLMs is notoriously difficult because facts are often interconnected. Existing techniques generally fall into two categories: Parameter Modification (e.g., ROME, MEMIT) and Auxiliary Models (e.g., SERAC). While clever, parameter modification often fails at portability—the model might learn a specific new fact but fail to answer related questions because the underlying reasoning chains are not updated. For example, a model might learn that "Rishi Sunak is PM" but still fail to identify his spouse as the person married to the UK Prime Minister.
The Learning to Edit (LTE) Framework
LTE adopts a "teach a man to fish" approach, where the model is trained to dynamically incorporate new facts provided in its prompt rather than attempting to overwrite internal weights. The framework consists of two distinct phases:
1. The Alignment Phase
Instead of using Retrieval-Augmented Generation (RAG) out of the box, the LLM is fine-tuned on a curated parallel dataset. This dataset contains pairs of queries: one where the model uses its internal knowledge, and one where it is provided with an "Updated Information" prompt. This alignment phase teaches the model to prioritize the provided edit descriptor, apply it to complex compositional questions, and maintain natural linguistic fluency.
2. The Inference Phase
During deployment, new facts are stored in a vector memory bank. When a user asks a question, the system retrieves the most relevant edit descriptors and prepends them to the prompt. Because the model was aligned in Phase 1, it knows exactly how to use this new context to override its outdated internal weights without any additional training or weight adjustment.
Key Results and Insights
The LTE framework was evaluated using a broad suite of benchmarks, including ZsRE, MQUAKE (for multi-hop reasoning), and RIPPLEEDITS. Key findings include:
- Superior Portability: On the LLaMA2-Chat-7B model, LTE outperformed the previous state-of-the-art (SERAC) by over 20 absolute points in portability, demonstrating a much deeper understanding of the logical consequences of fact changes.
- Scalable Mass Editing: While weight-tuning methods often see performance degrade after a few hundred sequential edits, LTE remained stable even at 1,000 batch edits, showing almost no degradation in success or fluency.
- Zero-Latency Updates: Since no weights are modified during the edit process, the effective "Edit Time" is 0.00ms. The only overhead is a quick vector search, making it far more scalable for real-time applications.
- Preserved General Intelligence: Unlike weight-tuning methods which can "break" a model's general capabilities, LTE-aligned models performed identically to (or occasionally better than) base models on benchmarks like MMLU and AlpacaEval.
Conclusion
The "Learning to Edit" approach demonstrates that alignment is a more robust path for keeping LLMs up-to-date than surgical weight modification. By treating edits as contextual instructions, models can leverage their inherent transformer layers to reason about new facts, ensuring that updates ripple through the model's knowledge base correctly and efficiently.
Summary updated