English

Multi-target Backdoor Attacks for Code Pre-trained Models

Cryptography and Security 2023-06-16 v1 Artificial Intelligence Computation and Language

Abstract

Backdoor attacks for neural code models have gained considerable attention due to the advancement of code intelligence. However, most existing works insert triggers into task-specific data for code-related downstream tasks, thereby limiting the scope of attacks. Moreover, the majority of attacks for pre-trained models are designed for understanding tasks. In this paper, we propose task-agnostic backdoor attacks for code pre-trained models. Our backdoored model is pre-trained with two learning strategies (i.e., Poisoned Seq2Seq learning and token representation learning) to support the multi-target attack of downstream code understanding and generation tasks. During the deployment phase, the implanted backdoors in the victim models can be activated by the designed triggers to achieve the targeted attack. We evaluate our approach on two code understanding tasks and three code generation tasks over seven datasets. Extensive experiments demonstrate that our approach can effectively and stealthily attack code-related downstream tasks.

Keywords

Cite

@article{arxiv.2306.08350,
  title  = {Multi-target Backdoor Attacks for Code Pre-trained Models},
  author = {Yanzhou Li and Shangqing Liu and Kangjie Chen and Xiaofei Xie and Tianwei Zhang and Yang Liu},
  journal= {arXiv preprint arXiv:2306.08350},
  year   = {2023}
}

Comments

ACL 2023 main conference

R2 v1 2026-06-28T11:04:47.557Z