arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.27098cs.SE
收藏

基于集成的代码正确性估计不确定性估计

Ensemble-Based Uncertainty Estimation for Code Correctness Estimation

Zhejiang University(浙江大学);Beihang University(北京航空航天大学);University of Twente(特温特大学);Tianjin University(天津大学);Nanyang Technological University(南洋理工大学);Singapore Management University(新加坡管理大学)

Yunxiang Wei, Tianlin Li, Yuwei Zheng, Yanni Dong, Aishan Liu, Qiang Hu, Xiaoyu Zhang, Mingfei Cheng, Jian Yang

AI总结:

本文提出ESE方法,通过评估多模型集成样本的一致性来估计不确定性,实验表明其在代码正确性评估中表现更优,并提出Cas框架提升效率。

摘要:

大型语言模型(LLMs)在从自然语言描述生成程序方面表现出色,但确保正确性仍面临挑战。现有方法依赖不确定性估计,但单一模型可能收敛至不正确解。本文提出集成语义熵(ESE),通过评估多模型集成样本的一致性来估计不确定性。实验表明,ESE在代码正确性评估中表现更优,尤其在严格限制假阳性率的场景中,预测准确率提升53.4%。此外,利用ESE作为决策信号,提出Cas框架,在保持性能的同时,将FLOPs减少64.9%,为参数与推理缩放的平衡提供了新视角。

英文摘要:

Large language models (LLMs) have demonstrated remarkable capabilities in generating programs from natural language descriptions, yet ensuring their correctness without an external oracle remains a critical challenge. To solve the challenge, existing methods often rely on uncertainty estimation, measuring the consistency of semantics or execution behaviors across multiple samples generated by a single model. However, we observe that a single model can often converge to a consistent but incorrect solution, rendering such consistency-based proxies ineffective. To address this, we propose Ensemble Semantic Entropy (ESE), which estimates uncertainty by evaluating the consistency of samples aggregated across an ensemble of models. Experiments on LiveCodeBench demonstrate that ESE correlates more strongly with program correctness than single-model semantic entropy. Notably, in selective generation tasks with strict false-positive rate constraints, ESE improves prediction accuracy by 53.4%. Furthermore, by leveraging ESE as the decision signal, we propose a cascading test-time scaling framework Cas, which maintains performance while reducing FLOPs by 64.9% compared to single-model scaling, offering a new perspective on balancing parameter and inference scaling.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