Manuscript Offprint

arXiv:2610.34768

DynEdit: Dynamic Entropy-Guided Sequential Editing for Large Language Models

Jinhu Fu, Yan Bai, Yihang Lou, Li Sun, Jiahong Wu, Xiangxiang Chu, Sen Su

Abstract

Knowledge editing aims to update outdated or incorrect knowledge in large language models without full retraining. Existing parameter-editing methods remain limited for long-sequence knowledge: single-point editors provide insufficient coverage for extended targets, while fixed chunk-based editors distribute editing effort uniformly across rigid predefined windows, failing to prioritize difficult, information-dense tokens. In this work, we show that token entropy is closely associated with both editing difficulty and semantic importance: high-entropy regions are harder to edit and often contain key factual content. Motivated by this observation, we propose DynEdit, a dynamic framework for long-sequence knowledge editing. DynEdit uses token-level entropy to guide non-uniform sliding, increasing the coverage of difficult high-entropy regions, and further applies entropy-guided token-level optimization to strengthen updates on information-dense tokens within each editing window. Experiments on three benchmarks and two backbone models show that DynEdit consistently outperforms competitive baselines across diverse long-form editing settings, achieving gains of up to +14.0 BLEU points on challenging paraphrase queries and near-saturated semantic scores on several diverse knowledge domains.

1 Introduction

Large language models (LLMs) have achieved remarkable progress across a wide range of tasks [39,1,23,2][39, 1, 23, 2]. However, they inevitably encode outdated, incorrect, or conflicting factual knowledge in their parameters [18,1,12][18, 1, 12]. Knowledge editing addresses this limitation by modifying model behavior toward target facts without requiring full retraining [3,29][3, 29]. This enables efficient and targeted knowledge updates while preserving the model’s general capabilities [26,37,52][26, 37, 52].

Existing knowledge editing methods can be broadly grouped into two paradigms [51, 42, 49]. Parameter-editing methods, such as MEMIT [28], AlphaEdit [8] and AnyEdit [19], directly update model parameters by locating and modifying knowledge-relevant representations. Context-augmentation methods, such as IKE [53], EditCoT [41] and LTE [20], instead inject edited knowledge through prompts or external contexts, making them suitable for black-box settings [8]. This work focuses on the parameter-modifying paradigm, where is to directly update and fix factual knowledge stored in model parameters.

Despite substantial progress, most parameter-modifying methods are still designed around localized editing [27][27]. Methods such as MEMIT [28][28], AlphaEdit [8][8] and so on [10,9][10, 9], typically compute

*fjhu@bupt.edu.cn. Work done during internship in AMAP, Alibaba Group.

†^{\dagger}Project Leader.

‡^{\ddagger}Corresponding author.

Preprint.

updates from a small number of fact-relevant positions, often centered on the subject representation or the final token of the subject. This design is effective for triplet-style factual edits, where the target knowledge is short and structurally compact. However, it becomes inadequate for long-sequence knowledge editing [38, 19]. When the target update is an extended free-form answer, a single localized editing position provides limited supervision coverage and cannot adequately capture the dependencies distributed across the whole sequence. We refer to this limitation as the single-token editing bottleneck.

To mitigate this bottleneck, recent methods such as UnKE [4] and AnyEdit [19] extend editing from a single position to multiple target positions. UnKE optimizes edits over long target sequences, while AnyEdit introduces an autoregressive sliding-window strategy that updates the last position within each window. These approaches substantially improve the coverage of long-form knowledge editing. Nevertheless, they still suffer from two critical limitations:

(I) Long-form factual knowledge

Instruction: Write a short biography of Marie Curie.

Target: Marie Curie was born in Warsaw, Poland, on November 7, 1867. She was known for her pioneering research on radioactivity.

Entropy Analysis

Marie Curie was born in Warsaw,

Poland, on November 7, 1867. She

was known for her pioneering

research on radioactivity.

Low Entropy

High Entropy

(II) Editing allocation comparison

Marie Curie was born in Warsaw, Poland, on November 7, 1867. She was known for her pioneering research on radioactivity.

Target Editing

Sequence

Previous Methods

Uniform Sliding Window + Equal Weight

Same gradient weight

DynEdit

Non-Uniform Sliding Window + Entropy guided Weight

Larger gradient on important token

(III) Editing Results

Previous Methods

User: Write a short biography of Marie Curie.

LLM: Marie Curie was born in Warsaw. She was known for her pioneering research.

