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

使用预训练的语言模型自动生成代码生成

Automatic Code Generation using Pre-Trained Language Models

Stanford University(斯坦福大学)

Luis Perez, Lizi Ottens, Sudharshan Viswanathan

摘要:

自然语言处理\cite{gpt2} \cite{BERT}的最新进展已经导致在多个自然语言任务中接近人类的性能。在本文中,我们试图了解类似的技术是否可以应用到一个高度结构化的环境,严格的语法规则。具体来说,我们提出了一个端到端的机器学习模型,用于在Python语言中构建在预训练的语言模型之上的代码生成。我们证明了一个微调的模型可以在代码生成任务中表现良好,达到了0.22的BLEU分数,比合理的序列到序列基线提高了46%。所有用于训练和数据处理的结果和相关代码都可以在GitHub上找到。

英文摘要:

Recent advancements in natural language processing \cite{gpt2} \cite{BERT} have led to near-human performance in multiple natural language tasks. In this paper, we seek to understand whether similar techniques can be applied to a highly structured environment with strict syntax rules. Specifically, we propose an end-to-end machine learning model for code generation in the Python language built on-top of pre-trained language models. We demonstrate that a fine-tuned model can perform well in code generation tasks, achieving a BLEU score of 0.22, an improvement of 46\% over a reasonable sequence-to-sequence baseline. All results and related code used for training and data processing are available on GitHub.

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

↑