Proj CDeepFuzz Paper Reading: Natural attack for pre-trained models of code

发布时间 2023-09-06 23:37:35作者: 雪溯

Abstract

背景:目前大多数的adversarial attack method on pre-trained models of code忽略了perturbations should be natural to human judges(naturalness requirement)
本文:ALERT(Naturalness Aware Attack)
Github: https://github.com/soarsmu/attack-pretrain-models-of-code
Task: blackbox attack on pre-trained models of code
Method: 同时考虑生成的样本的自然语义(natural semantic)和操作性语义(operational semantic)

实验1:User study: ALERT生成的更natural

实验2:
数据集: CodeBERT, GraphCodeBERT
Competitor: MHM
Subtasks: vulnerability prediction, clone detection, code authorship attribution

  1. On attacking CodeBERT, our approach can achieve attack success rates of 53.62%, 27.79%, and 35.78% across three downstream tasks: vulnerability prediction, clone detection and code authorship attribution.
  2. On GraphCodeBERT, our approach can achieve average success rates of 76.95%, 7.96% and 61.47% on the three tasks.
  3. outperforms the baseline by 14.07% and 18.56% on the two pre-trained models on average
  4. retraining: increased by 87.59% and 92.32%