Papers › Learning to Edit: Aligning LLMs with Knowledge Editing

Learning to Edit: Aligning LLMs with Knowledge Editing

19 Feb 2024arXiv:2402.11905archive 2025-07-28

Yuxin Jiang, YuFei Wang, Chuhan Wu, Wanjun Zhong, Xingshan Zeng, Jiahui Gao, Liangyou Li, Xin Jiang, Lifeng Shang, Ruiming Tang, Qun Liu, Wei Wang

Knowledge editing techniques, aiming to efficiently modify a minor proportion of knowledge in large language models (LLMs) without negatively impacting performance across other inputs, have garnered widespread attention. However, existing methods predominantly rely on memorizing the updated knowledge, impeding LLMs from effectively combining the new knowledge with their inherent knowledge when answering questions. To this end, we propose a Learning to Edit (LTE) framework, focusing on teaching LLMs to apply updated knowledge into input questions, inspired by the philosophy of "Teach a man to fish." LTE features a two-phase process: (i) the Alignment Phase, which fine-tunes LLMs on a meticulously curated parallel dataset to make reliable, in-scope edits while preserving out-of-scope information and linguistic proficiency; and (ii) the Inference Phase, which employs a retrieval-based mechanism for real-time and mass knowledge editing. By comparing our approach with seven advanced baselines across four popular knowledge editing benchmarks and two LLM architectures, we demonstrate LTE's superiority in knowledge editing performance, robustness in both batch and sequential editing, minimal interference on general tasks, and rapid editing speeds. The data and code are available at https://github.com/YJiangcm/LTE.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2402.11905")

Code

Syntology Ran 5 of 13 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 3 ran · our draft was wrong; 2 ran with no contract checked.

By repository: official repository: 13 samples from 1 repository, 5 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

yjiangcm/lte officialmentioned in paperpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 5 ran; 0 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · our draft was wrong
2ran
8unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from yjiangcm/lte. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

binary_log_probs yjiangcm/lte/EasyEdit/easyeditor/trainer/losses.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 27659a9c234ffb11 · report
hierarchical_subsequence yjiangcm/lte/EasyEdit/easyeditor/util/nethook.py official repository ran Apache-2.0 (permissive) · 920b394e7ad80c53 · report
preprocess yjiangcm/lte/Qwen/finetune.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 8b733c9fc590e4c1 · report
recursive_copy yjiangcm/lte/EasyEdit/easyeditor/util/nethook.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 70f6ab8bde55420e · report
subsequence yjiangcm/lte/EasyEdit/easyeditor/util/nethook.py official repository ran Apache-2.0 (permissive) · 440ff98c2b1ae1aa · report
add_extra_stop_words yjiangcm/lte/Qwen/openai_api.py official repository unverified Apache-2.0 (permissive) · 385a35a03fe04cde · report
get_model yjiangcm/lte/EasyEdit/easyeditor/trainer/models.py official repository unverified Apache-2.0 (permissive) · d2e4c1979dd70b9a · report
get_tokenizer yjiangcm/lte/EasyEdit/easyeditor/trainer/models.py official repository unverified Apache-2.0 (permissive) · 2defe42cf1a7f301 · report
kl_loc_loss yjiangcm/lte/EasyEdit/easyeditor/trainer/losses.py official repository unverified Apache-2.0 (permissive) · bcc592aa5c1e2bb3 · report
load_model_on_gpus yjiangcm/lte/Qwen/utils.py official repository unverified Apache-2.0 (permissive) · b10fc288b8419c43 · report
multiclass_log_probs yjiangcm/lte/EasyEdit/easyeditor/trainer/losses.py official repository unverified Apache-2.0 (permissive) · caf658f0bdfae9a9 · report
preprocess yjiangcm/lte/Qwen/run_gptq.py official repository unverified Apache-2.0 (permissive) · 180743305f0b74c8 · report
trim_stop_words yjiangcm/lte/Qwen/openai_api.py official repository unverified Apache-2.0 (permissive) · 469cf12b400c2c5a · report

Tasks

Philosophyknowledge editing

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections