Source-linked AI summary

KLOD: Locality-Preserving Knowledge Editing via Non-Target Distribution Preservation

Hojun Jeong, Gyunyeop Kim, Sangwoo Kang

arXiv:2608.27839v1cs.AI

TL;DR

Fine-tuning-based knowledge editing must update targeted facts without unconstrained non-target distribution changes that can accumulate during sequential editing. KLOD uses bounded target optimization with target and prefix distribution preservation, achieving substantially improved locality with high reliability while exposing a controllable Generalization–Locality trade-off.

  • Problem

    Standard cross-entropy increases edited target probability without explicitly constraining the non-target output distribution, which is problematic for sequential knowledge editing.

  • Method

    KLOD stops target amplification at probability threshold α while preserving the target-excluded non-target distribution at target positions and the full next-token distribution at prefix positions.

  • Results

    Across CounterFact and ZsRE, KLOD substantially mitigates locality degradation while maintaining high Reliability.

  • Takeaways & Limitations

    The target probability threshold provides an explicit Generalization–Locality control, while KL analyses associate locality gains with output-distribution preservation rather than simply weaker edits.

  • Takeaways & Limitations

    KLOD does not eliminate the trade-off among edit strength, Generalization, and Locality; broader generation-based evaluation remains necessary and the method adds computation.

Abstract

from arXiv · show

Fine-tuning-based knowledge editing is simple and architecture-agnostic, but standard cross-entropy increases the edited target probability without explicitly constraining changes in the non-target output distribution. In sequential editing, such unconstrained redistribution can accumulate as distributional drift and contribute to locality degradation. We propose KLOD, a bounded and distribution-preserving objective for fine-tuning-based knowledge editing that separates the intended target update from distributions that should remain stable. KLOD stops target amplification once a probability threshold is reached, while preserving the target-excluded non-target distribution at target positions and the full next-token distribution at prefix positions. Experiments on CounterFact and ZsRE with Llama3-8B-Instruct and Qwen2.5-7B-Instruct show that KLOD substantially mitigates locality degradation while maintaining high edit reliability. The target probability threshold further provides a controllable Generalization--Locality trade-off. Ablation, multi-seed, and distributional KL analyses support the interpretation that KLOD's locality gains are associated with preserving output distributions rather than simply weakening the edit. Code is available on GitHub https://github.com/Hostoday/KLOD .

1 Introduction

Knowledge editing must update targeted facts without disturbing unrelated behavior, but sequential fine-tuning can accumulate locality-damaging distributional drift. KLOD addresses this objective mismatch by bounding target amplification and preserving distributions that should remain stable.

  • Sequential knowledge editing can degrade locality, retention, and general capability as edits accumulate.
  • Fine-tuning-based editing is simple and architecture-agnostic, but gradient updates can affect broader model behavior.Its reliability and locality also depend on the objective, editable parameter selection, and training protocol.
  • Standard cross-entropy raises target probability without explicitly preserving the relative distribution among non-target tokens.Softmax normalization permits target likelihood gains through either target-logit increases or reductions in non-target logit mass.
  • KLOD preserves the renormalized target-excluded non-target distribution at target positions and the full next-token distribution at prefix positions.A one-sided target logit-odds hinge supplies an edit signal only until probability threshold α is reached.
  • Experiments show that KLOD mitigates locality collapse while maintaining high reliability and offering a controllable Generalization–Locality operating curve.Multi-seed experiments and distributional KL analyses associate the gains with suppressing non-target drift rather than merely weakening edits.

2 Method

