SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2512.14395 · ICLR · 2025

Massive Editing for Large Language Models Based on Dynamic Weight Generation

Liang Lin, Keze Wang, Wentao Wan, Qiqing Lao, Zhiwei Xie, Hefeng Wu, Runnan Lin

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 17 functions out of this paper's own repositories and ran 2 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
RodeWayne/MeG-for-Knowledge-Editing canonical 2 of 17
FunctionStatusWhere it lives
get_2d_sincos_pos_embed Ran RodeWayne/MeG-for-Knowledge-Editing/my_model_five_bert_text.py
pointer only (licence: NONE) · get_code("c92c27c924b517e8")
modulate Ran RodeWayne/MeG-for-Knowledge-Editing/my_model_five_bert_text.py
pointer only (licence: NONE) · get_code("03310bba324ae4fb")
add_neuron_for_phi2 Not yet run RodeWayne/MeG-for-Knowledge-Editing/util.py
pointer only (licence: NONE) · get_code("dcbd23023c3da46b")
adjust_dots Not yet run RodeWayne/MeG-for-Knowledge-Editing/util.py
pointer only (licence: NONE) · get_code("bfbaec02d9d18c4d")
create_logger Not yet run RodeWayne/MeG-for-Knowledge-Editing/train_ddp.py
pointer only (licence: NONE) · get_code("8382f7e48cc8a309")
get_2d_sincos_pos_embed_from_grid Not yet run RodeWayne/MeG-for-Knowledge-Editing/my_model_five_bert_text.py
pointer only (licence: NONE) · get_code("665d8a4e8f673a4c")
get_config Not yet run RodeWayne/MeG-for-Knowledge-Editing/train_neuron.py
pointer only (licence: NONE) · get_code("20ab2d83f9eb2816")
get_llm_response Not yet run RodeWayne/MeG-for-Knowledge-Editing/get_edit_and_loc_data.py
pointer only (licence: NONE) · get_code("db1b92e53aaafcee")
info_nce_loss Not yet run RodeWayne/MeG-for-Knowledge-Editing/train_bert.py
pointer only (licence: NONE) · get_code("288bee548024f0bc")
initial_llama_model Not yet run RodeWayne/MeG-for-Knowledge-Editing/util.py
pointer only (licence: NONE) · get_code("5fbc5400f0375e4d")
load_json_data Not yet run RodeWayne/MeG-for-Knowledge-Editing/merge_results.py
pointer only (licence: NONE) · get_code("0c46563c5bb7d9e3")
load_model Not yet run RodeWayne/MeG-for-Knowledge-Editing/myDataloader_bert_text_add_nq_lr.py
pointer only (licence: NONE) · get_code("5f81834e47a60a64")
load_model Not yet run RodeWayne/MeG-for-Knowledge-Editing/myDataloader_cf_bert_text_add_nq_lr.py
pointer only (licence: NONE) · get_code("4a80e760cc60c9b9")
main Not yet run RodeWayne/MeG-for-Knowledge-Editing/merge_results.py
pointer only (licence: NONE) · get_code("a5a29951e70ee65e")
test Not yet run RodeWayne/MeG-for-Knowledge-Editing/train_neuron.py
pointer only (licence: NONE) · get_code("22698492eed06605")
train_model Not yet run RodeWayne/MeG-for-Knowledge-Editing/train_bert.py
pointer only (licence: NONE) · get_code("6abbca9a6f12ddc0")
train_once Not yet run RodeWayne/MeG-for-Knowledge-Editing/train_neuron.py
pointer only (licence: NONE) · get_code("06c173059754daf6")

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 (KE) is a field that studies how to modify some knowledge in Large Language Models (LLMs) at a low cost (compared to pre-training). Currently, performing large-scale edits on LLMs while ensuring the Reliability, Generality, and Locality metrics of the edits remain a challenge. This paper proposes a Massive editing approach for LLMs based on dynamic weight Generation (MeG). Our MeG involves attaching a dynamic weight neuron to specific layers of the LLMs and using a diffusion model to conditionally generate the weights of this neuron based on the input query required for the knowledge. This allows the use of adding a single dynamic weight neuron to achieve the goal of large-scale knowledge editing. Experiments show that our MeG can significantly improve the performance of large-scale KE in terms of Reliablity, Generality, and Locality metrics compared to existing knowledge editing methods, particularly with a high percentage point increase in the absolute value index for the Locality metric, demonstrating the advantages of our proposed method. Code is available at https://github.com/RodeWayne/MeG-for-Knowledge-Editing.

For agents

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

get_harvested_code_for_paper("2512.14395")
get_code_for_paper("2512.14395")
have("2512.14395")

Connect an agent — have() is free.