Patch-level stylometric embeddings from commit messages and code diffs verify authorship with 0.93 ROC AUC and rank forged commits from two real supply-chain incidents near the top of review queues.
Robust and Accurate Authorship Attribution via Program Normalization
1 Pith paper cite this work. Polarity classification is still indexing.
abstract
Source code attribution approaches have achieved remarkable accuracy thanks to the rapid advances in deep learning. However, recent studies shed light on their vulnerability to adversarial attacks. In particular, they can be easily deceived by adversaries who attempt to either create a forgery of another author or to mask the original author. To address these emerging issues, we formulate this security challenge into a general threat model, the $\textit{relational adversary}$, that allows an arbitrary number of the semantics-preserving transformations to be applied to an input in any problem space. Our theoretical investigation shows the conditions for robustness and the trade-off between robustness and accuracy in depth. Motivated by these insights, we present a novel learning framework, $\textit{normalize-and-predict}$ ($\textit{N&P}$), that in theory guarantees the robustness of any authorship-attribution approach. We conduct an extensive evaluation of $\textit{N&P}$ in defending two of the latest authorship-attribution approaches against state-of-the-art attack methods. Our evaluation demonstrates that $\textit{N&P}$ improves the accuracy on adversarial inputs by as much as 70% over the vanilla models. More importantly, $\textit{N&P}$ also increases robust accuracy to 45% higher than adversarial training while running over 40 times faster.
citation-role summary
citation-polarity summary
fields
cs.CR 1years
2026 1verdicts
CONDITIONAL 1roles
method 1polarities
use method 1representative citing papers
citing papers explorer
-
Stylometric Defenses Against Author Impersonation in Software Repositories
Patch-level stylometric embeddings from commit messages and code diffs verify authorship with 0.93 ROC AUC and rank forged commits from two real supply-chain incidents near the top of review queues.