Code summarization and generation empower conversion between programming language (PL) and natural language (NL), while code translation avails the migration of legacy code from one PL to another. This paper introduces PLBART, a sequence-to-sequence model capable of performing a broad spectrum of program and language understanding and generation tasks. PLBART is pre-trained on an extensive collection of Java and Python functions and associated NL text via denoising autoencoding. Experiments on language generation tasks, including code summarization, generation, translation in seven programming languages show that PLBART outperforms or rivals state-of-the-art models. Moreover, experiments on discriminative tasks, e.g., program repair, clone detection, and vulnerable code detection demonstrate PLBART's effectiveness in program understanding. Furthermore, analysis reveals that PLBART learns program syntax, style (e.g., identifier naming convention), logical flow (e.g., if block inside an else block is equivalent to else if block) that are crucial to program semantics and thus excels even with limited annotations.


翻译:代码总和和生成赋予了编程语言(PL)和自然语言(NL)之间的转换能力,而代码翻译则利用了遗留代码从一个PL向另一个PL的迁移。本文介绍了PLBART,这是一个能够执行范围广泛的程序、语言理解和生成任务的序列到序列模式。PLBART通过解密自动编码,对大量爪哇和Python函数和相关NL文本进行了预先培训。语言生成任务实验,包括代码总和、生成、七种编程语言翻译,显示PLBART超越或对手最先进的模式。此外,关于歧视任务,例如程序修理、克隆探测和脆弱代码探测的实验显示了PLLBART在方案理解方案方面的有效性。此外,分析显示,PLBART学习程序语法、风格(例如标识命名会议)、逻辑流(例如,如果在另一块内形成障碍时相当于其他障碍的话),对于编程的语义至关重要,因此甚至具有有限的说明性。

0
下载
关闭预览

相关内容

【EMNLP2020】自然语言生成,Neural Language Generation
专知会员服务
39+阅读 · 2020年11月20日
最新【深度生成模型】Deep Generative Models,104页ppt
专知会员服务
71+阅读 · 2020年10月24日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
已删除
将门创投
8+阅读 · 2019年1月30日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
暗通沟渠:Multi-lingual Attention
我爱读PAMI
7+阅读 · 2018年2月24日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Graph Transformer for Graph-to-Sequence Learning
Arxiv
4+阅读 · 2019年11月30日
Arxiv
8+阅读 · 2018年5月21日
VIP会员
最新内容
2025年大语言模型进展报告
专知会员服务
1+阅读 · 今天13:30
多智能体协作机制
专知会员服务
1+阅读 · 今天13:26
非对称优势:美海军开发低成本反无人机技术
专知会员服务
4+阅读 · 今天4:39
《美战争部小企业创新研究(SBIR)计划》
专知会员服务
6+阅读 · 今天2:48
《军事模拟:将军事条令与目标融入AI智能体》
专知会员服务
9+阅读 · 今天2:43
【NTU博士论文】3D人体动作生成
专知会员服务
7+阅读 · 4月24日
以色列军事技术对美国军力发展的持续性赋能
专知会员服务
8+阅读 · 4月24日
《深度强化学习在兵棋推演中的应用》40页报告
专知会员服务
14+阅读 · 4月24日
《多域作战面临复杂现实》
专知会员服务
10+阅读 · 4月24日
《印度的多域作战:条令与能力发展》报告
专知会员服务
5+阅读 · 4月24日
相关VIP内容
【EMNLP2020】自然语言生成,Neural Language Generation
专知会员服务
39+阅读 · 2020年11月20日
最新【深度生成模型】Deep Generative Models,104页ppt
专知会员服务
71+阅读 · 2020年10月24日
相关资讯
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
已删除
将门创投
8+阅读 · 2019年1月30日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
暗通沟渠:Multi-lingual Attention
我爱读PAMI
7+阅读 · 2018年2月24日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员