[论文解读] Misleading Authorship Attribution of Source Code using Adversarial Learning
本论文提出一种基于黑盒的针对机器学习源代码作者身份归属的对抗攻击。它通过蒙特卡洛树搜索引导的语义保持型代码转换来误导分类器,实现准确率的大幅下降并实现冒充。
In this paper, we present a novel attack against authorship attribution of source code. We exploit that recent attribution methods rest on machine learning and thus can be deceived by adversarial examples of source code. Our attack performs a series of semantics-preserving code transformations that mislead learning-based attribution but appear plausible to a developer. The attack is guided by Monte-Carlo tree search that enables us to operate in the discrete domain of source code. In an empirical evaluation with source code from 204 programmers, we demonstrate that our attack has a substantial effect on two recent attribution methods, whose accuracy drops from over 88% to 1% under attack. Furthermore, we show that our attack can imitate the coding style of developers with high accuracy and thereby induce false attributions. We conclude that current approaches for authorship attribution are inappropriate for practical application and there is a need for resilient analysis techniques.
研究动机与目标
- 激发并评估基于 ML 的源代码作者身份归属的鲁棒性。
- 证明语义保持的转换可以误导归属方法。
- 提出将代码转换与蒙特卡洛树搜索结合的黑盒攻击框架。
- 评估在真实程序员数据上无目标与有目标的冒充攻击的可行性。
提出的方法
- 使用 Clang 前端开发五类转换族的语义保持型代码转换。
- 用 AST 表示代码,用 CFG 及用途-定义链、声明-引用映射来实现安全的转换。
- 通过蒙特卡洛树搜索构建转换序列,以在特征空间中达到目标且不破坏语义。
- 在仅使用分类器输出进行引导的黑盒威胁模型下进行操作。
- 在Google Code Jam 数据集上对两种归属方法(Caliskan 等人的 RF 与 Abuhamad 等人 LSTM)进行无目标与有目标攻击的评估。
实验结果
研究问题
- RQ1黑盒对手是否能显著降低基于 ML 的源代码作者身份归属的准确率?
- RQ2无目标攻击(规避)是否能将归属误导到任意其他作者?
- RQ3有目标的冒充攻击是否可行,能够将归属指向特定开发者?
- RQ4代码转换在改变归属所用的风格特征的同时,如何保持语义不变?
- RQ5转换后的代码在 manipulated 的同时是否仍然具有可行性和可信度?
主要发现
- 攻击使两种近期归属方法的准确率从超过 88% 降至 1%。
- 针对目标的冒充在平均水平上对开发者实现了 77%–81% 的成功率。
- 一项涉及 15 名参与者的研究显示,转换后的代码仍然显得合理且难以与未修改代码区分开。
- 实验设置使用 1,632 个 C++ 文件,来自 204 位作者,解决 8 道 GCJ 问题,采用跨问题的 k 折交叉验证。
- 转换仅为词汇/句法层面的(不改变布局),并且依赖于一个由五大族构成的 36 个转换器的大集合。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。