Lune

OOPSLA2020顶会

Adversarial examples for models of code

Noam Yefet, Uri Alon, Eran Yahav

摘要

Neural models of code have shown impressive results when performing tasks such as predicting method names and identifying certain kinds of bugs. We show that these models are vulnerable to adversarial examples , and introduce a novel approach for attacking trained models of code using adversarial examples. The main idea of our approach is to force a given trained model to make an incorrect prediction, as specified by the adversary, by introducing small perturbations that do not change the program’s semantics, thereby creating an adversarial example. To find such perturbations, we present a new technique for Discrete Adversarial Manipulation of Programs (DAMP). DAMP works by deriving the desired prediction with respect to the model’s inputs , while holding the model weights constant, and following the gradients to slightly modify the input code. We show that our DAMP attack is effective across three neural architectures: code2vec, GGNN, and GNN-FiLM, in both Java and C#. Our evaluations demonstrate that DAMP has up to 89% success rate in changing a prediction to the adversary’s choice (a targeted attack) and a success rate of up to 94% in changing a given prediction to any incorrect prediction (a non-targeted attack). To defend a model against such attacks, we empirically examine a variety of possible defenses and discuss their trade-offs. We show that some of these defenses can dramatically drop the success rate of the attacker, with a minor penalty of 2% relative degradation in accuracy when they are not performing under attack. Our code, data, and trained models are available at https://github.com/tech-srl/adversarial-examples .

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 43 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Natural Attack for Pre-trained Models of Code 引用了 You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completion
  • Neural reverse engineering of stripped binaries using augmented control flow graphs 引用了 Structural Language Models of Code
  • Code Prediction by Feeding Trees to Transformers 引用了 Structural Language Models of Code
  • You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completion 引用了 Structural Language Models of Code
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper43

  1. You Autocomplete Me: Poisoning Vulnerabilities in Neural Code CompletionRoei Schuster, Congzheng Song, Eran Tromer, Vitaly ShmatikovUSENIX Security 2021 · 199 次引用
  2. Code Prediction by Feeding Trees to TransformersSeohyun Kim, Jinman Zhao, Yuchi Tian, Satish ChandraICSE 2021 · 179 次引用
  3. Natural Attack for Pre-trained Models of CodeZhou Yang, Jieke Shi, Junda He, David LoICSE 2022 · 150 次引用
  4. An extensive study on pre-trained models for program understanding and generationZhengran Zeng, Hanzhuo Tan, Haotian Zhang, Jing Li 等ISSTA 2022 · 142 次引用
  5. Adversarial Robustness for CodePavol Bielik, Martin T. VechevICML 2020 · 101 次引用

它引用的 Paper5

  1. GNN-FiLM: Graph Neural Networks with Feature-wise Linear ModulationMarc BrockschmidtICML 2020 · 180 次引用
  2. Structural Language Models of CodeUri Alon, Roy Sadaka, Omer Levy, Eran YahavICML 2020 · 115 次引用
  3. Adversarial Robustness for CodePavol Bielik, Martin T. VechevICML 2020 · 101 次引用
  4. Neural reverse engineering of stripped binaries using augmented control flow graphsYaniv David, Uri Alon, Eran YahavOOPSLA 2020 · 83 次引用
  5. Imitation Attacks and Defenses for Black-box Machine Translation SystemsEric Wallace, Mitchell Stern, Dawn SongEMNLP 2020 · 63 次引用

相关 Paper

  1. Discrete Adversarial Attack to Models of CodeFengjuan Gao, Yu Wang, Ke WangPLDI 2023 · 23 次引用
  2. A Black-Box Attack on Code Models via Representation Nearest Neighbor SearchJie Zhang, Wei Ma, Qiang Hu, Shangqing Liu 等EMNLP Findings 2023 · 9 次引用
  3. Code Difference Guided Adversarial Example Generation for Deep Code ModelsZhao Tian, Junjie Chen, Zhi JinASE 2023 · 27 次引用
  4. Attack as defense: characterizing adversarial examples using robustnessZhe Zhao, Guangke Chen, Jingyi Wang, Yiwei Yang 等ISSTA 2021 · 34 次引用
  5. Evolutionary Multi-objective Optimization for Contextual Adversarial Example GenerationShasha Zhou, Mingyu Huang, Yanan Sun, Ke LiFSE 2024 · 14 次引用
黄昏的海面,两侧是细线勾勒的悬崖