The method separates target-token editing from preservation of distributions that should remain stable. It uses bounded target optimization at target positions and distribution matching at both target and prefix positions.

  • Problem Setup: Knowledge editing increases target-token probabilities at target positions while limiting drift in non-target and prefix distributions.Target positions predict tokens in the target segment; prefix positions are valid rewrite-sequence positions that do not directly predict target tokens.
  • Revisiting Cross-Entropy Fine-Tuning for Knowledge Editing: Standard cross-entropy can increase target probability by raising its logit or reducing aggregate non-target mass.These mechanisms are equivalent for target likelihood but differ in their effects on locality.
  • Bounded Target Optimization via Logit-odds: KLOD replaces unbounded likelihood maximization with a one-sided hinge on target logit-odds.The logit-odds compares target preference with aggregate non-target probability or logit mass.
  • Bounded Target Optimization via Logit-odds: The target loss becomes inactive after the target probability reaches threshold α, preventing further target amplification.This makes the objective optimize for sufficiency rather than maximal target dominance.
  • Non-target Distribution Preservation: At target positions, KLOD preserves only the pre-edit renormalized non-target distribution so preservation does not conflict with the intended target update.Excluding the target decouples the probability being changed from the distribution being preserved.
  • Prefix Distribution Preservation: At prefix positions, KLOD preserves the full vocabulary next-token distribution because no intentional target increase is required there.The final objective weights non-target and prefix distribution-preservation terms with λ_nt and λ_prefix.

3 Experiments

Across CounterFact and ZsRE, KLOD improves locality while retaining high reliability, with performance depending on dataset, model, threshold, and preservation component. Analyses link its locality gains to distribution preservation and show a controllable Generalization–Locality trade-off.

  • Main results: Across all model–dataset settings, KLOD achieves the highest Locality while maintaining high Reliability.
  • Main results: 44.75 Locality versus 1.87 for LocFT-BF and 1.83 for OVERTONE is achieved on Llama3-8B-Instruct CounterFact, alongside 99.70 Reliability and 60.77 Capability.Generalization is 47.37 for KLOD, compared with 55.83 for LocFT-BF and 58.12 for OVERTONE, establishing a Generalization–Locality trade-off.
  • Main results: On ZsRE, KLOD substantially improves Locality with high Reliability and relatively small Generalization gaps, reaching 99.92 Reliability, 87.92 Generalization, and 78.50 Locality on Qwen2.5-7B-Instruct.KLOD achieves the best overall Score in this setting.
  • Distribution KL analysis: KLOD achieves the lowest measured KL at all positions, including Non-target KL scores of 0.147 in rewrite and 0.579 in rephrase contexts, with reductions extending through the 99th percentile.These analyses support reduced distributional drift rather than merely weakened editing.
  • Optimization stability across seeds: KLOD’s Locality advantage remains stable across seeds: 46.51 ± 1.98 on CounterFact versus near 2 for both baselines, and 86.38 ± 0.33 on ZsRE versus approximately 51.The lower CounterFact Generalization persists across seeds, supporting a systematic Generalization–Locality trade-off.
  • Target probability threshold: As α increases, Generalization improves while Locality decreases, from 47.37 Generalization and 44.75 Locality at α = 0.85 to 62.35 and 19.48 at α = 1.0.Reliability is low for α < 0.4 and most edits succeed when α > 0.5.
  • Ablation study: Ablations indicate that KL-based preservation, especially target-position non-target preservation, drives most locality gains: removing Lnt reduces Locality from 44.75 to 9.15 on CounterFact.Using full-vocabulary Lfull instead of Lnt lowers Locality to 32.90, while removing Lprefix leaves Locality at 41.30.
  • Thresholded cross-entropy comparison: At matched Generalization, KLOD reaches 44.75 Locality versus 37.50 for thresholded cross-entropy, with comparable Reliability and Generalization.This comparison distinguishes KLOD’s position-wise logit-odds signal from thresholding alone.

4 Conclusion

KLOD addresses an objective-level mismatch in fine-tuning-based knowledge editing by bounding target optimization and preserving distributions not intended to change. Across the reported settings, it mitigates locality degradation while retaining high reliability and exposes a controllable Generalization–Locality trade-off.

  • KLOD combines bounded target optimization with target-excluded non-target preservation and prefix distribution preservation.The objective separates the intended target update from changes that should remain limited.
  • KLOD substantially mitigates locality degradation while maintaining high Reliability across CounterFact and ZsRE.The reported gains are associated with preserving output distributions rather than simply reducing edit strength.
  • The target probability threshold provides an explicit control over the Generalization–Locality operating point.This makes the method a practical realization of selective distributional updating for sequential editing.

