arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2202.06043cs.CRcs.AI
收藏

RoPGen:通过自动编码风格转换实现代码作者归属的鲁棒性

RoPGen: Towards Robust Code Authorship Attribution via Automatic Coding Style Transformation

University of Texas at San Antonio(得克萨斯大学圣安东尼奥分校);Huazhong University of Science and Technology(华中科技大学);Center for Research in Computer Vision, University of Central Florida(中佛罗里达大学计算机视觉研究中心);Northeastern University(东北大学);University of Colorado Colorado Springs(科罗拉多大学科罗拉多斯普林斯分校)

Zhen Li, Guenevere, Chen, Chen Chen, Yayi Zou, Shouhuai Xu

摘要:

源代码作者归属是软件取证、缺陷修复和软件质量分析等应用中经常遇到的重要问题。最近的研究表明,当前的源代码作者归属方法可能会受到攻击者利用对抗性示例和编码风格操纵的影响。这就需要对代码作者归属问题的鲁棒解决方案。在本文中,我们开始研究使基于深度学习(DL)的代码作者归属鲁棒。我们提出了一个创新的框架,称为鲁棒编码风格模式生成(RoPGen),它本质上是学习作者的独特的编码风格模式,攻击者很难操纵或模仿。关键思想是在对抗训练阶段结合数据增强和梯度增强。这有效地增加了训练样本的多样性,对深度神经网络的梯度产生有意义的扰动,并学习编码风格的多样化表示。我们使用四个数据集的C,C++和Java编写的程序的有效性进行评估的RoPGen。实验结果表明,RoPGen能显著提高基于DL的代码作者归属的鲁棒性,分别降低了22.8%和41.0%的有针对性攻击和无针对性攻击的成功率.

英文摘要:

Source code authorship attribution is an important problem often encountered in applications such as software forensics, bug fixing, and software quality analysis. Recent studies show that current source code authorship attribution methods can be compromised by attackers exploiting adversarial examples and coding style manipulation. This calls for robust solutions to the problem of code authorship attribution. In this paper, we initiate the study on making Deep Learning (DL)-based code authorship attribution robust. We propose an innovative framework called Robust coding style Patterns Generation (RoPGen), which essentially learns authors' unique coding style patterns that are hard for attackers to manipulate or imitate. The key idea is to combine data augmentation and gradient augmentation at the adversarial training phase. This effectively increases the diversity of training examples, generates meaningful perturbations to gradients of deep neural networks, and learns diversified representations of coding styles. We evaluate the effectiveness of RoPGen using four datasets of programs written in C, C++, and Java. Experimental results show that RoPGen can significantly improve the robustness of DL-based code authorship attribution, by respectively reducing 22.8% and 41.0% of the success rate of targeted and untargeted attacks on average.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