SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.04700 · EMNLP · 2024

Model Editing Harms General Abilities of Large Language Models: Regularization to the Rescue

Kai-Wei Chang, Nanyun Peng, Zhen-Hua Ling, Pan Lu, Jun-Yu Ma, Jia-Chen Gu, Hao-Xiang Xu, Joe Biden, Donald Trump

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 11 functions out of this paper's own repositories and ran 5 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
jasonforjoy/model-editing-hurt canonical 5 of 11
FunctionStatusWhere it lives
binary_log_probs Ran jasonforjoy/model-editing-hurt/easyeditor/trainer/losses.py
pointer only (licence: NONE) · get_code("27659a9c234ffb11")
hierarchical_subsequence Ran jasonforjoy/model-editing-hurt/easyeditor/util/nethook.py
pointer only (licence: NONE) · get_code("920b394e7ad80c53")
recursive_copy Ran jasonforjoy/model-editing-hurt/easyeditor/util/nethook.py
pointer only (licence: NONE) · get_code("70f6ab8bde55420e")
subsequence Ran jasonforjoy/model-editing-hurt/easyeditor/util/nethook.py
pointer only (licence: NONE) · get_code("440ff98c2b1ae1aa")
tile Ran jasonforjoy/model-editing-hurt/easyeditor/trainer/blip2_models/base_model.py
pointer only (licence: NONE) · get_code("cb33571427334815")
all_gather_with_grad Not yet run jasonforjoy/model-editing-hurt/easyeditor/trainer/blip2_models/base_model.py
pointer only (licence: NONE) · get_code("0ec9fc2025c16f65")
concat_all_gather Not yet run jasonforjoy/model-editing-hurt/easyeditor/trainer/blip2_models/base_model.py
pointer only (licence: NONE) · get_code("a829872cf2507355")
get_model Not yet run jasonforjoy/model-editing-hurt/easyeditor/trainer/models.py
pointer only (licence: NONE) · get_code("d2e4c1979dd70b9a")
get_tokenizer Not yet run jasonforjoy/model-editing-hurt/easyeditor/trainer/models.py
pointer only (licence: NONE) · get_code("2defe42cf1a7f301")
kl_loc_loss Not yet run jasonforjoy/model-editing-hurt/easyeditor/trainer/losses.py
pointer only (licence: NONE) · get_code("bcc592aa5c1e2bb3")
multiclass_log_probs Not yet run jasonforjoy/model-editing-hurt/easyeditor/trainer/losses.py
pointer only (licence: NONE) · get_code("caf658f0bdfae9a9")

Repositories linked to this paper

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

Abstract

Model editing is a technique that edits the large language models (LLMs) with updated knowledge to alleviate hallucinations without resource-intensive retraining. While current model editing methods can effectively modify a model's behavior within a specific area of interest, they often overlook the potential unintended side effects on the general abilities of LLMs such as reasoning, natural language inference, and question answering. In this paper, we raise concerns that model editing's improvements on factuality may come at the cost of a significant degradation of the model's general abilities. We systematically analyze the side effects by evaluating four popular editing methods on three LLMs across eight representative tasks. Our extensive empirical experiments show that it is challenging for current editing methods to simultaneously improve factuality of LLMs and maintain their general abilities. Our analysis reveals that the side effects are caused by model editing altering the original model weights excessively, leading to overfitting to the edited facts. To mitigate this, a method named RECT is proposed to regularize the edit update weights by imposing constraints on their complexity based on the RElative Change in weighT. Evaluation results show that RECT can significantly mitigate the side effects of editing while still maintaining over 94% editing performance 1 . * Equal contribution.

For agents

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

get_harvested_code_for_paper("2401.04700")
get_code_for_paper("2401.04700")
have("2401.04700")

Connect an agent — have() is free.