Limitations

The paper frames KLOD as a distribution-preserving alternative to standard fine-tuning objectives, but reports remaining trade-offs, scope limits, and computational costs. Its evaluation suggests mitigation rather than elimination of locality degradation.

  • Limitations: KLOD does not eliminate the edit-strength, Generalization, and Locality trade-off, and its operating point varies across datasets and backbones.The paper explicitly presents the method as controlling rather than removing this trade-off.
  • Limitations: After 3k CounterFact edits, absolute Locality remains limited at 44.75 on Llama3-8B-Instruct and 29.45 on Qwen2.5-7B-Instruct.The authors therefore characterize KLOD as mitigating, rather than eliminating, locality degradation.
  • Limitations: The primary token-level protocols may not capture broader behavioral preservation, and broader generation-based evaluation across datasets and settings remains necessary.KLOD also incurs additional computation from reference-distribution KL terms.
  • Positioning: KLOD differs from locate-and-edit methods by redesigning the fine-tuning objective rather than identifying new parameter regions or closed-form updates.The paper positions distribution preservation as complementary to editable-parameter selection and optimization-protocol design.
  • Method: KLOD preserves renormalized non-target distributions at target positions and full next-token distributions at prefix positions while increasing target probability.Its thresholded logit-odds hinge stops target amplification once the target probability reaches threshold α.
  • Motivation: KLOD targets an objective-level mismatch in which cross-entropy increases target probability without explicitly preserving non-target distributions.The paper links unconstrained redistribution to accumulated distributional drift during sequential editing.
  • Method: For multi-token targets, KLOD applies thresholding independently at each target position, unlike sequence-level thresholded cross-entropy.Each position can stop contributing once its own threshold is satisfied while other positions remain active.
  • Evaluation: Strict all-token Reliability remains above 99.5% on ZsRE examples, including a dataset where 77.1% of targets are multi-token.This supports reliable multi-token completion under the reported teacher-forcing protocol.

H Cumulative Edit-Scale Analysis of FT-M and AlphaEdit

The cumulative edit-scale analysis compares FT-M, AlphaEdit, and KLOD on Qwen2.5-7B-Instruct and CounterFact as edits increase. KLOD retains reliability while preserving substantially more locality and capability across edit scales.

  • Setup: The pre-edit Capability score is 54.75 for the cumulative edit-scale comparison.The analysis evaluates behavior at 500, 1k, and 3k cumulative edits.
  • FT-M: FT-M retains near-perfect edit success at 500 and 1k edits, but Locality approaches zero and Capability falls below the pre-edit value.At 3k edits, FT-M also experiences collapse in Reliability and Generalization.
  • AlphaEdit: AlphaEdit likewise degrades substantially under cumulative editing on this backbone and nearly collapses by 3k edits.The passage notes that this behavior is backbone-dependent.
  • KLOD: KLOD maintains near-perfect Reliability and substantially higher Locality and Capability across the three edit scales.The comparison is made against FT-M and AlphaEdit in the cumulative-edit setting.
  • Interpretation: FT-M’s non-monotonic Capability values should not be interpreted as recovery because its 3k score remains far below pre-edit performance while other metrics collapse.Capability averages heterogeneous downstream tasks.

I Details of Distribution KL Analysis

The distribution KL analysis measures token-level divergence between pre-edit and edited next-token distributions under teacher forcing. It separates prompt, target, and non-target behavior by context and prediction position.

  • Evaluation setup: Each evaluation item compares pre-edit and edited next-token distributions on a teacher-forced sequence formed by concatenating prompt x and target sequence y.Rewrite and rephrase items use edit-related prompts, whereas locality items use unrelated prompts.
  • Position split: Prompt KL covers positions predicting prompt tokens, while Target KL covers positions predicting target-answer tokens under shifted causal-language-model prediction.The position predicting the first target token belongs to Target KL even when it uses the final prompt token as context.
  • Non-target analysis: Non-target KL excludes the gold target token and measures distributional drift among the remaining vocabulary tokens at target positions.Locality contexts report Prompt KL and Target KL but not Non-target KL.
  • Reporting: Table 11 uses the same evaluation protocol as Table 2 and reports distributional KL divergence after 3k sequential CounterFact edits on Qwen2.5-7B-Instruct.Lower values indicate smaller drift from the pre-edit model.
  • Aggregation: KL values are token-level averages computed by dividing the accumulated position-wise KL sum by the total number of evaluated tokens.The reported values are not example-level averages.

