CRAIFeb 12, 2022

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

arXiv:2202.06043v164 citations
Originality Incremental advance
AI Analysis

This addresses the need for robust code authorship attribution in software forensics and quality analysis, representing an incremental improvement over existing methods.

The paper tackles the vulnerability of deep learning-based code authorship attribution to adversarial attacks by proposing RoPGen, a framework that learns robust coding style patterns through data and gradient augmentation, reducing targeted and untargeted attack success rates by 22.8% and 41.0% on average.

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.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes