arrow
返回

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
delete原文链接
delete分享
delete收藏
摘要

摘要

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.
Keyword:
Poison attack
poison detection
source code processing
deep learning
Poisoned source code detection in code models
err2025-03-01
err0
errOAAI
errGhannoum, Ehab; Ghafari, Mohammad
err分享
err收藏
A Lightweight Defense Against Code Poisoning Attacks Based on Code Naturalness基于代码自然性的轻量级代码污染攻击防御方法
err2026-06-18
err0
PREAI
errMengzhe Yuan; Weisong Sun; Yuchen Chen; Chunrong Fang; Zhenpeng Chen; Peizhuo Lv; Wenbo Guo; Yang Liu; Baowen Xu; Zhenyu Chen; Yanhui Li
err分享
err收藏

期刊

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
论文数:
1.4K
被引数:
4.5K

机构

北京大学 封面图
北京大学
学者数:
9.2K
论文数: 2.8K
被引数: 7.1W
浙江大学 封面图
浙江大学
学者数:
1.5K
论文数: 463
被引数: 9.6W
H
huawei technologies
学者数:
104
论文数: 62
被引数: 3.2K
学者 查看更多机构
引用论文

引用论文

err
IF0
err
err0
errOAAI
err
err分享
err收藏
err分享
err收藏
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
err分享
err收藏
err分享
err收藏
学者 查看更多内容