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
下载
关闭预览

相关内容

专知会员服务
44+阅读 · 2020年10月31日
100+篇《自监督学习(Self-Supervised Learning)》论文最新合集
专知会员服务
161+阅读 · 2020年3月18日
机器学习入门的经验与建议
专知会员服务
91+阅读 · 2019年10月10日
GAN新书《生成式深度学习》,Generative Deep Learning,379页pdf
专知会员服务
198+阅读 · 2019年9月30日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
【推荐】GAN架构入门综述(资源汇总)
机器学习研究会
10+阅读 · 2017年9月3日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Adversarial Mutual Information for Text Generation
Arxiv
13+阅读 · 2020年6月30日
Arxiv
38+阅读 · 2020年3月10日
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日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
【推荐】GAN架构入门综述(资源汇总)
机器学习研究会
10+阅读 · 2017年9月3日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
相关论文
Top
微信扫码咨询专知VIP会员