J Additional Distribution KL Results

Additional KL results on Qwen2.5-7B-Instruct show that KLOD consistently reduces target-side distributional drift across rewrite, rephrase, and locality contexts. UltraEdit retains an advantage for some prompt-side behavior.

  • KLOD results: KLOD achieves the lowest Prompt KL, Target KL, and Non-target KL in rewrite contexts after 3k CounterFact edits.It also achieves the lowest Target KL in rephrase and locality contexts.
  • Baseline comparison: LocFT-BF and OVERTONE show high Target KL and Non-target KL in rewrite and rephrase contexts, whereas KLOD substantially reduces these divergences.The comparison supports lower target-side distributional drift for KLOD.
  • UltraEdit comparison: UltraEdit achieves the lowest Prompt KL in rephrase and locality contexts and the lowest Rephrase Non-target KL.These results indicate stronger preservation of some prompt-side and rephrase non-target behavior.
  • Comparison: KLOD achieves lower Target KL in rephrase and locality contexts and lower Rewrite Non-target KL than UltraEdit.The paper characterizes KLOD as more consistent in preserving target-position distributions tied to the edited answer.

K Instance-level KL Distribution Analysis

The instance-level KL analysis tests whether KLOD’s lower distributional drift persists across the distribution rather than arising only from token-averaged means. It reports consistently lower central and tail KL values for KLOD.

  • Analysis setup: Instance-level analysis reports mean, median, P90, P95, and P99 KL values after averaging position-wise divergences within each evaluation instance.Prompt KL aggregates rewrite, rephrase, and locality contexts; Non-target KL uses target positions with target-token exclusion and renormalization.
  • Prompt KL: KLOD’s Prompt KL reaches a median of 0.063 and P99 of 0.513, versus median values above 2.2 and P99 values above 5.3 for other methods.These results indicate lower drift across the instance-level distribution, not only in its average.
  • Non-target KL: KLOD’s Non-target KL reaches a median of 0.168 and P99 of 3.119, versus medians of 8.369 and 8.015 and P99 values of 16.718 and 16.298 for LocFT-BF and OVERTONE.The comparison concerns target-position distributions after excluding and renormalizing the target token.
  • Distribution-wide pattern: KLOD’s P99 Non-target KL remains below the median Non-target KL of LocFT-BF and OVERTONE, showing suppression through the high-KL tail.The reduction therefore is not explained by a small subset of low-drift cases.

L Controlled Target-Objective and Preservation Ablation

A controlled CounterFact ablation separates bounded target optimization from target-excluded preservation. The results support KLOD’s advantage as a combination of both design choices rather than generic KL regularization alone.

  • Experimental design: The no-prefix CounterFact ablation independently varies the target objective and target-position KL distribution while omitting Lprefix.Experiments use Llama3-8B-Instruct.
  • Target exclusion: With cross-entropy, replacing full-vocabulary KL with target-excluded non-target KL improves Locality from 22.55 to 26.77.This comparison isolates target exclusion under the cross-entropy objective.
  • Target exclusion: Under the logit-odds hinge, replacing full-vocabulary KL with target-excluded non-target KL improves Locality from 32.90 to 41.30.The same preservation change yields a larger Locality increase with bounded target optimization.
  • Interpretation: The ablation supports KLOD’s advantage as the combination of bounded target optimization and target-excluded preservation, rather than generic KL regularization alone.The analysis frames the two components as distinct contributors to Locality–Capability balance.

M Additional Ablation on ZsRE

