arrow
返回

Stealthy Backdoor Attack for Code Models

delete2024-04-01
delete10
delete
OA
AI
Z
Zhou Yang
B
Bowen Xu *
J
Jie M. Zhang
H
Hong Jin Kang
J
Jieke Shi
J
Junda He
D
David Lo
DOI:10.1109/TSE.2024.3361661delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Code models, such as CodeBERT and CodeT5, offer general-purpose representations of code and play a vital role in supporting downstream automated software engineering tasks. Most recently, code models were revealed to be vulnerable to backdoor attacks. A code model that is backdoor-attacked can behave normally on clean examples but will produce pre-defined malicious outputs on examples injected with triggers that activate the backdoors. Existing backdoor attacks on code models use unstealthy and easy-to-detect triggers. This paper aims to investigate the vulnerability of code models with stealthy backdoor attacks. To this end, we propose Afraidoor (Adversarial Feature as Adaptive Backdoor). Afraidoor achieves stealthiness by leveraging adversarial perturbations to inject adaptive triggers into different inputs. We apply Afraidoor to three widely adopted code models (CodeBERT, PLBART, and CodeT5) and two downstream tasks (code summarization and method name prediction). We evaluate three widely used defense methods and find that Afraidoor is more unlikely to be detected by the defense methods than by baseline methods. More specifically, when using spectral signature as defense, around 85% of adaptive triggers in Afraidoor bypass the detection in the defense process. By contrast, only less than 12% of the triggers from previous work bypass the defense. When the defense method is not applied, both Afraidoor and baselines have almost perfect attack success rates. However, once a defense is applied, the attack success rates of baselines decrease dramatically, while the success rate of Afraidoor remains high. Our finding exposes security weaknesses in code models under stealthy backdoor attacks and shows that state-of-the-art defense methods cannot provide sufficient protection. We call for more research efforts in understanding security threats to code models and developing more effective countermeasures.
Keyword:
Adversarial attack
data poisoning
backdoor attack
pre-trained models of code

期刊

IEEE Transactions on Software Engineering 封面图
IEEE Transactions on Software Engineering
IF:
5.6
论文数:
2.9K
被引数:
1.1W

机构

S
Singapore Management University
学者数:
1.5K
论文数: 2.5K
被引数: 3.5K
U
university of london
学者数:
21.5W
论文数: 19.7W
被引数: 305
N
North Carolina State University
学者数:
2.6W
论文数: 2.3W
被引数: 3.7W
学者 查看更多机构
引用论文

引用论文

Towards Understanding and Mitigating Audio Adversarial Examples for Speaker Recognition
err2023-09-01
err14
errOAAI
errChen, Guangke; Zhao, Zhe; Song, Fu; Chen, Sen; Fan, Lingling; Wang, Feng; Wang, Jiashui
err分享
err收藏
A Versatile One-pot Synthesis of Symmetrical N-Tosylazamacrocycles
err1985-01-01
err0
errOAAI
errSebastiano Pappalardo; Francesco Bottino; Michele Di Grazia; Paolo Finocchiaro; Antonino Mamo
err分享
err收藏
Mistuning Identification and Model Updating of an Industrial Blisk
err2007-01-01
err0
errOAAI
errD. Laxalde; F. Thouverez; J.-J. Sinou; J.-P. Lombard; S. Baumhauer
err分享
err收藏
err分享
err收藏
err分享
err收藏
err分享
err收藏
Caveolin-1 and -2 regulate cell motility in castration-resistant prostate cancer
err2018-10-01
err0
errOAAI
errToyoharu Kamibeppu; Koji Yamasaki; Kozue Nakahara; Takahiro Nagai; Naoki Terada; Hiromasa Tsukino; Shoichiro Mukai; Toshiyuki Kamoto
err分享
err收藏
学者 查看更多内容