原文:Deep Learning On Code with an Unbounded Vocabulary
作者:Milan Cvitkovic
单位:加州理工学院(Caltech, California Institute of Technology)、Amazon AI
会议:EasyChair 2018
模型
- 讲源代码转成AST
- 在AST的基础上加各种边,如数据流,控制流
- (本文重点)变量的结点和
subtoken
之间加边
- 用GGNN训练
效果
FILL-IN-THE-BLANK
Unseen files from seen repos Entirely unseen repos AST Augmented AST AST Augmented AST Fixed Vocab 0.580.800.360.59CharCNN Only 0.600.900.480.84Graph Vocab (ours) 0.890.970.800.92
Variable Naming
Unseen files from seen repos Entirely unseen repos AST Augmented AST AST Augmented AST Fixed Vocab 0.23(7.22)0.19(7.64)0.05(8.66)0.04(8.34)CharCNN Only 0.22(8.67)0.20(7.46)0.06(8.82)0.06(8.16)Graph Vocab (ours) 0.49(3.87)0.53(3.68)0.38(4.81)0.41(4.28)
小结
又一个加边狂魔。
论文里挂的GitHub,点开是没有的,所以看不了代码。
在subtoken
和ast node
之间加个边也是很不错的
这个论文要是数据集用的是微软的那个java-small
就好了,可以好好比一下,可惜是自己爬的。
参考
数据集