paperbot · PL 论文追踪

全部论文 待读 收藏

P2 RoPGen

RoPGen:鲁棒编码风格模式生成
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 2/10 · 该论文关注代码作者归属的对抗鲁棒性,属于机器学习与软件安全的交叉,但与用户画像中的静态分析、Agentic/LLM 程序分析、浮点程序分析、贝叶斯程序分析等核心方向没有直接关联。其方法主要基于对抗训练和数据/梯度增强,也未涉及 LLM/Agent 与程序分析的结合。引用 45 inbox
Zhen Li, Guenevere (Qian) Chen, Chen Chen, Yayi Zou, Shouhuai Xu
crossref: 2026-09-12

AI 速览

一句话:提出 RoPGen,通过在对抗训练中结合数据与梯度增强,学习难以模仿的编码风格模式以提升深度代码作者归属的鲁棒性。

源代码作者归属在软件取证、缺陷修复与软件质量分析中很重要,但现有基于深度学习的归属方法容易受到对抗样本和编码风格操纵的攻击,因此需要鲁棒方案。本文提出 RoPGen 框架,其核心是在对抗训练阶段结合数据增强与梯度增强,从而学习作者独特且难以操纵或模仿的编码风格模式。该方法增加了训练样本的多样性,对深度神经网络梯度生成有意义的扰动,并学习多样化的编码风格表示。作者在 C、C++ 和 Java 编写的四个程序数据集上评估 RoPGen,实验表明它能显著提升基于深度学习的代码作者归属鲁棒性,平均将 targeted 和 untargeted 攻击的成功率分别降低 22.8% 和 41.0%。

问题
源代码作者归属在软件取证、缺陷修复和质量分析中应用广泛,但现有基于深度学习的归属方法易被对抗样本和编码风格操纵攻击攻破。
方法
提出 RoPGen 框架,在对抗训练阶段同时进行数据增强与梯度增强,学习作者独特且难以操纵或模仿的编码风格模式,并学习多样化的风格表示。
评估
在 C、C++、Java 四种程序数据集上评估,平均将 targeted 和 untargeted 攻击成功率分别降低 22.8% 和 41.0%。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot6947,
  title = {RoPGen},
  author = {Zhen Li and Guenevere (Qian) Chen and Chen Chen and Yayi Zou and Shouhuai Xu},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510181}
}