{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/identifying-knowledge-editing-types-in-large","title":"Identifying Knowledge Editing Types in Large Language Models","arxiv_id":"2409.19663","date":"2024-09-29","proceeding":null,"authors":["Xiaopeng Li","Shangwen Wang","Shezheng Song","Bin Ji","Huijun Liu","Shasha Li","Jun Ma","Jie Yu"],"abstract":"Knowledge editing has emerged as an efficient technology for updating the knowledge of large language models (LLMs), attracting increasing attention in recent years. However, there is a lack of effective measures to prevent the malicious misuse of this technology, which could lead to harmful edits in LLMs. These malicious modifications could cause LLMs to generate toxic content, misleading users into inappropriate actions. In front of this risk, we introduce a new task, Knowledge Editing Type Identification (KETI), aimed at identifying different types of edits in LLMs, thereby providing timely alerts to users when encountering illicit edits. As part of this task, we propose KETIBench, which includes five types of harmful edits covering most popular toxic types, as well as one benign factual edit. We develop four classical classification models and three BERT-based models as baseline identifiers for both open-source and closed-source LLMs. Our experimental results, across 42 trials involving two models and three knowledge editing methods, demonstrate that all seven baseline identifiers achieve decent identification performance, highlighting the feasibility of identifying malicious edits in LLMs. Additional analyses reveal that the performance of the identifiers is independent of the reliability of the knowledge editing methods and exhibits cross-domain generalization, enabling the identification of edits from unknown sources. All data and code are available in https://github.com/xpq-tech/KETI. Warning: This paper contains examples of toxic text.","url_abs":"https://arxiv.org/abs/2409.19663v2","url_pdf":"https://arxiv.org/pdf/2409.19663v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"identifying-knowledge-editing-types-in-large","repo_url":"https://github.com/xpq-tech/keti","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"domain-generalization","task_name":"Domain Generalization"},{"task_slug":"knowledge-editing","task_name":"knowledge editing"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2409.19663","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.19663"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xpq-tech/keti","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":9,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"91a84b1a09f3183e","entry":"evaluate_model","repo":"xpq-tech/keti","repo_kind":"official","path":"abalation_closellm.py","file_url":"https://github.com/xpq-tech/keti/blob/HEAD/abalation_closellm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"91a84b1a09f3183e"}},{"code_sha256_prefix":"611b5daad6c596b7","entry":"evaluate_model","repo":"xpq-tech/keti","repo_kind":"official","path":"close_source_llms_main.py","file_url":"https://github.com/xpq-tech/keti/blob/HEAD/close_source_llms_main.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"611b5daad6c596b7"}},{"code_sha256_prefix":"920b394e7ad80c53","entry":"hierarchical_subsequence","repo":"xpq-tech/keti","repo_kind":"official","path":"easyeditor/util/nethook.py","file_url":"https://github.com/xpq-tech/keti/blob/HEAD/easyeditor/util/nethook.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"920b394e7ad80c53"}},{"code_sha256_prefix":"f85a4563ca4ff777","entry":"preprocess","repo":"xpq-tech/keti","repo_kind":"official","path":"abalation_closellm.py","file_url":"https://github.com/xpq-tech/keti/blob/HEAD/abalation_closellm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f85a4563ca4ff777"}},{"code_sha256_prefix":"5bd374a013b0e83b","entry":"preprocess","repo":"xpq-tech/keti","repo_kind":"official","path":"close_source_llms_main.py","file_url":"https://github.com/xpq-tech/keti/blob/HEAD/close_source_llms_main.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5bd374a013b0e83b"}},{"code_sha256_prefix":"70f6ab8bde55420e","entry":"recursive_copy","repo":"xpq-tech/keti","repo_kind":"official","path":"easyeditor/util/nethook.py","file_url":"https://github.com/xpq-tech/keti/blob/HEAD/easyeditor/util/nethook.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"70f6ab8bde55420e"}},{"code_sha256_prefix":"440ff98c2b1ae1aa","entry":"subsequence","repo":"xpq-tech/keti","repo_kind":"official","path":"easyeditor/util/nethook.py","file_url":"https://github.com/xpq-tech/keti/blob/HEAD/easyeditor/util/nethook.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"440ff98c2b1ae1aa"}},{"code_sha256_prefix":"96c1f23ed670da04","entry":"get_features","repo":"xpq-tech/keti","repo_kind":"official","path":"extract_features.py","file_url":"https://github.com/xpq-tech/keti/blob/HEAD/extract_features.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"96c1f23ed670da04"}},{"code_sha256_prefix":"03ab176ee52a77ac","entry":"get_features_all_hs","repo":"xpq-tech/keti","repo_kind":"official","path":"extract_features.py","file_url":"https://github.com/xpq-tech/keti/blob/HEAD/extract_features.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"03ab176ee52a77ac"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}