With the prevalence of publicly available source code repositories to train deep neural network models, neural program models can do well in source code analysis tasks such as predicting method names in given programs that cannot be easily done by traditional program analysis techniques. Although such neural program models have been tested on various existing datasets, the extent to which they generalize to unforeseen source code is largely unknown. Since it is very challenging to test neural program models on all unforeseen programs, in this paper, we propose to evaluate the generalizability of neural program models with respect to semantic-preserving transformations: a generalizable neural program model should perform equally well on programs that are of the same semantics but of different lexical appearances and syntactical structures. We compare the results of various neural program models for the method name prediction task on programs before and after automated semantic-preserving transformations. We use three Java datasets of different sizes and three state-of-the-art neural network models for code, namely code2vec, code2seq, and GGNN, to build nine such neural program models for evaluation. Our results show that even with small semantically preserving changes to the programs, these neural program models often fail to generalize their performance. Our results also suggest that neural program models based on data and control dependencies in programs generalize better than neural program models based only on abstract syntax trees. On the positive side, we observe that as the size of the training dataset grows and diversifies the generalizability of correct predictions produced by the neural program models can be improved too. Our results on the generalizability of neural program models provide insights to measure their limitations and provide a stepping stone for their improvement.


翻译:用于培养深层神经网络模型的公开源代码储存库非常普遍, 神经程序模型可以在源代码分析任务中做得很好, 例如预测特定程序中的方法名称, 而传统程序分析技术无法轻易做到。 虽然这些神经程序模型已经通过各种现有数据集测试, 但是它们推广为意外源代码的程度基本上还不清楚。 由于测试所有意外方案的神经程序模型非常困难, 我们在本文件中建议评估神经程序模型在语义保存变异方面的通用神经程序模型的通用性: 一个普遍适用的神经程序模型应该同样在具有相同语义但具有不同立体外观和合成结构的方案中运行。 我们比较了各种神经程序模型的结果, 用于在自动化的语义保留变异性变之后对程序进行预测。 我们使用三个不同尺寸的爪哇数据集和三种状态的神经网络模型来进行代码变异性变换: 一个通用的神经程序模型, 也就是 更精确变变变换的系统, 更精确的神经机变的神经程序, 更精确的神经程序, 更精确的神经程序也显示我们的系统变的系统变的模型。

0
下载
关闭预览

相关内容

ACM/IEEE第23届模型驱动工程语言和系统国际会议,是模型驱动软件和系统工程的首要会议系列,由ACM-SIGSOFT和IEEE-TCSE支持组织。自1998年以来,模型涵盖了建模的各个方面,从语言和方法到工具和应用程序。模特的参加者来自不同的背景,包括研究人员、学者、工程师和工业专业人士。MODELS 2019是一个论坛,参与者可以围绕建模和模型驱动的软件和系统交流前沿研究成果和创新实践经验。今年的版本将为建模社区提供进一步推进建模基础的机会,并在网络物理系统、嵌入式系统、社会技术系统、云计算、大数据、机器学习、安全、开源等新兴领域提出建模的创新应用以及可持续性。 官网链接:http://www.modelsconference.org/
神经常微分方程教程,50页ppt,A brief tutorial on Neural ODEs
专知会员服务
70+阅读 · 2020年8月2日
注意力图神经网络的小样本学习
专知会员服务
191+阅读 · 2020年7月16日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
无监督元学习表示学习
CreateAMind
25+阅读 · 2019年1月4日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
计算机视觉近一年进展综述
机器学习研究会
8+阅读 · 2017年11月25日
Capsule Networks解析
机器学习研究会
10+阅读 · 2017年11月12日
深度学习医学图像分析文献集
机器学习研究会
17+阅读 · 2017年10月13日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Arxiv
1+阅读 · 2021年5月10日
Compression of Deep Learning Models for Text: A Survey
VIP会员
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
无监督元学习表示学习
CreateAMind
25+阅读 · 2019年1月4日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
计算机视觉近一年进展综述
机器学习研究会
8+阅读 · 2017年11月25日
Capsule Networks解析
机器学习研究会
10+阅读 · 2017年11月12日
深度学习医学图像分析文献集
机器学习研究会
17+阅读 · 2017年10月13日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Top
微信扫码咨询专知VIP会员