当前位置:网站首页>【AI4Code】《Unified Pre-training for Program Understanding and Generation》 NAACL 2021
【AI4Code】《Unified Pre-training for Program Understanding and Generation》 NAACL 2021
2022-07-25 11:11:00 【chad_lee】
《Unified Pre-training for Program Understanding and Generation》 NAACL 2021
文章提出的PLBART是一种序列到序列模型,能够执行广泛的程序和语言理解和生成任务。 PLBART 通过denoising autoencoding对大量 Java 和 Python 函数以及相关的 NL 文本进行了预训练。代码摘要、代码生成和七种编程语言代码翻译的实验表明,PLBART 优于或与最先进的模型相媲美。此外,在判别任务上的实验,例如程序修复、克隆检测和易受攻击的代码检测,证明了 PLBART 在程序理解方面的有效性。此外,分析表明 PLBART 学习程序语法、样式(例如,标识符命名约定)、逻辑流程(例如,else 块内的 if 块等效于 else if 块)对程序语义至关重要,因此即使在有限的注释下也表现的很好。
去噪预训练
PLBART基于BARTbase架构,使用seq2seq去噪预训练来利用PL和NL中的未标记数据,这里有三种噪声策略:标记屏蔽、标记删除和标记填充,将有噪音的序列输入encoder,原始序列加上位置偏移输入decoder,目标是去除噪声恢复原序列。

其中token infilling是将 0~k 个token替换成 [MASK] ,k=0时就是添加一个 mask而已。
在预训练的时候 NL和 PL比例是1:14,所以需要上采样和下采样去偏。
下游任务

下游任务有根据代码生成描述,根据描述生成代码 和代码翻译,实质上都是seq2seq任务。
还有两个分类任务:克隆代码检测和脆弱代码检测,对于pair输入,将两段数据拼接起来,中间用一个 </s> token连接。decoder的最后一个输出送入线性分类器中分类。
边栏推荐
- 银行理财子公司蓄力布局A股;现金管理类理财产品整改加速
- W5500 upload temperature and humidity to onenet platform
- brpc源码解析(八)—— 基础类EventDispatcher详解
- GPT plus money (OpenAI CLIP,DALL-E)
- php curl post Length Required 错误设置header头
- Classification parameter stack of JS common built-in object data types
- Oil monkey script link
- MySQL historical data supplement new data
- JVM performance tuning methods
- 剑指 Offer 22. 链表中倒数第k个节点
猜你喜欢

JS operator

brpc源码解析(七)—— worker基于ParkingLot的bthread调度

【6篇文章串讲ScalableGNN】围绕WWW 2022 best paper《PaSca》

Differences in usage between tostring() and new string()

Start with the development of wechat official account

dirReader. Readentries compatibility issues. Exception error domexception

Innovation and breakthrough! AsiaInfo technology helped a province of China Mobile complete the independent and controllable transformation of its core accounting database

【IMX6ULL笔记】--内核底层驱动初步探究

【GCN-RS】MCL: Mixed-Centric Loss for Collaborative Filtering (WWW‘22)

LeetCode第303场周赛(20220724)
随机推荐
brpc源码解析(八)—— 基础类EventDispatcher详解
JS process control
软件测试阶段的风险
toString()与new String()用法区别
[leetcode brush questions]
[GCN multimodal RS] pre training representations of multi modal multi query e-commerce search KDD 2022
Eigenvalues and eigenvectors of matrices
微星主板前面板耳机插孔无声音输出问题【已解决】
【高并发】SimpleDateFormat类到底为啥不是线程安全的?(附六种解决方案,建议收藏)
【GCN-RS】Are Graph Augmentations Necessary? Simple Graph Contrastive Learning for RS (SIGIR‘22)
银行理财子公司蓄力布局A股;现金管理类理财产品整改加速
已解决 Files‘ name is invalid or does not exist (1205)
Brpc source code analysis (V) -- detailed explanation of basic resource pool
异构图神经网络用于推荐系统问题(ACKRec,HFGN)
对比学习的应用(LCGNN,VideoMoCo,GraphCL,XMC-GAN)
Hardware connection server TCP communication protocol gateway
W5500 multi node connection
已解决The JSP specification requires that an attribute name is preceded by whitespace
brpc源码解析(七)—— worker基于ParkingLot的bthread调度
Solved files' name is invalid or doors not exist (1205)