References & Citations
Computer Science > Computation and Language
Title: CodeAttack: Code-based Adversarial Attacks for Pre-Trained Programming Language Models
(Submitted on 31 May 2022 (this version), latest version 6 Dec 2022 (v2))
Abstract: Pre-trained programming language (PL) models (such as CodeT5, CodeBERT, GraphCodeBERT, etc.,) have the potential to automate software engineering tasks involving code understanding and code generation. However, these models are not robust to changes in the input and thus, are potentially susceptible to adversarial attacks. We propose, CodeAttack, a simple yet effective black-box attack model that uses code structure to generate imperceptible, effective, and minimally perturbed adversarial code samples. We demonstrate the vulnerabilities of the state-of-the-art PL models to code-specific adversarial attacks. We evaluate the transferability of CodeAttack on several code-code (translation and repair) and code-NL (summarization) tasks across different programming languages. CodeAttack outperforms state-of-the-art adversarial NLP attack models to achieve the best overall performance while being more efficient and imperceptible.
Submission history
From: Akshita Jha [view email][v1] Tue, 31 May 2022 18:40:01 GMT (1157kb,D)
[v2] Tue, 6 Dec 2022 05:07:45 GMT (1273kb)
Link back to: arXiv, form interface, contact.