{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,18]],"date-time":"2026-11-18T19:15:47Z","timestamp":1795029347990,"version":"4.10.2"},"reference-count":65,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2020,11,13]],"date-time":"2020-11-13T00:00:00Z","timestamp":1605225600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2020,11,13]]},"abstract":"<jats:p>\n                    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\n                    <jats:italic>adversarial examples<\/jats:italic>\n                    , and introduce a novel approach for\n                    <jats:italic>attacking<\/jats:italic>\n                    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\u2019s 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\u2019s\n                    <jats:italic>inputs<\/jats:italic>\n                    , while holding the model weights constant, and following the gradients to slightly modify the input code.\n                  <\/jats:p>\n                  <jats:p>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\u2019s 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.<\/jats:p>\n                  <jats:p>Our code, data, and trained models are available at &lt;a&gt;https:\/\/github.com\/tech-srl\/adversarial-examples&lt;\/a&gt; .<\/jats:p>","DOI":"10.1145\/3428230","type":"journal-article","created":{"date-parts":[[2020,11,24]],"date-time":"2020-11-24T18:36:06Z","timestamp":1606242966000},"page":"1-30","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":141,"title":["Adversarial examples for models of code"],"prefix":"10.1145","volume":"4","author":[{"given":"Noam","family":"Yefet","sequence":"first","affiliation":[{"name":"Technion, Israel"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Uri","family":"Alon","sequence":"additional","affiliation":[{"name":"Technion, Israel"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Eran","family":"Yahav","sequence":"additional","affiliation":[{"name":"Technion, Israel"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2020,11,13]]},"reference":[{"key":"e_1_2_2_1_1","volume-title":"International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=BJOFETxR-","author":"Allamanis Miltiadis","year":"2018"},{"key":"e_1_2_2_2_1","volume-title":"Proceedings of the 33nd International Conference on Machine Learning, ICML 2016","author":"Allamanis Miltiadis","year":"2016"},{"key":"e_1_2_2_3_1","volume-title":"International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=H1gKYo09tX","author":"Alon Uri","year":"2019"},{"key":"e_1_2_2_4_1","volume-title":"Structural Language of Code. arXiv preprint arXiv","author":"Alon Uri","year":"1910"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/3192366.3192412"},{"key":"e_1_2_2_6_1","doi-asserted-by":"publisher","DOI":"10.1145\/3290353"},{"key":"e_1_2_2_7_1","volume-title":"Did you hear that? adversarial examples against automatic speech recognition. arXiv preprint arXiv","author":"Alzantot Moustafa","year":"1801"},{"key":"e_1_2_2_8_1","volume-title":"Generating natural language adversarial examples. arXiv preprint arXiv","author":"Alzantot Moustafa","year":"1804"},{"key":"e_1_2_2_9_1","volume-title":"DREBIN: Efective and Explainable Detection of Android Malware in Your Pocket. ( 2014 ).","author":"Arp Daniel","year":"2014"},{"key":"e_1_2_2_10_1","first-page":"15313","article-title":"Certifying geometric robustness of neural networks","author":"Balunovic Mislav","year":"2019","journal-title":"Advances in Neural Information Processing Systems."},{"key":"e_1_2_2_11_1","volume-title":"Context2Name: A deep learning-based approach to infer natural variable names from usage contexts. arXiv preprint arXiv","author":"Bavishi Rohan","year":"1809"},{"key":"e_1_2_2_12_1","unstructured":"Yonatan Belinkov and Yonatan Bisk. 2017. Synthetic and natural noise both break neural machine translation. arXiv preprint arXiv:1711.02173 ( 2017 ).  Yonatan Belinkov and Yonatan Bisk. 2017. Synthetic and natural noise both break neural machine translation. arXiv preprint arXiv:1711.02173 ( 2017 )."},{"key":"e_1_2_2_13_1","volume-title":"Proceedings of the 33nd International Conference on Machine Learning, ICML 2016","author":"Bielik Pavol","year":"2016"},{"key":"e_1_2_2_14_1","volume-title":"Vechev","author":"Bielik Pavol","year":"2020"},{"key":"e_1_2_2_15_1","volume-title":"GNN-FiLM: Graph neural networks with feature-wise linear modulation. arXiv preprint arXiv","author":"Brockschmidt Marc","year":"1906"},{"key":"e_1_2_2_16_1","volume-title":"Generative Code Modeling with Graphs. In International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=Bke4KsA5FX","author":"Brockschmidt Marc","year":"2019"},{"key":"e_1_2_2_17_1","unstructured":"Tom B Brown Dandelion Man\u00e9 Aurko Roy Mart\u00edn Abadi and Justin Gilmer. 2017. Adversarial patch. arXiv preprint arXiv:1712.09665 ( 2017 ).  Tom B Brown Dandelion Man\u00e9 Aurko Roy Mart\u00edn Abadi and Justin Gilmer. 2017. Adversarial patch. arXiv preprint arXiv:1712.09665 ( 2017 )."},{"key":"e_1_2_2_18_1","volume-title":"When Deep Learning Met Code Search. arXiv preprint arXiv","author":"Cambronero Jose","year":"1905"},{"key":"e_1_2_2_19_1","doi-asserted-by":"publisher","DOI":"10.1109\/SPW.2018.00009"},{"key":"e_1_2_2_20_1","volume-title":"Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio.","author":"Cho Kyunghyun","year":"2014"},{"key":"e_1_2_2_21_1","volume-title":"Neural Reverse Engineering of Stripped Binaries. arXiv preprint arXiv","author":"David Yaniv","year":"1902"},{"key":"e_1_2_2_22_1","volume-title":"Hotflip: White-box adversarial examples for text classification. arXiv preprint arXiv:1712.06751 ( 2017 ).","author":"Ebrahimi Javid","year":"2017"},{"key":"e_1_2_2_23_1","volume-title":"Structured Neural Summarization. In International Conference on Learning Representations. https:\/\/openreview.net\/forum?id=H1ersoRqtm","author":"Fernandes Patrick","year":"2019"},{"key":"e_1_2_2_24_1","unstructured":"Ian Goodfellow Jean Pouget-Abadie Mehdi Mirza Bing Xu David Warde-Farley Sherjil Ozair Aaron Courville and Yoshua Bengio. 2014a. Generative adversarial nets. In Advances in neural information processing systems. 2672-2680.  Ian Goodfellow Jean Pouget-Abadie Mehdi Mirza Bing Xu David Warde-Farley Sherjil Ozair Aaron Courville and Yoshua Bengio. 2014a. Generative adversarial nets. In Advances in neural information processing systems. 2672-2680."},{"key":"e_1_2_2_25_1","unstructured":"Ian J Goodfellow Jonathon Shlens and Christian Szegedy. 2014b. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572 ( 2014 ).  Ian J Goodfellow Jonathon Shlens and Christian Szegedy. 2014b. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572 ( 2014 )."},{"key":"e_1_2_2_26_1","unstructured":"Kathrin Grosse Nicolas Papernot Praveen Manoharan Michael Backes and Patrick McDaniel. 2016. Adversarial perturbations against deep neural networks for malware classification. arXiv preprint arXiv:1606.04435 ( 2016 ).  Kathrin Grosse Nicolas Papernot Praveen Manoharan Michael Backes and Patrick McDaniel. 2016. Adversarial perturbations against deep neural networks for malware classification. arXiv preprint arXiv:1606.04435 ( 2016 )."},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2016.90"},{"key":"e_1_2_2_28_1","doi-asserted-by":"crossref","unstructured":"Sepp Hochreiter and J\u00fcrgen Schmidhuber. 1997. Long short-term memory. Neural computation 9 8 ( 1997 ) 1735-1780.  Sepp Hochreiter and J\u00fcrgen Schmidhuber. 1997. Long short-term memory. Neural computation 9 8 ( 1997 ) 1735-1780.","DOI":"10.1162\/neco.1997.9.8.1735"},{"key":"e_1_2_2_29_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICMLA.2017.0-136"},{"key":"e_1_2_2_30_1","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/P16-1195"},{"key":"e_1_2_2_31_1","doi-asserted-by":"publisher","DOI":"10.2514\/8.5282"},{"key":"e_1_2_2_32_1","doi-asserted-by":"publisher","DOI":"10.23919\/EUSIPCO.2018.8553214"},{"key":"e_1_2_2_33_1","volume-title":"Deceiving end-to-end deep learning malware detectors using adversarial examples. arXiv preprint arXiv","author":"Kreuk Felix","year":"1802"},{"key":"e_1_2_2_34_1","volume-title":"Advances in Neural Information Processing Systems 25","author":"Krizhevsky Alex"},{"key":"e_1_2_2_35_1","unstructured":"Alexey Kurakin Ian Goodfellow and Samy Bengio. 2016. Adversarial examples in the physical world. arXiv preprint arXiv:1607.02533 ( 2016 ).  Alexey Kurakin Ian Goodfellow and Samy Bengio. 2016. Adversarial examples in the physical world. arXiv preprint arXiv:1607.02533 ( 2016 )."},{"key":"e_1_2_2_36_1","unstructured":"Yujia Li Daniel Tarlow Marc Brockschmidt and Richard Zemel. 2016. Gated graph sequence neural networks. In ICLR.  Yujia Li Daniel Tarlow Marc Brockschmidt and Richard Zemel. 2016. Gated graph sequence neural networks. In ICLR."},{"key":"e_1_2_2_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/3315508.3329975"},{"key":"e_1_2_2_38_1","unstructured":"Yanxin Lu Swarat Chaudhuri Chris Jermaine and David Melski. 2017. Data-Driven Program Completion. CoRR abs\/1705.09042 ( 2017 ). arXiv: 1705.09042 http:\/\/arxiv.org\/abs\/1705.09042  Yanxin Lu Swarat Chaudhuri Chris Jermaine and David Melski. 2017. Data-Driven Program Completion. CoRR abs\/1705.09042 ( 2017 ). arXiv: 1705.09042 http:\/\/arxiv.org\/abs\/1705.09042"},{"key":"e_1_2_2_39_1","unstructured":"Mehdi Mirza and Simon Osindero. 2014. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784 ( 2014 ).  Mehdi Mirza and Simon Osindero. 2014. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784 ( 2014 )."},{"key":"e_1_2_2_40_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2016.282"},{"key":"e_1_2_2_41_1","unstructured":"Vijayaraghavan Murali Swarat Chaudhuri and Chris Jermaine. 2017. Bayesian Sketch Learning for Program Synthesis. CoRR abs\/1703.05698 ( 2017 ). arXiv: 1703.05698 http:\/\/arxiv.org\/abs\/1703.05698  Vijayaraghavan Murali Swarat Chaudhuri and Chris Jermaine. 2017. Bayesian Sketch Learning for Program Synthesis. CoRR abs\/1703.05698 ( 2017 ). arXiv: 1703.05698 http:\/\/arxiv.org\/abs\/1703.05698"},{"key":"e_1_2_2_42_1","doi-asserted-by":"crossref","volume-title":"Introductory lectures on convex optimization: A basic course","author":"Nesterov Yurii","DOI":"10.1007\/978-1-4419-8853-9"},{"key":"e_1_2_2_43_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2015.7298640"},{"key":"e_1_2_2_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/3052973.3053009"},{"key":"e_1_2_2_45_1","doi-asserted-by":"publisher","DOI":"10.1109\/EuroSP.2016.36"},{"key":"e_1_2_2_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276517"},{"key":"e_1_2_2_47_1","doi-asserted-by":"crossref","unstructured":"Danish Pruthi Bhuwan Dhingra and Zachary C Lipton. 2019. Combating Adversarial Misspellings with Robust Word Recognition. ACL ( 2019 ).  Danish Pruthi Bhuwan Dhingra and Zachary C Lipton. 2019. Combating Adversarial Misspellings with Robust Word Recognition. ACL ( 2019 ).","DOI":"10.18653\/v1\/P19-1561"},{"key":"e_1_2_2_48_1","unstructured":"Md Rafiqul Islam Rabin Ke Wang and Mohammad Amin Alipour. 2019. Testing Neural Program Analyzers. ASE-Late Breaking Results ( 2019 ).  Md Rafiqul Islam Rabin Ke Wang and Mohammad Amin Alipour. 2019. Testing Neural Program Analyzers. ASE-Late Breaking Results ( 2019 )."},{"key":"e_1_2_2_49_1","volume-title":"Semantic Robustness of Models of Source Code. arXiv preprint arXiv","author":"Ramakrishnan Goutham","year":"2002"},{"key":"e_1_2_2_50_1","doi-asserted-by":"publisher","DOI":"10.1145\/2676726.2677009"},{"key":"e_1_2_2_51_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133928"},{"key":"e_1_2_2_52_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-00470-5_23"},{"key":"e_1_2_2_53_1","doi-asserted-by":"publisher","DOI":"10.1145\/3211346.3211353"},{"key":"e_1_2_2_54_1","doi-asserted-by":"publisher","DOI":"10.1109\/MALWARE.2015.7413680"},{"key":"e_1_2_2_55_1","article-title":"The graph neural network model","volume":"20","author":"Scarselli Franco","year":"2008","journal-title":"IEEE Transactions on Neural Networks"},{"key":"e_1_2_2_56_1","volume-title":"Getafix: Learning to fix bugs automatically. arXiv preprint arXiv","author":"Scott Andrew","year":"2019"},{"key":"e_1_2_2_57_1","unstructured":"Karen Simonyan and Andrew Zisserman. 2014. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556 ( 2014 ).  Karen Simonyan and Andrew Zisserman. 2014. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556 ( 2014 )."},{"key":"e_1_2_2_58_1","doi-asserted-by":"publisher","DOI":"10.1145\/3290354"},{"key":"e_1_2_2_59_1","doi-asserted-by":"publisher","DOI":"10.1109\/SPW.2019.00015"},{"key":"e_1_2_2_60_1","doi-asserted-by":"publisher","DOI":"10.1109\/CVPR.2015.7298594"},{"key":"e_1_2_2_61_1","unstructured":"Christian Szegedy Wojciech Zaremba Ilya Sutskever Joan Bruna Dumitru Erhan Ian Goodfellow and Rob Fergus. 2013. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199 ( 2013 ).  Christian Szegedy Wojciech Zaremba Ilya Sutskever Joan Bruna Dumitru Erhan Ian Goodfellow and Rob Fergus. 2013. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199 ( 2013 )."},{"key":"e_1_2_2_62_1","doi-asserted-by":"publisher","DOI":"10.1109\/SPW.2019.00016"},{"key":"e_1_2_2_63_1","volume-title":"Imitation Attacks and Defenses for Black-box Machine Translation Systems. arXiv preprint arXiv","author":"Wallace Eric","year":"2004"},{"key":"e_1_2_2_64_1","doi-asserted-by":"publisher","DOI":"10.1145\/3097983.3098158"},{"key":"e_1_2_2_65_1","doi-asserted-by":"publisher","DOI":"10.1145\/3134600.3134642"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3428230","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3428230","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T18:02:57Z","timestamp":1750183377000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3428230"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2020,11,13]]},"references-count":65,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2020,11,13]]}},"alternative-id":["10.1145\/3428230"],"URL":"https:\/\/doi.org\/10.1145\/3428230","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2020,11,13]]},"assertion":[{"value":"2020-11-13","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}