arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2311.06505cs.LG
收藏

CompCodeVet:一种编译器引导的代码数据集验证与增强方法

CompCodeVet: A Compiler-guided Validation and Enhancement Approach for Code Dataset

Le Chen, Arijit Bhattacharjee, Nesreen K. Ahmed, Niranjan Hasabnis, Gal Oren, Bin Lei, Ali Jannesari

AI总结:

本文提出CompCodeVet,一种编译器引导的思维链方法,利用编译器作为教师,从不可编译的C/C++代码生成可编译代码,提升大型语言模型训练数据集质量。

摘要:

大型语言模型(LLMs)因其在多种应用中的卓越表现,在学术界和工业界日益突出。随着这些模型参数量的增加,它们在情感分析和机器翻译等任务中表现出色。然而,即使是拥有数十亿参数的模型,在面对需要多步推理的任务时也面临挑战。代码生成与理解,尤其是在C和C++语言中,成为显著的难题。虽然基于代码数据集训练的LLMs在许多任务中表现出能力,但它们在修正无法编译的C和C++代码方面存在困难。我们的调查将这种欠佳表现归因于两个主要因素:训练数据集的质量以及问题本身固有的复杂性,后者需要复杂的推理。现有的“思维链”(CoT)提示技术旨在增强多步推理。然而,这种方法仍然保留了与LLMs潜在缺陷相关的局限性。在这项工作中,我们提出了CompCodeVet,一种编译器引导的CoT方法,用于从不可编译的代码生成可编译的代码。与使用更大LLMs的传统方法不同,我们利用编译器作为教师,建立更稳健的零样本思维过程。在两个开源代码数据集上对CompCodeVet的评估表明,CompCodeVet能够提高LLMs的训练数据集质量。

英文摘要:

Large language models (LLMs) have become increasingly prominent in academia and industry due to their remarkable performance in diverse applications. As these models evolve with increasing parameters, they excel in tasks like sentiment analysis and machine translation. However, even models with billions of parameters face challenges in tasks demanding multi-step reasoning. Code generation and comprehension, especially in C and C++, emerge as significant challenges. While LLMs trained on code datasets demonstrate competence in many tasks, they struggle with rectifying non-compilable C and C++ code. Our investigation attributes this subpar performance to two primary factors: the quality of the training dataset and the inherent complexity of the problem which demands intricate reasoning. Existing "Chain of Thought" (CoT) prompting techniques aim to enhance multi-step reasoning. This approach, however, retains the limitations associated with the latent drawbacks of LLMs. In this work, we propose CompCodeVet, a compiler-guided CoT approach to produce compilable code from non-compilable ones. Diverging from the conventional approach of utilizing larger LLMs, we employ compilers as a teacher to establish a more robust zero-shot thought process. The evaluation of CompCodeVet on two open-source code datasets shows that CompCodeVet has the ability to improve the training dataset quality for LLMs.

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

↑