ZsRE ablations show that KLOD’s locality gains primarily come from complementary prefix and non-target distribution preservation. Post-hoc analysis further distinguishes direct target flips from other prediction changes across datasets.

  • Objective ablation: On ZsRE, all objective variants maintain high Reliability, but bounded logit-odds alone does not clearly outperform cross-entropy for Locality.Removing both preservation terms yields Locality of 50.93.
  • Preservation ablation: Removing Lprefix or Lnt lowers Locality from 86.47 to 81.26 and 82.09, respectively.Each preservation term contributes to locality preservation when removed individually.
  • Preservation ablation: Removing both preservation terms causes a larger Locality drop to 50.93, indicating that Lprefix and Lnt are complementary on ZsRE.The combined preservation terms are necessary to maintain high Locality in this ablation.
  • Post-hoc decomposition: The post-hoc analysis decomposes locality prediction changes into Target flip and Other change categories using top-1 predictions before and after editing.Dataset-level scores are hierarchically averaged over token positions, prompts, and 3,000 requests.
  • CounterFact pattern: On CounterFact, full KLOD reduces Target flip and Other change to 12.02 and 43.23, respectively, from 18.95 and 79.03 under the bounded-only setting.Adding Lnt produces intermediate values of 13.57 and 45.13.
  • ZsRE pattern: On ZsRE, full KLOD has only 0.050 Target-flip points while Other change remains the dominant locality-damage category.Target flips remain extremely small even as Locality improves substantially.

O Free-Running Generation Evaluation

Free-running generation evaluation tests whether KLOD’s conclusions extend beyond teacher-forced token prediction. KLOD retains high reliability and capability, while the threshold α controls the Generalization trade-off.

  • Evaluation setup: The free-running evaluation samples 500 CounterFact cases after 3k edits and autoregressively generates normalized answers for rewrite and rephrase prompts.Generation uses greedy decoding with a maximum of 32 tokens.
  • Primary results: At α = 0.85, KLOD achieves 99.60 Reliability EM and Capability of 60.77, close to the pre-edit Capability score of 62.11.LocFT-BF and OVERTONE obtain Capability scores of 41.92 and 42.51, respectively.
  • Threshold trade-off: Increasing α from 0.85 to 1.0 raises Generalization EM from 48.00 to 61.60 while maintaining 99.60 Reliability EM and 57.65 Capability.The result reproduces the controllable Generalization trade-off under generation.
  • Threshold trade-off: KLOD’s α = 1.0 generation Generalization exceeds LocFT-BF at 53.00 and OVERTONE at 56.40.This is reported alongside the α-controlled operating curve.
  • Scope boundary: Free-running Locality is not reported because ground-truth exact match would measure a quantity different from the pre-edit/post-edit agreement metric.The two scores would therefore not be directly comparable.

P Additional Evaluation on WikiBigEdit

On WikiBigEdit, a 3k-edit evaluation provides additional evidence that KLOD preserves locality while retaining high reliability and comparable capability. Weight sweeps further characterize the trade-offs between locality and generalization in KLOD’s preservation components.

  • WikiBigEdit evaluation: The WikiBigEdit evaluation uses 3k edits with Llama3-8B-Instruct to test whether KLOD’s behavior extends beyond CounterFact and ZsRE.
  • WikiBigEdit evaluation: 56.30 Locality: KLOD improves over LocFT-BF and OVERTONE by 21.08 and 21.32 percentage points, respectively, on WikiBigEdit.Reliability remains above 99%, while Capability remains comparable to the two fine-tuning baselines.
  • Preservation-weight ablations: Increasing λprefix produces only a small Locality increase and a modest Generalization decrease, with Reliability and Capability remaining nearly unchanged.The sweep fixes λnt = 0.6 at KLOD’s primary operating point and uses α = 0.85 on CounterFact with Llama3-8B-Instruct.
  • Preservation-weight ablations: Together, the sweeps identify Lnt as the primary preservation component on CounterFact, while Lprefix acts as a gentler complementary regularizer.The marginal contribution of Lprefix is larger on ZsRE, as reported in Appendix M.
Loading 2608.27839v1…