paper-with-me

홈 › Papers

Task Abstention for Large Language Models in Code Generation

2026-05-16 · Yanke Zhou, Yuhao Tan, Senrong Xu, Zenan Li, Yuan Yao, Taolue Chen, Xiaoxing Ma arxiv

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 to handle syntactic diversity of semantically equivalent code without reliance on oracle test cases or external databases. We prove that our approach provides a rigorous, distribution-free theoretical guarantee on its abstention decisions. We evaluate our method on benchmark datasets using several open-source code LLMs. Results show that our method allows generative models to more accurately and efficiently identify and abstain from tasks that induce hallucination compared to existing techniques, providing a reliable mechanism for safer and more robust code generation.

📄 PDF Abstract BibTeX arXiv:2605.17029

Code (0)

등록된 구현이 없습니다.

Tasks

Code Generation

Similar Papers 제목 키워드 기반

Hallucinate Less by Thinking More: Aspect-Based Causal Abstention for Large Language Models

2025-11-21 · Vy Nguyen, Ziqi Xu, Jeffrey Chan, Estrid He 외 arxiv

Large Language Models (LLMs) often produce fluent but factually incorrect responses, a phenomenon known as hallucination. Abstention, where the model chooses not to answer and instead outputs phrases such as "I don't kno…

Causal Inference

Rewarding Intellectual Humility Learning When Not To Answer In Large Language Models

2026-01-27 · Abha Jha, Akanksha Mahajan, Ashwath Vaithinathan Aravindan, Praveen Saravanan 외 arxiv

Large Language Models (LLMs) often produce hallucinated or unverifiable content, undermining their reliability in factual domains. This work investigates Reinforcement Learning with Verifiable Rewards (RLVR) as a trainin…

Reinforcement LearningQuestion Answering

Repair, Not Improvement: Decomposing Constrained Decoding in Tool-Call Abstention

2026-08-14 · Janghoon Lee arxiv

Function calling is what the recent accounting of constrained generation explicitly sets aside: it finds the decoder's contribution small for format constraints, then warns in its Section 7 against extrapolating where a …

Learning Conformal Abstention Policies for Adaptive Risk Management in Large Language and Vision-Language Models

2025-02-08 · Sina Tayebati, Divake Kumar, Nastaran Darabi, Dinithi Jayasuriya 외

Large Language and Vision-Language Models (LLMs/VLMs) are increasingly used in safety-critical applications, yet their opaque decision-making complicates risk assessment and reliability. Uncertainty quantification (UQ) h…

Conformal PredictionDecision MakingHallucinationInformativeness+4

Know Your Limits: A Survey of Abstention in Large Language Models

2024-07-25 · Bingbing Wen, Jihan Yao, Shangbin Feng, Chenjun Xu 외

Abstention, the refusal of large language models (LLMs) to provide an answer, is increasingly recognized for its potential to mitigate hallucinations and enhance safety in LLM systems. In this survey, we introduce a fram…