{"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/arxiv-2509-16598","title":"PruneCD: Contrasting Pruned Self Model to Improve Decoding Factuality","arxiv_id":"2509.16598","date":"2025-09-20","proceeding":"EMNLP","authors":["Byeongho Yu","Changhun Lee","Jungyu Jin","Eunhyeok Park"],"abstract":"To mitigate the hallucination problem in large language models, DoLa exploits early exit logits from the same model as a contrastive prior. However, we found that these early exit logits tend to be flat, low in magnitude, and fail to reflect meaningful contrasts. To address this, we propose PruneCD, a novel contrastive decoding method that constructs the amateur model via layer pruning rather than early exit. This design leads to more informative and well-aligned logits, enabling more effective contrastive decoding. Through qualitative and quantitative analyses, we demonstrate that PruneCD consistently improves factuality with minimal inference overhead, offering a robust and practical approach to mitigating hallucinations in LLMs.","url_abs":"https://arxiv.org/abs/2509.16598","url_pdf":"https://arxiv.org/pdf/2509.16598","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2509.16598","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2509.16598"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/hoeng4/PruneCD","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":1,"unverified":16},"by_repo_kind":{"found_in_text":{"samples":17,"ran":1,"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":17,"samples":[{"code_sha256_prefix":"96fe095fcc6b821a","entry":"extract_answer_from_output","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"2_benchmark/1_tfqa_gen.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/2_benchmark/1_tfqa_gen.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"96fe095fcc6b821a"}},{"code_sha256_prefix":"0f14b819bc361c25","entry":"download_url","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"2_benchmark/1_tfqa_gen.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/2_benchmark/1_tfqa_gen.py","link_basis":"plan_row","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":"0f14b819bc361c25"}},{"code_sha256_prefix":"158b8847881a64b3","entry":"format_best","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"1_factual_layer_search/tfqa_mc.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/1_factual_layer_search/tfqa_mc.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":"158b8847881a64b3"}},{"code_sha256_prefix":"cd926798b14819b6","entry":"format_end2end_prompt","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"2_benchmark/1_tfqa_llama_rating.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/2_benchmark/1_tfqa_llama_rating.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":"cd926798b14819b6"}},{"code_sha256_prefix":"7137f4b8102c8487","entry":"forward_block_naive","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"prunecd/prunecd/monkeypatch/prunecd_utils.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/prunecd/prunecd/monkeypatch/prunecd_utils.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":"7137f4b8102c8487"}},{"code_sha256_prefix":"24fffbacdd62d2dc","entry":"forward_block_naive_keepnorm","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"prunecd/prunecd/monkeypatch/prunecd_utils.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/prunecd/prunecd/monkeypatch/prunecd_utils.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":"24fffbacdd62d2dc"}},{"code_sha256_prefix":"9647b3402a8f03d9","entry":"get_file_contents","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"2_benchmark/triviaqa_util.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/2_benchmark/triviaqa_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":"9647b3402a8f03d9"}},{"code_sha256_prefix":"8cf2f049f00e0464","entry":"get_file_contents_as_list","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"2_benchmark/triviaqa_util.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/2_benchmark/triviaqa_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":"8cf2f049f00e0464"}},{"code_sha256_prefix":"2a4c0ecd291e1795","entry":"load_csv","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"1_factual_layer_search/tfqa_mc.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/1_factual_layer_search/tfqa_mc.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":"2a4c0ecd291e1795"}},{"code_sha256_prefix":"a35a1be39e4bef73","entry":"load_csv","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"2_benchmark/1_tfqa_gen.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/2_benchmark/1_tfqa_gen.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":"a35a1be39e4bef73"}},{"code_sha256_prefix":"872f1d147b70aced","entry":"load_csv","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"2_benchmark/3_4_triviaqa_natural_questions.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/2_benchmark/3_4_triviaqa_natural_questions.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":"872f1d147b70aced"}},{"code_sha256_prefix":"d0bb7013dd302153","entry":"load_json","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"2_benchmark/1_tfqa_llama_rating.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/2_benchmark/1_tfqa_llama_rating.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":"d0bb7013dd302153"}},{"code_sha256_prefix":"ff3b5ca99f326851","entry":"load_jsonl","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"2_benchmark/5_strqa.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/2_benchmark/5_strqa.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":"ff3b5ca99f326851"}},{"code_sha256_prefix":"b5d313d6f48bb56a","entry":"load_jsonl","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"2_benchmark/6_gsm8k.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/2_benchmark/6_gsm8k.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":"b5d313d6f48bb56a"}},{"code_sha256_prefix":"6622a686d1cedd19","entry":"read_json","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"2_benchmark/triviaqa_util.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/2_benchmark/triviaqa_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":"6622a686d1cedd19"}},{"code_sha256_prefix":"3d0f9ff9021842f1","entry":"relative_top_filter","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"prunecd/prunecd/monkeypatch/cd_utils.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/prunecd/prunecd/monkeypatch/cd_utils.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":"3d0f9ff9021842f1"}},{"code_sha256_prefix":"c852bd4d2face0a1","entry":"split_multi_answer","repo":"hoeng4/PruneCD","repo_kind":"found_in_text","path":"1_factual_layer_search/tfqa_mc.py","file_url":"https://github.com/hoeng4/PruneCD/blob/HEAD/1_factual_layer_search/tfqa_mc.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":"c852bd4d2face0a1"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_api"},"syntology_extracted_results":null}