arrow
返回

Adversarial Robustness of Deep Code Comment Generation

delete2022-07-12
delete25
delete
OA
AI
周
周余 (Yu Zhou)
X
Xiaoqing Zhang
T
Tingting Han
T
Taolue Chen *
H
Harald C. Gall
DOI:10.1145/3501256delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Deep neural networks (DNNs) have shown remarkable performance in a variety of domains such as computer vision, speech recognition, and 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 (Adversarial Code Comment gENeraTor), 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 the baselines. We also confirm, via experiments, the effectiveness in improving model robustness with our training method.
Keyword:
Code comment generation
adversarial attack
deep learning
robustness

期刊

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
论文数:
1.2K
被引数:
3.4K

机构

U
university of london
学者数:
21.5W
论文数: 19.7W
被引数: 305
B
Birkbeck University London
学者数:
1.8K
论文数: 1.4K
被引数: 11
引用论文

引用论文

err
IF0
err
err0
errOAAI
err
err分享
err收藏
err分享
err收藏
Establishment and characterization of a new triple-negative canine mammary cancer cell line
err2018-10-01
err0
PREAI
errHong Zhang; Shimin Pei; Bin Zhou; Huanan Wang; Hongchao Du; Di Zhang; Degui Lin
err分享
err收藏
err分享
err收藏
学者 查看更多内容