{"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-2605-07024","title":"Delulu: A Verified Multi-Lingual Benchmark for Code Hallucination Detection in Fill-in-the-Middle Tasks","arxiv_id":"2605.07024","date":"2026-05-07","proceeding":null,"authors":["Mahdi Erfanian","Nelson Daniel Troncoso","Aashna Garg","Amabel Gale","Xiaoyu Liu","Pareesa Ameneh Golnari","Shengyu Fu"],"abstract":"Large Language Models for code generation frequently produce hallucinations in Fill-in-the-Middle (FIM) tasks -- plausible but incorrect completions such as invented API methods, invalid parameters, undefined variables, or non-existent imports. These failures pass superficial review yet introduce runtime errors. We introduce Delulu, a verified multi-lingual benchmark of 1,951 FIM samples across 7 languages and 4 hallucination types. Samples are curated through an adversarial pipeline: a frontier LLM generates plausible hallucinations, four diverse judge models evaluate them, embedding-based clustering mines progressively harder examples, self-contained Docker containers verify that golden completions compile while hallucinated variants produce the expected runtime error, and a final human-expert review removes any remaining biased or trivially decidable samples. We evaluate 11 open-weight FIM models from five families spanning 0.5B-32B parameters: a six-point Qwen2.5-Coder scaling slate, plus a cross-family slate (CodeLlama, DeepSeek-Coder-V2, StarCoder2). The strongest model reaches only 84.5% pass@1, no family exceeds 0.77 Edit Similarity, and every family produces hallucination-aligned completions on a non-trivial share of samples, confirming that the difficulty exposed by Delulu is task-intrinsic rather than family-specific. We release the benchmark, containers, and evaluation framework at https://github.com/microsoft/delulu.","url_abs":"https://arxiv.org/abs/2605.07024","url_pdf":"https://arxiv.org/pdf/2605.07024","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":{"syntology_url":"https://syntology.ai/paper/2605.07024","atlas_url":"https://app.syntology.ai/?focus=2605.07024","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2605.07024"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/microsoft/delulu","reach":null}],"summary":{"ran":6},"by_repo_kind":{"found_in_text":{"samples":6,"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":0,"samples":[{"code_sha256_prefix":"bd072bee6c3e3420","entry":"build_user_prompt","repo":"microsoft/delulu","repo_kind":"found_in_text","path":"evaluations/run_delulu_judges.py","file_url":"https://github.com/microsoft/delulu/blob/HEAD/evaluations/run_delulu_judges.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":"bd072bee6c3e3420"}},{"code_sha256_prefix":"709e9faa24260785","entry":"edit_similarity","repo":"microsoft/delulu","repo_kind":"found_in_text","path":"evaluations/run_completion_metrics.py","file_url":"https://github.com/microsoft/delulu/blob/HEAD/evaluations/run_completion_metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"709e9faa24260785"}},{"code_sha256_prefix":"ef6311939e338ba3","entry":"is_hallucinated_aligned","repo":"microsoft/delulu","repo_kind":"found_in_text","path":"evaluations/run_completion_metrics.py","file_url":"https://github.com/microsoft/delulu/blob/HEAD/evaluations/run_completion_metrics.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":"ef6311939e338ba3"}},{"code_sha256_prefix":"e523bbf359d5d3cd","entry":"judge_one","repo":"microsoft/delulu","repo_kind":"found_in_text","path":"evaluations/run_delulu_judges.py","file_url":"https://github.com/microsoft/delulu/blob/HEAD/evaluations/run_delulu_judges.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":"e523bbf359d5d3cd"}},{"code_sha256_prefix":"886224736275f977","entry":"levenshtein","repo":"microsoft/delulu","repo_kind":"found_in_text","path":"evaluations/run_completion_metrics.py","file_url":"https://github.com/microsoft/delulu/blob/HEAD/evaluations/run_completion_metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"886224736275f977"}},{"code_sha256_prefix":"85a1174c53ba7c3a","entry":"parse_score","repo":"microsoft/delulu","repo_kind":"found_in_text","path":"evaluations/run_delulu_judges.py","file_url":"https://github.com/microsoft/delulu/blob/HEAD/evaluations/run_delulu_judges.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"85a1174c53ba7c3a"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}