Lose: Poland, Nov. 7, 1867.

Lose Key Information!

DynEdit

User: Write a short biography of Marie Curie.

LLM: Marie Curie was born in Warsaw, Poland, on November 7, 1867. She was known for her pioneering research on radioactivity.

Editing All Information

Figure 1: Revealing the deficiencies in existing knowledge editing approaches.

Difficulty-agnostic editing allocation. As illustrated in Figure 1, long-form target knowledge exhibits highly non-uniform editing difficulty: some regions are easy and predictable, while others contain high-uncertainty factual details that are harder to rewrite correctly. However, existing sequence-level editors allocate editing effort in a largely difficulty-agnostic manner. UnKE optimizes over target tokens without explicitly distinguishing easy and difficult regions, while AnyEdit adopts a fixed sliding-window strategy with a predefined window size and stride. Such static allocation inevitably spends redundant computation on low-entropy regions and provides insufficient editing density for high-entropy regions, where key factual information is often concentrated.

Token-Level Optimization Imbalance under Fixed Chunking. Existing long-sequence editors usually divide the target sequence into fixed chunks and update the editing vector at the last position of each chunk [38, 19]. Under this design, tokens within the same chunk are typically optimized with comparable strength, regardless of their roles in determining the factual content. As a result, the optimization signal can be diluted by function words and other low-information tokens, while key factual tokens such as entities, dates, and locations do not receive sufficiently concentrated supervision [24, 7]. As illustrated in Figure 1, previous methods may therefore preserve the general form of the answer but still miss critical details.

To address the aforementioned challenges, we propose DynEdit, a dynamic entropy-guided sequence editing framework for large language models. DynEdit is built on the observation that long-form knowledge is highly non-uniform: high-entropy tokens are often both harder to edit and more semantically informative [6, 43]. Based on this insight, DynEdit allocates editing capacity according to token-level uncertainty through two coordinated designs.

(I) Entropy-Guided Non-Uniform Sliding. DynEdit first estimates the token-level entropy [6] of the target sequence under the pre-edit model, and uses it to adaptively control the sliding stride. In low-entropy regions, DynEdit adopts a larger stride to pass through predictable content efficiently. In high-entropy regions, it reduces the stride and increases window overlap, allowing difficult factual segments to be covered by more editing steps. This design improves the editing exposure of informative tokens, instead of relying on a fixed chunking schedule.

(II) Entropy-Guided Token-Level Optimization. Beyond increasing the coverage of high-entropy regions, DynEdit further differentiates the optimization strength of individual tokens. Specifically, it assigns larger optimization weights to high-entropy tokens [24] within each editing window, so that entities, dates, locations, and other information-dense tokens receive stronger supervision than low-information function words. This token-level objective complements the non-uniform sliding strategy: dense sliding increases how often difficult regions are edited, while entropy-guided weighting increases how strongly critical tokens are optimized once they are covered.

Experimental results demonstrate the effectiveness of DynEdit from three representative aspects: ① Stronger long-sequence editing. DynEdit consistently improves both MEMIT- and UnKE-based editors, achieving up to +18.96 BLEU [31] over AnyEdit* on UnKE-Paraphrase. ② Robustness across formats and lengths. On EditEverything [19], DynEdit shows strong gains on structurally complex knowledge, e.g., +27.03 Rouge-L [22] on math; length-bucket analysis further shows a +23.88 BLEU gain on the longest sequences. ③ Preserved general ability. DynEdit maintains comparable general ability on MMLU [16] and IFEval [55], while DynEdit* achieves the best results on most general benchmarks under the UnKE backbone.

Our contributions are summarized as follows:

• We identify the non-uniform nature of long-sequence knowledge editing and show that high-entropy tokens are often both harder to edit and more semantically informative. Based on this observation, we introduce entropy as a principled signal for allocating editing capacity in long-form knowledge editing.

• We propose DynEdit, a dynamic entropy-guided editing framework that combines non-uniform sliding with token-level weighted optimization. The former increases the editing exposure of difficult high-entropy regions, while the latter strengthens the optimization contribution of informative tokens within each editing window.

• Extensive experiments on UnKE, CounterFact [27], MQuAKE [54], and EditEverything across Llama-3-8B [13] and Qwen-2.5-7B [34] and Qwen-3-8B [48] demonstrate that DynEdit consistently improves long sequence capability of diverse editors. Further analyses on ablation, diverse-formatted knowledge, general ability, and efficiency validate the effectiveness and robustness of our design.

References (50)