CodeBERT‐Attack: Adversarial attack against source code deep learning models via pre‐trained model

计算机科学 源代码 对抗制 编码(集合论) 人工智能 机器学习 遮罩(插图) 脆弱性(计算) 深度学习 推论 程序设计语言 计算机安全 艺术 集合(抽象数据类型) 视觉艺术
作者
Huangzhao Zhang,Shuai Lu,Zhuo Li,Zhi Jin,Lei Ma,Yang Liu,Ge Li
出处
期刊:Journal of software [Wiley]
卷期号:36 (3) 被引量:7
标识
DOI:10.1002/smr.2571
摘要

Abstract Over the past few years, the software engineering (SE) community has widely employed deep learning (DL) techniques in many source code processing tasks. Similar to other domains like computer vision and natural language processing (NLP), the state‐of‐the‐art DL techniques for source code processing can still suffer from adversarial vulnerability, where minor code perturbations can mislead a DL model's inference. Efficiently detecting such vulnerability to expose the risks at an early stage is an essential step and of great importance for further enhancement. This paper proposes a novel black‐box effective and high‐quality adversarial attack method, namely CodeBERT‐Attack (CBA), based on the powerful large pre‐trained model (i.e., CodeBERT) for DL models of source code processing. CBA locates the vulnerable positions through masking and leverages the power of CodeBERT to generate textual preserving perturbations. We turn CodeBERT against DL models and further fine‐tuned CodeBERT models for specific downstream tasks, and successfully mislead these victim models to erroneous outputs. In addition, taking the power of CodeBERT, CBA is capable of effectively generating adversarial examples that are less perceptible to programmers. Our in‐depth evaluation on two typical source code classification tasks (i.e., functionality classification and code clone detection) against the most widely adopted LSTM and the powerful fine‐tuned CodeBERT models demonstrate the advantages of our proposed technique in terms of both effectiveness and efficiency. Furthermore, our results also show (1) that pre‐training may help CodeBERT gain resilience against perturbations further, and (2) certain pre‐training tasks may be beneficial for adversarial robustness.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
刚刚
伶俐迎蕾完成签到,获得积分10
刚刚
深情安青应助小周采纳,获得10
1秒前
沐泽完成签到 ,获得积分10
1秒前
周游完成签到,获得积分10
1秒前
2秒前
王香平完成签到 ,获得积分10
3秒前
麒麟发布了新的文献求助10
3秒前
小g发布了新的文献求助10
4秒前
大个应助CCC采纳,获得10
4秒前
Zr97完成签到,获得积分10
5秒前
5秒前
普萘洛尔完成签到,获得积分10
7秒前
彭于晏应助ewetylgkhlj采纳,获得10
7秒前
Demons完成签到 ,获得积分10
8秒前
9秒前
9秒前
细草微风岸完成签到,获得积分10
10秒前
Zr97发布了新的文献求助10
10秒前
sunshine完成签到,获得积分10
11秒前
13秒前
13秒前
沉静问芙完成签到 ,获得积分10
14秒前
lxj完成签到 ,获得积分10
14秒前
王子恒发布了新的文献求助10
15秒前
15秒前
少女椰椰完成签到 ,获得积分10
15秒前
杜欣完成签到,获得积分20
15秒前
410的大平层有213个杀手完成签到 ,获得积分10
16秒前
16秒前
大胆初南完成签到 ,获得积分10
17秒前
痞老板发布了新的文献求助10
17秒前
科目三应助fzetai采纳,获得10
18秒前
18秒前
18秒前
童行发布了新的文献求助10
20秒前
xxxxx发布了新的文献求助10
21秒前
时不我待完成签到,获得积分10
21秒前
xiaobei88完成签到,获得积分10
22秒前
谢雷XIELei应助ll采纳,获得10
24秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Navigating Normative Orders. Interdisciplinary Perspectives 800
Organizational Behavior 510
Management and the Arts 510
Matrix Methods in Data Mining and Pattern Recognition Second Edition 510
CLSI VET01S-2024 Performance Standards for Antimicrobial Disk and Dilution Susceptibility Tests for Bacteria Isolated From Animals (7th Ed) 500
A Case Study on Hotels as Noncongregate Emergency Living Accommodations for Returning Citizens 500
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 内科学 物理 复合材料 催化作用 细胞生物学 无机化学 光电子学 物理化学 电极 基因
热门帖子
关注 科研通微信公众号,转发送积分 7757650
求助须知:如何正确求助?哪些是违规求助? 9304035
关于积分的说明 20277918
捐赠科研通 7341363
什么是DOI,文献DOI怎么找? 3312027
关于科研通互助平台的介绍 2462730
邀请新用户注册赠送积分活动 2325771