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 semantically close 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众所周知,这很容易成为对抗性实例,例如,编造物造物,但可能会误导DNNes,以产生完全无关的代码评论。为了提高强健性,ACCENT还采用了一种新的培训方法,可用于现有的代码生成模型生成模型模型。我们进行了全面的实验,通过两个大规模、可公开获取的代码解码结构结构来评估我们的方法。我们用两种大规模、具有更精确性、更精确的实验性的方法,我们用更精确的模型来模拟的模型来评估。

0
下载
关闭预览

相关内容

【EMNLP2020】自然语言生成,Neural Language Generation
专知会员服务
38+阅读 · 2020年11月20日
专知会员服务
44+阅读 · 2020年10月31日
最新【深度生成模型】Deep Generative Models,104页ppt
专知会员服务
67+阅读 · 2020年10月24日
【Google】平滑对抗训练,Smooth Adversarial Training
专知会员服务
46+阅读 · 2020年7月4日
因果图,Causal Graphs,52页ppt
专知会员服务
238+阅读 · 2020年4月19日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
GAN新书《生成式深度学习》,Generative Deep Learning,379页pdf
专知会员服务
196+阅读 · 2019年9月30日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
已删除
将门创投
3+阅读 · 2019年1月29日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
Arxiv
0+阅读 · 2022年1月4日
Deflecting Adversarial Attacks
Arxiv
8+阅读 · 2020年2月18日
Feature Denoising for Improving Adversarial Robustness
Arxiv
15+阅读 · 2018年12月9日
Arxiv
7+阅读 · 2018年6月8日
VIP会员
相关VIP内容
【EMNLP2020】自然语言生成,Neural Language Generation
专知会员服务
38+阅读 · 2020年11月20日
专知会员服务
44+阅读 · 2020年10月31日
最新【深度生成模型】Deep Generative Models,104页ppt
专知会员服务
67+阅读 · 2020年10月24日
【Google】平滑对抗训练,Smooth Adversarial Training
专知会员服务
46+阅读 · 2020年7月4日
因果图,Causal Graphs,52页ppt
专知会员服务
238+阅读 · 2020年4月19日
[综述]深度学习下的场景文本检测与识别
专知会员服务
77+阅读 · 2019年10月10日
GAN新书《生成式深度学习》,Generative Deep Learning,379页pdf
专知会员服务
196+阅读 · 2019年9月30日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
已删除
将门创投
3+阅读 · 2019年1月29日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
Top
微信扫码咨询专知VIP会员