arrow
Return

Poison Attack and Poison Detection on Deep Source Code Processing Models

delete2024-03-14
delete3
PRE
AI
J
Jia Li
Z
Zhuo Li
H
Huangzhao Zhang
G
Ge Li *
Z
Zhi Jin
X
Xing Hu
X
Xin Xia
DOI:10.1145/3630008delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
In the software engineering (SE) community, deep learning (DL) has recently been applied to many source code processing tasks, achieving state-of-the-art results. Due to the poor interpretability of DL models, their security vulnerabilities require scrutiny. Recently, researchers have identified an emergent security threat to DL models, namely, poison attacks. The attackers aim to inject insidious backdoors into DL models by poisoning the training data with poison samples. The backdoors mean that poisoned models work normally with clean inputs but produce targeted erroneous results with inputs embedded with specific triggers. By using triggers to activate backdoors, attackers can manipulate poisoned models in security-related scenarios (e.g., defect detection) and lead to severe consequences. To verify the vulnerability of deep source code processing models to poison attacks, we present a poison attack approach for source code named CODEPOISONER as a strong imaginary enemy. CODEPOISONER can produce compilable and functionality-preserving poison samples and effectively attack deep source code processing models by poisoning the training data with poison samples. To defend against poison attacks, we further propose an effective poison detection approach named CODEDETECTOR. CODEDETECTOR can automatically identify poison samples in the training data. We apply CODEPOISONER and CODEDETECTOR to six deep source code processing models, including defect detection, clone detection, and code repair models. The results show that (1) CODEPOISONER conducts successful poison attacks with a high attack success rate (average: 98.3%, maximum: 100%). It validates that existing deep source code processing models have a strong vulnerability to poison attacks. (2) CODEDETECTOR effectively defends against multiple poison attack approaches by detecting (maximum: 100%) poison samples in the training data. We hope this work can help SE researchers and practitioners notice poison attacks and inspire the design of more advanced defense techniques.
Keywords:
Poison attack
poison detection
source code processing
deep learning

Journal

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
Papers:
1.2K
Citations:
3.4K

Organization

H
huawei technologies
Scholars:
3.3K
Papers: 2.9K
Citations: 1
P
peking university
Scholars:
11.9W
Papers: 8.7W
Citations: 146
Z
zhejiang university
Scholars:
17.7W
Papers: 12.1W
Citations: 152
researcher View more organizations
Cited Papers

Cited Papers

An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
err2019-09-02
err204
errOAAI
errTufano, Michele; Watson, Cody; Bavota, Gabriele; Di Penta, Massimiliano; White, Martin; Poshyvanyk, Denys
errShare
errSave
err
IF0
err
err0
errOAAI
err
errShare
errSave
Combining Graph Neural Networks With Expert Knowledge for Smart Contract Vulnerability Detection
err2021-01-01
err132
errOAAI
errLiu, Zhenguang; Qian, Peng; Wang, Xiaoyang; Zhuang, Yuan; Qiu, Lin; Wang, Xun
errShare
errSave
errShare
errSave
Autophagy protects against PI3K/Akt/mTOR-mediated apoptosis of spinal cord neurons after mechanical injury
err2017-08-01
err0
PREAI
errZhenYu Wang; LinQuan Zhou; XiaoTing Zheng; Gang Chen; RongFeng Pan; JinHuang Li; WenGe Liu
errShare
errSave
SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilities
err2022-07-01
err261
errOAAI
errLi, Zhen; Zou, Deqing; Xu, Shouhuai; Jin, Hai; Zhu, Yawei; Chen, Zhaoxuan
errShare
errSave
errShare
errSave
researcher View more