Deep neural networks (DNNs) have shown remarkable performance in a variety of domains such as computer vision, speech recognition, or natural language processing. Recently they also have been applied to various software engineering tasks, typically involving processing source code. DNNs are well-known to be vulnerable to adversarial examples, i.e., fabricated inputs that could lead to various misbehaviors of the DNN model while being perceived as benign by humans. In this paper, we focus on the code comment generation task in software engineering and study the robustness issue of the DNNs when they are applied to this task. We propose ACCENT, an identifier substitution approach to craft adversarial code snippets, which are syntactically correct and functionality-preserving with respect to the original code snippet, but may mislead the DNNs to produce completely irrelevant code comments. In order to improve the robustness, ACCENT also incorporates a novel training method, which can be applied to existing code comment generation models. We conduct comprehensive experiments to evaluate our approach by attacking the mainstream encoder-decoder architectures on two large-scale publicly available datasets. The results show that ACCENT efficiently produces stable attacks with functionality-preserving adversarial examples, and the generated examples have better transferability compared with baselines. We also confirm, via experiments, the effectiveness in improving model robustness with our training method.


翻译:深神经网络(DNNs)在计算机视觉、语音识别或自然语言处理等各个领域表现出了显著的绩效。最近,这些网络还被用于各种软件工程任务,通常涉及处理源代码。 DNNs众所周知容易受到对抗性例子的伤害,即制造投入可能导致DNN模式的各种错误行为,同时被人类视为无害。在本文件中,我们侧重于软件工程中的代码评论生成任务,并研究DNs在应用到这一任务时的稳健性问题。我们建议采用ACCENT(识别替代方法)来制作对抗代码片断,这些代码片断通常涉及处理源代码代码代码。DNNS众所周知,很容易受到对抗性实例的干扰,例如,编造的编造材料可能会导致DNNs产生完全无关的代码评论。为了提高稳健性,ACCentent还采用了一种新的培训方法,可用于现有的代码生成模型生成模型模型生成模型。我们进行全面的实验,通过两个大尺度的代码解析器结构来评估我们的方法。我们用两种大规模的公设性代码解码结构来评估我们的方法,通过可获取的精确性模型,我们制作的功能性测试的结果显示稳定性测试的功能,我们制作了稳定的功能性模型,我们以更稳定性模型的功能性地显示我们制作了稳定的测试的模型。

0
下载
关闭预览

相关内容

专知会员服务
44+阅读 · 2020年10月31日
最新【深度生成模型】Deep Generative Models,104页ppt
专知会员服务
67+阅读 · 2020年10月24日
最新《生成式对抗网络》简介,25页ppt
专知会员服务
169+阅读 · 2020年6月28日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
推荐|深度强化学习聊天机器人(附论文)!
全球人工智能
4+阅读 · 2018年1月30日
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日
Deflecting Adversarial Attacks
Arxiv
8+阅读 · 2020年2月18日
Feature Denoising for Improving Adversarial Robustness
Arxiv
15+阅读 · 2018年12月9日
Arxiv
10+阅读 · 2018年3月23日
VIP会员
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
推荐|深度强化学习聊天机器人(附论文)!
全球人工智能
4+阅读 · 2018年1月30日
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会员