{"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/model-editing-by-pure-fine-tuning","title":"Model Editing by Standard Fine-Tuning","arxiv_id":"2402.11078","date":"2024-02-16","proceeding":null,"authors":["Govind Gangadhar","Karl Stratos"],"abstract":"Standard fine-tuning is considered not as effective as specialized methods for model editing due to its comparatively poor performance. However, it is simple, agnostic to the architectural details of the model being edited, and able to leverage advances in standard training techniques with no additional work (e.g., black-box PEFT for computational efficiency), making it an appealing choice for a model editor. In this work, we show that standard fine-tuning alone can yield competitive model editing performance with two minor modifications. First, we optimize the conditional likelihood rather than the full likelihood. Second, in addition to the typical practice of training on randomly paraphrased edit prompts to encourage generalization, we also train on random or similar unedited facts to encourage locality. Our experiments on the ZsRE and CounterFact datasets demonstrate that these simple modifications allow standard fine-tuning to match or outperform highly specialized editors in terms of edit score.","url_abs":"https://arxiv.org/abs/2402.11078v3","url_pdf":"https://arxiv.org/pdf/2402.11078v3.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":"model-editing-by-pure-fine-tuning","repo_url":"https://github.com/au-revoir/model-editing-ft","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"model-editing","task_name":"Model Editing"},{"task_slug":"model","task_name":"model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2402.11078","atlas_url":"https://app.syntology.ai/?focus=2402.11078","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.11078"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/au-revoir/model-editing-ft","reach":{"status":"ok"}}],"summary":{"ran":6,"unverified":10},"by_repo_kind":{"official":{"samples":16,"ran":6,"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":16,"samples":[{"code_sha256_prefix":"22d5862d2be6ea55","entry":"calculate_accuracy","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"eval_counterfact.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/eval_counterfact.py","link_basis":"first_harvest_node","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":"22d5862d2be6ea55"}},{"code_sha256_prefix":"7d11acc3973989ae","entry":"calculate_accuracy","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"eval_wiki_recent.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/eval_wiki_recent.py","link_basis":"first_harvest_node","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":"7d11acc3973989ae"}},{"code_sha256_prefix":"6eac6ac95f073c9b","entry":"calculate_accuracy","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"eval_zsre.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/eval_zsre.py","link_basis":"first_harvest_node","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":"6eac6ac95f073c9b"}},{"code_sha256_prefix":"8483cffb5dea03d2","entry":"convert_to_scalar","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"trl/core.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/trl/core.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":"8483cffb5dea03d2"}},{"code_sha256_prefix":"7ef6c77fb3c41271","entry":"load_result_json_files","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"summarize_consistency_fluency.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/summarize_consistency_fluency.py","link_basis":"first_harvest_node","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":"7ef6c77fb3c41271"}},{"code_sha256_prefix":"7dc16cc69c54c94d","entry":"stack_dicts","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"trl/core.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/trl/core.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":"7dc16cc69c54c94d"}},{"code_sha256_prefix":"4b7820536046b5d3","entry":"compute_n_gram_entropy","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"calculate_ge_rs.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/calculate_ge_rs.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":"4b7820536046b5d3"}},{"code_sha256_prefix":"1782ce5551146615","entry":"flatten_dict","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"trl/core.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/trl/core.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":"1782ce5551146615"}},{"code_sha256_prefix":"7f36cf283f994f81","entry":"generate_fast","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"generate.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/generate.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":"7f36cf283f994f81"}},{"code_sha256_prefix":"68ccd7601bf63c02","entry":"get_peft_config","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"config.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/config.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":"68ccd7601bf63c02"}},{"code_sha256_prefix":"d74c89166816770f","entry":"get_tfidf_vectorizer","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"tfidf_stats.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/tfidf_stats.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":"d74c89166816770f"}},{"code_sha256_prefix":"a4c1dac0b23a543f","entry":"initialize_training_args","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"config.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/config.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":"a4c1dac0b23a543f"}},{"code_sha256_prefix":"14ad65e85245ae37","entry":"n_gram_entropy","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"calculate_ge_rs.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/calculate_ge_rs.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":"14ad65e85245ae37"}},{"code_sha256_prefix":"a2f59fd52a85ae0f","entry":"test_batch_prediction","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"eval_counterfact.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/eval_counterfact.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":"a2f59fd52a85ae0f"}},{"code_sha256_prefix":"ffd39e3f4599fac9","entry":"test_batch_prediction","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"eval_wiki_recent.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/eval_wiki_recent.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":"ffd39e3f4599fac9"}},{"code_sha256_prefix":"995ae50aa2cb1d90","entry":"test_batch_prediction_acc","repo":"au-revoir/model-editing-ft","repo_kind":"official","path":"eval_wiki_recent.py","file_url":"https://github.com/au-revoir/model-editing-ft/blob/HEAD/eval_wiki_recent.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":"995ae50aa2cb1d90"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}