{"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/can-knowledge-editing-really-correct","title":"Can Knowledge Editing Really Correct Hallucinations?","arxiv_id":"2410.16251","date":"2024-10-21","proceeding":null,"authors":["Baixiang Huang","Canyu Chen","Xiongxiao Xu","Ali Payani","Kai Shu"],"abstract":"Large Language Models (LLMs) suffer from hallucinations, referring to the non-factual information in generated content, despite their superior capacities across tasks. Meanwhile, knowledge editing has been developed as a new popular paradigm to correct the erroneous factual knowledge encoded in LLMs with the advantage of avoiding retraining from scratch. However, one common issue of existing evaluation datasets for knowledge editing is that they do not ensure LLMs actually generate hallucinated answers to the evaluation questions before editing. When LLMs are evaluated on such datasets after being edited by different techniques, it is hard to directly adopt the performance to assess the effectiveness of different knowledge editing methods in correcting hallucinations. Thus, the fundamental question remains insufficiently validated: Can knowledge editing really correct hallucinations in LLMs? We proposed HalluEditBench to holistically benchmark knowledge editing methods in correcting real-world hallucinations. First, we rigorously construct a massive hallucination dataset with 9 domains, 26 topics and more than 6,000 hallucinations. Then, we assess the performance of knowledge editing methods in a holistic way on five dimensions including Efficacy, Generalization, Portability, Locality, and Robustness. Through HalluEditBench, we have provided new insights into the potentials and limitations of different knowledge editing methods in correcting hallucinations, which could inspire future improvements and facilitate the progress in the field of knowledge editing.","url_abs":"https://arxiv.org/abs/2410.16251v2","url_pdf":"https://arxiv.org/pdf/2410.16251v2.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":"can-knowledge-editing-really-correct","repo_url":"https://github.com/llm-editing/HalluEditBench","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"hallucination","task_name":"Hallucination"},{"task_slug":"knowledge-editing","task_name":"knowledge editing"}],"methods":[],"datasets_introduced":[{"slug":"hallueditbench","name":"HalluEditBench","full_name":""}],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.16251","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.16251"}},"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/llm-editing/HalluEditBench","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":2,"ran":2,"ran_fixture":1,"unverified":9},"by_repo_kind":{"official":{"samples":14,"ran":5,"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":14,"samples":[{"code_sha256_prefix":"27659a9c234ffb11","entry":"binary_log_probs","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/easyeditor/trainer/losses.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/easyeditor/trainer/losses.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"27659a9c234ffb11"}},{"code_sha256_prefix":"920b394e7ad80c53","entry":"hierarchical_subsequence","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/easyeditor/util/nethook.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"920b394e7ad80c53"}},{"code_sha256_prefix":"e078eeed20f03838","entry":"masked_mean","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/easyeditor/trainer/losses.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/easyeditor/trainer/losses.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e078eeed20f03838"}},{"code_sha256_prefix":"70f6ab8bde55420e","entry":"recursive_copy","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/easyeditor/util/nethook.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"70f6ab8bde55420e"}},{"code_sha256_prefix":"440ff98c2b1ae1aa","entry":"subsequence","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/easyeditor/util/nethook.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"440ff98c2b1ae1aa"}},{"code_sha256_prefix":"2381bf9caafb3f74","entry":"evaluate_response","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/hallucination_editor.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/hallucination_editor.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2381bf9caafb3f74"}},{"code_sha256_prefix":"2f2104a13f4d0b64","entry":"get_all_acc_keys","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/hallucination_editor.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/hallucination_editor.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2f2104a13f4d0b64"}},{"code_sha256_prefix":"d2e4c1979dd70b9a","entry":"get_model","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/easyeditor/trainer/models.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/easyeditor/trainer/models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d2e4c1979dd70b9a"}},{"code_sha256_prefix":"e82d0dc93553559b","entry":"get_response","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/eval_hallu.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/eval_hallu.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e82d0dc93553559b"}},{"code_sha256_prefix":"c345aa339c992639","entry":"get_response","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/hallucination_editor.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/hallucination_editor.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c345aa339c992639"}},{"code_sha256_prefix":"07845ab4336c94fa","entry":"get_response","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/util.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"07845ab4336c94fa"}},{"code_sha256_prefix":"2defe42cf1a7f301","entry":"get_tokenizer","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/easyeditor/trainer/models.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/easyeditor/trainer/models.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2defe42cf1a7f301"}},{"code_sha256_prefix":"bcc592aa5c1e2bb3","entry":"kl_loc_loss","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/easyeditor/trainer/losses.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/easyeditor/trainer/losses.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bcc592aa5c1e2bb3"}},{"code_sha256_prefix":"09477d8e8f62fe1c","entry":"load_api_key","repo":"llm-editing/HalluEditBench","repo_kind":"official","path":"code/util.py","file_url":"https://github.com/llm-editing/HalluEditBench/blob/HEAD/code/util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"09477d8e8f62fe1c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}