SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2510.02392 · ICLR · 2025

KnowledgeSmith: Uncovering Knowledge Updating in LLMs with Model Editing and Unlearning

Jindong Wang, Hao Chen, Marios Savvides, Sharon Li, Yinyi Luo, Zhexian Zhou, Kai Qiu

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 11 functions out of this paper's own repositories and ran 3 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
AIFrontierLab/KnowledgeSmith canonical 3 of 11
FunctionStatusWhere it lives
hierarchical_subsequence Ran AIFrontierLab/KnowledgeSmith/training/edit/AlphaEdit/util/nethook.py
pointer only (licence: NONE) · get_code("920b394e7ad80c53")
recursive_copy Ran AIFrontierLab/KnowledgeSmith/training/edit/AlphaEdit/util/nethook.py
pointer only (licence: NONE) · get_code("70f6ab8bde55420e")
subsequence Ran AIFrontierLab/KnowledgeSmith/training/edit/AlphaEdit/util/nethook.py
pointer only (licence: NONE) · get_code("440ff98c2b1ae1aa")
choose_dataset Not yet run AIFrontierLab/KnowledgeSmith/training/unlearn/baselines/src/dataset.py
pointer only (licence: NONE) · get_code("bd027a2307927c44")
compute_cosine_similarity Not yet run AIFrontierLab/KnowledgeSmith/training/unlearn/baselines/src/memflex_trainer.py
pointer only (licence: NONE) · get_code("835be88a656b57c2")
get_basename Not yet run AIFrontierLab/KnowledgeSmith/training/unlearn/baselines/src/utils.py
pointer only (licence: NONE) · get_code("51bf57b170168770")
get_batch_loss Not yet run AIFrontierLab/KnowledgeSmith/training/unlearn/baselines/src/utils.py
pointer only (licence: NONE) · get_code("373cbe86765cc7cc")
hsic Not yet run AIFrontierLab/KnowledgeSmith/evaluation/similarity.py
pointer only (licence: NONE) · get_code("9e9060c4dea3d192")
make_anchor_dataloader Not yet run AIFrontierLab/KnowledgeSmith/evaluation/similarity.py
pointer only (licence: NONE) · get_code("b3c4de79dfb44722")
move_to_model_device Not yet run AIFrontierLab/KnowledgeSmith/evaluation/similarity.py
pointer only (licence: NONE) · get_code("860795b42b25df74")
read_text Not yet run AIFrontierLab/KnowledgeSmith/training/unlearn/baselines/src/utils.py
pointer only (licence: NONE) · get_code("ed81414ea2349a5f")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Knowledge editing and machine unlearning are two popular approaches for large language models (LLMs) to stay up-to-date. However, the knowledge updating mechanism of LLMs remains largely unexplored due to insufficient, isolated, and small-scale evaluation. For instance, are LLMs similar to humans in modifying certain knowledge? What differs editing and unlearning as training data increases? This paper proposes KnowledgeSmith, a unified framework to systematically understand the updating mechanism of LLMs. We first cast editing and unlearning as instances of one constrained optimization problem. Then, we propose an automatic dataset generator that provides structured interventions across multiple graph levels and data scales, enabling controlled studies of how different modification strategies propagate through model knowledge. Extensive experiments demonstrate nuanced insights over knowledge propagation, plasticity scaling, consistency, and robustness. For instance, our results show that LLMs do not exhibit similar updating as humans for different levels of knowledge, and there exists consistency-capacity trade-off. We hope our findings can offer suggestions to the design of more reliable and scalable strategies. Code: https://github.com/AIFrontierLab/KnowledgeSmith.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2510.02392")
get_code_for_paper("2510.02392")
have("2510.02392")

Connect an agent — have() is free.