NoviCode:从新手自然语言表述生成程序
NoviCode: Generating Programs from Natural Language Utterances by Novices
AI总结:
针对非技术用户自然语言生成复杂程序难题,提出NoviCode任务与基准,并采用自然语言与代码层次结构对齐的方法,显著提升大模型性能。
摘要:
当前的文本到代码模型在从自然语言片段生成可执行代码方面展现出令人印象深刻的能力。然而,现有研究聚焦于技术性指令和面向程序员的语言,这些模型能否有效地将非技术用户给出的自然语言描述(表达复杂目标)转化为包含复杂流程(由API访问以及循环、条件和顺序等控制结构组成)的可执行程序,仍是一个开放问题。为了应对从非技术性描述生成完整程序的挑战,我们提出了NoviCode,一项新颖的自然语言编程任务,该任务以API和非程序员新手给出的自然语言描述为输入,并输出可执行程序。为了评估模型在此任务上的有效性,我们提供了一个新颖的基准测试,并附带了测试套件,其中生成的程序代码不是根据其形式,而是根据其功能执行来评估。我们的实验表明,首先,NoviCode确实是代码合成领域中的一项具有挑战性的任务,从非技术性指令生成复杂代码超出了当前文本到代码范式的范畴。其次,我们展示了一种新颖的方法,即将自然语言表述与代码的组成层次结构对齐,与端到端的文本到代码方法相比,极大地提升了大型语言模型在此任务上的性能。
英文摘要:
Current Text-to-Code models demonstrate impressive capabilities in generating executable code from natural language snippets. However, current studies focus on technical instructions and programmer-oriented language, and it is an open question whether these models can effectively translate natural language descriptions given by non-technical users and express complex goals, to an executable program that contains an intricate flow - composed of API access and control structures as loops, conditions, and sequences. To unlock the challenge of generating a complete program from a plain non-technical description we present NoviCode, a novel NL Programming task, which takes as input an API and a natural language description by a novice non-programmer and provides an executable program as output. To assess the efficacy of models on this task, we provide a novel benchmark accompanied by test suites wherein the generated program code is assessed not according to their form, but according to their functional execution. Our experiments show that, first, NoviCode is indeed a challenging task in the code synthesis domain, and that generating complex code from non-technical instructions goes beyond the current Text-to-Code paradigm. Second, we show that a novel approach wherein we align the NL utterances with the compositional hierarchical structure of the code, greatly enhances the performance of LLMs on this task, compared with the end-to-end Text-to-Code counterparts.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。