{"paper":{"title":"Task Abstention for Large Language Models in Code Generation","license":"http://creativecommons.org/licenses/by/4.0/","headline":"Code-generating LLMs can abstain from tasks likely to produce hallucinations by checking consistency of execution results across multiple generations.","cross_cats":["cs.AI"],"primary_cat":"cs.SE","authors_text":"Senrong Xu, Taolue Chen, Xiaoxing Ma, Yanke Zhou, Yuan Yao, Yuhao Tan, Zenan Li","submitted_at":"2026-05-16T14:58:11Z","abstract_excerpt":"Large language models (LLMs) have revolutionized automated code generation. One serious concern, however, is the so-called ``hallucination'', i.e., LLMs may generate seemingly plausible but functionally incorrect code. In this paper, we study the task abstention problem, i.e., determining whether a given LLM should abstain from performing a specific code generation task to avoid likely hallucination. Our approach features a calibrated abstention rule, grounded in the principles of multiple hypothesis testing. The rule assesses generation consistency through code execution outcomes, allowing it"},"claims":{"count":4,"items":[{"kind":"strongest_claim","text":"We prove that our approach provides a rigorous, distribution-free theoretical guarantee on its abstention decisions.","source":"verdict.strongest_claim","status":"machine_extracted","claim_id":"C1","attestation":"unclaimed"},{"kind":"weakest_assumption","text":"That consistency of code execution outcomes across multiple generations can serve as a reliable proxy for detecting likely hallucinations without oracle test cases or external databases.","source":"verdict.weakest_assumption","status":"machine_extracted","claim_id":"C2","attestation":"unclaimed"},{"kind":"one_line_summary","text":"A distribution-free abstention rule grounded in multiple hypothesis testing uses execution consistency to let code LLMs avoid hallucination-prone tasks with theoretical guarantees.","source":"verdict.one_line_summary","status":"machine_extracted","claim_id":"C3","attestation":"unclaimed"},{"kind":"headline","text":"Code-generating LLMs can abstain from tasks likely to produce hallucinations by checking consistency of execution results across multiple generations.","source":"verdict.pith_extraction.headline","status":"machine_extracted","claim_id":"C4","attestation":"unclaimed"}],"snapshot_sha256":"d61da9b3c5747ed59998ad2935df27ce5d95b6174d3f2741b1e5239375ceff09"},"source":{"id":"2605.17029","kind":"arxiv","version":1},"verdict":{"id":"77e7fa9a-2da0-4b30-a502-e0d0e1610a53","model_set":{"reader":"grok-4.3"},"created_at":"2026-05-19T20:00:58.915521Z","strongest_claim":"We prove that our approach provides a rigorous, distribution-free theoretical guarantee on its abstention decisions.","one_line_summary":"A distribution-free abstention rule grounded in multiple hypothesis testing uses execution consistency to let code LLMs avoid hallucination-prone tasks with theoretical guarantees.","pipeline_version":"pith-pipeline@v0.9.0","weakest_assumption":"That consistency of code execution outcomes across multiple generations can serve as a reliable proxy for detecting likely hallucinations without oracle test cases or external databases.","pith_extraction_headline":"Code-generating LLMs can abstain from tasks likely to produce hallucinations by checking consistency of execution results across multiple generations."},"integrity":{"clean":true,"summary":{"advisory":0,"critical":0,"by_detector":{},"informational":0},"endpoint":"/pith/2605.17029/integrity.json","findings":[],"available":true,"detectors_run":[{"name":"doi_title_agreement","ran_at":"2026-05-19T20:31:18.962086Z","status":"completed","version":"1.0.0","findings_count":0},{"name":"doi_compliance","ran_at":"2026-05-19T20:10:46.861813Z","status":"completed","version":"1.0.0","findings_count":0},{"name":"citation_quote_validity","ran_at":"2026-05-19T19:49:44.682266Z","status":"skipped","version":"0.1.0","findings_count":0},{"name":"cited_work_retraction","ran_at":"2026-05-19T18:51:57.335370Z","status":"completed","version":"1.0.0","findings_count":0},{"name":"claim_evidence","ran_at":"2026-05-19T18:41:56.174467Z","status":"completed","version":"1.0.0","findings_count":0},{"name":"ai_meta_artifact","ran_at":"2026-05-19T18:33:23.491521Z","status":"skipped","version":"1.0.0","findings_count":0}],"snapshot_sha256":"f6ebc9f57031b2474783fec263276853960f716b06e7b379d9db45acf2de6c9a"},"references":{"count":42,"sample":[{"doi":"10.1126/science.abq1158","year":null,"title":"Mankowitz, Esme Sutherland Robson, Pushmeet Kohli, Nando de Freitas, Koray Kavukcuoglu, and Oriol Vinyals","work_id":"cc452f34-3d34-41ff-9206-8edad6625ce6","ref_index":1,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":null,"title":"Code Llama: Open Foundation Models for Code","work_id":"e73bffa4-7620-47ac-9327-259a60db52ca","ref_index":2,"cited_arxiv_id":"2308.12950","is_internal_anchor":true},{"doi":"10.1145/3703155","year":null,"title":"A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions","work_id":"ed8c5be1-1069-44c0-8dc4-627a7de3a371","ref_index":3,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":2023,"title":"Selfcheckgpt: Zero-resource black-box hallucination detection for generative large language models","work_id":"3ccedf7d-cf9a-41bb-90f4-6926d7b80157","ref_index":4,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":null,"title":"CodeT: Code Generation with Generated Tests","work_id":"1280b158-2c5d-444c-8584-ae187cbe83af","ref_index":5,"cited_arxiv_id":"2207.10397","is_internal_anchor":true}],"resolved_work":42,"snapshot_sha256":"178a830d6e47628b69c7c21a354b73bf22f1a1c5678cfffac8652aa646221a69","internal_anchors":8},"formal_canon":{"evidence_count":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57"},"author_claims":{"count":0,"strong_count":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57"},"builder_version":"pith-number-builder-2026-05-17-v1"}