arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2009.13562cs.LGcs.CRstat.ML
收藏

STRATA:对代码模型的简单、无恶意攻击

STRATA: Simple, Gradient-Free Attacks for Models of Code

MIT(麻省理工学院)

Jacob M. Springer, Bryn Marie Reinstadler, Una-May O'Reilly

摘要:

众所周知,神经网络容易受到输入中不可感知的扰动(称为对抗性示例)的影响,从而导致错误分类。与图像和自然语言领域相比,为源代码生成对抗性示例带来了额外的挑战,因为源代码扰动必须保留代码的功能意义。我们确定了一个惊人的令牌频率统计和学习令牌嵌入之间的关系:学习令牌嵌入的L2范数随着令牌的频率增加,除了最高频率的令牌。我们利用这种关系来构建一种简单而有效的无梯度方法,用于在代码模型上生成最先进的对抗性示例。我们的方法经验优于竞争的基于梯度的方法,更少的信息和更少的计算工作。

英文摘要:

Neural networks are well-known to be vulnerable to imperceptible perturbations in the input, called adversarial examples, that result in misclassification. Generating adversarial examples for source code poses an additional challenge compared to the domains of images and natural language, because source code perturbations must retain the functional meaning of the code. We identify a striking relationship between token frequency statistics and learned token embeddings: the L2 norm of learned token embeddings increases with the frequency of the token except for the highest-frequnecy tokens. We leverage this relationship to construct a simple and efficient gradient-free method for generating state-of-the-art adversarial examples on models of code. Our method empirically outperforms competing gradient-based methods with less information and less computational effort.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