arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2101.00259cs.CLcs.LG
收藏

基于先验知识少、单语数据多的自然语言代码生成

Code Generation from Natural Language with Less Prior and More Monolingual Data

Borealis AI(Borealis AI(北极星人工智能研究院))

Sajad Norouzi, Keyi Tang, Yanshuai Cao

摘要:

用于语义解析的训练数据集通常很小,因为与大多数其他NLP任务相比,注释需要更高的专业知识。因此,这种应用程序的模型通常需要额外的先验知识来构建到架构或算法中。对人类专家的日益依赖阻碍了自动化,并在实践中提高了开发和维护成本。这项工作研究了一个通用的基于transformer的seq2seq模型是否可以实现具有竞争力的性能与最小的代码生成特定的电感偏置设计。通过利用目标程序设计语言的相对较大的单语语料库(从网络上挖掘成本较低),我们在Django上实现了81.03%的精确匹配准确率,在CoNaLa上实现了32.57的BLEU得分。两者都是SOTA,据我们所知。这一积极的证据强调了在实践中构建准确的语义解析器的一条潜在的更容易的途径。

英文摘要:

Training datasets for semantic parsing are typically small due to the higher expertise required for annotation than most other NLP tasks. As a result, models for this application usually need additional prior knowledge to be built into the architecture or algorithm. The increased dependency on human experts hinders automation and raises the development and maintenance costs in practice. This work investigates whether a generic transformer-based seq2seq model can achieve competitive performance with minimal code-generation-specific inductive bias design. By exploiting a relatively sizeable monolingual corpus of the target programming language, which is cheap to mine from the web, we achieved 81.03% exact match accuracy on Django and 32.57 BLEU score on CoNaLa. Both are SOTA to the best of our knowledge. This positive evidence highlights a potentially easier path toward building accurate semantic parsers in practice.

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

↑