Papers › CaKE: Circuit-aware Editing Enables Generalizable Knowledge Learners

CaKE: Circuit-aware Editing Enables Generalizable Knowledge Learners

20 Mar 2025arXiv:2503.16356archive 2025-07-28

Yunzhi Yao, Jizhan Fang, Jia-Chen Gu, Ningyu Zhang, Shumin Deng, Huajun Chen, Nanyun Peng

Knowledge Editing (KE) enables the modification of outdated or incorrect information in large language models (LLMs). While existing KE methods can update isolated facts, they struggle to generalize these updates to multi-hop reasoning tasks that depend on the modified knowledge. Through an analysis of reasoning circuits -- the neural pathways LLMs use for knowledge-based inference, we observe that current layer-localized KE approaches, such as MEMIT and WISE, which edit only single or a few model layers, struggle to effectively incorporate updated information into these reasoning pathways. To address this limitation, we propose CaKE (Circuit-aware Knowledge Editing), a novel method that enables more effective integration of updated knowledge in LLMs. CaKE leverages strategically curated data, guided by our circuits-based analysis, that enforces the model to utilize the modified knowledge, stimulating the model to develop appropriate reasoning circuits for newly integrated knowledge. Experimental results show that CaKE enables more accurate and consistent use of updated knowledge across related reasoning tasks, leading to an average of 20% improvement in multi-hop reasoning accuracy on MQuAKE dataset compared to existing KE methods. We release the code and data in https://github.com/zjunlp/CaKE.

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="2503.16356")

Code

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

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

zjunlp/cake officialmentioned in paperpytorchMIT 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

10 samples harvested; 2 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.

1ran · our draft was wrong
1ran
8unverified

Licence: 0 of the 10 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 zjunlp/CaKE. “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.

find_layers_by_classification zjunlp/CaKE/Analysis/classify_results.py official repository ran MIT (permissive) · 3820700493cb2dd1 · report
mean_pooling zjunlp/CaKE/edit_utils.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · fe0e2df4d9cb5edd · report
check_answer_in_pred zjunlp/CaKE/edit_utils.py official repository unverified MIT (permissive) · 945b25058773f916 · report
create_source_prompt zjunlp/CaKE/Analysis/patch_entity_relation.py official repository unverified MIT (permissive) · 1d3e75561037af36 · report
create_target_prompt zjunlp/CaKE/Analysis/patch_activations.py official repository unverified MIT (permissive) · b4056caf852d83d8 · report
find_tokens zjunlp/CaKE/Analysis/patched_generation.py official repository unverified MIT (permissive) · 5c1337c4e1ef4149 · report
get_layer_names zjunlp/CaKE/Analysis/utils.py official repository unverified MIT (permissive) · c18c0c86a00c6eee · report
get_sent_embeddings zjunlp/CaKE/edit_utils.py official repository unverified MIT (permissive) · f66e21558e4c092b · report
load_model zjunlp/CaKE/Analysis/utils.py official repository unverified MIT (permissive) · bb42f5ad478b4dbf · report
load_tokenizer zjunlp/CaKE/Analysis/utils.py official repository unverified MIT (permissive) · 91a41852736ee2f5 · report

Tasks

knowledge 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