RoPGen: Towards Robust Code Authorship Attribution via Automatic Coding Style Transformation
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). Builds on 19 of its 51 references that are in the map. First posted on arXiv 12 Feb 2022.
Builds on
19 of 51 references.
References · 19
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
- 2020Fast is better than free: Revisiting adversarial trainingcited by 723
- 2019Adversarial Training for Free!cited by 638
- 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 376
- 2021Recent Advances in Adversarial Training for Adversarial Robustnesscited by 276
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2018Towards the first adversarially robust neural network model on MNISTcited by 104
- 2019Adversarial Robustness Against the Union of Multiple Perturbation Modelscited by 88
- 2019Adversarial Examples for Models of Codecited by 61
- 2020Semantic Robustness of Models of Source Codecited by 43
- 2020Adversarial Robustness for Codecited by 36
- 2019Misleading Authorship Attribution of Source Code using Adversarial Learningcited by 33
7 more
- 2018Adversarial Deep Learning for Robust Detection of Binary Encoded Malwarecited by 32
- 2021Generating Adversarial Computer Programs using Optimized Obfuscationscited by 20
- 2019On Training Robust PDF Malware Classifierscited by 19
- 2020GradAug: A New Regularization Method for Deep Neural Networkscited by 18
- 2020Authorship Attribution of Source Code: A Language-Agnostic Approach and Applicability in Software Engineeringcited by 9
- 2020Robustness to Programmable String Transformations via Augmented Abstract Trainingcited by 8
- 2017Git Blame Who?: Stylistic Authorship Attribution of Small, Incomplete Source Code Fragmentscited by 7
Built on by
Citing papers per year: 2023: 4; 2024: 1; 2025: 4; 2026: 4.
13 papers.
Sort:
By area:
- 2024MPCODER: Multi-user Personalized Code Generator with Explicit and Implicit Style Representation Learningcited by 12
- 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Codecited by 8
- 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistantscited by 4
- 2025Evaluate-and-Purify: Fortifying Code Language Models Against Adversarial Attacks Using LLM-as-a-Judgecited by 4
- 2023SHIELD: Thwarting Code Authorship Attributioncited by 2
- 2023Transfer Attacks and Defenses for Large Language Models on Coding Taskscited by 2
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detectioncited by 2
- 2026Fool Me If You Can: On the Robustness of Binary Code Similarity Detection Models against Semantics-preserving Transformationscited by 1
- 2023Untargeted Code Authorship Evasion with Seq2Seq Transformationcited by 0
- 2025CLASP: Training-Free LLM-Assisted Source Code Watermarking via Semantic-Preserving Transformationscited by 0
- 2026Operational Robustness of LLMs on Code Generationcited by 0
- 2026Stylometric Defenses Against Author Impersonation in Software Repositoriescited by 0
- 2026On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Quality22 Sep 2026
- 2026Stylometric Defenses Against Author Impersonation in Software Repositories3 Aug 2026
- 2026Operational Robustness of LLMs on Code Generation21 Feb 2026
- 2026Fool Me If You Can: On the Robustness of Binary Code Similarity Detection Models against Semantics-preserving Transformations13 Feb 2026
- 2025CLASP: Training-Free LLM-Assisted Source Code Watermarking via Semantic-Preserving Transformations13 Oct 2025
- 2025Evaluate-and-Purify: Fortifying Code Language Models Against Adversarial Attacks Using LLM-as-a-Judge28 Apr 2025
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detection30 Mar 2025
- 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistants18 Mar 2025
- 2024MPCODER: Multi-user Personalized Code Generator with Explicit and Implicit Style Representation Learning25 Jun 2024
- 2023Untargeted Code Authorship Evasion with Seq2Seq Transformation26 Nov 2023
- 2023Transfer Attacks and Defenses for Large Language Models on Coding Tasks22 Nov 2023
- 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Code13 Nov 2023
1 more
- 2023SHIELD: Thwarting Code Authorship Attribution26 Apr 2023
- 2024MPCODER: Multi-user Personalized Code Generator with Explicit and Implicit Style Representation Learningcited by 12
- 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Codecited by 8
- 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistantscited by 4
- 2025Evaluate-and-Purify: Fortifying Code Language Models Against Adversarial Attacks Using LLM-as-a-Judgecited by 4
- 2023SHIELD: Thwarting Code Authorship Attributioncited by 2
- 2023Transfer Attacks and Defenses for Large Language Models on Coding Taskscited by 2
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detectioncited by 2
- 2026Fool Me If You Can: On the Robustness of Binary Code Similarity Detection Models against Semantics-preserving Transformationscited by 1
- 2023Untargeted Code Authorship Evasion with Seq2Seq Transformationcited by 0
- 2026Operational Robustness of LLMs on Code Generationcited by 0
- 2026Stylometric Defenses Against Author Impersonation in Software Repositoriescited by 0
- 2026On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Qualitycited by 0
- 2026On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Quality22 Sep 2026
- 2026Stylometric Defenses Against Author Impersonation in Software Repositories3 Aug 2026
- 2026Operational Robustness of LLMs on Code Generation21 Feb 2026
- 2026Fool Me If You Can: On the Robustness of Binary Code Similarity Detection Models against Semantics-preserving Transformations13 Feb 2026
- 2025Evaluate-and-Purify: Fortifying Code Language Models Against Adversarial Attacks Using LLM-as-a-Judge28 Apr 2025
- 2025Semantic-Preserving Transformations as Mutation Operators: A Study on Their Effectiveness in Defect Detection30 Mar 2025
- 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistants18 Mar 2025
- 2024MPCODER: Multi-user Personalized Code Generator with Explicit and Implicit Style Representation Learning25 Jun 2024
- 2023Untargeted Code Authorship Evasion with Seq2Seq Transformation26 Nov 2023
- 2023Transfer Attacks and Defenses for Large Language Models on Coding Tasks22 Nov 2023
- 2023An Extensive Study on Adversarial Attack against Pre-trained Models of Code13 Nov 2023
- 2023SHIELD: Thwarting Code Authorship Attribution26 Apr 2023