Generating Adversarial Examples for Holding Robustness of Source Code Processing Models

Generating Adversarial Examples for Holding Robustness of Source Code Processing Models
复制标题

DOI:
10.1609/aaai.v34i01.5469
复制
发表时间:
2020-04
期刊:
--
影响因子:
--
通讯作者:
Huangzhao Zhang;Zhuo Li;Ge Li;L. Ma;Yang Liu;Zhi Jin
Huangzhao Zhang;Zhuo Li;Ge Li;L. Ma;Yang Liu;Zhi Jin
中科院分区:
其他
文献类型:
--
作者:
Huangzhao Zhang;Zhuo Li;Ge Li;L. Ma;Yang Liu;Zhi Jin

文献摘要

被引文献

相似文献

源代码的自动化处理、分析和生成是软件和系统生命周期中的关键活动。因此,深度学习(DL)在处理这些任务方面表现出了一定的能力,但目前最先进的DL模型仍然存在鲁棒性不强的问题,很容易被对抗性攻击欺骗。与图像、音频和自然语言的对抗性攻击不同,编程语言的结构化本质带来了新的挑战。在本文中,我们提出了一种基于Metropolis-Hastings采样的标识符重命名技术,名为\fullmethod(\method),它为专门用于源代码处理的DL模型生成对抗性示例。我们对功能分类基准的深入评估证明了\方法在生成对抗性源代码示例方面的有效性。通过我们的对抗训练方法增强的更高的鲁棒性和性能进一步证实了基于DL模型的方法对于未来全自动源代码处理的有用性。
Automated processing, analysis, and generation of source code are among the key activities in software and system lifecycle. To this end, while deep learning (DL) exhibits a certain level of capability in handling these tasks, the current state-of-the-art DL models still suffer from non-robust issues and can be easily fooled by adversarial attacks.Different from adversarial attacks for image, audio, and natural languages, the structured nature of programming languages brings new challenges. In this paper, we propose a Metropolis-Hastings sampling-based identifier renaming technique, named \fullmethod (\method), which generates adversarial examples for DL models specialized for source code processing. Our in-depth evaluation on a functionality classification benchmark demonstrates the effectiveness of \method in generating adversarial examples of source code. The higher robustness and performance enhanced through our adversarial training with \method further confirms the usefulness of DL models-based method for future fully automated source code processing.